]> granicus.if.org Git - curl/commitdiff
configure: fix BoringSSL detection and detect libresssl
authorDaniel Stenberg <daniel@haxx.se>
Thu, 22 Jan 2015 21:51:17 +0000 (22:51 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 22 Jan 2015 21:52:53 +0000 (22:52 +0100)
configure.ac

index 2cfe7dd75481d722cabdce2b748d751ff79f4b75..61968b942dc596a7af0423bd8247a8b2bba6cb5e 100644 (file)
@@ -1615,12 +1615,27 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
       AC_MSG_RESULT([no])
     ])
     AC_MSG_CHECKING([for BoringSSL])
-    if test "x$ac_cv_func_des_set_odd_parity" != "xyes"; then
+    if test "x$ac_cv_func_DES_set_odd_parity" != "xyes"; then
       curl_ssl_msg="enabled (BoringSSL)"
       AC_MSG_RESULT([yes])
     else
       AC_MSG_RESULT([no])
     fi
+    AC_MSG_CHECKING([for libressl])
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM([[
+#include <openssl/opensslv.h>
+      ]],[[
+        int dummy = LIBRESSL_VERSION_NUMBER;
+      ]])
+    ],[
+      AC_MSG_RESULT([yes])
+      AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1,
+        [Define to 1 if using libressl.])
+      curl_ssl_msg="enabled (libressl)"
+    ],[
+      AC_MSG_RESULT([no])
+    ])
   fi
 
   if test "$OPENSSL_ENABLED" = "1"; then