summaryrefslogtreecommitdiff
path: root/build/crypto.m4
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2012-09-23 19:18:44 +0000
committerJeff Trawick <trawick@apache.org>2012-09-23 19:18:44 +0000
commita03739438ccaae5b657767ee83020d1702f7ef0c (patch)
treef1e1485a0cb77354cdda887acbdae586564dfa8d /build/crypto.m4
parentb66c16f960f741fcc7f26b2f30947e1e18531073 (diff)
downloadapr-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.m417
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
], [