dnl Process this file with autoconf to produce a configure script.
dnl !!! WHEN ADDING NEW CONFIGURE TESTS, PLEASE ADD CODE TO MAIN.C !!!
dnl !!! TO DUMP THEIR RESULTS WHEN MUTT -V IS CALLED !!!
AC_INIT([mutt],[m4_esyscmd(tr -d \\n <VERSION)])
AC_CONFIG_SRCDIR(mutt.h)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
MUTT_VERSION=`env sh "$srcdir/version.sh"`
AC_DEFINE_UNQUOTED(MUTT_VERSION,"$MUTT_VERSION", [Full textual version string.])
AC_USE_SYSTEM_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"
AC_CANONICAL_HOST
AC_MSG_CHECKING([for prefix])
if test x$prefix = xNONE; then
mutt_cv_prefix=$ac_default_prefix
else
mutt_cv_prefix=$prefix
fi
AC_MSG_RESULT($mutt_cv_prefix)
AC_PROG_CC
AC_PROG_CC_C99
AC_SEARCH_LIBS([strerror],[cposix])
if test "x$U" != "x"; then
AC_MSG_ERROR(Compiler not ANSI compliant)
fi
AC_PROG_CPP
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_PROG_MKDIR_P
AC_PROG_RANLIB
AC_CHECK_TOOL(AR, ar, ar)
AC_C_INLINE
AC_C_CONST
AC_C_BIGENDIAN
AC_SYS_LARGEFILE
AC_FUNC_FSEEKO
AC_CHECK_SIZEOF(off_t)
AC_PATH_PROG(DBX, dbx, no)
AC_PATH_PROG(GDB, gdb, no)
AC_PATH_PROG(SDB, sdb, no)
if test $GDB != no ; then
DEBUGGER=$GDB
elif test $DBX != no ; then
DEBUGGER=$DBX
elif test $SDB != no ; then
DEBUGGER=$SDB
else
DEBUGGER=no
fi
AC_SUBST([DEBUGGER])
AH_TEMPLATE([sig_atomic_t],
[/* Define to `int' if <signal.h> doesn't define.])
AH_TEMPLATE([HAVE_START_COLOR],
[Define if you have start_color, as a function or macro.])
AH_TEMPLATE([HAVE_TYPEAHEAD],
[Define if you have typeahead, as a function or macro.])
AH_TEMPLATE([HAVE_BKGDSET],
[Define if you have bkgdset, as a function or macro.])
AH_TEMPLATE([HAVE_CURS_SET],
[Define if you have curs_set, as a function or macro.])
AH_TEMPLATE([HAVE_META],
[Define if you have meta, as a function or macro.])
AH_TEMPLATE([HAVE_USE_DEFAULT_COLORS],
[Define if you have use_default_colors, as a function or macro.])
AH_TEMPLATE([HAVE_RESIZETERM],
[Define if you have resizeterm, as a function or macro.])
AH_TEMPLATE([SIG_ATOMIC_VOLATILE_T],
[Some systems declare sig_atomic_t as volatile, some others -- no.
This define will have value `sig_atomic_t' or
`volatile sig_atomic_t' accordingly.])
AH_TEMPLATE([ICONV_NONTRANS],
[Define as 1 if iconv() only converts exactly and we should treat
all return values other than (size_t)(-1) as equivalent.])
AH_BOTTOM([/* fseeko portability defines */
#ifdef HAVE_FSEEKO
# define LOFF_T off_t
# if HAVE_C99_INTTYPES && HAVE_INTTYPES_H
# if SIZEOF_OFF_T == 8
# define OFF_T_FMT "%" PRId64
# else
# define OFF_T_FMT "%" PRId32
# endif
# else
# if (SIZEOF_OFF_T == 8) && (SIZEOF_LONG == 4)
# define OFF_T_FMT "%lld"
# else
# define OFF_T_FMT "%ld"
# endif
# endif
#else
# define LOFF_T long
# define fseeko fseek
# define ftello ftell
# define OFF_T_FMT "%ld"
#endif
])
MUTT_C99_INTTYPES
AC_TYPE_LONG_LONG_INT
ac_aux_path_sendmail=/usr/sbin:/usr/lib
AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, $PATH:$ac_aux_path_sendmail)
AC_DEFINE_UNQUOTED(SENDMAIL,"$ac_cv_path_SENDMAIL", [Where to find sendmail on your system.])
OPS='$(srcdir)/OPS'
AC_MSG_CHECKING([whether to build with GPGME support])
AC_ARG_ENABLE(gpgme, AS_HELP_STRING([--enable-gpgme],[Enable GPGME support]),
[ if test x$enableval = xyes; then
enable_gpgme=yes
fi
])
if test x"$enable_gpgme" = xyes; then
AC_MSG_RESULT(yes)
AM_PATH_GPGME(1.0.0, AC_DEFINE(CRYPT_BACKEND_GPGME, 1,
[Defined, if GPGME support is enabled]),
[gpgme_found=no])
if test x"$gpgme_found" = xno; then
AC_MSG_ERROR([*** GPGME not found ***])
else
AM_PATH_GPGME(1.1.1, AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1,
[Define if GPGME supports PKA]))
#needed to get GPGME_LIBS and al correctly
AM_PATH_GPGME(1.0.0, AC_DEFINE(CRYPT_BACKEND_GPGME, 1,
[Define if you use GPGME to support OpenPGP]))
dnl AC_CHECK_FUNCS([gpgme_op_export_keys])
saved_LIBS="$LIBS"
LIBS="$LIBS $GPGME_LIBS"
AC_CHECK_FUNCS([gpgme_op_export_keys])
LIBS="$saved_LIBS"
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS crypt-gpgme.o crypt-mod-pgp-gpgme.o crypt-mod-smime-gpgme.o"
fi
else
AC_MSG_RESULT([no])
fi
AC_ARG_ENABLE(pgp, AS_HELP_STRING([--disable-pgp],[Disable PGP support]),
[ if test x$enableval = xno ; then
have_pgp=no
fi
])
if test x$have_pgp != xno ; then
AC_DEFINE(CRYPT_BACKEND_CLASSIC_PGP,1, [Define if you want classic PGP support.])
PGPAUX_TARGET="pgpring\$(EXEEXT) pgpewrap\$(EXEEXT)"
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, AS_HELP_STRING([--disable-smime],[Disable SMIME support]),
[ if test x$enableval = xno ; then
have_smime=no
fi
])
if test x$have_smime != xno ; then
AC_DEFINE(CRYPT_BACKEND_CLASSIC_SMIME, 1, [Define if you want classic S/MIME support.])
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS smime.o crypt-mod-smime-classic.o"
SMIMEAUX_TARGET="smime_keys"
fi
AC_ARG_ENABLE(sidebar, AC_HELP_STRING([--enable-sidebar], [Enable Sidebar support]),
[ if test x$enableval = xyes ; then
AC_DEFINE(USE_SIDEBAR, 1, [Define if you want support for the sidebar.])
OPS="$OPS \$(srcdir)/OPS.SIDEBAR"
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS sidebar.o"
fi
])
AC_ARG_ENABLE(compressed, AC_HELP_STRING([--enable-compressed], [Enable compressed folders support]),
enable_compressed=$enableval, enable_compressed=no
)
AS_IF([test x$enable_compressed = "xyes"], [
AC_DEFINE(USE_COMPRESSED, 1, [Define to enable compressed folders support.])
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS compress.o"
])
AM_CONDITIONAL(BUILD_COMPRESS, test x$enable_compressed = xyes)
AC_ARG_WITH(mixmaster, AS_HELP_STRING([--with-mixmaster@<:@=PATH@:>@],[Include Mixm