summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-08-06 11:54:31 +0000
committerLennart Poettering <lennart@poettering.net>2006-08-06 11:54:31 +0000
commitb7d566fc3ec60c0fbbca22af273bc67fdc1372fa (patch)
tree7e39f656c03db8daaee14bcd63e3722f2354ea45 /configure.ac
parentd66af491a574de4d5421c995bec5357fc1c04128 (diff)
Allow storing the service type database as Solaris DBM file, alternatively to gdbm. The latter is still recommended. (Patch from Padraig O'Briain)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1245 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 30 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 461dbd3..ae38e5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -481,24 +481,49 @@ AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
#
# GDBM
#
+#
+# Check for dbm
+#
+AC_ARG_ENABLE(dbm,
+ AS_HELP_STRING([--enable-dbm],[Enable use of DBM]),
+ [case "${enableval}" in
+ yes) HAVE_DBM=yes ;;
+ no) HAVE_DBM=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbm) ;;
+ esac],
+ [HAVE_DBM=no])
+
AC_ARG_ENABLE(gdbm,
AS_HELP_STRING([--disable-gdbm],[Disable use of GDBM]),
[case "${enableval}" in
yes) HAVE_GDBM=yes ;;
no) HAVE_GDBM=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-gdbm) ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-gdbm) ;;
esac],
[HAVE_GDBM=yes])
if test "x$HAVE_GDBM" = "xyes" ; then
+ if test "x$HAVE_DBM" = "xyes" ; then
+ AC_MSG_ERROR([*** --enable-gdbm and --enable-dbm both specified ***])
+ fi
AC_CHECK_LIB(gdbm, gdbm_open, [ AC_CHECK_HEADERS(gdbm.h, have_gdbm=true, have_gdbm=false) ], have_gdbm=false)
if ! $have_gdbm ; then
AC_MSG_ERROR([*** libgdbm not found ***])
fi
AC_DEFINE([HAVE_GDBM],[],[Support for GDBM])
+else
+ if test "x$HAVE_DBM" = "xyes" ; then
+ AC_CHECK_HEADERS(ndbm.h, have_dbm=true, have_dbm=false)
+
+ if ! $have_dbm ; then
+ AC_MSG_ERROR([*** dbm not found ***])
+ fi
+ AC_DEFINE([HAVE_DBM],[],[Support for DBM])
+ fi
fi
AM_CONDITIONAL(HAVE_GDBM, test "x$HAVE_GDBM" = "xyes")
+AM_CONDITIONAL(HAVE_DBM, test "x$HAVE_DBM" = "xyes")
#
# libdaemon
@@ -568,6 +593,9 @@ if test "x$HAVE_PYTHON" = "xyes" ; then
if test "x$HAVE_GDBM" = "xyes"; then
AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)])
fi
+ if test "x$HAVE_DBM" = "xyes"; then
+ AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)])
+ fi
fi
fi
AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
@@ -818,6 +846,7 @@ echo "
Enable D-BUS: ${HAVE_DBUS}
Enable Expat: ${HAVE_EXPAT}
Enable GDBM: ${HAVE_GDBM}
+ Enable DBM: ${HAVE_DBM}
Enable libdaemon: ${HAVE_LIBDAEMON}
Enable Python: ${HAVE_PYTHON}
Enable pygtk: ${HAVE_PYGTK}