talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit c96dbc801aace53e8718031eb5806ba5130da2fd
parent 1700e5d7e56ca6f188d861a0548c8db20a031dde
Author: Colin Leroy <colin@colino.net>
Date:   Fri,  2 Sep 2011 08:13:03 +0000

2011-09-02 [colin]	3.7.10cvs15

	* configure.ac
	* src/common/ssl.c
		Linking against gcrypt explicitely in order to call
		gcry_control() for mutex setup isn't necessary anymore
		starting from gnuTLS 2.11.

Diffstat:
MChangeLog | 8++++++++
MPATCHSETS | 1+
Mconfigure.ac | 57+++++++++++++++++++--------------------------------------
Msrc/common/ssl.c | 5+++++
4 files changed, 33 insertions(+), 38 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,11 @@ +2011-09-02 [colin] 3.7.10cvs15 + + * configure.ac + * src/common/ssl.c + Linking against gcrypt explicitely in order to call + gcry_control() for mutex setup isn't necessary anymore + starting from gnuTLS 2.11. + 2011-08-31 [colin] 3.7.10cvs14 * src/plugins/pgpinline/pgpinline.c diff --git a/PATCHSETS b/PATCHSETS @@ -4218,3 +4218,4 @@ ( cvs diff -u -r 1.12.2.55 -r 1.12.2.56 src/gtk/prefswindow.c; ) > 3.7.10cvs12.patchset ( cvs diff -u -r 1.100.2.78 -r 1.100.2.79 AUTHORS; cvs diff -u -r 1.1.2.72 -r 1.1.2.73 src/gtk/authors.h; cvs diff -u -r 1.274.2.327 -r 1.274.2.328 src/mainwindow.c; cvs diff -u -r 1.94.2.217 -r 1.94.2.218 src/messageview.c; cvs diff -u -r 1.1.2.72 -r 1.1.2.73 src/gtk/authors.h; ) > 3.7.10cvs13.patchset ( cvs diff -u -r 1.1.2.48 -r 1.1.2.49 src/plugins/pgpinline/pgpinline.c; cvs diff -u -r 1.1.2.58 -r 1.1.2.59 src/plugins/pgpmime/pgpmime.c; ) > 3.7.10cvs14.patchset +( cvs diff -u -r 1.654.2.4295 -r 1.654.2.4296 configure.ac; cvs diff -u -r 1.9.2.47 -r 1.9.2.48 src/common/ssl.c; ) > 3.7.10cvs15.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=10 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=14 +EXTRA_VERSION=15 EXTRA_RELEASE= EXTRA_GTK2_VERSION= @@ -412,44 +412,25 @@ AC_ARG_ENABLE(gnutls, [ --enable-gnutls enable GnuTLS support], AC_MSG_RESULT($ac_cv_enable_gnutls) if test "x$ac_cv_enable_gnutls" != "xno"; then - OCPPFLAGS="$CPPFLAGS" - OLDFLAGS="$LDFLAGS" - GNUTLS_LIBS="" - PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.2, - [ac_cv_enable_gnutls=yes], - [ac_cv_enable_gnutls=no - echo "GnuTLS version >= 2.2 not found"]) - if test "x$ac_cv_enable_gnutls" = "xyes"; then - AC_CHECK_HEADER(gpg-error.h, - [AC_CHECK_LIB(gpg-error, gpg_strerror,, - [ac_cv_enable_gnutls=no]) - ],[ac_cv_enable_gnutls=no]) - fi - if test "x$ac_cv_enable_gnutls" = "xyes"; then - GCRYPT_LIBS="-lgpg-error" - AC_CHECK_HEADER(gcrypt.h, - [AC_CHECK_LIB(gcrypt, gcry_control,, - [ac_cv_enable_gnutls=no]) - ],[ac_cv_enable_gnutls=no]) - fi - if test "x$ac_cv_enable_gnutls" = "xyes"; then - if test x"$platform_win32" = "xyes"; then - GNUTLS_LIBS="-lgnutls -lgcrypt ${GCRYPT_LIBS}" - else - GNUTLS_LIBS="-lgnutls -lgcrypt -lz ${GCRYPT_LIBS}" - fi - fi -else - CPPFLAGS="$OCPPFLAGS" - LDFLAGS="$OLDFLAGS" -fi - -if test "x$ac_cv_enable_gnutls" = "xyes"; then - AC_DEFINE([USE_GNUTLS],1, [Define to use GnuTLS]) -else - GNUTLS_LIBS="" + PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.2, + [ + AC_DEFINE(USE_GNUTLS, 1, gnutls) + echo "Building with GnuTLS" + ], + [ + echo "Building without gnutls" + ]) + PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.11, + [ + dnl No linking against libgcrypt needed + ], + [ + dnl linking against libgcrypt *is* needed + GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt" + ]) + AC_SUBST(GNUTLS_LIBS) + AC_SUBST(GNUTLS_CFLAGS) fi -AC_SUBST(GNUTLS_LIBS) dnl password encryption OLDLIBS=$LIBS diff --git a/src/common/ssl.c b/src/common/ssl.c @@ -29,8 +29,11 @@ #include <glib/gi18n.h> #include <errno.h> #include <pthread.h> + +#if GNUTLS_VERSION_NUMBER <= 0x020b00 #include <gcrypt.h> GCRY_THREAD_OPTION_PTHREAD_IMPL; +#endif #include "claws.h" #include "utils.h" @@ -153,7 +156,9 @@ const gchar *claws_ssl_get_cert_dir(void) void ssl_init(void) { +#if GNUTLS_VERSION_NUMBER <= 0x020b00 gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); +#endif #ifdef HAVE_LIBETPAN mailstream_gnutls_init_not_required(); #endif