<<< Date Index >>>     <<< Thread Index >>>

[PATCH 1 of 2] Update for new autoconf



# HG changeset patch
# User Matthias Andree <matthias.andree@xxxxxx>
# Date 1250600058 -7200
# Branch HEAD
# Node ID a979f8e21063d62e686af37d73976290d07816f0
# Parent  bc5fb152e2baa218a5f5941dc52fee493c767219
Update for new autoconf.

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -3,9 +3,10 @@
 dnl !!! WHEN ADDING NEW CONFIGURE TESTS, PLEASE ADD CODE TO MAIN.C !!!
 dnl !!! TO DUMP THEIR RESULTS WHEN MUTT -V IS CALLED            !!!
 
-AC_PREREQ([2.54])
-AC_INIT([mutt.h])
-AM_CONFIG_HEADER([config.h])
+AC_PREREQ(2.59)
+AC_INIT
+AC_CONFIG_SRCDIR([mutt.h])
+AC_CONFIG_HEADERS([config.h])
 
 mutt_cv_version=`cat $srcdir/VERSION`
 AM_INIT_AUTOMAKE(mutt, $mutt_cv_version)
@@ -26,7 +27,7 @@
 AC_MSG_RESULT($mutt_cv_prefix)
 
 AC_PROG_CC
-AC_ISC_POSIX
+AC_SEARCH_LIBS([strerror],[cposix])
 AM_C_PROTOTYPES
 if test "x$U" != "x"; then
   AC_MSG_ERROR(Compiler not ANSI compliant)
@@ -117,7 +118,7 @@
 OPS='$(srcdir)/OPS'
 
 AC_MSG_CHECKING([whether to build with GPGME support])
