2005-12-20 12:02:36 +03:00
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
2023-01-02 15:51:48 +03:00
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
2005-12-20 12:02:36 +03:00
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
2020-11-04 16:02:01 +03:00
# are also available at https://curl.se/docs/copyright.html.
2005-12-20 12:02:36 +03:00
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
2003-03-25 18:54:06 +03:00
# SPDX-License-Identifier: curl
2022-05-17 12:16:50 +03:00
#
2008-07-26 16:11:22 +04:00
#***************************************************************************
1999-12-29 17:20:26 +03:00
dnl Process this file with autoconf to produce a configure script.
2001-10-23 11:54:16 +04:00
2021-03-15 19:32:26 +03:00
AC_PREREQ(2.59)
2001-10-23 11:54:16 +04:00
2007-11-30 05:31:07 +03:00
dnl We don't know the version number "statically" so we use a dash here
2020-11-04 16:02:01 +03:00
AC_INIT([curl], [-], [a suitable curl mailing list: https://curl.se/mail/])
2003-03-25 18:54:06 +03:00
2011-12-15 21:01:00 +04:00
XC_OVR_ZZ50
2013-01-14 07:28:56 +04:00
XC_OVR_ZZ60
2008-11-16 05:23:18 +03:00
CURL_OVERRIDE_AUTOCONF
2003-03-25 18:54:06 +03:00
dnl configure script copyright
2023-01-02 15:51:48 +03:00
AC_COPYRIGHT([Copyright (C) Daniel Stenberg, <daniel@haxx.se>
2007-08-20 23:30:25 +04:00
This configure script may be copied, distributed and modified under the
2003-03-25 18:54:06 +03:00
terms of the curl license; see COPYING for more details])
2013-01-04 05:50:28 +04:00
AC_CONFIG_SRCDIR([lib/urldata.h])
2017-05-22 10:05:10 +03:00
AC_CONFIG_HEADERS(lib/curl_config.h)
2011-03-27 06:36:14 +04:00
AC_CONFIG_MACRO_DIR([m4])
2002-12-20 18:54:24 +03:00
AM_MAINTAINER_MODE
2015-10-07 15:56:07 +03:00
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
2000-10-23 17:56:12 +04:00
2008-10-02 07:56:55 +04:00
CURL_CHECK_OPTION_DEBUG
2024-05-20 15:21:05 +03:00
AM_CONDITIONAL(DEBUGBUILD, test x$want_debug = xyes)
2008-10-07 17:13:34 +04:00
CURL_CHECK_OPTION_OPTIMIZE
2008-10-02 07:56:55 +04:00
CURL_CHECK_OPTION_WARNINGS
2010-07-19 20:07:09 +04:00
CURL_CHECK_OPTION_WERROR
2009-06-09 21:59:28 +04:00
CURL_CHECK_OPTION_CURLDEBUG
2012-04-11 21:33:54 +04:00
CURL_CHECK_OPTION_SYMBOL_HIDING
2010-01-26 18:07:40 +03:00
CURL_CHECK_OPTION_ARES
2015-07-23 12:38:49 +03:00
CURL_CHECK_OPTION_RT
2024-04-04 16:23:35 +03:00
CURL_CHECK_OPTION_HTTPSRR
2020-09-29 11:13:18 +03:00
CURL_CHECK_OPTION_ECH
2008-10-02 07:56:55 +04:00
2013-01-28 04:08:15 +04:00
XC_CHECK_PATH_SEPARATOR
2009-11-14 22:23:26 +03:00
#
# save the configure arguments
#
CONFIGURE_OPTIONS="\"$ac_configure_args\""
AC_SUBST(CONFIGURE_OPTIONS)
2008-07-04 08:03:55 +04:00
dnl SED is mandatory for configure process and libtool.
2008-07-28 02:25:07 +04:00
dnl Set it now, allowing it to be changed later.
2010-07-12 20:39:40 +04:00
if test -z "$SED"; then
dnl allow it to be overridden
AC_PATH_PROG([SED], [sed], [not_found],
[$PATH:/usr/bin:/usr/local/bin])
if test -z "$SED" || test "$SED" = "not_found"; then
AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
fi
2008-07-02 21:42:08 +04:00
fi
2008-07-28 03:43:53 +04:00
AC_SUBST([SED])
2003-03-12 16:42:07 +03:00
2008-07-04 08:03:55 +04:00
dnl GREP is mandatory for configure process and libtool.
2008-07-28 02:25:07 +04:00
dnl Set it now, allowing it to be changed later.
2010-07-12 20:39:40 +04:00
if test -z "$GREP"; then
dnl allow it to be overridden
AC_PATH_PROG([GREP], [grep], [not_found],
[$PATH:/usr/bin:/usr/local/bin])
if test -z "$GREP" || test "$GREP" = "not_found"; then
AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
fi
2008-07-04 08:03:55 +04:00
fi
2008-07-28 03:43:53 +04:00
AC_SUBST([GREP])
2008-07-04 08:03:55 +04:00
2022-09-11 01:10:26 +03:00
dnl 'grep -E' is mandatory for configure process and libtool.
2008-07-28 02:25:07 +04:00
dnl Set it now, allowing it to be changed later.
2010-07-12 20:39:40 +04:00
if test -z "$EGREP"; then
dnl allow it to be overridden
2022-09-11 01:10:26 +03:00
AC_MSG_CHECKING([that grep -E works])
2010-07-12 20:39:40 +04:00
if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
EGREP="$GREP -E"
2022-09-11 01:10:26 +03:00
AC_MSG_RESULT([yes])
2010-07-12 20:39:40 +04:00
else
2022-09-11 01:10:26 +03:00
AC_MSG_RESULT([no])
2010-07-12 20:39:40 +04:00
AC_PATH_PROG([EGREP], [egrep], [not_found],
[$PATH:/usr/bin:/usr/local/bin])
fi
2004-05-05 13:17:53 +04:00
fi
2008-07-04 08:03:55 +04:00
if test -z "$EGREP" || test "$EGREP" = "not_found"; then
2022-09-11 16:08:08 +03:00
AC_MSG_ERROR([grep -E is not working and egrep is not found in PATH. Cannot continue.])
2008-07-04 08:03:55 +04:00
fi
2008-07-28 03:43:53 +04:00
AC_SUBST([EGREP])
2004-05-05 13:17:53 +04:00
2008-07-04 08:03:55 +04:00
dnl AR is mandatory for configure process and libtool.
2009-10-27 19:56:20 +03:00
dnl This is target dependent, so check it as a tool.
2010-07-12 20:39:40 +04:00
if test -z "$AR"; then
dnl allow it to be overridden
AC_PATH_TOOL([AR], [ar], [not_found],
[$PATH:/usr/bin:/usr/local/bin])
if test -z "$AR" || test "$AR" = "not_found"; then
AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
fi
2004-05-05 13:17:53 +04:00
fi
2008-07-28 03:43:53 +04:00
AC_SUBST([AR])
2008-07-04 08:03:55 +04:00
2007-10-26 02:30:35 +04:00
AC_SUBST(libext)
2003-07-30 19:10:26 +04:00
2001-10-23 11:54:16 +04:00
dnl figure out the libcurl version
2017-04-15 09:32:23 +03:00
CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h`
2013-01-20 23:23:20 +04:00
XC_CHECK_PROG_CC
2022-04-05 16:46:03 +03:00
CURL_ATOMIC
2017-11-29 20:18:19 +03:00
2019-01-25 12:14:25 +03:00
dnl for --enable-code-coverage
CURL_COVERAGE
2017-11-29 20:18:19 +03:00
2013-07-09 02:10:38 +04:00
XC_AUTOMAKE
2003-03-12 16:42:07 +03:00
AC_MSG_CHECKING([curl version])
2011-03-20 21:32:54 +03:00
AC_MSG_RESULT($CURLVERSION)
2000-07-25 11:29:32 +04:00
2011-04-06 14:09:27 +04:00
AC_SUBST(CURLVERSION)
2001-05-28 18:58:07 +04:00
dnl
dnl we extract the numerical version for curl-config only
2017-04-15 09:32:23 +03:00
VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\([0-9A-Fa-f]*\).*/\1/p' ${srcdir}/include/curl/curlver.h`
2001-05-28 18:58:07 +04:00
AC_SUBST(VERSIONNUM)
2001-05-30 08:31:32 +04:00
dnl Solaris pkgadd support definitions
PKGADD_PKG="HAXXcurl"
2016-10-18 14:59:54 +03:00
PKGADD_NAME="curl - a client that groks URLs"
2020-11-04 16:02:01 +03:00
PKGADD_VENDOR="curl.se"
2001-05-30 08:31:32 +04:00
AC_SUBST(PKGADD_PKG)
AC_SUBST(PKGADD_NAME)
AC_SUBST(PKGADD_VENDOR)
2004-04-26 16:29:30 +04:00
dnl
2004-11-11 19:34:24 +03:00
dnl initialize all the info variables
2023-10-13 15:01:25 +03:00
curl_ssl_msg="no (--with-{openssl,gnutls,mbedtls,unitytls,wolfssl,schannel,secure-transport,amissl,bearssl,rustls} )"
2019-12-09 13:43:29 +03:00
curl_ssh_msg="no (--with-{libssh,libssh2})"
2004-11-11 19:34:24 +03:00
curl_zlib_msg="no (--with-zlib)"
2017-11-05 17:28:16 +03:00
curl_brotli_msg="no (--with-brotli)"
2020-07-27 13:07:40 +03:00
curl_zstd_msg="no (--with-zstd)"
2004-11-11 19:34:24 +03:00
curl_gss_msg="no (--with-gssapi)"
2020-12-24 21:48:45 +03:00
curl_gsasl_msg="no (--with-gsasl)"
2011-01-19 22:35:02 +03:00
curl_tls_srp_msg="no (--enable-tls-srp)"
2010-04-26 01:24:05 +04:00
curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
2004-11-11 19:34:24 +03:00
curl_ipv6_msg="no (--enable-ipv6)"
2014-11-28 01:59:25 +03:00
curl_unix_sockets_msg="no (--enable-unix-sockets)"
2016-10-12 10:01:06 +03:00
curl_idn_msg="no (--with-{libidn2,winidn})"
2024-02-04 00:05:59 +03:00
curl_docs_msg="enabled (--disable-docs)"
2004-11-11 19:34:24 +03:00
curl_manual_msg="no (--enable-manual)"
2012-02-05 21:44:22 +04:00
curl_libcurl_msg="enabled (--disable-libcurl-option)"
2004-11-11 19:34:24 +03:00
curl_verbose_msg="enabled (--disable-verbose)"
2005-03-14 02:59:28 +03:00
curl_sspi_msg="no (--enable-sspi)"
2007-08-12 00:57:54 +04:00
curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
2007-08-31 00:28:40 +04:00
curl_ldaps_msg="no (--enable-ldaps)"
2010-01-22 19:38:32 +03:00
curl_rtsp_msg="no (--enable-rtsp)"
2010-05-13 01:07:20 +04:00
curl_rtmp_msg="no (--with-librtmp)"
2015-09-29 12:33:01 +03:00
curl_psl_msg="no (--with-libpsl)"
2021-03-08 10:30:32 +03:00
curl_altsvc_msg="enabled (--disable-alt-svc)"
2022-05-30 15:13:48 +03:00
curl_headers_msg="enabled (--disable-headers-api)"
2021-03-08 10:30:32 +03:00
curl_hsts_msg="enabled (--disable-hsts)"
2022-09-09 16:11:13 +03:00
curl_ws_msg="no (--enable-websockets)"
vtls: allow selecting which SSL backend to use at runtime
When building software for the masses, it is sometimes not possible to
decide for all users which SSL backend is appropriate.
Git for Windows, for example, uses cURL to perform clones, fetches and
pushes via HTTPS, and some users strongly prefer OpenSSL, while other
users really need to use Secure Channel because it offers
enterprise-ready tools to manage credentials via Windows' Credential
Store.
The current Git for Windows versions use the ugly work-around of
building libcurl once with OpenSSL support and once with Secure Channel
support, and switching out the binaries in the installer depending on
the user's choice.
Needless to say, this is a super ugly workaround that actually only
works in some cases: Git for Windows also comes in a portable form, and
in a form intended for third-party applications requiring Git
functionality, in which cases this "swap out libcurl-4.dll" simply is
not an option.
Therefore, the Git for Windows project has a vested interest in teaching
cURL to make the SSL backend a *runtime* option.
This patch makes that possible.
By running ./configure with multiple --with-<backend> options, cURL will
be built with multiple backends.
For the moment, the backend can be configured using the environment
variable CURL_SSL_BACKEND (valid values are e.g. "openssl" and
"schannel").
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2017-06-14 17:56:00 +03:00
ssl_backends=
2021-02-12 04:14:28 +03:00
curl_h1_msg="enabled (internal)"
2023-10-24 17:51:05 +03:00
curl_h2_msg="no (--with-nghttp2)"
2024-01-18 15:07:07 +03:00
curl_h3_msg="no (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-openssl-quic, --with-msh3)"
2020-10-26 01:08:54 +03:00
enable_altsvc="yes"
2021-09-05 00:41:07 +03:00
hsts="yes"
2001-05-30 08:31:32 +04:00
2007-02-17 04:29:01 +03:00
dnl
2012-12-04 01:40:26 +04:00
dnl Save some initial values the user might have provided
2007-02-17 04:29:01 +03:00
dnl
2012-12-04 01:40:26 +04:00
INITIAL_LDFLAGS=$LDFLAGS
INITIAL_LIBS=$LIBS
2007-02-17 04:29:01 +03:00
2023-05-16 17:51:14 +03:00
dnl
dnl Generates a shell script to run the compiler with LD_LIBRARY_PATH set to
dnl the value used right now. This lets CURL_RUN_IFELSE set LD_LIBRARY_PATH to
dnl something different but only have that affect the execution of the results
dnl of the compile, not change the libraries for the compiler itself.
dnl
compilersh="run-compiler"
2023-05-31 00:56:58 +03:00
CURL_SAVED_CC="$CC"
export CURL_SAVED_CC
CURL_SAVED_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
export CURL_SAVED_LD_LIBRARY_PATH
2023-05-23 12:59:59 +03:00
cat <<\EOF > "$compilersh"
2023-05-31 00:56:58 +03:00
CC="$CURL_SAVED_CC"
export CC
LD_LIBRARY_PATH="$CURL_SAVED_LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
2023-05-23 12:59:59 +03:00
exec $CC "$@"
EOF
2023-05-16 17:51:14 +03:00
2021-04-15 10:04:30 +03:00
dnl **********************************************************************
dnl See which TLS backend(s) that are requested. Just do all the
dnl TLS AC_ARG_WITH() invokes here and do the checks later
dnl **********************************************************************
OPT_SCHANNEL=no
AC_ARG_WITH(schannel,dnl
AS_HELP_STRING([--with-schannel],[enable Windows native SSL/TLS]),
OPT_SCHANNEL=$withval
TLSCHOICE="schannel")
OPT_SECURETRANSPORT=no
AC_ARG_WITH(secure-transport,dnl
2022-08-19 20:58:40 +03:00
AS_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS]),[
2021-04-15 10:04:30 +03:00
OPT_SECURETRANSPORT=$withval
2022-08-19 20:58:40 +03:00
TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }Secure-Transport"
])
2021-04-15 10:04:30 +03:00
OPT_AMISSL=no
AC_ARG_WITH(amissl,dnl
2022-08-19 20:58:40 +03:00
AS_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]),[
2021-04-15 10:04:30 +03:00
OPT_AMISSL=$withval
2022-08-19 20:58:40 +03:00
TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }AmiSSL"
])
2021-04-15 10:04:30 +03:00
OPT_OPENSSL=no
dnl Default to no CA bundle
ca="no"
AC_ARG_WITH(ssl,dnl
AS_HELP_STRING([--with-ssl=PATH],[old version of --with-openssl])
2022-08-19 20:58:40 +03:00
AS_HELP_STRING([--without-ssl], [build without any TLS library]),[
2021-04-15 10:04:30 +03:00
OPT_SSL=$withval
OPT_OPENSSL=$withval
2021-11-12 03:24:57 +03:00
if test X"$withval" != Xno; then
2022-08-19 20:58:40 +03:00
TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
2022-08-25 18:29:48 +03:00
else
SSL_DISABLED="D"
2021-11-12 03:24:57 +03:00
fi
2022-08-19 20:58:40 +03:00
])
2021-04-15 10:04:30 +03:00
AC_ARG_WITH(openssl,dnl
2022-08-19 20:58:40 +03:00
AS_HELP_STRING([--with-openssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]),[
2021-04-15 10:04:30 +03:00
OPT_OPENSSL=$withval
2021-11-12 03:24:57 +03:00
if test X"$withval" != Xno; then
2022-08-19 20:58:40 +03:00
TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
2021-11-12 03:24:57 +03:00
fi
2022-08-19 20:58:40 +03:00
])
2021-04-15 10:04:30 +03:00
OPT_GNUTLS=no
AC_ARG_WITH(gnutls,dnl
2022-08-19 20:58:40 +03:00
AS_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]),[
2021-04-15 10:04:30 +03:00
OPT_GNUTLS=$withval
2021-11-12 03:24:57 +03:00
if test X"$withval" != Xno; then
2022-08-19 20:58:40 +03:00
TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }GnuTLS"
2021-11-12 03:24:57 +03:00
fi
2022-08-19 20:58:40 +03:00
])
2021-04-15 10:04:30 +03:00
OPT_MBEDTLS=no
AC_ARG_WITH(mbedtls,dnl
2022-08-19 20:58:40 +03:00
AS_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root]),[
2021-04-15 10:04:30 +03:00
OPT_MBEDTLS=$withval
2021-11-12 03:24:57 +03:00
if test X"$withval" != Xno; then
2022-08-19 20:58:40 +03:00
TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }mbedTLS"
2021-11-12 03:24:57 +03:00
fi
2022-08-19 20:58:40 +03:00
])
2021-04-15 10:04:30 +03:00
2021-07-27 14:57:46 +03:00
OPT_UNITYTLS=no
AC_ARG_WITH([unitytls],
[AS_HELP_STRING([--with-unitytls],[enable use of unitytls tls backend])],
[OPT_UNITYTLS=$withval]
test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }UnityTls")
2021-04-15 10:04:30 +03:00
OPT_WOLFSSL=no
AC_ARG_WITH(wolfssl,dnl
2024-07-12 14:55:26 +03:00
AS_HELP_STRING([--with-wolfssl=PATH],[where to look for wolfSSL, PATH points to the installation root (default: system lib default)]),[
2021-04-15 10:04:30 +03:00
OPT_WOLFSSL=$withval
2021-11-12 03:24:57 +03:00
if test X"$withval" != Xno; then
2022-08-19 20:58:40 +03:00
TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }wolfSSL"
2021-11-12 03:24:57 +03:00
fi
2022-08-19 20:58:40 +03:00
])
2021-04-15 10:04:30 +03:00
OPT_BEARSSL=no
AC_ARG_WITH(bearssl,dnl
2022-08-19 20:58:40 +03:00
AS_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root]),[
2021-04-15 10:04:30 +03:00
OPT_BEARSSL=$withval
2021-11-12 03:24:57 +03:00
if test X"$withval" != Xno; then
2022-08-19 20:58:40 +03:00
TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }BearSSL"
2021-11-12 03:24:57 +03:00
fi
2022-08-19 20:58:40 +03:00
])
2021-04-15 10:04:30 +03:00
OPT_RUSTLS=no
AC_ARG_WITH(rustls,dnl
2024-08-19 17:53:40 +03:00
AS_HELP_STRING([--with-rustls=PATH],[where to look for Rustls, PATH points to the installation root]),[
2021-04-15 10:04:30 +03:00
OPT_RUSTLS=$withval
2021-11-12 03:24:57 +03:00
if test X"$withval" != Xno; then
2022-08-19 20:58:40 +03:00
TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }rustls"
2022-06-16 00:33:00 +03:00
experimental="$experimental rustls"
2021-11-12 03:24:57 +03:00
fi
2022-08-19 20:58:40 +03:00
])
2021-04-15 10:04:30 +03:00
2022-11-29 18:41:15 +03:00
TEST_NGHTTPX=nghttpx
AC_ARG_WITH(test-nghttpx,dnl
AS_HELP_STRING([--with-test-nghttpx=PATH],[where to find nghttpx for testing]),
TEST_NGHTTPX=$withval
2024-08-21 12:08:54 +03:00
if test X"$OPT_TEST_NGHTTPX" = "Xno"; then
TEST_NGHTTPX=""
2022-11-29 18:41:15 +03:00
fi
)
AC_SUBST(TEST_NGHTTPX)
2024-05-15 15:20:11 +03:00
CADDY=/usr/bin/caddy
connections: introduce http/3 happy eyeballs
New cfilter HTTP-CONNECT for h3/h2/http1.1 eyeballing.
- filter is installed when `--http3` in the tool is used (or
the equivalent CURLOPT_ done in the library)
- starts a QUIC/HTTP/3 connect right away. Should that not
succeed after 100ms (subject to change), a parallel attempt
is started for HTTP/2 and HTTP/1.1 via TCP
- both attempts are subject to IPv6/IPv4 eyeballing, same
as happens for other connections
- tie timeout to the ip-version HAPPY_EYEBALLS_TIMEOUT
- use a `soft` timeout at half the value. When the soft timeout
expires, the HTTPS-CONNECT filter checks if the QUIC filter
has received any data from the server. If not, it will start
the HTTP/2 attempt.
HTTP/3(ngtcp2) improvements.
- setting call_data in all cfilter calls similar to http/2 and vtls filters
for use in callback where no stream data is available.
- returning CURLE_PARTIAL_FILE for prematurely terminated transfers
- enabling pytest test_05 for h3
- shifting functionality to "connect" UDP sockets from ngtcp2
implementation into the udp socket cfilter. Because unconnected
UDP sockets are weird. For example they error when adding to a
pollset.
HTTP/3(quiche) improvements.
- fixed upload bug in quiche implementation, now passes 251 and pytest
- error codes on stream RESET
- improved debug logs
- handling of DRAIN during connect
- limiting pending event queue
HTTP/2 cfilter improvements.
- use LOG_CF macros for dynamic logging in debug build
- fix CURLcode on RST streams to be CURLE_PARTIAL_FILE
- enable pytest test_05 for h2
- fix upload pytests and improve parallel transfer performance.
GOAWAY handling for ngtcp2/quiche
- during connect, when the remote server refuses to accept new connections
and closes immediately (so the local conn goes into DRAIN phase), the
connection is torn down and a another attempt is made after a short grace
period.
This is the behaviour observed with nghttpx when we tell it to shut
down gracefully. Tested in pytest test_03_02.
TLS improvements
- ALPN selection for SSL/SSL-PROXY filters in one vtls set of functions, replaces
copy of logic in all tls backends.
- standardized the infof logging of offered ALPNs
- ALPN negotiated: have common function for all backends that sets alpn proprty
and connection related things based on the negotiated protocol (or lack thereof).
- new tests/tests-httpd/scorecard.py for testing h3/h2 protocol implementation.
Invoke:
python3 tests/tests-httpd/scorecard.py --help
for usage.
Improvements on gathering connect statistics and socket access.
- new CF_CTRL_CONN_REPORT_STATS cfilter control for having cfilters
report connection statistics. This is triggered when the connection
has completely connected.
- new void Curl_pgrsTimeWas(..) method to report a timer update with
a timestamp of when it happend. This allows for updating timers
"later", e.g. a connect statistic after full connectivity has been
reached.
- in case of HTTP eyeballing, the previous changes will update
statistics only from the filter chain that "won" the eyeballing.
- new cfilter query CF_QUERY_SOCKET for retrieving the socket used
by a filter chain.
Added methods Curl_conn_cf_get_socket() and Curl_conn_get_socket()
for convenient use of this query.
- Change VTLS backend to query their sub-filters for the socket when
checks during the handshake are made.
HTTP/3 documentation on how https eyeballing works.
TLS improvements
- ALPN selection for SSL/SSL-PROXY filters in one vtls set of functions, replaces
copy of logic in all tls backends.
- standardized the infof logging of offered ALPNs
- ALPN negotiated: have common function for all backends that sets alpn proprty
and connection related things based on the negotiated protocol (or lack thereof).
Scorecard with Caddy.
- configure can be run with `--with-test-caddy=path` to specify which caddy to use for testing
- tests/tests-httpd/scorecard.py now measures download speeds with caddy
pytest improvements
- adding Makfile to clean gen dir
- adding nghttpx rundir creation on start
- checking httpd version 2.4.55 for test_05 cases where it is needed. Skipping with message if too old.
- catch exception when checking for caddy existance on system.
Closes #10349
2023-02-01 19:13:12 +03:00
AC_ARG_WITH(test-caddy,dnl
AS_HELP_STRING([--with-test-caddy=PATH],[where to find caddy for testing]),
CADDY=$withval
2024-08-21 12:08:54 +03:00
if test X"$OPT_CADDY" = "Xno"; then
CADDY=""
2021-11-12 03:24:57 +03:00
fi
2022-02-07 16:20:03 +03:00
)
connections: introduce http/3 happy eyeballs
New cfilter HTTP-CONNECT for h3/h2/http1.1 eyeballing.
- filter is installed when `--http3` in the tool is used (or
the equivalent CURLOPT_ done in the library)
- starts a QUIC/HTTP/3 connect right away. Should that not
succeed after 100ms (subject to change), a parallel attempt
is started for HTTP/2 and HTTP/1.1 via TCP
- both attempts are subject to IPv6/IPv4 eyeballing, same
as happens for other connections
- tie timeout to the ip-version HAPPY_EYEBALLS_TIMEOUT
- use a `soft` timeout at half the value. When the soft timeout
expires, the HTTPS-CONNECT filter checks if the QUIC filter
has received any data from the server. If not, it will start
the HTTP/2 attempt.
HTTP/3(ngtcp2) improvements.
- setting call_data in all cfilter calls similar to http/2 and vtls filters
for use in callback where no stream data is available.
- returning CURLE_PARTIAL_FILE for prematurely terminated transfers
- enabling pytest test_05 for h3
- shifting functionality to "connect" UDP sockets from ngtcp2
implementation into the udp socket cfilter. Because unconnected
UDP sockets are weird. For example they error when adding to a
pollset.
HTTP/3(quiche) improvements.
- fixed upload bug in quiche implementation, now passes 251 and pytest
- error codes on stream RESET
- improved debug logs
- handling of DRAIN during connect
- limiting pending event queue
HTTP/2 cfilter improvements.
- use LOG_CF macros for dynamic logging in debug build
- fix CURLcode on RST streams to be CURLE_PARTIAL_FILE
- enable pytest test_05 for h2
- fix upload pytests and improve parallel transfer performance.
GOAWAY handling for ngtcp2/quiche
- during connect, when the remote server refuses to accept new connections
and closes immediately (so the local conn goes into DRAIN phase), the
connection is torn down and a another attempt is made after a short grace
period.
This is the behaviour observed with nghttpx when we tell it to shut
down gracefully. Tested in pytest test_03_02.
TLS improvements
- ALPN selection for SSL/SSL-PROXY filters in one vtls set of functions, replaces
copy of logic in all tls backends.
- standardized the infof logging of offered ALPNs
- ALPN negotiated: have common function for all backends that sets alpn proprty
and connection related things based on the negotiated protocol (or lack thereof).
- new tests/tests-httpd/scorecard.py for testing h3/h2 protocol implementation.
Invoke:
python3 tests/tests-httpd/scorecard.py --help
for usage.
Improvements on gathering connect statistics and socket access.
- new CF_CTRL_CONN_REPORT_STATS cfilter control for having cfilters
report connection statistics. This is triggered when the connection
has completely connected.
- new void Curl_pgrsTimeWas(..) method to report a timer update with
a timestamp of when it happend. This allows for updating timers
"later", e.g. a connect statistic after full connectivity has been
reached.
- in case of HTTP eyeballing, the previous changes will update
statistics only from the filter chain that "won" the eyeballing.
- new cfilter query CF_QUERY_SOCKET for retrieving the socket used
by a filter chain.
Added methods Curl_conn_cf_get_socket() and Curl_conn_get_socket()
for convenient use of this query.
- Change VTLS backend to query their sub-filters for the socket when
checks during the handshake are made.
HTTP/3 documentation on how https eyeballing works.
TLS improvements
- ALPN selection for SSL/SSL-PROXY filters in one vtls set of functions, replaces
copy of logic in all tls backends.
- standardized the infof logging of offered ALPNs
- ALPN negotiated: have common function for all backends that sets alpn proprty
and connection related things based on the negotiated protocol (or lack thereof).
Scorecard with Caddy.
- configure can be run with `--with-test-caddy=path` to specify which caddy to use for testing
- tests/tests-httpd/scorecard.py now measures download speeds with caddy
pytest improvements
- adding Makfile to clean gen dir
- adding nghttpx rundir creation on start
- checking httpd version 2.4.55 for test_05 cases where it is needed. Skipping with message if too old.
- catch exception when checking for caddy existance on system.
Closes #10349
2023-02-01 19:13:12 +03:00
AC_SUBST(CADDY)
2024-05-15 15:20:11 +03:00
VSFTPD=/usr/sbin/vsftpd
AC_ARG_WITH(test-vsftpd,dnl
AS_HELP_STRING([--with-test-vsftpd=PATH],[where to find vsftpd for testing]),
VSFTPD=$withval
2024-08-21 12:08:54 +03:00
if test X"$OPT_VSFTPD" = "Xno"; then
VSFTPD=""
2024-05-15 15:20:11 +03:00
fi
)
AC_SUBST(VSFTPD)
2023-01-09 18:58:10 +03:00
dnl we'd like a httpd+apachectl as test server
dnl
2023-04-03 12:58:21 +03:00
HTTPD_ENABLED="maybe"
2023-01-09 18:58:10 +03:00
AC_ARG_WITH(test-httpd, [AS_HELP_STRING([--with-test-httpd=PATH],
[where to find httpd/apache2 for testing])],
[request_httpd=$withval], [request_httpd=check])
2023-04-03 12:58:21 +03:00
if test x"$request_httpd" = "xcheck" -o x"$request_httpd" = "xyes"; then
2023-01-09 18:58:10 +03:00
if test -x "/usr/sbin/apache2" -a -x "/usr/sbin/apache2ctl"; then
# common location on distros (debian/ubuntu)
HTTPD="/usr/sbin/apache2"
APACHECTL="/usr/sbin/apache2ctl"
AC_PATH_PROG([APXS], [apxs])
2023-04-28 11:01:01 +03:00
if test "x$APXS" = "x"; then
2023-01-09 18:58:10 +03:00
AC_MSG_NOTICE([apache2-dev not installed, httpd tests disabled])
2023-04-03 12:58:21 +03:00
HTTPD_ENABLED="no"
2023-01-09 18:58:10 +03:00
fi
else
AC_PATH_PROG([HTTPD], [httpd])
if test "x$HTTPD" = "x"; then
AC_PATH_PROG([HTTPD], [apache2])
fi
AC_PATH_PROG([APACHECTL], [apachectl])
AC_PATH_PROG([APXS], [apxs])
if test "x$HTTPD" = "x" -o "x$APACHECTL" = "x"; then
2023-04-03 12:58:21 +03:00
AC_MSG_NOTICE([httpd/apache2 not in PATH, http tests disabled])
HTTPD_ENABLED="no"
2023-01-09 18:58:10 +03:00
fi
if test "x$APXS" = "x"; then
2023-04-03 12:58:21 +03:00
AC_MSG_NOTICE([apxs not in PATH, http tests disabled])
HTTPD_ENABLED="no"
2023-01-09 18:58:10 +03:00
fi
fi
2023-04-03 12:58:21 +03:00
elif test x"$request_httpd" != "xno"; then
2023-01-09 18:58:10 +03:00
HTTPD="${request_httpd}/bin/httpd"
APACHECTL="${request_httpd}/bin/apachectl"
APXS="${request_httpd}/bin/apxs"
if test ! -x "${HTTPD}"; then
2023-04-03 12:58:21 +03:00
AC_MSG_NOTICE([httpd not found as ${HTTPD}, http tests disabled])
HTTPD_ENABLED="no"
2023-01-09 18:58:10 +03:00
elif test ! -x "${APACHECTL}"; then
2023-04-03 12:58:21 +03:00
AC_MSG_NOTICE([apachectl not found as ${APACHECTL}, http tests disabled])
HTTPD_ENABLED="no"
2023-01-09 18:58:10 +03:00
elif test ! -x "${APXS}"; then
2023-04-03 12:58:21 +03:00
AC_MSG_NOTICE([apxs not found as ${APXS}, http tests disabled])
HTTPD_ENABLED="no"
2023-01-09 18:58:10 +03:00
else
AC_MSG_NOTICE([using HTTPD=$HTTPD for tests])
fi
fi
2023-04-03 12:58:21 +03:00
if test x"$HTTPD_ENABLED" = "xno"; then
HTTPD=""
APACHECTL=""
APXS=""
fi
2023-01-09 18:58:10 +03:00
AC_SUBST(HTTPD)
AC_SUBST(APACHECTL)
AC_SUBST(APXS)
dnl the nghttpx we might use in httpd testing
2023-03-09 12:50:55 +03:00
if test "x$TEST_NGHTTPX" != "x" -a "x$TEST_NGHTTPX" != "xnghttpx"; then
2023-01-09 18:58:10 +03:00
HTTPD_NGHTTPX="$TEST_NGHTTPX"
else
2023-03-09 12:50:55 +03:00
AC_PATH_PROG([HTTPD_NGHTTPX], [nghttpx], [],
[$PATH:/usr/bin:/usr/local/bin])
2023-01-09 18:58:10 +03:00
fi
AC_SUBST(HTTPD_NGHTTPX)
connections: introduce http/3 happy eyeballs
New cfilter HTTP-CONNECT for h3/h2/http1.1 eyeballing.
- filter is installed when `--http3` in the tool is used (or
the equivalent CURLOPT_ done in the library)
- starts a QUIC/HTTP/3 connect right away. Should that not
succeed after 100ms (subject to change), a parallel attempt
is started for HTTP/2 and HTTP/1.1 via TCP
- both attempts are subject to IPv6/IPv4 eyeballing, same
as happens for other connections
- tie timeout to the ip-version HAPPY_EYEBALLS_TIMEOUT
- use a `soft` timeout at half the value. When the soft timeout
expires, the HTTPS-CONNECT filter checks if the QUIC filter
has received any data from the server. If not, it will start
the HTTP/2 attempt.
HTTP/3(ngtcp2) improvements.
- setting call_data in all cfilter calls similar to http/2 and vtls filters
for use in callback where no stream data is available.
- returning CURLE_PARTIAL_FILE for prematurely terminated transfers
- enabling pytest test_05 for h3
- shifting functionality to "connect" UDP sockets from ngtcp2
implementation into the udp socket cfilter. Because unconnected
UDP sockets are weird. For example they error when adding to a
pollset.
HTTP/3(quiche) improvements.
- fixed upload bug in quiche implementation, now passes 251 and pytest
- error codes on stream RESET
- improved debug logs
- handling of DRAIN during connect
- limiting pending event queue
HTTP/2 cfilter improvements.
- use LOG_CF macros for dynamic logging in debug build
- fix CURLcode on RST streams to be CURLE_PARTIAL_FILE
- enable pytest test_05 for h2
- fix upload pytests and improve parallel transfer performance.
GOAWAY handling for ngtcp2/quiche
- during connect, when the remote server refuses to accept new connections
and closes immediately (so the local conn goes into DRAIN phase), the
connection is torn down and a another attempt is made after a short grace
period.
This is the behaviour observed with nghttpx when we tell it to shut
down gracefully. Tested in pytest test_03_02.
TLS improvements
- ALPN selection for SSL/SSL-PROXY filters in one vtls set of functions, replaces
copy of logic in all tls backends.
- standardized the infof logging of offered ALPNs
- ALPN negotiated: have common function for all backends that sets alpn proprty
and connection related things based on the negotiated protocol (or lack thereof).
- new tests/tests-httpd/scorecard.py for testing h3/h2 protocol implementation.
Invoke:
python3 tests/tests-httpd/scorecard.py --help
for usage.
Improvements on gathering connect statistics and socket access.
- new CF_CTRL_CONN_REPORT_STATS cfilter control for having cfilters
report connection statistics. This is triggered when the connection
has completely connected.
- new void Curl_pgrsTimeWas(..) method to report a timer update with
a timestamp of when it happend. This allows for updating timers
"later", e.g. a connect statistic after full connectivity has been
reached.
- in case of HTTP eyeballing, the previous changes will update
statistics only from the filter chain that "won" the eyeballing.
- new cfilter query CF_QUERY_SOCKET for retrieving the socket used
by a filter chain.
Added methods Curl_conn_cf_get_socket() and Curl_conn_get_socket()
for convenient use of this query.
- Change VTLS backend to query their sub-filters for the socket when
checks during the handshake are made.
HTTP/3 documentation on how https eyeballing works.
TLS improvements
- ALPN selection for SSL/SSL-PROXY filters in one vtls set of functions, replaces
copy of logic in all tls backends.
- standardized the infof logging of offered ALPNs
- ALPN negotiated: have common function for all backends that sets alpn proprty
and connection related things based on the negotiated protocol (or lack thereof).
Scorecard with Caddy.
- configure can be run with `--with-test-caddy=path` to specify which caddy to use for testing
- tests/tests-httpd/scorecard.py now measures download speeds with caddy
pytest improvements
- adding Makfile to clean gen dir
- adding nghttpx rundir creation on start
- checking httpd version 2.4.55 for test_05 cases where it is needed. Skipping with message if too old.
- catch exception when checking for caddy existance on system.
Closes #10349
2023-02-01 19:13:12 +03:00
dnl the Caddy server we might use in testing
if test "x$TEST_CADDY" != "x"; then
CADDY="$TEST_CADDY"
else
AC_PATH_PROG([CADDY], [caddy])
fi
AC_SUBST(CADDY)
2021-04-15 10:04:30 +03:00
dnl If no TLS choice has been made, check if it was explicitly disabled or
dnl error out to force the user to decide.
if test -z "$TLSCHOICE"; then
if test "x$OPT_SSL" != "xno"; then
2021-04-23 10:21:02 +03:00
AC_MSG_ERROR([select TLS backend(s) or disable TLS with --without-ssl.
2021-04-15 10:04:30 +03:00
Select from these:
--with-amissl
--with-bearssl
--with-gnutls
--with-mbedtls
2024-07-12 14:55:26 +03:00
--with-openssl (also works for BoringSSL and LibreSSL)
2021-04-15 10:04:30 +03:00
--with-rustls
--with-schannel
--with-secure-transport
2021-07-27 14:57:46 +03:00
--with-unitytls
2021-04-15 10:04:30 +03:00
--with-wolfssl
])
fi
fi
2021-06-06 13:12:01 +03:00
AC_ARG_WITH(darwinssl,,
2023-06-23 01:15:46 +03:00
AC_MSG_ERROR([--with-darwin-ssl and --without-darwin-ssl no longer work!]))
2021-06-06 13:12:01 +03:00
2000-07-25 11:29:32 +04:00
dnl
dnl Detect the canonical host and target build environment
dnl
1999-12-29 17:20:26 +03:00
2001-05-23 01:17:58 +04:00
AC_CANONICAL_HOST
2001-05-22 22:16:24 +04:00
dnl Get system canonical name
2002-10-28 23:39:23 +03:00
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
2000-08-24 16:33:16 +04:00
2018-05-29 11:26:06 +03:00
# Silence warning: ar: 'u' modifier ignored since 'D' is the default
AC_SUBST(AR_FLAGS, [cr])
2008-08-07 04:29:08 +04:00
2008-08-04 10:48:11 +04:00
dnl This defines _ALL_SOURCE for AIX
CURL_CHECK_AIX_ALL_SOURCE
2008-07-22 23:04:16 +04:00
dnl Our configure and build reentrant settings
2009-11-14 21:51:37 +03:00
CURL_CONFIGURE_THREAD_SAFE
2008-07-27 05:36:33 +04:00
CURL_CONFIGURE_REENTRANT
2008-07-22 23:04:16 +04:00
2000-08-24 17:05:24 +04:00
dnl check for how to do large files
2000-08-24 16:33:16 +04:00
AC_SYS_LARGEFILE
2000-08-24 17:05:24 +04:00
2013-03-08 16:26:08 +04:00
XC_LIBTOOL
2013-01-08 22:02:08 +04:00
2022-09-23 22:39:18 +03:00
LT_LANG([Windows Resource])
2013-03-08 16:26:08 +04:00
#
# Automake conditionals based on libtool related checks
#
2009-11-24 19:12:22 +03:00
2013-03-08 16:26:08 +04:00
AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSION_INFO],
[test "x$xc_lt_shlib_use_version_info" = 'xyes'])
AM_CONDITIONAL([CURL_LT_SHLIB_USE_NO_UNDEFINED],
[test "x$xc_lt_shlib_use_no_undefined" = 'xyes'])
AM_CONDITIONAL([CURL_LT_SHLIB_USE_MIMPURE_TEXT],
[test "x$xc_lt_shlib_use_mimpure_text" = 'xyes'])
2001-05-22 22:16:24 +04:00
2013-03-12 03:24:37 +04:00
#
# Due to libtool and automake machinery limitations of not allowing
# specifying separate CPPFLAGS or CFLAGS when compiling objects for
# inclusion of these in shared or static libraries, we are forced to
# build using separate configure runs for shared and static libraries
# on systems where different CPPFLAGS or CFLAGS are mandatory in order
# to compile objects for each kind of library. Notice that relying on
# the '-DPIC' CFLAG that libtool provides is not valid given that the
# user might for example choose to build static libraries with PIC.
#
#
# Make our Makefile.am files use the staticlib CPPFLAG only when strictly
# targeting a static library and not building its shared counterpart.
#
AM_CONDITIONAL([USE_CPPFLAG_CURL_STATICLIB],
[test "x$xc_lt_build_static_only" = 'xyes'])
#
# Make staticlib CPPFLAG variable and its definition visible in output
# files unconditionally, providing an empty definition unless strictly
# targeting a static library and not building its shared counterpart.
#
2024-07-31 11:49:38 +03:00
LIBCURL_PC_CFLAGS_PRIVATE='-DCURL_STATICLIB'
AC_SUBST(LIBCURL_PC_CFLAGS_PRIVATE)
2005-02-18 11:24:53 +03:00
2024-08-09 18:45:46 +03:00
LIBCURL_PC_CFLAGS=
2013-03-12 03:24:37 +04:00
if test "x$xc_lt_build_static_only" = 'xyes'; then
2024-08-09 18:45:46 +03:00
LIBCURL_PC_CFLAGS="${LIBCURL_PC_CFLAGS_PRIVATE}"
2007-02-14 06:00:08 +03:00
fi
2024-08-09 18:45:46 +03:00
AC_SUBST([LIBCURL_PC_CFLAGS])
2007-02-14 06:00:08 +03:00
2007-06-13 01:39:21 +04:00
2007-10-18 20:24:14 +04:00
dnl **********************************************************************
dnl platform/compiler/architecture specific checks/flags
dnl **********************************************************************
2008-10-02 07:56:55 +04:00
CURL_CHECK_COMPILER
2023-12-09 23:37:11 +03:00
CURL_CHECK_NATIVE_WINDOWS
2008-10-07 17:13:34 +04:00
CURL_SET_COMPILER_BASIC_OPTS
CURL_SET_COMPILER_DEBUG_OPTS
CURL_SET_COMPILER_OPTIMIZE_OPTS
CURL_SET_COMPILER_WARNING_OPTS
2008-09-29 23:14:52 +04:00
2009-11-24 19:12:22 +03:00
if test "$compiler_id" = "INTEL_UNIX_C"; then
2008-10-22 15:10:56 +04:00
#
2009-11-24 19:12:22 +03:00
if test "$compiler_num" -ge "1000"; then
dnl icc 10.X or later
CFLAGS="$CFLAGS -shared-intel"
elif test "$compiler_num" -ge "900"; then
dnl icc 9.X specific
CFLAGS="$CFLAGS -i-dynamic"
fi
2008-10-22 15:10:56 +04:00
#
2009-11-24 19:12:22 +03:00
fi
2008-09-29 23:14:52 +04:00
2020-03-10 15:55:44 +03:00
CURL_CFLAG_EXTRAS=""
if test X"$want_werror" = Xyes; then
CURL_CFLAG_EXTRAS="-Werror"
if test "$compiler_id" = "GNU_C"; then
dnl enable -pedantic-errors for GCC 5 and later,
dnl as before that it was the same as -Werror=pedantic
if test "$compiler_num" -ge "500"; then
CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors"
fi
2024-07-06 17:00:03 +03:00
elif test "$compiler_id" = "CLANG"; then
CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors"
2020-03-10 15:55:44 +03:00
fi
fi
AC_SUBST(CURL_CFLAG_EXTRAS)
2008-06-20 22:09:48 +04:00
CURL_CHECK_COMPILER_HALT_ON_ERROR
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
2012-12-16 21:51:51 +04:00
CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
2012-04-11 21:33:54 +04:00
CURL_CHECK_COMPILER_SYMBOL_HIDING
2008-06-20 22:09:48 +04:00
2011-06-03 22:06:42 +04:00
supports_unittests=yes
# cross-compilation of unit tests static library/programs fails when
# libcurl shared library is built. This might be due to a libtool or
# automake issue. In this case we disable unit tests.
if test "x$cross_compiling" != "xno" &&
test "x$enable_shared" != "xno"; then
supports_unittests=no
fi
2011-08-15 20:27:59 +04:00
# IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
# a problem related with OpenSSL headers and library versions not matching.
# Disable unit tests while time to further investigate this is found.
case $host in
mips-sgi-irix6.5)
if test "$compiler_id" = "GNU_C"; then
supports_unittests=no
fi
;;
esac
# All AIX autobuilds fails unit tests linking against unittests library
# due to unittests library being built with no symbols or members. Libtool ?
# Disable unit tests while time to further investigate this is found.
case $host_os in
aix*)
supports_unittests=no
;;
esac
2011-06-02 19:02:46 +04:00
dnl Build unit tests when option --enable-debug is given.
2011-06-03 22:06:42 +04:00
if test "x$want_debug" = "xyes" &&
test "x$supports_unittests" = "xyes"; then
want_unittests=yes
else
want_unittests=no
fi
AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes)
2011-06-01 23:39:18 +04:00
2008-06-20 22:09:48 +04:00
dnl **********************************************************************
dnl Compilation based checks should not be done before this point.
dnl **********************************************************************
2008-08-26 16:54:12 +04:00
CURL_CHECK_WIN32_LARGEFILE
2021-03-06 17:52:09 +03:00
CURL_CHECK_WIN32_CRYPTO
2008-06-20 22:09:48 +04:00
2021-04-09 17:08:32 +03:00
CURL_DARWIN_CFLAGS
2024-08-09 03:42:55 +03:00
2024-07-14 22:49:35 +03:00
case $host_os in
darwin*)
CURL_SUPPORTS_BUILTIN_AVAILABLE
;;
esac
2016-10-19 15:36:32 +03:00
2022-11-02 01:45:28 +03:00
AM_CONDITIONAL([HAVE_WINDRES],
[test "$curl_cv_native_windows" = "yes" && test -n "${RC}"])
if test "$curl_cv_native_windows" = "yes"; then
AM_COND_IF([HAVE_WINDRES],,
[AC_MSG_ERROR([windres not found in PATH. Windows builds require windres. Cannot continue.])])
fi
2016-10-19 15:36:32 +03:00
2002-06-11 15:13:29 +04:00
dnl ************************************************************
dnl switch off particular protocols
dnl
AC_MSG_CHECKING([whether to support http])
AC_ARG_ENABLE(http,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-http],[Enable HTTP support])
AS_HELP_STRING([--disable-http],[Disable HTTP support]),
2002-06-11 15:13:29 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP])
disable_http="yes"
AC_MSG_WARN([disable HTTP disables FTP over proxy and RTSP])
AC_SUBST(CURL_DISABLE_HTTP, [1])
AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
AC_SUBST(CURL_DISABLE_RTSP, [1])
dnl toggle off alt-svc too when HTTP is disabled
AC_DEFINE(CURL_DISABLE_ALTSVC, 1, [disable alt-svc])
AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable HSTS])
curl_h1_msg="no (--enable-http, --with-hyper)"
curl_altsvc_msg="no";
curl_hsts_msg="no (--enable-hsts)";
enable_altsvc="no"
hsts="no"
;;
*)
AC_MSG_RESULT(yes)
;;
2002-06-11 15:13:29 +04:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2002-06-11 15:13:29 +04:00
)
AC_MSG_CHECKING([whether to support ftp])
AC_ARG_ENABLE(ftp,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-ftp],[Enable FTP support])
AS_HELP_STRING([--disable-ftp],[Disable FTP support]),
2002-06-11 15:13:29 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP])
AC_SUBST(CURL_DISABLE_FTP, [1])
;;
*)
AC_MSG_RESULT(yes)
;;
2002-06-11 15:13:29 +04:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2002-06-11 15:13:29 +04:00
)
AC_MSG_CHECKING([whether to support file])
AC_ARG_ENABLE(file,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-file],[Enable FILE support])
AS_HELP_STRING([--disable-file],[Disable FILE support]),
2002-06-11 15:13:29 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE])
AC_SUBST(CURL_DISABLE_FILE, [1])
;;
*)
AC_MSG_RESULT(yes)
;;
2002-06-11 15:13:29 +04:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2002-06-11 15:13:29 +04:00
)
AC_MSG_CHECKING([whether to support ldap])
AC_ARG_ENABLE(ldap,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-ldap],[Enable LDAP support])
AS_HELP_STRING([--disable-ldap],[Disable LDAP support]),
2002-06-11 15:13:29 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])
;;
2021-05-12 12:15:51 +03:00
yes)
2024-08-21 12:08:54 +03:00
ldap_askedfor="yes"
AC_MSG_RESULT(yes)
;;
2008-01-21 23:22:33 +03:00
*)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
;;
2008-01-21 23:22:33 +03:00
esac ],[
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes) ]
2002-06-11 15:13:29 +04:00
)
2007-08-31 00:28:40 +04:00
AC_MSG_CHECKING([whether to support ldaps])
AC_ARG_ENABLE(ldaps,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
AS_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
2007-08-31 00:28:40 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
AC_SUBST(CURL_DISABLE_LDAPS, [1])
;;
*)
if test "x$CURL_DISABLE_LDAP" = "x1"; then
AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS)
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
AC_SUBST(CURL_DISABLE_LDAPS, [1])
else
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
AC_SUBST(HAVE_LDAP_SSL, [1])
fi
;;
2010-06-01 23:26:19 +04:00
esac ],[
2024-08-21 12:08:54 +03:00
if test "x$CURL_DISABLE_LDAP" = "x1"; then
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
AC_SUBST(CURL_DISABLE_LDAPS, [1])
else
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
AC_SUBST(HAVE_LDAP_SSL, [1])
fi ]
2007-08-31 00:28:40 +04:00
)
2021-06-09 12:43:41 +03:00
dnl **********************************************************************
dnl Check for Hyper
dnl **********************************************************************
OPT_HYPER="no"
AC_ARG_WITH(hyper,
AS_HELP_STRING([--with-hyper=PATH],[Enable hyper usage])
AS_HELP_STRING([--without-hyper],[Disable hyper usage]),
[OPT_HYPER=$withval])
case "$OPT_HYPER" in
2010-01-21 16:58:30 +03:00
no)
2021-06-09 12:43:41 +03:00
dnl --without-hyper option used
want_hyper="no"
;;
yes)
dnl --with-hyper option used without path
want_hyper="default"
want_hyper_path=""
;;
*)
dnl --with-hyper option used with path
want_hyper="yes"
want_hyper_path="$withval"
;;
esac
if test X"$want_hyper" != Xno; then
if test "x$disable_http" = "xyes"; then
AC_MSG_ERROR([--with-hyper is not compatible with --disable-http])
fi
dnl backup the pre-hyper variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
CURL_CHECK_PKGCONFIG(hyper, $want_hyper_path)
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2021-06-09 12:43:41 +03:00
LIB_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
$PKGCONFIG --libs-only-l hyper`
CPP_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path]) dnl
$PKGCONFIG --cflags-only-I hyper`
LD_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
$PKGCONFIG --libs-only-L hyper`
else
dnl no hyper pkg-config found
LIB_HYPER="-lhyper -ldl -lpthread -lm"
if test X"$want_hyper" != Xdefault; then
CPP_HYPER=-I"$want_hyper_path/capi/include"
2021-11-03 08:14:02 +03:00
LD_HYPER="-L$want_hyper_path/target/release -L$want_hyper_path/target/debug"
2021-06-09 12:43:41 +03:00
fi
fi
if test -n "$LIB_HYPER"; then
AC_MSG_NOTICE([-l is $LIB_HYPER])
AC_MSG_NOTICE([-I is $CPP_HYPER])
AC_MSG_NOTICE([-L is $LD_HYPER])
LDFLAGS="$LDFLAGS $LD_HYPER"
CPPFLAGS="$CPPFLAGS $CPP_HYPER"
LIBS="$LIB_HYPER $LIBS"
if test "x$cross_compiling" != "xyes"; then
2021-11-13 13:44:34 +03:00
dnl remove -L, separate with colon if more than one
DIR_HYPER=`echo $LD_HYPER | $SED -e 's/^-L//' -e 's/ -L/:/g'`
2021-06-09 12:43:41 +03:00
fi
AC_CHECK_LIB(hyper, hyper_io_new,
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(hyper.h,
2021-06-09 12:43:41 +03:00
experimental="$experimental Hyper"
AC_MSG_NOTICE([Hyper support is experimental])
curl_h1_msg="enabled (Hyper)"
HYPER_ENABLED=1
AC_DEFINE(USE_HYPER, 1, [if hyper is in use])
AC_SUBST(USE_HYPER, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_HYPER"
export CURL_LIBRARY_PATH
2024-06-08 01:41:24 +03:00
AC_MSG_NOTICE([Added $DIR_HYPER to CURL_LIBRARY_PATH])
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE hyper"
2024-08-21 12:08:54 +03:00
)
2021-06-09 12:43:41 +03:00
],
2022-05-21 16:34:24 +03:00
for d in `echo $DIR_HYPER | $SED -e 's/:/ /'`; do
2021-11-13 13:44:34 +03:00
if test -f "$d/libhyper.a"; then
AC_MSG_ERROR([hyper was found in $d but was probably built with wrong flags. See docs/HYPER.md.])
fi
done
2021-06-09 12:43:41 +03:00
AC_MSG_ERROR([--with-hyper but hyper was not found. See docs/HYPER.md.])
)
fi
fi
if test X"$want_hyper" != Xno; then
AC_MSG_NOTICE([Disable RTSP support with hyper])
AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
AC_SUBST(CURL_DISABLE_RTSP, [1])
else
AC_MSG_CHECKING([whether to support rtsp])
AC_ARG_ENABLE(rtsp,
2023-05-18 22:16:56 +03:00
AS_HELP_STRING([--enable-rtsp],[Enable RTSP support])
AS_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
2021-06-09 12:43:41 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
AC_SUBST(CURL_DISABLE_RTSP, [1])
;;
2021-06-09 12:43:41 +03:00
*)
2024-08-21 12:08:54 +03:00
if test x$CURL_DISABLE_HTTP = x1; then
AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
else
AC_MSG_RESULT(yes)
curl_rtsp_msg="enabled"
fi
;;
2021-06-09 12:43:41 +03:00
esac ],
2024-08-21 12:08:54 +03:00
if test "x$CURL_DISABLE_HTTP" != "x1"; then
AC_MSG_RESULT(yes)
curl_rtsp_msg="enabled"
else
AC_MSG_RESULT(no)
fi
2021-06-09 12:43:41 +03:00
)
fi
2010-01-21 16:58:30 +03:00
2008-09-30 01:49:10 +04:00
AC_MSG_CHECKING([whether to support proxies])
2008-09-30 01:46:04 +04:00
AC_ARG_ENABLE(proxy,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-proxy],[Enable proxy support])
AS_HELP_STRING([--disable-proxy],[Disable proxy support]),
2008-09-30 01:46:04 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies])
AC_SUBST(CURL_DISABLE_PROXY, [1])
https_proxy="no"
;;
*)
AC_MSG_RESULT(yes)
;;
2008-09-30 01:46:04 +04:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2008-09-30 01:46:04 +04:00
)
2002-06-11 15:13:29 +04:00
AC_MSG_CHECKING([whether to support dict])
AC_ARG_ENABLE(dict,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-dict],[Enable DICT support])
AS_HELP_STRING([--disable-dict],[Disable DICT support]),
2002-06-11 15:13:29 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT])
AC_SUBST(CURL_DISABLE_DICT, [1])
;;
*)
AC_MSG_RESULT(yes)
;;
2002-06-11 15:13:29 +04:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2002-06-11 15:13:29 +04:00
)
2024-08-21 12:08:54 +03:00
2002-06-11 15:13:29 +04:00
AC_MSG_CHECKING([whether to support telnet])
AC_ARG_ENABLE(telnet,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-telnet],[Enable TELNET support])
AS_HELP_STRING([--disable-telnet],[Disable TELNET support]),
2002-06-11 15:13:29 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
AC_SUBST(CURL_DISABLE_TELNET, [1])
;;
*)
AC_MSG_RESULT(yes)
;;
2002-06-11 15:13:29 +04:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2002-06-11 15:13:29 +04:00
)
2024-08-21 12:08:54 +03:00
2005-09-02 19:11:08 +04:00
AC_MSG_CHECKING([whether to support tftp])
AC_ARG_ENABLE(tftp,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-tftp],[Enable TFTP support])
AS_HELP_STRING([--disable-tftp],[Disable TFTP support]),
2005-09-02 19:11:08 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP])
AC_SUBST(CURL_DISABLE_TFTP, [1])
;;
*)
AC_MSG_RESULT(yes)
;;
2005-09-02 19:11:08 +04:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2005-09-02 19:11:08 +04:00
)
2002-06-11 15:13:29 +04:00
2009-12-13 01:31:00 +03:00
AC_MSG_CHECKING([whether to support pop3])
AC_ARG_ENABLE(pop3,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-pop3],[Enable POP3 support])
AS_HELP_STRING([--disable-pop3],[Disable POP3 support]),
2009-12-13 01:31:00 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_POP3, 1, [to disable POP3])
AC_SUBST(CURL_DISABLE_POP3, [1])
;;
*)
AC_MSG_RESULT(yes)
;;
2009-12-13 01:31:00 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2009-12-13 01:31:00 +03:00
)
AC_MSG_CHECKING([whether to support imap])
AC_ARG_ENABLE(imap,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-imap],[Enable IMAP support])
AS_HELP_STRING([--disable-imap],[Disable IMAP support]),
2009-12-13 01:31:00 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_IMAP, 1, [to disable IMAP])
AC_SUBST(CURL_DISABLE_IMAP, [1])
;;
*)
AC_MSG_RESULT(yes)
;;
2009-12-13 01:31:00 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2009-12-13 01:31:00 +03:00
)
2014-11-29 20:59:29 +03:00
AC_MSG_CHECKING([whether to support smb])
AC_ARG_ENABLE(smb,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-smb],[Enable SMB/CIFS support])
AS_HELP_STRING([--disable-smb],[Disable SMB/CIFS support]),
2014-11-29 20:59:29 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_SMB, 1, [to disable SMB/CIFS])
AC_SUBST(CURL_DISABLE_SMB, [1])
;;
*)
AC_MSG_RESULT(yes)
;;
2014-11-29 20:59:29 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2014-11-29 20:59:29 +03:00
)
2009-12-13 01:31:00 +03:00
AC_MSG_CHECKING([whether to support smtp])
AC_ARG_ENABLE(smtp,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-smtp],[Enable SMTP support])
AS_HELP_STRING([--disable-smtp],[Disable SMTP support]),
2009-12-13 01:31:00 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_SMTP, 1, [to disable SMTP])
AC_SUBST(CURL_DISABLE_SMTP, [1])
;;
*)
AC_MSG_RESULT(yes)
;;
2009-12-13 01:31:00 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2009-12-13 01:31:00 +03:00
)
2010-08-12 18:55:48 +04:00
AC_MSG_CHECKING([whether to support gopher])
AC_ARG_ENABLE(gopher,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-gopher],[Enable Gopher support])
AS_HELP_STRING([--disable-gopher],[Disable Gopher support]),
2010-08-12 18:55:48 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher])
AC_SUBST(CURL_DISABLE_GOPHER, [1])
;;
*)
AC_MSG_RESULT(yes)
;;
2010-08-12 18:55:48 +04:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2010-08-12 18:55:48 +04:00
)
2020-04-14 12:19:12 +03:00
AC_MSG_CHECKING([whether to support mqtt])
AC_ARG_ENABLE(mqtt,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-mqtt],[Enable MQTT support])
AS_HELP_STRING([--disable-mqtt],[Disable MQTT support]),
2020-04-14 12:19:12 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_MQTT, 1, [to disable MQTT])
AC_SUBST(CURL_DISABLE_MQTT, [1])
;;
*)
AC_MSG_RESULT(yes)
;;
2020-04-14 12:19:12 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
2020-04-14 12:19:12 +03:00
)
2009-12-13 01:31:00 +03:00
2004-02-12 17:45:50 +03:00
dnl **********************************************************************
dnl Check for built-in manual
dnl **********************************************************************
AC_MSG_CHECKING([whether to provide built-in manual])
AC_ARG_ENABLE(manual,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-manual],[Enable built-in manual])
AS_HELP_STRING([--disable-manual],[Disable built-in manual]),
2004-02-12 17:45:50 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT(yes)
USE_MANUAL="1"
;;
2004-02-12 17:45:50 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
USE_MANUAL="1"
2004-02-12 17:45:50 +03:00
)
dnl The actual use of the USE_MANUAL variable is done much later in this
dnl script to allow other actions to disable it as well.
dnl **********************************************************************
2024-03-26 19:14:56 +03:00
dnl Check whether to build documentation
2004-02-12 17:45:50 +03:00
dnl **********************************************************************
2024-03-26 19:14:56 +03:00
AC_MSG_CHECKING([whether to build documentation])
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],[Enable documentation])
AS_HELP_STRING([--disable-docs],[Disable documentation]),
2004-02-12 17:45:50 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
BUILD_DOCS=0
dnl disable manual too because it needs built documentation
USE_MANUAL=0
curl_docs_msg="no"
;;
*)
AC_MSG_RESULT(yes)
BUILD_DOCS=1
;;
2004-02-12 17:45:50 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
BUILD_DOCS=1
2004-02-12 17:45:50 +03:00
)
2024-03-26 19:14:56 +03:00
2004-02-12 17:45:50 +03:00
2012-02-05 21:44:22 +04:00
dnl ************************************************************
dnl disable C code generation support
dnl
AC_MSG_CHECKING([whether to enable generation of C code])
AC_ARG_ENABLE(libcurl_option,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
AS_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
2012-02-05 21:44:22 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option])
curl_libcurl_msg="no"
;;
*)
AC_MSG_RESULT(yes)
;;
2012-02-05 21:44:22 +04:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2012-02-05 21:44:22 +04:00
)
1999-12-29 17:20:26 +03:00
dnl **********************************************************************
dnl Checks for libraries.
dnl **********************************************************************
2012-12-04 01:40:26 +04:00
AC_MSG_CHECKING([whether to use libgcc])
AC_ARG_ENABLE(libgcc,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
2012-12-04 01:40:26 +04:00
[ case "$enableval" in
yes)
2024-08-21 12:08:54 +03:00
LIBS="-lgcc $LIBS"
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
2012-12-04 01:40:26 +04:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
2012-12-04 01:40:26 +04:00
)
2009-05-03 21:35:44 +04:00
CURL_CHECK_LIB_XNET
2009-04-30 22:35:36 +04:00
2004-02-06 15:13:20 +03:00
dnl gethostbyname without lib or in the nsl lib?
AC_CHECK_FUNC(gethostbyname,
2024-08-21 12:08:54 +03:00
[
HAVE_GETHOSTBYNAME="1"
],
[
AC_CHECK_LIB(nsl, gethostbyname,
[
HAVE_GETHOSTBYNAME="1"
LIBS="-lnsl $LIBS"
]
)
]
)
if test "$HAVE_GETHOSTBYNAME" != "1"; then
2000-11-08 17:27:46 +03:00
dnl gethostbyname in the socket lib?
2004-02-06 15:13:20 +03:00
AC_CHECK_LIB(socket, gethostbyname,
2024-08-21 12:08:54 +03:00
[
HAVE_GETHOSTBYNAME="1"
LIBS="-lsocket $LIBS"
]
)
2000-11-08 17:27:46 +03:00
fi
2024-08-21 12:08:54 +03:00
if test "$HAVE_GETHOSTBYNAME" != "1"; then
2012-03-23 02:33:33 +04:00
dnl gethostbyname in the watt lib?
AC_CHECK_LIB(watt, gethostbyname,
2024-08-21 12:08:54 +03:00
[
HAVE_GETHOSTBYNAME="1"
2024-09-06 16:14:26 +03:00
CPPFLAGS="-I${WATT_ROOT}/inc"
LDFLAGS="-L${WATT_ROOT}/lib"
2024-08-21 12:08:54 +03:00
LIBS="-lwatt $LIBS"
]
)
2012-03-23 02:33:33 +04:00
fi
2004-02-06 15:13:20 +03:00
dnl At least one system has been identified to require BOTH nsl and socket
dnl libs at the same time to link properly.
2024-08-21 12:08:54 +03:00
if test "$HAVE_GETHOSTBYNAME" != "1"; then
2004-05-06 19:04:04 +04:00
AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
2000-07-25 11:29:32 +04:00
my_ac_save_LIBS=$LIBS
LIBS="-lnsl -lsocket $LIBS"
2008-05-20 19:55:31 +04:00
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
]],[[
gethostbyname();
]])
],[
AC_MSG_RESULT([yes])
HAVE_GETHOSTBYNAME="1"
],[
AC_MSG_RESULT([no])
LIBS=$my_ac_save_LIBS
])
2004-02-06 15:13:20 +03:00
fi
2000-07-25 11:29:32 +04:00
2024-08-21 12:08:54 +03:00
if test "$HAVE_GETHOSTBYNAME" != "1"; then
tidy-up: OS names
Use these words and casing more consistently across text, comments and
one curl tool output:
AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux,
macOS, MS-DOS, MSYS, MinGW, NTLM, POSIX, Solaris, UNIX, Unix, Unicode,
WINE, WebDAV, Win32, winbind, WinIDN, Windows, Windows CE, Winsock.
Mostly OS names and a few more.
Also a couple of other minor text fixups.
Closes #14360
2024-08-03 02:09:57 +03:00
dnl This is for Winsock systems
2023-12-09 23:37:11 +03:00
if test "$curl_cv_native_windows" = "yes"; then
winsock_LIB="-lws2_32"
2008-05-19 00:13:13 +04:00
if test ! -z "$winsock_LIB"; then
my_ac_save_LIBS=$LIBS
2012-12-04 01:40:26 +04:00
LIBS="$winsock_LIB $LIBS"
2008-05-19 00:13:13 +04:00
AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
2008-05-20 19:55:31 +04:00
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
2023-12-09 23:37:11 +03:00
#ifdef _WIN32
2008-05-19 00:13:13 +04:00
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <winsock2.h>
#endif
2008-05-20 19:55:31 +04:00
]],[[
2023-09-29 15:01:17 +03:00
gethostbyname("localhost");
2008-05-20 19:55:31 +04:00
]])
],[
AC_MSG_RESULT([yes])
HAVE_GETHOSTBYNAME="1"
],[
AC_MSG_RESULT([no])
winsock_LIB=""
LIBS=$my_ac_save_LIBS
2008-05-19 00:13:13 +04:00
])
fi
fi
2006-07-20 02:27:49 +04:00
fi
2024-08-21 12:08:54 +03:00
if test "$HAVE_GETHOSTBYNAME" != "1"; then
2007-05-17 10:04:44 +04:00
dnl This is for Minix 3.1
AC_MSG_CHECKING([for gethostbyname for Minix 3])
2008-05-20 19:55:31 +04:00
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
2007-05-17 10:04:44 +04:00
/* Older Minix versions may need <net/gen/netdb.h> here instead */
2008-05-20 19:55:31 +04:00
#include <netdb.h>
]],[[
2023-09-29 15:01:17 +03:00
gethostbyname("localhost");
2008-05-20 19:55:31 +04:00
]])
],[
AC_MSG_RESULT([yes])
HAVE_GETHOSTBYNAME="1"
],[
AC_MSG_RESULT([no])
])
2007-05-17 10:04:44 +04:00
fi
2024-08-21 12:08:54 +03:00
if test "$HAVE_GETHOSTBYNAME" != "1"; then
2006-07-20 02:27:49 +04:00
dnl This is for eCos with a stubbed DNS implementation
AC_MSG_CHECKING([for gethostbyname for eCos])
2008-05-20 19:55:31 +04:00
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
2006-07-20 02:27:49 +04:00
#include <stdio.h>
2008-05-20 19:55:31 +04:00
#include <netdb.h>
]],[[
2023-09-29 15:01:17 +03:00
gethostbyname("localhost");
2008-05-20 19:55:31 +04:00
]])
],[
AC_MSG_RESULT([yes])
HAVE_GETHOSTBYNAME="1"
],[
AC_MSG_RESULT([no])
])
2004-02-06 15:13:20 +03:00
fi
2024-08-21 12:08:54 +03:00
if test "$HAVE_GETHOSTBYNAME" != "1" -o "${with_amissl+set}" = set; then
2019-03-08 03:06:59 +03:00
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([[
2022-08-07 19:15:16 +03:00
#define __USE_INLINE__
2020-11-18 21:44:35 +03:00
#include <proto/bsdsocket.h>
2022-08-07 19:15:16 +03:00
#ifdef __amigaos4__
struct SocketIFace *ISocket = NULL;
#else
2020-11-18 21:44:35 +03:00
struct Library *SocketBase = NULL;
2022-08-07 19:15:16 +03:00
#endif
2019-03-08 03:06:59 +03:00
]],[[
2023-09-29 15:01:17 +03:00
gethostbyname("localhost");
2019-03-08 03:06:59 +03:00
]])
],[
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
2024-08-21 12:08:54 +03:00
if test "$HAVE_GETHOSTBYNAME" != "1"; then
2008-05-26 19:09:28 +04:00
dnl gethostbyname in the network lib - for Haiku OS
AC_CHECK_LIB(network, gethostbyname,
2024-08-21 12:08:54 +03:00
[
HAVE_GETHOSTBYNAME="1"
LIBS="-lnetwork $LIBS"
]
)
2008-05-26 19:09:28 +04:00
fi
2008-11-18 04:57:28 +03:00
if test "$HAVE_GETHOSTBYNAME" != "1"; then
2004-02-06 15:13:20 +03:00
AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
2000-07-25 11:29:32 +04:00
fi
2009-06-20 21:24:43 +04:00
CURL_CHECK_LIBS_CONNECT
1999-12-29 17:20:26 +03:00
2010-08-09 07:45:11 +04:00
CURL_NETWORK_LIBS=$LIBS
2008-05-10 19:46:08 +04:00
dnl **********************************************************************
2008-05-12 06:04:21 +04:00
dnl In case that function clock_gettime with monotonic timer is available,
dnl check for additional required libraries.
2008-05-10 19:46:08 +04:00
dnl **********************************************************************
2008-05-12 06:04:21 +04:00
CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
2008-05-10 19:46:08 +04:00
2023-06-09 21:42:51 +03:00
dnl Check for even better option
CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC_RAW
2007-02-17 11:49:04 +03:00
dnl **********************************************************************
dnl The preceding library checks are all potentially useful for test
2012-11-28 21:31:23 +04:00
dnl servers and libtest cases which require networking and clock_gettime
dnl support. Save the list of required libraries at this point for use
dnl while linking those test servers and programs.
2007-02-17 11:49:04 +03:00
dnl **********************************************************************
2012-11-28 21:31:23 +04:00
CURL_NETWORK_AND_TIME_LIBS=$LIBS
1999-12-29 17:20:26 +03:00
2007-02-17 11:49:04 +03:00
dnl **********************************************************************
2012-12-04 01:40:26 +04:00
dnl Check for the presence of ZLIB libraries and headers
dnl **********************************************************************
dnl Check for & handle argument to --with-zlib.
clean_CPPFLAGS=$CPPFLAGS
clean_LDFLAGS=$LDFLAGS
clean_LIBS=$LIBS
ZLIB_LIBS=""
AC_ARG_WITH(zlib,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
AS_HELP_STRING([--without-zlib],[disable use of zlib]),
2024-08-21 12:08:54 +03:00
[OPT_ZLIB="$withval"])
2012-12-04 01:40:26 +04:00
2024-08-21 12:08:54 +03:00
if test "$OPT_ZLIB" = "no"; then
AC_MSG_WARN([zlib disabled])
2012-12-04 01:40:26 +04:00
else
2024-08-21 12:08:54 +03:00
if test "$OPT_ZLIB" = "yes"; then
2012-12-04 01:40:26 +04:00
OPT_ZLIB=""
fi
2024-08-21 12:08:54 +03:00
if test -z "$OPT_ZLIB"; then
2017-02-27 01:39:12 +03:00
CURL_CHECK_PKGCONFIG(zlib)
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2023-09-01 02:06:02 +03:00
ZLIB_LIBS="`$PKGCONFIG --libs-only-l zlib`"
if test -n "$ZLIB_LIBS"; then
LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`"
else
ZLIB_LIBS="`$PKGCONFIG --libs zlib`"
fi
LIBS="$ZLIB_LIBS $LIBS"
CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags zlib`"
2017-02-27 01:39:12 +03:00
OPT_ZLIB=""
HAVE_LIBZ="1"
fi
2012-12-04 01:40:26 +04:00
2016-08-11 18:49:48 +03:00
if test -z "$HAVE_LIBZ"; then
dnl Check for the lib without setting any new path, since many
dnl people have it in the default path
AC_CHECK_LIB(z, inflateEnd,
2024-08-21 12:08:54 +03:00
dnl libz found, set the variable
[
HAVE_LIBZ="1"
ZLIB_LIBS="-lz"
LIBS="$ZLIB_LIBS $LIBS"
],
dnl if no lib found, try /usr/local
[
OPT_ZLIB="/usr/local"
]
)
2016-08-11 18:49:48 +03:00
fi
2012-12-04 01:40:26 +04:00
fi
dnl Add a nonempty path to the compiler flags
if test -n "$OPT_ZLIB"; then
2024-08-21 12:08:54 +03:00
CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
2012-12-04 01:40:26 +04:00
fi
AC_CHECK_HEADER(zlib.h,
[
2024-08-21 12:08:54 +03:00
dnl zlib.h was found
HAVE_ZLIB_H="1"
dnl if the lib wasn't found already, try again with the new paths
if test "$HAVE_LIBZ" != "1"; then
AC_CHECK_LIB(z, gzread,
[
dnl the lib was found!
HAVE_LIBZ="1"
ZLIB_LIBS="-lz"
LIBS="$ZLIB_LIBS $LIBS"
],
[
CPPFLAGS=$clean_CPPFLAGS
LDFLAGS=$clean_LDFLAGS
]
)
fi
2012-12-04 01:40:26 +04:00
],
[
dnl zlib.h was not found, restore the flags
CPPFLAGS=$clean_CPPFLAGS
LDFLAGS=$clean_LDFLAGS]
)
2024-08-21 12:08:54 +03:00
if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"; then
2012-12-04 01:40:26 +04:00
AC_MSG_WARN([configure found only the libz lib, not the header file!])
HAVE_LIBZ=""
CPPFLAGS=$clean_CPPFLAGS
LDFLAGS=$clean_LDFLAGS
LIBS=$clean_LIBS
2023-09-01 02:06:02 +03:00
ZLIB_LIBS=""
2024-08-21 12:08:54 +03:00
elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"; then
2012-12-04 01:40:26 +04:00
AC_MSG_WARN([configure found only the libz header file, not the lib!])
CPPFLAGS=$clean_CPPFLAGS
LDFLAGS=$clean_LDFLAGS
LIBS=$clean_LIBS
2023-09-01 02:06:02 +03:00
ZLIB_LIBS=""
2024-08-21 12:08:54 +03:00
elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"; then
2012-12-04 01:40:26 +04:00
dnl both header and lib were found!
AC_SUBST(HAVE_LIBZ)
AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
2023-09-01 02:06:02 +03:00
LIBS="$ZLIB_LIBS $clean_LIBS"
2012-12-04 01:40:26 +04:00
dnl replace 'HAVE_LIBZ' in the automake makefile.ams
AMFIXLIB="1"
AC_MSG_NOTICE([found both libz and libz.h header])
2024-06-08 01:41:24 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE zlib"
2012-12-04 01:40:26 +04:00
curl_zlib_msg="enabled"
fi
fi
dnl set variable for use in automakefile(s)
AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
AC_SUBST(ZLIB_LIBS)
2003-03-12 16:42:07 +03:00
2017-11-05 17:28:16 +03:00
dnl **********************************************************************
dnl Check for the presence of BROTLI decoder libraries and headers
dnl **********************************************************************
dnl Brotli project home page: https://github.com/google/brotli
dnl Default to compiler & linker defaults for BROTLI files & libraries.
OPT_BROTLI=off
AC_ARG_WITH(brotli,dnl
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-brotli=PATH],[Where to look for brotli, PATH points to the BROTLI installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--without-brotli], [disable BROTLI]),
2017-11-05 17:28:16 +03:00
OPT_BROTLI=$withval)
if test X"$OPT_BROTLI" != Xno; then
dnl backup the pre-brotli variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
case "$OPT_BROTLI" in
2024-08-21 12:08:54 +03:00
yes)
dnl --with-brotli (without path) used
CURL_CHECK_PKGCONFIG(libbrotlidec)
if test "$PKGCONFIG" != "no"; then
LIB_BROTLI=`$PKGCONFIG --libs-only-l libbrotlidec`
LD_BROTLI=`$PKGCONFIG --libs-only-L libbrotlidec`
CPP_BROTLI=`$PKGCONFIG --cflags-only-I libbrotlidec`
version=`$PKGCONFIG --modversion libbrotlidec`
DIR_BROTLI=`echo $LD_BROTLI | $SED -e 's/^-L//'`
fi
2017-11-05 17:28:16 +03:00
2024-08-21 12:08:54 +03:00
;;
off)
dnl no --with-brotli option given, just check default places
;;
*)
dnl use the given --with-brotli spot
PREFIX_BROTLI=$OPT_BROTLI
;;
2017-11-05 17:28:16 +03:00
esac
dnl if given with a prefix, we set -L and -I based on that
if test -n "$PREFIX_BROTLI"; then
LIB_BROTLI="-lbrotlidec"
LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff
CPP_BROTLI=-I${PREFIX_BROTLI}/include
DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff
fi
LDFLAGS="$LDFLAGS $LD_BROTLI"
CPPFLAGS="$CPPFLAGS $CPP_BROTLI"
LIBS="$LIB_BROTLI $LIBS"
AC_CHECK_LIB(brotlidec, BrotliDecoderDecompress)
AC_CHECK_HEADERS(brotli/decode.h,
curl_brotli_msg="enabled (libbrotlidec)"
HAVE_BROTLI=1
AC_DEFINE(HAVE_BROTLI, 1, [if BROTLI is in use])
AC_SUBST(HAVE_BROTLI, [1])
)
if test X"$OPT_BROTLI" != Xoff &&
test "$HAVE_BROTLI" != "1"; then
AC_MSG_ERROR([BROTLI libs and/or directories were not found where specified!])
fi
if test "$HAVE_BROTLI" = "1"; then
if test -n "$DIR_BROTLI"; then
2024-08-21 12:08:54 +03:00
dnl when the brotli shared libs were found in a path that the run-time
dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
dnl to prevent further configure tests to fail due to this
if test "x$cross_compiling" != "xyes"; then
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_BROTLI"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_BROTLI to CURL_LIBRARY_PATH])
fi
2017-11-05 17:28:16 +03:00
fi
2024-06-08 01:41:24 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libbrotlidec"
2017-11-05 17:28:16 +03:00
else
dnl no brotli, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
fi
fi
2020-05-25 18:49:46 +03:00
dnl **********************************************************************
dnl Check for libzstd
dnl **********************************************************************
dnl Default to compiler & linker defaults for libzstd
OPT_ZSTD=off
AC_ARG_WITH(zstd,dnl
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-zstd=PATH],[Where to look for libzstd, PATH points to the libzstd installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--without-zstd], [disable libzstd]),
2020-05-25 18:49:46 +03:00
OPT_ZSTD=$withval)
if test X"$OPT_ZSTD" != Xno; then
dnl backup the pre-zstd variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
case "$OPT_ZSTD" in
2024-08-21 12:08:54 +03:00
yes)
dnl --with-zstd (without path) used
CURL_CHECK_PKGCONFIG(libzstd)
if test "$PKGCONFIG" != "no"; then
LIB_ZSTD=`$PKGCONFIG --libs-only-l libzstd`
LD_ZSTD=`$PKGCONFIG --libs-only-L libzstd`
CPP_ZSTD=`$PKGCONFIG --cflags-only-I libzstd`
version=`$PKGCONFIG --modversion libzstd`
DIR_ZSTD=`echo $LD_ZSTD | $SED -e 's/-L//'`
fi
2020-05-25 18:49:46 +03:00
2024-08-21 12:08:54 +03:00
;;
off)
dnl no --with-zstd option given, just check default places
;;
*)
dnl use the given --with-zstd spot
PREFIX_ZSTD=$OPT_ZSTD
;;
2020-05-25 18:49:46 +03:00
esac
dnl if given with a prefix, we set -L and -I based on that
if test -n "$PREFIX_ZSTD"; then
LIB_ZSTD="-lzstd"
LD_ZSTD=-L${PREFIX_ZSTD}/lib$libsuff
CPP_ZSTD=-I${PREFIX_ZSTD}/include
DIR_ZSTD=${PREFIX_ZSTD}/lib$libsuff
fi
LDFLAGS="$LDFLAGS $LD_ZSTD"
CPPFLAGS="$CPPFLAGS $CPP_ZSTD"
LIBS="$LIB_ZSTD $LIBS"
AC_CHECK_LIB(zstd, ZSTD_createDStream)
AC_CHECK_HEADERS(zstd.h,
curl_zstd_msg="enabled (libzstd)"
HAVE_ZSTD=1
AC_DEFINE(HAVE_ZSTD, 1, [if libzstd is in use])
AC_SUBST(HAVE_ZSTD, [1])
)
if test X"$OPT_ZSTD" != Xoff &&
test "$HAVE_ZSTD" != "1"; then
AC_MSG_ERROR([libzstd was not found where specified!])
fi
if test "$HAVE_ZSTD" = "1"; then
if test -n "$DIR_ZSTD"; then
2024-08-21 12:08:54 +03:00
dnl when the zstd shared lib 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 due to
dnl this
if test "x$cross_compiling" != "xyes"; then
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_ZSTD"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_ZSTD to CURL_LIBRARY_PATH])
fi
2020-05-25 18:49:46 +03:00
fi
2024-06-24 21:29:02 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libzstd"
2020-05-25 18:49:46 +03:00
else
dnl no zstd, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
fi
fi
2004-02-16 01:34:58 +03:00
dnl **********************************************************************
2007-08-12 00:57:54 +04:00
dnl Check for LDAP
2005-03-11 08:28:07 +03:00
dnl **********************************************************************
LDAPLIBNAME=""
AC_ARG_WITH(ldap-lib,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
2024-08-21 12:08:54 +03:00
[LDAPLIBNAME="$withval"])
2005-03-11 08:28:07 +03:00
LBERLIBNAME=""
AC_ARG_WITH(lber-lib,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
2024-08-21 12:08:54 +03:00
[LBERLIBNAME="$withval"])
2005-03-11 08:28:07 +03:00
2024-08-21 12:08:54 +03:00
if test x$CURL_DISABLE_LDAP != x1; then
2005-03-11 08:28:07 +03:00
2007-10-14 06:37:04 +04:00
CURL_CHECK_HEADER_LBER
CURL_CHECK_HEADER_LDAP
CURL_CHECK_HEADER_LDAP_SSL
2007-10-10 03:44:14 +04:00
2024-08-21 12:08:54 +03:00
if test -z "$LDAPLIBNAME"; then
2016-04-15 17:37:20 +03:00
if test "$curl_cv_native_windows" = "yes"; then
2010-06-04 17:14:31 +04:00
dnl Windows uses a single and unique LDAP library name
LDAPLIBNAME="wldap32"
LBERLIBNAME="no"
fi
2005-03-11 08:28:07 +03:00
fi
2024-08-21 12:08:54 +03:00
if test "$LDAPLIBNAME"; then
2007-08-12 00:57:54 +04:00
AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
2021-05-12 12:15:51 +03:00
if test -n "$ldap_askedfor"; then
AC_MSG_ERROR([couldn't detect the LDAP libraries])
fi
2007-08-12 00:57:54 +04:00
AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
2012-05-30 19:40:13 +04:00
AC_SUBST(CURL_DISABLE_LDAP, [1])
2008-03-20 23:08:44 +03:00
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
2012-05-30 19:40:13 +04:00
AC_SUBST(CURL_DISABLE_LDAPS, [1])])
2005-03-11 08:28:07 +03:00
else
2007-10-15 01:25:10 +04:00
dnl Try to find the right ldap libraries for this system
CURL_CHECK_LIBS_LDAP
case X-"$curl_cv_ldap_LIBS" in
X-unknown)
2021-05-12 12:15:51 +03:00
if test -n "$ldap_askedfor"; then
AC_MSG_ERROR([couldn't detect the LDAP libraries])
fi
2007-10-15 01:25:10 +04:00
AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])
2008-03-20 23:08:44 +03:00
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
AC_SUBST(CURL_DISABLE_LDAPS, [1])
2007-10-15 01:25:10 +04:00
;;
esac
2005-03-11 08:28:07 +03:00
fi
2007-08-12 00:57:54 +04:00
fi
2024-08-21 12:08:54 +03:00
if test x$CURL_DISABLE_LDAP != x1; then
2005-03-11 08:28:07 +03:00
2024-08-21 12:08:54 +03:00
if test "$LBERLIBNAME"; then
2007-08-12 00:57:54 +04:00
dnl If name is "no" then don't define this library at all
2005-03-11 08:28:07 +03:00
dnl (it's only needed if libldap.so's dependencies are broken).
2024-08-21 12:08:54 +03:00
if test "$LBERLIBNAME" != "no"; then
2007-08-12 00:57:54 +04:00
AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
2012-05-30 19:40:13 +04:00
AC_SUBST(CURL_DISABLE_LDAP, [1])
2008-03-20 23:08:44 +03:00
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
2012-05-30 19:40:13 +04:00
AC_SUBST(CURL_DISABLE_LDAPS, [1])])
2005-03-11 08:28:07 +03:00
fi
2007-08-12 00:57:54 +04:00
fi
fi
2024-08-21 12:08:54 +03:00
if test x$CURL_DISABLE_LDAP != x1; then
2023-06-22 15:34:49 +03:00
AC_CHECK_FUNCS([ldap_url_parse \
ldap_init_fd])
2007-08-12 00:57:54 +04:00
if test "$LDAPLIBNAME" = "wldap32"; then
2007-08-31 00:28:40 +04:00
curl_ldap_msg="enabled (winldap)"
2015-01-18 23:25:37 +03:00
AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation])
2007-08-12 00:57:54 +04:00
else
2010-06-01 23:26:19 +04:00
if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
2023-06-22 15:34:49 +03:00
curl_ldap_msg="enabled (OpenLDAP)"
2010-05-25 02:44:42 +04:00
AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
2010-05-28 14:23:28 +04:00
AC_SUBST(USE_OPENLDAP, [1])
2023-06-22 15:34:49 +03:00
else
curl_ldap_msg="enabled (ancient OpenLDAP)"
2010-05-25 02:44:42 +04:00
fi
2005-03-11 08:28:07 +03:00
fi
fi
2024-08-21 12:08:54 +03:00
if test x$CURL_DISABLE_LDAPS != x1; then
curl_ldaps_msg="enabled"
2010-09-21 09:27:11 +04:00
fi
2003-10-02 23:04:32 +04:00
dnl **********************************************************************
dnl Checks for IPv6
dnl **********************************************************************
2014-12-27 14:09:01 +03:00
AC_MSG_CHECKING([whether to enable IPv6])
2003-10-02 23:04:32 +04:00
AC_ARG_ENABLE(ipv6,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-ipv6],[Enable IPv6 (with IPv4) support])
AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
2003-10-02 23:04:32 +04:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
ipv6=no
;;
*)
AC_MSG_RESULT(yes)
ipv6=yes
;;
2003-10-02 23:04:32 +04:00
esac ],
2021-03-16 01:11:29 +03:00
AC_RUN_IFELSE([AC_LANG_SOURCE([[
/* are AF_INET6 and sockaddr_in6 available? */
2003-10-02 23:04:32 +04:00
#include <sys/types.h>
2023-12-09 23:37:11 +03:00
#ifdef _WIN32
2015-09-17 21:03:34 +03:00
#include <winsock2.h>
2019-11-30 17:49:32 +03:00
#include <ws2tcpip.h>
2015-09-17 21:03:34 +03:00
#else
2003-10-02 23:04:32 +04:00
#include <sys/socket.h>
2019-11-30 17:49:32 +03:00
#include <netinet/in.h>
#if defined (__TANDEM)
# include <netinet/in6.h>
#endif
2015-09-17 21:03:34 +03:00
#endif
2023-12-29 08:43:33 +03:00
int main(void)
2003-10-02 23:04:32 +04:00
{
2019-11-30 17:49:32 +03:00
struct sockaddr_in6 s;
(void)s;
2023-12-29 08:43:33 +03:00
return socket(AF_INET6, SOCK_STREAM, 0) < 0;
2003-10-02 23:04:32 +04:00
}
2021-03-16 01:11:29 +03:00
]])
2013-01-08 22:02:08 +04:00
],
AC_MSG_RESULT(yes)
ipv6=yes,
AC_MSG_RESULT(no)
ipv6=no,
2016-01-12 12:30:54 +03:00
AC_MSG_RESULT(yes)
ipv6=yes
2013-01-08 22:02:08 +04:00
))
2003-10-02 23:04:32 +04:00
2008-12-27 07:30:36 +03:00
if test "$ipv6" = yes; then
2004-04-26 16:29:30 +04:00
curl_ipv6_msg="enabled"
2024-04-11 15:01:58 +03:00
AC_DEFINE(USE_IPV6, 1, [Define if you want to enable IPv6 support])
2019-11-30 17:49:32 +03:00
IPV6_ENABLED=1
AC_SUBST(IPV6_ENABLED)
2003-10-02 23:04:32 +04:00
2008-12-27 07:30:36 +03:00
AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
2021-03-16 01:11:29 +03:00
AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[
2008-12-27 07:30:36 +03:00
#include <sys/types.h>
2023-12-09 23:37:11 +03:00
#ifdef _WIN32
2015-09-17 21:03:34 +03:00
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#include <netinet/in.h>
2017-12-05 19:41:27 +03:00
#if defined (__TANDEM)
# include <netinet/in6.h>
#endif
2021-03-16 01:11:29 +03:00
#endif
]], [[
struct sockaddr_in6 s;
s.sin6_scope_id = 0;
]])], [
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
], [
2008-12-30 11:05:38 +03:00
AC_MSG_RESULT([no])
2024-08-21 12:08:54 +03:00
])
2008-12-27 07:30:36 +03:00
fi
2003-01-29 16:16:03 +03:00
dnl **********************************************************************
dnl Check if the operating system allows programs to write to their own argv[]
dnl **********************************************************************
AC_MSG_CHECKING([if argv can be written to])
2020-05-28 17:32:07 +03:00
CURL_RUN_IFELSE([[
int main(int argc, char **argv)
{
2023-04-06 10:58:13 +03:00
#ifdef _WIN32
/* on Windows, writing to the argv does not hide the argument in
process lists so it can just be skipped */
(void)argc;
(void)argv;
return 1;
#else
2020-05-28 17:32:07 +03:00
(void)argc;
argv[0][0] = ' ';
return (argv[0][0] == ' ')?0:1;
2023-04-06 10:58:13 +03:00
#endif
2003-01-29 16:16:03 +03:00
}
2020-05-28 17:32:07 +03:00
]],[
2010-11-13 06:15:48 +03:00
curl_cv_writable_argv=yes
],[
curl_cv_writable_argv=no
],[
curl_cv_writable_argv=cross
2003-11-17 08:23:06 +03:00
])
case $curl_cv_writable_argv in
2024-08-21 12:08:54 +03:00
yes)
AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
AC_MSG_RESULT(yes)
;;
no)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT(no)
AC_MSG_WARN([the previous check could not be made default was used])
;;
2003-11-17 08:23:06 +03:00
esac
2003-01-29 16:16:03 +03:00
2003-06-10 16:22:19 +04:00
dnl **********************************************************************
dnl Check for GSS-API libraries
dnl **********************************************************************
2014-03-03 14:06:38 +04:00
dnl check for GSS-API stuff in the /usr as default
2007-11-28 13:33:47 +03:00
GSSAPI_ROOT="/usr"
2003-06-10 16:22:19 +04:00
AC_ARG_WITH(gssapi-includes,
2024-08-21 12:08:54 +03:00
AS_HELP_STRING([--with-gssapi-includes=DIR], [Specify location of GSS-API headers]), [
GSSAPI_INCS="-I$withval"
want_gss="yes"
]
2003-06-10 16:22:19 +04:00
)
AC_ARG_WITH(gssapi-libs,
2024-08-21 12:08:54 +03:00
AS_HELP_STRING([--with-gssapi-libs=DIR], [Specify location of GSS-API libs]), [
GSSAPI_LIB_DIR="-L$withval"
want_gss="yes"
]
2003-06-10 16:22:19 +04:00
)
AC_ARG_WITH(gssapi,
2024-08-21 12:08:54 +03:00
AS_HELP_STRING([--with-gssapi=DIR], [Where to look for GSS-API]), [
GSSAPI_ROOT="$withval"
if test x"$GSSAPI_ROOT" != xno; then
want_gss="yes"
if test x"$GSSAPI_ROOT" = xyes; then
dnl if yes, then use default root
GSSAPI_ROOT="/usr"
fi
2007-11-28 13:33:47 +03:00
fi
2024-08-21 12:08:54 +03:00
]
)
2003-06-10 16:22:19 +04:00
2022-02-16 20:56:02 +03:00
: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
2005-09-01 01:23:47 +04:00
save_CPPFLAGS="$CPPFLAGS"
2014-03-03 14:06:38 +04:00
AC_MSG_CHECKING([if GSS-API support is requested])
2003-06-10 16:22:19 +04:00
if test x"$want_gss" = xyes; then
2005-08-29 12:42:45 +04:00
AC_MSG_RESULT(yes)
2022-02-16 20:56:02 +03:00
if test $GSSAPI_ROOT != "/usr"; then
CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig)
else
CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
fi
2003-06-10 16:22:19 +04:00
if test -z "$GSSAPI_INCS"; then
2024-08-21 12:08:54 +03:00
if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
elif test "$PKGCONFIG" != "no"; then
GSSAPI_INCS=`$PKGCONFIG --cflags mit-krb5-gssapi`
elif test -f "$KRB5CONFIG"; then
GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
elif test "$GSSAPI_ROOT" != "yes"; then
GSSAPI_INCS="-I$GSSAPI_ROOT/include"
fi
2003-06-10 16:22:19 +04:00
fi
2007-11-28 13:33:47 +03:00
2003-09-22 02:13:23 +04:00
CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
2005-08-29 12:42:45 +04:00
AC_CHECK_HEADER(gss.h,
[
dnl found in the given dirs
2014-03-03 14:06:38 +04:00
AC_DEFINE(HAVE_GSSGNU, 1, [if you have GNU GSS])
2005-08-29 12:42:45 +04:00
gnu_gss=yes
],
[
2008-04-07 13:26:30 +04:00
dnl not found, check Heimdal or MIT
2010-04-16 17:09:32 +04:00
AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
2008-04-07 13:26:30 +04:00
AC_CHECK_HEADERS(
2010-04-16 17:09:32 +04:00
[gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
2008-04-07 13:26:30 +04:00
[],
2010-04-16 17:09:32 +04:00
[not_mit=1],
[
AC_INCLUDES_DEFAULT
#ifdef HAVE_GSSAPI_GSSAPI_H
#include <gssapi/gssapi.h>
#endif
])
2008-04-07 13:26:30 +04:00
if test "x$not_mit" = "x1"; then
dnl MIT not found, check for Heimdal
AC_CHECK_HEADER(gssapi.h,
2024-08-21 12:08:54 +03:00
[],
[
dnl no header found, disabling GSS
want_gss=no
AC_MSG_WARN(disabling GSS-API support since no header files were found)
]
)
2008-04-07 13:26:30 +04:00
else
dnl MIT found
2014-03-03 14:06:38 +04:00
dnl check if we have a really old MIT Kerberos version (<= 1.2)
AC_MSG_CHECKING([if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE])
2008-08-03 05:01:05 +04:00
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
2008-04-07 13:26:30 +04:00
#include <gssapi/gssapi.h>
#include <gssapi/gssapi_generic.h>
#include <gssapi/gssapi_krb5.h>
2008-08-03 05:01:05 +04:00
]],[[
2008-04-07 13:26:30 +04:00
gss_import_name(
(OM_uint32 *)0,
(gss_buffer_t)0,
GSS_C_NT_HOSTBASED_SERVICE,
(gss_name_t *)0);
2008-08-03 05:01:05 +04:00
]])
],[
AC_MSG_RESULT([yes])
],[
AC_MSG_RESULT([no])
AC_DEFINE(HAVE_OLD_GSSMIT, 1,
2014-03-03 14:06:38 +04:00
[if you have an old MIT Kerberos version, lacking GSS_C_NT_HOSTBASED_SERVICE])
2008-08-03 05:01:05 +04:00
])
2008-04-07 13:26:30 +04:00
fi
2005-08-29 12:42:45 +04:00
]
)
else
AC_MSG_RESULT(no)
fi
if test x"$want_gss" = xyes; then
2014-03-03 14:06:38 +04:00
AC_DEFINE(HAVE_GSSAPI, 1, [if you have GSS-API libraries])
2014-07-21 11:53:45 +04:00
HAVE_GSSAPI=1
2014-03-03 14:06:38 +04:00
curl_gss_msg="enabled (MIT Kerberos/Heimdal)"
2005-08-29 12:42:45 +04:00
if test -n "$gnu_gss"; then
curl_gss_msg="enabled (GNU GSS)"
2008-03-10 12:56:49 +03:00
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
2012-12-04 01:40:26 +04:00
LIBS="-lgss $LIBS"
2005-08-29 12:42:45 +04:00
elif test -z "$GSSAPI_LIB_DIR"; then
2024-08-21 12:08:54 +03:00
case $host in
*-*-darwin*)
2012-12-04 01:40:26 +04:00
LIBS="-lgssapi_krb5 -lresolv $LIBS"
2010-03-03 01:02:56 +03:00
;;
2024-08-21 12:08:54 +03:00
*)
2022-02-16 20:56:02 +03:00
if test $GSSAPI_ROOT != "/usr"; then
CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig)
else
CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
fi
2014-06-15 14:42:30 +04:00
if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
2024-08-21 12:08:54 +03:00
dnl krb5-config doesn't have --libs-only-L or similar, put everything
dnl into LIBS
gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
LIBS="$gss_libs $LIBS"
elif test "$PKGCONFIG" != "no"; then
gss_libs=`$PKGCONFIG --libs mit-krb5-gssapi`
LIBS="$gss_libs $LIBS"
2022-02-16 20:56:02 +03:00
elif test -f "$KRB5CONFIG"; then
2024-08-21 12:08:54 +03:00
dnl krb5-config doesn't have --libs-only-L or similar, put everything
dnl into LIBS
gss_libs=`$KRB5CONFIG --libs gssapi`
LIBS="$gss_libs $LIBS"
2010-03-03 01:02:56 +03:00
else
2024-08-21 12:08:54 +03:00
case $host in
*-hp-hpux*)
2014-08-08 14:03:58 +04:00
gss_libname="gss"
;;
2024-08-21 12:08:54 +03:00
*)
2014-08-08 14:03:58 +04:00
gss_libname="gssapi"
;;
2024-08-21 12:08:54 +03:00
esac
if test "$GSSAPI_ROOT" != "yes"; then
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
LIBS="-l$gss_libname $LIBS"
else
LIBS="-l$gss_libname $LIBS"
fi
2010-03-03 01:02:56 +03:00
fi
;;
2024-08-21 12:08:54 +03:00
esac
2003-06-10 16:22:19 +04:00
else
2024-08-21 12:08:54 +03:00
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
case $host in
*-hp-hpux*)
2014-01-16 20:19:00 +04:00
LIBS="-lgss $LIBS"
;;
2024-08-21 12:08:54 +03:00
*)
2014-01-16 20:19:00 +04:00
LIBS="-lgssapi $LIBS"
;;
2024-08-21 12:08:54 +03:00
esac
2003-06-10 16:22:19 +04:00
fi
else
2005-08-29 12:42:45 +04:00
CPPFLAGS="$save_CPPFLAGS"
2003-06-10 16:22:19 +04:00
fi
2007-08-20 23:30:25 +04:00
2022-02-16 20:56:02 +03:00
if test x"$want_gss" = xyes; then
AC_MSG_CHECKING([if we can link against GSS-API library])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([gss_init_sec_context])
],[
AC_MSG_RESULT([yes])
],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([--with-gssapi was specified, but a GSS-API library was not found.])
])
fi
2017-07-18 21:46:21 +03:00
build_libstubgss=no
if test x"$want_gss" = "xyes"; then
build_libstubgss=yes
fi
AM_CONDITIONAL(BUILD_STUB_GSS, test "x$build_libstubgss" = "xyes")
2017-08-24 23:26:48 +03:00
dnl -------------------------------------------------------------
dnl parse --with-default-ssl-backend so it can be validated below
dnl -------------------------------------------------------------
DEFAULT_SSL_BACKEND=no
VALID_DEFAULT_SSL_BACKEND=
AC_ARG_WITH(default-ssl-backend,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-default-ssl-backend=NAME],[Use NAME as default SSL backend])
AS_HELP_STRING([--without-default-ssl-backend],[Use implicit default SSL backend]),
2017-08-24 23:26:48 +03:00
[DEFAULT_SSL_BACKEND=$withval])
case "$DEFAULT_SSL_BACKEND" in
no)
dnl --without-default-ssl-backend option used
;;
default|yes)
dnl --with-default-ssl-backend option used without name
AC_MSG_ERROR([The name of the default SSL backend is required.])
;;
*)
dnl --with-default-ssl-backend option used with name
AC_SUBST(DEFAULT_SSL_BACKEND)
dnl needs to be validated below
VALID_DEFAULT_SSL_BACKEND=no
;;
esac
2021-04-15 12:17:29 +03:00
CURL_WITH_SCHANNEL
CURL_WITH_SECURETRANSPORT
CURL_WITH_AMISSL
CURL_WITH_OPENSSL
CURL_WITH_GNUTLS
CURL_WITH_MBEDTLS
CURL_WITH_WOLFSSL
CURL_WITH_BEARSSL
CURL_WITH_RUSTLS
2012-06-13 22:54:03 +04:00
2021-03-06 17:52:09 +03:00
dnl link required libraries for USE_WIN32_CRYPTO or USE_SCHANNEL
if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$USE_SCHANNEL" = "x1"; then
LIBS="-ladvapi32 -lcrypt32 $LIBS"
2010-12-03 21:23:45 +03:00
fi
2022-07-04 12:38:24 +03:00
dnl link bcrypt for BCryptGenRandom() (used when building for Vista or newer)
2023-08-08 14:00:36 +03:00
if test "x$curl_cv_native_windows" = "xyes"; then
2022-07-04 12:38:24 +03:00
LIBS="-lbcrypt $LIBS"
fi
2024-08-21 12:08:54 +03:00
case "x$SSL_DISABLED$OPENSSL_ENABLED$GNUTLS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED" in
x)
AC_MSG_ERROR([TLS not detected, you will not be able to use HTTPS, FTPS, NTLM and more.
2023-07-30 00:44:28 +03:00
Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this.])
2024-08-21 12:08:54 +03:00
;;
x1)
# one SSL backend is enabled
AC_SUBST(SSL_ENABLED)
SSL_ENABLED="1"
AC_MSG_NOTICE([built with one SSL backend])
;;
xD)
# explicitly built without TLS
;;
xD*)
AC_MSG_ERROR([--without-ssl has been set together with an explicit option to use an ssl library
2023-07-30 00:44:28 +03:00
(e.g. --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl, --with-rustls).
2022-09-02 00:32:49 +03:00
Since these are conflicting parameters, verify which is the desired one and drop the other.])
2024-08-21 12:08:54 +03:00
;;
*)
# more than one SSL backend is enabled
AC_SUBST(SSL_ENABLED)
SSL_ENABLED="1"
AC_SUBST(CURL_WITH_MULTI_SSL)
CURL_WITH_MULTI_SSL="1"
AC_DEFINE(CURL_WITH_MULTI_SSL, 1, [built with multiple SSL backends])
AC_MSG_NOTICE([built with multiple SSL backends])
;;
2017-08-18 09:51:24 +03:00
esac
2007-02-13 01:32:37 +03:00
vtls: allow selecting which SSL backend to use at runtime
When building software for the masses, it is sometimes not possible to
decide for all users which SSL backend is appropriate.
Git for Windows, for example, uses cURL to perform clones, fetches and
pushes via HTTPS, and some users strongly prefer OpenSSL, while other
users really need to use Secure Channel because it offers
enterprise-ready tools to manage credentials via Windows' Credential
Store.
The current Git for Windows versions use the ugly work-around of
building libcurl once with OpenSSL support and once with Secure Channel
support, and switching out the binaries in the installer depending on
the user's choice.
Needless to say, this is a super ugly workaround that actually only
works in some cases: Git for Windows also comes in a portable form, and
in a form intended for third-party applications requiring Git
functionality, in which cases this "swap out libcurl-4.dll" simply is
not an option.
Therefore, the Git for Windows project has a vested interest in teaching
cURL to make the SSL backend a *runtime* option.
This patch makes that possible.
By running ./configure with multiple --with-<backend> options, cURL will
be built with multiple backends.
For the moment, the backend can be configured using the environment
variable CURL_SSL_BACKEND (valid values are e.g. "openssl" and
"schannel").
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2017-06-14 17:56:00 +03:00
if test -n "$ssl_backends"; then
curl_ssl_msg="enabled ($ssl_backends)"
fi
2024-08-21 12:08:54 +03:00
if test no = "$VALID_DEFAULT_SSL_BACKEND"; then
if test -n "$SSL_ENABLED"; then
2017-08-24 23:26:48 +03:00
AC_MSG_ERROR([Default SSL backend $DEFAULT_SSL_BACKEND not enabled!])
else
AC_MSG_ERROR([Default SSL backend requires SSL!])
fi
2024-08-21 12:08:54 +03:00
elif test yes = "$VALID_DEFAULT_SSL_BACKEND"; then
2017-08-24 23:26:48 +03:00
AC_DEFINE_UNQUOTED([CURL_DEFAULT_SSL_BACKEND], ["$DEFAULT_SSL_BACKEND"], [Default SSL backend])
2007-02-13 01:32:37 +03:00
fi
2005-04-20 02:23:37 +04:00
dnl **********************************************************************
dnl Check for the CA bundle
dnl **********************************************************************
2019-08-11 05:14:01 +03:00
if test -n "$check_for_ca_bundle"; then
2018-05-03 15:54:10 +03:00
CURL_CHECK_CA_BUNDLE
2024-06-29 04:30:14 +03:00
CURL_CHECK_CA_EMBED
2018-05-03 15:54:10 +03:00
fi
2005-04-20 02:23:37 +04:00
2024-06-29 04:30:14 +03:00
AM_CONDITIONAL(CURL_CA_EMBED_SET, test "x$CURL_CA_EMBED" != "x")
2015-09-29 12:33:01 +03:00
dnl **********************************************************************
dnl Check for libpsl
dnl **********************************************************************
2024-02-15 22:59:25 +03:00
dnl Default to compiler & linker defaults for LIBPSL files & libraries.
OPT_LIBPSL=off
AC_ARG_WITH(libpsl,dnl
AS_HELP_STRING([--with-libpsl=PATH],[Where to look for libpsl, PATH points to the LIBPSL installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--without-libpsl], [disable LIBPSL]),
OPT_LIBPSL=$withval)
if test X"$OPT_LIBPSL" != Xno; then
dnl backup the pre-libpsl variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
case "$OPT_LIBPSL" in
2024-08-21 12:08:54 +03:00
yes|off)
dnl --with-libpsl (without path) used
CURL_CHECK_PKGCONFIG(libpsl)
if test "$PKGCONFIG" != "no"; then
LIB_PSL=`$PKGCONFIG --libs-only-l libpsl`
LD_PSL=`$PKGCONFIG --libs-only-L libpsl`
CPP_PSL=`$PKGCONFIG --cflags-only-I libpsl`
else
dnl no libpsl pkg-config found
LIB_PSL="-lpsl"
fi
2024-02-15 22:59:25 +03:00
2024-08-21 12:08:54 +03:00
;;
*)
dnl use the given --with-libpsl spot
LIB_PSL="-lpsl"
PREFIX_PSL=$OPT_LIBPSL
;;
2024-02-15 22:59:25 +03:00
esac
dnl if given with a prefix, we set -L and -I based on that
if test -n "$PREFIX_PSL"; then
LD_PSL=-L${PREFIX_PSL}/lib$libsuff
CPP_PSL=-I${PREFIX_PSL}/include
fi
LDFLAGS="$LDFLAGS $LD_PSL"
CPPFLAGS="$CPPFLAGS $CPP_PSL"
LIBS="$LIB_PSL $LIBS"
AC_CHECK_LIB(psl, psl_builtin,
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(libpsl.h,
2024-02-15 22:59:25 +03:00
curl_psl_msg="enabled"
LIBPSL_ENABLED=1
AC_DEFINE(USE_LIBPSL, 1, [if libpsl is in use])
AC_SUBST(USE_LIBPSL, [1])
2024-06-08 01:41:24 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libpsl"
2024-08-21 12:08:54 +03:00
)
2024-02-15 22:59:25 +03:00
],
dnl not found, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
2015-09-29 12:33:01 +03:00
)
2024-02-15 22:59:25 +03:00
2024-08-04 17:38:11 +03:00
if test "$LIBPSL_ENABLED" != "1"; then
2024-02-15 22:59:25 +03:00
AC_MSG_ERROR([libpsl libs and/or directories were not found where specified!])
fi
2015-09-29 12:33:01 +03:00
fi
2019-03-03 13:17:52 +03:00
AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"])
2015-09-29 12:33:01 +03:00
2020-12-24 21:48:45 +03:00
dnl **********************************************************************
dnl Check for libgsasl
dnl **********************************************************************
AC_ARG_WITH(libgsasl,
2024-08-21 12:08:54 +03:00
AS_HELP_STRING([--without-libgsasl],
[disable libgsasl support for SCRAM]),
with_libgsasl=$withval,
with_libgsasl=yes)
2020-12-24 21:48:45 +03:00
if test $with_libgsasl != "no"; then
AC_SEARCH_LIBS(gsasl_init, gsasl,
[curl_gsasl_msg="enabled";
2024-08-21 12:08:54 +03:00
AC_DEFINE([USE_GSASL], [1], [GSASL support enabled])
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libgsasl"
],
2020-12-24 21:48:45 +03:00
[curl_gsasl_msg="no (libgsasl not found)";
2024-08-21 12:08:54 +03:00
AC_MSG_WARN([libgsasl was not found])
]
2020-12-24 21:48:45 +03:00
)
fi
AM_CONDITIONAL([USE_GSASL], [test "$curl_gsasl_msg" = "enabled"])
2021-06-01 17:24:00 +03:00
AC_ARG_WITH(libmetalink,,
2023-06-23 01:15:46 +03:00
AC_MSG_ERROR([--with-libmetalink and --without-libmetalink no longer work!]))
2012-04-26 17:59:52 +04:00
2009-09-16 07:19:39 +04:00
dnl **********************************************************************
2024-07-12 14:55:26 +03:00
dnl Check for the presence of libssh2 libraries and headers
2009-09-16 07:19:39 +04:00
dnl **********************************************************************
2024-07-12 14:55:26 +03:00
dnl Default to compiler & linker defaults for libssh2 files & libraries.
2009-09-16 07:19:39 +04:00
OPT_LIBSSH2=off
AC_ARG_WITH(libssh2,dnl
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the libssh2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--with-libssh2], [enable libssh2]),
2017-10-23 14:49:23 +03:00
OPT_LIBSSH2=$withval, OPT_LIBSSH2=no)
OPT_LIBSSH=off
AC_ARG_WITH(libssh,dnl
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-libssh=PATH],[Where to look for libssh, PATH points to the libssh installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--with-libssh], [enable libssh]),
2017-10-23 14:49:23 +03:00
OPT_LIBSSH=$withval, OPT_LIBSSH=no)
2009-09-16 07:19:39 +04:00
2020-01-05 12:51:39 +03:00
OPT_WOLFSSH=off
AC_ARG_WITH(wolfssh,dnl
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-wolfssh=PATH],[Where to look for wolfssh, PATH points to the wolfSSH installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--with-wolfssh], [enable wolfssh]),
2020-01-05 12:51:39 +03:00
OPT_WOLFSSH=$withval, OPT_WOLFSSH=no)
2009-09-16 07:19:39 +04:00
if test X"$OPT_LIBSSH2" != Xno; then
dnl backup the pre-libssh2 variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
case "$OPT_LIBSSH2" in
2024-08-21 12:08:54 +03:00
yes)
dnl --with-libssh2 (without path) used
CURL_CHECK_PKGCONFIG(libssh2)
if test "$PKGCONFIG" != "no"; then
LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
version=`$PKGCONFIG --modversion libssh2`
DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/^-L//'`
fi
2010-01-13 04:13:23 +03:00
2024-08-21 12:08:54 +03:00
;;
off)
dnl no --with-libssh2 option given, just check default places
;;
*)
dnl use the given --with-libssh2 spot
PREFIX_SSH2=$OPT_LIBSSH2
;;
2009-09-16 07:19:39 +04:00
esac
2009-10-21 18:56:25 +04:00
dnl if given with a prefix, we set -L and -I based on that
if test -n "$PREFIX_SSH2"; then
2011-04-13 00:10:29 +04:00
LIB_SSH2="-lssh2"
2009-10-28 03:33:28 +03:00
LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
2009-10-21 18:56:25 +04:00
CPP_SSH2=-I${PREFIX_SSH2}/include
2009-10-28 03:33:28 +03:00
DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
2009-10-21 18:56:25 +04:00
fi
2017-04-24 10:13:28 +03:00
LDFLAGS="$LDFLAGS $LD_SSH2"
2009-10-21 18:56:25 +04:00
CPPFLAGS="$CPPFLAGS $CPP_SSH2"
2012-12-04 01:40:26 +04:00
LIBS="$LIB_SSH2 $LIBS"
2009-10-21 18:56:25 +04:00
2020-10-22 13:29:21 +03:00
dnl check for function added in libssh2 version 1.0
AC_CHECK_LIB(ssh2, libssh2_session_block_directions)
2009-09-16 07:19:39 +04:00
tidy-up: delete parallel/unused feature flags
Detecting headers and lib separately makes sense when headers come in
variations or with extra ones, but this wasn't the case here. These were
duplicate/parallel macros that we had to keep in sync with each other
for a working build. This patch leaves a single macro for each of these
dependencies:
- Rely on `HAVE_LIBZ`, delete parallel `HAVE_ZLIB_H`.
Also delete CMake logic making sure these two were in sync, along with
a toggle to turn off that logic, called `CURL_SPECIAL_LIBZ`.
Also delete stray `HAVE_ZLIB` defines.
There is also a `USE_ZLIB` variant in `lib/config-dos.h`. This patch
retains it for compatibility and deprecates it.
- Rely on `USE_LIBSSH2`, delete parallel `HAVE_LIBSSH2_H`.
Also delete `LIBSSH2_WIN32`, `LIBSSH2_LIBRARY` from
`winbuild/MakefileBuild.vc`, these have a role when building libssh2
itself. And `CURL_USE_LIBSSH`, which had no use at all.
Also delete stray `HAVE_LIBSSH2` defines.
- Rely on `USE_LIBSSH`, delete parallel `HAVE_LIBSSH_LIBSSH_H`.
Also delete `LIBSSH_WIN32`, `LIBSSH_LIBRARY` and `HAVE_LIBSSH` from
`winbuild/MakefileBuild.vc`, these were the result of copy-pasting the
libssh2 line, and were not having any use.
- Delete unused `HAVE_LIBPSL_H` and `HAVE_LIBPSL`.
Reviewed-by: Daniel Stenberg
Closes #9652
2022-10-06 18:30:13 +03:00
AC_CHECK_HEADER(libssh2.h,
2024-07-12 14:55:26 +03:00
curl_ssh_msg="enabled (libssh2)"
2009-09-16 07:19:39 +04:00
LIBSSH2_ENABLED=1
2024-07-12 14:55:26 +03:00
AC_DEFINE(USE_LIBSSH2, 1, [if libssh2 is in use])
2009-09-16 07:19:39 +04:00
AC_SUBST(USE_LIBSSH2, [1])
)
if test X"$OPT_LIBSSH2" != Xoff &&
test "$LIBSSH2_ENABLED" != "1"; then
2024-07-12 14:55:26 +03:00
AC_MSG_ERROR([libssh2 libs and/or directories were not found where specified!])
2009-09-16 07:19:39 +04:00
fi
if test "$LIBSSH2_ENABLED" = "1"; then
2009-10-28 03:33:28 +03:00
if test -n "$DIR_SSH2"; then
2024-08-21 12:08:54 +03:00
dnl when the libssh2 shared libs were found in a path that the run-time
dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
dnl to prevent further configure tests to fail due to this
if test "x$cross_compiling" != "xyes"; then
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH2"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_SSH2 to CURL_LIBRARY_PATH])
fi
2009-09-16 07:19:39 +04:00
fi
2024-06-08 01:41:24 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libssh2"
2009-09-16 07:19:39 +04:00
else
dnl no libssh2, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
fi
2017-10-23 14:49:23 +03:00
elif test X"$OPT_LIBSSH" != Xno; then
dnl backup the pre-libssh variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
case "$OPT_LIBSSH" in
2024-08-21 12:08:54 +03:00
yes)
dnl --with-libssh (without path) used
CURL_CHECK_PKGCONFIG(libssh)
if test "$PKGCONFIG" != "no"; then
LIB_SSH=`$PKGCONFIG --libs-only-l libssh`
LD_SSH=`$PKGCONFIG --libs-only-L libssh`
CPP_SSH=`$PKGCONFIG --cflags-only-I libssh`
version=`$PKGCONFIG --modversion libssh`
DIR_SSH=`echo $LD_SSH | $SED -e 's/^-L//'`
fi
2017-10-23 14:49:23 +03:00
2024-08-21 12:08:54 +03:00
;;
off)
dnl no --with-libssh option given, just check default places
;;
*)
dnl use the given --with-libssh spot
PREFIX_SSH=$OPT_LIBSSH
;;
2017-10-23 14:49:23 +03:00
esac
dnl if given with a prefix, we set -L and -I based on that
if test -n "$PREFIX_SSH"; then
LIB_SSH="-lssh"
LD_SSH=-L${PREFIX_SSH}/lib$libsuff
CPP_SSH=-I${PREFIX_SSH}/include
2017-12-11 00:30:06 +03:00
DIR_SSH=${PREFIX_SSH}/lib$libsuff
2017-10-23 14:49:23 +03:00
fi
LDFLAGS="$LDFLAGS $LD_SSH"
CPPFLAGS="$CPPFLAGS $CPP_SSH"
LIBS="$LIB_SSH $LIBS"
AC_CHECK_LIB(ssh, ssh_new)
tidy-up: delete parallel/unused feature flags
Detecting headers and lib separately makes sense when headers come in
variations or with extra ones, but this wasn't the case here. These were
duplicate/parallel macros that we had to keep in sync with each other
for a working build. This patch leaves a single macro for each of these
dependencies:
- Rely on `HAVE_LIBZ`, delete parallel `HAVE_ZLIB_H`.
Also delete CMake logic making sure these two were in sync, along with
a toggle to turn off that logic, called `CURL_SPECIAL_LIBZ`.
Also delete stray `HAVE_ZLIB` defines.
There is also a `USE_ZLIB` variant in `lib/config-dos.h`. This patch
retains it for compatibility and deprecates it.
- Rely on `USE_LIBSSH2`, delete parallel `HAVE_LIBSSH2_H`.
Also delete `LIBSSH2_WIN32`, `LIBSSH2_LIBRARY` from
`winbuild/MakefileBuild.vc`, these have a role when building libssh2
itself. And `CURL_USE_LIBSSH`, which had no use at all.
Also delete stray `HAVE_LIBSSH2` defines.
- Rely on `USE_LIBSSH`, delete parallel `HAVE_LIBSSH_LIBSSH_H`.
Also delete `LIBSSH_WIN32`, `LIBSSH_LIBRARY` and `HAVE_LIBSSH` from
`winbuild/MakefileBuild.vc`, these were the result of copy-pasting the
libssh2 line, and were not having any use.
- Delete unused `HAVE_LIBPSL_H` and `HAVE_LIBPSL`.
Reviewed-by: Daniel Stenberg
Closes #9652
2022-10-06 18:30:13 +03:00
AC_CHECK_HEADER(libssh/libssh.h,
2024-07-12 14:55:26 +03:00
curl_ssh_msg="enabled (libssh)"
2017-10-23 14:49:23 +03:00
LIBSSH_ENABLED=1
2024-07-12 14:55:26 +03:00
AC_DEFINE(USE_LIBSSH, 1, [if libssh is in use])
2017-10-23 14:49:23 +03:00
AC_SUBST(USE_LIBSSH, [1])
)
if test X"$OPT_LIBSSH" != Xoff &&
test "$LIBSSH_ENABLED" != "1"; then
2024-07-12 14:55:26 +03:00
AC_MSG_ERROR([libssh libs and/or directories were not found where specified!])
2017-10-23 14:49:23 +03:00
fi
if test "$LIBSSH_ENABLED" = "1"; then
2024-08-21 00:10:31 +03:00
if test "$curl_cv_native_windows" = "yes"; then
dnl for if_nametoindex
LIBS="-liphlpapi $LIBS"
fi
2017-10-23 14:49:23 +03:00
if test -n "$DIR_SSH"; then
2024-08-21 12:08:54 +03:00
dnl when the libssh shared libs were found in a path that the run-time
dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
dnl to prevent further configure tests to fail due to this
if test "x$cross_compiling" != "xyes"; then
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_SSH to CURL_LIBRARY_PATH])
fi
2017-10-23 14:49:23 +03:00
fi
2024-06-08 01:41:24 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libssh"
2017-10-23 14:49:23 +03:00
else
dnl no libssh, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
fi
2020-01-05 12:51:39 +03:00
elif test X"$OPT_WOLFSSH" != Xno; then
dnl backup the pre-wolfssh variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
if test "$OPT_WOLFSSH" != yes; then
2024-08-21 12:08:54 +03:00
WOLFCONFIG="$OPT_WOLFSSH/bin/wolfssh-config"
LDFLAGS="$LDFLAGS `$WOLFCONFIG --libs`"
CPPFLAGS="$CPPFLAGS `$WOLFCONFIG --cflags`"
2020-01-05 12:51:39 +03:00
fi
AC_CHECK_LIB(wolfssh, wolfSSH_Init)
AC_CHECK_HEADERS(wolfssh/ssh.h,
curl_ssh_msg="enabled (wolfSSH)"
WOLFSSH_ENABLED=1
AC_DEFINE(USE_WOLFSSH, 1, [if wolfSSH is in use])
AC_SUBST(USE_WOLFSSH, [1])
)
2009-09-16 07:19:39 +04:00
fi
2010-05-13 01:07:20 +04:00
dnl **********************************************************************
dnl Check for the presence of LIBRTMP libraries and headers
dnl **********************************************************************
dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
OPT_LIBRTMP=off
AC_ARG_WITH(librtmp,dnl
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
2010-05-13 01:07:20 +04:00
OPT_LIBRTMP=$withval)
if test X"$OPT_LIBRTMP" != Xno; then
dnl backup the pre-librtmp variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
case "$OPT_LIBRTMP" in
2024-08-21 12:08:54 +03:00
yes)
dnl --with-librtmp (without path) used
CURL_CHECK_PKGCONFIG(librtmp)
if test "$PKGCONFIG" != "no"; then
LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
version=`$PKGCONFIG --modversion librtmp`
DIR_RTMP=`echo $LD_RTMP | $SED -e 's/^-L//'`
else
dnl To avoid link errors, we do not allow --librtmp without
dnl a pkgconfig file
AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
fi
2010-05-13 01:07:20 +04:00
2024-08-21 12:08:54 +03:00
;;
off)
dnl no --with-librtmp option given, just check default places
LIB_RTMP="-lrtmp"
;;
*)
dnl use the given --with-librtmp spot
LIB_RTMP="-lrtmp"
PREFIX_RTMP=$OPT_LIBRTMP
;;
2010-05-13 01:07:20 +04:00
esac
dnl if given with a prefix, we set -L and -I based on that
if test -n "$PREFIX_RTMP"; then
LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
CPP_RTMP=-I${PREFIX_RTMP}/include
DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
fi
LDFLAGS="$LDFLAGS $LD_RTMP"
CPPFLAGS="$CPPFLAGS $CPP_RTMP"
2012-12-04 01:40:26 +04:00
LIBS="$LIB_RTMP $LIBS"
2010-05-13 01:07:20 +04:00
2010-09-21 01:20:36 +04:00
AC_CHECK_LIB(rtmp, RTMP_Init,
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(librtmp/rtmp.h,
2010-09-21 01:20:36 +04:00
curl_rtmp_msg="enabled (librtmp)"
LIBRTMP_ENABLED=1
AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use])
AC_SUBST(USE_LIBRTMP, [1])
2024-06-08 01:41:24 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE librtmp"
2024-08-21 12:08:54 +03:00
)
2010-09-21 01:20:36 +04:00
],
dnl not found, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
2010-05-13 01:07:20 +04:00
)
if test X"$OPT_LIBRTMP" != Xoff &&
test "$LIBRTMP_ENABLED" != "1"; then
AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!])
fi
fi
2011-12-16 18:33:48 +04:00
dnl **********************************************************************
dnl Check for linker switch for versioned symbols
dnl **********************************************************************
versioned_symbols_flavour=
2012-05-10 20:50:51 +04:00
AC_MSG_CHECKING([whether versioned symbols are wanted])
2011-12-16 18:33:48 +04:00
AC_ARG_ENABLE(versioned-symbols,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
AS_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
2011-12-16 18:33:48 +04:00
[ case "$enableval" in
yes) AC_MSG_RESULT(yes)
2012-05-10 20:50:51 +04:00
AC_MSG_CHECKING([if libraries can be versioned])
GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
if test -z "$GLD"; then
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_MSG_WARN([You need an ld version supporting the --version-script option])
2011-12-16 18:33:48 +04:00
else
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
versioned_symbols_flavour="MULTISSL_"
elif test "x$OPENSSL_ENABLED" = "x1"; then
versioned_symbols_flavour="OPENSSL_"
elif test "x$MBEDTLS_ENABLED" = "x1"; then
versioned_symbols_flavour="MBEDTLS_"
elif test "x$BEARSSL_ENABLED" = "x1"; then
versioned_symbols_flavour="BEARSSL_"
elif test "x$GNUTLS_ENABLED" = "x1"; then
versioned_symbols_flavour="GNUTLS_"
elif test "x$WOLFSSL_ENABLED" = "x1"; then
versioned_symbols_flavour="WOLFSSL_"
elif test "x$SCHANNEL_ENABLED" = "x1"; then
versioned_symbols_flavour="SCHANNEL_"
elif test "x$SECURETRANSPORT_ENABLED" = "x1"; then
versioned_symbols_flavour="SECURE_TRANSPORT_"
else
versioned_symbols_flavour=""
fi
versioned_symbols="yes"
2011-12-16 18:33:48 +04:00
fi
;;
2024-08-21 12:08:54 +03:00
*)
AC_MSG_RESULT(no)
2011-12-16 18:33:48 +04:00
;;
esac
], [
AC_MSG_RESULT(no)
]
)
2013-03-08 16:26:08 +04:00
AC_SUBST([CURL_LT_SHLIB_VERSIONED_FLAVOUR],
["$versioned_symbols_flavour"])
AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS],
[test "x$versioned_symbols" = 'xyes'])
2011-12-16 18:33:48 +04:00
2024-08-09 21:18:48 +03:00
dnl ----------------------------
dnl check Windows Unicode option
dnl ----------------------------
want_winuni="no"
if test "$curl_cv_native_windows" = "yes"; then
AC_MSG_CHECKING([whether to enable Windows Unicode (Windows native builds only)])
2024-08-31 16:06:44 +03:00
AC_ARG_ENABLE(windows-unicode,
AS_HELP_STRING([--enable-windows-unicode],[Enable Windows Unicode])
AS_HELP_STRING([--disable-windows-unicode],[Disable Windows Unicode (default)]),
[ case "$enableval" in
2024-08-09 21:18:48 +03:00
yes)
CPPFLAGS="${CPPFLAGS} -DUNICODE -D_UNICODE"
want_winuni="yes"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
2024-08-31 16:06:44 +03:00
esac ],
AC_MSG_RESULT([no])
)
2024-08-09 21:18:48 +03:00
fi
AM_CONDITIONAL([USE_UNICODE], [test "$want_winuni" = "yes"])
2022-04-20 16:26:13 +03:00
2012-07-27 05:19:21 +04:00
dnl -------------------------------------------------
2024-08-24 22:14:02 +03:00
dnl check WinIDN option before other IDN libraries
2012-07-27 05:19:21 +04:00
dnl -------------------------------------------------
2024-08-24 22:14:02 +03:00
tst_links_winidn='no'
if test "$curl_cv_native_windows" = 'yes'; then
AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)])
OPT_WINIDN="default"
AC_ARG_WITH(winidn,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN])
AS_HELP_STRING([--without-winidn], [disable Windows native IDN]),
2024-08-24 22:14:02 +03:00
OPT_WINIDN=$withval)
case "$OPT_WINIDN" in
no|default)
dnl --without-winidn option used or configure option not specified
want_winidn="no"
AC_MSG_RESULT([no])
;;
yes)
dnl --with-winidn option used without path
want_winidn="yes"
want_winidn_path="default"
AC_MSG_RESULT([yes])
;;
*)
dnl --with-winidn option used with path
want_winidn="yes"
want_winidn_path="$withval"
AC_MSG_RESULT([yes ($withval)])
;;
esac
2012-07-27 05:19:21 +04:00
2024-08-24 22:14:02 +03:00
if test "$want_winidn" = "yes"; then
dnl WinIDN library support has been requested
clean_CPPFLAGS="$CPPFLAGS"
clean_LDFLAGS="$LDFLAGS"
clean_LIBS="$LIBS"
WINIDN_LIBS="-lnormaliz"
WINIDN_CPPFLAGS=""
#
if test "$want_winidn_path" != "default"; then
dnl path has been specified
dnl pkg-config not available or provides no info
WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff"
WINIDN_CPPFLAGS="-I$want_winidn_path/include"
fi
#
CPPFLAGS="$CPPFLAGS $WINIDN_CPPFLAGS"
LDFLAGS="$LDFLAGS $WINIDN_LDFLAGS"
LIBS="$WINIDN_LIBS $LIBS"
#
AC_MSG_CHECKING([if IdnToUnicode can be linked])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
#include <windows.h>
]],[[
configure: fix WinIDN builds targeting old Windows
1. GHA/windows: enable WinIDN in Linux cross-builds.
(to reveal the issue in CI.)
2. fix compiler warning when building with mingw-w64 supporting
WinIDN, while targeting pre-Vista Windows, with a `WINVER` set to
target Vista or newer. (Such was Ubuntu's mingw-w64 with the
classic-mingw-specific trick in point 3 of this PR.)
```
../../lib/idn.c:154:23: error: redundant redeclaration of ‘IdnToAscii’ [-Werror=redundant-decls]
154 | WINBASEAPI int WINAPI IdnToAscii(DWORD dwFlags,
| ^~~~~~~~~~
In file included from /usr/share/mingw-w64/include/windows.h:73,
from /usr/share/mingw-w64/include/winsock2.h:23,
from ../../lib/setup-win32.h:91,
from ../../lib/curl_setup.h:308,
from ../../lib/idn.c:29:
/usr/share/mingw-w64/include/winnls.h:1075:30: note: previous declaration of ‘IdnToAscii’ was here
1075 | WINNORMALIZEAPI int WINAPI IdnToAscii (DWORD dwFlags, LPCWSTR lpUnicodeCharStr, int cchUnicodeChar, LPWSTR lpASCIICharStr, int cchASCIIChar);
| ^~~~~~~~~~
[...same for IdnToUnicode...]
```
Ref: https://github.com/curl/curl/actions/runs/10542832783/job/29210098553#step:7:89
3. drop `WINVER` override for classic-mingw. curl no longer supports
building with classic-mingw.
Reverts 37f1c21cb9c809ec870803fc40e1ed2afd9534ac #7581
4. sync `if IdnToUnicode can be linked` detection snippet with the live
code in `lib/idn.c`. It fixes detection for the scenario in point 2.
5. delete unused `WINIDN_DIR` variable.
Bug: https://github.com/curl/curl/pull/12606#issuecomment-1885381038
Previous abandoned attempt: #12684
Reviewed-by: Jay Satiro
Closes #14680
2024-08-25 20:32:10 +03:00
#if (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x600) && \
(!defined(WINVER) || WINVER < 0x600)
WINBASEAPI int WINAPI IdnToUnicode(DWORD dwFlags,
const WCHAR *lpASCIICharStr,
int cchASCIIChar,
WCHAR *lpUnicodeCharStr,
int cchUnicodeChar);
#endif
2024-08-24 22:14:02 +03:00
IdnToUnicode(0, NULL, 0, NULL, 0);
]])
],[
AC_MSG_RESULT([yes])
tst_links_winidn="yes"
],[
AC_MSG_RESULT([no])
tst_links_winidn="no"
])
#
if test "$tst_links_winidn" = "yes"; then
AC_DEFINE(USE_WIN32_IDN, 1, [Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz).])
AC_SUBST([IDN_ENABLED], [1])
curl_idn_msg="enabled (Windows-native)"
else
AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
CPPFLAGS="$clean_CPPFLAGS"
LDFLAGS="$clean_LDFLAGS"
LIBS="$clean_LIBS"
fi
2012-07-27 05:19:21 +04:00
fi
fi
2011-12-16 18:33:48 +04:00
2007-02-17 11:49:04 +03:00
dnl **********************************************************************
2024-08-24 22:14:02 +03:00
dnl Check for the presence of AppleIDN
dnl **********************************************************************
tst_links_appleidn='no'
case $host_os in
darwin*)
AC_MSG_CHECKING([whether to build with Apple IDN])
OPT_IDN="default"
AC_ARG_WITH(apple-idn,
2024-08-31 16:39:17 +03:00
AS_HELP_STRING([--with-apple-idn],[Enable AppleIDN])
AS_HELP_STRING([--without-apple-idn],[Disable AppleIDN]),
2024-08-24 22:14:02 +03:00
[OPT_IDN=$withval])
case "$OPT_IDN" in
yes)
dnl --with-apple-idn option used
AC_MSG_RESULT([yes, check])
AC_CHECK_LIB(icucore, uidna_openUTS46,
[
AC_CHECK_HEADERS(unicode/uidna.h,
curl_idn_msg="enabled (AppleIDN)"
AC_DEFINE(USE_APPLE_IDN, 1, [if AppleIDN])
AC_SUBST(USE_APPLE_IDN, [1])
AC_SUBST([IDN_ENABLED], [1])
LIBS="-licucore -liconv $LIBS"
tst_links_appleidn='yes'
)
])
;;
*)
AC_MSG_RESULT([no])
;;
esac
;;
esac
2007-02-17 11:49:04 +03:00
dnl **********************************************************************
2024-08-05 21:29:48 +03:00
dnl Check for the presence of libidn2
2007-02-17 11:49:04 +03:00
dnl **********************************************************************
2016-10-12 10:01:06 +03:00
AC_MSG_CHECKING([whether to build with libidn2])
2011-11-29 22:11:34 +04:00
OPT_IDN="default"
2016-12-25 03:13:12 +03:00
AC_ARG_WITH(libidn2,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-libidn2=PATH],[Enable libidn2 usage])
AS_HELP_STRING([--without-libidn2],[Disable libidn2 usage]),
2011-11-29 22:11:34 +04:00
[OPT_IDN=$withval])
2022-05-29 10:20:39 +03:00
if test "x$tst_links_winidn" = "xyes"; then
want_idn="no"
tidy-up: OS names
Use these words and casing more consistently across text, comments and
one curl tool output:
AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux,
macOS, MS-DOS, MSYS, MinGW, NTLM, POSIX, Solaris, UNIX, Unix, Unicode,
WINE, WebDAV, Win32, winbind, WinIDN, Windows, Windows CE, Winsock.
Mostly OS names and a few more.
Also a couple of other minor text fixups.
Closes #14360
2024-08-03 02:09:57 +03:00
AC_MSG_RESULT([no (using WinIDN instead)])
2024-08-24 22:14:02 +03:00
elif test "x$tst_links_appleidn" = "xyes"; then
want_idn="no"
AC_MSG_RESULT([no (using AppleIDN instead)])
2022-05-29 10:20:39 +03:00
else
case "$OPT_IDN" in
no)
dnl --without-libidn2 option used
want_idn="no"
AC_MSG_RESULT([no])
;;
default)
dnl configure option not specified
want_idn="yes"
want_idn_path="default"
AC_MSG_RESULT([(assumed) yes])
;;
yes)
dnl --with-libidn2 option used without path
want_idn="yes"
want_idn_path="default"
AC_MSG_RESULT([yes])
;;
*)
dnl --with-libidn2 option used with path
want_idn="yes"
want_idn_path="$withval"
AC_MSG_RESULT([yes ($withval)])
;;
esac
fi
2004-04-26 16:29:30 +04:00
2011-11-29 22:11:34 +04:00
if test "$want_idn" = "yes"; then
dnl idn library support has been requested
clean_CPPFLAGS="$CPPFLAGS"
clean_LDFLAGS="$LDFLAGS"
clean_LIBS="$LIBS"
PKGCONFIG="no"
#
if test "$want_idn_path" != "default"; then
dnl path has been specified
IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
2016-10-12 10:01:06 +03:00
CURL_CHECK_PKGCONFIG(libidn2, [$IDN_PCDIR])
2011-11-29 22:11:34 +04:00
if test "$PKGCONFIG" != "no"; then
IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2016-10-12 10:01:06 +03:00
$PKGCONFIG --libs-only-l libidn2 2>/dev/null`
2011-11-29 22:11:34 +04:00
IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2016-10-12 10:01:06 +03:00
$PKGCONFIG --libs-only-L libidn2 2>/dev/null`
2011-11-29 22:11:34 +04:00
IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2016-10-12 10:01:06 +03:00
$PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
2020-06-04 19:11:36 +03:00
IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'`
2011-11-29 22:11:34 +04:00
else
dnl pkg-config not available or provides no info
2016-10-12 10:01:06 +03:00
IDN_LIBS="-lidn2"
2011-11-29 22:11:34 +04:00
IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
IDN_CPPFLAGS="-I$want_idn_path/include"
IDN_DIR="$want_idn_path/lib$libsuff"
fi
else
dnl path not specified
2016-10-12 10:01:06 +03:00
CURL_CHECK_PKGCONFIG(libidn2)
2011-11-29 22:11:34 +04:00
if test "$PKGCONFIG" != "no"; then
2016-10-12 10:01:06 +03:00
IDN_LIBS=`$PKGCONFIG --libs-only-l libidn2 2>/dev/null`
IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn2 2>/dev/null`
IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
2020-06-04 19:11:36 +03:00
IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'`
2011-11-29 22:11:34 +04:00
else
dnl pkg-config not available or provides no info
2016-10-12 10:01:06 +03:00
IDN_LIBS="-lidn2"
2011-11-29 22:11:34 +04:00
fi
fi
#
if test "$PKGCONFIG" != "no"; then
AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"])
AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"])
AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"])
else
AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"])
AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"])
AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"])
fi
#
2017-04-24 10:13:28 +03:00
CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS"
LDFLAGS="$LDFLAGS $IDN_LDFLAGS"
2011-11-29 22:11:34 +04:00
LIBS="$IDN_LIBS $LIBS"
#
2016-10-12 10:01:06 +03:00
AC_MSG_CHECKING([if idn2_lookup_ul can be linked])
2011-11-29 22:11:34 +04:00
AC_LINK_IFELSE([
2016-10-12 10:01:06 +03:00
AC_LANG_FUNC_LINK_TRY([idn2_lookup_ul])
2011-11-29 22:11:34 +04:00
],[
AC_MSG_RESULT([yes])
tst_links_libidn="yes"
],[
AC_MSG_RESULT([no])
tst_links_libidn="no"
])
#
2016-10-12 10:01:06 +03:00
AC_CHECK_HEADERS( idn2.h )
2011-11-29 22:11:34 +04:00
if test "$tst_links_libidn" = "yes"; then
2016-10-12 10:01:06 +03:00
AC_DEFINE(HAVE_LIBIDN2, 1, [Define to 1 if you have the `idn2' library (-lidn2).])
2011-11-29 22:11:34 +04:00
dnl different versions of libidn have different setups of these:
2016-10-12 10:01:06 +03:00
AC_SUBST([IDN_ENABLED], [1])
curl_idn_msg="enabled (libidn2)"
if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
2018-04-13 15:07:39 +03:00
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$IDN_DIR"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $IDN_DIR to CURL_LIBRARY_PATH])
2011-11-29 22:11:34 +04:00
fi
2024-06-08 01:41:24 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="libidn2 $LIBCURL_PC_REQUIRES_PRIVATE"
2011-11-29 22:11:34 +04:00
else
2024-08-05 21:29:48 +03:00
AC_MSG_WARN([Cannot find libidn2])
2011-11-29 22:11:34 +04:00
CPPFLAGS="$clean_CPPFLAGS"
LDFLAGS="$clean_LDFLAGS"
LIBS="$clean_LIBS"
2024-08-05 21:29:48 +03:00
want_idn="no"
2011-11-29 22:11:34 +04:00
fi
fi
2013-09-03 01:14:23 +04:00
dnl **********************************************************************
dnl Check for nghttp2
dnl **********************************************************************
2014-05-22 10:56:02 +04:00
OPT_H2="yes"
2017-06-16 01:02:36 +03:00
2021-10-26 13:56:26 +03:00
if test "x$disable_http" = "xyes" -o X"$want_hyper" != Xno; then
# without HTTP or with Hyper, nghttp2 is no use
2017-06-16 01:02:36 +03:00
OPT_H2="no"
fi
2013-09-03 01:14:23 +04:00
AC_ARG_WITH(nghttp2,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage])
AS_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]),
2013-09-03 01:14:23 +04:00
[OPT_H2=$withval])
case "$OPT_H2" in
no)
dnl --without-nghttp2 option used
2021-10-26 13:56:26 +03:00
want_nghttp2="no"
2013-09-03 01:14:23 +04:00
;;
yes)
dnl --with-nghttp2 option used without path
2021-10-26 13:56:26 +03:00
want_nghttp2="default"
want_nghttp2_path=""
2022-01-28 18:31:18 +03:00
want_nghttp2_pkg_config_path=""
2013-09-03 01:14:23 +04:00
;;
*)
dnl --with-nghttp2 option used with path
2021-10-26 13:56:26 +03:00
want_nghttp2="yes"
2022-01-28 18:31:18 +03:00
want_nghttp2_path="$withval"
want_nghttp2_pkg_config_path="$withval/lib/pkgconfig"
2013-09-03 01:14:23 +04:00
;;
esac
2021-10-26 13:56:26 +03:00
if test X"$want_nghttp2" != Xno; then
2014-04-21 22:12:20 +04:00
dnl backup the pre-nghttp2 variables
2013-09-03 01:14:23 +04:00
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
2022-01-28 18:31:18 +03:00
CURL_CHECK_PKGCONFIG(libnghttp2, $want_nghttp2_pkg_config_path)
2013-09-03 01:14:23 +04:00
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2022-01-28 18:31:18 +03:00
LIB_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path])
2013-09-03 01:14:23 +04:00
$PKGCONFIG --libs-only-l libnghttp2`
AC_MSG_NOTICE([-l is $LIB_H2])
2022-01-28 18:31:18 +03:00
CPP_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path]) dnl
2013-09-03 01:14:23 +04:00
$PKGCONFIG --cflags-only-I libnghttp2`
AC_MSG_NOTICE([-I is $CPP_H2])
2022-01-28 18:31:18 +03:00
LD_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path])
2013-09-03 01:14:23 +04:00
$PKGCONFIG --libs-only-L libnghttp2`
AC_MSG_NOTICE([-L is $LD_H2])
2022-01-28 18:31:18 +03:00
DIR_H2=`echo $LD_H2 | $SED -e 's/^-L//'`
elif test x"$want_nghttp2_path" != x; then
LIB_H2="-lnghttp2"
LD_H2=-L${want_nghttp2_path}/lib$libsuff
CPP_H2=-I${want_nghttp2_path}/include
DIR_H2=${want_nghttp2_path}/lib$libsuff
elif test X"$want_nghttp2" != Xdefault; then
dnl no nghttp2 pkg-config found and no custom directory specified,
dnl deal with it
AC_MSG_ERROR([--with-nghttp2 was specified but could not find libnghttp2 pkg-config file.])
2023-05-26 11:03:51 +03:00
else
LIB_H2="-lnghttp2"
2022-01-28 18:31:18 +03:00
fi
2013-09-03 01:14:23 +04:00
2022-01-28 18:31:18 +03:00
LDFLAGS="$LDFLAGS $LD_H2"
CPPFLAGS="$CPPFLAGS $CPP_H2"
LIBS="$LIB_H2 $LIBS"
2013-09-03 01:14:23 +04:00
2023-07-19 16:48:05 +03:00
# use nghttp2_session_get_stream_local_window_size to require nghttp2
# >= 1.15.0
AC_CHECK_LIB(nghttp2, nghttp2_session_get_stream_local_window_size,
2022-01-28 18:31:18 +03:00
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(nghttp2/nghttp2.h,
2022-01-28 18:31:18 +03:00
curl_h2_msg="enabled (nghttp2)"
NGHTTP2_ENABLED=1
AC_DEFINE(USE_NGHTTP2, 1, [if nghttp2 is in use])
AC_SUBST(USE_NGHTTP2, [1])
2024-06-08 01:41:24 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libnghttp2"
2024-08-21 12:08:54 +03:00
)
2013-09-03 01:14:23 +04:00
2024-08-21 12:08:54 +03:00
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_H2"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_H2 to CURL_LIBRARY_PATH])
2022-01-28 18:31:18 +03:00
],
dnl not found, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
)
2013-09-03 01:14:23 +04:00
fi
2019-07-22 00:48:58 +03:00
dnl **********************************************************************
dnl Check for ngtcp2 (QUIC)
dnl **********************************************************************
2022-10-05 11:30:04 +03:00
OPT_TCP2="no"
2019-07-22 00:48:58 +03:00
if test "x$disable_http" = "xyes"; then
# without HTTP, ngtcp2 is no use
OPT_TCP2="no"
fi
AC_ARG_WITH(ngtcp2,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-ngtcp2=PATH],[Enable ngtcp2 usage])
AS_HELP_STRING([--without-ngtcp2],[Disable ngtcp2 usage]),
2019-07-22 00:48:58 +03:00
[OPT_TCP2=$withval])
case "$OPT_TCP2" in
no)
dnl --without-ngtcp2 option used
want_tcp2="no"
;;
yes)
dnl --with-ngtcp2 option used without path
want_tcp2="default"
want_tcp2_path=""
;;
*)
dnl --with-ngtcp2 option used with path
want_tcp2="yes"
want_tcp2_path="$withval/lib/pkgconfig"
;;
esac
2020-09-29 12:01:45 +03:00
curl_tcp2_msg="no (--with-ngtcp2)"
2019-07-22 00:48:58 +03:00
if test X"$want_tcp2" != Xno; then
2024-01-11 16:11:19 +03:00
if test "$QUIC_ENABLED" != "yes"; then
AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-ngtcp2 a no-no])
fi
2019-07-22 00:48:58 +03:00
dnl backup the pre-ngtcp2 variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
CURL_CHECK_PKGCONFIG(libngtcp2, $want_tcp2_path)
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2019-07-22 00:48:58 +03:00
LIB_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-l libngtcp2`
AC_MSG_NOTICE([-l is $LIB_TCP2])
CPP_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
$PKGCONFIG --cflags-only-I libngtcp2`
AC_MSG_NOTICE([-I is $CPP_TCP2])
LD_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-L libngtcp2`
AC_MSG_NOTICE([-L is $LD_TCP2])
LDFLAGS="$LDFLAGS $LD_TCP2"
CPPFLAGS="$CPPFLAGS $CPP_TCP2"
LIBS="$LIB_TCP2 $LIBS"
if test "x$cross_compiling" != "xyes"; then
2020-06-04 19:11:36 +03:00
DIR_TCP2=`echo $LD_TCP2 | $SED -e 's/^-L//'`
2019-07-22 00:48:58 +03:00
fi
2021-09-12 09:27:33 +03:00
AC_CHECK_LIB(ngtcp2, ngtcp2_conn_client_new_versioned,
2019-07-22 00:48:58 +03:00
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(ngtcp2/ngtcp2.h,
2019-07-22 00:48:58 +03:00
NGTCP2_ENABLED=1
AC_DEFINE(USE_NGTCP2, 1, [if ngtcp2 is in use])
AC_SUBST(USE_NGTCP2, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_TCP2"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_TCP2 to CURL_LIBRARY_PATH])
2024-06-24 21:29:02 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libngtcp2"
2024-08-21 12:08:54 +03:00
)
2019-07-22 00:48:58 +03:00
],
dnl not found, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
)
else
dnl no ngtcp2 pkg-config found, deal with it
if test X"$want_tcp2" != Xdefault; then
dnl To avoid link errors, we do not allow --with-ngtcp2 without
dnl a pkgconfig file
AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2 pkg-config file.])
fi
fi
fi
2024-01-24 11:56:24 +03:00
if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "x$OPENSSL_IS_BORINGSSL" != "x1"; then
2023-07-12 12:26:28 +03:00
dnl backup the pre-ngtcp2_crypto_quictls variables
2019-08-27 16:00:34 +03:00
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
2023-07-12 12:26:28 +03:00
CURL_CHECK_PKGCONFIG(libngtcp2_crypto_quictls, $want_tcp2_path)
2019-08-27 16:00:34 +03:00
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2023-07-12 12:26:28 +03:00
LIB_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-l libngtcp2_crypto_quictls`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_QUICTLS])
2019-08-27 16:00:34 +03:00
2023-07-12 12:26:28 +03:00
CPP_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
$PKGCONFIG --cflags-only-I libngtcp2_crypto_quictls`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_QUICTLS])
2019-08-27 16:00:34 +03:00
2023-07-12 12:26:28 +03:00
LD_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-L libngtcp2_crypto_quictls`
AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_QUICTLS])
2019-08-27 16:00:34 +03:00
2023-07-12 12:26:28 +03:00
LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_QUICTLS"
CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_QUICTLS"
LIBS="$LIB_NGTCP2_CRYPTO_QUICTLS $LIBS"
2019-08-27 16:00:34 +03:00
if test "x$cross_compiling" != "xyes"; then
2023-07-12 12:26:28 +03:00
DIR_NGTCP2_CRYPTO_QUICTLS=`echo $LD_NGTCP2_CRYPTO_QUICTLS | $SED -e 's/^-L//'`
2019-08-27 16:00:34 +03:00
fi
2023-07-12 12:26:28 +03:00
AC_CHECK_LIB(ngtcp2_crypto_quictls, ngtcp2_crypto_recv_client_initial_cb,
2019-08-27 16:00:34 +03:00
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
2019-08-27 16:00:34 +03:00
NGTCP2_ENABLED=1
2023-07-12 12:26:28 +03:00
AC_DEFINE(USE_NGTCP2_CRYPTO_QUICTLS, 1, [if ngtcp2_crypto_quictls is in use])
AC_SUBST(USE_NGTCP2_CRYPTO_QUICTLS, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_QUICTLS"
2019-08-27 16:00:34 +03:00
export CURL_LIBRARY_PATH
2023-07-12 12:26:28 +03:00
AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_QUICTLS to CURL_LIBRARY_PATH])
2024-06-24 21:29:02 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libngtcp2_crypto_quictls"
2024-08-21 12:08:54 +03:00
)
2019-08-27 16:00:34 +03:00
],
dnl not found, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
)
else
2023-07-12 12:26:28 +03:00
dnl no ngtcp2_crypto_quictls pkg-config found, deal with it
2019-08-27 16:00:34 +03:00
if test X"$want_tcp2" != Xdefault; then
dnl To avoid link errors, we do not allow --with-ngtcp2 without
dnl a pkgconfig file
2023-07-12 12:26:28 +03:00
AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_quictls pkg-config file.])
2019-08-27 16:00:34 +03:00
fi
fi
fi
2024-01-24 11:56:24 +03:00
if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "x$OPENSSL_IS_BORINGSSL" = "x1"; then
dnl backup the pre-ngtcp2_crypto_boringssl variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
CURL_CHECK_PKGCONFIG(libngtcp2_crypto_boringssl, $want_tcp2_path)
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2024-01-24 11:56:24 +03:00
LIB_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-l libngtcp2_crypto_boringssl`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_BORINGSSL])
CPP_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
$PKGCONFIG --cflags-only-I libngtcp2_crypto_boringssl`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_BORINGSSL])
LD_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-L libngtcp2_crypto_boringssl`
AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_BORINGSSL])
LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_BORINGSSL"
CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_BORINGSSL"
LIBS="$LIB_NGTCP2_CRYPTO_BORINGSSL $LIBS"
if test "x$cross_compiling" != "xyes"; then
DIR_NGTCP2_CRYPTO_BORINGSSL=`echo $LD_NGTCP2_CRYPTO_BORINGSSL | $SED -e 's/^-L//'`
fi
AC_CHECK_LIB(ngtcp2_crypto_boringssl, ngtcp2_crypto_recv_client_initial_cb,
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
2024-01-24 11:56:24 +03:00
NGTCP2_ENABLED=1
AC_DEFINE(USE_NGTCP2_CRYPTO_BORINGSSL, 1, [if ngtcp2_crypto_boringssl is in use])
AC_SUBST(USE_NGTCP2_CRYPTO_BORINGSSL, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_BORINGSSL"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_BORINGSSL to CURL_LIBRARY_PATH])
2024-06-24 21:29:02 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libngtcp2_crypto_boringssl"
2024-08-21 12:08:54 +03:00
)
2024-01-24 11:56:24 +03:00
],
dnl not found, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
)
else
dnl no ngtcp2_crypto_boringssl pkg-config found, deal with it
if test X"$want_tcp2" != Xdefault; then
dnl To avoid link errors, we do not allow --with-ngtcp2 without
dnl a pkgconfig file
AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_boringssl pkg-config file.])
fi
fi
fi
2020-03-26 00:49:02 +03:00
if test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then
dnl backup the pre-ngtcp2_crypto_gnutls variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
CURL_CHECK_PKGCONFIG(libngtcp2_crypto_gnutls, $want_tcp2_path)
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2020-03-26 00:49:02 +03:00
LIB_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_GNUTLS])
CPP_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
$PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_GNUTLS])
LD_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-L libngtcp2_crypto_gnutls`
AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_GNUTLS])
LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_GNUTLS"
CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_GNUTLS"
LIBS="$LIB_NGTCP2_CRYPTO_GNUTLS $LIBS"
if test "x$cross_compiling" != "xyes"; then
2020-06-04 19:11:36 +03:00
DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/^-L//'`
2020-03-26 00:49:02 +03:00
fi
2022-02-02 01:44:26 +03:00
AC_CHECK_LIB(ngtcp2_crypto_gnutls, ngtcp2_crypto_recv_client_initial_cb,
2020-03-26 00:49:02 +03:00
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
2020-03-26 00:49:02 +03:00
NGTCP2_ENABLED=1
AC_DEFINE(USE_NGTCP2_CRYPTO_GNUTLS, 1, [if ngtcp2_crypto_gnutls is in use])
AC_SUBST(USE_NGTCP2_CRYPTO_GNUTLS, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH])
2024-06-24 21:29:02 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libngtcp2_crypto_gnutls"
2024-08-21 12:08:54 +03:00
)
2020-03-26 00:49:02 +03:00
],
dnl not found, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
)
else
dnl no ngtcp2_crypto_gnutls pkg-config found, deal with it
if test X"$want_tcp2" != Xdefault; then
dnl To avoid link errors, we do not allow --with-ngtcp2 without
dnl a pkgconfig file
AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_gnutls pkg-config file.])
fi
fi
fi
2022-08-10 11:06:52 +03:00
if test "x$NGTCP2_ENABLED" = "x1" -a "x$WOLFSSL_ENABLED" = "x1"; then
dnl backup the pre-ngtcp2_crypto_wolfssl variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
CURL_CHECK_PKGCONFIG(libngtcp2_crypto_wolfssl, $want_tcp2_path)
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2022-08-10 11:06:52 +03:00
LIB_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-l libngtcp2_crypto_wolfssl`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_WOLFSSL])
CPP_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
$PKGCONFIG --cflags-only-I libngtcp2_crypto_wolfssl`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_WOLFSSL])
LD_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-L libngtcp2_crypto_wolfssl`
AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_WOLFSSL])
LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_WOLFSSL"
CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_WOLFSSL"
LIBS="$LIB_NGTCP2_CRYPTO_WOLFSSL $LIBS"
if test "x$cross_compiling" != "xyes"; then
DIR_NGTCP2_CRYPTO_WOLFSSL=`echo $LD_NGTCP2_CRYPTO_WOLFSSL | $SED -e 's/^-L//'`
fi
AC_CHECK_LIB(ngtcp2_crypto_wolfssl, ngtcp2_crypto_recv_client_initial_cb,
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
2022-08-10 11:06:52 +03:00
NGTCP2_ENABLED=1
AC_DEFINE(USE_NGTCP2_CRYPTO_WOLFSSL, 1, [if ngtcp2_crypto_wolfssl is in use])
AC_SUBST(USE_NGTCP2_CRYPTO_WOLFSSL, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_WOLFSSL"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_WOLFSSL to CURL_LIBRARY_PATH])
2024-06-24 21:29:02 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libngtcp2_crypto_wolfssl"
2024-08-21 12:08:54 +03:00
)
2022-08-10 11:06:52 +03:00
],
dnl not found, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
)
else
dnl no ngtcp2_crypto_wolfssl pkg-config found, deal with it
if test X"$want_tcp2" != Xdefault; then
dnl To avoid link errors, we do not allow --with-ngtcp2 without
dnl a pkgconfig file
AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_wolfssl pkg-config file.])
fi
fi
fi
2024-01-18 15:07:07 +03:00
dnl **********************************************************************
dnl Check for OpenSSL QUIC
dnl **********************************************************************
OPT_OPENSSL_QUIC="no"
if test "x$disable_http" = "xyes" -o "x$OPENSSL_ENABLED" != "x1"; then
# without HTTP or without openssl, no use
OPT_OPENSSL_QUIC="no"
fi
AC_ARG_WITH(openssl-quic,
AS_HELP_STRING([--with-openssl-quic],[Enable OpenSSL QUIC usage])
AS_HELP_STRING([--without-openssl-quic],[Disable OpenSSL QUIC usage]),
[OPT_OPENSSL_QUIC=$withval])
case "$OPT_OPENSSL_QUIC" in
no)
dnl --without-openssl-quic option used
want_openssl_quic="no"
;;
yes)
dnl --with-openssl-quic option used
want_openssl_quic="yes"
;;
esac
curl_openssl_quic_msg="no (--with-openssl-quic)"
if test "x$want_openssl_quic" = "xyes"; then
if test "$NGTCP2_ENABLED" = 1; then
AC_MSG_ERROR([--with-openssl-quic and --with-ngtcp2 are mutually exclusive])
fi
2024-08-14 18:30:47 +03:00
if test "$have_openssl_quic" != 1; then
2024-06-26 12:19:26 +03:00
AC_MSG_ERROR([--with-openssl-quic requires quic support and OpenSSL >= 3.3.0])
2024-01-18 15:07:07 +03:00
fi
AC_DEFINE(USE_OPENSSL_QUIC, 1, [if openssl QUIC is in use])
AC_SUBST(USE_OPENSSL_QUIC, [1])
fi
2019-08-11 00:19:55 +03:00
dnl **********************************************************************
dnl Check for nghttp3 (HTTP/3 with ngtcp2)
dnl **********************************************************************
OPT_NGHTTP3="yes"
2024-02-05 19:02:21 +03:00
if test "x$USE_NGTCP2" != "x1" -a "x$USE_OPENSSL_QUIC" != "x1"; then
2024-01-18 15:07:07 +03:00
# without ngtcp2 or openssl quic, nghttp3 is of no use for us
2019-08-11 00:19:55 +03:00
OPT_NGHTTP3="no"
2024-02-05 19:02:21 +03:00
want_nghttp3="no"
2019-08-11 00:19:55 +03:00
fi
AC_ARG_WITH(nghttp3,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-nghttp3=PATH],[Enable nghttp3 usage])
AS_HELP_STRING([--without-nghttp3],[Disable nghttp3 usage]),
2019-08-11 00:19:55 +03:00
[OPT_NGHTTP3=$withval])
case "$OPT_NGHTTP3" in
no)
dnl --without-nghttp3 option used
want_nghttp3="no"
;;
yes)
dnl --with-nghttp3 option used without path
want_nghttp3="default"
want_nghttp3_path=""
;;
*)
dnl --with-nghttp3 option used with path
want_nghttp3="yes"
want_nghttp3_path="$withval/lib/pkgconfig"
;;
esac
2020-09-29 12:01:45 +03:00
curl_http3_msg="no (--with-nghttp3)"
2019-08-11 00:19:55 +03:00
if test X"$want_nghttp3" != Xno; then
2024-01-11 16:11:19 +03:00
2024-06-24 11:27:08 +03:00
if test "x$USE_NGTCP2" != "x1" -a "x$USE_OPENSSL_QUIC" != "x1"; then
# without ngtcp2 or openssl quic, nghttp3 is of no use for us
AC_MSG_ERROR([nghttp3 enabled without a QUIC library; enable ngtcp2 or OpenSSL-QUIC])
fi
2019-08-11 00:19:55 +03:00
dnl backup the pre-nghttp3 variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
CURL_CHECK_PKGCONFIG(libnghttp3, $want_nghttp3_path)
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2019-08-11 00:19:55 +03:00
LIB_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path])
$PKGCONFIG --libs-only-l libnghttp3`
AC_MSG_NOTICE([-l is $LIB_NGHTTP3])
CPP_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) dnl
$PKGCONFIG --cflags-only-I libnghttp3`
AC_MSG_NOTICE([-I is $CPP_NGHTTP3])
LD_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path])
$PKGCONFIG --libs-only-L libnghttp3`
AC_MSG_NOTICE([-L is $LD_NGHTTP3])
LDFLAGS="$LDFLAGS $LD_NGHTTP3"
CPPFLAGS="$CPPFLAGS $CPP_NGHTTP3"
LIBS="$LIB_NGHTTP3 $LIBS"
if test "x$cross_compiling" != "xyes"; then
2020-06-04 19:11:36 +03:00
DIR_NGHTTP3=`echo $LD_NGHTTP3 | $SED -e 's/^-L//'`
2019-08-11 00:19:55 +03:00
fi
2021-09-12 09:27:33 +03:00
AC_CHECK_LIB(nghttp3, nghttp3_conn_client_new_versioned,
2019-08-11 00:19:55 +03:00
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(nghttp3/nghttp3.h,
2019-08-11 00:19:55 +03:00
AC_DEFINE(USE_NGHTTP3, 1, [if nghttp3 is in use])
AC_SUBST(USE_NGHTTP3, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGHTTP3"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH])
2024-06-24 09:49:10 +03:00
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libnghttp3"
2024-08-21 12:08:54 +03:00
)
2019-08-11 00:19:55 +03:00
],
dnl not found, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
)
else
dnl no nghttp3 pkg-config found, deal with it
if test X"$want_nghttp3" != Xdefault; then
dnl To avoid link errors, we do not allow --with-nghttp3 without
dnl a pkgconfig file
AC_MSG_ERROR([--with-nghttp3 was specified but could not find nghttp3 pkg-config file.])
fi
fi
fi
2024-01-18 15:07:07 +03:00
dnl **********************************************************************
dnl Check for ngtcp2 and nghttp3 (HTTP/3 with ngtcp2 + nghttp3)
dnl **********************************************************************
if test "x$NGTCP2_ENABLED" = "x1" -a "x$USE_NGHTTP3" = "x1"; then
AC_DEFINE(USE_NGTCP2_H3, 1, [if ngtcp2 + nghttp3 is in use])
AC_SUBST(USE_NGTCP2_H3, [1])
AC_MSG_NOTICE([HTTP3 support is experimental])
curl_h3_msg="enabled (ngtcp2 + nghttp3)"
fi
dnl **********************************************************************
dnl Check for OpenSSL and nghttp3 (HTTP/3 with nghttp3 using OpenSSL QUIC)
dnl **********************************************************************
2019-08-11 00:19:55 +03:00
2024-01-18 15:07:07 +03:00
if test "x$USE_OPENSSL_QUIC" = "x1" -a "x$USE_NGHTTP3" = "x1"; then
experimental="$experimental HTTP3"
AC_DEFINE(USE_OPENSSL_H3, 1, [if openssl quic + nghttp3 is in use])
AC_SUBST(USE_OPENSSL_H3, [1])
AC_MSG_NOTICE([HTTP3 support is experimental])
curl_h3_msg="enabled (openssl + nghttp3)"
2019-08-11 00:19:55 +03:00
fi
2019-07-22 00:48:58 +03:00
dnl **********************************************************************
dnl Check for quiche (QUIC)
dnl **********************************************************************
2021-02-24 13:26:52 +03:00
OPT_QUICHE="no"
2019-07-22 00:48:58 +03:00
if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
# without HTTP or with ngtcp2, quiche is no use
OPT_QUICHE="no"
fi
AC_ARG_WITH(quiche,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-quiche=PATH],[Enable quiche usage])
AS_HELP_STRING([--without-quiche],[Disable quiche usage]),
2019-07-22 00:48:58 +03:00
[OPT_QUICHE=$withval])
case "$OPT_QUICHE" in
2019-08-18 17:03:51 +03:00
no)
dnl --without-quiche option used
want_quiche="no"
;;
yes)
2019-07-22 00:48:58 +03:00
dnl --with-quiche option used without path
want_quiche="default"
want_quiche_path=""
;;
2019-08-18 17:03:51 +03:00
*)
dnl --with-quiche option used with path
want_quiche="yes"
want_quiche_path="$withval"
2019-07-22 00:48:58 +03:00
;;
esac
if test X"$want_quiche" != Xno; then
2021-08-09 11:44:56 +03:00
2024-01-11 16:11:19 +03:00
if test "$QUIC_ENABLED" != "yes"; then
AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-quiche a no-no])
fi
2021-08-09 11:44:56 +03:00
if test "$NGHTTP3_ENABLED" = 1; then
AC_MSG_ERROR([--with-quiche and --with-ngtcp2 are mutually exclusive])
fi
2019-07-22 00:48:58 +03:00
dnl backup the pre-quiche variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
2019-08-18 17:03:51 +03:00
CURL_CHECK_PKGCONFIG(quiche, $want_quiche_path)
2019-07-22 00:48:58 +03:00
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2019-08-18 17:03:51 +03:00
LIB_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path])
$PKGCONFIG --libs-only-l quiche`
AC_MSG_NOTICE([-l is $LIB_QUICHE])
CPP_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) dnl
$PKGCONFIG --cflags-only-I quiche`
AC_MSG_NOTICE([-I is $CPP_QUICHE])
LD_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path])
$PKGCONFIG --libs-only-L quiche`
AC_MSG_NOTICE([-L is $LD_QUICHE])
2019-07-22 00:48:58 +03:00
2019-08-18 17:03:51 +03:00
LDFLAGS="$LDFLAGS $LD_QUICHE"
CPPFLAGS="$CPPFLAGS $CPP_QUICHE"
LIBS="$LIB_QUICHE $LIBS"
if test "x$cross_compiling" != "xyes"; then
2020-06-04 19:11:36 +03:00
DIR_QUICHE=`echo $LD_QUICHE | $SED -e 's/^-L//'`
2019-08-18 17:03:51 +03:00
fi
2023-04-04 11:47:35 +03:00
AC_CHECK_LIB(quiche, quiche_conn_send_ack_eliciting,
2014-05-24 15:54:28 +04:00
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(quiche.h,
2019-08-18 17:03:51 +03:00
experimental="$experimental HTTP3"
AC_MSG_NOTICE([HTTP3 support is experimental])
curl_h3_msg="enabled (quiche)"
QUICHE_ENABLED=1
AC_DEFINE(USE_QUICHE, 1, [if quiche is in use])
AC_SUBST(USE_QUICHE, [1])
2020-05-04 19:57:34 +03:00
AC_CHECK_FUNCS([quiche_conn_set_qlog_fd])
2019-08-18 17:03:51 +03:00
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_QUICHE"
export CURL_LIBRARY_PATH
2024-06-08 01:41:24 +03:00
AC_MSG_NOTICE([Added $DIR_QUICHE to CURL_LIBRARY_PATH])
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE quiche",
2021-05-24 15:20:36 +03:00
[],
[
AC_INCLUDES_DEFAULT
#include <sys/socket.h>
]
2024-08-21 12:08:54 +03:00
)
2014-05-24 15:54:28 +04:00
],
dnl not found, revert back to clean variables
2021-02-24 13:26:52 +03:00
AC_MSG_ERROR([couldn't use quiche])
2014-05-24 15:54:28 +04:00
)
else
2020-02-08 17:28:33 +03:00
dnl no quiche pkg-config found, deal with it
2019-08-18 17:03:51 +03:00
if test X"$want_quiche" != Xdefault; then
2020-02-08 17:28:33 +03:00
dnl To avoid link errors, we do not allow --with-quiche without
2014-05-24 15:54:28 +04:00
dnl a pkgconfig file
2019-08-18 17:03:51 +03:00
AC_MSG_ERROR([--with-quiche was specified but could not find quiche pkg-config file.])
2014-05-24 15:54:28 +04:00
fi
fi
2013-09-03 01:14:23 +04:00
fi
2022-04-10 19:21:37 +03:00
dnl **********************************************************************
dnl Check for msh3 (QUIC)
dnl **********************************************************************
OPT_MSH3="no"
if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
# without HTTP or with ngtcp2, msh3 is no use
OPT_MSH3="no"
fi
AC_ARG_WITH(msh3,
AS_HELP_STRING([--with-msh3=PATH],[Enable msh3 usage])
AS_HELP_STRING([--without-msh3],[Disable msh3 usage]),
[OPT_MSH3=$withval])
case "$OPT_MSH3" in
no)
dnl --without-msh3 option used
want_msh3="no"
;;
yes)
dnl --with-msh3 option used without path
want_msh3="default"
want_msh3_path=""
;;
*)
dnl --with-msh3 option used with path
want_msh3="yes"
want_msh3_path="$withval"
;;
esac
if test X"$want_msh3" != Xno; then
2024-01-11 16:11:19 +03:00
dnl msh3 on non-Windows needs an OpenSSL with the QUIC API
if test "$curl_cv_native_windows" != "yes"; then
if test "$QUIC_ENABLED" != "yes"; then
AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-msh3 a no-no])
fi
if test "$OPENSSL_ENABLED" != "1"; then
AC_MSG_ERROR([msh3 requires OpenSSL])
fi
fi
2022-04-10 19:21:37 +03:00
if test "$NGHTTP3_ENABLED" = 1; then
AC_MSG_ERROR([--with-msh3 and --with-ngtcp2 are mutually exclusive])
fi
2024-01-18 15:07:07 +03:00
if test "$QUICHE_ENABLED" = 1; then
AC_MSG_ERROR([--with-msh3 and --with-quiche are mutually exclusive])
fi
2022-04-10 19:21:37 +03:00
dnl backup the pre-msh3 variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
if test -n "$want_msh3_path"; then
LD_MSH3="-L$want_msh3_path/lib"
CPP_MSH3="-I$want_msh3_path/include"
DIR_MSH3="$want_msh3_path/lib"
LDFLAGS="$LDFLAGS $LD_MSH3"
CPPFLAGS="$CPPFLAGS $CPP_MSH3"
fi
LIBS="-lmsh3 $LIBS"
AC_CHECK_LIB(msh3, MsH3ApiOpen,
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(msh3.h,
2022-04-10 19:21:37 +03:00
curl_h3_msg="enabled (msh3)"
MSH3_ENABLED=1
AC_DEFINE(USE_MSH3, 1, [if msh3 is in use])
AC_SUBST(USE_MSH3, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_MSH3"
export CURL_LIBRARY_PATH
2024-07-01 12:38:25 +03:00
AC_MSG_NOTICE([Added $DIR_MSH3 to CURL_LIBRARY_PATH])
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libmsh3"
2022-04-10 19:21:37 +03:00
experimental="$experimental HTTP3"
2024-08-21 12:08:54 +03:00
)
2022-04-10 19:21:37 +03:00
],
dnl not found, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
)
fi
2024-08-05 10:12:04 +03:00
dnl **********************************************************************
dnl libuv is only ever used for debug purposes
dnl **********************************************************************
OPT_LIBUV=no
AC_ARG_WITH(libuv,
AS_HELP_STRING([--with-libuv=PATH],[Enable libuv])
AS_HELP_STRING([--without-libuv],[Disable libuv]),
[OPT_LIBUV=$withval])
case "$OPT_LIBUV" in
no)
dnl --without-libuv option used
want_libuv="no"
;;
yes)
dnl --with-libuv option used without path
want_libuv="default"
want_libuv_path=""
;;
*)
dnl --with-libuv option used with path
want_libuv="yes"
want_libuv_path="$withval"
;;
esac
if test X"$want_libuv" != Xno; then
if test x$want_debug != xyes; then
AC_MSG_ERROR([Using libuv without debug support enabled is useless])
fi
dnl backup the pre-libuv variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
CURL_CHECK_PKGCONFIG(libuv, $want_libuv_path)
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2024-08-05 10:12:04 +03:00
LIB_LIBUV=`CURL_EXPORT_PCDIR([$want_libuv_path])
$PKGCONFIG --libs-only-l libuv`
AC_MSG_NOTICE([-l is $LIB_LIBUV])
CPP_LIBUV=`CURL_EXPORT_PCDIR([$want_libuv_path]) dnl
$PKGCONFIG --cflags-only-I libuv`
AC_MSG_NOTICE([-I is $CPP_LIBUV])
LD_LIBUV=`CURL_EXPORT_PCDIR([$want_libuv_path])
$PKGCONFIG --libs-only-L libuv`
AC_MSG_NOTICE([-L is $LD_LIBUV])
LDFLAGS="$LDFLAGS $LD_LIBUV"
CPPFLAGS="$CPPFLAGS $CPP_LIBUV"
LIBS="$LIB_LIBUV $LIBS"
if test "x$cross_compiling" != "xyes"; then
DIR_LIBUV=`echo $LD_LIBUV | $SED -e 's/^-L//'`
fi
AC_CHECK_LIB(uv, uv_default_loop,
[
2024-08-21 12:08:54 +03:00
AC_CHECK_HEADERS(uv.h,
2024-08-05 10:12:04 +03:00
LIBUV_ENABLED=1
AC_DEFINE(USE_LIBUV, 1, [if libuv is in use])
AC_SUBST(USE_LIBUV, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_LIBUV"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_LIBUV to CURL_LIBRARY_PATH])
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libuv"
2024-08-21 12:08:54 +03:00
)
2024-08-05 10:12:04 +03:00
],
dnl not found, revert back to clean variables
LDFLAGS=$CLEANLDFLAGS
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
)
else
dnl no libuv pkg-config found, deal with it
if test X"$want_libuv" != Xdefault; then
dnl To avoid link errors, we do not allow --with-libuv without
dnl a pkgconfig file
AC_MSG_ERROR([--with-libuv was specified but could not find libuv pkg-config file.])
fi
fi
fi
2015-11-20 07:56:10 +03:00
dnl **********************************************************************
dnl Check for zsh completion path
dnl **********************************************************************
OPT_ZSH_FPATH=default
AC_ARG_WITH(zsh-functions-dir,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-zsh-functions-dir=PATH],[Install zsh completions to PATH])
AS_HELP_STRING([--without-zsh-functions-dir],[Do not install zsh completions]),
2015-11-20 07:56:10 +03:00
[OPT_ZSH_FPATH=$withval])
case "$OPT_ZSH_FPATH" in
2024-02-08 22:34:34 +03:00
default|no)
2015-11-20 07:56:10 +03:00
dnl --without-zsh-functions-dir option used
;;
2024-02-08 22:34:34 +03:00
yes)
2015-11-20 07:56:10 +03:00
dnl --with-zsh-functions-dir option used without path
ZSH_FUNCTIONS_DIR="$datarootdir/zsh/site-functions"
AC_SUBST(ZSH_FUNCTIONS_DIR)
;;
*)
dnl --with-zsh-functions-dir option used with path
ZSH_FUNCTIONS_DIR="$withval"
AC_SUBST(ZSH_FUNCTIONS_DIR)
;;
esac
2024-02-08 22:34:34 +03:00
AM_CONDITIONAL(USE_ZSH_COMPLETION, test x"$ZSH_FUNCTIONS_DIR" != x)
2015-11-20 07:56:10 +03:00
2019-02-11 00:06:42 +03:00
dnl **********************************************************************
dnl Check for fish completion path
dnl **********************************************************************
OPT_FISH_FPATH=default
AC_ARG_WITH(fish-functions-dir,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--with-fish-functions-dir=PATH],[Install fish completions to PATH])
AS_HELP_STRING([--without-fish-functions-dir],[Do not install fish completions]),
2019-02-11 00:06:42 +03:00
[OPT_FISH_FPATH=$withval])
case "$OPT_FISH_FPATH" in
2024-02-08 22:34:34 +03:00
default|no)
2019-02-11 00:06:42 +03:00
dnl --without-fish-functions-dir option used
;;
2024-02-08 22:34:34 +03:00
yes)
2019-02-11 00:06:42 +03:00
dnl --with-fish-functions-dir option used without path
2019-04-03 03:43:29 +03:00
CURL_CHECK_PKGCONFIG(fish)
2024-08-21 12:08:54 +03:00
if test "$PKGCONFIG" != "no"; then
2024-07-07 20:32:09 +03:00
FISH_FUNCTIONS_DIR=`$PKGCONFIG --variable completionsdir fish`
2019-04-03 03:43:29 +03:00
else
FISH_FUNCTIONS_DIR="$datarootdir/fish/vendor_completions.d"
fi
2019-02-11 00:06:42 +03:00
AC_SUBST(FISH_FUNCTIONS_DIR)
;;
*)
dnl --with-fish-functions-dir option used with path
FISH_FUNCTIONS_DIR="$withval"
AC_SUBST(FISH_FUNCTIONS_DIR)
;;
esac
2024-02-08 22:34:34 +03:00
AM_CONDITIONAL(USE_FISH_COMPLETION, test x"$FISH_FUNCTIONS_DIR" != x)
2019-02-11 00:06:42 +03:00
2005-12-16 07:18:44 +03:00
dnl Now check for the very most basic headers. Then we can use these
2003-03-12 16:42:07 +03:00
dnl ones as default-headers when checking for the rest!
AC_CHECK_HEADERS(
2024-08-21 12:08:54 +03:00
sys/types.h \
sys/time.h \
sys/select.h \
sys/socket.h \
sys/ioctl.h \
unistd.h \
stdlib.h \
arpa/inet.h \
net/if.h \
netinet/in.h \
netinet/in6.h \
sys/un.h \
linux/tcp.h \
netinet/tcp.h \
netinet/udp.h \
netdb.h \
sys/sockio.h \
sys/stat.h \
sys/param.h \
termios.h \
termio.h \
fcntl.h \
io.h \
pwd.h \
utime.h \
sys/utime.h \
sys/poll.h \
poll.h \
socket.h \
sys/resource.h \
libgen.h \
locale.h \
stdbool.h \
sys/filio.h \
sys/wait.h \
sys/eventfd.h \
setjmp.h,
2003-03-12 16:42:07 +03:00
dnl to do if not found
[],
dnl to do if found
[],
dnl default includes
[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
2020-03-30 16:52:43 +03:00
#elif defined(HAVE_UNISTD_H)
#include <unistd.h>
2003-03-12 16:42:07 +03:00
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
2004-03-29 10:22:57 +04:00
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
2017-12-05 19:41:27 +03:00
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
2008-05-02 01:34:34 +04:00
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
2003-03-12 16:42:07 +03:00
]
1999-12-29 17:20:26 +03:00
)
2019-03-08 03:06:59 +03:00
1999-12-29 17:20:26 +03:00
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
2021-03-15 20:16:36 +03:00
2006-10-13 05:35:14 +04:00
CURL_CHECK_STRUCT_TIMEVAL
2006-10-16 12:30:54 +04:00
CURL_VERIFY_RUNTIMELIBS
1999-12-29 17:20:26 +03:00
2022-08-11 10:07:02 +03:00
CURL_SIZEOF(size_t)
CURL_SIZEOF(long)
CURL_SIZEOF(int)
CURL_SIZEOF(time_t)
CURL_SIZEOF(off_t)
1999-12-29 17:20:26 +03:00
2017-08-12 16:54:06 +03:00
o=$CPPFLAGS
2017-09-07 01:04:16 +03:00
CPPFLAGS="-I$srcdir/include $CPPFLAGS"
2022-08-11 10:07:02 +03:00
CURL_SIZEOF(curl_off_t, [
2017-08-12 16:54:06 +03:00
#include <curl/system.h>
])
2023-03-28 17:46:03 +03:00
CURL_SIZEOF(curl_socket_t, [
#include <curl/curl.h>
])
2017-08-12 16:54:06 +03:00
CPPFLAGS=$o
2008-08-25 16:49:13 +04:00
2003-08-15 02:44:06 +04:00
AC_CHECK_TYPE(long long,
2024-08-21 12:08:54 +03:00
[AC_DEFINE(HAVE_LONGLONG, 1,
[Define to 1 if the compiler supports the 'long long' data type.])]
longlong="yes"
2004-10-10 07:22:45 +04:00
)
2022-09-27 12:13:21 +03:00
if test ${ac_cv_sizeof_curl_off_t} -lt 8; then
2023-02-24 02:45:16 +03:00
AC_MSG_ERROR([64 bit curl_off_t is required])
2004-10-10 07:22:45 +04:00
fi
2001-02-07 12:49:06 +03:00
# check for ssize_t
2003-08-15 02:44:06 +04:00
AC_CHECK_TYPE(ssize_t, ,
2024-08-21 12:08:54 +03:00
AC_DEFINE(ssize_t, int, [the signed version of size_t]))
2001-02-07 12:49:06 +03:00
2007-02-22 05:51:54 +03:00
# check for bool type
AC_CHECK_TYPE([bool],[
AC_DEFINE(HAVE_BOOL_T, 1,
[Define to 1 if bool is an available type.])
], ,[
2007-02-22 19:44:43 +03:00
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
2007-02-22 05:51:54 +03:00
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif
])
2018-03-26 17:01:07 +03:00
# check for sa_family_t
AC_CHECK_TYPE(sa_family_t,
2024-08-21 12:08:54 +03:00
AC_DEFINE(CURL_SA_FAMILY_T, sa_family_t, [IP address type in sockaddr]),
[
# The Windows name?
AC_CHECK_TYPE(ADDRESS_FAMILY,
AC_DEFINE(CURL_SA_FAMILY_T, ADDRESS_FAMILY, [IP address type in sockaddr]),
AC_DEFINE(CURL_SA_FAMILY_T, unsigned short, [IP address type in sockaddr]),
2018-03-26 17:01:07 +03:00
[
2023-12-09 23:37:11 +03:00
#ifdef _WIN32
2023-12-02 02:06:12 +03:00
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <winsock2.h>
#endif
2018-03-26 17:01:07 +03:00
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])
2024-08-21 12:08:54 +03:00
],
2018-03-26 17:01:07 +03:00
[
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])
2020-05-27 18:24:21 +03:00
# check for suseconds_t
AC_CHECK_TYPE([suseconds_t],[
AC_DEFINE(HAVE_SUSECONDS_T, 1,
[Define to 1 if suseconds_t is an available type.])
], ,[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
])
2018-01-18 22:24:05 +03:00
AC_MSG_CHECKING([if time_t is unsigned])
2018-04-13 15:07:39 +03:00
CURL_RUN_IFELSE(
[
2018-01-18 22:24:05 +03:00
#include <time.h>
#include <limits.h>
2023-09-10 07:26:14 +03:00
int main(void) {
time_t t = -1;
return (t < 0);
}
2018-04-13 15:07:39 +03:00
],[
2018-01-18 22:24:05 +03:00
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned])
],[
AC_MSG_RESULT([no])
],[
dnl cross-compiling, most systems are unsigned
AC_MSG_RESULT([no])
])
2009-04-27 06:47:34 +04:00
2001-11-28 16:16:56 +03:00
TYPE_IN_ADDR_T
2001-03-09 18:38:59 +03:00
2005-05-02 15:56:15 +04:00
TYPE_SOCKADDR_STORAGE
2008-05-19 20:57:56 +04:00
CURL_CHECK_FUNC_SELECT
2003-03-16 00:04:01 +03:00
2006-07-04 17:03:32 +04:00
CURL_CHECK_FUNC_RECV
CURL_CHECK_FUNC_SEND
2006-07-28 18:19:02 +04:00
CURL_CHECK_MSG_NOSIGNAL
2008-09-19 22:39:24 +04:00
CURL_CHECK_FUNC_ALARM
2009-10-18 07:37:39 +04:00
CURL_CHECK_FUNC_BASENAME
2009-06-17 13:12:19 +04:00
CURL_CHECK_FUNC_CLOSESOCKET
2009-06-18 16:36:10 +04:00
CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
2008-11-13 21:56:55 +03:00
CURL_CHECK_FUNC_FCNTL
2008-10-30 20:45:47 +03:00
CURL_CHECK_FUNC_FREEADDRINFO
2010-11-11 14:11:19 +03:00
CURL_CHECK_FUNC_FSETXATTR
2008-09-10 23:26:30 +04:00
CURL_CHECK_FUNC_FTRUNCATE
2008-10-28 22:13:25 +03:00
CURL_CHECK_FUNC_GETADDRINFO
2008-11-18 04:57:28 +03:00
CURL_CHECK_FUNC_GETHOSTBYNAME
2008-09-17 20:03:49 +04:00
CURL_CHECK_FUNC_GETHOSTBYNAME_R
2008-09-17 12:14:28 +04:00
CURL_CHECK_FUNC_GETHOSTNAME
2019-05-21 11:06:06 +03:00
CURL_CHECK_FUNC_GETPEERNAME
CURL_CHECK_FUNC_GETSOCKNAME
2019-05-21 17:47:53 +03:00
CURL_CHECK_FUNC_IF_NAMETOINDEX
2008-11-08 06:27:15 +03:00
CURL_CHECK_FUNC_GETIFADDRS
2008-09-10 21:33:15 +04:00
CURL_CHECK_FUNC_GMTIME_R
2008-09-24 20:43:40 +04:00
CURL_CHECK_FUNC_INET_NTOP
2008-09-24 23:13:01 +04:00
CURL_CHECK_FUNC_INET_PTON
2023-10-02 14:24:14 +03:00
CURL_CHECK_FUNC_IOCTL
2008-11-13 21:56:55 +03:00
CURL_CHECK_FUNC_IOCTLSOCKET
CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
2009-09-28 16:16:29 +04:00
CURL_CHECK_FUNC_MEMRCHR
2009-02-13 08:49:58 +03:00
CURL_CHECK_FUNC_POLL
2008-09-10 23:03:00 +04:00
CURL_CHECK_FUNC_SIGACTION
2008-09-26 22:28:32 +04:00
CURL_CHECK_FUNC_SIGINTERRUPT
CURL_CHECK_FUNC_SIGNAL
CURL_CHECK_FUNC_SIGSETJMP
2009-06-17 13:12:19 +04:00
CURL_CHECK_FUNC_SOCKET
2011-07-29 15:25:52 +04:00
CURL_CHECK_FUNC_SOCKETPAIR
2008-09-15 04:32:08 +04:00
CURL_CHECK_FUNC_STRCASECMP
CURL_CHECK_FUNC_STRCMPI
2008-09-10 23:26:30 +04:00
CURL_CHECK_FUNC_STRDUP
2008-09-12 05:16:26 +04:00
CURL_CHECK_FUNC_STRERROR_R
2008-09-15 04:32:08 +04:00
CURL_CHECK_FUNC_STRICMP
2008-09-10 23:03:00 +04:00
CURL_CHECK_FUNC_STRTOK_R
2008-09-10 21:33:15 +04:00
CURL_CHECK_FUNC_STRTOLL
2005-11-24 13:22:46 +03:00
case $host in
*msdosdjgpp)
2024-08-21 12:08:54 +03:00
ac_cv_func_pipe=no
skipcheck_pipe=yes
AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
2005-11-24 13:22:46 +03:00
;;
esac
2008-08-01 23:01:35 +04:00
2018-05-27 20:51:04 +03:00
AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Set if getpwuid_r() declaration is missing")],
[[#include <pwd.h>
#include <sys/types.h>]])
2023-09-25 14:03:26 +03:00
AC_CHECK_FUNCS([\
2023-09-22 16:58:49 +03:00
_fseeki64 \
2023-09-25 14:03:26 +03:00
arc4random \
2024-06-01 21:26:11 +03:00
eventfd \
2023-09-25 14:03:26 +03:00
fnmatch \
2008-08-01 23:01:35 +04:00
geteuid \
getpass_r \
getppid \
getpwuid \
2014-07-13 02:18:40 +04:00
getpwuid_r \
2008-08-01 23:01:35 +04:00
getrlimit \
gettimeofday \
2014-05-27 00:10:15 +04:00
if_nametoindex \
2017-10-30 15:12:41 +03:00
mach_absolute_time \
2008-08-01 23:01:35 +04:00
pipe \
2022-04-05 16:46:03 +03:00
sched_yield \
2022-06-10 10:09:39 +03:00
sendmsg \
2008-08-01 23:01:35 +04:00
setlocale \
setmode \
setrlimit \
2022-09-22 12:52:08 +03:00
snprintf \
2017-04-27 02:24:07 +03:00
utime \
2023-03-04 10:02:14 +03:00
utimes \
2008-08-01 23:01:35 +04:00
])
2024-08-25 14:16:49 +03:00
if test "$curl_cv_native_windows" != 'yes'; then
AC_CHECK_FUNCS([fseeko])
dnl On Android, the only way to know if fseeko can be used is to see if it is
dnl declared or not (for this API level), as the symbol always exists in the
dnl lib.
AC_CHECK_DECL([fseeko],
[AC_DEFINE([HAVE_DECL_FSEEKO], [1],
[Define to 1 if you have the fseeko declaration])],
[],
[[#include <stdio.h>]])
fi
2023-10-19 15:55:37 +03:00
2008-11-13 21:56:55 +03:00
CURL_CHECK_NONBLOCKING_SOCKET
2024-06-29 04:30:14 +03:00
if test "x$BUILD_DOCS" != "x0" -o "x$USE_MANUAL" != "x0" -o "x$CURL_CA_EMBED" != "x"; then
2024-05-01 11:48:16 +03:00
AC_PATH_PROG( PERL, perl, ,
$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
AC_SUBST(PERL)
2004-06-28 01:51:54 +04:00
2024-05-01 11:48:16 +03:00
if test -z "$PERL"; then
2024-06-29 04:30:14 +03:00
AC_MSG_ERROR([perl was not found, needed for docs, manual and CA embed])
2004-02-03 01:39:04 +03:00
fi
2004-02-12 18:05:38 +03:00
fi
2024-02-04 00:05:59 +03:00
dnl set variable for use in automakefile(s)
AM_CONDITIONAL(BUILD_DOCS, test x"$BUILD_DOCS" = x1)
2004-02-03 01:39:04 +03:00
2004-02-12 17:45:50 +03:00
dnl *************************************************************************
dnl If the manual variable still is set, then we go with providing a built-in
dnl manual
if test "$USE_MANUAL" = "1"; then
2004-04-26 16:29:30 +04:00
curl_manual_msg="enabled"
2004-02-12 17:45:50 +03:00
fi
dnl set variable for use in automakefile(s)
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
2010-01-26 18:07:40 +03:00
CURL_CHECK_LIB_ARES
2009-05-30 19:56:42 +04:00
2017-08-10 16:07:40 +03:00
if test "x$want_ares" != xyes; then
CURL_CHECK_OPTION_THREADED_RESOLVER
2024-07-07 00:47:50 +03:00
if test "$ipv6" = yes; then
CURL_DARWIN_SYSTEMCONFIGURATION
fi
2010-04-26 01:24:05 +04:00
fi
2017-02-12 22:50:56 +03:00
dnl ************************************************************
dnl disable POSIX threads
dnl
AC_MSG_CHECKING([whether to use POSIX threads for threaded resolver])
AC_ARG_ENABLE(pthreads,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-pthreads],
2024-08-21 12:08:54 +03:00
[Enable POSIX threads (default for threaded resolver)])
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--disable-pthreads],[Disable POSIX threads]),
2017-02-12 22:50:56 +03:00
[ case "$enableval" in
2024-08-21 12:08:54 +03:00
no)
AC_MSG_RESULT(no)
want_pthreads=no
;;
*)
AC_MSG_RESULT(yes)
want_pthreads=yes
;;
2017-02-12 22:50:56 +03:00
esac ], [
2024-09-06 16:14:26 +03:00
default_pthreads=1
2024-08-25 14:16:49 +03:00
if test "$curl_cv_native_windows" = "yes"; then
2024-09-06 16:14:26 +03:00
default_pthreads=0
else
case $host_os in
msdos*)
default_pthreads=0
;;
esac
fi
if test "$default_pthreads" = '0'; then
2024-08-25 14:16:49 +03:00
AC_MSG_RESULT(no)
want_pthreads=no
else
AC_MSG_RESULT(auto)
want_pthreads=auto
fi
2024-08-21 12:08:54 +03:00
]
2017-02-12 22:50:56 +03:00
)
2017-03-01 11:11:36 +03:00
dnl turn off pthreads if rt is disabled
if test "$want_pthreads" != "no"; then
if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then
AC_MSG_ERROR([options --enable-pthreads and --disable-rt are mutually exclusive])
fi
if test "$dontwant_rt" != "no"; then
dnl if --enable-pthreads was explicit then warn it's being ignored
if test "$want_pthreads" = "yes"; then
AC_MSG_WARN([--enable-pthreads Ignored since librt is disabled.])
fi
want_pthreads=no
fi
fi
2010-04-26 01:24:05 +04:00
2017-03-01 11:11:36 +03:00
dnl turn off pthreads if no threaded resolver
if test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then
want_pthreads=no
2010-04-26 01:24:05 +04:00
fi
2017-03-01 11:11:36 +03:00
dnl detect pthreads
if test "$want_pthreads" != "no"; then
2010-04-26 01:24:05 +04:00
AC_CHECK_HEADER(pthread.h,
[ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
save_CFLAGS="$CFLAGS"
2024-07-12 14:55:26 +03:00
dnl When statically linking against BoringSSL, -lpthread is added to LIBS.
2020-05-21 00:36:21 +03:00
dnl Make sure to that this does not pass the check below, we really want
dnl -pthread in CFLAGS as recommended for GCC. This also ensures that
dnl lib1541 and lib1565 tests are built with these options. Otherwise
dnl they fail the build since tests/libtest/Makefile.am clears LIBS.
save_LIBS="$LIBS"
LIBS=
dnl Check for libc variants without a separate pthread lib like bionic
2013-04-11 18:21:49 +04:00
AC_CHECK_FUNC(pthread_create, [USE_THREADS_POSIX=1] )
2020-05-21 00:36:21 +03:00
LIBS="$save_LIBS"
2013-04-11 18:21:49 +04:00
tidy-up: OS names
Use these words and casing more consistently across text, comments and
one curl tool output:
AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux,
macOS, MS-DOS, MSYS, MinGW, NTLM, POSIX, Solaris, UNIX, Unix, Unicode,
WINE, WebDAV, Win32, winbind, WinIDN, Windows, Windows CE, Winsock.
Mostly OS names and a few more.
Also a couple of other minor text fixups.
Closes #14360
2024-08-03 02:09:57 +03:00
dnl on HP-UX, life is more complicated...
2018-09-21 10:40:56 +03:00
case $host in
2024-08-21 12:08:54 +03:00
*-hp-hpux*)
dnl it doesn't actually work without -lpthread
USE_THREADS_POSIX=""
;;
*)
;;
2018-09-21 10:40:56 +03:00
esac
2013-04-11 18:21:49 +04:00
dnl if it wasn't found without lib, search for it in pthread lib
2024-08-21 12:08:54 +03:00
if test "$USE_THREADS_POSIX" != "1"; then
2022-08-07 17:42:35 +03:00
# assign PTHREAD for pkg-config use
PTHREAD=" -pthread"
2022-03-05 17:46:38 +03:00
case $host in
2024-08-21 12:08:54 +03:00
*-ibm-aix*)
dnl Check if compiler is xlC
COMPILER_VERSION=`"$CC" -qversion 2>/dev/null`
if test x"$COMPILER_VERSION" = "x"; then
CFLAGS="$CFLAGS -pthread"
else
CFLAGS="$CFLAGS -qthreaded"
fi
;;
powerpc-*amigaos*)
dnl No -pthread option, but link with -lpthread
PTHREAD=" -lpthread"
;;
*)
CFLAGS="$CFLAGS -pthread"
;;
2022-03-05 17:46:38 +03:00
esac
2013-04-11 18:21:49 +04:00
AC_CHECK_LIB(pthread, pthread_create,
[USE_THREADS_POSIX=1],
[ CFLAGS="$save_CFLAGS"])
fi
2024-08-21 12:08:54 +03:00
if test "x$USE_THREADS_POSIX" = "x1"; then
2013-04-11 18:21:49 +04:00
AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
curl_res_msg="POSIX threaded"
fi
2010-04-26 01:24:05 +04:00
])
fi
2017-03-01 11:11:36 +03:00
dnl threaded resolver check
if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then
2017-02-12 22:50:56 +03:00
if test "$want_pthreads" = "yes"; then
AC_MSG_ERROR([--enable-pthreads but pthreads was not found])
fi
2017-03-01 11:11:36 +03:00
dnl If native Windows fallback on Win32 threads since no POSIX threads
if test "$curl_cv_native_windows" = "yes"; then
USE_THREADS_WIN32=1
AC_DEFINE(USE_THREADS_WIN32, 1, [if you want Win32 threaded DNS lookup])
curl_res_msg="Win32 threaded"
else
AC_MSG_ERROR([Threaded resolver enabled but no thread library found])
2017-02-12 22:50:56 +03:00
fi
fi
2024-03-16 14:39:01 +03:00
AC_CHECK_HEADER(dirent.h,
[ AC_DEFINE(HAVE_DIRENT_H, 1, [if you have <dirent.h>])
AC_CHECK_FUNC(opendir, AC_DEFINE(HAVE_OPENDIR, 1, [if you have opendir]) )
]
)
2020-03-08 13:08:13 +03:00
CURL_CONVERT_INCLUDE_TO_ISYSTEM
2004-11-11 19:34:24 +03:00
dnl ************************************************************
dnl disable verbose text strings
dnl
AC_MSG_CHECKING([whether to enable verbose strings])
AC_ARG_ENABLE(verbose,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-verbose],[Enable verbose strings])
AS_HELP_STRING([--disable-verbose],[Disable verbose strings]),
2004-11-11 19:34:24 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings])
curl_verbose_msg="no"
;;
*)
AC_MSG_RESULT(yes)
;;
2004-11-11 19:34:24 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2004-11-11 19:34:24 +03:00
)
2005-03-14 02:59:28 +03:00
dnl ************************************************************
dnl enable SSPI support
dnl
2007-04-10 22:53:21 +04:00
AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)])
2005-03-14 02:59:28 +03:00
AC_ARG_ENABLE(sspi,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-sspi],[Enable SSPI])
AS_HELP_STRING([--disable-sspi],[Disable SSPI]),
2005-03-14 02:59:28 +03:00
[ case "$enableval" in
yes)
2024-08-21 12:08:54 +03:00
if test "$curl_cv_native_windows" = "yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
AC_SUBST(USE_WINDOWS_SSPI, [1])
curl_sspi_msg="enabled"
else
AC_MSG_RESULT(no)
AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.])
fi
;;
2005-03-14 02:59:28 +03:00
*)
2024-08-21 12:08:54 +03:00
if test "x$SCHANNEL_ENABLED" = "x1"; then
# --with-schannel implies --enable-sspi
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
;;
2005-03-14 02:59:28 +03:00
esac ],
2024-08-21 12:08:54 +03:00
if test "x$SCHANNEL_ENABLED" = "x1"; then
# --with-schannel implies --enable-sspi
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
2005-03-14 02:59:28 +03:00
)
2004-11-12 12:18:14 +03:00
dnl ************************************************************
2023-07-20 17:09:04 +03:00
dnl disable basic authentication
2004-11-12 12:18:14 +03:00
dnl
2023-07-20 17:09:04 +03:00
AC_MSG_CHECKING([whether to enable basic authentication method])
AC_ARG_ENABLE(basic-auth,
AS_HELP_STRING([--enable-basic-auth],[Enable basic authentication (default)])
AS_HELP_STRING([--disable-basic-auth],[Disable basic authentication]),
2004-11-12 12:18:14 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_BASIC_AUTH, 1, [to disable basic authentication])
CURL_DISABLE_BASIC_AUTH=1
;;
*)
AC_MSG_RESULT(yes)
;;
2023-07-20 17:09:04 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2023-07-20 17:09:04 +03:00
)
dnl ************************************************************
dnl disable bearer authentication
dnl
AC_MSG_CHECKING([whether to enable bearer authentication method])
AC_ARG_ENABLE(bearer-auth,
AS_HELP_STRING([--enable-bearer-auth],[Enable bearer authentication (default)])
AS_HELP_STRING([--disable-bearer-auth],[Disable bearer authentication]),
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_BEARER_AUTH, 1, [to disable bearer authentication])
CURL_DISABLE_BEARER_AUTH=1
;;
*)
AC_MSG_RESULT(yes)
;;
2023-07-20 17:09:04 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2023-07-20 17:09:04 +03:00
)
dnl ************************************************************
dnl disable digest authentication
dnl
AC_MSG_CHECKING([whether to enable digest authentication method])
AC_ARG_ENABLE(digest-auth,
AS_HELP_STRING([--enable-digest-auth],[Enable digest authentication (default)])
AS_HELP_STRING([--disable-digest-auth],[Disable digest authentication]),
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_DIGEST_AUTH, 1, [to disable digest authentication])
CURL_DISABLE_DIGEST_AUTH=1
;;
*)
AC_MSG_RESULT(yes)
;;
2023-07-20 17:09:04 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2023-07-20 17:09:04 +03:00
)
dnl ************************************************************
dnl disable kerberos authentication
dnl
AC_MSG_CHECKING([whether to enable kerberos authentication method])
AC_ARG_ENABLE(kerberos-auth,
AS_HELP_STRING([--enable-kerberos-auth],[Enable kerberos authentication (default)])
AS_HELP_STRING([--disable-kerberos-auth],[Disable kerberos authentication]),
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_KERBEROS_AUTH, 1, [to disable kerberos authentication])
CURL_DISABLE_KERBEROS_AUTH=1
;;
*)
AC_MSG_RESULT(yes)
;;
2023-07-20 17:09:04 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2023-07-20 17:09:04 +03:00
)
dnl ************************************************************
dnl disable negotiate authentication
dnl
AC_MSG_CHECKING([whether to enable negotiate authentication method])
AC_ARG_ENABLE(negotiate-auth,
AS_HELP_STRING([--enable-negotiate-auth],[Enable negotiate authentication (default)])
AS_HELP_STRING([--disable-negotiate-auth],[Disable negotiate authentication]),
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_NEGOTIATE_AUTH, 1, [to disable negotiate authentication])
CURL_DISABLE_NEGOTIATE_AUTH=1
;;
*)
AC_MSG_RESULT(yes)
;;
2023-07-20 17:09:04 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2023-07-20 17:09:04 +03:00
)
dnl ************************************************************
dnl disable aws
2004-11-12 12:18:14 +03:00
dnl
2023-07-20 17:09:04 +03:00
AC_MSG_CHECKING([whether to enable aws sig methods])
AC_ARG_ENABLE(aws,
AS_HELP_STRING([--enable-aws],[Enable AWS sig support (default)])
AS_HELP_STRING([--disable-aws],[Disable AWS sig support]),
2004-11-12 12:18:14 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_AWS, 1, [to disable AWS sig support])
CURL_DISABLE_AWS=1
;;
*)
AC_MSG_RESULT(yes)
;;
2004-11-12 12:18:14 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2004-11-12 12:18:14 +03:00
)
2021-05-07 12:45:35 +03:00
dnl ************************************************************
dnl disable NTLM support
dnl
AC_MSG_CHECKING([whether to support NTLM])
AC_ARG_ENABLE(ntlm,
AS_HELP_STRING([--enable-ntlm],[Enable NTLM support])
AS_HELP_STRING([--disable-ntlm],[Disable NTLM support]),
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_NTLM, 1, [to disable NTLM support])
CURL_DISABLE_NTLM=1
;;
*)
AC_MSG_RESULT(yes)
;;
2021-05-07 12:45:35 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2021-05-07 12:45:35 +03:00
)
2011-01-19 22:35:02 +03:00
dnl ************************************************************
dnl disable TLS-SRP authentication
dnl
AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
AC_ARG_ENABLE(tls-srp,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
AS_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
2011-01-19 22:35:02 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
want_tls_srp=no
;;
*)
AC_MSG_RESULT(yes)
want_tls_srp=yes
;;
2011-01-19 22:35:02 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
want_tls_srp=yes
2011-01-19 22:35:02 +03:00
)
2024-08-21 12:08:54 +03:00
if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1"); then
AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
USE_TLS_SRP=1
curl_tls_srp_msg="enabled"
2011-01-19 22:35:02 +03:00
fi
2014-11-28 01:59:25 +03:00
dnl ************************************************************
2014-12-26 23:45:21 +03:00
dnl disable Unix domain sockets support
2014-11-28 01:59:25 +03:00
dnl
2014-12-26 23:45:21 +03:00
AC_MSG_CHECKING([whether to enable Unix domain sockets])
2014-11-28 01:59:25 +03:00
AC_ARG_ENABLE(unix-sockets,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-unix-sockets],[Enable Unix domain sockets])
AS_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]),
2014-11-28 01:59:25 +03:00
[ case "$enableval" in
2024-08-21 12:08:54 +03:00
no)
AC_MSG_RESULT(no)
want_unix_sockets=no
;;
*)
AC_MSG_RESULT(yes)
want_unix_sockets=yes
;;
2014-11-28 01:59:25 +03:00
esac ], [
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(auto)
want_unix_sockets=auto
]
2014-11-28 01:59:25 +03:00
)
if test "x$want_unix_sockets" != "xno"; then
2022-10-11 10:51:33 +03:00
if test "x$curl_cv_native_windows" = "xyes"; then
USE_UNIX_SOCKETS=1
2014-12-26 23:45:21 +03:00
AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
2014-11-28 01:59:25 +03:00
curl_unix_sockets_msg="enabled"
2022-10-11 10:51:33 +03:00
else
AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [
AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
AC_SUBST(USE_UNIX_SOCKETS, [1])
curl_unix_sockets_msg="enabled"
], [
if test "x$want_unix_sockets" = "xyes"; then
AC_MSG_ERROR([--enable-unix-sockets is not available on this platform!])
fi
], [
#include <sys/un.h>
])
fi
2014-11-28 01:59:25 +03:00
fi
2004-12-06 02:59:32 +03:00
dnl ************************************************************
dnl disable cookies support
dnl
2019-06-11 00:10:19 +03:00
AC_MSG_CHECKING([whether to support cookies])
2004-12-06 02:59:32 +03:00
AC_ARG_ENABLE(cookies,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-cookies],[Enable cookies support])
AS_HELP_STRING([--disable-cookies],[Disable cookies support]),
2004-12-06 02:59:32 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
;;
*)
AC_MSG_RESULT(yes)
;;
2004-12-06 02:59:32 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2004-12-06 02:59:32 +03:00
)
2006-06-13 00:33:04 +04:00
dnl ************************************************************
2020-08-14 16:45:08 +03:00
dnl disable socketpair
2006-06-13 00:33:04 +04:00
dnl
2020-08-14 16:45:08 +03:00
AC_MSG_CHECKING([whether to support socketpair])
AC_ARG_ENABLE(socketpair,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-socketpair],[Enable socketpair support])
AS_HELP_STRING([--disable-socketpair],[Disable socketpair support]),
2020-08-14 16:45:08 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_SOCKETPAIR, 1, [to disable socketpair support])
;;
*)
AC_MSG_RESULT(yes)
;;
2020-08-14 16:45:08 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2020-08-14 16:45:08 +03:00
)
2006-06-13 00:33:04 +04:00
2008-08-25 01:26:42 +04:00
dnl ************************************************************
2019-06-11 00:10:19 +03:00
dnl disable HTTP authentication support
2009-07-09 22:10:25 +04:00
dnl
2019-06-11 00:10:19 +03:00
AC_MSG_CHECKING([whether to support HTTP authentication])
AC_ARG_ENABLE(http-auth,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-http-auth],[Enable HTTP authentication support])
AS_HELP_STRING([--disable-http-auth],[Disable HTTP authentication support]),
2019-06-11 00:10:19 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_HTTP_AUTH, 1, [disable HTTP authentication])
;;
*)
AC_MSG_RESULT(yes)
;;
2019-06-11 00:10:19 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2019-06-11 00:10:19 +03:00
)
2008-08-25 01:26:42 +04:00
2019-06-11 00:10:19 +03:00
dnl ************************************************************
dnl disable DoH support
dnl
AC_MSG_CHECKING([whether to support DoH])
AC_ARG_ENABLE(doh,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-doh],[Enable DoH support])
AS_HELP_STRING([--disable-doh],[Disable DoH support]),
2008-08-25 01:26:42 +04:00
[ case "$enableval" in
2019-06-11 00:10:19 +03:00
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_DOH, 1, [disable DoH])
;;
*)
AC_MSG_RESULT(yes)
;;
2019-06-11 00:10:19 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2019-06-11 00:10:19 +03:00
)
dnl ************************************************************
dnl disable mime API support
dnl
AC_MSG_CHECKING([whether to support the MIME API])
AC_ARG_ENABLE(mime,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-mime],[Enable mime API support])
AS_HELP_STRING([--disable-mime],[Disable mime API support]),
2019-06-11 00:10:19 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_MIME, 1, [disable mime API])
;;
*)
AC_MSG_RESULT(yes)
;;
2019-06-11 00:10:19 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2019-06-11 00:10:19 +03:00
)
2023-08-17 15:36:30 +03:00
dnl ************************************************************
dnl disable bindlocal
dnl
AC_MSG_CHECKING([whether to support binding connections locally])
AC_ARG_ENABLE(bindlocal,
AS_HELP_STRING([--enable-bindlocal],[Enable local binding support])
AS_HELP_STRING([--disable-bindlocal],[Disable local binding support]),
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_BINDLOCAL, 1, [disable local binding support])
;;
*)
AC_MSG_RESULT(yes)
;;
2023-08-17 15:36:30 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2023-08-17 15:36:30 +03:00
)
2022-11-15 19:50:22 +03:00
dnl ************************************************************
dnl disable form API support
dnl
AC_MSG_CHECKING([whether to support the form API])
AC_ARG_ENABLE(form-api,
AS_HELP_STRING([--enable-form-api],[Enable form API support])
AS_HELP_STRING([--disable-form-api],[Disable form API support]),
[ case "$enableval" in
2024-08-21 12:08:54 +03:00
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_FORM_API, 1, [disable form API])
;;
*)
AC_MSG_RESULT(yes)
test "$enable_mime" = no &&
AC_MSG_ERROR(MIME support needs to be enabled in order to enable form API support)
;;
2022-11-15 19:50:22 +03:00
esac ],
[
if test "$enable_mime" = no; then
enable_form_api=no
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_FORM_API, 1, [disable form API])
else
AC_MSG_RESULT(yes)
fi ]
)
2019-06-11 00:10:19 +03:00
dnl ************************************************************
dnl disable date parsing
dnl
AC_MSG_CHECKING([whether to support date parsing])
AC_ARG_ENABLE(dateparse,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-dateparse],[Enable date parsing])
AS_HELP_STRING([--disable-dateparse],[Disable date parsing]),
2019-06-11 00:10:19 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_PARSEDATE, 1, [disable date parsing])
;;
*)
AC_MSG_RESULT(yes)
;;
2019-06-11 00:10:19 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2019-06-11 00:10:19 +03:00
)
dnl ************************************************************
dnl disable netrc
dnl
AC_MSG_CHECKING([whether to support netrc parsing])
AC_ARG_ENABLE(netrc,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-netrc],[Enable netrc parsing])
AS_HELP_STRING([--disable-netrc],[Disable netrc parsing]),
2019-06-11 00:10:19 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_NETRC, 1, [disable netrc parsing])
;;
*)
AC_MSG_RESULT(yes)
;;
2019-06-11 00:10:19 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2019-06-11 00:10:19 +03:00
)
2019-02-11 18:38:19 +03:00
dnl ************************************************************
dnl disable progress-meter
dnl
AC_MSG_CHECKING([whether to support progress-meter])
AC_ARG_ENABLE(progress-meter,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-progress-meter],[Enable progress-meter])
AS_HELP_STRING([--disable-progress-meter],[Disable progress-meter]),
2019-02-11 18:38:19 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_PROGRESS_METER, 1, [disable progress-meter])
;;
*)
AC_MSG_RESULT(yes)
;;
2019-02-11 18:38:19 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2019-02-11 18:38:19 +03:00
)
2024-09-01 17:25:49 +03:00
dnl ************************************************************
dnl disable SHA-512/256 hash algorithm
dnl
AC_MSG_CHECKING([whether to support the SHA-512/256 hash algorithm])
AC_ARG_ENABLE(sha512-256,
AS_HELP_STRING([--enable-sha512-256],[Enable SHA-512/256 hash algorithm (default)])
AS_HELP_STRING([--disable-sha512-256],[Disable SHA-512/256 hash algorithm]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_SHA512_256, 1, [disable SHA-512/256 hash algorithm])
;;
*)
AC_MSG_RESULT(yes)
;;
2019-02-11 18:38:19 +03:00
esac ],
2024-09-01 17:25:49 +03:00
AC_MSG_RESULT(yes)
2019-02-11 18:38:19 +03:00
)
2019-06-11 00:10:19 +03:00
dnl ************************************************************
dnl disable shuffle DNS support
dnl
AC_MSG_CHECKING([whether to support DNS shuffling])
AC_ARG_ENABLE(dnsshuffle,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-dnsshuffle],[Enable DNS shuffling])
AS_HELP_STRING([--disable-dnsshuffle],[Disable DNS shuffling]),
2019-06-11 00:10:19 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_SHUFFLE_DNS, 1, [disable DNS shuffling])
;;
*)
AC_MSG_RESULT(yes)
;;
2019-06-11 00:10:19 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2019-06-11 00:10:19 +03:00
)
2020-08-26 09:30:38 +03:00
dnl ************************************************************
dnl disable the curl_easy_options API
dnl
AC_MSG_CHECKING([whether to support curl_easy_option*])
2021-06-08 18:30:17 +03:00
AC_ARG_ENABLE(get-easy-options,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-get-easy-options],[Enable curl_easy_options])
AS_HELP_STRING([--disable-get-easy-options],[Disable curl_easy_options]),
2020-08-26 09:30:38 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_GETOPTIONS, 1, [to disable curl_easy_options])
;;
*)
AC_MSG_RESULT(yes)
;;
2020-08-26 09:30:38 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2020-08-26 09:30:38 +03:00
)
2019-03-03 13:17:52 +03:00
dnl ************************************************************
dnl switch on/off alt-svc
dnl
AC_MSG_CHECKING([whether to support alt-svc])
AC_ARG_ENABLE(alt-svc,
2021-03-15 19:32:26 +03:00
AS_HELP_STRING([--enable-alt-svc],[Enable alt-svc support])
AS_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]),
2019-03-03 13:17:52 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_ALTSVC, 1, [disable alt-svc])
curl_altsvc_msg="no";
enable_altsvc="no"
;;
*)
AC_MSG_RESULT(yes)
;;
2019-03-03 13:17:52 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2019-03-03 13:17:52 +03:00
)
2022-03-20 00:34:19 +03:00
dnl ************************************************************
dnl switch on/off headers-api
dnl
AC_MSG_CHECKING([whether to support headers-api])
AC_ARG_ENABLE(headers-api,
AS_HELP_STRING([--enable-headers-api],[Enable headers-api support])
AS_HELP_STRING([--disable-headers-api],[Disable headers-api support]),
[ case "$enableval" in
2024-08-21 12:08:54 +03:00
no)
AC_MSG_RESULT(no)
curl_headers_msg="no (--enable-headers-api)"
AC_DEFINE(CURL_DISABLE_HEADERS_API, 1, [disable headers-api])
;;
2022-07-12 16:53:11 +03:00
*)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
;;
2022-03-20 00:34:19 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(yes)
2019-03-03 13:17:52 +03:00
)
2021-03-08 10:30:32 +03:00
dnl only check for HSTS if there's SSL present
if test -n "$SSL_ENABLED"; then
dnl ************************************************************
dnl switch on/off hsts
dnl
AC_MSG_CHECKING([whether to support HSTS])
AC_ARG_ENABLE(hsts,
2023-05-18 22:16:56 +03:00
AS_HELP_STRING([--enable-hsts],[Enable HSTS support])
AS_HELP_STRING([--disable-hsts],[Disable HSTS support]),
2021-03-08 10:30:32 +03:00
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
hsts="no"
;;
*)
AC_MSG_RESULT(yes)
;;
2021-03-08 10:30:32 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT($hsts)
2021-03-08 10:30:32 +03:00
)
else
AC_MSG_NOTICE([disables HSTS due to lack of SSL])
2021-09-05 00:41:07 +03:00
hsts="no"
2021-03-08 10:30:32 +03:00
fi
2019-03-03 13:17:52 +03:00
2021-09-05 00:41:07 +03:00
if test "x$hsts" != "xyes"; then
2021-03-08 10:30:32 +03:00
curl_hsts_msg="no (--enable-hsts)";
AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable alt-svc])
2019-03-03 13:17:52 +03:00
fi
2024-04-04 16:23:35 +03:00
dnl *************************************************************
dnl check whether HTTPSRR support if desired
dnl
if test "x$want_httpsrr" != "xno"; then
AC_MSG_RESULT([HTTPSRR support is available])
AC_DEFINE(USE_HTTPSRR, 1, [enable HTTPS RR support])
experimental="$experimental HTTPSRR"
fi
2019-06-04 17:53:02 +03:00
dnl *************************************************************
2020-09-29 11:13:18 +03:00
dnl check whether ECH support, if desired, is actually available
2019-06-04 17:53:02 +03:00
dnl
2020-09-29 11:13:18 +03:00
if test "x$want_ech" != "xno"; then
AC_MSG_CHECKING([whether ECH support is available])
2019-06-04 17:53:02 +03:00
dnl assume NOT and look for sufficient condition
2020-09-29 11:13:18 +03:00
ECH_ENABLED=0
ECH_SUPPORT=''
2019-06-04 17:53:02 +03:00
2024-04-04 16:23:35 +03:00
dnl check for OpenSSL
2019-11-07 01:53:44 +03:00
if test "x$OPENSSL_ENABLED" = "x1"; then
2024-04-04 16:23:35 +03:00
AC_CHECK_FUNCS(SSL_ech_set1_echconfig,
ECH_SUPPORT="ECH support available via OpenSSL with SSL_ech_set1_echconfig"
ECH_ENABLED=1)
fi
2024-07-12 14:55:26 +03:00
dnl check for BoringSSL equivalent
2024-04-04 16:23:35 +03:00
if test "x$OPENSSL_ENABLED" = "x1"; then
AC_CHECK_FUNCS(SSL_set1_ech_config_list,
2024-07-12 14:55:26 +03:00
ECH_SUPPORT="ECH support available via BoringSSL with SSL_set1_ech_config_list"
2024-04-04 16:23:35 +03:00
ECH_ENABLED=1)
fi
if test "x$WOLFSSL_ENABLED" = "x1"; then
AC_CHECK_FUNCS(wolfSSL_CTX_GenerateEchConfig,
2024-07-12 14:55:26 +03:00
ECH_SUPPORT="ECH support available via wolfSSL with wolfSSL_CTX_GenerateEchConfig"
2020-09-29 11:13:18 +03:00
ECH_ENABLED=1)
2019-06-04 17:53:02 +03:00
fi
dnl now deal with whatever we found
2020-09-29 11:13:18 +03:00
if test "x$ECH_ENABLED" = "x1"; then
2024-04-04 16:23:35 +03:00
dnl force pre-requisites for ECH
AC_DEFINE(USE_HTTPSRR, 1, [force HTTPS RR support for ECH])
2020-09-29 11:13:18 +03:00
AC_DEFINE(USE_ECH, 1, [if ECH support is available])
AC_MSG_RESULT($ECH_SUPPORT)
experimental="$experimental ECH"
2019-06-04 17:53:02 +03:00
else
2020-09-29 11:13:18 +03:00
AC_MSG_ERROR([--enable-ech ignored: No ECH support found])
2019-06-04 17:53:02 +03:00
fi
fi
2022-12-28 11:58:09 +03:00
dnl *************************************************************
dnl check whether OpenSSL (lookalikes) have SSL_set0_wbio
dnl
if test "x$OPENSSL_ENABLED" = "x1"; then
AC_CHECK_FUNCS([SSL_set0_wbio])
fi
2022-09-09 16:11:13 +03:00
dnl *************************************************************
dnl WebSockets
dnl
AC_MSG_CHECKING([whether to support WebSockets])
AC_ARG_ENABLE(websockets,
AS_HELP_STRING([--enable-websockets],[Enable WebSockets support])
AS_HELP_STRING([--disable-websockets],[Disable WebSockets support]),
[ case "$enableval" in
no)
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
;;
2022-09-09 16:11:14 +03:00
*)
2024-08-21 12:08:54 +03:00
if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
AC_MSG_RESULT(yes)
curl_ws_msg="enabled"
2024-08-22 00:47:31 +03:00
AC_DEFINE_UNQUOTED(USE_WEBSOCKETS, [1], [enable WebSockets support])
2024-08-21 12:08:54 +03:00
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WS"
if test "x$SSL_ENABLED" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WSS"
fi
2024-08-22 00:47:31 +03:00
experimental="$experimental WebSockets"
2024-08-21 12:08:54 +03:00
else
2024-08-22 00:47:31 +03:00
dnl WebSockets requires >32 bit curl_off_t
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
2024-08-22 00:47:31 +03:00
AC_MSG_WARN([WebSockets disabled due to lack of >32 bit curl_off_t])
2024-08-21 12:08:54 +03:00
fi
;;
2022-09-09 16:11:13 +03:00
esac ],
2024-08-21 12:08:54 +03:00
AC_MSG_RESULT(no)
2022-09-09 16:11:13 +03:00
)
2006-06-13 00:33:04 +04:00
dnl ************************************************************
2012-04-11 21:33:54 +04:00
dnl hiding of library internal symbols
2006-06-13 00:33:04 +04:00
dnl
2012-04-11 21:33:54 +04:00
CURL_CONFIGURE_SYMBOL_HIDING
2008-08-25 01:26:42 +04:00
2007-02-17 04:29:01 +03:00
dnl
dnl All the library dependencies put into $LIB apply to libcurl only.
dnl
2024-08-09 18:45:46 +03:00
LIBCURL_PC_LIBS_PRIVATE="$LIBS$PTHREAD"
2007-02-17 04:29:01 +03:00
2024-08-09 18:45:46 +03:00
AC_SUBST(LIBCURL_PC_LIBS_PRIVATE)
2010-08-09 07:45:11 +04:00
AC_SUBST(CURL_NETWORK_LIBS)
2012-11-28 21:31:23 +04:00
AC_SUBST(CURL_NETWORK_AND_TIME_LIBS)
2007-02-17 04:29:01 +03:00
2012-12-05 02:30:05 +04:00
dnl BLANK_AT_MAKETIME may be used in our Makefile.am files to blank
dnl LIBS variable used in generated makefile at makefile processing
dnl time. Doing this functionally prevents LIBS from being used for
dnl all link targets in given makefile.
2012-11-30 00:56:48 +04:00
BLANK_AT_MAKETIME=
AC_SUBST(BLANK_AT_MAKETIME)
2004-06-03 18:37:14 +04:00
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
2010-07-25 19:48:07 +04:00
dnl yes or no
ENABLE_SHARED="$enable_shared"
AC_SUBST(ENABLE_SHARED)
2013-04-16 17:40:00 +04:00
dnl to let curl-config output the static libraries correctly
ENABLE_STATIC="$enable_static"
AC_SUBST(ENABLE_STATIC)
2024-06-08 01:41:24 +03:00
squeeze LIBCURL_PC_REQUIRES_PRIVATE
LIBCURL_PC_REQUIRES_PRIVATE=`echo $LIBCURL_PC_REQUIRES_PRIVATE | tr ' ' ','`
AC_SUBST(LIBCURL_PC_REQUIRES_PRIVATE)
dnl Merge pkg-config private fields into public ones when static-only
2020-05-11 22:50:02 +03:00
if test "x$enable_shared" = "xno"; then
2024-06-08 01:41:24 +03:00
LIBCURL_PC_REQUIRES=$LIBCURL_PC_REQUIRES_PRIVATE
2024-08-09 18:45:46 +03:00
LIBCURL_PC_LIBS=$LIBCURL_PC_LIBS_PRIVATE
2020-05-11 22:50:02 +03:00
else
2024-06-08 01:41:24 +03:00
LIBCURL_PC_REQUIRES=
2024-08-09 18:45:46 +03:00
LIBCURL_PC_LIBS=
2020-05-11 22:50:02 +03:00
fi
2024-06-08 01:41:24 +03:00
AC_SUBST(LIBCURL_PC_REQUIRES)
2024-08-09 18:45:46 +03:00
AC_SUBST(LIBCURL_PC_LIBS)
2013-04-16 17:40:00 +04:00
2023-05-16 17:51:14 +03:00
rm $compilersh
2008-09-02 16:07:08 +04:00
dnl
dnl For keeping supported features and protocols also in pkg-config file
2012-06-13 22:54:03 +04:00
dnl since it is more cross-compile friendly than curl-config
2008-09-02 16:07:08 +04:00
dnl
2015-03-05 17:38:47 +03:00
if test "x$OPENSSL_ENABLED" = "x1"; then
2008-09-02 16:07:08 +04:00
SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
elif test -n "$SSL_ENABLED"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
fi
if test "x$IPV6_ENABLED" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
fi
2014-11-28 01:59:25 +03:00
if test "x$USE_UNIX_SOCKETS" = "x1"; then
2014-12-26 23:45:21 +03:00
SUPPORT_FEATURES="$SUPPORT_FEATURES UnixSockets"
2014-11-28 01:59:25 +03:00
fi
2008-09-02 16:07:08 +04:00
if test "x$HAVE_LIBZ" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
fi
2017-11-05 17:28:16 +03:00
if test "x$HAVE_BROTLI" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES brotli"
fi
2020-05-25 18:49:46 +03:00
if test "x$HAVE_ZSTD" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES zstd"
fi
2017-02-12 22:50:56 +03:00
if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \
-o "x$USE_THREADS_WIN32" = "x1"; then
2008-09-02 16:07:08 +04:00
SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
fi
if test "x$IDN_ENABLED" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
fi
if test "x$USE_WINDOWS_SSPI" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
fi
2014-07-21 11:53:45 +04:00
if test "x$HAVE_GSSAPI" = "x1"; then
2014-11-11 03:04:05 +03:00
SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API"
2014-07-21 11:53:45 +04:00
fi
2019-03-03 13:17:52 +03:00
if test "x$curl_psl_msg" = "xenabled"; then
2015-10-18 01:11:13 +03:00
SUPPORT_FEATURES="$SUPPORT_FEATURES PSL"
fi
2020-12-24 21:48:45 +03:00
if test "x$curl_gsasl_msg" = "xenabled"; then
2024-08-28 12:01:26 +03:00
SUPPORT_FEATURES="$SUPPORT_FEATURES gsasl"
2020-12-24 21:48:45 +03:00
fi
2019-03-03 13:17:52 +03:00
if test "x$enable_altsvc" = "xyes"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc"
fi
2021-09-05 00:41:07 +03:00
if test "x$hsts" = "xyes"; then
2020-11-03 01:17:01 +03:00
SUPPORT_FEATURES="$SUPPORT_FEATURES HSTS"
fi
2019-03-03 13:17:52 +03:00
2023-07-20 17:09:04 +03:00
if test "x$CURL_DISABLE_NEGOTIATE_AUTH" != "x1" -a \
2014-07-21 11:53:45 +04:00
\( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
fi
2023-07-20 17:09:04 +03:00
if test "x$CURL_DISABLE_KERBEROS_AUTH" != "x1" -a \
2014-11-11 03:04:05 +03:00
\( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
2014-11-15 17:08:43 +03:00
SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos"
2014-11-07 13:42:54 +03:00
fi
2021-03-28 21:46:54 +03:00
use_curl_ntlm_core=no
2023-07-20 17:09:04 +03:00
if test "x$CURL_DISABLE_NTLM" != "x1"; then
2021-03-28 21:46:54 +03:00
if test "x$OPENSSL_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
2023-07-30 00:44:28 +03:00
-o "x$GNUTLS_ENABLED" = "x1" \
2021-03-06 17:52:09 +03:00
-o "x$SECURETRANSPORT_ENABLED" = "x1" \
-o "x$USE_WIN32_CRYPTO" = "x1" \
2020-06-12 00:36:19 +03:00
-o "x$WOLFSSL_NTLM" = "x1"; then
2021-03-28 21:46:54 +03:00
use_curl_ntlm_core=yes
fi
if test "x$use_curl_ntlm_core" = "xyes" \
-o "x$USE_WINDOWS_SSPI" = "x1"; then
2011-04-06 09:28:26 +04:00
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
fi
2008-09-02 16:07:08 +04:00
fi
2014-11-09 15:58:07 +03:00
2011-01-19 22:35:02 +03:00
if test "x$USE_TLS_SRP" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
fi
2008-09-02 16:07:08 +04:00
2023-10-24 17:51:05 +03:00
if test "x$USE_NGHTTP2" = "x1"; then
2013-09-05 14:03:24 +04:00
SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
fi
2024-01-18 15:07:07 +03:00
if test "x$USE_NGTCP2_H3" = "x1" -o "x$USE_QUICHE" = "x1" \
-o "x$USE_OPENSSL_H3" = "x1" -o "x$USE_MSH3" = "x1"; then
2024-01-26 18:59:33 +03:00
if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
AC_MSG_ERROR([MultiSSL cannot be enabled with HTTP/3 and vice versa])
fi
2019-07-22 00:48:58 +03:00
SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3"
2016-11-25 12:27:22 +03:00
fi
2017-09-05 11:45:09 +03:00
if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL"
fi
2023-10-28 12:05:13 +03:00
AC_MSG_CHECKING([if this build supports HTTPS-proxy])
2021-10-21 08:41:22 +03:00
dnl if not explicitly turned off, HTTPS-proxy comes with some TLS backends
2023-10-28 12:05:13 +03:00
if test "x$CURL_DISABLE_HTTP" != "x1"; then
if test "x$https_proxy" != "xno"; then
if test "x$OPENSSL_ENABLED" = "x1" \
-o "x$GNUTLS_ENABLED" = "x1" \
-o "x$SECURETRANSPORT_ENABLED" = "x1" \
-o "x$RUSTLS_ENABLED" = "x1" \
-o "x$BEARSSL_ENABLED" = "x1" \
-o "x$SCHANNEL_ENABLED" = "x1" \
-o "x$GNUTLS_ENABLED" = "x1" \
-o "x$MBEDTLS_ENABLED" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
AC_MSG_RESULT([yes])
elif test "x$WOLFSSL_ENABLED" = "x1" -a "x$WOLFSSL_FULL_BIO" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
else
AC_MSG_RESULT([no])
2020-09-30 16:31:01 +03:00
fi
2023-10-28 12:05:13 +03:00
else
AC_MSG_RESULT([no])
2016-11-25 12:27:22 +03:00
fi
2024-07-04 06:04:35 +03:00
if test "x$OPENSSL_ENABLED" = "x1" -o -n "$SSL_ENABLED"; then
if test "x$ECH_ENABLED" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES ECH"
fi
2019-06-04 17:53:02 +03:00
fi
2021-03-10 02:38:21 +03:00
if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
if test ${ac_cv_sizeof_off_t} -gt 4 -o \
"$curl_win32_file_api" = "win32_large_files"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES Largefile"
fi
fi
2022-04-05 17:00:37 +03:00
if test "$tst_atomic" = "yes"; then
2022-06-13 21:59:45 +03:00
SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
2023-10-15 04:55:42 +03:00
elif test "x$USE_THREADS_POSIX" = "x1" -a \
"x$ac_cv_header_pthread_h" = "xyes"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
2022-04-05 17:00:37 +03:00
else
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <windows.h>
]],[[
#if (WINVER < 0x600) && (_WIN32_WINNT < 0x600)
#error
#endif
]])
],[
2024-08-21 12:08:54 +03:00
SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
2022-04-05 17:00:37 +03:00
],[
])
fi
2024-08-09 21:18:48 +03:00
if test "x$want_winuni" = "xyes"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES Unicode"
fi
2024-07-04 06:04:35 +03:00
if test "x$want_debug" = "xyes"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES Debug"
fi
if test "x$want_curldebug" = "xyes"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES TrackMemory"
fi
2024-06-29 04:30:14 +03:00
if test "x$CURL_CA_EMBED" != "x"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES CAcert"
fi
2024-07-04 06:04:35 +03:00
2020-07-06 15:15:48 +03:00
dnl replace spaces with newlines
dnl sort the lines
dnl replace the newlines back to spaces
2024-07-07 20:32:09 +03:00
if sort -f </dev/null >/dev/null 2>&1; then
SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort -f | tr '\012' ' '`
else
SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '`
fi
2008-09-02 16:07:08 +04:00
AC_SUBST(SUPPORT_FEATURES)
dnl For supported protocols in pkg-config file
if test "x$CURL_DISABLE_HTTP" != "x1"; then
2023-12-12 19:48:22 +03:00
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP IPFS IPNS"
2008-09-02 16:07:08 +04:00
if test "x$SSL_ENABLED" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
fi
fi
if test "x$CURL_DISABLE_FTP" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
if test "x$SSL_ENABLED" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
fi
fi
if test "x$CURL_DISABLE_FILE" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
fi
if test "x$CURL_DISABLE_TELNET" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
fi
2010-06-01 19:25:03 +04:00
if test "x$CURL_DISABLE_LDAP" != "x1"; then
2008-09-02 16:07:08 +04:00
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
2010-06-01 19:25:03 +04:00
if test "x$CURL_DISABLE_LDAPS" != "x1"; then
if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
(test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
fi
2010-05-28 14:23:28 +04:00
fi
2008-09-02 16:07:08 +04:00
fi
if test "x$CURL_DISABLE_DICT" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
fi
if test "x$CURL_DISABLE_TFTP" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
fi
2010-08-12 18:55:48 +04:00
if test "x$CURL_DISABLE_GOPHER" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
2020-11-15 20:46:06 +03:00
if test "x$SSL_ENABLED" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHERS"
fi
2010-08-12 18:55:48 +04:00
fi
2020-08-31 10:45:09 +03:00
if test "x$CURL_DISABLE_MQTT" != "x1"; then
2020-04-14 12:19:12 +03:00
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS MQTT"
fi
2009-12-13 01:31:00 +03:00
if test "x$CURL_DISABLE_POP3" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
2009-12-13 01:33:18 +03:00
if test "x$SSL_ENABLED" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S"
fi
2009-12-13 01:31:00 +03:00
fi
if test "x$CURL_DISABLE_IMAP" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP"
2009-12-13 01:33:18 +03:00
if test "x$SSL_ENABLED" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
fi
2009-12-13 01:31:00 +03:00
fi
2014-12-02 21:36:24 +03:00
if test "x$CURL_DISABLE_SMB" != "x1" \
2021-03-06 17:52:09 +03:00
-a "x$use_curl_ntlm_core" = "xyes"; then
2014-11-29 20:59:29 +03:00
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB"
if test "x$SSL_ENABLED" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS"
fi
fi
2009-12-13 01:31:00 +03:00
if test "x$CURL_DISABLE_SMTP" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
2009-12-13 01:33:18 +03:00
if test "x$SSL_ENABLED" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS"
fi
2009-12-13 01:31:00 +03:00
fi
2008-09-02 16:07:08 +04:00
if test "x$USE_LIBSSH2" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
fi
2017-10-23 14:49:23 +03:00
if test "x$USE_LIBSSH" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
2017-10-31 20:30:36 +03:00
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
2017-10-23 14:49:23 +03:00
fi
2020-01-05 12:51:39 +03:00
if test "x$USE_WOLFSSH" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
fi
2010-01-21 16:58:30 +03:00
if test "x$CURL_DISABLE_RTSP" != "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
fi
2010-05-13 01:07:20 +04:00
if test "x$USE_LIBRTMP" = "x1"; then
2010-05-16 00:13:17 +04:00
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
2010-05-13 01:07:20 +04:00
fi
2008-09-02 16:07:08 +04:00
2010-01-22 15:52:35 +03:00
dnl replace spaces with newlines
dnl sort the lines
dnl replace the newlines back to spaces
SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '`
2008-09-02 16:07:08 +04:00
AC_SUBST(SUPPORT_PROTOCOLS)
2008-10-07 17:13:34 +04:00
dnl squeeze whitespace out of some variables
2008-10-15 22:10:02 +04:00
squeeze CFLAGS
squeeze CPPFLAGS
squeeze DEFS
squeeze LDFLAGS
squeeze LIBS
2024-08-09 18:45:46 +03:00
squeeze LIBCURL_PC_LIBS_PRIVATE
2010-08-09 07:45:11 +04:00
squeeze CURL_NETWORK_LIBS
2012-11-28 21:31:23 +04:00
squeeze CURL_NETWORK_AND_TIME_LIBS
2008-10-07 17:13:34 +04:00
2010-01-22 19:38:32 +03:00
squeeze SUPPORT_FEATURES
squeeze SUPPORT_PROTOCOLS
2013-01-20 23:23:20 +04:00
XC_CHECK_BUILD_FLAGS
2012-12-21 20:26:19 +04:00
2017-11-30 10:57:36 +03:00
SSL_BACKENDS=${ssl_backends}
AC_SUBST(SSL_BACKENDS)
2009-06-09 21:59:28 +04:00
if test "x$want_curldebug_assumed" = "xyes" &&
2010-01-26 18:07:40 +03:00
test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
2009-05-26 18:50:45 +04:00
ac_configure_args="$ac_configure_args --enable-curldebug"
fi
2024-08-21 12:08:54 +03:00
AC_CONFIG_FILES([\
Makefile \
docs/Makefile \
docs/examples/Makefile \
docs/libcurl/Makefile \
docs/libcurl/opts/Makefile \
docs/cmdline-opts/Makefile \
include/Makefile \
include/curl/Makefile \
src/Makefile \
lib/Makefile \
scripts/Makefile \
lib/libcurl.vers \
tests/Makefile \
tests/config \
tests/certs/Makefile \
tests/certs/scripts/Makefile \
tests/data/Makefile \
tests/server/Makefile \
tests/libtest/Makefile \
tests/unit/Makefile \
tests/http/config.ini \
tests/http/Makefile \
tests/http/clients/Makefile \
packages/Makefile \
packages/vms/Makefile \
curl-config \
libcurl.pc
2001-05-22 22:16:24 +04:00
])
AC_OUTPUT
2004-04-26 16:29:30 +04:00
2010-11-25 23:05:20 +03:00
CURL_GENERATE_CONFIGUREHELP_PM
2024-09-06 00:23:47 +03:00
CURL_GENERATE_BUILDINFO_TXT
2010-11-25 23:05:20 +03:00
2024-07-07 20:32:09 +03:00
SUPPORT_PROTOCOLS_LOWER=`echo "$SUPPORT_PROTOCOLS" | tr A-Z a-z`
2010-11-25 23:05:20 +03:00
2004-04-26 16:29:30 +04:00
AC_MSG_NOTICE([Configured to build curl/libcurl:
2012-02-05 21:44:22 +04:00
Host setup: ${host}
Install prefix: ${prefix}
Compiler: ${CC}
2018-11-01 10:17:28 +03:00
CFLAGS: ${CFLAGS}
2024-07-06 17:00:03 +03:00
CFLAGS extras: ${CURL_CFLAG_EXTRAS}
2018-11-01 10:17:28 +03:00
CPPFLAGS: ${CPPFLAGS}
LDFLAGS: ${LDFLAGS}
LIBS: ${LIBS}
curl version: ${CURLVERSION}
2019-03-03 13:17:52 +03:00
SSL: ${curl_ssl_msg}
SSH: ${curl_ssh_msg}
zlib: ${curl_zlib_msg}
brotli: ${curl_brotli_msg}
2020-05-25 18:49:46 +03:00
zstd: ${curl_zstd_msg}
2019-03-03 13:17:52 +03:00
GSS-API: ${curl_gss_msg}
2020-12-24 21:48:45 +03:00
GSASL: ${curl_gsasl_msg}
2019-03-03 13:17:52 +03:00
TLS-SRP: ${curl_tls_srp_msg}
2012-02-05 21:44:22 +04:00
resolver: ${curl_res_msg}
2019-03-03 13:17:52 +03:00
IPv6: ${curl_ipv6_msg}
Unix sockets: ${curl_unix_sockets_msg}
IDN: ${curl_idn_msg}
2024-02-04 00:05:59 +03:00
Build docs: ${curl_docs_msg}
2012-02-05 21:44:22 +04:00
Build libcurl: Shared=${enable_shared}, Static=${enable_static}
Built-in manual: ${curl_manual_msg}
--libcurl option: ${curl_libcurl_msg}
Verbose errors: ${curl_verbose_msg}
2019-01-25 12:14:25 +03:00
Code coverage: ${curl_coverage_msg}
2019-03-03 13:17:52 +03:00
SSPI: ${curl_sspi_msg}
2016-02-25 09:55:38 +03:00
ca cert bundle: ${ca}${ca_warning}
ca cert path: ${capath}${capath_warning}
2015-03-24 15:25:17 +03:00
ca fallback: ${with_ca_fallback}
2019-03-03 13:17:52 +03:00
LDAP: ${curl_ldap_msg}
LDAPS: ${curl_ldaps_msg}
RTSP: ${curl_rtsp_msg}
RTMP: ${curl_rtmp_msg}
PSL: ${curl_psl_msg}
Alt-svc: ${curl_altsvc_msg}
2022-03-20 00:34:19 +03:00
Headers API: ${curl_headers_msg}
2021-03-08 10:30:32 +03:00
HSTS: ${curl_hsts_msg}
2020-12-14 16:10:32 +03:00
HTTP1: ${curl_h1_msg}
2019-03-03 13:17:52 +03:00
HTTP2: ${curl_h2_msg}
2019-07-22 00:48:58 +03:00
HTTP3: ${curl_h3_msg}
2020-09-29 11:13:18 +03:00
ECH: ${curl_ech_msg}
2022-09-09 16:11:13 +03:00
WebSockets: ${curl_ws_msg}
2024-07-07 20:32:09 +03:00
Protocols: ${SUPPORT_PROTOCOLS_LOWER}
2019-02-14 13:45:49 +03:00
Features: ${SUPPORT_FEATURES}
2004-04-26 16:29:30 +04:00
])
2024-02-08 17:11:55 +03:00
2024-08-09 03:08:34 +03:00
# grep -o would simplify this, but is nonportable
[non13=`echo "$TLSCHOICE" | $AWK '{split("bearssl secure-transport", a); for (i in a) if(match(tolower($0), a[i])) print a[i];}'`]
2024-02-08 17:11:55 +03:00
if test -n "$non13"; then
2024-08-21 12:08:54 +03:00
for a in $non13; do
AC_MSG_WARN([$a is enabled for TLS but it does not support TLS 1.3])
done
2024-02-08 17:11:55 +03:00
fi
2019-03-03 13:17:52 +03:00
if test -n "$experimental"; then
2024-08-21 12:08:54 +03:00
for a in $experimental; do
AC_MSG_WARN([$a is enabled but marked EXPERIMENTAL. Use with caution!])
done
2008-08-25 16:49:13 +04:00
fi