]> granicus.if.org Git - libevent/commitdiff
autotools: confirm openssl is working before using
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Tue, 29 Aug 2017 07:44:57 +0000 (00:44 -0700)
committerAzat Khuzhin <a3at.mail@gmail.com>
Sun, 10 Sep 2017 22:17:59 +0000 (01:17 +0300)
latest versions of macOS provide pkg-config and libraries for an ancient
version of openssl as part of the system, but no headers

m4/libevent_openssl.m4

index c20405950319e73ebe4367e7f3817b4e66178720..7b4581340552cc56fae16e482478145b0b5ff977 100644 (file)
@@ -39,6 +39,10 @@ case "$enable_openssl" in
        done
        ;;
     esac
+    CPPFLAGS_SAVE=$CPPFLAGS
+    CPPFLAGS+=$OPENSSL_INCS
+    AC_CHECK_HEADERS([openssl/ssl.h], [], [have_openssl=no])
+    CPPFLAGS=$CPPFLAGS_SAVE
     AC_SUBST(OPENSSL_INCS)
     AC_SUBST(OPENSSL_LIBS)
     case "$have_openssl" in