-AC_ARG_ENABLE(gpgme, AC_HELP_STRING([--enable-gpgme], [Enable GPGME support]),
+AC_ARG_ENABLE(gpgme, AS_HELP_STRING([--enable-gpgme],[Enable GPGME support]),
 [       if test x$enableval = xyes; then
                enable_gpgme=yes
        fi
@@ -142,7 +143,7 @@
    AC_MSG_RESULT([no])
 fi
 
-AC_ARG_ENABLE(pgp, AC_HELP_STRING([--disable-pgp], [Disable PGP support]),
+AC_ARG_ENABLE(pgp, AS_HELP_STRING([--disable-pgp],[Disable PGP support]),
 [       if test x$enableval = xno ; then
                 have_pgp=no
         fi
@@ -154,7 +155,7 @@
         MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pgp.o pgpinvoke.o pgpkey.o 
pgplib.o gnupgparse.o pgpmicalg.o pgppacket.o crypt-mod-pgp-classic.o"
 fi
 
-AC_ARG_ENABLE(smime, AC_HELP_STRING([--disable-smime], [Disable SMIME 
support]),
+AC_ARG_ENABLE(smime, AS_HELP_STRING([--disable-smime],[Disable SMIME support]),
 [      if test x$enableval = xno ; then
                have_smime=no
        fi
@@ -166,7 +167,7 @@
        SMIMEAUX_TARGET="smime_keys"
 fi
 
-AC_ARG_WITH(mixmaster, AC_HELP_STRING([--with-mixmaster@<:@=PATH@:>@], 
[Include Mixmaster support]),
+AC_ARG_WITH(mixmaster, AS_HELP_STRING([--with-mixmaster@<:@=PATH@:>@],[Include 
Mixmaster support]),
   [if test "$withval" != no
    then
      if test -x "$withval"
@@ -192,9 +193,9 @@
         AC_DEFINE_UNQUOTED(ISPELL,"$ISPELL",[ Where to find ispell on your 
system. ])
 fi
 
-AC_ARG_WITH(slang, AC_HELP_STRING([--with-slang@<:@=DIR@:>@], [Use S-Lang 
instead of ncurses]),
+AC_ARG_WITH(slang, AS_HELP_STRING([--with-slang@<:@=DIR@:>@],[Use S-Lang 
instead of ncurses]),
         [AC_CACHE_CHECK([if this is a BSD system], mutt_cv_bsdish,
-                [AC_TRY_RUN([#include <sys/param.h>
+                [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/param.h>
 #include <stdlib.h>
 
 main ()
@@ -204,10 +205,7 @@
 #else
         exit (1);
 #endif
-}],
-                        mutt_cv_bsdish=yes,
-                        mutt_cv_bsdish=no,
-                        mutt_cv_bsdish=no)])
+}]])],[mutt_cv_bsdish=yes],[mutt_cv_bsdish=no],[mutt_cv_bsdish=no])])
 
         AC_MSG_CHECKING(for S-Lang)
         if test $withval = yes; then
@@ -258,7 +256,7 @@
         ],
 
         [mutt_cv_curses=/usr
-        AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses=DIR], [Where ncurses 
is installed]),
+        AC_ARG_WITH(curses, AS_HELP_STRING([--with-curses=DIR],[Where ncurses 
is installed]),
                 [if test $withval != yes; then
                         mutt_cv_curses=$withval
                 fi
@@ -307,7 +305,7 @@
 
 AC_CHECK_FUNCS(setrlimit getsid)
 
-AC_TYPE_SIGNAL
+AC_DEFINE(RETSIGTYPE, void, [RETSIGTYPE should be void on any reasonably 
recent machine])
 
 AC_MSG_CHECKING(for sig_atomic_t in signal.h)
 AC_EGREP_HEADER(sig_atomic_t,signal.h,
@@ -336,7 +334,13 @@
     AC_DEFINE(SIG_ATOMIC_VOLATILE_T, [volatile sig_atomic_t])
 fi
 
-AC_DECL_SYS_SIGLIST
+AC_CHECK_DECLS([sys_siglist],[],[],[#include <signal.h>
+/* NetBSD declares sys_siglist in unistd.h.  */
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+])
+
 
 AC_TYPE_PID_T
 AC_CHECK_TYPE(ssize_t, int)
@@ -357,7 +361,7 @@
 if test $mutt_cv_func_snprintf = yes; then
 AC_CACHE_CHECK([whether your system's snprintf is C99 compliant],
         [mutt_cv_c99_snprintf],
-        AC_TRY_RUN([
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdio.h>
 int main()
 {
@@ -367,14 +371,14 @@
   return (len != 7 || buf[3] != '\0');
 changequote([, ])dnl
 }
-        ], mutt_cv_c99_snprintf=yes, mutt_cv_c99_snprintf=no, 
mutt_cv_c99_snprintf=no))
+        
]])],[mutt_cv_c99_snprintf=yes],[mutt_cv_c99_snprintf=no],[mutt_cv_c99_snprintf=no]))
 else
         mutt_cv_c99_snprintf=no
 fi
 if test $mutt_cv_func_vsnprintf = yes; then
 AC_CACHE_CHECK([whether your system's vsnprintf is C99 compliant],
         [mutt_cv_c99_vsnprintf],
-        AC_TRY_RUN([
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdarg.h>
 #include <stdio.h>
 int foo(const char *fmt, ...)
@@ -394,7 +398,7 @@
 {
   return foo("%s", "1234567");
 }
-        ], mutt_cv_c99_vsnprintf=yes, mutt_cv_c99_vsnprintf=no, 
mutt_cv_c99_vsnprintf=no))
+        
]])],[mutt_cv_c99_vsnprintf=yes],[mutt_cv_c99_vsnprintf=no],[mutt_cv_c99_vsnprintf=no]))
 else
         mutt_cv_c99_vsnprintf=no
 fi
@@ -419,20 +423,19 @@
 dnl AIX may not have fchdir()
 AC_CHECK_FUNCS(fchdir, , [mutt_cv_fchdir=no])
 
-AC_ARG_WITH(regex, AC_HELP_STRING([--with-regex], [Use the GNU regex library]),
+AC_ARG_WITH(regex, AS_HELP_STRING([--with-regex],[Use the GNU regex library]),
         [mutt_cv_regex=yes],
         [AC_CHECK_FUNCS(regcomp, mutt_cv_regex=no, mutt_cv_regex=yes)])
 
 if test $mutt_cv_regex = no ; then
 AC_CACHE_CHECK([whether your system's regexp library is completely broken],
         [mutt_cv_regex_broken],
-        AC_TRY_RUN([
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <unistd.h>
 #include <regex.h>
-main() { regex_t blah ; regmatch_t p; p.rm_eo = p.rm_eo; return regcomp(&blah, 
"foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0); }],
-        mutt_cv_regex_broken=no, mutt_cv_regex_broken=yes, 
mutt_cv_regex_broken=yes))
+main() { regex_t blah ; regmatch_t p; p.rm_eo = p.rm_eo; return regcomp(&blah, 
"foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0); 
}]])],[mutt_cv_regex_broken=no],[mutt_cv_regex_broken=yes],[mutt_cv_regex_broken=yes]))
         if test $mutt_cv_regex_broken = yes ; then
