summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-08-25 17:29:48 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-08-25 17:29:50 +0200
commit576e507c78bdd2ec88da442a5354f9dd661b9a8a (patch)
tree66ec49e3f77f890bc4e04ebf3034d1db317fa073 /configure.ac
parent70d010d285315e5f1cad6bdb4953e167b069b692 (diff)
downloadcurl-576e507c78bdd2ec88da442a5354f9dd661b9a8a.tar.gz
configure: if asked to use TLS, fail if no TLS lib was detected
Previously the configure script would just warn about this fact and continue with TLS disabled build which is not always helpful. TLS should be explicitly disabled if that is what the user wants. Closes #9367
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 8 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 7d5750c92..30c881f3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -218,6 +218,8 @@ AS_HELP_STRING([--without-ssl], [build without any TLS library]),[
OPT_OPENSSL=$withval
if test X"$withval" != Xno; then
TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
+ else
+ SSL_DISABLED="D"
fi
])
@@ -1955,11 +1957,11 @@ if test "x$curl_cv_native_windows" = "xyes" &&
LIBS="-lbcrypt $LIBS"
fi
-case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED"
+case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED$SSL_DISABLED"
in
x)
- AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
- AC_MSG_WARN([Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this.])
+ AC_MSG_ERROR([TLS not detected, you will not be able to use HTTPS, FTPS, NTLM and more.
+Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this.])
;;
x1)
# one SSL backend is enabled
@@ -1967,6 +1969,9 @@ x1)
SSL_ENABLED="1"
AC_MSG_NOTICE([built with one SSL backend])
;;
+xD)
+ # explicitly built without TLS
+ ;;
*)
# more than one SSL backend is enabled
AC_SUBST(SSL_ENABLED)