Mercurial > dovecot > core-2.2
diff configure.ac @ 15665:2c249941f9c2
dict: Added support for cdb backend.
Based on patch by Hleb Valoshka.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 21 Jan 2013 18:31:08 +0200 |
parents | 0e12a687f5bf |
children | b9b8286fd9fd |
line wrap: on
line diff
--- a/configure.ac Mon Jan 21 18:12:41 2013 +0200 +++ b/configure.ac Mon Jan 21 18:31:08 2013 +0200 @@ -126,6 +126,11 @@ # want_db=no) want_db=no +AC_ARG_WITH(cdb, +AS_HELP_STRING([--with-cdb], [Build with CDB support]), + TEST_WITH(cdb, $withval), + want_cdb=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, @@ -2113,6 +2118,23 @@ fi fi +if test $want_cdb != no; then + AC_CHECK_LIB(cdb, cdb_init, [ + AC_CHECK_HEADER(cdb.h, [ + DICT_LIBS="$DICT_LIBS -lcdb" + AC_DEFINE(BUILD_CDB,, Build with CDB support) + ], [ + if test $want_cdb = yes; then + AC_ERROR([Can't build with CDB support: cdb.h not found]) + fi + ]) + ], [ + if test $want_cdb = yes; then + AC_ERROR([Can't build with CDB support: libcdb not found]) + fi + ]) +fi + if test $want_pgsql != no; then AC_CHECK_PROG(PG_CONFIG, pg_config, pg_config, NO) if test $PG_CONFIG = NO; then @@ -2397,6 +2419,7 @@ AC_SUBST(SQLITE_LIBS) AC_SUBST(DICT_LIBS) +AC_SUBST(CDB_LIBS) AC_SUBST(dict_drivers) dnl **