-                echo "Using the included GNU regex instead." >&AC_FD_MSG
+                echo "Using the included GNU regex instead." >&AS_MESSAGE_FD
                 mutt_cv_regex=yes
         fi
 fi
@@ -444,7 +447,7 @@
 
 
 AC_ARG_WITH(homespool,
-  AC_HELP_STRING([--with-homespool@<:@=FILE@:>@], [File in user's directory 
where new mail is spooled]), with_homespool=${withval})
+  AS_HELP_STRING([--with-homespool@<:@=FILE@:>@],[File in user's directory 
where new mail is spooled]), with_homespool=${withval})
 if test x$with_homespool != x; then
         if test $with_homespool = yes; then
                 with_homespool=mailbox
@@ -458,7 +461,7 @@
         AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ])
         mutt_cv_setgid=no
 else
-        AC_ARG_WITH(mailpath, AC_HELP_STRING([--with-mailpath=DIR], [Directory 
where spool mailboxes are located]),
+        AC_ARG_WITH(mailpath, AS_HELP_STRING([--with-mailpath=DIR],[Directory 
where spool mailboxes are located]),
                 [mutt_cv_mailpath=$withval],
                 [ AC_CACHE_CHECK(where new mail is stored, mutt_cv_mailpath,
                         [mutt_cv_mailpath=no
@@ -477,7 +480,7 @@
         fi
         AC_DEFINE_UNQUOTED(MAILPATH,"$mutt_cv_mailpath",[ Where new mail is 
spooled. ])
 
-        AC_CACHE_CHECK(if $mutt_cv_mailpath is world writable, 
mutt_cv_worldwrite, [AC_TRY_RUN([#include <sys/types.h>
+        AC_CACHE_CHECK(if $mutt_cv_mailpath is world writable, 
mutt_cv_worldwrite, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>
 #include <sys/stat.h>
 #include <stdlib.h>
 
@@ -488,14 +491,14 @@
         stat ("$mutt_cv_mailpath", &s);
         if (s.st_mode & S_IWOTH) exit (0);
         exit (1);
-}], mutt_cv_worldwrite=yes, mutt_cv_worldwrite=no, mutt_cv_worldwrite=no)])
+}]])],[mutt_cv_worldwrite=yes],[mutt_cv_worldwrite=no],[mutt_cv_worldwrite=no])])
 
         mutt_cv_setgid=no
         if test $mutt_cv_worldwrite = yes; then
                 AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for 
mailboxes. ])
         else
 
-                AC_CACHE_CHECK(if $mutt_cv_mailpath is group writable, 
mutt_cv_groupwrite, [AC_TRY_RUN([#include <sys/types.h>
+                AC_CACHE_CHECK(if $mutt_cv_mailpath is group writable, 
mutt_cv_groupwrite, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>
 #include <sys/stat.h>
 #include <stdlib.h>
 
@@ -506,7 +509,7 @@
         stat ("$mutt_cv_mailpath", &s);
         if (s.st_mode & S_IWGRP) exit (0);
         exit (1);
-}], mutt_cv_groupwrite=yes, mutt_cv_groupwrite=no, mutt_cv_groupwrite=no)])
+}]])],[mutt_cv_groupwrite=yes],[mutt_cv_groupwrite=no],[mutt_cv_groupwrite=no])])
 
                 if test $mutt_cv_groupwrite = yes; then
                         AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for 
mailboxes. ])
@@ -516,7 +519,7 @@
         fi
 fi
 
