# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2021, 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
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
+# SPDX-License-Identifier: curl
+#
#***************************************************************************
dnl Process this file with autoconf to produce a configure script.
CURL_OVERRIDE_AUTOCONF
dnl configure script copyright
-AC_COPYRIGHT([Copyright (c) 1998 - 2021 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])
fi
AC_SUBST([GREP])
-dnl EGREP is mandatory for configure process and libtool.
+dnl 'grep -E' is mandatory for configure process and libtool.
dnl Set it now, allowing it to be changed later.
if test -z "$EGREP"; then
dnl allow it to be overridden
+ AC_MSG_CHECKING([that grep -E works])
if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
- AC_MSG_CHECKING([for egrep])
EGREP="$GREP -E"
- AC_MSG_RESULT([$EGREP])
+ AC_MSG_RESULT([yes])
else
+ AC_MSG_RESULT([no])
AC_PATH_PROG([EGREP], [egrep], [not_found],
[$PATH:/usr/bin:/usr/local/bin])
fi
fi
if test -z "$EGREP" || test "$EGREP" = "not_found"; then
- AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
+ AC_MSG_ERROR([grep -E is not working and egrep is not found in PATH. Cannot continue.])
fi
AC_SUBST([EGREP])
dnl figure out the libcurl version
CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h`
XC_CHECK_PROG_CC
+CURL_ATOMIC
dnl for --enable-code-coverage
CURL_COVERAGE
dnl
dnl initialize all the info variables
- curl_ssl_msg="no (--with-{openssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,mesalink,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_rtmp_msg="no (--with-librtmp)"
curl_psl_msg="no (--with-libpsl)"
curl_altsvc_msg="enabled (--disable-alt-svc)"
+curl_headers_msg="enabled (--disable-headers-api)"
curl_hsts_msg="enabled (--disable-hsts)"
+ 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)"
+ 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
OPT_SECURETRANSPORT=no
AC_ARG_WITH(secure-transport,dnl
-AS_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS]),
+AS_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS]),[
OPT_SECURETRANSPORT=$withval
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }Secure-Transport"
-)
+ TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }Secure-Transport"
+])
OPT_AMISSL=no
AC_ARG_WITH(amissl,dnl
-AS_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]),
+AS_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]),[
OPT_AMISSL=$withval
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }AmiSSL")
+ TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }AmiSSL"
+])
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])
-AS_HELP_STRING([--without-ssl], [build without any TLS library]),
+AS_HELP_STRING([--without-ssl], [build without any TLS library]),[
OPT_SSL=$withval
OPT_OPENSSL=$withval
if test X"$withval" != Xno; then
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL")
+ TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
+ else
+ SSL_DISABLED="D"
fi
+])
AC_ARG_WITH(openssl,dnl
-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]),
+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]),[
OPT_OPENSSL=$withval
if test X"$withval" != Xno; then
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL")
+ TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
fi
+])
OPT_GNUTLS=no
AC_ARG_WITH(gnutls,dnl
-AS_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]),
+AS_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]),[
OPT_GNUTLS=$withval
if test X"$withval" != Xno; then
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }GnuTLS")
+ TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }GnuTLS"
fi
+])
OPT_MBEDTLS=no
AC_ARG_WITH(mbedtls,dnl
-AS_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root]),
+AS_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root]),[
OPT_MBEDTLS=$withval
if test X"$withval" != Xno; then
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }mbedTLS")
+ TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }mbedTLS"
fi
+])
OPT_WOLFSSL=no
AC_ARG_WITH(wolfssl,dnl
-AS_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)]),
+AS_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)]),[
OPT_WOLFSSL=$withval
if test X"$withval" != Xno; then
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }wolfSSL")
- fi
-
-OPT_MESALINK=no
-AC_ARG_WITH(mesalink,dnl
-AS_HELP_STRING([--with-mesalink=PATH],[where to look for MesaLink, PATH points to the installation root]),
- OPT_MESALINK=$withval
- if test X"$withval" != Xno; then
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }MesaLink")
+ TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }wolfSSL"
fi
+])
OPT_BEARSSL=no
AC_ARG_WITH(bearssl,dnl
-AS_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root]),
+AS_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root]),[
OPT_BEARSSL=$withval
if test X"$withval" != Xno; then
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }BearSSL")
+ TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }BearSSL"
fi
+])
OPT_RUSTLS=no
AC_ARG_WITH(rustls,dnl
-AS_HELP_STRING([--with-rustls=PATH],[where to look for rustls, PATH points to the installation root]),
+AS_HELP_STRING([--with-rustls=PATH],[where to look for rustls, PATH points to the installation root]),[
OPT_RUSTLS=$withval
if test X"$withval" != Xno; then
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }rustls")
+ TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }rustls"
+ experimental="$experimental rustls"
fi
+])
-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
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }NSS")
+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)
+
+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
+ 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-mesalink
- --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
XC_LIBTOOL
+LT_LANG([Windows Resource])
+
#
# Automake conditionals based on libtool related checks
#
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
-
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_CHECK_HEADER_WINBER
;;
*)
curl_cv_header_winsock2_h="no"
curl_cv_header_ws2tcpip_h="no"
- curl_cv_header_wincrypt_h="no"
- curl_cv_header_winldap_h="no"
- curl_cv_header_winber_h="no"
;;
esac
CURL_CHECK_WIN32_LARGEFILE
CURL_DARWIN_SYSTEMCONFIGURATION
CURL_SUPPORTS_BUILTIN_AVAILABLE
+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([Added $DIR_HYPER to CURL_LIBRARY_PATH]),
)
],
- for d in `echo $DIR_HYPER | sed -e 's/:/ /'`; do
+ for d in `echo $DIR_HYPER | $SED -e 's/:/ /'`; do
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
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])
AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
+ #define __USE_INLINE__
#include <proto/bsdsocket.h>
+ #ifdef __amigaos4__
+ struct SocketIFace *ISocket = NULL;
+ #else
struct Library *SocketBase = NULL;
+ #endif
]],[[
- gethostbyname("www.dummysite.com");
+ gethostbyname("localhost");
]])
],[
AC_MSG_RESULT([yes])
])
fi
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
- dnl gethostbyname in the net lib - for BeOS
- AC_CHECK_LIB(net, gethostbyname,
- [HAVE_GETHOSTBYNAME="1"
- LIBS="-lnet $LIBS"
- ])
-fi
-
-
if test "$HAVE_GETHOSTBYNAME" != "1"; then
AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
fi
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_ZLIB_H, 1, [if you have the zlib.h header file])
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"
CURL_CHECK_HEADER_LBER
CURL_CHECK_HEADER_LDAP
- CURL_CHECK_HEADER_LDAPSSL
CURL_CHECK_HEADER_LDAP_SSL
if test -z "$LDAPLIBNAME" ; then
fi
if test x$CURL_DISABLE_LDAP != x1 ; then
- AC_CHECK_FUNCS([ldap_url_parse ldap_init_fd])
+ 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
fi
])
+: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
+
save_CPPFLAGS="$CPPFLAGS"
AC_MSG_CHECKING([if GSS-API support is requested])
if test x"$want_gss" = xyes; then
AC_MSG_RESULT(yes)
- CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
+ if test $GSSAPI_ROOT != "/usr"; then
+ CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig)
+ else
+ CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
+ fi
if test -z "$GSSAPI_INCS"; then
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
LIBS="-lgssapi_krb5 -lresolv $LIBS"
;;
*)
- CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
+ if test $GSSAPI_ROOT != "/usr"; then
+ CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig)
+ else
+ CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
+ fi
if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
dnl krb5-config doesn't have --libs-only-L or similar, put everything
dnl into LIBS
elif test "$PKGCONFIG" != "no" ; then
gss_libs=`$PKGCONFIG --libs mit-krb5-gssapi`
LIBS="$gss_libs $LIBS"
+ elif test -f "$KRB5CONFIG"; then
+ 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"
else
case $host in
*-hp-hpux*)
CPPFLAGS="$save_CPPFLAGS"
fi
+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
+
build_libstubgss=no
if test x"$want_gss" = "xyes"; then
build_libstubgss=yes
CURL_WITH_GNUTLS
CURL_WITH_MBEDTLS
CURL_WITH_WOLFSSL
-CURL_WITH_MESALINK
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
LIBS="-ladvapi32 -lcrypt32 $LIBS"
fi
-case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$BEARSSL_ENABLED$AMISSL_ENABLED$RUSTLS_ENABLED"
+dnl link bcrypt for BCryptGenRandom() (used when building for Vista or newer)
+if test "x$curl_cv_native_windows" = "xyes"; then
+ LIBS="-lbcrypt $LIBS"
+fi
+
+case "x$SSL_DISABLED$OPENSSL_ENABLED$GNUTLS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED"
in
x)
- AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
- AC_MSG_WARN([Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl, --with-bearssl or --with-rustls to address this.])
+ AC_MSG_ERROR([TLS not detected, you will not be able to use HTTPS, FTPS, NTLM and more.
+Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this.])
;;
x1)
# one SSL backend is 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
+(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.])
+ ;;
*)
# more than one SSL backend is enabled
AC_SUBST(SSL_ENABLED)
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`
dnl check for function added in libssh2 version 1.0
AC_CHECK_LIB(ssh2, libssh2_session_block_directions)
- AC_CHECK_HEADERS(libssh2.h,
+ AC_CHECK_HEADER(libssh2.h,
curl_ssh_msg="enabled (libSSH2)"
LIBSSH2_ENABLED=1
AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use])
AC_CHECK_LIB(ssh, ssh_new)
- AC_CHECK_HEADERS(libssh/libssh.h,
+ AC_CHECK_HEADER(libssh/libssh.h,
curl_ssh_msg="enabled (libSSH)"
LIBSSH_ENABLED=1
AC_DEFINE(USE_LIBSSH, 1, [if libSSH is in use])
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
AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS],
[test "x$versioned_symbols" = 'xyes'])
+dnl Update .plist file with current version
+AC_SUBST([CURL_PLIST_VERSION],
+ ["$CURLVERSION"])
+
dnl -------------------------------------------------
dnl check winidn option before other IDN libraries
dnl -------------------------------------------------
#
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
fi
dnl **********************************************************************
-dnl Check for the presence of IDN libraries and headers
+dnl Check for ICU-UC (IDN support)
dnl **********************************************************************
-AC_MSG_CHECKING([whether to build with libidn2])
+AC_MSG_CHECKING([whether to build with icu-uc])
OPT_IDN="default"
-AC_ARG_WITH(libidn2,
-AS_HELP_STRING([--with-libidn2=PATH],[Enable libidn2 usage])
-AS_HELP_STRING([--without-libidn2],[Disable libidn2 usage]),
+AC_ARG_WITH(icu-uc,
+AC_HELP_STRING([--with-icu-uc=PATH],[Enable icu-uc usage])
+AC_HELP_STRING([--without-icu-uc],[Disable icu-uc usage]),
[OPT_IDN=$withval])
case "$OPT_IDN" in
no)
- dnl --without-libidn2 option used
+ dnl --without-icu-uc option used
want_idn="no"
AC_MSG_RESULT([no])
;;
AC_MSG_RESULT([(assumed) yes])
;;
yes)
- dnl --with-libidn2 option used without path
+ dnl --with-icu-uc option used without path
want_idn="yes"
want_idn_path="default"
AC_MSG_RESULT([yes])
;;
*)
- dnl --with-libidn2 option used with path
+ dnl --with-icu-uc option used with path
want_idn="yes"
want_idn_path="$withval"
AC_MSG_RESULT([yes ($withval)])
if test "$want_idn_path" != "default"; then
dnl path has been specified
IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
+ CURL_CHECK_PKGCONFIG(icu-uc, [$IDN_PCDIR])
+ if test "$PKGCONFIG" != "no"; then
+ IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+ $PKGCONFIG --libs-only-l icu-uc 2>/dev/null`
+ IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+ $PKGCONFIG --libs-only-L icu-uc 2>/dev/null`
+ IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+ $PKGCONFIG --cflags-only-I icu-uc 2>/dev/null`
+ IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
+ else
+ dnl pkg-config not available or provides no info
+ IDN_LIBS="-licu-uc"
+ 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
+ CURL_CHECK_PKGCONFIG(icu-uc)
+ if test "$PKGCONFIG" != "no"; then
+ IDN_LIBS=`$PKGCONFIG --libs-only-l icu-uc 2>/dev/null`
+ IDN_LDFLAGS=`$PKGCONFIG --libs-only-L icu-uc 2>/dev/null`
+ IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I icu-uc 2>/dev/null`
+ IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
+ else
+ dnl pkg-config not available or provides no info
+ IDN_LIBS="-licu-uc"
+ 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
+ #
+ CPPFLAGS="$IDN_CPPFLAGS $CPPFLAGS"
+ LDFLAGS="$IDN_LDFLAGS $LDFLAGS"
+ LIBS="$IDN_LIBS $LIBS"
+ #
+ AC_MSG_CHECKING([if uidna_nameToASCII_UTF8 can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([uidna_nameToASCII_UTF8])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_icu="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_icu="no"
+ ])
+ #
+ if test "$tst_links_icu" = "yes"; then
+ AC_DEFINE(USE_ICU_IDNA, 1, [Define to 1 if you have the `icu-uc' library (-licu-uc).])
+ dnl different versions of libidn have different setups of these:
+
+ AC_SUBST([IDN_ENABLED], [1])
+ curl_idn_msg="enabled (icu-uc)"
+ if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$IDN_DIR"
+ export LD_LIBRARY_PATH
+ AC_MSG_NOTICE([Added $IDN_DIR to LD_LIBRARY_PATH])
+ fi
+ else
+ AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
+ CPPFLAGS="$clean_CPPFLAGS"
+ LDFLAGS="$clean_LDFLAGS"
+ LIBS="$clean_LIBS"
+ fi
+
+fi
+
+dnl **********************************************************************
+dnl Check for the presence of IDN libraries and headers
+dnl **********************************************************************
+
+AC_MSG_CHECKING([whether to build with libidn2])
+OPT_IDN="default"
+AC_ARG_WITH(libidn2,
+AS_HELP_STRING([--with-libidn2=PATH],[Enable libidn2 usage])
+AS_HELP_STRING([--without-libidn2],[Disable libidn2 usage]),
+ [OPT_IDN=$withval])
+if test "x$tst_links_winidn" = "xyes"; then
+ want_idn="no"
+ AC_MSG_RESULT([no (using winidn instead)])
+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
+
+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"
CURL_CHECK_PKGCONFIG(libidn2, [$IDN_PCDIR])
if test "$PKGCONFIG" != "no"; then
IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
fi
fi
+dnl Let's hope this split URL remains working:
+dnl https://www15.software.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
+dnl genprogc/thread_quick_ref.htm
+
+dnl **********************************************************************
+dnl Check for strict SSL check
+dnl **********************************************************************
+AC_ARG_ENABLE([strict-ssl-check],
+ AS_HELP_STRING([--enable-strict-ssl-check], [Enable strict SSL check usage]),
+ [enable_strict_ssl_check=yes],
+ [enable_strict_ssl_check=no])
+
+AS_IF([test "x$enable_strict_ssl_check" = "xyes"], [
+ CPPFLAGS+=" -DUSE_TIZEN_FEATURE_STRICT_SSL_CHECK"
+ SUPPORT_TIZEN_FEATURES="$SUPPORT_TIZEN_FEATURES strict-ssl-check"
+])
+
+AM_CONDITIONAL(USE_TIZEN_FEATURE_STRICT_SSL_CHECK, test "x$enable_strict_ssl_check" = "xyes")
+
+dnl **********************************************************************
+dnl Check for DLP
+dnl **********************************************************************
+
+AC_ARG_ENABLE([dlp],
+ AS_HELP_STRING([--enable-dlp], [Enable DLP usage]))
+
+AS_IF([test "x$enable_dlp" = "xyes"], [
+ AC_DEFINE(HAVE_TIZEN_DLP, 1, [Enadle DLP])
+ LIBS="-ldl $LIBS"
+])
+
+AM_CONDITIONAL(HAVE_TIZEN_DLP, test "x$enable_dlp" = "xyes")
+
dnl **********************************************************************
dnl Check for nghttp2
dnl **********************************************************************
dnl --with-nghttp2 option used without path
want_nghttp2="default"
want_nghttp2_path=""
+ want_nghttp2_pkg_config_path=""
;;
*)
dnl --with-nghttp2 option used with path
want_nghttp2="yes"
- want_nghttp2_path="$withval/lib/pkgconfig"
+ want_nghttp2_path="$withval"
+ want_nghttp2_pkg_config_path="$withval/lib/pkgconfig"
;;
esac
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
- CURL_CHECK_PKGCONFIG(libnghttp2, $want_nghttp2_path)
+ CURL_CHECK_PKGCONFIG(libnghttp2, $want_nghttp2_pkg_config_path)
if test "$PKGCONFIG" != "no" ; then
- LIB_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_path])
+ LIB_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path])
$PKGCONFIG --libs-only-l libnghttp2`
AC_MSG_NOTICE([-l is $LIB_H2])
- CPP_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_path]) dnl
+ CPP_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path]) dnl
$PKGCONFIG --cflags-only-I libnghttp2`
AC_MSG_NOTICE([-I is $CPP_H2])
- LD_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_path])
+ LD_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path])
$PKGCONFIG --libs-only-L libnghttp2`
AC_MSG_NOTICE([-L is $LD_H2])
- 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,
- [
- AC_CHECK_HEADERS(nghttp2/nghttp2.h,
- curl_h2_msg="enabled (nghttp2)"
- NGHTTP2_ENABLED=1
- AC_DEFINE(USE_NGHTTP2, 1, [if nghttp2 is in use])
- AC_SUBST(USE_NGHTTP2, [1])
- )
- ],
- dnl not found, revert back to clean variables
- LDFLAGS=$CLEANLDFLAGS
- CPPFLAGS=$CLEANCPPFLAGS
- LIBS=$CLEANLIBS
- )
-
+ 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.])
else
- dnl no nghttp2 pkg-config found, deal with it
- if test X"$want_nghttp2" != Xdefault; then
- dnl To avoid link errors, we do not allow --with-nghttp2 without
- dnl a pkgconfig file
- AC_MSG_ERROR([--with-nghttp2 was specified but could not find libnghttp2 pkg-config file.])
- fi
+ LIB_H2="-lnghttp2"
fi
+ LDFLAGS="$LDFLAGS $LD_H2"
+ CPPFLAGS="$CPPFLAGS $CPP_H2"
+ LIBS="$LIB_H2 $LIBS"
+
+ # 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)"
+ NGHTTP2_ENABLED=1
+ AC_DEFINE(USE_NGHTTP2, 1, [if nghttp2 is in use])
+ AC_SUBST(USE_NGHTTP2, [1])
+ )
+
+ CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_H2"
+ export CURL_LIBRARY_PATH
+ AC_MSG_NOTICE([Added $DIR_H2 to CURL_LIBRARY_PATH])
+ ],
+ dnl not found, revert back to clean variables
+ LDFLAGS=$CLEANLDFLAGS
+ CPPFLAGS=$CLEANCPPFLAGS
+ LIBS=$CLEANLIBS
+ )
fi
dnl **********************************************************************
dnl Check for ngtcp2 (QUIC)
dnl **********************************************************************
-OPT_TCP2="yes"
+OPT_TCP2="no"
if test "x$disable_http" = "xyes"; then
# without HTTP, ngtcp2 is no use
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_ctx_initial,
+ 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
if test "x$cross_compiling" != "xyes"; then
DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/^-L//'`
fi
- AC_CHECK_LIB(ngtcp2_crypto_gnutls, ngtcp2_crypto_ctx_initial,
+ AC_CHECK_LIB(ngtcp2_crypto_gnutls, ngtcp2_crypto_recv_client_initial_cb,
[
AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
NGTCP2_ENABLED=1
fi
fi
+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)
+
+ if test "$PKGCONFIG" != "no" ; then
+ 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,
+ [
+ AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
+ 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])
+ )
+ ],
+ 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
+
dnl **********************************************************************
dnl Check for nghttp3 (HTTP/3 with ngtcp2)
dnl **********************************************************************
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"
fi
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
+
+ if test "$NGHTTP3_ENABLED" = 1; then
+ AC_MSG_ERROR([--with-msh3 and --with-ngtcp2 are mutually exclusive])
+ fi
+
+ 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,
+ [
+ AC_CHECK_HEADERS(msh3.h,
+ 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
+ AC_MSG_NOTICE([Added $DIR_MSH3 to CURL_LIBRARY_PATH]),
+ experimental="$experimental HTTP3"
+ )
+ ],
+ dnl not found, revert back to clean variables
+ LDFLAGS=$CLEANLDFLAGS
+ CPPFLAGS=$CLEANCPPFLAGS
+ LIBS=$CLEANLIBS
+ )
+fi
+
+dnl **********************************************************************
dnl Check for zsh completion path
dnl **********************************************************************
;;
esac
-CURL_CHECK_HEADER_MALLOC
-CURL_CHECK_HEADER_MEMORY
-
dnl Now check for the very most basic headers. Then we can use these
dnl ones as default-headers when checking for the rest!
AC_CHECK_HEADERS(
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 \
+ netinet/udp.h \
netdb.h \
sys/sockio.h \
sys/stat.h \
termios.h \
termio.h \
fcntl.h \
- alloca.h \
io.h \
pwd.h \
utime.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_VERIFY_RUNTIMELIBS
-AX_COMPILE_CHECK_SIZEOF(size_t)
-AX_COMPILE_CHECK_SIZEOF(long)
-AX_COMPILE_CHECK_SIZEOF(int)
-AX_COMPILE_CHECK_SIZEOF(short)
-AX_COMPILE_CHECK_SIZEOF(time_t)
-AX_COMPILE_CHECK_SIZEOF(off_t)
+CURL_SIZEOF(size_t)
+CURL_SIZEOF(long)
+CURL_SIZEOF(int)
+CURL_SIZEOF(time_t)
+CURL_SIZEOF(off_t)
o=$CPPFLAGS
CPPFLAGS="-I$srcdir/include $CPPFLAGS"
-AX_COMPILE_CHECK_SIZEOF(curl_off_t, [
+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 "xyes" = "x$longlong"; then
- AC_MSG_CHECKING([if numberLL works])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
- ]],[[
- long long val = 1000LL;
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])
- ],[
- AC_MSG_RESULT([no])
- ])
+if test ${ac_cv_sizeof_curl_off_t} -lt 8; then
+ AC_MSG_ERROR([64 bit curl_off_t is required])
fi
-
# check for ssize_t
AC_CHECK_TYPE(ssize_t, ,
AC_DEFINE(ssize_t, int, [the signed version of size_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_IOCTL
CURL_CHECK_FUNC_IOCTLSOCKET
CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
-CURL_CHECK_FUNC_LOCALTIME_R
CURL_CHECK_FUNC_MEMRCHR
CURL_CHECK_FUNC_POLL
-CURL_CHECK_FUNC_SETSOCKOPT
CURL_CHECK_FUNC_SIGACTION
CURL_CHECK_FUNC_SIGINTERRUPT
CURL_CHECK_FUNC_SIGNAL
CURL_CHECK_FUNC_STRDUP
CURL_CHECK_FUNC_STRERROR_R
CURL_CHECK_FUNC_STRICMP
-CURL_CHECK_FUNC_STRNCMPI
-CURL_CHECK_FUNC_STRNICMP
-CURL_CHECK_FUNC_STRSTR
CURL_CHECK_FUNC_STRTOK_R
CURL_CHECK_FUNC_STRTOLL
-CURL_CHECK_FUNC_WRITEV
case $host in
*msdosdjgpp)
[[#include <pwd.h>
#include <sys/types.h>]])
-
-AC_CHECK_FUNCS([fnmatch \
+AC_CHECK_FUNCS([\
+ _fseeki64 \
+ arc4random \
+ fnmatch \
+ fseeko \
geteuid \
getpass_r \
getppid \
if_nametoindex \
mach_absolute_time \
pipe \
+ sched_yield \
+ sendmsg \
setlocale \
setmode \
setrlimit \
- usleep \
+ 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 ************************************************************
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
CURL_CHECK_LIB_ARES
-AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
if test "x$curl_cv_native_windows" != "xyes" &&
test "x$enable_shared" = "xyes"; then
dnl if it wasn't found without lib, search for it in pthread lib
if test "$USE_THREADS_POSIX" != "1"
then
- CFLAGS="$CFLAGS -pthread"
# assign PTHREAD for pkg-config use
PTHREAD=" -pthread"
+
+ case $host in
+ *-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"
+ ;;
+ esac
AC_CHECK_LIB(pthread, pthread_create,
[USE_THREADS_POSIX=1],
[ CFLAGS="$save_CFLAGS"])
)
dnl ************************************************************
-dnl disable cryptographic authentication
+dnl disable basic 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 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_CRYPTO_AUTH, 1, [to disable cryptographic authentication])
- CURL_DISABLE_CRYPTO_AUTH=1
+ 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 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_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)
;;
]
)
if test "x$want_unix_sockets" != "xno"; then
- AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [
+ if test "x$curl_cv_native_windows" = "xyes"; then
+ USE_UNIX_SOCKETS=1
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>
- ])
+ 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
fi
dnl ************************************************************
)
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])
*) AC_MSG_RESULT(yes)
;;
esac ],
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(yes)
+)
+
+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
+ no) AC_MSG_RESULT(no)
+ curl_headers_msg="no (--enable-headers-api)"
+ AC_DEFINE(CURL_DISABLE_HEADERS_API, 1, [disable headers-api])
+ ;;
+ *)
+ AC_MSG_RESULT(yes)
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
)
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
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])
+AC_ARG_ENABLE(websockets,
+AS_HELP_STRING([--enable-websockets],[Enable WebSockets support])
+AS_HELP_STRING([--disable-websockets],[Disable WebSockets support]),
+[ case "$enableval" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *)
+ if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
+ AC_MSG_RESULT(yes)
+ curl_ws_msg="enabled"
+ AC_DEFINE_UNQUOTED(USE_WEBSOCKETS, [1], [enable websockets support])
+ SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WS"
+ if test "x$SSL_ENABLED" = "x1"; then
+ SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WSS"
+ fi
+ experimental="$experimental Websockets"
+ else
+ dnl websockets requires >32 bit curl_off_t
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([Websockets disabled due to lack of >32 bit curl_off_t])
+ fi
+ ;;
+ esac ],
+ AC_MSG_RESULT(no)
+)
+
+
dnl ************************************************************
dnl hiding of library internal symbols
dnl
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
-if test "x$USE_NGTCP2" = "x1" -o "x$USE_QUICHE" = "x1"; then
+if test "x$USE_NGTCP2" = "x1" -o "x$USE_QUICHE" = "x1" \
+ -o "x$USE_MSH3" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3"
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
fi
fi
+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([[
+ #include <windows.h>
+ ]],[[
+ #if (WINVER < 0x600) && (_WIN32_WINNT < 0x600)
+ #error
+ #endif
+ ]])
+ ],[
+ SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
+ ],[
+ ])
+fi
+
dnl replace spaces with newlines
dnl sort the lines
dnl replace the newlines back to spaces
include/curl/Makefile \
src/Makefile \
lib/Makefile \
+ extensions/Makefile \
scripts/Makefile \
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}
RTMP: ${curl_rtmp_msg}
PSL: ${curl_psl_msg}
Alt-svc: ${curl_altsvc_msg}
+ Headers API: ${curl_headers_msg}
HSTS: ${curl_hsts_msg}
HTTP1: ${curl_h1_msg}
HTTP2: ${curl_h2_msg}
HTTP3: ${curl_h3_msg}
ECH: ${curl_ech_msg}
+ WebSockets: ${curl_ws_msg}
Protocols: ${SUPPORT_PROTOCOLS}
Features: ${SUPPORT_FEATURES}
+ Tizen Features: ${SUPPORT_TIZEN_FEATURES}
])
if test -n "$experimental"; then
cat >&2 << _EOF