summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2020-03-13 17:24:26 +0100
committerDaiki Ueno <dueno@redhat.com>2020-03-19 09:28:30 +0100
commit252a4dd5090083ede6d8fdecbd2241b2b8a001b5 (patch)
treecf54b8b043fcaf80ca3c1dc325a802e17979a798 /configure.ac
parent3462a7fc813da9576f8dda41a81b86ca03b99344 (diff)
downloadgnutls-252a4dd5090083ede6d8fdecbd2241b2b8a001b5.tar.gz
nettle: vendor in ChaCha20 implementation from nettle
This enables to use bundled ChaCha20 implementation if the system nettle doesn't have nettle_chacha_set_counter. Signed-off-by: Daiki Ueno <dueno@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 09acf8b22f..99cb4091ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -669,6 +669,15 @@ LIBS=$save_LIBS
AS_IF([test "$have_gostdsa" != "yes"], AC_DEFINE([NEED_GOSTDSA], 1, [Use backported GOST R 34.10 DSA support]))
AM_CONDITIONAL(NEED_GOSTDSA, [test "$have_gostdsa" != "yes"])
+# Check if nettle has ChaCha20 initial block counter support
+have_chacha_set_counter=no
+save_LIBS=$LIBS
+LIBS="$LIBS $NETTLE_LIBS"
+AC_CHECK_FUNCS([nettle_chacha_set_counter],
+ [have_chacha_set_counter=yes])
+LIBS=$save_LIBS
+AM_CONDITIONAL(NEED_CHACHA, [test "$have_chacha_set_counter" != "yes"])
+
AC_MSG_CHECKING([whether to build libdane])
AC_ARG_ENABLE(libdane,
AS_HELP_STRING([--disable-libdane],