-AC_ARG_ENABLE(external_dotlock, AC_HELP_STRING([--enable-external-dotlock], 
[Force use of an external dotlock program]),
+AC_ARG_ENABLE(external_dotlock, 
AS_HELP_STRING([--enable-external-dotlock],[Force use of an external dotlock 
program]),
         [mutt_cv_external_dotlock="$enableval"])
 
 if test "x$mutt_cv_setgid" = "xyes" || test "x$mutt_cv_fchdir" = "xno" \
@@ -537,7 +540,7 @@
 AC_SUBST([datarootdir])
 
 AC_MSG_CHECKING(where to put the documentation)
-AC_ARG_WITH(docdir, AC_HELP_STRING([--with-docdir=PATH], [Specify where to put 
the documentation]),
+AC_ARG_WITH(docdir, AS_HELP_STRING([--with-docdir=PATH],[Specify where to put 
the documentation]),
         [mutt_cv_docdir=$withval],
         [mutt_cv_docdir='${datarootdir}/doc/mutt'])
 AC_MSG_RESULT($mutt_cv_docdir)
@@ -557,7 +560,7 @@
 AC_SUBST(DOTLOCK_GROUP)
 AC_SUBST(DOTLOCK_PERMISSION)
 
-AC_ARG_WITH(domain, AC_HELP_STRING([--with-domain=DOMAIN], [Specify your DNS 
domain name]),
+AC_ARG_WITH(domain, AS_HELP_STRING([--with-domain=DOMAIN],[Specify your DNS 
domain name]),
         [if test $withval != yes; then
             if test $withval != no; then
                 AC_DEFINE_UNQUOTED(DOMAIN,"$withval",[ Define your domain 
name. ])
@@ -568,7 +571,7 @@
 
 dnl -- socket dependencies --
 
-AC_ARG_ENABLE(pop,  AC_HELP_STRING([--enable-pop], [Enable POP3 support]),
+AC_ARG_ENABLE(pop,  AS_HELP_STRING([--enable-pop],[Enable POP3 support]),
 [       if test x$enableval = xyes ; then
                 AC_DEFINE(USE_POP,1,[ Define if you want support for the POP3 
protocol. ])
                 MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o pop_lib.o pop_auth.o"
@@ -578,7 +581,7 @@
         fi
 ])
 
-AC_ARG_ENABLE(imap, AC_HELP_STRING([--enable-imap], [Enable IMAP support]),
+AC_ARG_ENABLE(imap, AS_HELP_STRING([--enable-imap],[Enable IMAP support]),
 [       if test x$enableval = xyes ; then
                 AC_DEFINE(USE_IMAP,1,[ Define if you want support for the IMAP 
protocol. ])
                 LIBIMAP="-Limap -limap"
@@ -590,7 +593,7 @@
 ])
 AM_CONDITIONAL(BUILD_IMAP, test x$need_imap = xyes)
 
-AC_ARG_ENABLE(smtp, AC_HELP_STRING([--enable-smtp], [include internal SMTP 
relay support]),
+AC_ARG_ENABLE(smtp, AS_HELP_STRING([--enable-smtp],[include internal SMTP 
relay support]),
        [if test $enableval = yes; then
                AC_DEFINE(USE_SMTP, 1, [Include internal SMTP relay support])
                MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS smtp.o"
@@ -621,7 +624,7 @@
 
 dnl -- imap dependencies --
 
-AC_ARG_WITH(gss, AC_HELP_STRING([--with-gss@<:@=PFX@:>@], [Compile in GSSAPI 
authentication for IMAP]), 
+AC_ARG_WITH(gss, AS_HELP_STRING([--with-gss@<:@=PFX@:>@],[Compile in GSSAPI 
authentication for IMAP]), 
     gss_prefix="$withval", gss_prefix="no")
 if test "$gss_prefix" != "no"
 then
@@ -651,7 +654,7 @@
 
 dnl -- end imap dependencies --
 
-AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl@<:@=PFX@:>@], [Enable TLS support 
using OpenSSL]),
+AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl@<:@=PFX@:>@],[Enable TLS support 
using OpenSSL]),
 [       if test "$with_ssl" != "no"
         then
           if test "$need_socket" != "yes"; then
@@ -684,7 +687,7 @@
         fi
 ])
 
-AC_ARG_WITH([gnutls], AC_HELP_STRING([--with-gnutls@<:@=PFX@:>@], [enable TLS 
support using gnutls]),
+AC_ARG_WITH([gnutls], AS_HELP_STRING([--with-gnutls@<:@=PFX@:>@],[enable TLS 
support using gnutls]),
     [gnutls_prefix="$withval"], [gnutls_prefix="no"])
 if test "$gnutls_prefix" != "no" && test x"$need_ssl" != xyes
 then
@@ -718,7 +721,7 @@
 
 AM_CONDITIONAL(USE_SSL, test x$need_ssl = xyes)
 
-AC_ARG_WITH(sasl, AC_HELP_STRING([--with-sasl@<:@=PFX@:>@], [Use SASL network 
security library]),
+AC_ARG_WITH(sasl, AS_HELP_STRING([--with-sasl@<:@=PFX@:>@],[Use Cyrus SASL 2 
network security library]),
         [      
         if test "$with_sasl" != "no"
         then
@@ -754,19 +757,19 @@
 
 dnl -- end socket --
 
-AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging 
support]),
+AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],[Enable debugging 
support]),
         [ if test x$enableval = xyes ; then
                 AC_DEFINE(DEBUG,1,[ Define to enable debugging info. ])
           fi
          ])
 
-AC_ARG_ENABLE(flock, AC_HELP_STRING([--enable-flock], [Use flock() to lock 
files]),
+AC_ARG_ENABLE(flock, AS_HELP_STRING([--enable-flock],[Use flock() to lock 
files]),
         [if test $enableval = yes; then
                 AC_DEFINE(USE_FLOCK,1, [ Define to use flock() to lock 
mailboxes. ])
         fi])
 
 mutt_cv_fcntl=yes
-AC_ARG_ENABLE(fcntl, AC_HELP_STRING([--disable-fcntl], [Do NOT use fcntl() to 
lock files]),
+AC_ARG_ENABLE(fcntl, AS_HELP_STRING([--disable-fcntl],[Do NOT use fcntl() to 
lock files]),
         [if test $enableval = no; then mutt_cv_fcntl=no; fi])
 
 if test $mutt_cv_fcntl = yes; then
@@ -775,7 +778,7 @@
 
 AC_MSG_CHECKING(whether struct dirent defines d_ino)
 ac_cv_dirent_d_ino=no
-AC_TRY_LINK([#include <dirent.h>],[struct dirent dp; 
(void)dp.d_ino],[ac_cv_dirent_d_ino=yes])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <dirent.h>]], [[struct dirent dp; 
(void)dp.d_ino]])],[ac_cv_dirent_d_ino=yes],[])
 if test x$ac_cv_dirent_d_ino = xyes ; then
   AC_DEFINE(HAVE_DIRENT_D_INO,1,
             [Define to 1 if your system has the dirent::d_ino member])
@@ -783,7 +786,7 @@
 AC_MSG_RESULT($ac_cv_dirent_d_ino)
 
 mutt_cv_warnings=yes
-AC_ARG_ENABLE(warnings, AC_HELP_STRING([--disable-warnings], [Turn off 
compiler warnings (not recommended)]),
+AC_ARG_ENABLE(warnings, AS_HELP_STRING([--disable-warnings],[Turn off compiler 
warnings (not recommended)]),
 [if test $enableval = no; then
         mutt_cv_warnings=no
 fi])
@@ -792,7 +795,7 @@
   CFLAGS="-Wall -pedantic -Wno-long-long $CFLAGS"
 fi
 
-AC_ARG_ENABLE(nfs-fix, AC_HELP_STRING([--enable-nfs-fix], [Work around an NFS 
with broken attributes caching]),
+AC_ARG_ENABLE(nfs-fix, AS_HELP_STRING([--enable-nfs-fix],[Work around an NFS 
with broken attributes caching]),
         [if test x$enableval = xyes; then
                 AC_DEFINE(NFS_ATTRIBUTE_HACK,1,
                   [Define if you have problems with mutt not detecting
@@ -800,17 +803,17 @@
                    incorrectly cache the attributes of small files.])
         fi])
 
-AC_ARG_ENABLE(mailtool, AC_HELP_STRING([--enable-mailtool], [Enable Sun 
mailtool attachments support]),
+AC_ARG_ENABLE(mailtool, AS_HELP_STRING([--enable-mailtool],[Enable Sun 
mailtool attachments support]),
         [if test x$enableval = xyes; then
                 AC_DEFINE(SUN_ATTACHMENT,1,[ Define to enable Sun mailtool 
attachments support. ])
         fi])
 
-AC_ARG_ENABLE(locales-fix, AC_HELP_STRING([--enable-locales-fix], [The result 
of isprint() is unreliable]),
+AC_ARG_ENABLE(locales-fix, AS_HELP_STRING([--enable-locales-fix],[The result 
of isprint() is unreliable]),
         [if test x$enableval = xyes; then
                 AC_DEFINE(LOCALES_HACK,1,[ Define if the result of isprint() 
is unreliable. ])
         fi])
 
-AC_ARG_WITH(exec-shell, AC_HELP_STRING([--with-exec-shell=SHELL], [Specify 
alternate shell (ONLY if /bin/sh is broken)]),
+AC_ARG_WITH(exec-shell, AS_HELP_STRING([--with-exec-shell=SHELL],[Specify 
alternate shell (ONLY if /bin/sh is broken)]),
         [if test $withval != yes; then
                 AC_DEFINE_UNQUOTED(EXECSHELL, "$withval",
                  [program to use for shell commands])
@@ -819,7 +822,7 @@
         fi],
         [AC_DEFINE_UNQUOTED(EXECSHELL, "/bin/sh")])
 
-AC_ARG_ENABLE(exact-address, AC_HELP_STRING([--enable-exact-address], [Enable 
regeneration of email addresses]),
+AC_ARG_ENABLE(exact-address, AS_HELP_STRING([--enable-exact-address],[Enable 
regeneration of email addresses]),
         [if test $enableval = yes; then
                 AC_DEFINE(EXACT_ADDRESS,1,
                   [Enable exact regeneration of email addresses as parsed?
@@ -830,16 +833,11 @@
 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],
-  [Don't use tokyocabinet even if it is available]))
-AC_ARG_WITH(qdbm, AC_HELP_STRING([--without-qdbm],
-  [Don't use qdbm even if it is available]))
-AC_ARG_WITH(gdbm, AC_HELP_STRING([--without-gdbm],
-  [Don't use gdbm even if it is available]))
-AC_ARG_WITH(bdb, AC_HELP_STRING([--with-bdb@<:@=DIR@:>@],
-  [Use BerkeleyDB4 if gdbm is not available]))
+AC_ARG_ENABLE(hcache, AS_HELP_STRING([--enable-hcache],[Enable header 
caching]))
+AC_ARG_WITH(tokyocabinet, AS_HELP_STRING([--without-tokyocabinet],[Don't use 
tokyocabinet even if it is available]))
+AC_ARG_WITH(qdbm, AS_HELP_STRING([--without-qdbm],[Don't use qdbm even if it 
is available]))
+AC_ARG_WITH(gdbm, AS_HELP_STRING([--without-gdbm],[Don't use gdbm even if it 
is available]))
+AC_ARG_WITH(bdb, AS_HELP_STRING([--with-bdb@<:@=DIR@:>@],[Use BerkeleyDB4 if 
gdbm is not available]))
 
 db_found=no
 if test x$enable_hcache = xyes
@@ -954,7 +952,7 @@
         LIBS="$LIBS -lgdbm"
         AC_CACHE_CHECK(for gdbm_open, ac_cv_gdbmopen,[
             ac_cv_gdbmopen=no
-            AC_TRY_LINK([#include 
<gdbm.h>],[gdbm_open(0,0,0,0,0);],[ac_cv_gdbmopen=yes])
+            AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gdbm.h>]], 
[[gdbm_open(0,0,0,0,0);]])],[ac_cv_gdbmopen=yes],[])
         ])
         LIBS="$saved_LIBS"
         if test "$ac_cv_gdbmopen" = yes
@@ -997,17 +995,17 @@
                         for l in `echo $BDB_VERSIONS`; do
                             CPPFLAGS="$OLDCPPFLAGS -I$BDB_INCLUDE_DIR"
                             LIBS="$OLDLIBS -L$BDB_LIB_DIR -l$l"
-                            AC_TRY_LINK([
+                            AC_LINK_IFELSE([AC_LANG_PROGRAM([[
                                 #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 2
                     done
@@ -1053,7 +1051,7 @@
 
 dnl -- iconv/gettext --
 
-AC_ARG_ENABLE(iconv, AC_HELP_STRING([--disable-iconv], [Disable iconv 
support]),
+AC_ARG_ENABLE(iconv, AS_HELP_STRING([--disable-iconv],[Disable iconv support]),
         [if test x$enableval = xno ; then
                 am_cv_func_iconv=no
         fi
@@ -1080,7 +1078,7 @@
 AC_CACHE_CHECK([whether this iconv is good enough], mutt_cv_iconv_good,
         mutt_save_LIBS="$LIBS"
         LIBS="$LIBS $LIBICONV"
-        AC_TRY_RUN([
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <iconv.h>
 int main()
 {
@@ -1096,10 +1094,7 @@
            !(ob == buf && obl == sizeof(buf)) ||
            iconv_close(cd)));
 }
-                ],
-                mutt_cv_iconv_good=yes,
-                mutt_cv_iconv_good=no,
-                mutt_cv_iconv_good=yes)
+                
]])],[mutt_cv_iconv_good=yes],[mutt_cv_iconv_good=no],[mutt_cv_iconv_good=yes])
         LIBS="$mutt_save_LIBS")
 if test "$mutt_cv_iconv_good" = no; then
   AC_MSG_ERROR(Try using libiconv instead)
@@ -1111,7 +1106,7 @@
 AC_CACHE_CHECK([whether iconv is non-transcribing], mutt_cv_iconv_nontrans,
         mutt_save_LIBS="$LIBS"
         LIBS="$LIBS $LIBICONV"
-        AC_TRY_RUN([
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <iconv.h>
 #include <string.h>
 int main()
@@ -1128,10 +1123,7 @@
   return ((cd = iconv_open("UTF-8", "UTF-8")) == (iconv_t)(-1) ||
           iconv(cd, &ib, &ibl, &ob, &obl));
 }
-                ],
-                mutt_cv_iconv_nontrans=no,
-                mutt_cv_iconv_nontrans=yes,
-                mutt_cv_iconv_nontrans=no)
+                
]])],[mutt_cv_iconv_nontrans=no],[mutt_cv_iconv_nontrans=yes],[mutt_cv_iconv_nontrans=no])
         LIBS="$mutt_save_LIBS")
 if test "$mutt_cv_iconv_nontrans" = yes; then
   AC_DEFINE(ICONV_NONTRANS, 1)
@@ -1155,7 +1147,7 @@
 
 dnl -- IDN depends on iconv
 
-AC_ARG_WITH(idn, AC_HELP_STRING([--with-idn=@<:@PFX@:>@], [Use GNU libidn for 
domain names]),
+AC_ARG_WITH(idn, AS_HELP_STRING([--with-idn=@<:@PFX@:>@],[Use GNU libidn for 
domain names]),
                 [
                  if test "$with_idn" != "no" ; then
                        if test "$with_idn" != "yes" ; then
@@ -1189,32 +1181,26 @@
 AC_CHECK_HEADERS(wchar.h)
 
 AC_CACHE_CHECK([for wchar_t], mutt_cv_wchar_t,
-        AC_TRY_COMPILE([
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stddef.h>
 #include <stdlib.h>
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
 #endif
-                ],
-                [ wchar_t wc; return 0; ],
-                mutt_cv_wchar_t=yes,
-                mutt_cv_wchar_t=no))
+                ]], [[ wchar_t wc; return 0; 
]])],[mutt_cv_wchar_t=yes],[mutt_cv_wchar_t=no]))
 
 if test "$mutt_cv_wchar_t" = no; then
         AC_DEFINE(wchar_t,int,[ Define to 'int' if system headers don't 
define. ])
 fi
 
 AC_CACHE_CHECK([for wint_t], mutt_cv_wint_t,
-        AC_TRY_COMPILE([
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stddef.h>
 #include <stdlib.h>
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
 #endif
-                ],
-                [ wint_t wc; return 0; ],
-                mutt_cv_wint_t=yes,
-                mutt_cv_wint_t=no))
+                ]], [[ wint_t wc; return 0; 
]])],[mutt_cv_wint_t=yes],[mutt_cv_wint_t=no]))
 
 if test "$mutt_cv_wint_t" = no; then
         AC_DEFINE(wint_t,int,[ Define to 'int' if system headers don't define. 
])
@@ -1226,29 +1212,26 @@
 AC_CHECK_FUNCS(iswxdigit towupper towlower)
 
 AC_CACHE_CHECK([for mbstate_t], mutt_cv_mbstate_t,
-        AC_TRY_COMPILE([
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stddef.h>
 #include <stdlib.h>
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
 #endif
-                ],
-                [ mbstate_t s; return 0; ],
-                mutt_cv_mbstate_t=yes,
-                mutt_cv_mbstate_t=no))
+                ]], [[ mbstate_t s; return 0; 
]])],[mutt_cv_mbstate_t=yes],[mutt_cv_mbstate_t=no]))
 
 if test "$mutt_cv_mbstate_t" = no; then
         AC_DEFINE(mbstate_t,int,[ Define to 'int' if system headers don't 
define. ])
 fi
 
 wc_funcs=maybe
