summaryrefslogtreecommitdiff
blob: 91646a3a8f71b04270cfca65ca93b9fa9dc7dfa0 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Fix gnutls detection in the same crazy way it was used before
# https://bugs.gentoo.org/show_bug.cgi?id=273980
--- a/configure.in	2009-08-24 23:21:19.000000000 +0200
+++ b/configure.in	2009-08-24 23:26:14.000000000 +0200
@@ -290,29 +290,15 @@
 fi
 if test "x$want_gnutls" != "xno"; then
   AC_MSG_RESULT([requested])
-	AC_CHECK_LIB(
-	  [gnutls],
-	  [gnutls_global_init],
-	  [
-	   AM_PATH_LIBGNUTLS(
-	     [1.0.0],
-	     [
-	      want_gnutls=yes
-	      GNUTLS_FLAGS="$GNUTLS_FLAGS -DENABLE_GNUTLS"
-        GNUTLS_LIBS="-lgnutls"
-        #LDFLAGS="$LDFLAGS $want_gnutls_path"
-	     ],
-	     [
-	      want_gnutls=yes
-	      AC_MSG_WARN([gurlchecker require libgnutls >= 1.0])
-	     ]
-	   )
-	  ],
-	  [
-	   want_gnutls=yes
-	   AC_MSG_WARN([You requested GNUTLS support, but it doesn't seem to be installed.])
-	  ]
-	)
+  PKG_CHECK_EXISTS([gnutls >= 1.0], [
+    want_gnutls=yes
+    GNUTLS_FLAGS="$GNUTLS_FLAGS -DENABLE_GNUTLS"
+    GNUTLS_LIBS="-lgnutls"
+    #LDFLAGS="$LDFLAGS $want_gnutls_path"
+  ], [
+    want_gnutls=yes
+    AC_MSG_WARN([You requested GNUTLS >= 1.0 support, but it doesn't seem to be installed.])
+  ])
 else
   AC_MSG_WARN([You are building without libgnutls support. gurlchecker will not be able to do HTTPS check...])
 fi