]> granicus.if.org Git - curl/commitdiff
Explicitly link to the nettle/gcrypt libraries
authorMartin Storsjo <martin@martin.st>
Thu, 26 Jan 2012 23:50:35 +0000 (00:50 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 28 Jan 2012 13:09:51 +0000 (14:09 +0100)
When support for nettle was added in 64f328c787ab, I overlooked
the fact that AC_CHECK_LIB doesn't add the tested lib to LIBS
if the check succeeded, if a custom success code block was present.
(The previous version of the check had an empty block for
successful checks, adding the lib to LIBS implicitly.)

Therefore, explicitly add either nettle or gcrypt to LIBS, after
deciding which one to use. Even if they can be linked in
transitively, it is safer to actually link explicitly to them.

This fixes building with gnutls with linkers that don't allow
linking transitively, such as for windows.

configure.ac

index cc7f8889796b1cf36e8ef0948ef2728e06490785..8920280ac004ffe15c827c7e5b68f1d9ec2f979d 100644 (file)
@@ -1824,6 +1824,9 @@ if test "$GNUTLS_ENABLED" = "1"; then
   if test "$USE_GNUTLS_NETTLE" = "1"; then
     AC_DEFINE(USE_GNUTLS_NETTLE, 1, [if GnuTLS uses nettle as crypto backend])
     AC_SUBST(USE_GNUTLS_NETTLE, [1])
+    LIBS="$LIBS -lnettle"
+  else
+    LIBS="$LIBS -lgcrypt"
   fi
 fi