-AC_ARG_WITH(wc-funcs, AC_HELP_STRING([--without-wc-funcs], [Do not use the 
system's wchar_t functions]),
+AC_ARG_WITH(wc-funcs, AS_HELP_STRING([--without-wc-funcs],[Do not use the 
system's wchar_t functions]),
         wc_funcs=$withval)
 
 if test "$wc_funcs" != yes && test "$wc_funcs" != no; then
         AC_CACHE_CHECK([for wchar_t functions], mutt_cv_wc_funcs,
                 mutt_cv_wc_funcs=no
-                AC_TRY_LINK([
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #define _XOPEN_SOURCE 1
 #include <stddef.h>
 #include <stdlib.h>
@@ -1257,10 +1240,11 @@
 #endif
 #ifdef HAVE_WCTYPE_H
 #include <wctype.h>
-#endif],
-                        [mbrtowc(0, 0, 0, 0); wctomb(0, 0); wcwidth(0);
-        iswprint(0); iswspace(0); towlower(0); towupper(0); iswalnum(0)],
-                        mutt_cv_wc_funcs=yes))
+#endif
+#ifdef HAVE_WCHAR_H
+#include <wchar.h>
+#endif]], [[mbrtowc(0, 0, 0, 0); wctomb(0, 0); wcwidth(0);
+        iswprint(0); iswspace(0); towlower(0); towupper(0); 
iswalnum(0)]])],[mutt_cv_wc_funcs=yes],[]))
         wc_funcs=$mutt_cv_wc_funcs
 fi
 
