From 30a847ab52d5a08fedd1987417eac97ee4af8460 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 11 Oct 2016 21:33:24 +0200 Subject: configure: automatically disable non-suiteb curves That is, if the installed nettle doesn't provide the nettle_secp_192r1 symbol. --- configure.ac | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 137ed37009..c8879f9e54 100644 --- a/configure.ac +++ b/configure.ac @@ -500,8 +500,14 @@ AM_CONDITIONAL(HAVE_BUGGY_LIBIDN, test "$with_buggy_libidn" = "yes") AC_ARG_ENABLE(non-suiteb-curves, AS_HELP_STRING([--disable-non-suiteb-curves], [disable curves not in SuiteB]), enable_non_suiteb=$enableval, enable_non_suiteb=yes) -if [ test "$enable_non_suiteb" = "yes" ];then - AC_DEFINE([ENABLE_NON_SUITEB_CURVES], 1, [Enable all curves]) + +if test "$enable_non_suiteb" = "yes";then + dnl nettle_secp_192r1 is not really a function + AC_CHECK_LIB(hogweed, nettle_secp_192r1,, enable_non_suiteb=no, [$HOGWEED_LIBS]) + + if test "$enable_non_suiteb" = "yes";then + AC_DEFINE([ENABLE_NON_SUITEB_CURVES], 1, [Enable all curves]) + fi fi AM_CONDITIONAL(ENABLE_NON_SUITEB_CURVES, test "$enable_non_suiteb" = "yes") -- cgit v1.2.1