summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2014-09-17 11:31:49 +0200
committerFrancis Dupont <fdupont@isc.org>2014-09-17 11:31:49 +0200
commitc779a0ef23d2092cf896276dab1fbcb190380374 (patch)
treed908bf54f9a817b896e1369cf5162edde4ab9106 /configure.ac
parent[master] Added ChangeLog entry for #3538. (diff)
downloadkea-c779a0ef23d2092cf896276dab1fbcb190380374.tar.xz
kea-c779a0ef23d2092cf896276dab1fbcb190380374.zip
[trac3482] Check OpenSSL SHA-2 support in configure
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 016b024fb5..79577ea055 100644
--- a/configure.ac
+++ b/configure.ac
@@ -817,6 +817,23 @@ EOF
#CRYPTO_LDFLAGS="-ldl"
CRYPTO_LDFLAGS=""
CRYPTO_RPATH=""
+ dnl Check avaibility of SHA-2
+ AC_MSG_CHECKING([support of SHA-2])
+ LIBS_SAVED=${LIBS}
+ LIBS="$LIBS $CRYPTO_LIBS"
+ CPPFLAGS_SAVED=${CPPFLAGS}
+ CPPFLAGS="$CRYPTO_INCLUDES $CPPFLAGS"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([#include <openssl/evp.h>],
+ [const EVP_MD* h224 = EVP_sha224();
+ const EVP_MD* h256 = EVP_sha256();
+ const EVP_MD* h384 = EVP_sha384();
+ const EVP_MD* h512 = EVP_sha512();
+ ])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_ERROR([missing EVP entry for SHA-2])])
+ LIBS=${LIBS_SAVED}
+ CPPFLAGS=${CPPFLAGS_SAVED}
fi
AM_CONDITIONAL(HAVE_BOTAN, test "$CRYPTO_NAME" = "Botan")