diff --git a/configure.ac b/configure.ac index aef05e6..d766151 100644 --- a/configure.ac +++ b/configure.ac @@ -345,6 +345,13 @@ AC_DEFINE(OBJ_DIR, "/usr/lib/elk", [FIXME HARD]) #define FIND_AOUT defined(USE_LD) || defined(CAN_DUMP) || defined(INIT_OBJECTS) AC_DEFINE(FIND_AOUT, 1, [FIXME HARD]) +dnl +dnl Check for available libraries +dnl +ac_cv_have_gdbm=no +AC_CHECK_LIB(gdbm, gdbm_open, ac_cv_have_gdbm=yes) +AM_CONDITIONAL(HAVE_GDBM, test "${ac_cv_have_gdbm}" = "yes") + dnl dnl Check for available warning flags dnl diff --git a/lib/misc/Makefile.am b/lib/misc/Makefile.am index 680c5a5..69a6f4e 100644 --- a/lib/misc/Makefile.am +++ b/lib/misc/Makefile.am @@ -6,7 +6,7 @@ pkglib_LTLIBRARIES = \ hack.la \ regexp.la \ debug.la \ - gdbm.la \ + $(gdbm_la) \ monitor.la \ record.la \ struct.la \ @@ -33,6 +33,9 @@ debug_la_SOURCES = debug.c debug_la_LDFLAGS = -module -avoid-version debug_la_LIBADD = $(top_builddir)/src/libelk.la +if HAVE_GDBM +gdbm_la = gdbm.la +endif gdbm_la_SOURCES = gdbm.c gdbm_la_LDFLAGS = -module -avoid-version gdbm_la_LIBADD = $(top_builddir)/src/libelk.la -lgdbm @@ -51,8 +54,8 @@ struct_la_LIBADD = $(top_builddir)/src/libelk.la if HAVE_CXX newhandler_la = newhandler.la +endif newhandler_la_SOURCES = newhandler.cpp newhandler_la_LDFLAGS = -module -avoid-version newhandler_la_LIBADD = $(top_builddir)/src/libelk.la -endif diff --git a/scm/Makefile.am b/scm/Makefile.am index 9635e9d..e1e7a05 100644 --- a/scm/Makefile.am +++ b/scm/Makefile.am @@ -10,7 +10,7 @@ SCM_FILES = \ cscheme.scm \ debug.scm \ describe.scm \ - gdbmtest.scm \ + $(gdbmtest_scm) \ initscheme.scm \ motif.scm \ oops.scm \ @@ -31,3 +31,6 @@ SCM_FILES = \ xwidgets.scm \ $(NULL) +if HAVE_GDBM +gdbmtest_scm = gdbmtest.scm +endif