# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
CURL_OVERRIDE_AUTOCONF
dnl configure script copyright
-AC_COPYRIGHT([Copyright (c) 1998 - 2022 Daniel Stenberg, <daniel@haxx.se>
+AC_COPYRIGHT([Copyright (C) Daniel Stenberg, <daniel@haxx.se>
This configure script may be copied, distributed and modified under the
terms of the curl license; see COPYING for more details])
dnl
dnl initialize all the info variables
- curl_ssl_msg="no (--with-{openssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,amissl,bearssl,rustls} )"
+ curl_ssl_msg="no (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,secure-transport,amissl,bearssl,rustls} )"
curl_ssh_msg="no (--with-{libssh,libssh2})"
curl_zlib_msg="no (--with-zlib)"
curl_brotli_msg="no (--with-brotli)"
curl_ws_msg="no (--enable-websockets)"
ssl_backends=
curl_h1_msg="enabled (internal)"
- curl_h2_msg="no (--with-nghttp2, --with-hyper)"
- curl_h3_msg="no (--with-ngtcp2, --with-quiche --with-msh3)"
+ curl_h2_msg="no (--with-nghttp2)"
+ curl_h3_msg="no (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-msh3)"
enable_altsvc="yes"
hsts="yes"
INITIAL_LDFLAGS=$LDFLAGS
INITIAL_LIBS=$LIBS
+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"
+CURL_SAVED_CC="$CC"
+export CURL_SAVED_CC
+CURL_SAVED_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
+export CURL_SAVED_LD_LIBRARY_PATH
+cat <<\EOF > "$compilersh"
+CC="$CURL_SAVED_CC"
+export CC
+LD_LIBRARY_PATH="$CURL_SAVED_LD_LIBRARY_PATH"
+export LD_LIBRARY_PATH
+exec $CC "$@"
+EOF
+
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
fi
])
-OPT_NSS_AWARE=no
-AC_ARG_WITH(nss-deprecated,dnl
-AS_HELP_STRING([--with-nss-deprecated],[confirm you realize NSS is going away]),
- if test X"$withval" != Xno; then
- OPT_NSS_AWARE=$withval
+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
+ if test X"$OPT_TEST_NGHTTPX" = "Xno" ; then
+ TEST_NGHTTPX=""
fi
)
+AC_SUBST(TEST_NGHTTPX)
+
+CADDY=caddy
+AC_ARG_WITH(test-caddy,dnl
+AS_HELP_STRING([--with-test-caddy=PATH],[where to find caddy for testing]),
+ CADDY=$withval
+ if test X"$OPT_CADDY" = "Xno" ; then
+ CADDY=""
+ fi
+)
+AC_SUBST(CADDY)
-OPT_NSS=no
-AC_ARG_WITH(nss,dnl
-AS_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root]),
- OPT_NSS=$withval
- if test X"$withval" != Xno; then
-
- if test X"$OPT_NSS_AWARE" = "Xno" ; then
- AC_MSG_ERROR([NSS use must be confirmed using --with-nss-deprecated. NSS support will be dropped from curl in August 2022. See docs/DEPRECATE.md])
+dnl we'd like a httpd+apachectl as test server
+dnl
+HTTPD_ENABLED="maybe"
+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])
+if test x"$request_httpd" = "xcheck" -o x"$request_httpd" = "xyes"; then
+ 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])
+ if test "x$APXS" = "x"; then
+ AC_MSG_NOTICE([apache2-dev not installed, httpd tests disabled])
+ HTTPD_ENABLED="no"
+ 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
+ AC_MSG_NOTICE([httpd/apache2 not in PATH, http tests disabled])
+ HTTPD_ENABLED="no"
+ fi
+ if test "x$APXS" = "x"; then
+ AC_MSG_NOTICE([apxs not in PATH, http tests disabled])
+ HTTPD_ENABLED="no"
fi
-
- [TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }NSS"]
fi
-)
+elif test x"$request_httpd" != "xno"; then
+ HTTPD="${request_httpd}/bin/httpd"
+ APACHECTL="${request_httpd}/bin/apachectl"
+ APXS="${request_httpd}/bin/apxs"
+ if test ! -x "${HTTPD}"; then
+ AC_MSG_NOTICE([httpd not found as ${HTTPD}, http tests disabled])
+ HTTPD_ENABLED="no"
+ elif test ! -x "${APACHECTL}"; then
+ AC_MSG_NOTICE([apachectl not found as ${APACHECTL}, http tests disabled])
+ HTTPD_ENABLED="no"
+ elif test ! -x "${APXS}"; then
+ AC_MSG_NOTICE([apxs not found as ${APXS}, http tests disabled])
+ HTTPD_ENABLED="no"
+ else
+ AC_MSG_NOTICE([using HTTPD=$HTTPD for tests])
+ fi
+fi
+if test x"$HTTPD_ENABLED" = "xno"; then
+ HTTPD=""
+ APACHECTL=""
+ APXS=""
+fi
+AC_SUBST(HTTPD)
+AC_SUBST(APACHECTL)
+AC_SUBST(APXS)
+
+dnl the nghttpx we might use in httpd testing
+if test "x$TEST_NGHTTPX" != "x" -a "x$TEST_NGHTTPX" != "xnghttpx"; then
+ HTTPD_NGHTTPX="$TEST_NGHTTPX"
+else
+ AC_PATH_PROG([HTTPD_NGHTTPX], [nghttpx], [],
+ [$PATH:/usr/bin:/usr/local/bin])
+fi
+AC_SUBST(HTTPD_NGHTTPX)
+
+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)
dnl If no TLS choice has been made, check if it was explicitly disabled or
dnl error out to force the user to decide.
--with-bearssl
--with-gnutls
--with-mbedtls
- --with-nss
--with-openssl (also works for BoringSSL and libressl)
--with-rustls
--with-schannel
fi
AC_ARG_WITH(darwinssl,,
- AC_MSG_ERROR([--with-darwin-ssl no longer works!]))
+ AC_MSG_ERROR([--with-darwin-ssl and --without-darwin-ssl no longer work!]))
dnl
dnl Detect the canonical host and target build environment
fi
AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes)
-# For original MinGW (ie not MinGW-w64) define the Windows minimum supported OS
-# version to Windows XP (0x501) if it hasn't already been defined by the user.
-# Without this override original MinGW defaults the version to Windows NT 4.0.
-# Note original MinGW sets _WIN32_WINNT if not defined to whatever WINVER is.
-case $host in
- *-*-mingw32*)
- AC_MSG_CHECKING([if MinGW minimum supported OS should be set to XP])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#include <_mingw.h>
- ]],[[
-#if defined(__MINGW64_VERSION_MAJOR) || \
- defined(WINVER) || \
- defined(_WIN32_WINNT)
-#error
-#endif
- ]])
- ],[
- CPPFLAGS="$CPPFLAGS -DWINVER=0x501"
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([no])
- ])
- ;;
-esac
-
-# Detect original MinGW (not MinGW-w64)
-curl_mingw_original=no
-case $host in
- *-*-mingw32*)
- AC_MSG_CHECKING([using original MinGW (not MinGW-w64)])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#include <_mingw.h>
- ]],[[
-#if defined(__MINGW64_VERSION_MAJOR)
-#error
-#endif
- ]])
- ],[
- curl_mingw_original=yes
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([no])
- ])
- ;;
-esac
-
dnl **********************************************************************
dnl Compilation based checks should not be done before this point.
dnl **********************************************************************
X-yes)
CURL_CHECK_HEADER_WINSOCK2
CURL_CHECK_HEADER_WS2TCPIP
- CURL_CHECK_HEADER_WINCRYPT
- CURL_CHECK_HEADER_WINLDAP
;;
*)
curl_cv_header_winsock2_h="no"
curl_cv_header_ws2tcpip_h="no"
- curl_cv_header_wincrypt_h="no"
- curl_cv_header_winldap_h="no"
;;
esac
CURL_CHECK_WIN32_LARGEFILE
CURL_DARWIN_SYSTEMCONFIGURATION
CURL_SUPPORTS_BUILTIN_AVAILABLE
-AM_CONDITIONAL([OS_WINDOWS], [test "$curl_cv_native_windows" = "yes"])
+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
dnl ************************************************************
dnl switch off particular protocols
experimental="$experimental Hyper"
AC_MSG_NOTICE([Hyper support is experimental])
curl_h1_msg="enabled (Hyper)"
- curl_h2_msg=$curl_h1_msg
HYPER_ENABLED=1
AC_DEFINE(USE_HYPER, 1, [if hyper is in use])
AC_SUBST(USE_HYPER, [1])
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,
- AS_HELP_STRING([--enable-rtsp],[Enable RTSP support])
- AS_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
+AS_HELP_STRING([--enable-rtsp],[Enable RTSP support])
+AS_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
-#include <windows.h>
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
+#include <windows.h>
#endif
]],[[
- gethostbyname("www.dummysite.com");
+ gethostbyname("localhost");
]])
],[
AC_MSG_RESULT([yes])
/* Older Minix versions may need <net/gen/netdb.h> here instead */
#include <netdb.h>
]],[[
- gethostbyname("www.dummysite.com");
+ gethostbyname("localhost");
]])
],[
AC_MSG_RESULT([yes])
#include <stdio.h>
#include <netdb.h>
]],[[
- gethostbyname("www.dummysite.com");
+ gethostbyname("localhost");
]])
],[
AC_MSG_RESULT([yes])
struct Library *SocketBase = NULL;
#endif
]],[[
- gethostbyname("www.dummysite.com");
+ gethostbyname("localhost");
]])
],[
AC_MSG_RESULT([yes])
dnl **********************************************************************
CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
+dnl Check for even better option
+CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC_RAW
+
dnl **********************************************************************
dnl The preceding library checks are all potentially useful for test
dnl servers and libtest cases which require networking and clock_gettime
CURL_CHECK_PKGCONFIG(zlib)
if test "$PKGCONFIG" != "no" ; then
- LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS"
- LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`"
- CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags-only-I zlib`"
+ 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`"
OPT_ZLIB=""
HAVE_LIBZ="1"
fi
AC_CHECK_LIB(z, inflateEnd,
dnl libz found, set the variable
[HAVE_LIBZ="1"
- LIBS="-lz $LIBS"],
+ ZLIB_LIBS="-lz"
+ LIBS="$ZLIB_LIBS $LIBS"],
dnl if no lib found, try /usr/local
[OPT_ZLIB="/usr/local"])
fi
[
dnl the lib was found!
HAVE_LIBZ="1"
- LIBS="-lz $LIBS"
+ ZLIB_LIBS="-lz"
+ LIBS="$ZLIB_LIBS $LIBS"
],
[ CPPFLAGS=$clean_CPPFLAGS
LDFLAGS=$clean_LDFLAGS])
CPPFLAGS=$clean_CPPFLAGS
LDFLAGS=$clean_LDFLAGS
LIBS=$clean_LIBS
+ ZLIB_LIBS=""
elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
then
AC_MSG_WARN([configure found only the libz header file, not the lib!])
CPPFLAGS=$clean_CPPFLAGS
LDFLAGS=$clean_LDFLAGS
LIBS=$clean_LIBS
+ ZLIB_LIBS=""
elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
then
dnl both header and lib were found!
AC_SUBST(HAVE_LIBZ)
AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
-
- ZLIB_LIBS="-lz"
- LIBS="-lz $clean_LIBS"
+ LIBS="$ZLIB_LIBS $clean_LIBS"
dnl replace 'HAVE_LIBZ' in the automake makefile.ams
AMFIXLIB="1"
fi
if test x$CURL_DISABLE_LDAP != x1 ; then
- AC_CHECK_FUNCS([ldap_url_parse])
+ AC_CHECK_FUNCS([ldap_url_parse \
+ ldap_init_fd])
if test "$LDAPLIBNAME" = "wldap32"; then
curl_ldap_msg="enabled (winldap)"
AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation])
else
- curl_ldap_msg="enabled (OpenLDAP)"
if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
+ curl_ldap_msg="enabled (OpenLDAP)"
AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
AC_SUBST(USE_OPENLDAP, [1])
+ else
+ curl_ldap_msg="enabled (ancient OpenLDAP)"
fi
fi
fi
CURL_RUN_IFELSE([[
int main(int argc, char **argv)
{
+#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
(void)argc;
argv[0][0] = ' ';
return (argv[0][0] == ' ')?0:1;
+#endif
}
]],[
curl_cv_writable_argv=yes
CURL_WITH_WOLFSSL
CURL_WITH_BEARSSL
CURL_WITH_RUSTLS
-CURL_WITH_NSS
dnl link required libraries for USE_WIN32_CRYPTO or USE_SCHANNEL
if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$USE_SCHANNEL" = "x1"; then
fi
dnl link bcrypt for BCryptGenRandom() (used when building for Vista or newer)
-if test "x$curl_cv_native_windows" = "xyes" &&
- test "x$curl_mingw_original" = "xno"; then
+if test "x$curl_cv_native_windows" = "xyes"; then
LIBS="-lbcrypt $LIBS"
fi
-case "x$SSL_DISABLED$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED"
+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.
-Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this.])
+Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this.])
;;
x1)
# one SSL backend is enabled
;;
xD*)
AC_MSG_ERROR([--without-ssl has been set together with an explicit option to use an ssl library
-(e.g. --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl, --with-rustls).
+(e.g. --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl, --with-rustls).
Since these are conflicting parameters, verify which is the desired one and drop the other.])
;;
*)
AM_CONDITIONAL([USE_GSASL], [test "$curl_gsasl_msg" = "enabled"])
AC_ARG_WITH(libmetalink,,
- AC_MSG_ERROR([--with-libmetalink no longer works!]))
+ AC_MSG_ERROR([--with-libmetalink and --without-libmetalink no longer work!]))
dnl **********************************************************************
dnl Check for the presence of LIBSSH2 libraries and headers
CURL_CHECK_PKGCONFIG(libssh2)
if test "$PKGCONFIG" != "no" ; then
- LIB_SSH2=`$PKGCONFIG --libs libssh2`
+ 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`
versioned_symbols_flavour="OPENSSL_"
elif test "x$GNUTLS_ENABLED" = "x1"; then
versioned_symbols_flavour="GNUTLS_"
- elif test "x$NSS_ENABLED" = "x1"; then
- versioned_symbols_flavour="NSS_"
elif test "x$WOLFSSL_ENABLED" = "x1"; then
versioned_symbols_flavour="WOLFSSL_"
elif test "x$SCHANNEL_ENABLED" = "x1"; then
#
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_DEFINE(WANT_IDN_PROTOTYPES, 1, [Define to 1 to provide own prototypes.])
AC_SUBST([IDN_ENABLED], [1])
curl_idn_msg="enabled (Windows-native)"
else
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.])
+ else
+ LIB_H2="-lnghttp2"
fi
LDFLAGS="$LDFLAGS $LD_H2"
CPPFLAGS="$CPPFLAGS $CPP_H2"
LIBS="$LIB_H2 $LIBS"
- # use nghttp2_session_set_local_window_size to require nghttp2
- # >= 1.12.0
- AC_CHECK_LIB(nghttp2, nghttp2_session_set_local_window_size,
+ # 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,
[
AC_CHECK_HEADERS(nghttp2/nghttp2.h,
curl_h2_msg="enabled (nghttp2)"
fi
if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1"; then
- dnl backup the pre-ngtcp2_crypto_openssl variables
+ dnl backup the pre-ngtcp2_crypto_quictls variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
- CURL_CHECK_PKGCONFIG(libngtcp2_crypto_openssl, $want_tcp2_path)
+ CURL_CHECK_PKGCONFIG(libngtcp2_crypto_quictls, $want_tcp2_path)
if test "$PKGCONFIG" != "no" ; then
- LIB_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
- $PKGCONFIG --libs-only-l libngtcp2_crypto_openssl`
- AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_OPENSSL])
+ 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])
- CPP_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
- $PKGCONFIG --cflags-only-I libngtcp2_crypto_openssl`
- AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_OPENSSL])
+ 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])
- LD_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
- $PKGCONFIG --libs-only-L libngtcp2_crypto_openssl`
- AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_OPENSSL])
+ 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])
- LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_OPENSSL"
- CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_OPENSSL"
- LIBS="$LIB_NGTCP2_CRYPTO_OPENSSL $LIBS"
+ LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_QUICTLS"
+ CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_QUICTLS"
+ LIBS="$LIB_NGTCP2_CRYPTO_QUICTLS $LIBS"
if test "x$cross_compiling" != "xyes"; then
- DIR_NGTCP2_CRYPTO_OPENSSL=`echo $LD_NGTCP2_CRYPTO_OPENSSL | $SED -e 's/^-L//'`
+ DIR_NGTCP2_CRYPTO_QUICTLS=`echo $LD_NGTCP2_CRYPTO_QUICTLS | $SED -e 's/^-L//'`
fi
- AC_CHECK_LIB(ngtcp2_crypto_openssl, ngtcp2_crypto_recv_client_initial_cb,
+ AC_CHECK_LIB(ngtcp2_crypto_quictls, ngtcp2_crypto_recv_client_initial_cb,
[
AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
NGTCP2_ENABLED=1
- AC_DEFINE(USE_NGTCP2_CRYPTO_OPENSSL, 1, [if ngtcp2_crypto_openssl is in use])
- AC_SUBST(USE_NGTCP2_CRYPTO_OPENSSL, [1])
- CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_OPENSSL"
+ 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"
export CURL_LIBRARY_PATH
- AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_OPENSSL to CURL_LIBRARY_PATH])
+ AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_QUICTLS to CURL_LIBRARY_PATH])
)
],
dnl not found, revert back to clean variables
)
else
- dnl no ngtcp2_crypto_openssl pkg-config found, deal with it
+ dnl no ngtcp2_crypto_quictls 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_openssl pkg-config file.])
+ AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_quictls pkg-config file.])
fi
fi
fi
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGHTTP3"
export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH])
- experimental="$experimental HTTP3"
)
],
dnl not found, revert back to clean variables
if test "x$cross_compiling" != "xyes"; then
DIR_QUICHE=`echo $LD_QUICHE | $SED -e 's/^-L//'`
fi
- AC_CHECK_LIB(quiche, quiche_connect,
+ AC_CHECK_LIB(quiche, quiche_conn_send_ack_eliciting,
[
AC_CHECK_HEADERS(quiche.h,
experimental="$experimental HTTP3"
sys/select.h \
sys/socket.h \
sys/ioctl.h \
- sys/uio.h \
- assert.h \
unistd.h \
stdlib.h \
arpa/inet.h \
net/if.h \
netinet/in.h \
- netinet/in6.h \
+ netinet/in6.h \
sys/un.h \
linux/tcp.h \
netinet/tcp.h \
sys/resource.h \
libgen.h \
locale.h \
- errno.h \
stdbool.h \
- arpa/tftp.h \
sys/filio.h \
sys/wait.h \
setjmp.h,
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
-CURL_CHECK_VARIADIC_MACROS
AC_TYPE_SIZE_T
CURL_CHECK_STRUCT_TIMEVAL
CURL_SIZEOF(curl_off_t, [
#include <curl/system.h>
])
+CURL_SIZEOF(curl_socket_t, [
+#include <curl/curl.h>
+])
CPPFLAGS=$o
AC_CHECK_TYPE(long long,
longlong="yes"
)
-
if test ${ac_cv_sizeof_curl_off_t} -lt 8; then
- AC_ARG_WITH(n64-deprecated,dnl
-AS_HELP_STRING([--with-n64-deprecated],[confirm you realize support for systems without 64 bit data types is going away]),
- if test X"$withval" != Xno; then
- OPT_N64_AWARE=$withval
- fi
-)
- if test -z "$OPT_N64_AWARE"; then
- AC_MSG_ERROR([support for systems without 64 bit curl_off_t is deprecated, use --with-n64-deprecated until then])
- fi
+ AC_MSG_ERROR([64 bit curl_off_t is required])
fi
# check for ssize_t
[
#include <time.h>
#include <limits.h>
- time_t t = -1;
- return (t > 0);
+ int main(void) {
+ time_t t = -1;
+ return (t < 0);
+ }
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned])
CURL_CHECK_FUNC_BASENAME
CURL_CHECK_FUNC_CLOSESOCKET
CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
-CURL_CHECK_FUNC_CONNECT
CURL_CHECK_FUNC_FCNTL
CURL_CHECK_FUNC_FREEADDRINFO
CURL_CHECK_FUNC_FSETXATTR
CURL_CHECK_FUNC_GMTIME_R
CURL_CHECK_FUNC_INET_NTOP
CURL_CHECK_FUNC_INET_PTON
+CURL_CHECK_FUNC_IOCTL
CURL_CHECK_FUNC_IOCTLSOCKET
CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
CURL_CHECK_FUNC_MEMRCHR
[[#include <pwd.h>
#include <sys/types.h>]])
-
-AC_CHECK_FUNCS([fnmatch \
- fchmod \
+AC_CHECK_FUNCS([\
+ _fseeki64 \
+ arc4random \
+ fnmatch \
+ fseeko \
geteuid \
getpass_r \
getppid \
setrlimit \
snprintf \
utime \
- utimes
+ utimes \
],[
],[
func="$ac_func"
fi
])
+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>]])
+
CURL_CHECK_NONBLOCKING_SOCKET
dnl ************************************************************
)
dnl ************************************************************
-dnl disable cryptographic authentication
+dnl disable basic authentication
+dnl
+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]),
+[ case "$enableval" in
+ no)
+ AC_MSG_RESULT(no)
+ AC_DEFINE(CURL_DISABLE_BASIC_AUTH, 1, [to disable basic authentication])
+ CURL_DISABLE_BASIC_AUTH=1
+ ;;
+ *) AC_MSG_RESULT(yes)
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
+)
+
+dnl ************************************************************
+dnl disable bearer authentication
dnl
-AC_MSG_CHECKING([whether to enable cryptographic authentication methods])
-AC_ARG_ENABLE(crypto-auth,
-AS_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication])
-AS_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
+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)
AC_MSG_RESULT(no)
- AC_DEFINE(CURL_DISABLE_CRYPTO_AUTH, 1, [to disable cryptographic authentication])
- CURL_DISABLE_CRYPTO_AUTH=1
+ AC_DEFINE(CURL_DISABLE_BEARER_AUTH, 1, [to disable bearer authentication])
+ CURL_DISABLE_BEARER_AUTH=1
+ ;;
+ *) AC_MSG_RESULT(yes)
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
+)
+
+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)
+ AC_MSG_RESULT(no)
+ AC_DEFINE(CURL_DISABLE_DIGEST_AUTH, 1, [to disable digest authentication])
+ CURL_DISABLE_DIGEST_AUTH=1
+ ;;
+ *) AC_MSG_RESULT(yes)
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
+)
+
+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)
+ AC_MSG_RESULT(no)
+ AC_DEFINE(CURL_DISABLE_KERBEROS_AUTH, 1, [to disable kerberos authentication])
+ CURL_DISABLE_KERBEROS_AUTH=1
+ ;;
+ *) AC_MSG_RESULT(yes)
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
+)
+
+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)
+ AC_MSG_RESULT(no)
+ AC_DEFINE(CURL_DISABLE_NEGOTIATE_AUTH, 1, [to disable negotiate authentication])
+ CURL_DISABLE_NEGOTIATE_AUTH=1
+ ;;
+ *) AC_MSG_RESULT(yes)
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
+)
+
+
+dnl ************************************************************
+dnl disable aws
+dnl
+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]),
+[ case "$enableval" in
+ no)
+ AC_MSG_RESULT(no)
+ AC_DEFINE(CURL_DISABLE_AWS, 1, [to disable AWS sig support])
+ CURL_DISABLE_AWS=1
;;
*) AC_MSG_RESULT(yes)
;;
)
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)
+ AC_MSG_RESULT(no)
+ AC_DEFINE(CURL_DISABLE_BINDLOCAL, 1, [disable local binding support])
+ ;;
+ *) AC_MSG_RESULT(yes)
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
+)
+
+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
+ 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)
+ ;;
+ 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 ]
+)
+
+dnl ************************************************************
dnl disable date parsing
dnl
AC_MSG_CHECKING([whether to support date parsing])
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,
- AS_HELP_STRING([--enable-hsts],[Enable HSTS support])
- AS_HELP_STRING([--disable-hsts],[Disable HSTS support]),
+AS_HELP_STRING([--enable-hsts],[Enable HSTS support])
+AS_HELP_STRING([--disable-hsts],[Disable HSTS support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
fi
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
+
+dnl *************************************************************
dnl WebSockets
dnl
AC_MSG_CHECKING([whether to support WebSockets])
fi
AC_SUBST(LIBCURL_NO_SHARED)
+rm $compilersh
+
dnl
dnl For keeping supported features and protocols also in pkg-config file
dnl since it is more cross-compile friendly than curl-config
SUPPORT_FEATURES="$SUPPORT_FEATURES HSTS"
fi
-if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
+if test "x$CURL_DISABLE_NEGOTIATE_AUTH" != "x1" -a \
\( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
fi
-if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
+if test "x$CURL_DISABLE_KERBEROS_AUTH" != "x1" -a \
\( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos"
fi
use_curl_ntlm_core=no
-if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
- "x$CURL_DISABLE_NTLM" != "x1"; then
+if test "x$CURL_DISABLE_NTLM" != "x1"; then
if test "x$OPENSSL_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
- -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
+ -o "x$GNUTLS_ENABLED" = "x1" \
-o "x$SECURETRANSPORT_ENABLED" = "x1" \
-o "x$USE_WIN32_CRYPTO" = "x1" \
-o "x$WOLFSSL_NTLM" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
fi
-if test "x$USE_NGHTTP2" = "x1" -o "x$USE_HYPER" = "x1"; then
+if test "x$USE_NGHTTP2" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
fi
SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL"
fi
+AC_MSG_CHECKING([if this build supports HTTPS-proxy])
dnl if not explicitly turned off, HTTPS-proxy comes with some TLS backends
-if test "x$https_proxy" != "xno"; then
- if test "x$OPENSSL_ENABLED" = "x1" -o "x$GNUTLS_ENABLED" = "x1" \
- -o "x$NSS_ENABLED" = "x1"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
+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])
fi
+else
+ AC_MSG_RESULT([no])
fi
if test "x$ECH_ENABLED" = "x1"; then
if test "$tst_atomic" = "yes"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
+elif test "x$USE_THREADS_POSIX" = "x1" -a \
+ "x$ac_cv_header_pthread_h" = "xyes"; then
+ SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
else
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
lib/libcurl.vers \
lib/libcurl.plist \
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 \
CURL_GENERATE_CONFIGUREHELP_PM
-XC_AMEND_DISTCLEAN([lib src tests/unit tests/server tests/libtest docs/examples])
-
AC_MSG_NOTICE([Configured to build curl/libcurl:
Host setup: ${host}