diff mcabber/configure.ac @ 1586:590ade2780bd

Use pkg-config to detect GnuTLS instead of the m4 macros
author Mikael Berthe <mikael@lilotux.net>
date Sun, 04 Oct 2009 18:12:38 +0200
parents c431fa9e2876
children 8d1bcc83ae32
line wrap: on
line diff
--- a/mcabber/configure.ac	Sun Oct 04 17:06:07 2009 +0200
+++ b/mcabber/configure.ac	Sun Oct 04 18:12:38 2009 +0200
@@ -193,11 +193,14 @@
     else
         AC_MSG_RESULT([not found or disabled])
 
-        AM_PATH_LIBGNUTLS_EXTRA(0.0.1, [
+        PKG_PROG_PKG_CONFIG
+        PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.0.0],
+                          have_gnutls=yes, have_gnutls=no)
+        if test "$have_gnutls" = "yes"; then
+            AC_DEFINE([HAVE_GNUTLS], 1, [GNU TLS])
             CXXFLAGS="$CXXFLAGS $LIBGNUTLS_CFLAGS"
-            LIBS="$LIBS $LIBGNUTLS_LIBS -lgnutls-extra -lgnutls-openssl"
-            AC_DEFINE([HAVE_GNUTLS], [], [GNU TLS])
-        ])
+            LIBS="$LIBS $LIBGNUTLS_LIBS"
+        fi
     fi
 fi