+ if test -n "$with_tokyocabinet" && test "$with_tokyocabinet" != "no"
+ then
+ db_requested=tc
+ fi
+ if test -n "$with_qdbm" && test "$with_qdbm" != "no"
+ then
+ if test "$db_requested" != "auto"
+ then
+ AC_MSG_ERROR([more than one header cache engine requested.])
+ else
+ db_requested=qdbm
+ fi
+ fi
+ if test -n "$with_gdbm" && test "$with_gdbm" != "no"
+ then
+ if test "$db_requested" != "auto"
+ then
+ AC_MSG_ERROR([more than one header cache engine requested.])
+ else
+ db_requested=gdbm
+ fi
+ fi
+ if test -n "$with_bdb" && test "$with_bdb" != "no"
+ then
+ if test "$db_requested" != "auto"
+ then
+ AC_MSG_ERROR([more than one header cache engine requested.])
+ else
+ db_requested=bdb
+ fi
+ fi
+
+ dnl -- Tokyo Cabinet --
+ if test "$with_tokyocabinet" != "no" \
+ && test "$db_requested" = auto -o "$db_requested" = tc
+ then
+ if test -n "$with_tokyocabinet" && test "$with_tokyocabinet" != "yes"
+ then
+ CPPFLAGS="$CPPFLAGS -I$with_tokyocabinet/include"
+ LDFLAGS="$LDFLAGS -L$with_tokyocabinet/lib"
+ fi
+
+ AC_CHECK_HEADER(tcbdb.h,
+ AC_CHECK_LIB(tokyocabinet, tcbdbopen,
+ [MUTTLIBS="$MUTTLIBS -ltokyocabinet"
+ AC_DEFINE(HAVE_TC, 1, [Tokyo Cabinet Support])
+ db_found=tc],
+ [CPPFLAGS="$OLDCPPFLAGS"
+ LDFLAGS="$OLDLDFLAGS"]))
+ if test "$db_requested" != auto && test "$db_found" != "$db_requested"
+ then
+ AC_MSG_ERROR([Tokyo Cabinet could not be used. Check config.log for details.])
+ fi
+ fi