-if { (eval echo configure:6413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
-
- ac_cv_dbcreate=yes
- BDB_LIB="$l"
- break
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
- 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 "$ac_t""yes" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
-
- if test x$ac_cv_gdbmopen = xyes; then
- CPPFLAGS="$OLDCPPFLAGS"
- LIBS="$OLDLIBS -lgdbm";
- cat >> confdefs.h <<\EOF
-#define HAVE_GDBM 1
-EOF
-
- 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 <<\EOF
-#define HAVE_DB4 1
-EOF
-
- else
- { echo "configure: error: You need Sleepycat DB4 or GDBM for --enable-hcache" 1>&2; exit 1; }
- fi
-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 <<\EOF
-#define USE_HCACHE 1
-EOF
-
-
- 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 $ac_n "checking for gdbm_open""... $ac_c" 1>&6
-echo "configure:6484: checking for gdbm_open" >&5
-if eval "test \"`echo '$''{'ac_cv_gdbmopen'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- ac_cv_gdbmopen=no
- cat > conftest.$ac_ext <<EOF
-#line 6491 "configure"
-#include "confdefs.h"
-#include <gdbm.h>
-int main() {
-gdbm_open(0,0,0,0,0);
-; return 0; }
-EOF
-if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_gdbmopen=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_gdbmopen" 1>&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 $ac_n "checking for BerkeleyDB > 4.0""... $ac_c" 1>&6
-echo "configure:6529: checking for BerkeleyDB > 4.0" >&5
- 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 <<EOF
-#line 6542 "configure"
-#include "confdefs.h"
-
- #include <stdlib.h>
- #include <db.h>
-
-int main() {
-
- DB *db = NULL;
- db->open(db,NULL,NULL,NULL,0,0,0);
-
-; return 0; }
-EOF
-if { (eval echo configure:6555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then