]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Don't check for libcrypto if we don't have its headers.
authorGuy Harris <[email protected]>
Mon, 28 Sep 2015 07:41:01 +0000 (00:41 -0700)
committerGuy Harris <[email protected]>
Mon, 28 Sep 2015 07:41:01 +0000 (00:41 -0700)
Thanks, Apple.

configure
configure.in

index 954f1097d05e9222d356445bacb5cec361e1a921..f134ad4610bd57cb419da4443d81910ce7f16e7b 100755 (executable)
--- a/configure
+++ b/configure
@@ -7820,7 +7820,19 @@ $as_echo "yes, if available" >&6; }
 fi
 
 if test "$want_libcrypto" != "no"; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DES_cbc_encrypt in -lcrypto" >&5
+       #
+       # Don't check for libcrypto unless we have its headers;
+       # Apple, bless their pointy little heads, apparently ship
+       # libcrypto as a library, but not the header files, in
+       # El Capitan, probably because they don't want you writing
+       # nasty portable code that could run on other UN*Xes, they
+       # want you writing code that uses their Shiny New Crypto
+       # Library and that only runs on OS X.
+       #
+       ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_crypto_h" = xyes; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DES_cbc_encrypt in -lcrypto" >&5
 $as_echo_n "checking for DES_cbc_encrypt in -lcrypto... " >&6; }
 if ${ac_cv_lib_crypto_DES_cbc_encrypt+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -7865,7 +7877,7 @@ _ACEOF
 
 fi
 
-       for ac_header in openssl/evp.h
+               for ac_header in openssl/evp.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
 if test "x$ac_cv_header_openssl_evp_h" = xyes; then :
@@ -7877,6 +7889,10 @@ fi
 
 done
 
+
+fi
+
+
 fi
 
 # Check for libcap-ng
index d9363af95de1b54fe17acb4982d8c920da34c7f7..d0cd08334e8b4eedb028fb625896d8ed14d00139 100644 (file)
@@ -894,8 +894,20 @@ AC_ARG_WITH(crypto,
        AC_MSG_RESULT([yes, if available])
 ])
 if test "$want_libcrypto" != "no"; then
-       AC_CHECK_LIB(crypto, DES_cbc_encrypt)
-       AC_CHECK_HEADERS(openssl/evp.h)
+       #
+       # Don't check for libcrypto unless we have its headers;
+       # Apple, bless their pointy little heads, apparently ship
+       # libcrypto as a library, but not the header files, in
+       # El Capitan, probably because they don't want you writing
+       # nasty portable code that could run on other UN*Xes, they
+       # want you writing code that uses their Shiny New Crypto
+       # Library and that only runs on OS X.
+       #
+       AC_CHECK_HEADER(openssl/crypto.h,
+       [
+               AC_CHECK_LIB(crypto, DES_cbc_encrypt)
+               AC_CHECK_HEADERS(openssl/evp.h)
+       ])
 fi
 
 # Check for libcap-ng