aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-08-22 00:05:03 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-08-22 00:08:03 +0200
commit2c12ac8de232366995a2777e6d638ab1bdb37c93 (patch)
tree87c214f6970fb37bb2155142e514f1d4ba45cc3a /configure.ac
parent30aa38c818e51ad4ad135e2550f3e3356dd19818 (diff)
configure: detect latest boringssl
Since boringssl brought back DES_set_odd_parity again, it cannot be used to differentiate from boringssl. Using the OPENSSL_IS_BORINGSSL define seems better anyway. URL: https://android.googlesource.com/platform/external/curl/+/f551028d5caab29d4b4a4ae8c159c76c3cfd4887%5E!/ Original-patch-by: Bertrand Simonnet Closes #393
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 18 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index e9ac17f1b..d269210ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1620,7 +1620,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
dnl Older versions of Cyassl (some time before 2.9.4) don't have
dnl SSL_get_shutdown (but this check won't actually detect it there
dnl as it's a macro that needs the header files be included)
- dnl BoringSSL doesn't have DES_set_odd_parity
+ dnl BoringSSL didn't have DES_set_odd_parity for a while but now it is
+ dnl back again.
AC_CHECK_FUNCS( RAND_status \
RAND_screen \
@@ -1632,14 +1633,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_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
- [Define to 1 if using BoringSSL.])
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
+ 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([no])
+ ])
+
AC_MSG_CHECKING([for libressl])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[