Browse code

Fix ENABLE_CRYPTO_OPENSSL set to YES even with --disable-crypto set

On OS X openssl/x509.h is not in the standard include path and the
files still try to include since the includes only depend on on
ENABLE_CRYPTO_OPENSSL.

Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1474111006-16401-1-git-send-email-arne@rfc2549.org>
URL: http://www.mail-archive.com/search?l=mid&q=1474111006-16401-1-git-send-email-arne@rfc2549.org

Signed-off-by: Gert Doering <gert@greenie.muc.de>

Arne Schwabe authored on 2016/09/17 20:16:46
Showing 1 changed files
... ...
@@ -790,7 +790,7 @@ PKG_CHECK_MODULES(
790 790
 	[]
791 791
 )
792 792
 
793
-if test "${with_crypto_library}" = "openssl"; then
793
+if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then
794 794
 	AC_ARG_VAR([OPENSSL_CFLAGS], [C compiler flags for OpenSSL])
795 795
 	AC_ARG_VAR([OPENSSL_LIBS], [linker flags for OpenSSL])
796 796
 
... ...
@@ -844,7 +844,7 @@ if test "${with_crypto_library}" = "openssl"; then
844 844
 	AC_DEFINE([ENABLE_CRYPTO_OPENSSL], [1], [Use OpenSSL library])
845 845
 	CRYPTO_CFLAGS="${OPENSSL_CFLAGS}"
846 846
 	CRYPTO_LIBS="${OPENSSL_LIBS}"
847
-elif test "${with_crypto_library}" = "mbedtls"; then
847
+elif test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "mbedtls"; then
848 848
 	AC_ARG_VAR([MBEDTLS_CFLAGS], [C compiler flags for mbedtls])
849 849
 	AC_ARG_VAR([MBEDTLS_LIBS], [linker flags for mbedtls])
850 850
 
... ...
@@ -927,7 +927,7 @@ elif test "${with_crypto_library}" = "mbedtls"; then
927 927
 	AC_DEFINE([ENABLE_CRYPTO_MBEDTLS], [1], [Use mbed TLS library])
928 928
 	CRYPTO_CFLAGS="${MBEDTLS_CFLAGS}"
929 929
 	CRYPTO_LIBS="${MBEDTLS_LIBS}"
930
-else
930
+elif test "${enable_crypto}" = "yes"; then
931 931
 	AC_MSG_ERROR([Invalid crypto library: ${with_crypto_library}])
932 932
 fi
933 933