Skip to content

Commit

Permalink
Test for libgnutls by hand rather than relying on deprecated libgnutl…
Browse files Browse the repository at this point in the history
…s-config script.

Closes #3239.

--HG--
branch : HEAD
  • Loading branch information
bcully committed Jun 9, 2009
1 parent 49c5bb4 commit 633e507
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 174 deletions.
31 changes: 19 additions & 12 deletions configure.ac
Expand Up @@ -649,7 +649,7 @@ AM_CONDITIONAL(USE_GSS, test x$need_gss = xyes)

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
Expand Down Expand Up @@ -682,31 +682,38 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl@<:@=PFX@:>@], [Compile in SSL suppor
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
if test "$need_socket" != "yes"
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_CHECK_DECLS([GNUTLS_VERIFY_DISABLE_TIME_CHECKS], [], [],
[[#include <gnutls/x509.h>]])
[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]),
Expand Down
162 changes: 0 additions & 162 deletions m4/libgnutls.m4

This file was deleted.

0 comments on commit 633e507

Please sign in to comment.