diff options
author | Alessandro Ghedini <ghedo@debian.org> | 2019-07-12 20:16:40 +0100 |
---|---|---|
committer | Alessandro Ghedini <ghedo@debian.org> | 2019-07-12 20:16:40 +0100 |
commit | b10ac967894740f12278c3918fe7d94394225740 (patch) | |
tree | 772c5b0efc5973a41ba5920d9d7bf31f00cac5f0 /configure.ac | |
parent | 6a4d7f25b9ff57641a0c24d03488ac5b1e95ec5c (diff) |
New upstream version 7.65.1
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 308 |
1 files changed, 174 insertions, 134 deletions
diff --git a/configure.ac b/configure.ac index e9f0ef75..4cd2cb81 100755 --- a/configure.ac +++ b/configure.ac @@ -155,7 +155,7 @@ AC_SUBST(PKGADD_VENDOR) dnl dnl initialize all the info variables - curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,mbedtls,cyassl,winssl,darwinssl,mesalink} )" + curl_ssl_msg="no (--with-{ssl,gnutls,nss,mbedtls,cyassl,schannel,secure-transport,mesalink,amissl} )" curl_ssh_msg="no (--with-libssh2)" curl_zlib_msg="no (--with-zlib)" curl_brotli_msg="no (--with-brotli)" @@ -365,6 +365,7 @@ CURL_CHECK_WIN32_LARGEFILE CURL_MAC_CFLAGS CURL_SUPPORTS_BUILTIN_AVAILABLE + dnl ************************************************************ dnl switch off particular protocols dnl @@ -839,6 +840,28 @@ fi if test "$HAVE_GETHOSTBYNAME" != "1" then + dnl This is for AmigaOS with bsdsocket.library - needs testing before -lnet + AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#include <proto/bsdsocket.h> +struct Library *SocketBase = NULL; + ]],[[ + gethostbyname("www.dummysite.com"); + ]]) + ],[ + AC_MSG_RESULT([yes]) + HAVE_GETHOSTBYNAME="1" + HAVE_PROTO_BSDSOCKET_H="1" + AC_DEFINE(HAVE_PROTO_BSDSOCKET_H, 1, [if Amiga bsdsocket.library is in use]) + AC_SUBST(HAVE_PROTO_BSDSOCKET_H, [1]) + ],[ + AC_MSG_RESULT([no]) + ]) +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then dnl gethostbyname in the network lib - for Haiku OS AC_CHECK_LIB(network, gethostbyname, [HAVE_GETHOSTBYNAME="1" @@ -1509,22 +1532,27 @@ else AC_MSG_RESULT(no) fi -OPT_DARWINSSL=no +OPT_SECURETRANSPORT=no AC_ARG_WITH(darwinssl,dnl AC_HELP_STRING([--with-darwinssl],[enable Apple OS native SSL/TLS]) AC_HELP_STRING([--without-darwinssl], [disable Apple OS native SSL/TLS]), - OPT_DARWINSSL=$withval) + OPT_SECURETRANSPORT=$withval) -AC_MSG_CHECKING([whether to enable Apple OS native SSL/TLS]) -if test -z "$ssl_backends" -o "x$OPT_DARWINSSL" != xno; then - if test "x$OPT_DARWINSSL" != "xno" && +AC_ARG_WITH(secure-transport,dnl +AC_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS]) +AC_HELP_STRING([--without-secure-transport], [disable Apple OS native SSL/TLS]), + OPT_SECURETRANSPORT=$withval) + +AC_MSG_CHECKING([whether to enable Secure Transport]) +if test -z "$ssl_backends" -o "x$OPT_SECURETRANSPORT" != xno; then + if test "x$OPT_SECURETRANSPORT" != "xno" && test -d "/System/Library/Frameworks/Security.framework"; then AC_MSG_RESULT(yes) - AC_DEFINE(USE_DARWINSSL, 1, [to enable Apple OS native SSL/TLS support]) - AC_SUBST(USE_DARWINSSL, [1]) - ssl_msg="Apple OS-native" - test darwinssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes - DARWINSSL_ENABLED=1 + AC_DEFINE(USE_SECTRANSP, 1, [enable Secure Transport]) + AC_SUBST(USE_SECTRANSP, [1]) + ssl_msg="Secure Transport" + test secure-transport != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + SECURETRANSPORT_ENABLED=1 LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security" else AC_MSG_RESULT(no) @@ -1534,6 +1562,35 @@ else AC_MSG_RESULT(no) fi +OPT_AMISSL=no +AC_ARG_WITH(amissl,dnl +AC_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]) +AC_HELP_STRING([--without-amissl], [disable Amiga native SSL/TLS (AmiSSL)]), + OPT_AMISSL=$withval) + +AC_MSG_CHECKING([whether to enable Amiga native SSL/TLS (AmiSSL)]) +if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then + if test -z "$ssl_backends" -o "x$OPT_AMISSL" != xno; then + ssl_msg= + if test "x$OPT_AMISSL" != "xno"; then + AC_MSG_RESULT(yes) + ssl_msg="AmiSSL" + test amissl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + AMISSL_ENABLED=1 + LIBS="-lamisslauto $LIBS" + AC_DEFINE(USE_AMISSL, 1, [if AmiSSL is in use]) + AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]) + else + AC_MSG_RESULT(no) + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" + else + AC_MSG_RESULT(no) + fi +else + AC_MSG_RESULT(no) +fi + dnl ********************************************************************** dnl Check for the presence of SSL libraries and headers dnl ********************************************************************** @@ -1832,6 +1889,14 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno && test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi +if test X"$OPT_SSL" != Xoff && + test X"$OPT_SSL" != Xno && + test "$OPENSSL_ENABLED" != "1"; then + AC_MSG_NOTICE([OPT_SSL: $OPT_SSL]) + AC_MSG_NOTICE([OPENSSL_ENABLED: $OPENSSL_ENABLED]) + AC_MSG_ERROR([--with-ssl was given but OpenSSL could not be detected]) +fi + dnl ********************************************************************** dnl Check for the random seed preferences dnl ********************************************************************** @@ -2054,98 +2119,6 @@ if test "$GNUTLS_ENABLED" = "1"; then fi dnl ---------------------------------------------------- -dnl check for PolarSSL -dnl ---------------------------------------------------- - -dnl Default to compiler & linker defaults for PolarSSL files & libraries. -OPT_POLARSSL=no - -_cppflags=$CPPFLAGS -_ldflags=$LDFLAGS -AC_ARG_WITH(polarssl,dnl -AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root]) -AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]), - OPT_POLARSSL=$withval) - -if test -z "$ssl_backends" -o "x$OPT_POLARSSL" != xno; then - ssl_msg= - - if test X"$OPT_POLARSSL" != Xno; then - - if test "$OPT_POLARSSL" = "yes"; then - OPT_POLARSSL="" - fi - - if test -z "$OPT_POLARSSL" ; then - dnl check for lib first without setting any new path - - AC_CHECK_LIB(polarssl, havege_init, - dnl libpolarssl found, set the variable - [ - AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled]) - AC_SUBST(USE_POLARSSL, [1]) - POLARSSL_ENABLED=1 - USE_POLARSSL="yes" - ssl_msg="PolarSSL" - test polarssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes - ]) - fi - - addld="" - addlib="" - addcflags="" - polarssllib="" - - if test "x$USE_POLARSSL" != "xyes"; then - dnl add the path and test again - addld=-L$OPT_POLARSSL/lib$libsuff - addcflags=-I$OPT_POLARSSL/include - polarssllib=$OPT_POLARSSL/lib$libsuff - - LDFLAGS="$LDFLAGS $addld" - if test "$addcflags" != "-I/usr/include"; then - CPPFLAGS="$CPPFLAGS $addcflags" - fi - - AC_CHECK_LIB(polarssl, ssl_init, - [ - AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled]) - AC_SUBST(USE_POLARSSL, [1]) - POLARSSL_ENABLED=1 - USE_POLARSSL="yes" - ssl_msg="PolarSSL" - test polarssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes - ], - [ - CPPFLAGS=$_cppflags - LDFLAGS=$_ldflags - ]) - fi - - if test "x$USE_POLARSSL" = "xyes"; then - AC_MSG_NOTICE([detected PolarSSL]) - check_for_ca_bundle=1 - LIBS="-lpolarssl $LIBS" - - if test -n "$polarssllib"; then - dnl when shared libs were found in a path that the run-time - dnl linker doesn't search through, we need to add it to - dnl CURL_LIBRARY_PATH to prevent further configure tests to fail - dnl due to this - if test "x$cross_compiling" != "xyes"; then - CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$polarssllib" - export CURL_LIBRARY_PATH - AC_MSG_NOTICE([Added $polarssllib to CURL_LIBRARY_PATH]) - fi - fi - fi - - fi dnl PolarSSL not disabled - - test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" -fi - -dnl ---------------------------------------------------- dnl check for mbedTLS dnl ---------------------------------------------------- @@ -2384,7 +2357,6 @@ if test -z "$ssl_backends" -o "x$OPT_CYASSL" != xno; then dnl Recent WolfSSL versions build without SSLv3 by default dnl WolfSSL needs configure --enable-opensslextra to have *get_peer* AC_CHECK_FUNCS(wolfSSLv3_client_method \ - wolfSSL_CTX_UseSupportedCurve \ wolfSSL_get_peer_certificate \ wolfSSL_UseALPN) else @@ -2634,10 +2606,10 @@ if test -z "$ssl_backends" -o "x$OPT_NSS" != xno; then test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi -case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$MBEDTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED$MESALINK_ENABLED" in +case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$AMISSL_ENABLED" in x) AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.]) - AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-winssl, --with-darwinssl, or --with-mesalink to address this.]) + AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-cyassl, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink or --with-amissl to address this.]) ;; x1) # one SSL backend is enabled @@ -2692,7 +2664,7 @@ AC_ARG_WITH(libpsl, with_libpsl=yes) if test $with_libpsl != "no"; then AC_SEARCH_LIBS(psl_builtin, psl, - [curl_psl_msg="yes"; + [curl_psl_msg="enabled"; AC_DEFINE([USE_LIBPSL], [1], [PSL support enabled]) ], [curl_psl_msg="no (libpsl not found)"; @@ -2700,7 +2672,7 @@ if test $with_libpsl != "no"; then ] ) fi -AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "yes"]) +AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"]) dnl ********************************************************************** dnl Check for libmetalink @@ -3061,14 +3033,12 @@ AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shar versioned_symbols_flavour="GNUTLS_" elif test "x$NSS_ENABLED" = "x1"; then versioned_symbols_flavour="NSS_" - elif test "x$POLARSSL_ENABLED" = "x1"; then - versioned_symbols_flavour="POLARSSL_" elif test "x$CYASSL_ENABLED" = "x1"; then versioned_symbols_flavour="CYASSL_" elif test "x$WINSSL_ENABLED" = "x1"; then - versioned_symbols_flavour="WINSSL_" - elif test "x$DARWINSSL_ENABLED" = "x1"; then - versioned_symbols_flavour="DARWINSSL_" + versioned_symbols_flavour="SCHANNEL_" + elif test "x$SECURETRANSPORT_ENABLED" = "x1"; then + versioned_symbols_flavour="SECURE_TRANSPORT_" else versioned_symbols_flavour="" fi @@ -3409,6 +3379,36 @@ case "$OPT_ZSH_FPATH" in esac dnl ********************************************************************** +dnl Check for fish completion path +dnl ********************************************************************** + +OPT_FISH_FPATH=default +AC_ARG_WITH(fish-functions-dir, +AC_HELP_STRING([--with-fish-functions-dir=PATH],[Install fish completions to PATH]) +AC_HELP_STRING([--without-fish-functions-dir],[Do not install fish completions]), + [OPT_FISH_FPATH=$withval]) +case "$OPT_FISH_FPATH" in + no) + dnl --without-fish-functions-dir option used + ;; + default|yes) + dnl --with-fish-functions-dir option used without path + CURL_CHECK_PKGCONFIG(fish) + if test "$PKGCONFIG" != "no" ; then + FISH_FUNCTIONS_DIR="$($PKGCONFIG --variable completionsdir fish)" + else + FISH_FUNCTIONS_DIR="$datarootdir/fish/vendor_completions.d" + fi + AC_SUBST(FISH_FUNCTIONS_DIR) + ;; + *) + dnl --with-fish-functions-dir option used with path + FISH_FUNCTIONS_DIR="$withval" + AC_SUBST(FISH_FUNCTIONS_DIR) + ;; +esac + +dnl ********************************************************************** dnl Back to "normal" configuring dnl ********************************************************************** @@ -3493,6 +3493,7 @@ dnl default includes ] ) + dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST CURL_CHECK_VARIADIC_MACROS @@ -3613,7 +3614,6 @@ CURL_CHECK_FUNC_CLOSESOCKET CURL_CHECK_FUNC_CLOSESOCKET_CAMEL CURL_CHECK_FUNC_CONNECT CURL_CHECK_FUNC_FCNTL -CURL_CHECK_FUNC_FDOPEN CURL_CHECK_FUNC_FREEADDRINFO CURL_CHECK_FUNC_FREEIFADDRS CURL_CHECK_FUNC_FSETXATTR @@ -3625,6 +3625,9 @@ CURL_CHECK_FUNC_GETHOSTBYADDR_R CURL_CHECK_FUNC_GETHOSTBYNAME CURL_CHECK_FUNC_GETHOSTBYNAME_R CURL_CHECK_FUNC_GETHOSTNAME +CURL_CHECK_FUNC_GETPEERNAME +CURL_CHECK_FUNC_GETSOCKNAME +CURL_CHECK_FUNC_IF_NAMETOINDEX CURL_CHECK_FUNC_GETIFADDRS CURL_CHECK_FUNC_GETSERVBYPORT_R CURL_CHECK_FUNC_GMTIME_R @@ -4035,6 +4038,32 @@ AC_HELP_STRING([--disable-cookies],[Disable cookies support]), ) dnl ************************************************************ +dnl switch on/off alt-svc +dnl +curl_altsvc_msg="no (--enable-alt-svc)"; +AC_MSG_CHECKING([whether to support alt-svc]) +AC_ARG_ENABLE(alt-svc, +AC_HELP_STRING([--enable-alt-svc],[Enable alt-svc support]) +AC_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT(yes) + curl_altsvc_msg="enabled"; + enable_altsvc="yes" + experimental="alt-svc" + ;; + esac ], + AC_MSG_RESULT(no) +) + +if test "$enable_altsvc" = "yes"; then + AC_DEFINE(USE_ALTSVC, 1, [to enable alt-svc]) + experimental="alt-svc" +fi + +dnl ************************************************************ dnl hiding of library internal symbols dnl CURL_CONFIGURE_SYMBOL_HIDING @@ -4103,10 +4132,14 @@ if test "x$HAVE_GSSAPI" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API" fi -if test "x$curl_psl_msg" = "xyes"; then +if test "x$curl_psl_msg" = "xenabled"; then SUPPORT_FEATURES="$SUPPORT_FEATURES PSL" fi +if test "x$enable_altsvc" = "xyes"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc" +fi + if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \ \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO" @@ -4120,7 +4153,7 @@ fi if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then if test "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \ -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \ - -o "x$NSS_ENABLED" = "x1" -o "x$DARWINSSL_ENABLED" = "x1"; then + -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM" if test "x$CURL_DISABLE_HTTP" != "x1" -a \ @@ -4202,7 +4235,7 @@ if test "x$CURL_DISABLE_SMB" != "x1" \ -a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \ -a \( "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \ -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \ - -o "x$NSS_ENABLED" = "x1" -o "x$DARWINSSL_ENABLED" = "x1" \); then + -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1" \); then SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB" if test "x$SSL_ENABLED" = "x1"; then SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS" @@ -4302,31 +4335,38 @@ AC_MSG_NOTICE([Configured to build curl/libcurl: LIBS: ${LIBS} curl version: ${CURLVERSION} - SSL support: ${curl_ssl_msg} - SSH support: ${curl_ssh_msg} - zlib support: ${curl_zlib_msg} - brotli support: ${curl_brotli_msg} - GSS-API support: ${curl_gss_msg} - TLS-SRP support: ${curl_tls_srp_msg} + SSL: ${curl_ssl_msg} + SSH: ${curl_ssh_msg} + zlib: ${curl_zlib_msg} + brotli: ${curl_brotli_msg} + GSS-API: ${curl_gss_msg} + TLS-SRP: ${curl_tls_srp_msg} resolver: ${curl_res_msg} - IPv6 support: ${curl_ipv6_msg} - Unix sockets support: ${curl_unix_sockets_msg} - IDN support: ${curl_idn_msg} + IPv6: ${curl_ipv6_msg} + Unix sockets: ${curl_unix_sockets_msg} + IDN: ${curl_idn_msg} Build libcurl: Shared=${enable_shared}, Static=${enable_static} Built-in manual: ${curl_manual_msg} --libcurl option: ${curl_libcurl_msg} Verbose errors: ${curl_verbose_msg} Code coverage: ${curl_coverage_msg} - SSPI support: ${curl_sspi_msg} + SSPI: ${curl_sspi_msg} ca cert bundle: ${ca}${ca_warning} ca cert path: ${capath}${capath_warning} ca fallback: ${with_ca_fallback} - LDAP support: ${curl_ldap_msg} - LDAPS support: ${curl_ldaps_msg} - RTSP support: ${curl_rtsp_msg} - RTMP support: ${curl_rtmp_msg} - metalink support: ${curl_mtlnk_msg} - PSL support: ${curl_psl_msg} - HTTP2 support: ${curl_h2_msg} + LDAP: ${curl_ldap_msg} + LDAPS: ${curl_ldaps_msg} + RTSP: ${curl_rtsp_msg} + RTMP: ${curl_rtmp_msg} + Metalink: ${curl_mtlnk_msg} + PSL: ${curl_psl_msg} + Alt-svc: ${curl_altsvc_msg} + HTTP2: ${curl_h2_msg} Protocols: ${SUPPORT_PROTOCOLS} + Features: ${SUPPORT_FEATURES} ]) +if test -n "$experimental"; then + cat >&2 << _EOF + WARNING: $experimental is enabled but marked EXPERIMENTAL. Use with caution! +_EOF +fi |