diff --git a/doc/Makefile.am b/doc/Makefile.am index 77cec14..7db29cc 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -4,15 +4,21 @@ PRODUCT = MDBTools dist_man_MANS = if ENABLE_MAN - dist_man_MANS += mdb-tables.1 mdb-ver.1 mdb-export.1 mdb-schema.1 mdb-sql.1 \ + dist_man_MANS += mdb-tables.1 mdb-ver.1 mdb-export.1 mdb-schema.1 \ mdb-array.1 mdb-header.1 mdb-hexdump.1 mdb-parsecsv.1 mdb-prop.1 mdb-import.1 \ mdb-count.1 mdb-json.1 mdb-queries.1 +if SQL + dist_man_MANS += mdb-sql.1 +endif endif CLEANFILES = ${dist_man_MANS} -EXTRA_DIST = mdb-tables.txt mdb-ver.txt mdb-export.txt mdb-schema.txt mdb-sql.txt \ +EXTRA_DIST = mdb-tables.txt mdb-ver.txt mdb-export.txt mdb-schema.txt \ mdb-array.txt mdb-header.txt mdb-hexdump.txt mdb-parsecsv.txt mdb-prop.txt mdb-import.txt \ mdb-count.txt mdb-json.txt mdb-queries.txt \ txt2man +if SQL +EXTRA_DIST += mdb-sql.txt +endif .txt.1: $(TXT2MAN) -t $* -r "$(PRODUCT) $(VERSION)" -s 1 -v "Executable programs or shell commands" $(srcdir)/$< > $@ diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 4d7f74c..5fba6ca 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -1,6 +1,6 @@ AUTOMAKE_OPTIONS = subdir-objects SUBDIRS = bash-completion -bin_PROGRAMS = mdb-export mdb-array mdb-schema mdb-tables mdb-parsecsv mdb-header mdb-sql mdb-ver mdb-prop mdb-count mdb-queries mdb-json +bin_PROGRAMS = mdb-export mdb-array mdb-schema mdb-tables mdb-parsecsv mdb-header mdb-ver mdb-prop mdb-count mdb-queries mdb-json noinst_PROGRAMS = mdb-import prtable prcat prdata prkkd prdump prole updrow prindex noinst_HEADERS = base64.h LIBS = $(GLIB_LIBS) @LIBS@ @@ -8,5 +8,6 @@ DEFS = @DEFS@ -DLOCALEDIR=\"$(localedir)\" AM_CFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS) -Wsign-compare LDADD = ../libmdb/libmdb.la if SQL +bin_PROGRAMS += mdb-sql mdb_sql_LDADD = ../libmdb/libmdb.la ../sql/libmdbsql.la $(LIBREADLINE) endif diff --git a/src/util/mdb-sql.c b/src/util/mdb-sql.c index b0258e0..45564c7 100644 --- a/src/util/mdb-sql.c +++ b/src/util/mdb-sql.c @@ -51,8 +51,6 @@ extern void clear_history (); void dump_results(FILE *out, MdbSQL *sql, char *delimiter); void dump_results_pp(FILE *out, MdbSQL *sql); -#if SQL - int headers = 1; int footers = 1; int pretty_print = 1; @@ -516,11 +514,3 @@ main(int argc, char **argv) return 0; } -#else -int main(int argc, char **argv) -{ - fprintf(stderr,"You must configure using --enable-sql to get SQL support\n"); - - return -1; -} -#endif