Am 20.12.2012 16:20, schrieb Michael Elkins: > On Thu, Dec 20, 2012 at 09:09:15AM +0100, Matthias Andree wrote: >> How about 5.3? FreeBSD may have the 5.3 version installed as the sole >> and only Berkeley DB version. >> >> <http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html> >> > > That patch actually came from the FreeBSD 9 port, and it only detected > up to BDB 5.2.
and the patch that went into mutt was: > line diff > > 1.1 --- a/configure.ac Thu Jul 22 20:06:33 2010 +0200 > 1.2 +++ b/configure.ac Wed Dec 19 14:40:24 2012 -0800 > 1.3 @@ -993,7 +993,7 @@ > 1.4 bdbpfx="$bdbpfx $d/$v" > 1.5 done > 1.6 done > 1.7 - BDB_VERSIONS="db-4 db4 db-4.6 db4.6 db46 db-4.5 db4.5 db45 > db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''" > 1.8 + BDB_VERSIONS="db-4 db4 db-5 db5 db-5.2 db5.2 db52 db-5.1 > db5.1 db51 db-5.0 db5.0 db50 db-4.8 db4.8 db48 db-4.7 db4.7 db47 db-4.6 db4.6 > db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 > db-4.1 db4.1 db41 db ''" > 1.9 AC_MSG_CHECKING([for BerkeleyDB > 4.0]) > 1.10 for d in $bdbpfx; do > 1.11 BDB_INCLUDE_DIR="" > Whoever did this, this is way excessive, even in the light of rampant renaming of libdb, and it Does Not Even Workâ˘. You end up with 456 (literally!) gcc -o conftest ... runs but none comes up with a db. I have perfectly working DB 4.1, 4.8 and 5.3 installed, and you should think it would have picked one up at least. But no. After debugging, the immediate cause for the failure is your change 36b0cc717ecc that "ma[d]e configure define _POSIX_C_SOURCE, _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED to comply with POSIX.1-2008 and XSI conforming applications." It causes BSD to _HIDE_ their local symbols, and thus, the u_int type goes missing, which is required by db.h. With u_int undefined, the Berkeley DB detection keels over. Workaround: add AC_DEFINE(__BSD_VISIBLE, 1, ...). HOWEVER: I seem to recall that you will still get Solaris breakage by defining the macros quoted above, too. Not sure if AC_SYSTEM_EXTENSIONS avoids that. ATTACHED: Initial PATCHES to clean up configure.ac (most is from running 2.69's autoupdate), and a second patch to fix this breakage attached, we'll need to see to cutting down the version detection logic later. Best Matthias
# HG changeset patch # User Matthias Andree <[email protected]> # Date 1356022599 -3600 # Branch HEAD # Node ID 607b1a9aa5c4620d8135df4f6b6a6c6117290a8a # Parent 879c9516154c77027d385dfc15848b58d7fb2e7c Modernize configure.ac, to avoid breakage with automake 1.13. diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -3,23 +3,23 @@ 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.69]) +AC_INIT([mutt],[$mutt_cv_version]) +AC_CONFIG_SRCDIR([mutt.h]) +AC_CONFIG_HEADERS([config.h]) mutt_cv_version=`cat "$srcdir/VERSION"` -AM_INIT_AUTOMAKE(mutt, $mutt_cv_version) +AM_INIT_AUTOMAKE AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/VERSION']) MUTT_VERSION=`env HGROOT="$srcdir" sh "$srcdir/version.sh"` AC_DEFINE_UNQUOTED(MUTT_VERSION,"$MUTT_VERSION", [Full textual version string.]) +AC_USE_SYSTEM_EXTENSIONS AC_DEFINE(_POSIX_C_SOURCE, 200809L, [Enable POSIX.1-2008 features.]) AC_DEFINE(_XOPEN_SOURCE, 700, [Enable POSIX and XPG features.]) AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Enable XPG Extensions.]) -AC_GNU_SOURCE - ALL_LINGUAS="de eu ru it es uk fr pl nl cs id sk ko el zh_TW zh_CN pt_BR eo gl sv da lt tr ja hu et ca bg ga" AC_CANONICAL_HOST @@ -33,7 +33,7 @@ AC_MSG_RESULT($mutt_cv_prefix) AC_PROG_CC -AC_ISC_POSIX +AC_SEARCH_LIBS([strerror],[cposix]) if test "x$U" != "x"; then AC_MSG_ERROR(Compiler not ANSI compliant) fi @@ -124,7 +124,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 @@ -149,7 +149,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 @@ -161,7 +161,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 @@ -173,7 +173,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" @@ -199,9 +199,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 () @@ -211,10 +211,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 @@ -265,7 +262,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 @@ -314,7 +311,18 @@ AC_CHECK_FUNCS(setrlimit getsid) -AC_TYPE_SIGNAL +AC_DIAGNOSE([obsolete],[your code may safely assume C89 semantics that RETSIGTYPE is void. +Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl +AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([#include <sys/types.h> +#include <signal.h> +], + [return *(signal (0, 0)) (0) == 1;])], + [ac_cv_type_signal=int], + [ac_cv_type_signal=void])]) +AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers + (`int' or `void').]) + AC_MSG_CHECKING(for sig_atomic_t in signal.h) AC_EGREP_HEADER(sig_atomic_t,signal.h, @@ -343,7 +351,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) @@ -364,7 +378,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() { @@ -374,14 +388,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, ...) @@ -401,7 +415,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 @@ -426,20 +440,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 @@ -451,7 +464,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 @@ -465,7 +478,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 @@ -484,7 +497,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> @@ -495,14 +508,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> @@ -513,7 +526,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. ]) @@ -523,7 +536,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" \ @@ -544,7 +557,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) @@ -564,7 +577,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. ]) @@ -575,7 +588,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" @@ -585,7 +598,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" @@ -597,7 +610,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" @@ -628,7 +641,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 @@ -658,7 +671,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 @@ -694,7 +707,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 @@ -728,7 +741,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 SASL network security library]), [ if test "$with_sasl" != "no" then @@ -764,19 +777,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 @@ -785,7 +798,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]) @@ -793,7 +806,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]) @@ -802,7 +815,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 @@ -810,17 +823,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]) @@ -829,7 +842,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? @@ -840,16 +853,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 @@ -964,7 +972,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 @@ -1007,17 +1015,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 @@ -1063,7 +1071,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 @@ -1090,7 +1098,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() { @@ -1106,10 +1114,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) @@ -1121,7 +1126,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() @@ -1138,10 +1143,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) @@ -1165,7 +1167,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 @@ -1199,32 +1201,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. ]) @@ -1236,29 +1232,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 600 #include <stddef.h> #include <stdlib.h> @@ -1267,10 +1260,8 @@ #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]], [[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 @@ -1281,19 +1272,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 @@ -1322,7 +1307,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 @@ -1331,6 +1316,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 # HG changeset patch # User Matthias Andree <[email protected]> # Date 1356022679 -3600 # Branch HEAD # Node ID 4b85ea72546fb2c20ef5b8ce0e3d6ba130b39661 # Parent 607b1a9aa5c4620d8135df4f6b6a6c6117290a8a Repair Berkeley DB detection regression on FreeBSD. Change 36b0cc717ecc added POSIX/XOPEN symbols, and defining one of them hides BSD-specific symbols, suppressing the typedef for u_int that is required for <db.h>. Without u_int, Berkeley DB detection always fails. diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,7 @@ AC_DEFINE(_POSIX_C_SOURCE, 200809L, [Enable POSIX.1-2008 features.]) AC_DEFINE(_XOPEN_SOURCE, 700, [Enable POSIX and XPG features.]) AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Enable XPG Extensions.]) +AC_DEFINE(__BSD_VISIBLE, 1, [Avoid hiding BSD symbols from POSIX/XPG extensions.]) ALL_LINGUAS="de eu ru it es uk fr pl nl cs id sk ko el zh_TW zh_CN pt_BR eo gl sv da lt tr ja hu et ca bg ga"
signature.asc
Description: OpenPGP digital signature
