Mercurial > dovecot > original-hg > dovecot-1.2
diff configure.in @ 4517:e661182eab75 HEAD
Berkeley DB dict support is now enabled only when using --with-db configure option.
author | Timo Sirainen <timo.sirainen@movial.fi> |
---|---|
date | Sun, 30 Jul 2006 22:27:24 +0300 |
parents | f60b07bd5fa7 |
children | 99699cf9df43 |
line wrap: on
line diff
--- a/configure.in Sun Jul 30 21:49:38 2006 +0300 +++ b/configure.in Sun Jul 30 22:27:24 2006 +0300 @@ -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 **