aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand SIMONNET <bsimonnet@google.com>2015-07-06 14:58:49 -0700
committerBertrand SIMONNET <bsimonnet@google.com>2015-07-09 16:29:59 -0700
commitf551028d5caab29d4b4a4ae8c159c76c3cfd4887 (patch)
tree43dd53e13d515bb30361860bdbbff417ab0a58e8
parent92c9b18d6473ffb74904bf9bc51157b8996dff07 (diff)
downloadandroid_external_curl-f551028d5caab29d4b4a4ae8c159c76c3cfd4887.tar.gz
android_external_curl-f551028d5caab29d4b4a4ae8c159c76c3cfd4887.tar.bz2
android_external_curl-f551028d5caab29d4b4a4ae8c159c76c3cfd4887.zip
configure.ac: Fix boringssl detection.
BoringSSL changed since curl started supporting it. In particular: * crypto.h does not contain CRYPTO_add_lock anymore. - replaced by a check for SSLeay. * BoringSSL added DES_set_odd_parity back. - replaced by a check for OPENSSL_IS_BORINGSSL being defined. BUG: 22347561 Change-Id: Idd0abe6d57177faded92a6150a1f6d1f4009a74b
-rw-r--r--configure.ac20
1 files changed, 14 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index accb038..57ac11f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1498,7 +1498,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
],[
LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
- AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
+ AC_CHECK_LIB(crypto, HMAC_Init,[
HAVECRYPTO="yes"
LIBS="-lcrypto $LIBS"], [
LDFLAGS="$CLEANLDFLAGS"
@@ -1591,14 +1591,22 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
DES_set_odd_parity )
AC_MSG_CHECKING([for BoringSSL])
- if test "x$ac_cv_func_DES_set_odd_parity" != "xyes"; then
- curl_ssl_msg="enabled (BoringSSL)"
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+#include <openssl/base.h>
+ ]],[[
+#ifndef OPENSSL_IS_BORINGSSL
+#error not boringssl
+#endif
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
[Define to 1 if using BoringSSL.])
- AC_MSG_RESULT([yes])
- else
+ ],[
AC_MSG_RESULT([no])
- fi
+ ])
+
AC_MSG_CHECKING([for libressl])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[