/pidgin/main: 01a7faed981e: Fix build for older gnutls

Tomasz Wasilczyk twasilczyk at pidgin.im
Thu Feb 13 13:54:37 EST 2014


Changeset: 01a7faed981e2d678f06c0951a3f974b0621cc54
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-02-13 19:54 +0100
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/01a7faed981e

Description:

Fix build for older gnutls

diffstat:

 configure.ac                        |  25 +++++++++++++++++++++++++
 libpurple/protocols/gg/lib/config.h |   7 -------
 2 files changed, 25 insertions(+), 7 deletions(-)

diffs (49 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1275,6 +1275,31 @@ fi
 
 if test "x$gadu_libs" != "xyes"; then
 	AC_DEFINE(USE_INTERNAL_LIBGADU, 1, [Using internal libgadu])
+
+	AC_CHECK_LIB(gnutls, gnutls_certificate_set_x509_system_trust, [gg_have_gnutls_csxst=yes], [gg_have_gnutls_csxst=no])
+
+	gg_gnutls_sts=""
+	if test "x$gg_have_gnutls_csxst" = "xno"; then
+		for i in /etc/ssl/ca-bundle.pem \
+			/etc/ssl/certs/ca-certificates.crt \
+			/etc/pki/tls/cert.pem \
+			/usr/local/share/certs/ca-root-nss.crt \
+			/etc/ssl/cert.pem
+		do
+			if test -e $i; then
+				gg_gnutls_sts="$i"
+				break
+			fi
+		done
+	fi
+
+	if test "x$gg_have_gnutls_csxst" = "xyes"; then
+		AC_DEFINE(HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST, 1, [gnutls contains the gnutls_certificate_set_x509_system_trust function])
+	fi
+	if test "x$gg_gnutls_sts" != "x"; then
+		AC_DEFINE_UNQUOTED(GG_CONFIG_SSL_SYSTEM_TRUST, ["$gg_gnutls_sts"], [use the given file as GnuTLS default trust store])
+	fi
+
 fi
 
 if test "x$gadu_libs" = "x"; then
diff --git a/libpurple/protocols/gg/lib/config.h b/libpurple/protocols/gg/lib/config.h
--- a/libpurple/protocols/gg/lib/config.h
+++ b/libpurple/protocols/gg/lib/config.h
@@ -84,10 +84,3 @@
 /* Defined if libgadu is GPL compliant (was not linked with OpenSSL or any
  * other non-GPL compliant library support). */
 #define GG_CONFIG_IS_GPL_COMPLIANT
-
-/* Define to 1 if you have the `gnutls_certificate_set_x509_system_trust'
- * function. */
-#define HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST
-
-/* Defined if libgadu uses system defalt trusted CAs */
-#define GG_CONFIG_SSL_SYSTEM_TRUST



More information about the Commits mailing list