aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-10-07 21:17:16 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2012-10-07 21:20:00 +0300
commit3f1639c2112f8242a542ca0a1b959f657d012cc9 (patch)
tree6951514621c1ac6cde192dbed7cdf736fb6bc39a /configure.ac
parent1fbcbdb432e945aa3f63be5b9170e94a0c9ef6c3 (diff)
downloadeclat-3f1639c2112f8242a542ca0a1b959f657d012cc9.tar.gz
eclat-3f1639c2112f8242a542ca0a1b959f657d012cc9.tar.bz2
Implement GDBM map backend.
* README: Document --with-gdbm * configure.ac: Detect libgdbm. New option --with-gdbm. * lib/gdbmmap.c * lib/Makefile.am (maps) [COND_GDBM]: Add new file. * lib/libeclat.h (eclat_map_drv_gdbm): New extern. * src/Makefile.am (LDADD): Add MAPLIBS. * src/eclat.c (mail) [WITH_GDBM]: Register eclat_map_drv_gdbm.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 27 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e878bca..fbb53ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,33 @@ AC_CHECK_HEADER([expat.h], [],
AC_CHECK_LIB([expat], [XML_Parse],[],
[AC_MSG_ERROR([required library libexpat is not found])])
+# MAPS
+AC_SUBST([MAPLIBS])
+
+AC_ARG_WITH([gdbm],
+ [AC_HELP_STRING([--with-gdbm],
+ [use GNU DBM])],
+ [case "${withval}" in
+ yes|no) status_gdbm=${withval};;
+ *) AC_MSG_ERROR(bad value ${withval} for --with-gdbm) ;;
+ esac],
+ [status_gdbm=auto])
+
+if test $status_gdbm != "no"; then
+ AC_CHECK_HEADERS(gdbm.h)
+ AC_CHECK_LIB(gdbm, gdbm_open, [dbmlib=-lgdbm], [dbmlib=])
+ if test "$ac_cv_header_getopt_h" = yes && test -n "$dbmlib"; then
+ MAPLIBS="$MAPLIBS $dbmlib"
+ status_gdbm=yes
+ AC_DEFINE(WITH_GDBM,1,[Use GDB GDBM])
+ elif test $status_gdbm = yes; then
+ AC_MSG_ERROR([required library libgdbm (or its header) is not found])
+ else
+ status_gdbm=no
+ fi
+fi
+AM_CONDITIONAL([COND_GDBM],[test $status_gdbm = yes])
+
# Grecs subsystem
GRECS_SETUP([grecs],[tests getopt git2chg])

Return to:

Send suggestions and report system problems to the System administrator.