AC_CHECK_FUNCS(fgetpos memmove setegid srand48 strerror)
-AC_REPLACE_FUNCS([setenv strcasecmp strdup strsep strtok_r])
+AC_REPLACE_FUNCS([setenv strcasecmp strdup strsep strtok_r wcscasecmp])
+AC_REPLACE_FUNCS([strcasestr mkdtemp])
AC_CHECK_FUNC(getopt)
if test $ac_cv_func_getopt = yes; then
dnl -- end imap dependencies --
-AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl@<:@=PFX@:>@], [Compile in SSL support for POP/IMAP/SMTP using OpenSSL]),
+AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl@<:@=PFX@:>@], [Enable TLS support using OpenSSL]),
[ if test "$with_ssl" != "no"
then
if test "$need_socket" != "yes"; then
fi
])
-AC_ARG_WITH([gnutls], AC_HELP_STRING([--with-gnutls@<:@=PFX@:>@], [Compile in SSL support for POP/IMAP/SMTP using gnutls]),
+AC_ARG_WITH([gnutls], AC_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
then
AC_MSG_WARN([SSL support is only useful with POP, IMAP or SMTP support])
else
- MUTT_AM_PATH_GNUTLS([$gnutls_prefix],
+ if test "$gnutls_prefix" != "yes"
+ then
+ LDFLAGS="$LDFLAGS -L$gnutls_prefix/lib"
+ CPPFLAGS="$CPPFLAGS -I$gnutls_prefix/include"
+ fi
+ saved_LIBS="$LIBS"
+
+ AC_CHECK_LIB(gnutls, gnutls_check_version,
[dnl GNUTLS found
- CPPFLAGS="$CPPFLAGS $LIBGNUTLS_CFLAGS"
- MUTTLIBS="$MUTTLIBS $LIBGNUTLS_LIBS"
+ AC_CHECK_DECLS([GNUTLS_VERIFY_DISABLE_TIME_CHECKS], [], [],
+ [[#include <gnutls/x509.h>]])
- AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ])
- AC_DEFINE(USE_SSL_GNUTLS,1,[ Define if you want support for SSL via GNUTLS. ])
+ LIBS="$saved_LIBS"
+ MUTTLIBS="$MUTTLIBS -lgnutls"
+
+ AC_DEFINE(USE_SSL, 1, [ Define if you want support for SSL. ])
+ AC_DEFINE(USE_SSL_GNUTLS, 1, [ Define if you want support for SSL via GNUTLS. ])
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl_gnutls.o"
need_ssl=yes],
- [dnl GNUTLS not found
- AC_MSG_ERROR([could not find libgnutls])
- ])
+ [AC_MSG_ERROR([could not find libgnutls])])
fi
fi
+
AM_CONDITIONAL(USE_SSL, test x$need_ssl = xyes)
AC_ARG_WITH(sasl, AC_HELP_STRING([--with-sasl@<:@=PFX@:>@], [Use Cyrus SASL 2 network security library]),