apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1389126 - /apr/apr/trunk/build/crypto.m4
Date Sun, 23 Sep 2012 19:18:45 GMT
Author: trawick
Date: Sun Sep 23 19:18:44 2012
New Revision: 1389126

URL: http://svn.apache.org/viewvc?rev=1389126&view=rev
Log:
if no crypto library is specified in conjuction with --with-crypto, autodetect supported libraries

Modified:
    apr/apr/trunk/build/crypto.m4

Modified: apr/apr/trunk/build/crypto.m4
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/crypto.m4?rev=1389126&r1=1389125&r2=1389126&view=diff
==============================================================================
--- apr/apr/trunk/build/crypto.m4 (original)
+++ apr/apr/trunk/build/crypto.m4 Sun Sep 23 19:18:44 2012
@@ -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
   ], [



Mime
View raw message