diff configure.ac @ 5874:3ed83b4b4882

Fix unintended default of TLS to OpenSSL.
author Stephen J. Turnbull <stephen@xemacs.org>
date Sat, 21 Mar 2015 00:15:17 +0900
parents 83e5c3cd6be6
children abe88cd200c9
line wrap: on
line diff
--- a/configure.ac	Fri Mar 20 13:48:16 2015 +0000
+++ b/configure.ac	Sat Mar 21 00:15:17 2015 +0900
@@ -5380,6 +5380,9 @@
     [XE_DIE("Required openssl support cannot be provided.")])
 fi
 dnl Autodetection
+dnl Must be requested explicitly with --with-tls.
+dnl To default to autodetection, change the next three tests to
+dnl if test "$with_tls" != "no".
 if test "$with_tls" = "yes"; then
   AC_CHECK_HEADER([gnutls/gnutls.h],
     [AC_CHECK_LIB(gnutls, gnutls_global_init, [with_tls=gnutls])])
@@ -5393,7 +5396,6 @@
     [AC_CHECK_LIB(ssl, SSL_library_init, [with_tls=openssl], [with_tls=no])])
 fi
 if test "$with_tls" != "no"; then
-  AC_DEFINE(WITH_TLS)
   if test "$with_tls" = "gnutls"; then
     AC_DEFINE(HAVE_GNUTLS)
     gnutls_cflags=`pkg-config --cflags gnutls`
@@ -5418,7 +5420,7 @@
     if test "$?" = 0; then
       XE_APPEND("$nss_libs", LIBS)
     fi
-  else
+  elif test "$with_tls" = "openssl"; then
     AC_DEFINE(HAVE_OPENSSL)
     openssl_cflags=`pkg-config --cflags openssl`
     if test "$?" = 0; then
@@ -5429,8 +5431,13 @@
       XE_APPEND("$openssl_libs", LIBS)
     fi
     AC_CHECK_FUNC(X509_check_host, [AC_DEFINE(HAVE_X509_CHECK_HOST)])
+  else
+    with_tls=no
   fi
 fi
+if test "$with_tls" != "no"; then
+  AC_DEFINE(WITH_TLS)
+fi
 
 dnl Unfortunately, just because we can link doesn't mean we can run.
 dnl One of the above link tests may have succeeded but caused resulting