From e393f73275555b567ca0733f3fe1cc470756c52b Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Wed, 1 Oct 2008 09:33:39 -0700 Subject: [PATCH] Clean up autoconf header cache engine selection. Any explicit --with-$engine will force that engine to be used or make configure fail if the engine is unavailable. --- ChangeLog | 20 +++++++++++-------- configure.ac | 56 +++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 57 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index cd7368018..4c3329ddb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-09-29 14:31 -0700 Emanuele Giaquinta (ec96c56be182) + + * mutt_socket.c: Simplify host resolution code slightly. + +2008-09-26 08:55 +0200 Rocco Rutte (9e569296190b) + + * UPDATING, doc/manual.xml.head, init.h: Mention tokyocabinet in + UPDATING and docs + 2008-09-25 15:07 -0700 Emanuele Giaquinta (2050b44407bf) * configure.ac, hcache.c, init.h, mutt.h: Support tokyocabinet @@ -11,26 +20,21 @@ * doc/manual.xml.head: Manual: Fix typo -2008-09-24 12:31 +0200 Rocco Rutte (2a70f7166d9d) - - * ChangeLog, mbyte.c: Provide legacy implementations for iswalpha() - and iswupper() + * mbyte.c: Provide legacy implementations for iswalpha() and + iswupper() In mbyte.h and without using wc functions, only the prototypes were defined but implementations were missing resulting in build errors. These new functions are derived from the iswalnum() and towupper() routines which don't provide full unicode coverage. -2008-09-24 12:28 +0200 Rocco Rutte (32bfe3700b27) - * imap/imap.c: Fix an infinite loop for imap searches Reported by Emanuele Giaquinta on #mutt. 2008-09-18 08:28 +0200 Rocco Rutte (ffefb446142c) - * ChangeLog, alias.c, init.c, muttlib.c, protos.h: Fix compiler - warnings + * alias.c, init.c, muttlib.c, protos.h: Fix compiler warnings 2008-09-17 22:27 +0200 Thomas Roessler (77e25415a08a) diff --git a/configure.ac b/configure.ac index 214c5889b..0c46fd51c 100644 --- a/configure.ac +++ b/configure.ac @@ -813,6 +813,7 @@ AC_ARG_ENABLE(exact-address, AC_HELP_STRING([--enable-exact-address], [Enable re dnl -- start cache -- db_found=no +db_requested=auto AC_ARG_ENABLE(hcache, AC_HELP_STRING([--enable-hcache], [Enable header caching])) AC_ARG_WITH(tokyocabinet, AC_HELP_STRING([--without-tokyocabinet], @@ -835,6 +836,38 @@ then need_md5="yes" + 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" then @@ -848,17 +881,17 @@ then AC_CHECK_LIB(tokyocabinet, tcbdbopen, [MUTTLIBS="$MUTTLIBS -ltokyocabinet" AC_DEFINE(HAVE_TC, 1, [Tokyo Cabinet Support]) - db_found=yes], + db_found=tc], [CPPFLAGS="$OLDCPPFLAGS" LDFLAGS="$OLDLDFLAGS"])) - if test -n "$with_tokyocabinet" && test "$use_tokyocabinet" != yes + 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 dnl -- QDBM -- - if test "$with_qdbm" != "no" && test $db_found != yes + if test "$with_qdbm" != "no" && test $db_found = no then if test -n "$with_qdbm" && test "$with_qdbm" != "yes" then @@ -879,18 +912,18 @@ then AC_CHECK_LIB(qdbm, vlopen, [MUTTLIBS="$MUTTLIBS -lqdbm" AC_DEFINE(HAVE_QDBM, 1, [QDBM Support]) - db_found=yes], + db_found=qdbm], [CPPFLAGS="$OLDCPPFLAGS" LDFLAGS="$OLDLDFLAGS"]) LIBS="$saved_LIBS" - if test -n "$with_qdbm" && test "$use_qdbm" != yes + if test "$db_requested" != auto && test "$db_found" != "$db_requested" then AC_MSG_ERROR([QDBM could not be used. Check config.log for details.]) fi fi dnl -- GDBM -- - if test x$with_gdbm != xno && test $db_found != yes + if test x$with_gdbm != xno && test $db_found = no then if test "$with_gdbm" != "yes" then @@ -908,8 +941,9 @@ then then AC_DEFINE(HAVE_GDBM, 1, [GDBM Support]) MUTTLIBS="$MUTTLIBS -lgdbm" - db_found=yes - elif test -n "$with_gdbm" + db_found=gdbm + fi + if test "$db_requested" != auto && test "$db_found" != "$db_requested" then AC_MSG_ERROR([GDBM could not be used. Check config.log for details.]) fi @@ -917,7 +951,7 @@ then dnl -- BDB -- ac_bdb_prefix="$with_bdb" - if test x$ac_bdb_prefix != xno && test $db_found != yes + if test x$ac_bdb_prefix != xno && test $db_found = no then if test x$ac_bdb_prefix = xyes || test x$ac_bdb_prefix = x then @@ -967,13 +1001,13 @@ then CPPFLAGS="$OLDCPPFLAGS -I$BDB_INCLUDE_DIR" LIBS="$OLDLIBS -L$BDB_LIB_DIR -l$BDB_LIB" AC_DEFINE(HAVE_DB4, 1, [Berkeley DB4 Support]) - db_found=yes + db_found=bdb else AC_MSG_RESULT(no) fi fi - if test $db_found != yes + if test $db_found = no then AC_MSG_ERROR([You need Tokyo Cabinet, QDBM, GDBM or Berkeley DB4 for hcache]) fi -- 2.40.0