summaryrefslogtreecommitdiff
blob: fbacb7748bdc894dd6bd620749bd9b13a9ef8bf3 (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
diff -Naur curl-7.25.0.orig//configure.ac curl-7.25.0/configure.ac
--- curl-7.25.0.orig//configure.ac	2012-04-04 17:24:48.000000000 -0400
+++ curl-7.25.0/configure.ac	2012-04-04 17:23:07.000000000 -0400
@@ -1823,20 +1823,9 @@
 
 if test "$GNUTLS_ENABLED" = "1"; then
   USE_GNUTLS_NETTLE=
-  # First check if we can detect either crypto library via transitive linking
-  AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
-  if test "$USE_GNUTLS_NETTLE" = ""; then
-    AC_CHECK_LIB(gnutls, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
-  fi
-  # If not, try linking directly to both of them to see if they are available
-  if test "$USE_GNUTLS_NETTLE" = ""; then
-    AC_CHECK_LIB(nettle, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
-  fi
-  if test "$USE_GNUTLS_NETTLE" = ""; then
-    AC_CHECK_LIB(gcrypt, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
-  fi
-  if test "$USE_GNUTLS_NETTLE" = ""; then
-    AC_MSG_ERROR([GnuTLS found, but neither gcrypt nor nettle found])
+  AC_ARG_WITH(nettle)
+  if test "x$withval" = "xyes"; then
+    USE_GNUTLS_NETTLE=1
   fi
   if test "$USE_GNUTLS_NETTLE" = "1"; then
     AC_DEFINE(USE_GNUTLS_NETTLE, 1, [if GnuTLS uses nettle as crypto backend])