aboutsummaryrefslogtreecommitdiffstats
path: root/testing/csync2/02-csync2-1.34-gnutls_pkgconfig.patch
blob: b9e1d2726e430e2b7aba80dff944a56ebf25727e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- old/configure.ac
+++ new/configure.ac
@@ -59,16 +59,11 @@
 if test "$enable_gnutls" != no
 then
 
-	# Check for gnuTLS.
-	AM_PATH_LIBGNUTLS(1.0.0, , [ AC_MSG_ERROR([[gnutls not found; install gnutls, gnutls-openssl and libtasn1 packages for your system or run configure with --disable-gnutls]]) ])
-
-	# This is a bloody hack for fedora core
-	CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
-	LIBS="$LIBS $LIBGNUTLS_LIBS -ltasn1"
-
-	# Check gnuTLS SSL compatibility lib.
-	AC_CHECK_LIB([gnutls-openssl], [SSL_new], , [AC_MSG_ERROR([[gnutls-openssl not found; install gnutls, gnutls-openssl and libtasn1 packages for your system or run configure with --disable-gnutls]])])
-
+	PKG_CHECK_MODULES(LIBGNUTLS, gnutls, [
+	CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gnutls libssl`"
+	LIBS="$LIBS `$PKG_CONFIG --libs gnutls libssl` -DHAVE_LIBGNUTLS_OPENSSL"	
+	])
+	
 fi
 
 AC_CONFIG_FILES([Makefile])