[if test x$enableval = xyes; then
AC_DEFINE(USE_HCACHE, 1, [Enable header caching])
OLDCPPFLAGS="$CPPFLAGS"
- need_md5="yes"
ac_prefer_qdbm=yes
AC_ARG_WITH(qdbm, AC_HELP_STRING([--without-qdbm], [Don't use qdbm even if it is available]),
fi
fi
- ac_bdb_prefix=yes
- AC_ARG_WITH(bdb, AC_HELP_STRING([--with-bdb[=DIR]], [Use BerkeleyDB4 if gdbm is not available ]),
- ac_bdb_prefix=$withval)
- if test x$ac_bdb_prefix != xno -a x$ac_cv_gdbmopen != xyes -a x$ac_qdbm_here != xyes; then
- test x$ac_bdb_prefix = xyes && ac_bdb_prefix="${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 ''"
- AC_MSG_CHECKING([for BerkeleyDB > 4.0])
- 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="$MUTTLIBS -L$BDB_LIB_DIR -l$l"
- AC_TRY_LINK([
- #include <stdlib.h>
- #include <db.h>
- ],[
- DB *db = NULL;
- db->open(db,NULL,NULL,NULL,0,0,0);
- ],[
- ac_cv_dbcreate=yes
- BDB_LIB="$l"
- break
- ])
- done
- test x$ac_cv_dbcreate = xyes && break
- fi
- fi
- done
- test x$BDB_LIB != x && break
- done
- if test x$ac_cv_dbcreate = xyes; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- fi
-
if test x$ac_qdbm_here = xyes; then
CPPFLAGS="$OLDCPPFLAGS $QDBM_CFLAGS"
MUTTLIBS="$MUTTLIBS -lqdbm"
CPPFLAGS="$OLDCPPFLAGS $GDBM_INC"
MUTTLIBS="$MUTTLIBS $GDBM_LIB -lgdbm";
AC_DEFINE(HAVE_GDBM, 1, [GDBM Support])
- elif test x$ac_cv_dbcreate = xyes; then
- CPPFLAGS="-I$BDB_INCLUDE_DIR $OLDCPPFLAGS"
- MUTTLIBS="$MUTTLIBS -L$BDB_LIB_DIR -l$BDB_LIB"
- AC_DEFINE(HAVE_DB4, 1, [Sleepycat DB4 Support])
else
AC_MSG_ERROR([You need one of: QDBM, GDBM or Sleepycat DB4 for --enable-hcache])
fi
if test "$am_cv_func_iconv" != "yes"; then
AC_MSG_WARN([Configuring without iconv support. See INSTALL for details])
else
-
AC_CHECK_HEADERS(iconv.h,
[AC_MSG_CHECKING(whether iconv.h defines iconv_t)
AC_EGREP_HEADER([typedef.*iconv_t],iconv.h,
AC_DEFINE(HAVE_ICONV_T_DEF, 1,
[Define if <iconv.h> defines iconv_t.])],
AC_MSG_RESULT(no))])
-
- dnl (1) Some implementations of iconv won't convert from UTF-8 to UTF-8.
- dnl (2) In glibc-2.1.2 and earlier there is a bug that messes up ob and
- dnl obl when args 2 and 3 are 0 (fixed in glibc-2.1.3).
- AC_CACHE_CHECK([whether this iconv is good enough], mutt_cv_iconv_good,
- LIBS="$LIBICONV"
- AC_TRY_RUN([
-#include <iconv.h>
-int main()
-{
- iconv_t cd;
-changequote(, )dnl
- char buf[4];
-changequote([, ])dnl
- char *ob;
- size_t obl;
- ob = buf, obl = sizeof(buf);
- return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) &&
- (iconv(cd, 0, 0, &ob, &obl) ||
- !(ob == buf && obl == sizeof(buf)) ||
- iconv_close(cd)));
-}
- ],
- mutt_cv_iconv_good=yes,
- mutt_cv_iconv_good=no,
- mutt_cv_iconv_good=yes)
- LIBS="")
- if test "$mutt_cv_iconv_good" = no; then
- AC_MSG_ERROR(Try using libiconv instead)
- fi
-
fi # libiconv
dnl -- locales --
AC_OUTPUT(Makefile
intl/Makefile
- m4/Makefile
po/Makefile.in
apidoc/Makefile apidoc/doxygen.cfg
lib-lib/Makefile
lib-sys/Makefile
lib-ui/Makefile
imap/Makefile
- pop/Makefile
nntp/Makefile
)