From 0a6ad89984c3312378f9040914de8a0ce37c59dc Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Wed, 28 Apr 2010 19:50:34 +0000 Subject: [PATCH] - Fix detection of gost support in ldns (reported by Chris Smith). git-svn-id: file:///svn/unbound/trunk@2103 be551aaa-1e26-0410-a405-d3ace91eadb9 --- configure | 9 ++++++++- configure.ac | 9 ++++++++- doc/Changelog | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 635e8a4a5..3a3b6d9ba 100755 --- a/configure +++ b/configure @@ -19928,6 +19928,7 @@ if test "${enable_gost+set}" = set; then enableval=$enable_gost; fi +use_gost="no" case "$enable_gost" in yes) { $as_echo "$as_me:$LINENO: checking for EVP_PKEY_set_type_str" >&5 @@ -20023,6 +20024,7 @@ $as_echo "$as_me: error: OpenSSL 1.0.0 is needed for GOST support" >&2;} { (exit 1); exit 1; }; } fi + use_gost="yes" cat >>confdefs.h <<\_ACEOF #define USE_GOST 1 @@ -20118,6 +20120,7 @@ fi $as_echo "$ac_cv_func_EVP_PKEY_set_type_str" >&6; } if test "x$ac_cv_func_EVP_PKEY_set_type_str" = x""yes; then + use_gost="yes" cat >>confdefs.h <<\_ACEOF #define USE_GOST 1 @@ -23729,7 +23732,8 @@ fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_ldns_b32_ntop_extended_hex" >&5 $as_echo "$ac_cv_func_ldns_b32_ntop_extended_hex" >&6; } - { $as_echo "$as_me:$LINENO: checking for ldns_key_EVP_load_gost_id" >&5 + if test x$use_gost = xyes; then + { $as_echo "$as_me:$LINENO: checking for ldns_key_EVP_load_gost_id" >&5 $as_echo_n "checking for ldns_key_EVP_load_gost_id... " >&6; } if test "${ac_cv_func_ldns_key_EVP_load_gost_id+set}" = set; then $as_echo_n "(cached) " >&6 @@ -23815,6 +23819,9 @@ fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_ldns_key_EVP_load_gost_id" >&5 $as_echo "$ac_cv_func_ldns_key_EVP_load_gost_id" >&6; } + else + ac_cv_func_ldns_key_EVP_load_gost_id="yes" + fi for ac_header in ldns/ldns.h do diff --git a/configure.ac b/configure.ac index 6801143cb..6aad73dac 100644 --- a/configure.ac +++ b/configure.ac @@ -419,15 +419,18 @@ case "$enable_sha2" in esac AC_ARG_ENABLE(gost, AC_HELP_STRING([--enable-gost], [Enable GOST support, experimental])) +use_gost="no" case "$enable_gost" in yes) AC_CHECK_FUNC(EVP_PKEY_set_type_str, [:],[AC_MSG_ERROR([OpenSSL 1.0.0 is needed for GOST support])]) + use_gost="yes" AC_DEFINE([USE_GOST], [1], [Define this to enable GOST support.]) ;; no) ;; *) dnl default AC_CHECK_FUNC(EVP_PKEY_set_type_str, [ + use_gost="yes" AC_DEFINE([USE_GOST], [1], [Define this to enable GOST support.])]) ;; esac @@ -627,7 +630,11 @@ if test "$use_ldns_builtin" = "no"; then AC_CHECK_LIB(ldns, ldns_buffer_copy) AC_CHECK_FUNC(ldns_key_buf2rsa_raw) AC_CHECK_FUNC(ldns_b32_ntop_extended_hex) - AC_CHECK_FUNC(ldns_key_EVP_load_gost_id) + if test x$use_gost = xyes; then + AC_CHECK_FUNC(ldns_key_EVP_load_gost_id) + else + ac_cv_func_ldns_key_EVP_load_gost_id="yes" + fi AC_CHECK_HEADERS([ldns/ldns.h],,, [AC_INCLUDES_DEFAULT]) if test $ac_cv_lib_ldns_ldns_buffer_copy = yes \ -a $ac_cv_func_ldns_key_buf2rsa_raw = yes \ diff --git a/doc/Changelog b/doc/Changelog index db870fcc4..e6be106b8 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,7 @@ 28 April 2010: Wouter - ldns tarball updated and GOST support is detected and then enabled. - iana portlist updated. + - Fix detection of gost support in ldns (reported by Chris Smith). 27 April 2010: Wouter - unbound-control get_option domain-insecure shows config file items. -- 2.47.2