[dovecot-cvs] dovecot configure.in,1.295,1.296

tss-movial at dovecot.org tss-movial at dovecot.org
Sun Jul 30 22:27:26 EEST 2006


Update of /var/lib/cvs/dovecot
In directory talvi:/tmp/cvs-serv24041

Modified Files:
	configure.in 
Log Message:
Berkeley DB dict support is now enabled only when using --with-db configure option.



Index: configure.in
===================================================================
RCS file: /var/lib/cvs/dovecot/configure.in,v
retrieving revision 1.295
retrieving revision 1.296
diff -u -d -r1.295 -r1.296
--- configure.in	3 Jul 2006 13:08:48 -0000	1.295
+++ configure.in	30 Jul 2006 19:27:24 -0000	1.296
@@ -165,6 +165,15 @@
 	fi,
 	want_prefetch_userdb=yes)
 
+AC_ARG_WITH(db,
+[  --with-db               Build with Berkeley DB support],
+	if test x$withval = xno; then
+		want_db=no
+	else
+		want_db=yes
+	fi,
+	want_db=no)
+
 dnl The --with-sql is useful only if Dovecot is being built with all the SQL
 dnl drivers as modules. If any SQL driver is built-in, this option is ignored.
 AC_ARG_WITH(sql,
@@ -1432,6 +1441,29 @@
 	])
 fi
 
+dict_drivers=client
+
+if test $want_db = yes; then
+	AC_MSG_CHECKING([db_env_create in -ldb])
+	old_LIBS=$LIBS
+	LIBS="$LIBS -ldb"
+	AC_TRY_LINK([
+		#include <db.h>
+	], [
+		db_env_create(0, 0);
+	], [
+		AC_MSG_RESULT(yes)
+		AC_CHECK_HEADER(db.h, [
+        		DICT_LIBS="$DICT_LIBS -ldb"
+			dict_drivers="$dict_drivers db"
+			AC_DEFINE(BUILD_DB,, Build with Berkeley DB support)
+		])
+	], [
+		AC_MSG_RESULT(no)
+	])
+	LIBS=$old_LIBS
+fi
+
 if test $want_pgsql = yes; then
 	# based on code from PHP
 	for i in /usr /usr/local /usr/local/pgsql; do
@@ -1626,6 +1658,9 @@
 AC_SUBST(SQL_CFLAGS)
 AC_SUBST(SQL_LIBS)
 
+AC_SUBST(DICT_LIBS)
+AC_SUBST(dict_drivers)
+
 dnl **
 dnl ** Index file compatibility flags
 dnl **



More information about the dovecot-cvs mailing list