X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=configure;h=26d66d8d321c8f0e3176e61f50f74caf0e819da4;hp=4913807acb0de8b225a826b4bdcf237bc0bad338;hb=9adacb67c60665d124387754ca1e89826cac726b;hpb=96fa341bc302bf602e096ae49312c478e922cee3 diff --git a/configure b/configure index 4913807..26d66d8 100755 --- a/configure +++ b/configure @@ -866,6 +866,7 @@ Optional Features: --enable-compressed Enable compressed folders support --enable-locales-fix The result of isprint() is unreliable --enable-exact-address Enable regeneration of email addresses + --enable-hcache Enable header caching --disable-iconv Disable iconv support --disable-nls Do not use Native Language Support @@ -888,6 +889,8 @@ Optional Packages: --with-sasl2=PFX Use Cyrus SASL library version 2 for POP/IMAP authentication --with-idn=PFX Use GNU libidn for domain names --with-exec-shell=SHELL Specify alternate shell (ONLY if /bin/sh is broken) + --without-gdbm Get rid of gdbm even if it is available + --with-bdb=DIR Use BerkeleyDB4 if gdbm is not available --with-libiconv-prefix=DIR Search for libiconv in DIR/include and DIR/lib --with-included-gettext Use the GNU gettext library included here --without-wc-funcs Do not use the system's wchar_t functions @@ -11414,11 +11417,6 @@ done fi -if test "$need_md5" = "yes" -then - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS md5c.o" -fi - # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then @@ -11568,6 +11566,197 @@ _ACEOF fi fi; +# Check whether --enable-hcache or --disable-hcache was given. +if test "${enable_hcache+set}" = set; then + enableval="$enable_hcache" + if test x$enableval = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define USE_HCACHE 1 +_ACEOF + + + OLDCPPFLAGS="$CPPFLAGS" + OLDLIBS="$LIBS" + + need_md5="yes" + ac_prefer_gdbm=yes + +# Check whether --with-gdbm or --without-gdbm was given. +if test "${with_gdbm+set}" = set; then + withval="$with_gdbm" + ac_prefer_gdbm=$withval +fi; + if test x$ac_prefer_gdbm != xno; then + CPPFLAGS="$OLDCPPFLAGS" + LIBS="$OLDLIBS -lgdbm"; + echo "$as_me:$LINENO: checking for gdbm_open" >&5 +echo $ECHO_N "checking for gdbm_open... $ECHO_C" >&6 +if test "${ac_cv_gdbmopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_cv_gdbmopen=no + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +gdbm_open(0,0,0,0,0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_gdbmopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_gdbmopen" >&5 +echo "${ECHO_T}$ac_cv_gdbmopen" >&6 + fi + + ac_bdb_prefix=yes + +# Check whether --with-bdb or --without-bdb was given. +if test "${with_bdb+set}" = set; then + withval="$with_bdb" + ac_bdb_prefix=$withval +fi; + if test x$ac_bdb_prefix != xno -a x$ac_cv_gdbmopen != xyes; then + test x$ac_bdb_prefix = xyes && ac_bdb_prefix="$mutt_cv_prefix /opt/csw/bdb4 /opt /usr/local /usr" + for d in $ac_bdb_prefix; do + bdbpfx="$bdbpfx $d" + for v in BerkeleyDB.4.3 BerkeleyDB.4.2 BerkeleyDB.4.1; do + bdbpfx="$bdbpfx $d/$v" + done + done + BDB_VERSIONS="db-4 db4 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''" + echo "$as_me:$LINENO: checking for BerkeleyDB > 4.0" >&5 +echo $ECHO_N "checking for BerkeleyDB > 4.0... $ECHO_C" >&6 + for d in $bdbpfx; do + BDB_INCLUDE_DIR="" + BDB_LIB_DIR="" + for v in / $BDB_VERSIONS; do + if test -r "$d/include/$v/db.h"; then + BDB_INCLUDE_DIR="$d/include/$v" + if test -d "$d/lib/$v"; then + BDB_LIB_DIR="$d/lib/$v" + for l in `echo $BDB_VERSIONS`; do + CPPFLAGS="-I$BDB_INCLUDE_DIR $OLDCPPFLAGS" + LIBS="$OLDLIBS -L$BDB_LIB_DIR -l$l" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #include + +int +main () +{ + + DB *db = NULL; + db->open(db,NULL,NULL,NULL,0,0,0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + ac_cv_dbcreate=yes + BDB_LIB="$l" + break + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done + test x$ac_dbcreate = xyes && break + fi + fi + done + test x$BDB_LIB != x && break + done + if test x$ac_cv_dbcreate = xyes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + fi + + if test x$ac_cv_gdbmopen = xyes; then + CPPFLAGS="$OLDCPPFLAGS" + LIBS="$OLDLIBS -lgdbm"; + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GDBM 1 +_ACEOF + + elif test x$ac_cv_dbcreate = xyes; then + CPPFLAGS="-I$BDB_INCLUDE_DIR $OLDCPPFLAGS" + LIBS="$OLDLIBS -L$BDB_LIB_DIR -l$BDB_LIB" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DB4 1 +_ACEOF + + else + { { echo "$as_me:$LINENO: error: You need Sleepycat DB4 or GDBM for --enable-hcache" >&5 +echo "$as_me: error: You need Sleepycat DB4 or GDBM for --enable-hcache" >&2;} + { (exit 1); exit 1; }; } + fi +fi +fi; + +if test "$need_md5" = "yes" +then + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS md5c.o" +fi +