gost detect works.

git-svn-id: file:///svn/unbound/trunk@2516 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2011-10-19 12:40:20 +00:00
parent 01027a8322
commit d66ff13f9c

View file

@ -496,6 +496,22 @@ case "$enable_sha2" in
;;
esac
# check wether gost also works
AC_DEFUN([AC_CHECK_GOST_WORKS],
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING(whether gost works)
if test c${cross_compiling} = cno; then
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <openssl/engine.h>
int main(void) {
return 0; }
]])] , [eval "ac_cv_c_gost_works=yes"], [eval "ac_cv_c_gost_works=no"])
else
eval "ac_cv_c_gost_works=maybe"
fi
AC_MSG_RESULT($ac_cv_c_gost_works)
])dnl
AC_ARG_ENABLE(gost, AC_HELP_STRING([--disable-gost], [Disable GOST support]))
use_gost="no"
case "$enable_gost" in
@ -504,8 +520,11 @@ case "$enable_gost" in
*)
AC_CHECK_FUNC(EVP_PKEY_set_type_str, [:],[AC_MSG_ERROR([OpenSSL 1.0.0 is needed for GOST support])])
AC_CHECK_FUNC(EC_KEY_new, [], [AC_MSG_ERROR([OpenSSL does not support ECC, needed for GOST support])])
use_gost="yes"
AC_DEFINE([USE_GOST], [1], [Define this to enable GOST support.])
AC_CHECK_GOST_WORKS
if test $ac_cv_c_gost_works != no; then
use_gost="yes"
AC_DEFINE([USE_GOST], [1], [Define this to enable GOST support.])
fi
;;
esac