diff options
author | Jeff Trawick <trawick@apache.org> | 2012-09-23 19:18:44 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2012-09-23 19:18:44 +0000 |
commit | a03739438ccaae5b657767ee83020d1702f7ef0c (patch) | |
tree | f1e1485a0cb77354cdda887acbdae586564dfa8d /build/crypto.m4 | |
parent | b66c16f960f741fcc7f26b2f30947e1e18531073 (diff) | |
download | apr-a03739438ccaae5b657767ee83020d1702f7ef0c.tar.gz |
if no crypto library is specified in conjuction with --with-crypto, autodetect supported libraries
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1389126 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/crypto.m4')
-rw-r--r-- | build/crypto.m4 | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/build/crypto.m4 b/build/crypto.m4 index 8ed889efd..2343d4834 100644 --- a/build/crypto.m4 +++ b/build/crypto.m4 @@ -33,11 +33,26 @@ AC_DEFUN([APU_CHECK_CRYPTO], [ AC_ARG_WITH([crypto], [APR_HELP_STRING([--with-crypto], [enable crypto support])], [ if test "$withval" = "yes"; then + + crypto_library_enabled=0 + for cryptolib in openssl nss; do + eval v=\$with_$cryptolib + if test "$v" != "" -a "$v" != "no"; then + crypto_library_enabled=1 + fi + done + + if test "$crypto_library_enabled" = "0"; then + AC_MSG_NOTICE(Crypto was requested but no crypto library was found; autodetecting available libraries) + with_openssl=yes + with_nss=yes + fi + APU_CHECK_CRYPTO_OPENSSL APU_CHECK_CRYPTO_NSS dnl add checks for other varieties of ssl here if test "$apu_have_crypto" = "0"; then - AC_ERROR(Crypto was requested but no crypto library was enabled) + AC_ERROR(Crypto was requested but no crypto library was found; specify the location of a crypto library using --with-openssl, --with-nss, etc.) fi fi ], [ |