summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-05-13 16:51:53 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-05-14 15:30:28 +0200
commit546782633df475d9071115b5fc13b387539f0ca5 (patch)
treec983dc896ec443a4f4f2ae34ebb7a6e8aa456569 /m4
parent20ba9c563c435b20ce5000fe4f831a07a2a6a0cf (diff)
downloadgnutls-546782633df475d9071115b5fc13b387539f0ca5.tar.gz
Allow using nettle3 with gnutls3.3
Diffstat (limited to 'm4')
-rw-r--r--m4/hooks.m413
1 files changed, 11 insertions, 2 deletions
diff --git a/m4/hooks.m4 b/m4/hooks.m4
index bf904a6563..b55fd49361 100644
--- a/m4/hooks.m4
+++ b/m4/hooks.m4
@@ -61,10 +61,10 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
DLL_VERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
AC_SUBST(DLL_VERSION)
- PKG_CHECK_MODULES(NETTLE, [nettle >= 2.7 nettle < 3.0], [cryptolib="nettle"], [
+ PKG_CHECK_MODULES(NETTLE, [nettle >= 2.7], [cryptolib="nettle"], [
AC_MSG_ERROR([[
***
- *** Libnettle 2.7.1 was not found. Note that this version of gnutls doesn't support nettle 3.0.
+ *** Libnettle 2.7.1 was not found.
]])
])
PKG_CHECK_MODULES(HOGWEED, [hogweed >= 2.7], [], [
@@ -75,6 +75,15 @@ AC_MSG_ERROR([[
])
AM_CONDITIONAL(ENABLE_NETTLE, test "$cryptolib" = "nettle")
AC_DEFINE([HAVE_LIBNETTLE], 1, [nettle is enabled])
+ nettle_version=`$PKG_CONFIG --modversion nettle`
+
+ if $PKG_CONFIG --atleast-version=3.0 nettle; then
+ AC_DEFINE([USE_NETTLE3], 1, [nettle 3.0 or later])
+ use_nettle3=yes
+ else
+ use_nettle3=no
+ fi
+ AM_CONDITIONAL(USE_NETTLE3, test "$use_nettle3" = "yes")
GNUTLS_REQUIRES_PRIVATE="Requires.private: nettle, hogweed"