Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Explicitly link to the nettle/gcrypt libraries

When support for nettle was added in 64f328c, 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.
  • Loading branch information...
commit f710aa40b326377b6834b59cc937bf50e929aba7 1 parent f4d3c0c
@mstorsjo mstorsjo authored bagder committed
Showing with 3 additions and 0 deletions.
  1. +3 −0  configure.ac
View
3  configure.ac
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.