@@ -1271,19 +1255,13 @@
 fi
 
 AC_CACHE_CHECK([for nl_langinfo and CODESET], mutt_cv_langinfo_codeset,
-  [AC_TRY_LINK([#include <langinfo.h>],
-    [char* cs = nl_langinfo(CODESET);],
-    mutt_cv_langinfo_codeset=yes,
-    mutt_cv_langinfo_codeset=no)])
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[char* cs = 
nl_langinfo(CODESET);]])],[mutt_cv_langinfo_codeset=yes],[mutt_cv_langinfo_codeset=no])])
 if test $mutt_cv_langinfo_codeset = yes; then
   AC_DEFINE(HAVE_LANGINFO_CODESET,1,[ Define if you have <langinfo.h> and 
nl_langinfo(CODESET). ])
 fi
 
 AC_CACHE_CHECK([for nl_langinfo and YESEXPR], mutt_cv_langinfo_yesexpr,
-  [AC_TRY_LINK([#include <langinfo.h>],
-    [char* cs = nl_langinfo(YESEXPR);],
-    mutt_cv_langinfo_yesexpr=yes,
-    mutt_cv_langinfo_yesexpr=no)])
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[char* cs = 
nl_langinfo(YESEXPR);]])],[mutt_cv_langinfo_yesexpr=yes],[mutt_cv_langinfo_yesexpr=no])])
 if test $mutt_cv_langinfo_yesexpr = yes; then
   AC_DEFINE(HAVE_LANGINFO_YESEXPR,1,[ Define if you have <langinfo.h> and 
nl_langinfo(YESEXPR). ])
 fi
@@ -1312,7 +1290,7 @@
 AC_SUBST(DSLROOT)
 
 AC_ARG_ENABLE(full_doc,
-             AC_HELP_STRING([--disable-full-doc], [Omit disabled variables]),
+             AS_HELP_STRING([--disable-full-doc],[Omit disabled variables]),
 [       if test x$enableval = xno ; then
                 full_doc=no
         fi
@@ -1321,6 +1299,7 @@
   AC_DEFINE(MAKEDOC_FULL,1, [Define if you want complete documentation.])
 fi
 
-AC_OUTPUT(Makefile contrib/Makefile doc/Makefile imap/Makefile
+AC_CONFIG_FILES([Makefile contrib/Makefile doc/Makefile imap/Makefile
         intl/Makefile m4/Makefile po/Makefile.in
-        hcachever.sh muttbug.sh doc/instdoc.sh)
+        hcachever.sh muttbug.sh doc/instdoc.sh])
+AC_OUTPUT