summaryrefslogtreecommitdiffstats
path: root/m4/want_cdb.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/want_cdb.m4')
-rw-r--r--m4/want_cdb.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/m4/want_cdb.m4 b/m4/want_cdb.m4
new file mode 100644
index 0000000..b18ff49
--- /dev/null
+++ b/m4/want_cdb.m4
@@ -0,0 +1,19 @@
+AC_DEFUN([DOVECOT_WANT_CDB], [
+ if test $want_cdb != no; then
+ AC_CHECK_LIB(cdb, cdb_init, [
+ AC_CHECK_HEADER(cdb.h, [
+ DICT_LIBS="$DICT_LIBS -lcdb"
+ dict_drivers="$dict_drivers cdb"
+ 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
+])