1 #***************************************************************************
3 # Project ___| | | | _ \| |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
8 # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
10 # This software is licensed as described in the file COPYING, which
11 # you should have received as part of this distribution. The terms
12 # are also available at https://curl.se/docs/copyright.html.
14 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 # copies of the Software, and permit persons to whom the Software is
16 # furnished to do so, under the terms of the COPYING file.
18 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 # KIND, either express or implied.
21 # SPDX-License-Identifier: curl
23 #***************************************************************************
24 dnl Process this file with autoconf to produce a configure script.
28 dnl We don't know the version number "statically" so we use a dash here
29 AC_INIT([curl], [-], [a suitable curl mailing list: https://curl.se/mail/])
33 CURL_OVERRIDE_AUTOCONF
35 dnl configure script copyright
36 AC_COPYRIGHT([Copyright (C) Daniel Stenberg, <daniel@haxx.se>
37 This configure script may be copied, distributed and modified under the
38 terms of the curl license; see COPYING for more details])
40 AC_CONFIG_SRCDIR([lib/urldata.h])
41 AC_CONFIG_HEADERS(lib/curl_config.h)
42 AC_CONFIG_MACRO_DIR([m4])
44 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
46 CURL_CHECK_OPTION_DEBUG
47 CURL_CHECK_OPTION_OPTIMIZE
48 CURL_CHECK_OPTION_WARNINGS
49 CURL_CHECK_OPTION_WERROR
50 CURL_CHECK_OPTION_CURLDEBUG
51 CURL_CHECK_OPTION_SYMBOL_HIDING
52 CURL_CHECK_OPTION_ARES
56 XC_CHECK_PATH_SEPARATOR
59 # save the configure arguments
61 CONFIGURE_OPTIONS="\"$ac_configure_args\""
62 AC_SUBST(CONFIGURE_OPTIONS)
64 dnl SED is mandatory for configure process and libtool.
65 dnl Set it now, allowing it to be changed later.
66 if test -z "$SED"; then
67 dnl allow it to be overridden
68 AC_PATH_PROG([SED], [sed], [not_found],
69 [$PATH:/usr/bin:/usr/local/bin])
70 if test -z "$SED" || test "$SED" = "not_found"; then
71 AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
76 dnl GREP is mandatory for configure process and libtool.
77 dnl Set it now, allowing it to be changed later.
78 if test -z "$GREP"; then
79 dnl allow it to be overridden
80 AC_PATH_PROG([GREP], [grep], [not_found],
81 [$PATH:/usr/bin:/usr/local/bin])
82 if test -z "$GREP" || test "$GREP" = "not_found"; then
83 AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
88 dnl 'grep -E' is mandatory for configure process and libtool.
89 dnl Set it now, allowing it to be changed later.
90 if test -z "$EGREP"; then
91 dnl allow it to be overridden
92 AC_MSG_CHECKING([that grep -E works])
93 if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
98 AC_PATH_PROG([EGREP], [egrep], [not_found],
99 [$PATH:/usr/bin:/usr/local/bin])
102 if test -z "$EGREP" || test "$EGREP" = "not_found"; then
103 AC_MSG_ERROR([grep -E is not working and egrep is not found in PATH. Cannot continue.])
107 dnl AR is mandatory for configure process and libtool.
108 dnl This is target dependent, so check it as a tool.
109 if test -z "$AR"; then
110 dnl allow it to be overridden
111 AC_PATH_TOOL([AR], [ar], [not_found],
112 [$PATH:/usr/bin:/usr/local/bin])
113 if test -z "$AR" || test "$AR" = "not_found"; then
114 AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
121 dnl figure out the libcurl version
122 CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h`
126 dnl for --enable-code-coverage
130 AC_MSG_CHECKING([curl version])
131 AC_MSG_RESULT($CURLVERSION)
133 AC_SUBST(CURLVERSION)
136 dnl we extract the numerical version for curl-config only
137 VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\([0-9A-Fa-f]*\).*/\1/p' ${srcdir}/include/curl/curlver.h`
140 dnl Solaris pkgadd support definitions
141 PKGADD_PKG="HAXXcurl"
142 PKGADD_NAME="curl - a client that groks URLs"
143 PKGADD_VENDOR="curl.se"
145 AC_SUBST(PKGADD_NAME)
146 AC_SUBST(PKGADD_VENDOR)
149 dnl initialize all the info variables
150 curl_ssl_msg="no (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,secure-transport,amissl,bearssl,rustls} )"
151 curl_ssh_msg="no (--with-{libssh,libssh2})"
152 curl_zlib_msg="no (--with-zlib)"
153 curl_brotli_msg="no (--with-brotli)"
154 curl_zstd_msg="no (--with-zstd)"
155 curl_gss_msg="no (--with-gssapi)"
156 curl_gsasl_msg="no (--with-gsasl)"
157 curl_tls_srp_msg="no (--enable-tls-srp)"
158 curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
159 curl_ipv6_msg="no (--enable-ipv6)"
160 curl_unix_sockets_msg="no (--enable-unix-sockets)"
161 curl_idn_msg="no (--with-{libidn2,winidn})"
162 curl_manual_msg="no (--enable-manual)"
163 curl_libcurl_msg="enabled (--disable-libcurl-option)"
164 curl_verbose_msg="enabled (--disable-verbose)"
165 curl_sspi_msg="no (--enable-sspi)"
166 curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
167 curl_ldaps_msg="no (--enable-ldaps)"
168 curl_rtsp_msg="no (--enable-rtsp)"
169 curl_rtmp_msg="no (--with-librtmp)"
170 curl_psl_msg="no (--with-libpsl)"
171 curl_altsvc_msg="enabled (--disable-alt-svc)"
172 curl_headers_msg="enabled (--disable-headers-api)"
173 curl_hsts_msg="enabled (--disable-hsts)"
174 curl_ws_msg="no (--enable-websockets)"
176 curl_h1_msg="enabled (internal)"
177 curl_h2_msg="no (--with-nghttp2)"
178 curl_h3_msg="no (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-msh3)"
184 dnl Save some initial values the user might have provided
186 INITIAL_LDFLAGS=$LDFLAGS
190 dnl Generates a shell script to run the compiler with LD_LIBRARY_PATH set to
191 dnl the value used right now. This lets CURL_RUN_IFELSE set LD_LIBRARY_PATH to
192 dnl something different but only have that affect the execution of the results
193 dnl of the compile, not change the libraries for the compiler itself.
195 compilersh="run-compiler"
198 CURL_SAVED_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
199 export CURL_SAVED_LD_LIBRARY_PATH
200 cat <<\EOF > "$compilersh"
203 LD_LIBRARY_PATH="$CURL_SAVED_LD_LIBRARY_PATH"
204 export LD_LIBRARY_PATH
208 dnl **********************************************************************
209 dnl See which TLS backend(s) that are requested. Just do all the
210 dnl TLS AC_ARG_WITH() invokes here and do the checks later
211 dnl **********************************************************************
213 AC_ARG_WITH(schannel,dnl
214 AS_HELP_STRING([--with-schannel],[enable Windows native SSL/TLS]),
215 OPT_SCHANNEL=$withval
216 TLSCHOICE="schannel")
218 OPT_SECURETRANSPORT=no
219 AC_ARG_WITH(secure-transport,dnl
220 AS_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS]),[
221 OPT_SECURETRANSPORT=$withval
222 TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }Secure-Transport"
226 AC_ARG_WITH(amissl,dnl
227 AS_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]),[
229 TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }AmiSSL"
233 dnl Default to no CA bundle
236 AS_HELP_STRING([--with-ssl=PATH],[old version of --with-openssl])
237 AS_HELP_STRING([--without-ssl], [build without any TLS library]),[
240 if test X"$withval" != Xno; then
241 TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
247 AC_ARG_WITH(openssl,dnl
248 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]),[
250 if test X"$withval" != Xno; then
251 TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
256 AC_ARG_WITH(gnutls,dnl
257 AS_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]),[
259 if test X"$withval" != Xno; then
260 TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }GnuTLS"
265 AC_ARG_WITH(mbedtls,dnl
266 AS_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root]),[
268 if test X"$withval" != Xno; then
269 TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }mbedTLS"
274 AC_ARG_WITH(wolfssl,dnl
275 AS_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)]),[
277 if test X"$withval" != Xno; then
278 TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }wolfSSL"
283 AC_ARG_WITH(bearssl,dnl
284 AS_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root]),[
286 if test X"$withval" != Xno; then
287 TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }BearSSL"
292 AC_ARG_WITH(rustls,dnl
293 AS_HELP_STRING([--with-rustls=PATH],[where to look for rustls, PATH points to the installation root]),[
295 if test X"$withval" != Xno; then
296 TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }rustls"
297 experimental="$experimental rustls"
302 AC_ARG_WITH(test-nghttpx,dnl
303 AS_HELP_STRING([--with-test-nghttpx=PATH],[where to find nghttpx for testing]),
304 TEST_NGHTTPX=$withval
305 if test X"$OPT_TEST_NGHTTPX" = "Xno" ; then
309 AC_SUBST(TEST_NGHTTPX)
312 AC_ARG_WITH(test-caddy,dnl
313 AS_HELP_STRING([--with-test-caddy=PATH],[where to find caddy for testing]),
315 if test X"$OPT_CADDY" = "Xno" ; then
321 dnl we'd like a httpd+apachectl as test server
323 HTTPD_ENABLED="maybe"
324 AC_ARG_WITH(test-httpd, [AS_HELP_STRING([--with-test-httpd=PATH],
325 [where to find httpd/apache2 for testing])],
326 [request_httpd=$withval], [request_httpd=check])
327 if test x"$request_httpd" = "xcheck" -o x"$request_httpd" = "xyes"; then
328 if test -x "/usr/sbin/apache2" -a -x "/usr/sbin/apache2ctl"; then
329 # common location on distros (debian/ubuntu)
330 HTTPD="/usr/sbin/apache2"
331 APACHECTL="/usr/sbin/apache2ctl"
332 AC_PATH_PROG([APXS], [apxs])
333 if test "x$APXS" = "x"; then
334 AC_MSG_NOTICE([apache2-dev not installed, httpd tests disabled])
338 AC_PATH_PROG([HTTPD], [httpd])
339 if test "x$HTTPD" = "x"; then
340 AC_PATH_PROG([HTTPD], [apache2])
342 AC_PATH_PROG([APACHECTL], [apachectl])
343 AC_PATH_PROG([APXS], [apxs])
344 if test "x$HTTPD" = "x" -o "x$APACHECTL" = "x"; then
345 AC_MSG_NOTICE([httpd/apache2 not in PATH, http tests disabled])
348 if test "x$APXS" = "x"; then
349 AC_MSG_NOTICE([apxs not in PATH, http tests disabled])
353 elif test x"$request_httpd" != "xno"; then
354 HTTPD="${request_httpd}/bin/httpd"
355 APACHECTL="${request_httpd}/bin/apachectl"
356 APXS="${request_httpd}/bin/apxs"
357 if test ! -x "${HTTPD}"; then
358 AC_MSG_NOTICE([httpd not found as ${HTTPD}, http tests disabled])
360 elif test ! -x "${APACHECTL}"; then
361 AC_MSG_NOTICE([apachectl not found as ${APACHECTL}, http tests disabled])
363 elif test ! -x "${APXS}"; then
364 AC_MSG_NOTICE([apxs not found as ${APXS}, http tests disabled])
367 AC_MSG_NOTICE([using HTTPD=$HTTPD for tests])
370 if test x"$HTTPD_ENABLED" = "xno"; then
379 dnl the nghttpx we might use in httpd testing
380 if test "x$TEST_NGHTTPX" != "x" -a "x$TEST_NGHTTPX" != "xnghttpx"; then
381 HTTPD_NGHTTPX="$TEST_NGHTTPX"
383 AC_PATH_PROG([HTTPD_NGHTTPX], [nghttpx], [],
384 [$PATH:/usr/bin:/usr/local/bin])
386 AC_SUBST(HTTPD_NGHTTPX)
388 dnl the Caddy server we might use in testing
389 if test "x$TEST_CADDY" != "x"; then
392 AC_PATH_PROG([CADDY], [caddy])
396 dnl If no TLS choice has been made, check if it was explicitly disabled or
397 dnl error out to force the user to decide.
398 if test -z "$TLSCHOICE"; then
399 if test "x$OPT_SSL" != "xno"; then
400 AC_MSG_ERROR([select TLS backend(s) or disable TLS with --without-ssl.
408 --with-openssl (also works for BoringSSL and libressl)
411 --with-secure-transport
417 AC_ARG_WITH(darwinssl,,
418 AC_MSG_ERROR([--with-darwin-ssl and --without-darwin-ssl no longer work!]))
421 dnl Detect the canonical host and target build environment
425 dnl Get system canonical name
426 AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
428 # Silence warning: ar: 'u' modifier ignored since 'D' is the default
429 AC_SUBST(AR_FLAGS, [cr])
431 dnl This defines _ALL_SOURCE for AIX
432 CURL_CHECK_AIX_ALL_SOURCE
434 dnl Our configure and build reentrant settings
435 CURL_CONFIGURE_THREAD_SAFE
436 CURL_CONFIGURE_REENTRANT
438 dnl check for how to do large files
443 LT_LANG([Windows Resource])
446 # Automake conditionals based on libtool related checks
449 AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSION_INFO],
450 [test "x$xc_lt_shlib_use_version_info" = 'xyes'])
451 AM_CONDITIONAL([CURL_LT_SHLIB_USE_NO_UNDEFINED],
452 [test "x$xc_lt_shlib_use_no_undefined" = 'xyes'])
453 AM_CONDITIONAL([CURL_LT_SHLIB_USE_MIMPURE_TEXT],
454 [test "x$xc_lt_shlib_use_mimpure_text" = 'xyes'])
457 # Due to libtool and automake machinery limitations of not allowing
458 # specifying separate CPPFLAGS or CFLAGS when compiling objects for
459 # inclusion of these in shared or static libraries, we are forced to
460 # build using separate configure runs for shared and static libraries
461 # on systems where different CPPFLAGS or CFLAGS are mandatory in order
462 # to compile objects for each kind of library. Notice that relying on
463 # the '-DPIC' CFLAG that libtool provides is not valid given that the
464 # user might for example choose to build static libraries with PIC.
468 # Make our Makefile.am files use the staticlib CPPFLAG only when strictly
469 # targeting a static library and not building its shared counterpart.
472 AM_CONDITIONAL([USE_CPPFLAG_CURL_STATICLIB],
473 [test "x$xc_lt_build_static_only" = 'xyes'])
476 # Make staticlib CPPFLAG variable and its definition visible in output
477 # files unconditionally, providing an empty definition unless strictly
478 # targeting a static library and not building its shared counterpart.
481 CPPFLAG_CURL_STATICLIB=
482 if test "x$xc_lt_build_static_only" = 'xyes'; then
483 CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB'
485 AC_SUBST([CPPFLAG_CURL_STATICLIB])
488 # Determine whether all dependent libraries must be specified when linking
489 if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
495 AC_SUBST(REQUIRE_LIB_DEPS)
496 AM_CONDITIONAL(USE_EXPLICIT_LIB_DEPS, test x$REQUIRE_LIB_DEPS = xyes)
498 dnl check if there's a way to force code inline
501 dnl **********************************************************************
502 dnl platform/compiler/architecture specific checks/flags
503 dnl **********************************************************************
506 CURL_SET_COMPILER_BASIC_OPTS
507 CURL_SET_COMPILER_DEBUG_OPTS
508 CURL_SET_COMPILER_OPTIMIZE_OPTS
509 CURL_SET_COMPILER_WARNING_OPTS
511 if test "$compiler_id" = "INTEL_UNIX_C"; then
513 if test "$compiler_num" -ge "1000"; then
514 dnl icc 10.X or later
515 CFLAGS="$CFLAGS -shared-intel"
516 elif test "$compiler_num" -ge "900"; then
518 CFLAGS="$CFLAGS -i-dynamic"
524 if test X"$want_werror" = Xyes; then
525 CURL_CFLAG_EXTRAS="-Werror"
526 if test "$compiler_id" = "GNU_C"; then
527 dnl enable -pedantic-errors for GCC 5 and later,
528 dnl as before that it was the same as -Werror=pedantic
529 if test "$compiler_num" -ge "500"; then
530 CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors"
534 AC_SUBST(CURL_CFLAG_EXTRAS)
536 CURL_CHECK_COMPILER_HALT_ON_ERROR
537 CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
538 CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
539 CURL_CHECK_COMPILER_SYMBOL_HIDING
542 AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
544 supports_unittests=yes
545 # cross-compilation of unit tests static library/programs fails when
546 # libcurl shared library is built. This might be due to a libtool or
547 # automake issue. In this case we disable unit tests.
548 if test "x$cross_compiling" != "xno" &&
549 test "x$enable_shared" != "xno"; then
550 supports_unittests=no
553 # IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
554 # a problem related with OpenSSL headers and library versions not matching.
555 # Disable unit tests while time to further investigate this is found.
558 if test "$compiler_id" = "GNU_C"; then
559 supports_unittests=no
564 # All AIX autobuilds fails unit tests linking against unittests library
565 # due to unittests library being built with no symbols or members. Libtool ?
566 # Disable unit tests while time to further investigate this is found.
569 supports_unittests=no
573 dnl Build unit tests when option --enable-debug is given.
574 if test "x$want_debug" = "xyes" &&
575 test "x$supports_unittests" = "xyes"; then
580 AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes)
582 dnl **********************************************************************
583 dnl Compilation based checks should not be done before this point.
584 dnl **********************************************************************
586 dnl **********************************************************************
587 dnl Make sure that our checks for headers windows.h winsock2.h
588 dnl and ws2tcpip.h take precedence over any other further checks which
589 dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
590 dnl this specific header files. And do them before its results are used.
591 dnl **********************************************************************
593 CURL_CHECK_HEADER_WINDOWS
594 CURL_CHECK_NATIVE_WINDOWS
595 case X-"$curl_cv_native_windows" in
597 CURL_CHECK_HEADER_WINSOCK2
598 CURL_CHECK_HEADER_WS2TCPIP
601 curl_cv_header_winsock2_h="no"
602 curl_cv_header_ws2tcpip_h="no"
605 CURL_CHECK_WIN32_LARGEFILE
606 CURL_CHECK_WIN32_CRYPTO
609 CURL_DARWIN_SYSTEMCONFIGURATION
610 CURL_SUPPORTS_BUILTIN_AVAILABLE
612 AM_CONDITIONAL([HAVE_WINDRES],
613 [test "$curl_cv_native_windows" = "yes" && test -n "${RC}"])
615 if test "$curl_cv_native_windows" = "yes"; then
616 AM_COND_IF([HAVE_WINDRES],,
617 [AC_MSG_ERROR([windres not found in PATH. Windows builds require windres. Cannot continue.])])
620 dnl ************************************************************
621 dnl switch off particular protocols
623 AC_MSG_CHECKING([whether to support http])
625 AS_HELP_STRING([--enable-http],[Enable HTTP support])
626 AS_HELP_STRING([--disable-http],[Disable HTTP support]),
627 [ case "$enableval" in
630 AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP])
632 AC_MSG_WARN([disable HTTP disables FTP over proxy and RTSP])
633 AC_SUBST(CURL_DISABLE_HTTP, [1])
634 AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
635 AC_SUBST(CURL_DISABLE_RTSP, [1])
636 dnl toggle off alt-svc too when HTTP is disabled
637 AC_DEFINE(CURL_DISABLE_ALTSVC, 1, [disable alt-svc])
638 AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable HSTS])
639 curl_h1_msg="no (--enable-http, --with-hyper)"
640 curl_altsvc_msg="no";
641 curl_hsts_msg="no (--enable-hsts)";
645 *) AC_MSG_RESULT(yes)
650 AC_MSG_CHECKING([whether to support ftp])
652 AS_HELP_STRING([--enable-ftp],[Enable FTP support])
653 AS_HELP_STRING([--disable-ftp],[Disable FTP support]),
654 [ case "$enableval" in
657 AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP])
658 AC_SUBST(CURL_DISABLE_FTP, [1])
660 *) AC_MSG_RESULT(yes)
665 AC_MSG_CHECKING([whether to support file])
667 AS_HELP_STRING([--enable-file],[Enable FILE support])
668 AS_HELP_STRING([--disable-file],[Disable FILE support]),
669 [ case "$enableval" in
672 AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE])
673 AC_SUBST(CURL_DISABLE_FILE, [1])
675 *) AC_MSG_RESULT(yes)
680 AC_MSG_CHECKING([whether to support ldap])
682 AS_HELP_STRING([--enable-ldap],[Enable LDAP support])
683 AS_HELP_STRING([--disable-ldap],[Disable LDAP support]),
684 [ case "$enableval" in
687 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
688 AC_SUBST(CURL_DISABLE_LDAP, [1])
700 AC_MSG_CHECKING([whether to support ldaps])
702 AS_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
703 AS_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
704 [ case "$enableval" in
707 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
708 AC_SUBST(CURL_DISABLE_LDAPS, [1])
710 *) if test "x$CURL_DISABLE_LDAP" = "x1" ; then
711 AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS)
712 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
713 AC_SUBST(CURL_DISABLE_LDAPS, [1])
716 AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
717 AC_SUBST(HAVE_LDAP_SSL, [1])
721 if test "x$CURL_DISABLE_LDAP" = "x1" ; then
723 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
724 AC_SUBST(CURL_DISABLE_LDAPS, [1])
727 AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
728 AC_SUBST(HAVE_LDAP_SSL, [1])
732 dnl **********************************************************************
734 dnl **********************************************************************
739 AS_HELP_STRING([--with-hyper=PATH],[Enable hyper usage])
740 AS_HELP_STRING([--without-hyper],[Disable hyper usage]),
741 [OPT_HYPER=$withval])
744 dnl --without-hyper option used
748 dnl --with-hyper option used without path
753 dnl --with-hyper option used with path
755 want_hyper_path="$withval"
759 if test X"$want_hyper" != Xno; then
760 if test "x$disable_http" = "xyes"; then
761 AC_MSG_ERROR([--with-hyper is not compatible with --disable-http])
764 dnl backup the pre-hyper variables
765 CLEANLDFLAGS="$LDFLAGS"
766 CLEANCPPFLAGS="$CPPFLAGS"
769 CURL_CHECK_PKGCONFIG(hyper, $want_hyper_path)
771 if test "$PKGCONFIG" != "no" ; then
772 LIB_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
773 $PKGCONFIG --libs-only-l hyper`
774 CPP_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path]) dnl
775 $PKGCONFIG --cflags-only-I hyper`
776 LD_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
777 $PKGCONFIG --libs-only-L hyper`
779 dnl no hyper pkg-config found
780 LIB_HYPER="-lhyper -ldl -lpthread -lm"
781 if test X"$want_hyper" != Xdefault; then
782 CPP_HYPER=-I"$want_hyper_path/capi/include"
783 LD_HYPER="-L$want_hyper_path/target/release -L$want_hyper_path/target/debug"
786 if test -n "$LIB_HYPER"; then
787 AC_MSG_NOTICE([-l is $LIB_HYPER])
788 AC_MSG_NOTICE([-I is $CPP_HYPER])
789 AC_MSG_NOTICE([-L is $LD_HYPER])
791 LDFLAGS="$LDFLAGS $LD_HYPER"
792 CPPFLAGS="$CPPFLAGS $CPP_HYPER"
793 LIBS="$LIB_HYPER $LIBS"
795 if test "x$cross_compiling" != "xyes"; then
796 dnl remove -L, separate with colon if more than one
797 DIR_HYPER=`echo $LD_HYPER | $SED -e 's/^-L//' -e 's/ -L/:/g'`
800 AC_CHECK_LIB(hyper, hyper_io_new,
802 AC_CHECK_HEADERS(hyper.h,
803 experimental="$experimental Hyper"
804 AC_MSG_NOTICE([Hyper support is experimental])
805 curl_h1_msg="enabled (Hyper)"
807 AC_DEFINE(USE_HYPER, 1, [if hyper is in use])
808 AC_SUBST(USE_HYPER, [1])
809 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_HYPER"
810 export CURL_LIBRARY_PATH
811 AC_MSG_NOTICE([Added $DIR_HYPER to CURL_LIBRARY_PATH]),
814 for d in `echo $DIR_HYPER | $SED -e 's/:/ /'`; do
815 if test -f "$d/libhyper.a"; then
816 AC_MSG_ERROR([hyper was found in $d but was probably built with wrong flags. See docs/HYPER.md.])
819 AC_MSG_ERROR([--with-hyper but hyper was not found. See docs/HYPER.md.])
824 if test X"$want_hyper" != Xno; then
825 AC_MSG_NOTICE([Disable RTSP support with hyper])
826 AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
827 AC_SUBST(CURL_DISABLE_RTSP, [1])
829 AC_MSG_CHECKING([whether to support rtsp])
831 AS_HELP_STRING([--enable-rtsp],[Enable RTSP support])
832 AS_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
833 [ case "$enableval" in
836 AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
837 AC_SUBST(CURL_DISABLE_RTSP, [1])
840 if test x$CURL_DISABLE_HTTP = x1 ; then
841 AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
844 curl_rtsp_msg="enabled"
848 if test "x$CURL_DISABLE_HTTP" != "x1"; then
850 curl_rtsp_msg="enabled"
857 AC_MSG_CHECKING([whether to support proxies])
859 AS_HELP_STRING([--enable-proxy],[Enable proxy support])
860 AS_HELP_STRING([--disable-proxy],[Disable proxy support]),
861 [ case "$enableval" in
864 AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies])
865 AC_SUBST(CURL_DISABLE_PROXY, [1])
868 *) AC_MSG_RESULT(yes)
874 AC_MSG_CHECKING([whether to support dict])
876 AS_HELP_STRING([--enable-dict],[Enable DICT support])
877 AS_HELP_STRING([--disable-dict],[Disable DICT support]),
878 [ case "$enableval" in
881 AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT])
882 AC_SUBST(CURL_DISABLE_DICT, [1])
884 *) AC_MSG_RESULT(yes)
889 AC_MSG_CHECKING([whether to support telnet])
890 AC_ARG_ENABLE(telnet,
891 AS_HELP_STRING([--enable-telnet],[Enable TELNET support])
892 AS_HELP_STRING([--disable-telnet],[Disable TELNET support]),
893 [ case "$enableval" in
896 AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
897 AC_SUBST(CURL_DISABLE_TELNET, [1])
899 *) AC_MSG_RESULT(yes)
904 AC_MSG_CHECKING([whether to support tftp])
906 AS_HELP_STRING([--enable-tftp],[Enable TFTP support])
907 AS_HELP_STRING([--disable-tftp],[Disable TFTP support]),
908 [ case "$enableval" in
911 AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP])
912 AC_SUBST(CURL_DISABLE_TFTP, [1])
914 *) AC_MSG_RESULT(yes)
920 AC_MSG_CHECKING([whether to support pop3])
922 AS_HELP_STRING([--enable-pop3],[Enable POP3 support])
923 AS_HELP_STRING([--disable-pop3],[Disable POP3 support]),
924 [ case "$enableval" in
927 AC_DEFINE(CURL_DISABLE_POP3, 1, [to disable POP3])
928 AC_SUBST(CURL_DISABLE_POP3, [1])
930 *) AC_MSG_RESULT(yes)
937 AC_MSG_CHECKING([whether to support imap])
939 AS_HELP_STRING([--enable-imap],[Enable IMAP support])
940 AS_HELP_STRING([--disable-imap],[Disable IMAP support]),
941 [ case "$enableval" in
944 AC_DEFINE(CURL_DISABLE_IMAP, 1, [to disable IMAP])
945 AC_SUBST(CURL_DISABLE_IMAP, [1])
947 *) AC_MSG_RESULT(yes)
954 AC_MSG_CHECKING([whether to support smb])
956 AS_HELP_STRING([--enable-smb],[Enable SMB/CIFS support])
957 AS_HELP_STRING([--disable-smb],[Disable SMB/CIFS support]),
958 [ case "$enableval" in
961 AC_DEFINE(CURL_DISABLE_SMB, 1, [to disable SMB/CIFS])
962 AC_SUBST(CURL_DISABLE_SMB, [1])
964 *) AC_MSG_RESULT(yes)
970 AC_MSG_CHECKING([whether to support smtp])
972 AS_HELP_STRING([--enable-smtp],[Enable SMTP support])
973 AS_HELP_STRING([--disable-smtp],[Disable SMTP support]),
974 [ case "$enableval" in
977 AC_DEFINE(CURL_DISABLE_SMTP, 1, [to disable SMTP])
978 AC_SUBST(CURL_DISABLE_SMTP, [1])
980 *) AC_MSG_RESULT(yes)
986 AC_MSG_CHECKING([whether to support gopher])
987 AC_ARG_ENABLE(gopher,
988 AS_HELP_STRING([--enable-gopher],[Enable Gopher support])
989 AS_HELP_STRING([--disable-gopher],[Disable Gopher support]),
990 [ case "$enableval" in
993 AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher])
994 AC_SUBST(CURL_DISABLE_GOPHER, [1])
996 *) AC_MSG_RESULT(yes)
1002 AC_MSG_CHECKING([whether to support mqtt])
1004 AS_HELP_STRING([--enable-mqtt],[Enable MQTT support])
1005 AS_HELP_STRING([--disable-mqtt],[Disable MQTT support]),
1006 [ case "$enableval" in
1009 AC_DEFINE(CURL_DISABLE_MQTT, 1, [to disable MQTT])
1010 AC_SUBST(CURL_DISABLE_MQTT, [1])
1012 *) AC_MSG_RESULT(yes)
1018 dnl **********************************************************************
1019 dnl Check for built-in manual
1020 dnl **********************************************************************
1022 AC_MSG_CHECKING([whether to provide built-in manual])
1023 AC_ARG_ENABLE(manual,
1024 AS_HELP_STRING([--enable-manual],[Enable built-in manual])
1025 AS_HELP_STRING([--disable-manual],[Disable built-in manual]),
1026 [ case "$enableval" in
1030 *) AC_MSG_RESULT(yes)
1037 dnl The actual use of the USE_MANUAL variable is done much later in this
1038 dnl script to allow other actions to disable it as well.
1040 dnl ************************************************************
1041 dnl disable C code generation support
1043 AC_MSG_CHECKING([whether to enable generation of C code])
1044 AC_ARG_ENABLE(libcurl_option,
1045 AS_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
1046 AS_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
1047 [ case "$enableval" in
1050 AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option])
1051 curl_libcurl_msg="no"
1053 *) AC_MSG_RESULT(yes)
1059 dnl **********************************************************************
1060 dnl Checks for libraries.
1061 dnl **********************************************************************
1063 AC_MSG_CHECKING([whether to use libgcc])
1064 AC_ARG_ENABLE(libgcc,
1065 AS_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
1066 [ case "$enableval" in
1071 *) AC_MSG_RESULT(no)
1079 dnl gethostbyname without lib or in the nsl lib?
1080 AC_CHECK_FUNC(gethostbyname,
1081 [HAVE_GETHOSTBYNAME="1"
1083 [ AC_CHECK_LIB(nsl, gethostbyname,
1084 [HAVE_GETHOSTBYNAME="1"
1089 if test "$HAVE_GETHOSTBYNAME" != "1"
1091 dnl gethostbyname in the socket lib?
1092 AC_CHECK_LIB(socket, gethostbyname,
1093 [HAVE_GETHOSTBYNAME="1"
1094 LIBS="-lsocket $LIBS"
1098 if test "$HAVE_GETHOSTBYNAME" != "1"
1100 dnl gethostbyname in the watt lib?
1101 AC_CHECK_LIB(watt, gethostbyname,
1102 [HAVE_GETHOSTBYNAME="1"
1103 CPPFLAGS="-I/dev/env/WATT_ROOT/inc"
1104 LDFLAGS="-L/dev/env/WATT_ROOT/lib"
1109 dnl At least one system has been identified to require BOTH nsl and socket
1110 dnl libs at the same time to link properly.
1111 if test "$HAVE_GETHOSTBYNAME" != "1"
1113 AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
1114 my_ac_save_LIBS=$LIBS
1115 LIBS="-lnsl -lsocket $LIBS"
1122 AC_MSG_RESULT([yes])
1123 HAVE_GETHOSTBYNAME="1"
1126 LIBS=$my_ac_save_LIBS
1130 if test "$HAVE_GETHOSTBYNAME" != "1"
1132 dnl This is for winsock systems
1133 if test "$curl_cv_header_windows_h" = "yes"; then
1134 if test "$curl_cv_header_winsock2_h" = "yes"; then
1135 winsock_LIB="-lws2_32"
1137 if test ! -z "$winsock_LIB"; then
1138 my_ac_save_LIBS=$LIBS
1139 LIBS="$winsock_LIB $LIBS"
1140 AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
1143 #ifdef HAVE_WINDOWS_H
1144 #ifndef WIN32_LEAN_AND_MEAN
1145 #define WIN32_LEAN_AND_MEAN
1147 #ifdef HAVE_WINSOCK2_H
1148 #include <winsock2.h>
1150 #include <windows.h>
1153 gethostbyname("localhost");
1156 AC_MSG_RESULT([yes])
1157 HAVE_GETHOSTBYNAME="1"
1161 LIBS=$my_ac_save_LIBS
1167 if test "$HAVE_GETHOSTBYNAME" != "1"
1169 dnl This is for Minix 3.1
1170 AC_MSG_CHECKING([for gethostbyname for Minix 3])
1173 /* Older Minix versions may need <net/gen/netdb.h> here instead */
1176 gethostbyname("localhost");
1179 AC_MSG_RESULT([yes])
1180 HAVE_GETHOSTBYNAME="1"
1186 if test "$HAVE_GETHOSTBYNAME" != "1"
1188 dnl This is for eCos with a stubbed DNS implementation
1189 AC_MSG_CHECKING([for gethostbyname for eCos])
1195 gethostbyname("localhost");
1198 AC_MSG_RESULT([yes])
1199 HAVE_GETHOSTBYNAME="1"
1205 if test "$HAVE_GETHOSTBYNAME" != "1" -o "${with_amissl+set}" = set
1207 dnl This is for AmigaOS with bsdsocket.library - needs testing before -lnet
1208 AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library])
1211 #define __USE_INLINE__
1212 #include <proto/bsdsocket.h>
1214 struct SocketIFace *ISocket = NULL;
1216 struct Library *SocketBase = NULL;
1219 gethostbyname("localhost");
1222 AC_MSG_RESULT([yes])
1223 HAVE_GETHOSTBYNAME="1"
1224 HAVE_PROTO_BSDSOCKET_H="1"
1225 AC_DEFINE(HAVE_PROTO_BSDSOCKET_H, 1, [if Amiga bsdsocket.library is in use])
1226 AC_SUBST(HAVE_PROTO_BSDSOCKET_H, [1])
1232 if test "$HAVE_GETHOSTBYNAME" != "1"
1234 dnl gethostbyname in the network lib - for Haiku OS
1235 AC_CHECK_LIB(network, gethostbyname,
1236 [HAVE_GETHOSTBYNAME="1"
1237 LIBS="-lnetwork $LIBS"
1241 if test "$HAVE_GETHOSTBYNAME" != "1"; then
1242 AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
1245 CURL_CHECK_LIBS_CONNECT
1247 CURL_NETWORK_LIBS=$LIBS
1249 dnl **********************************************************************
1250 dnl In case that function clock_gettime with monotonic timer is available,
1251 dnl check for additional required libraries.
1252 dnl **********************************************************************
1253 CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
1255 dnl Check for even better option
1256 CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC_RAW
1258 dnl **********************************************************************
1259 dnl The preceding library checks are all potentially useful for test
1260 dnl servers and libtest cases which require networking and clock_gettime
1261 dnl support. Save the list of required libraries at this point for use
1262 dnl while linking those test servers and programs.
1263 dnl **********************************************************************
1264 CURL_NETWORK_AND_TIME_LIBS=$LIBS
1266 dnl **********************************************************************
1267 dnl Check for the presence of ZLIB libraries and headers
1268 dnl **********************************************************************
1270 dnl Check for & handle argument to --with-zlib.
1272 clean_CPPFLAGS=$CPPFLAGS
1273 clean_LDFLAGS=$LDFLAGS
1277 AS_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
1278 AS_HELP_STRING([--without-zlib],[disable use of zlib]),
1279 [OPT_ZLIB="$withval"])
1281 if test "$OPT_ZLIB" = "no" ; then
1282 AC_MSG_WARN([zlib disabled])
1284 if test "$OPT_ZLIB" = "yes" ; then
1288 if test -z "$OPT_ZLIB" ; then
1289 CURL_CHECK_PKGCONFIG(zlib)
1291 if test "$PKGCONFIG" != "no" ; then
1292 ZLIB_LIBS="`$PKGCONFIG --libs-only-l zlib`"
1293 if test -n "$ZLIB_LIBS"; then
1294 LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`"
1296 ZLIB_LIBS="`$PKGCONFIG --libs zlib`"
1298 LIBS="$ZLIB_LIBS $LIBS"
1299 CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags zlib`"
1304 if test -z "$HAVE_LIBZ"; then
1306 dnl Check for the lib without setting any new path, since many
1307 dnl people have it in the default path
1309 AC_CHECK_LIB(z, inflateEnd,
1310 dnl libz found, set the variable
1313 LIBS="$ZLIB_LIBS $LIBS"],
1314 dnl if no lib found, try /usr/local
1315 [OPT_ZLIB="/usr/local"])
1319 dnl Add a nonempty path to the compiler flags
1320 if test -n "$OPT_ZLIB"; then
1321 CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
1322 LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
1325 AC_CHECK_HEADER(zlib.h,
1327 dnl zlib.h was found
1329 dnl if the lib wasn't found already, try again with the new paths
1330 if test "$HAVE_LIBZ" != "1"; then
1331 AC_CHECK_LIB(z, gzread,
1333 dnl the lib was found!
1336 LIBS="$ZLIB_LIBS $LIBS"
1338 [ CPPFLAGS=$clean_CPPFLAGS
1339 LDFLAGS=$clean_LDFLAGS])
1343 dnl zlib.h was not found, restore the flags
1344 CPPFLAGS=$clean_CPPFLAGS
1345 LDFLAGS=$clean_LDFLAGS]
1348 if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
1350 AC_MSG_WARN([configure found only the libz lib, not the header file!])
1352 CPPFLAGS=$clean_CPPFLAGS
1353 LDFLAGS=$clean_LDFLAGS
1356 elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
1358 AC_MSG_WARN([configure found only the libz header file, not the lib!])
1359 CPPFLAGS=$clean_CPPFLAGS
1360 LDFLAGS=$clean_LDFLAGS
1363 elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
1365 dnl both header and lib were found!
1367 AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
1368 LIBS="$ZLIB_LIBS $clean_LIBS"
1370 dnl replace 'HAVE_LIBZ' in the automake makefile.ams
1372 AC_MSG_NOTICE([found both libz and libz.h header])
1373 curl_zlib_msg="enabled"
1377 dnl set variable for use in automakefile(s)
1378 AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
1381 dnl **********************************************************************
1382 dnl Check for the presence of BROTLI decoder libraries and headers
1383 dnl **********************************************************************
1385 dnl Brotli project home page: https://github.com/google/brotli
1387 dnl Default to compiler & linker defaults for BROTLI files & libraries.
1389 AC_ARG_WITH(brotli,dnl
1390 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])
1391 AS_HELP_STRING([--without-brotli], [disable BROTLI]),
1392 OPT_BROTLI=$withval)
1394 if test X"$OPT_BROTLI" != Xno; then
1395 dnl backup the pre-brotli variables
1396 CLEANLDFLAGS="$LDFLAGS"
1397 CLEANCPPFLAGS="$CPPFLAGS"
1400 case "$OPT_BROTLI" in
1402 dnl --with-brotli (without path) used
1403 CURL_CHECK_PKGCONFIG(libbrotlidec)
1405 if test "$PKGCONFIG" != "no" ; then
1406 LIB_BROTLI=`$PKGCONFIG --libs-only-l libbrotlidec`
1407 LD_BROTLI=`$PKGCONFIG --libs-only-L libbrotlidec`
1408 CPP_BROTLI=`$PKGCONFIG --cflags-only-I libbrotlidec`
1409 version=`$PKGCONFIG --modversion libbrotlidec`
1410 DIR_BROTLI=`echo $LD_BROTLI | $SED -e 's/^-L//'`
1415 dnl no --with-brotli option given, just check default places
1418 dnl use the given --with-brotli spot
1419 PREFIX_BROTLI=$OPT_BROTLI
1423 dnl if given with a prefix, we set -L and -I based on that
1424 if test -n "$PREFIX_BROTLI"; then
1425 LIB_BROTLI="-lbrotlidec"
1426 LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff
1427 CPP_BROTLI=-I${PREFIX_BROTLI}/include
1428 DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff
1431 LDFLAGS="$LDFLAGS $LD_BROTLI"
1432 CPPFLAGS="$CPPFLAGS $CPP_BROTLI"
1433 LIBS="$LIB_BROTLI $LIBS"
1435 AC_CHECK_LIB(brotlidec, BrotliDecoderDecompress)
1437 AC_CHECK_HEADERS(brotli/decode.h,
1438 curl_brotli_msg="enabled (libbrotlidec)"
1440 AC_DEFINE(HAVE_BROTLI, 1, [if BROTLI is in use])
1441 AC_SUBST(HAVE_BROTLI, [1])
1444 if test X"$OPT_BROTLI" != Xoff &&
1445 test "$HAVE_BROTLI" != "1"; then
1446 AC_MSG_ERROR([BROTLI libs and/or directories were not found where specified!])
1449 if test "$HAVE_BROTLI" = "1"; then
1450 if test -n "$DIR_BROTLI"; then
1451 dnl when the brotli shared libs were found in a path that the run-time
1452 dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
1453 dnl to prevent further configure tests to fail due to this
1455 if test "x$cross_compiling" != "xyes"; then
1456 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_BROTLI"
1457 export CURL_LIBRARY_PATH
1458 AC_MSG_NOTICE([Added $DIR_BROTLI to CURL_LIBRARY_PATH])
1462 dnl no brotli, revert back to clean variables
1463 LDFLAGS=$CLEANLDFLAGS
1464 CPPFLAGS=$CLEANCPPFLAGS
1469 dnl **********************************************************************
1470 dnl Check for libzstd
1471 dnl **********************************************************************
1473 dnl Default to compiler & linker defaults for libzstd
1475 AC_ARG_WITH(zstd,dnl
1476 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])
1477 AS_HELP_STRING([--without-zstd], [disable libzstd]),
1480 if test X"$OPT_ZSTD" != Xno; then
1481 dnl backup the pre-zstd variables
1482 CLEANLDFLAGS="$LDFLAGS"
1483 CLEANCPPFLAGS="$CPPFLAGS"
1488 dnl --with-zstd (without path) used
1489 CURL_CHECK_PKGCONFIG(libzstd)
1491 if test "$PKGCONFIG" != "no" ; then
1492 LIB_ZSTD=`$PKGCONFIG --libs-only-l libzstd`
1493 LD_ZSTD=`$PKGCONFIG --libs-only-L libzstd`
1494 CPP_ZSTD=`$PKGCONFIG --cflags-only-I libzstd`
1495 version=`$PKGCONFIG --modversion libzstd`
1496 DIR_ZSTD=`echo $LD_ZSTD | $SED -e 's/-L//'`
1501 dnl no --with-zstd option given, just check default places
1504 dnl use the given --with-zstd spot
1505 PREFIX_ZSTD=$OPT_ZSTD
1509 dnl if given with a prefix, we set -L and -I based on that
1510 if test -n "$PREFIX_ZSTD"; then
1512 LD_ZSTD=-L${PREFIX_ZSTD}/lib$libsuff
1513 CPP_ZSTD=-I${PREFIX_ZSTD}/include
1514 DIR_ZSTD=${PREFIX_ZSTD}/lib$libsuff
1517 LDFLAGS="$LDFLAGS $LD_ZSTD"
1518 CPPFLAGS="$CPPFLAGS $CPP_ZSTD"
1519 LIBS="$LIB_ZSTD $LIBS"
1521 AC_CHECK_LIB(zstd, ZSTD_createDStream)
1523 AC_CHECK_HEADERS(zstd.h,
1524 curl_zstd_msg="enabled (libzstd)"
1526 AC_DEFINE(HAVE_ZSTD, 1, [if libzstd is in use])
1527 AC_SUBST(HAVE_ZSTD, [1])
1530 if test X"$OPT_ZSTD" != Xoff &&
1531 test "$HAVE_ZSTD" != "1"; then
1532 AC_MSG_ERROR([libzstd was not found where specified!])
1535 if test "$HAVE_ZSTD" = "1"; then
1536 if test -n "$DIR_ZSTD"; then
1537 dnl when the zstd shared lib were found in a path that the run-time
1538 dnl linker doesn't search through, we need to add it to
1539 dnl CURL_LIBRARY_PATH to prevent further configure tests to fail due to
1542 if test "x$cross_compiling" != "xyes"; then
1543 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_ZSTD"
1544 export CURL_LIBRARY_PATH
1545 AC_MSG_NOTICE([Added $DIR_ZSTD to CURL_LIBRARY_PATH])
1549 dnl no zstd, revert back to clean variables
1550 LDFLAGS=$CLEANLDFLAGS
1551 CPPFLAGS=$CLEANCPPFLAGS
1556 dnl **********************************************************************
1558 dnl **********************************************************************
1561 AC_ARG_WITH(ldap-lib,
1562 AS_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
1563 [LDAPLIBNAME="$withval"])
1566 AC_ARG_WITH(lber-lib,
1567 AS_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
1568 [LBERLIBNAME="$withval"])
1570 if test x$CURL_DISABLE_LDAP != x1 ; then
1572 CURL_CHECK_HEADER_LBER
1573 CURL_CHECK_HEADER_LDAP
1574 CURL_CHECK_HEADER_LDAP_SSL
1576 if test -z "$LDAPLIBNAME" ; then
1577 if test "$curl_cv_native_windows" = "yes"; then
1578 dnl Windows uses a single and unique LDAP library name
1579 LDAPLIBNAME="wldap32"
1584 if test "$LDAPLIBNAME" ; then
1585 AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
1586 if test -n "$ldap_askedfor"; then
1587 AC_MSG_ERROR([couldn't detect the LDAP libraries])
1589 AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
1590 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
1591 AC_SUBST(CURL_DISABLE_LDAP, [1])
1592 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
1593 AC_SUBST(CURL_DISABLE_LDAPS, [1])])
1595 dnl Try to find the right ldap libraries for this system
1596 CURL_CHECK_LIBS_LDAP
1597 case X-"$curl_cv_ldap_LIBS" in
1599 if test -n "$ldap_askedfor"; then
1600 AC_MSG_ERROR([couldn't detect the LDAP libraries])
1602 AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
1603 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
1604 AC_SUBST(CURL_DISABLE_LDAP, [1])
1605 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
1606 AC_SUBST(CURL_DISABLE_LDAPS, [1])
1612 if test x$CURL_DISABLE_LDAP != x1 ; then
1614 if test "$LBERLIBNAME" ; then
1615 dnl If name is "no" then don't define this library at all
1616 dnl (it's only needed if libldap.so's dependencies are broken).
1617 if test "$LBERLIBNAME" != "no" ; then
1618 AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
1619 AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
1620 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
1621 AC_SUBST(CURL_DISABLE_LDAP, [1])
1622 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
1623 AC_SUBST(CURL_DISABLE_LDAPS, [1])])
1628 if test x$CURL_DISABLE_LDAP != x1 ; then
1629 AC_CHECK_FUNCS([ldap_url_parse \
1632 if test "$LDAPLIBNAME" = "wldap32"; then
1633 curl_ldap_msg="enabled (winldap)"
1634 AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation])
1636 if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
1637 curl_ldap_msg="enabled (OpenLDAP)"
1638 AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
1639 AC_SUBST(USE_OPENLDAP, [1])
1641 curl_ldap_msg="enabled (ancient OpenLDAP)"
1646 if test x$CURL_DISABLE_LDAPS != x1 ; then
1647 curl_ldaps_msg="enabled"
1650 dnl **********************************************************************
1652 dnl **********************************************************************
1654 AC_MSG_CHECKING([whether to enable IPv6])
1656 AS_HELP_STRING([--enable-ipv6],[Enable IPv6 (with IPv4) support])
1657 AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
1658 [ case "$enableval" in
1663 *) AC_MSG_RESULT(yes)
1668 AC_RUN_IFELSE([AC_LANG_SOURCE([[
1669 /* are AF_INET6 and sockaddr_in6 available? */
1670 #include <sys/types.h>
1671 #ifdef HAVE_WINSOCK2_H
1672 #include <winsock2.h>
1673 #include <ws2tcpip.h>
1675 #include <sys/socket.h>
1676 #include <netinet/in.h>
1677 #if defined (__TANDEM)
1678 # include <netinet/in6.h>
1681 #include <stdlib.h> /* for exit() */
1684 struct sockaddr_in6 s;
1686 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
1701 if test "$ipv6" = yes; then
1702 curl_ipv6_msg="enabled"
1703 AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
1705 AC_SUBST(IPV6_ENABLED)
1707 AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
1708 AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[
1709 #include <sys/types.h>
1710 #ifdef HAVE_WINSOCK2_H
1711 #include <winsock2.h>
1712 #include <ws2tcpip.h>
1714 #include <netinet/in.h>
1715 #if defined (__TANDEM)
1716 # include <netinet/in6.h>
1720 struct sockaddr_in6 s;
1721 s.sin6_scope_id = 0;
1723 AC_MSG_RESULT([yes])
1724 AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
1730 dnl **********************************************************************
1731 dnl Check if the operating system allows programs to write to their own argv[]
1732 dnl **********************************************************************
1734 AC_MSG_CHECKING([if argv can be written to])
1736 int main(int argc, char **argv)
1739 /* on Windows, writing to the argv does not hide the argument in
1740 process lists so it can just be skipped */
1747 return (argv[0][0] == ' ')?0:1;
1751 curl_cv_writable_argv=yes
1753 curl_cv_writable_argv=no
1755 curl_cv_writable_argv=cross
1757 case $curl_cv_writable_argv in
1759 AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
1767 AC_MSG_WARN([the previous check could not be made default was used])
1771 dnl **********************************************************************
1772 dnl Check for GSS-API libraries
1773 dnl **********************************************************************
1775 dnl check for GSS-API stuff in the /usr as default
1778 AC_ARG_WITH(gssapi-includes,
1779 AS_HELP_STRING([--with-gssapi-includes=DIR],
1780 [Specify location of GSS-API headers]),
1781 [ GSSAPI_INCS="-I$withval"
1785 AC_ARG_WITH(gssapi-libs,
1786 AS_HELP_STRING([--with-gssapi-libs=DIR],
1787 [Specify location of GSS-API libs]),
1788 [ GSSAPI_LIB_DIR="-L$withval"
1793 AS_HELP_STRING([--with-gssapi=DIR],
1794 [Where to look for GSS-API]), [
1795 GSSAPI_ROOT="$withval"
1796 if test x"$GSSAPI_ROOT" != xno; then
1798 if test x"$GSSAPI_ROOT" = xyes; then
1799 dnl if yes, then use default root
1805 : ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
1807 save_CPPFLAGS="$CPPFLAGS"
1808 AC_MSG_CHECKING([if GSS-API support is requested])
1809 if test x"$want_gss" = xyes; then
1812 if test $GSSAPI_ROOT != "/usr"; then
1813 CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig)
1815 CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
1817 if test -z "$GSSAPI_INCS"; then
1818 if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
1819 GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
1820 elif test "$PKGCONFIG" != "no" ; then
1821 GSSAPI_INCS=`$PKGCONFIG --cflags mit-krb5-gssapi`
1822 elif test -f "$KRB5CONFIG"; then
1823 GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
1824 elif test "$GSSAPI_ROOT" != "yes"; then
1825 GSSAPI_INCS="-I$GSSAPI_ROOT/include"
1829 CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
1831 AC_CHECK_HEADER(gss.h,
1833 dnl found in the given dirs
1834 AC_DEFINE(HAVE_GSSGNU, 1, [if you have GNU GSS])
1838 dnl not found, check Heimdal or MIT
1839 AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
1841 [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
1846 #ifdef HAVE_GSSAPI_GSSAPI_H
1847 #include <gssapi/gssapi.h>
1850 if test "x$not_mit" = "x1"; then
1851 dnl MIT not found, check for Heimdal
1852 AC_CHECK_HEADER(gssapi.h,
1855 AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have Heimdal])
1858 dnl no header found, disabling GSS
1860 AC_MSG_WARN(disabling GSS-API support since no header files were found)
1865 AC_DEFINE(HAVE_GSSMIT, 1, [if you have MIT Kerberos])
1866 dnl check if we have a really old MIT Kerberos version (<= 1.2)
1867 AC_MSG_CHECKING([if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE])
1870 #include <gssapi/gssapi.h>
1871 #include <gssapi/gssapi_generic.h>
1872 #include <gssapi/gssapi_krb5.h>
1877 GSS_C_NT_HOSTBASED_SERVICE,
1881 AC_MSG_RESULT([yes])
1884 AC_DEFINE(HAVE_OLD_GSSMIT, 1,
1885 [if you have an old MIT Kerberos version, lacking GSS_C_NT_HOSTBASED_SERVICE])
1893 if test x"$want_gss" = xyes; then
1894 AC_DEFINE(HAVE_GSSAPI, 1, [if you have GSS-API libraries])
1896 curl_gss_msg="enabled (MIT Kerberos/Heimdal)"
1898 if test -n "$gnu_gss"; then
1899 curl_gss_msg="enabled (GNU GSS)"
1900 LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
1902 elif test -z "$GSSAPI_LIB_DIR"; then
1905 LIBS="-lgssapi_krb5 -lresolv $LIBS"
1908 if test $GSSAPI_ROOT != "/usr"; then
1909 CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig)
1911 CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
1913 if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
1914 dnl krb5-config doesn't have --libs-only-L or similar, put everything
1916 gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
1917 LIBS="$gss_libs $LIBS"
1918 elif test "$PKGCONFIG" != "no" ; then
1919 gss_libs=`$PKGCONFIG --libs mit-krb5-gssapi`
1920 LIBS="$gss_libs $LIBS"
1921 elif test -f "$KRB5CONFIG"; then
1922 dnl krb5-config doesn't have --libs-only-L or similar, put everything
1924 gss_libs=`$KRB5CONFIG --libs gssapi`
1925 LIBS="$gss_libs $LIBS"
1932 gss_libname="gssapi"
1936 if test "$GSSAPI_ROOT" != "yes"; then
1937 LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
1938 LIBS="-l$gss_libname $LIBS"
1940 LIBS="-l$gss_libname $LIBS"
1946 LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
1952 LIBS="-lgssapi $LIBS"
1957 CPPFLAGS="$save_CPPFLAGS"
1960 if test x"$want_gss" = xyes; then
1961 AC_MSG_CHECKING([if we can link against GSS-API library])
1963 AC_LANG_FUNC_LINK_TRY([gss_init_sec_context])
1965 AC_MSG_RESULT([yes])
1968 AC_MSG_ERROR([--with-gssapi was specified, but a GSS-API library was not found.])
1973 if test x"$want_gss" = "xyes"; then
1974 build_libstubgss=yes
1977 AM_CONDITIONAL(BUILD_STUB_GSS, test "x$build_libstubgss" = "xyes")
1979 dnl -------------------------------------------------------------
1980 dnl parse --with-default-ssl-backend so it can be validated below
1981 dnl -------------------------------------------------------------
1983 DEFAULT_SSL_BACKEND=no
1984 VALID_DEFAULT_SSL_BACKEND=
1985 AC_ARG_WITH(default-ssl-backend,
1986 AS_HELP_STRING([--with-default-ssl-backend=NAME],[Use NAME as default SSL backend])
1987 AS_HELP_STRING([--without-default-ssl-backend],[Use implicit default SSL backend]),
1988 [DEFAULT_SSL_BACKEND=$withval])
1989 case "$DEFAULT_SSL_BACKEND" in
1991 dnl --without-default-ssl-backend option used
1994 dnl --with-default-ssl-backend option used without name
1995 AC_MSG_ERROR([The name of the default SSL backend is required.])
1998 dnl --with-default-ssl-backend option used with name
1999 AC_SUBST(DEFAULT_SSL_BACKEND)
2000 dnl needs to be validated below
2001 VALID_DEFAULT_SSL_BACKEND=no
2006 CURL_WITH_SECURETRANSPORT
2015 dnl link required libraries for USE_WIN32_CRYPTO or USE_SCHANNEL
2016 if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$USE_SCHANNEL" = "x1"; then
2017 LIBS="-ladvapi32 -lcrypt32 $LIBS"
2020 dnl link bcrypt for BCryptGenRandom() (used when building for Vista or newer)
2021 if test "x$curl_cv_native_windows" = "xyes"; then
2022 LIBS="-lbcrypt $LIBS"
2025 case "x$SSL_DISABLED$OPENSSL_ENABLED$GNUTLS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED"
2028 AC_MSG_ERROR([TLS not detected, you will not be able to use HTTPS, FTPS, NTLM and more.
2029 Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this.])
2032 # one SSL backend is enabled
2033 AC_SUBST(SSL_ENABLED)
2035 AC_MSG_NOTICE([built with one SSL backend])
2038 # explicitly built without TLS
2041 AC_MSG_ERROR([--without-ssl has been set together with an explicit option to use an ssl library
2042 (e.g. --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl, --with-rustls).
2043 Since these are conflicting parameters, verify which is the desired one and drop the other.])
2046 # more than one SSL backend is enabled
2047 AC_SUBST(SSL_ENABLED)
2049 AC_SUBST(CURL_WITH_MULTI_SSL)
2050 CURL_WITH_MULTI_SSL="1"
2051 AC_DEFINE(CURL_WITH_MULTI_SSL, 1, [built with multiple SSL backends])
2052 AC_MSG_NOTICE([built with multiple SSL backends])
2056 if test -n "$ssl_backends"; then
2057 curl_ssl_msg="enabled ($ssl_backends)"
2060 if test no = "$VALID_DEFAULT_SSL_BACKEND"
2062 if test -n "$SSL_ENABLED"
2064 AC_MSG_ERROR([Default SSL backend $DEFAULT_SSL_BACKEND not enabled!])
2066 AC_MSG_ERROR([Default SSL backend requires SSL!])
2068 elif test yes = "$VALID_DEFAULT_SSL_BACKEND"
2070 AC_DEFINE_UNQUOTED([CURL_DEFAULT_SSL_BACKEND], ["$DEFAULT_SSL_BACKEND"], [Default SSL backend])
2073 dnl **********************************************************************
2074 dnl Check for the CA bundle
2075 dnl **********************************************************************
2077 if test -n "$check_for_ca_bundle"; then
2078 CURL_CHECK_CA_BUNDLE
2081 dnl **********************************************************************
2082 dnl Check for libpsl
2083 dnl **********************************************************************
2086 AS_HELP_STRING([--without-libpsl],
2087 [disable support for libpsl cookie checking]),
2088 with_libpsl=$withval,
2090 if test $with_libpsl != "no"; then
2091 AC_SEARCH_LIBS(psl_builtin, psl,
2092 [curl_psl_msg="enabled";
2093 AC_DEFINE([USE_LIBPSL], [1], [PSL support enabled])
2095 [curl_psl_msg="no (libpsl not found)";
2096 AC_MSG_WARN([libpsl was not found])
2100 AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"])
2103 dnl **********************************************************************
2104 dnl Check for libgsasl
2105 dnl **********************************************************************
2107 AC_ARG_WITH(libgsasl,
2108 AS_HELP_STRING([--without-libgsasl],
2109 [disable libgsasl support for SCRAM]),
2110 with_libgsasl=$withval,
2112 if test $with_libgsasl != "no"; then
2113 AC_SEARCH_LIBS(gsasl_init, gsasl,
2114 [curl_gsasl_msg="enabled";
2115 AC_DEFINE([USE_GSASL], [1], [GSASL support enabled])
2117 [curl_gsasl_msg="no (libgsasl not found)";
2118 AC_MSG_WARN([libgsasl was not found])
2122 AM_CONDITIONAL([USE_GSASL], [test "$curl_gsasl_msg" = "enabled"])
2124 AC_ARG_WITH(libmetalink,,
2125 AC_MSG_ERROR([--with-libmetalink and --without-libmetalink no longer work!]))
2127 dnl **********************************************************************
2128 dnl Check for the presence of LIBSSH2 libraries and headers
2129 dnl **********************************************************************
2131 dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
2133 AC_ARG_WITH(libssh2,dnl
2134 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])
2135 AS_HELP_STRING([--with-libssh2], [enable libssh2]),
2136 OPT_LIBSSH2=$withval, OPT_LIBSSH2=no)
2140 AC_ARG_WITH(libssh,dnl
2141 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])
2142 AS_HELP_STRING([--with-libssh], [enable libssh]),
2143 OPT_LIBSSH=$withval, OPT_LIBSSH=no)
2146 AC_ARG_WITH(wolfssh,dnl
2147 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])
2148 AS_HELP_STRING([--with-wolfssh], [enable wolfssh]),
2149 OPT_WOLFSSH=$withval, OPT_WOLFSSH=no)
2151 if test X"$OPT_LIBSSH2" != Xno; then
2152 dnl backup the pre-libssh2 variables
2153 CLEANLDFLAGS="$LDFLAGS"
2154 CLEANCPPFLAGS="$CPPFLAGS"
2157 case "$OPT_LIBSSH2" in
2159 dnl --with-libssh2 (without path) used
2160 CURL_CHECK_PKGCONFIG(libssh2)
2162 if test "$PKGCONFIG" != "no" ; then
2163 LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
2164 LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
2165 CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
2166 version=`$PKGCONFIG --modversion libssh2`
2167 DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/^-L//'`
2172 dnl no --with-libssh2 option given, just check default places
2175 dnl use the given --with-libssh2 spot
2176 PREFIX_SSH2=$OPT_LIBSSH2
2180 dnl if given with a prefix, we set -L and -I based on that
2181 if test -n "$PREFIX_SSH2"; then
2183 LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
2184 CPP_SSH2=-I${PREFIX_SSH2}/include
2185 DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
2188 LDFLAGS="$LDFLAGS $LD_SSH2"
2189 CPPFLAGS="$CPPFLAGS $CPP_SSH2"
2190 LIBS="$LIB_SSH2 $LIBS"
2192 dnl check for function added in libssh2 version 1.0
2193 AC_CHECK_LIB(ssh2, libssh2_session_block_directions)
2195 AC_CHECK_HEADER(libssh2.h,
2196 curl_ssh_msg="enabled (libSSH2)"
2198 AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use])
2199 AC_SUBST(USE_LIBSSH2, [1])
2202 if test X"$OPT_LIBSSH2" != Xoff &&
2203 test "$LIBSSH2_ENABLED" != "1"; then
2204 AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!])
2207 if test "$LIBSSH2_ENABLED" = "1"; then
2208 if test -n "$DIR_SSH2"; then
2209 dnl when the libssh2 shared libs were found in a path that the run-time
2210 dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
2211 dnl to prevent further configure tests to fail due to this
2213 if test "x$cross_compiling" != "xyes"; then
2214 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH2"
2215 export CURL_LIBRARY_PATH
2216 AC_MSG_NOTICE([Added $DIR_SSH2 to CURL_LIBRARY_PATH])
2220 dnl no libssh2, revert back to clean variables
2221 LDFLAGS=$CLEANLDFLAGS
2222 CPPFLAGS=$CLEANCPPFLAGS
2225 elif test X"$OPT_LIBSSH" != Xno; then
2226 dnl backup the pre-libssh variables
2227 CLEANLDFLAGS="$LDFLAGS"
2228 CLEANCPPFLAGS="$CPPFLAGS"
2231 case "$OPT_LIBSSH" in
2233 dnl --with-libssh (without path) used
2234 CURL_CHECK_PKGCONFIG(libssh)
2236 if test "$PKGCONFIG" != "no" ; then
2237 LIB_SSH=`$PKGCONFIG --libs-only-l libssh`
2238 LD_SSH=`$PKGCONFIG --libs-only-L libssh`
2239 CPP_SSH=`$PKGCONFIG --cflags-only-I libssh`
2240 version=`$PKGCONFIG --modversion libssh`
2241 DIR_SSH=`echo $LD_SSH | $SED -e 's/^-L//'`
2246 dnl no --with-libssh option given, just check default places
2249 dnl use the given --with-libssh spot
2250 PREFIX_SSH=$OPT_LIBSSH
2254 dnl if given with a prefix, we set -L and -I based on that
2255 if test -n "$PREFIX_SSH"; then
2257 LD_SSH=-L${PREFIX_SSH}/lib$libsuff
2258 CPP_SSH=-I${PREFIX_SSH}/include
2259 DIR_SSH=${PREFIX_SSH}/lib$libsuff
2262 LDFLAGS="$LDFLAGS $LD_SSH"
2263 CPPFLAGS="$CPPFLAGS $CPP_SSH"
2264 LIBS="$LIB_SSH $LIBS"
2266 AC_CHECK_LIB(ssh, ssh_new)
2268 AC_CHECK_HEADER(libssh/libssh.h,
2269 curl_ssh_msg="enabled (libSSH)"
2271 AC_DEFINE(USE_LIBSSH, 1, [if libSSH is in use])
2272 AC_SUBST(USE_LIBSSH, [1])
2275 if test X"$OPT_LIBSSH" != Xoff &&
2276 test "$LIBSSH_ENABLED" != "1"; then
2277 AC_MSG_ERROR([libSSH libs and/or directories were not found where specified!])
2280 if test "$LIBSSH_ENABLED" = "1"; then
2281 if test -n "$DIR_SSH"; then
2282 dnl when the libssh shared libs were found in a path that the run-time
2283 dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
2284 dnl to prevent further configure tests to fail due to this
2286 if test "x$cross_compiling" != "xyes"; then
2287 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH"
2288 export CURL_LIBRARY_PATH
2289 AC_MSG_NOTICE([Added $DIR_SSH to CURL_LIBRARY_PATH])
2293 dnl no libssh, revert back to clean variables
2294 LDFLAGS=$CLEANLDFLAGS
2295 CPPFLAGS=$CLEANCPPFLAGS
2298 elif test X"$OPT_WOLFSSH" != Xno; then
2299 dnl backup the pre-wolfssh variables
2300 CLEANLDFLAGS="$LDFLAGS"
2301 CLEANCPPFLAGS="$CPPFLAGS"
2305 if test "$OPT_WOLFSSH" != yes; then
2306 WOLFCONFIG="$OPT_WOLFSSH/bin/wolfssh-config"
2307 LDFLAGS="$LDFLAGS `$WOLFCONFIG --libs`"
2308 CPPFLAGS="$CPPFLAGS `$WOLFCONFIG --cflags`"
2311 AC_CHECK_LIB(wolfssh, wolfSSH_Init)
2313 AC_CHECK_HEADERS(wolfssh/ssh.h,
2314 curl_ssh_msg="enabled (wolfSSH)"
2316 AC_DEFINE(USE_WOLFSSH, 1, [if wolfSSH is in use])
2317 AC_SUBST(USE_WOLFSSH, [1])
2322 dnl **********************************************************************
2323 dnl Check for the presence of LIBRTMP libraries and headers
2324 dnl **********************************************************************
2326 dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
2328 AC_ARG_WITH(librtmp,dnl
2329 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])
2330 AS_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
2331 OPT_LIBRTMP=$withval)
2333 if test X"$OPT_LIBRTMP" != Xno; then
2334 dnl backup the pre-librtmp variables
2335 CLEANLDFLAGS="$LDFLAGS"
2336 CLEANCPPFLAGS="$CPPFLAGS"
2339 case "$OPT_LIBRTMP" in
2341 dnl --with-librtmp (without path) used
2342 CURL_CHECK_PKGCONFIG(librtmp)
2344 if test "$PKGCONFIG" != "no" ; then
2345 LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
2346 LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
2347 CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
2348 version=`$PKGCONFIG --modversion librtmp`
2349 DIR_RTMP=`echo $LD_RTMP | $SED -e 's/^-L//'`
2351 dnl To avoid link errors, we do not allow --librtmp without
2352 dnl a pkgconfig file
2353 AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
2358 dnl no --with-librtmp option given, just check default places
2362 dnl use the given --with-librtmp spot
2364 PREFIX_RTMP=$OPT_LIBRTMP
2368 dnl if given with a prefix, we set -L and -I based on that
2369 if test -n "$PREFIX_RTMP"; then
2370 LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
2371 CPP_RTMP=-I${PREFIX_RTMP}/include
2372 DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
2375 LDFLAGS="$LDFLAGS $LD_RTMP"
2376 CPPFLAGS="$CPPFLAGS $CPP_RTMP"
2377 LIBS="$LIB_RTMP $LIBS"
2379 AC_CHECK_LIB(rtmp, RTMP_Init,
2381 AC_CHECK_HEADERS(librtmp/rtmp.h,
2382 curl_rtmp_msg="enabled (librtmp)"
2384 AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use])
2385 AC_SUBST(USE_LIBRTMP, [1])
2388 dnl not found, revert back to clean variables
2389 LDFLAGS=$CLEANLDFLAGS
2390 CPPFLAGS=$CLEANCPPFLAGS
2394 if test X"$OPT_LIBRTMP" != Xoff &&
2395 test "$LIBRTMP_ENABLED" != "1"; then
2396 AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!])
2401 dnl **********************************************************************
2402 dnl Check for linker switch for versioned symbols
2403 dnl **********************************************************************
2405 versioned_symbols_flavour=
2406 AC_MSG_CHECKING([whether versioned symbols are wanted])
2407 AC_ARG_ENABLE(versioned-symbols,
2408 AS_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
2409 AS_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
2410 [ case "$enableval" in
2411 yes) AC_MSG_RESULT(yes)
2412 AC_MSG_CHECKING([if libraries can be versioned])
2413 GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
2414 if test -z "$GLD"; then
2416 AC_MSG_WARN([You need an ld version supporting the --version-script option])
2419 if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
2420 versioned_symbols_flavour="MULTISSL_"
2421 elif test "x$OPENSSL_ENABLED" = "x1"; then
2422 versioned_symbols_flavour="OPENSSL_"
2423 elif test "x$GNUTLS_ENABLED" = "x1"; then
2424 versioned_symbols_flavour="GNUTLS_"
2425 elif test "x$WOLFSSL_ENABLED" = "x1"; then
2426 versioned_symbols_flavour="WOLFSSL_"
2427 elif test "x$SCHANNEL_ENABLED" = "x1"; then
2428 versioned_symbols_flavour="SCHANNEL_"
2429 elif test "x$SECURETRANSPORT_ENABLED" = "x1"; then
2430 versioned_symbols_flavour="SECURE_TRANSPORT_"
2432 versioned_symbols_flavour=""
2434 versioned_symbols="yes"
2438 *) AC_MSG_RESULT(no)
2446 AC_SUBST([CURL_LT_SHLIB_VERSIONED_FLAVOUR],
2447 ["$versioned_symbols_flavour"])
2448 AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS],
2449 [test "x$versioned_symbols" = 'xyes'])
2451 dnl Update .plist file with current version
2452 AC_SUBST([CURL_PLIST_VERSION],
2455 dnl -------------------------------------------------
2456 dnl check winidn option before other IDN libraries
2457 dnl -------------------------------------------------
2459 AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)])
2460 OPT_WINIDN="default"
2462 AS_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN])
2463 AS_HELP_STRING([--without-winidn], [disable Windows native IDN]),
2464 OPT_WINIDN=$withval)
2465 case "$OPT_WINIDN" in
2467 dnl --without-winidn option used or configure option not specified
2472 dnl --with-winidn option used without path
2474 want_winidn_path="default"
2475 AC_MSG_RESULT([yes])
2478 dnl --with-winidn option used with path
2480 want_winidn_path="$withval"
2481 AC_MSG_RESULT([yes ($withval)])
2485 if test "$want_winidn" = "yes"; then
2486 dnl winidn library support has been requested
2487 clean_CFLAGS="$CFLAGS"
2488 clean_CPPFLAGS="$CPPFLAGS"
2489 clean_LDFLAGS="$LDFLAGS"
2491 WINIDN_LIBS="-lnormaliz"
2494 if test "$want_winidn_path" != "default"; then
2495 dnl path has been specified
2496 dnl pkg-config not available or provides no info
2497 WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff"
2498 WINIDN_CPPFLAGS="-I$want_winidn_path/include"
2499 WINIDN_DIR="$want_winidn_path/lib$libsuff"
2502 dnl WinIDN requires a minimum supported OS version of at least Vista (0x0600)
2505 #include <windows.h>
2507 #if (WINVER < 0x600) && (_WIN32_WINNT < 0x600)
2513 CFLAGS=`echo $CFLAGS | $SED -e 's/-DWINVER=[[^ ]]*//g'`
2514 CFLAGS=`echo $CFLAGS | $SED -e 's/-D_WIN32_WINNT=[[^ ]]*//g'`
2515 CPPFLAGS=`echo $CPPFLAGS | $SED -e 's/-DWINVER=[[^ ]]*//g'`
2516 CPPFLAGS=`echo $CPPFLAGS | $SED -e 's/-D_WIN32_WINNT=[[^ ]]*//g'`
2517 WINIDN_CPPFLAGS="$WINIDN_CPPFLAGS -DWINVER=0x0600"
2520 CPPFLAGS="$CPPFLAGS $WINIDN_CPPFLAGS"
2521 LDFLAGS="$LDFLAGS $WINIDN_LDFLAGS"
2522 LIBS="$WINIDN_LIBS $LIBS"
2524 AC_MSG_CHECKING([if IdnToUnicode can be linked])
2527 #include <windows.h>
2529 IdnToUnicode(0, NULL, 0, NULL, 0);
2532 AC_MSG_RESULT([yes])
2533 tst_links_winidn="yes"
2536 tst_links_winidn="no"
2539 if test "$tst_links_winidn" = "yes"; then
2540 AC_DEFINE(USE_WIN32_IDN, 1, [Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz).])
2541 AC_SUBST([IDN_ENABLED], [1])
2542 curl_idn_msg="enabled (Windows-native)"
2544 AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
2545 CFLAGS="$clean_CFLAGS"
2546 CPPFLAGS="$clean_CPPFLAGS"
2547 LDFLAGS="$clean_LDFLAGS"
2552 dnl **********************************************************************
2553 dnl Check for the presence of IDN libraries and headers
2554 dnl **********************************************************************
2556 AC_MSG_CHECKING([whether to build with libidn2])
2558 AC_ARG_WITH(libidn2,
2559 AS_HELP_STRING([--with-libidn2=PATH],[Enable libidn2 usage])
2560 AS_HELP_STRING([--without-libidn2],[Disable libidn2 usage]),
2562 if test "x$tst_links_winidn" = "xyes"; then
2564 AC_MSG_RESULT([no (using winidn instead)])
2568 dnl --without-libidn2 option used
2573 dnl configure option not specified
2575 want_idn_path="default"
2576 AC_MSG_RESULT([(assumed) yes])
2579 dnl --with-libidn2 option used without path
2581 want_idn_path="default"
2582 AC_MSG_RESULT([yes])
2585 dnl --with-libidn2 option used with path
2587 want_idn_path="$withval"
2588 AC_MSG_RESULT([yes ($withval)])
2593 if test "$want_idn" = "yes"; then
2594 dnl idn library support has been requested
2595 clean_CPPFLAGS="$CPPFLAGS"
2596 clean_LDFLAGS="$LDFLAGS"
2600 if test "$want_idn_path" != "default"; then
2601 dnl path has been specified
2602 IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
2603 CURL_CHECK_PKGCONFIG(libidn2, [$IDN_PCDIR])
2604 if test "$PKGCONFIG" != "no"; then
2605 IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2606 $PKGCONFIG --libs-only-l libidn2 2>/dev/null`
2607 IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2608 $PKGCONFIG --libs-only-L libidn2 2>/dev/null`
2609 IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2610 $PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
2611 IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'`
2613 dnl pkg-config not available or provides no info
2615 IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
2616 IDN_CPPFLAGS="-I$want_idn_path/include"
2617 IDN_DIR="$want_idn_path/lib$libsuff"
2620 dnl path not specified
2621 CURL_CHECK_PKGCONFIG(libidn2)
2622 if test "$PKGCONFIG" != "no"; then
2623 IDN_LIBS=`$PKGCONFIG --libs-only-l libidn2 2>/dev/null`
2624 IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn2 2>/dev/null`
2625 IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
2626 IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'`
2628 dnl pkg-config not available or provides no info
2633 if test "$PKGCONFIG" != "no"; then
2634 AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"])
2635 AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"])
2636 AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
2637 AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"])
2639 AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"])
2640 AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"])
2641 AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
2642 AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"])
2645 CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS"
2646 LDFLAGS="$LDFLAGS $IDN_LDFLAGS"
2647 LIBS="$IDN_LIBS $LIBS"
2649 AC_MSG_CHECKING([if idn2_lookup_ul can be linked])
2651 AC_LANG_FUNC_LINK_TRY([idn2_lookup_ul])
2653 AC_MSG_RESULT([yes])
2654 tst_links_libidn="yes"
2657 tst_links_libidn="no"
2660 AC_CHECK_HEADERS( idn2.h )
2662 if test "$tst_links_libidn" = "yes"; then
2663 AC_DEFINE(HAVE_LIBIDN2, 1, [Define to 1 if you have the `idn2' library (-lidn2).])
2664 dnl different versions of libidn have different setups of these:
2666 AC_SUBST([IDN_ENABLED], [1])
2667 curl_idn_msg="enabled (libidn2)"
2668 if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
2669 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$IDN_DIR"
2670 export CURL_LIBRARY_PATH
2671 AC_MSG_NOTICE([Added $IDN_DIR to CURL_LIBRARY_PATH])
2674 AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
2675 CPPFLAGS="$clean_CPPFLAGS"
2676 LDFLAGS="$clean_LDFLAGS"
2681 dnl **********************************************************************
2682 dnl Check for nghttp2
2683 dnl **********************************************************************
2687 if test "x$disable_http" = "xyes" -o X"$want_hyper" != Xno; then
2688 # without HTTP or with Hyper, nghttp2 is no use
2692 AC_ARG_WITH(nghttp2,
2693 AS_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage])
2694 AS_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]),
2698 dnl --without-nghttp2 option used
2702 dnl --with-nghttp2 option used without path
2703 want_nghttp2="default"
2704 want_nghttp2_path=""
2705 want_nghttp2_pkg_config_path=""
2708 dnl --with-nghttp2 option used with path
2710 want_nghttp2_path="$withval"
2711 want_nghttp2_pkg_config_path="$withval/lib/pkgconfig"
2715 if test X"$want_nghttp2" != Xno; then
2716 dnl backup the pre-nghttp2 variables
2717 CLEANLDFLAGS="$LDFLAGS"
2718 CLEANCPPFLAGS="$CPPFLAGS"
2721 CURL_CHECK_PKGCONFIG(libnghttp2, $want_nghttp2_pkg_config_path)
2723 if test "$PKGCONFIG" != "no" ; then
2724 LIB_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path])
2725 $PKGCONFIG --libs-only-l libnghttp2`
2726 AC_MSG_NOTICE([-l is $LIB_H2])
2728 CPP_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path]) dnl
2729 $PKGCONFIG --cflags-only-I libnghttp2`
2730 AC_MSG_NOTICE([-I is $CPP_H2])
2732 LD_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path])
2733 $PKGCONFIG --libs-only-L libnghttp2`
2734 AC_MSG_NOTICE([-L is $LD_H2])
2736 DIR_H2=`echo $LD_H2 | $SED -e 's/^-L//'`
2737 elif test x"$want_nghttp2_path" != x; then
2739 LD_H2=-L${want_nghttp2_path}/lib$libsuff
2740 CPP_H2=-I${want_nghttp2_path}/include
2741 DIR_H2=${want_nghttp2_path}/lib$libsuff
2742 elif test X"$want_nghttp2" != Xdefault; then
2743 dnl no nghttp2 pkg-config found and no custom directory specified,
2745 AC_MSG_ERROR([--with-nghttp2 was specified but could not find libnghttp2 pkg-config file.])
2750 LDFLAGS="$LDFLAGS $LD_H2"
2751 CPPFLAGS="$CPPFLAGS $CPP_H2"
2752 LIBS="$LIB_H2 $LIBS"
2754 # use nghttp2_session_get_stream_local_window_size to require nghttp2
2756 AC_CHECK_LIB(nghttp2, nghttp2_session_get_stream_local_window_size,
2758 AC_CHECK_HEADERS(nghttp2/nghttp2.h,
2759 curl_h2_msg="enabled (nghttp2)"
2761 AC_DEFINE(USE_NGHTTP2, 1, [if nghttp2 is in use])
2762 AC_SUBST(USE_NGHTTP2, [1])
2765 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_H2"
2766 export CURL_LIBRARY_PATH
2767 AC_MSG_NOTICE([Added $DIR_H2 to CURL_LIBRARY_PATH])
2769 dnl not found, revert back to clean variables
2770 LDFLAGS=$CLEANLDFLAGS
2771 CPPFLAGS=$CLEANCPPFLAGS
2776 dnl **********************************************************************
2777 dnl Check for ngtcp2 (QUIC)
2778 dnl **********************************************************************
2782 if test "x$disable_http" = "xyes"; then
2783 # without HTTP, ngtcp2 is no use
2788 AS_HELP_STRING([--with-ngtcp2=PATH],[Enable ngtcp2 usage])
2789 AS_HELP_STRING([--without-ngtcp2],[Disable ngtcp2 usage]),
2790 [OPT_TCP2=$withval])
2793 dnl --without-ngtcp2 option used
2797 dnl --with-ngtcp2 option used without path
2802 dnl --with-ngtcp2 option used with path
2804 want_tcp2_path="$withval/lib/pkgconfig"
2808 curl_tcp2_msg="no (--with-ngtcp2)"
2809 if test X"$want_tcp2" != Xno; then
2810 dnl backup the pre-ngtcp2 variables
2811 CLEANLDFLAGS="$LDFLAGS"
2812 CLEANCPPFLAGS="$CPPFLAGS"
2815 CURL_CHECK_PKGCONFIG(libngtcp2, $want_tcp2_path)
2817 if test "$PKGCONFIG" != "no" ; then
2818 LIB_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path])
2819 $PKGCONFIG --libs-only-l libngtcp2`
2820 AC_MSG_NOTICE([-l is $LIB_TCP2])
2822 CPP_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
2823 $PKGCONFIG --cflags-only-I libngtcp2`
2824 AC_MSG_NOTICE([-I is $CPP_TCP2])
2826 LD_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path])
2827 $PKGCONFIG --libs-only-L libngtcp2`
2828 AC_MSG_NOTICE([-L is $LD_TCP2])
2830 LDFLAGS="$LDFLAGS $LD_TCP2"
2831 CPPFLAGS="$CPPFLAGS $CPP_TCP2"
2832 LIBS="$LIB_TCP2 $LIBS"
2834 if test "x$cross_compiling" != "xyes"; then
2835 DIR_TCP2=`echo $LD_TCP2 | $SED -e 's/^-L//'`
2837 AC_CHECK_LIB(ngtcp2, ngtcp2_conn_client_new_versioned,
2839 AC_CHECK_HEADERS(ngtcp2/ngtcp2.h,
2841 AC_DEFINE(USE_NGTCP2, 1, [if ngtcp2 is in use])
2842 AC_SUBST(USE_NGTCP2, [1])
2843 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_TCP2"
2844 export CURL_LIBRARY_PATH
2845 AC_MSG_NOTICE([Added $DIR_TCP2 to CURL_LIBRARY_PATH])
2848 dnl not found, revert back to clean variables
2849 LDFLAGS=$CLEANLDFLAGS
2850 CPPFLAGS=$CLEANCPPFLAGS
2855 dnl no ngtcp2 pkg-config found, deal with it
2856 if test X"$want_tcp2" != Xdefault; then
2857 dnl To avoid link errors, we do not allow --with-ngtcp2 without
2858 dnl a pkgconfig file
2859 AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2 pkg-config file.])
2865 if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1"; then
2866 dnl backup the pre-ngtcp2_crypto_quictls variables
2867 CLEANLDFLAGS="$LDFLAGS"
2868 CLEANCPPFLAGS="$CPPFLAGS"
2871 CURL_CHECK_PKGCONFIG(libngtcp2_crypto_quictls, $want_tcp2_path)
2873 if test "$PKGCONFIG" != "no" ; then
2874 LIB_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
2875 $PKGCONFIG --libs-only-l libngtcp2_crypto_quictls`
2876 AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_QUICTLS])
2878 CPP_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
2879 $PKGCONFIG --cflags-only-I libngtcp2_crypto_quictls`
2880 AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_QUICTLS])
2882 LD_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
2883 $PKGCONFIG --libs-only-L libngtcp2_crypto_quictls`
2884 AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_QUICTLS])
2886 LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_QUICTLS"
2887 CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_QUICTLS"
2888 LIBS="$LIB_NGTCP2_CRYPTO_QUICTLS $LIBS"
2890 if test "x$cross_compiling" != "xyes"; then
2891 DIR_NGTCP2_CRYPTO_QUICTLS=`echo $LD_NGTCP2_CRYPTO_QUICTLS | $SED -e 's/^-L//'`
2893 AC_CHECK_LIB(ngtcp2_crypto_quictls, ngtcp2_crypto_recv_client_initial_cb,
2895 AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
2897 AC_DEFINE(USE_NGTCP2_CRYPTO_QUICTLS, 1, [if ngtcp2_crypto_quictls is in use])
2898 AC_SUBST(USE_NGTCP2_CRYPTO_QUICTLS, [1])
2899 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_QUICTLS"
2900 export CURL_LIBRARY_PATH
2901 AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_QUICTLS to CURL_LIBRARY_PATH])
2904 dnl not found, revert back to clean variables
2905 LDFLAGS=$CLEANLDFLAGS
2906 CPPFLAGS=$CLEANCPPFLAGS
2911 dnl no ngtcp2_crypto_quictls pkg-config found, deal with it
2912 if test X"$want_tcp2" != Xdefault; then
2913 dnl To avoid link errors, we do not allow --with-ngtcp2 without
2914 dnl a pkgconfig file
2915 AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_quictls pkg-config file.])
2920 if test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then
2921 dnl backup the pre-ngtcp2_crypto_gnutls variables
2922 CLEANLDFLAGS="$LDFLAGS"
2923 CLEANCPPFLAGS="$CPPFLAGS"
2926 CURL_CHECK_PKGCONFIG(libngtcp2_crypto_gnutls, $want_tcp2_path)
2928 if test "$PKGCONFIG" != "no" ; then
2929 LIB_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
2930 $PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls`
2931 AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_GNUTLS])
2933 CPP_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
2934 $PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls`
2935 AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_GNUTLS])
2937 LD_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
2938 $PKGCONFIG --libs-only-L libngtcp2_crypto_gnutls`
2939 AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_GNUTLS])
2941 LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_GNUTLS"
2942 CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_GNUTLS"
2943 LIBS="$LIB_NGTCP2_CRYPTO_GNUTLS $LIBS"
2945 if test "x$cross_compiling" != "xyes"; then
2946 DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/^-L//'`
2948 AC_CHECK_LIB(ngtcp2_crypto_gnutls, ngtcp2_crypto_recv_client_initial_cb,
2950 AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
2952 AC_DEFINE(USE_NGTCP2_CRYPTO_GNUTLS, 1, [if ngtcp2_crypto_gnutls is in use])
2953 AC_SUBST(USE_NGTCP2_CRYPTO_GNUTLS, [1])
2954 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS"
2955 export CURL_LIBRARY_PATH
2956 AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH])
2959 dnl not found, revert back to clean variables
2960 LDFLAGS=$CLEANLDFLAGS
2961 CPPFLAGS=$CLEANCPPFLAGS
2966 dnl no ngtcp2_crypto_gnutls pkg-config found, deal with it
2967 if test X"$want_tcp2" != Xdefault; then
2968 dnl To avoid link errors, we do not allow --with-ngtcp2 without
2969 dnl a pkgconfig file
2970 AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_gnutls pkg-config file.])
2975 if test "x$NGTCP2_ENABLED" = "x1" -a "x$WOLFSSL_ENABLED" = "x1"; then
2976 dnl backup the pre-ngtcp2_crypto_wolfssl variables
2977 CLEANLDFLAGS="$LDFLAGS"
2978 CLEANCPPFLAGS="$CPPFLAGS"
2981 CURL_CHECK_PKGCONFIG(libngtcp2_crypto_wolfssl, $want_tcp2_path)
2983 if test "$PKGCONFIG" != "no" ; then
2984 LIB_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
2985 $PKGCONFIG --libs-only-l libngtcp2_crypto_wolfssl`
2986 AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_WOLFSSL])
2988 CPP_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
2989 $PKGCONFIG --cflags-only-I libngtcp2_crypto_wolfssl`
2990 AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_WOLFSSL])
2992 LD_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
2993 $PKGCONFIG --libs-only-L libngtcp2_crypto_wolfssl`
2994 AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_WOLFSSL])
2996 LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_WOLFSSL"
2997 CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_WOLFSSL"
2998 LIBS="$LIB_NGTCP2_CRYPTO_WOLFSSL $LIBS"
3000 if test "x$cross_compiling" != "xyes"; then
3001 DIR_NGTCP2_CRYPTO_WOLFSSL=`echo $LD_NGTCP2_CRYPTO_WOLFSSL | $SED -e 's/^-L//'`
3003 AC_CHECK_LIB(ngtcp2_crypto_wolfssl, ngtcp2_crypto_recv_client_initial_cb,
3005 AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
3007 AC_DEFINE(USE_NGTCP2_CRYPTO_WOLFSSL, 1, [if ngtcp2_crypto_wolfssl is in use])
3008 AC_SUBST(USE_NGTCP2_CRYPTO_WOLFSSL, [1])
3009 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_WOLFSSL"
3010 export CURL_LIBRARY_PATH
3011 AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_WOLFSSL to CURL_LIBRARY_PATH])
3014 dnl not found, revert back to clean variables
3015 LDFLAGS=$CLEANLDFLAGS
3016 CPPFLAGS=$CLEANCPPFLAGS
3021 dnl no ngtcp2_crypto_wolfssl pkg-config found, deal with it
3022 if test X"$want_tcp2" != Xdefault; then
3023 dnl To avoid link errors, we do not allow --with-ngtcp2 without
3024 dnl a pkgconfig file
3025 AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_wolfssl pkg-config file.])
3030 dnl **********************************************************************
3031 dnl Check for nghttp3 (HTTP/3 with ngtcp2)
3032 dnl **********************************************************************
3036 if test "x$NGTCP2_ENABLED" = "x"; then
3037 # without ngtcp2, nghttp3 is of no use for us
3041 AC_ARG_WITH(nghttp3,
3042 AS_HELP_STRING([--with-nghttp3=PATH],[Enable nghttp3 usage])
3043 AS_HELP_STRING([--without-nghttp3],[Disable nghttp3 usage]),
3044 [OPT_NGHTTP3=$withval])
3045 case "$OPT_NGHTTP3" in
3047 dnl --without-nghttp3 option used
3051 dnl --with-nghttp3 option used without path
3052 want_nghttp3="default"
3053 want_nghttp3_path=""
3056 dnl --with-nghttp3 option used with path
3058 want_nghttp3_path="$withval/lib/pkgconfig"
3062 curl_http3_msg="no (--with-nghttp3)"
3063 if test X"$want_nghttp3" != Xno; then
3064 dnl backup the pre-nghttp3 variables
3065 CLEANLDFLAGS="$LDFLAGS"
3066 CLEANCPPFLAGS="$CPPFLAGS"
3069 CURL_CHECK_PKGCONFIG(libnghttp3, $want_nghttp3_path)
3071 if test "$PKGCONFIG" != "no" ; then
3072 LIB_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path])
3073 $PKGCONFIG --libs-only-l libnghttp3`
3074 AC_MSG_NOTICE([-l is $LIB_NGHTTP3])
3076 CPP_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) dnl
3077 $PKGCONFIG --cflags-only-I libnghttp3`
3078 AC_MSG_NOTICE([-I is $CPP_NGHTTP3])
3080 LD_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path])
3081 $PKGCONFIG --libs-only-L libnghttp3`
3082 AC_MSG_NOTICE([-L is $LD_NGHTTP3])
3084 LDFLAGS="$LDFLAGS $LD_NGHTTP3"
3085 CPPFLAGS="$CPPFLAGS $CPP_NGHTTP3"
3086 LIBS="$LIB_NGHTTP3 $LIBS"
3088 if test "x$cross_compiling" != "xyes"; then
3089 DIR_NGHTTP3=`echo $LD_NGHTTP3 | $SED -e 's/^-L//'`
3091 AC_CHECK_LIB(nghttp3, nghttp3_conn_client_new_versioned,
3093 AC_CHECK_HEADERS(nghttp3/nghttp3.h,
3094 curl_h3_msg="enabled (ngtcp2 + nghttp3)"
3096 AC_DEFINE(USE_NGHTTP3, 1, [if nghttp3 is in use])
3097 AC_SUBST(USE_NGHTTP3, [1])
3098 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGHTTP3"
3099 export CURL_LIBRARY_PATH
3100 AC_MSG_NOTICE([Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH])
3103 dnl not found, revert back to clean variables
3104 LDFLAGS=$CLEANLDFLAGS
3105 CPPFLAGS=$CLEANCPPFLAGS
3110 dnl no nghttp3 pkg-config found, deal with it
3111 if test X"$want_nghttp3" != Xdefault; then
3112 dnl To avoid link errors, we do not allow --with-nghttp3 without
3113 dnl a pkgconfig file
3114 AC_MSG_ERROR([--with-nghttp3 was specified but could not find nghttp3 pkg-config file.])
3120 dnl **********************************************************************
3121 dnl Check for quiche (QUIC)
3122 dnl **********************************************************************
3126 if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
3127 # without HTTP or with ngtcp2, quiche is no use
3132 AS_HELP_STRING([--with-quiche=PATH],[Enable quiche usage])
3133 AS_HELP_STRING([--without-quiche],[Disable quiche usage]),
3134 [OPT_QUICHE=$withval])
3135 case "$OPT_QUICHE" in
3137 dnl --without-quiche option used
3141 dnl --with-quiche option used without path
3142 want_quiche="default"
3146 dnl --with-quiche option used with path
3148 want_quiche_path="$withval"
3152 if test X"$want_quiche" != Xno; then
3154 if test "$NGHTTP3_ENABLED" = 1; then
3155 AC_MSG_ERROR([--with-quiche and --with-ngtcp2 are mutually exclusive])
3158 dnl backup the pre-quiche variables
3159 CLEANLDFLAGS="$LDFLAGS"
3160 CLEANCPPFLAGS="$CPPFLAGS"
3163 CURL_CHECK_PKGCONFIG(quiche, $want_quiche_path)
3165 if test "$PKGCONFIG" != "no" ; then
3166 LIB_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path])
3167 $PKGCONFIG --libs-only-l quiche`
3168 AC_MSG_NOTICE([-l is $LIB_QUICHE])
3170 CPP_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) dnl
3171 $PKGCONFIG --cflags-only-I quiche`
3172 AC_MSG_NOTICE([-I is $CPP_QUICHE])
3174 LD_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path])
3175 $PKGCONFIG --libs-only-L quiche`
3176 AC_MSG_NOTICE([-L is $LD_QUICHE])
3178 LDFLAGS="$LDFLAGS $LD_QUICHE"
3179 CPPFLAGS="$CPPFLAGS $CPP_QUICHE"
3180 LIBS="$LIB_QUICHE $LIBS"
3182 if test "x$cross_compiling" != "xyes"; then
3183 DIR_QUICHE=`echo $LD_QUICHE | $SED -e 's/^-L//'`
3185 AC_CHECK_LIB(quiche, quiche_conn_send_ack_eliciting,
3187 AC_CHECK_HEADERS(quiche.h,
3188 experimental="$experimental HTTP3"
3189 AC_MSG_NOTICE([HTTP3 support is experimental])
3190 curl_h3_msg="enabled (quiche)"
3192 AC_DEFINE(USE_QUICHE, 1, [if quiche is in use])
3193 AC_SUBST(USE_QUICHE, [1])
3194 AC_CHECK_FUNCS([quiche_conn_set_qlog_fd])
3195 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_QUICHE"
3196 export CURL_LIBRARY_PATH
3197 AC_MSG_NOTICE([Added $DIR_QUICHE to CURL_LIBRARY_PATH]),
3201 #include <sys/socket.h>
3205 dnl not found, revert back to clean variables
3206 AC_MSG_ERROR([couldn't use quiche])
3209 dnl no quiche pkg-config found, deal with it
3210 if test X"$want_quiche" != Xdefault; then
3211 dnl To avoid link errors, we do not allow --with-quiche without
3212 dnl a pkgconfig file
3213 AC_MSG_ERROR([--with-quiche was specified but could not find quiche pkg-config file.])
3218 dnl **********************************************************************
3219 dnl Check for msh3 (QUIC)
3220 dnl **********************************************************************
3224 if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
3225 # without HTTP or with ngtcp2, msh3 is no use
3230 AS_HELP_STRING([--with-msh3=PATH],[Enable msh3 usage])
3231 AS_HELP_STRING([--without-msh3],[Disable msh3 usage]),
3232 [OPT_MSH3=$withval])
3235 dnl --without-msh3 option used
3239 dnl --with-msh3 option used without path
3244 dnl --with-msh3 option used with path
3246 want_msh3_path="$withval"
3250 if test X"$want_msh3" != Xno; then
3252 if test "$NGHTTP3_ENABLED" = 1; then
3253 AC_MSG_ERROR([--with-msh3 and --with-ngtcp2 are mutually exclusive])
3256 dnl backup the pre-msh3 variables
3257 CLEANLDFLAGS="$LDFLAGS"
3258 CLEANCPPFLAGS="$CPPFLAGS"
3261 if test -n "$want_msh3_path"; then
3262 LD_MSH3="-L$want_msh3_path/lib"
3263 CPP_MSH3="-I$want_msh3_path/include"
3264 DIR_MSH3="$want_msh3_path/lib"
3265 LDFLAGS="$LDFLAGS $LD_MSH3"
3266 CPPFLAGS="$CPPFLAGS $CPP_MSH3"
3270 AC_CHECK_LIB(msh3, MsH3ApiOpen,
3272 AC_CHECK_HEADERS(msh3.h,
3273 curl_h3_msg="enabled (msh3)"
3275 AC_DEFINE(USE_MSH3, 1, [if msh3 is in use])
3276 AC_SUBST(USE_MSH3, [1])
3277 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_MSH3"
3278 export CURL_LIBRARY_PATH
3279 AC_MSG_NOTICE([Added $DIR_MSH3 to CURL_LIBRARY_PATH]),
3280 experimental="$experimental HTTP3"
3283 dnl not found, revert back to clean variables
3284 LDFLAGS=$CLEANLDFLAGS
3285 CPPFLAGS=$CLEANCPPFLAGS
3290 dnl **********************************************************************
3291 dnl Check for zsh completion path
3292 dnl **********************************************************************
3294 OPT_ZSH_FPATH=default
3295 AC_ARG_WITH(zsh-functions-dir,
3296 AS_HELP_STRING([--with-zsh-functions-dir=PATH],[Install zsh completions to PATH])
3297 AS_HELP_STRING([--without-zsh-functions-dir],[Do not install zsh completions]),
3298 [OPT_ZSH_FPATH=$withval])
3299 case "$OPT_ZSH_FPATH" in
3301 dnl --without-zsh-functions-dir option used
3304 dnl --with-zsh-functions-dir option used without path
3305 ZSH_FUNCTIONS_DIR="$datarootdir/zsh/site-functions"
3306 AC_SUBST(ZSH_FUNCTIONS_DIR)
3309 dnl --with-zsh-functions-dir option used with path
3310 ZSH_FUNCTIONS_DIR="$withval"
3311 AC_SUBST(ZSH_FUNCTIONS_DIR)
3315 dnl **********************************************************************
3316 dnl Check for fish completion path
3317 dnl **********************************************************************
3319 OPT_FISH_FPATH=default
3320 AC_ARG_WITH(fish-functions-dir,
3321 AS_HELP_STRING([--with-fish-functions-dir=PATH],[Install fish completions to PATH])
3322 AS_HELP_STRING([--without-fish-functions-dir],[Do not install fish completions]),
3323 [OPT_FISH_FPATH=$withval])
3324 case "$OPT_FISH_FPATH" in
3326 dnl --without-fish-functions-dir option used
3329 dnl --with-fish-functions-dir option used without path
3330 CURL_CHECK_PKGCONFIG(fish)
3331 if test "$PKGCONFIG" != "no" ; then
3332 FISH_FUNCTIONS_DIR="$($PKGCONFIG --variable completionsdir fish)"
3334 FISH_FUNCTIONS_DIR="$datarootdir/fish/vendor_completions.d"
3336 AC_SUBST(FISH_FUNCTIONS_DIR)
3339 dnl --with-fish-functions-dir option used with path
3340 FISH_FUNCTIONS_DIR="$withval"
3341 AC_SUBST(FISH_FUNCTIONS_DIR)
3345 dnl Now check for the very most basic headers. Then we can use these
3346 dnl ones as default-headers when checking for the rest!
3384 dnl to do if not found
3388 dnl default includes
3390 #ifdef HAVE_SYS_TYPES_H
3391 #include <sys/types.h>
3393 #ifdef HAVE_SYS_TIME_H
3394 #include <sys/time.h>
3396 #ifdef HAVE_SYS_SELECT_H
3397 #include <sys/select.h>
3398 #elif defined(HAVE_UNISTD_H)
3401 #ifdef HAVE_SYS_SOCKET_H
3402 #include <sys/socket.h>
3404 #ifdef HAVE_NETINET_IN_H
3405 #include <netinet/in.h>
3407 #ifdef HAVE_NETINET_IN6_H
3408 #include <netinet/in6.h>
3410 #ifdef HAVE_SYS_UN_H
3417 dnl Checks for typedefs, structures, and compiler characteristics.
3421 CURL_CHECK_STRUCT_TIMEVAL
3422 CURL_VERIFY_RUNTIMELIBS
3431 CPPFLAGS="-I$srcdir/include $CPPFLAGS"
3432 CURL_SIZEOF(curl_off_t, [
3433 #include <curl/system.h>
3435 CURL_SIZEOF(curl_socket_t, [
3436 #include <curl/curl.h>
3440 AC_CHECK_TYPE(long long,
3441 [AC_DEFINE(HAVE_LONGLONG, 1,
3442 [Define to 1 if the compiler supports the 'long long' data type.])]
3446 if test ${ac_cv_sizeof_curl_off_t} -lt 8; then
3447 AC_MSG_ERROR([64 bit curl_off_t is required])
3451 AC_CHECK_TYPE(ssize_t, ,
3452 AC_DEFINE(ssize_t, int, [the signed version of size_t]))
3454 # check for bool type
3455 AC_CHECK_TYPE([bool],[
3456 AC_DEFINE(HAVE_BOOL_T, 1,
3457 [Define to 1 if bool is an available type.])
3459 #ifdef HAVE_SYS_TYPES_H
3460 #include <sys/types.h>
3462 #ifdef HAVE_STDBOOL_H
3463 #include <stdbool.h>
3467 # check for sa_family_t
3468 AC_CHECK_TYPE(sa_family_t,
3469 AC_DEFINE(CURL_SA_FAMILY_T, sa_family_t, [IP address type in sockaddr]),
3472 AC_CHECK_TYPE(ADDRESS_FAMILY,
3473 AC_DEFINE(CURL_SA_FAMILY_T, ADDRESS_FAMILY, [IP address type in sockaddr]),
3474 AC_DEFINE(CURL_SA_FAMILY_T, unsigned short, [IP address type in sockaddr]),
3476 #ifdef HAVE_SYS_SOCKET_H
3477 #include <sys/socket.h>
3482 #ifdef HAVE_SYS_SOCKET_H
3483 #include <sys/socket.h>
3487 # check for suseconds_t
3488 AC_CHECK_TYPE([suseconds_t],[
3489 AC_DEFINE(HAVE_SUSECONDS_T, 1,
3490 [Define to 1 if suseconds_t is an available type.])
3492 #ifdef HAVE_SYS_TYPES_H
3493 #include <sys/types.h>
3495 #ifdef HAVE_SYS_TIME_H
3496 #include <sys/time.h>
3500 AC_MSG_CHECKING([if time_t is unsigned])
3510 AC_MSG_RESULT([yes])
3511 AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned])
3515 dnl cross-compiling, most systems are unsigned
3519 CURL_CONFIGURE_PULL_SYS_POLL
3523 TYPE_SOCKADDR_STORAGE
3525 CURL_CHECK_FUNC_SELECT
3527 CURL_CHECK_FUNC_RECV
3528 CURL_CHECK_FUNC_SEND
3529 CURL_CHECK_MSG_NOSIGNAL
3531 CURL_CHECK_FUNC_ALARM
3532 CURL_CHECK_FUNC_BASENAME
3533 CURL_CHECK_FUNC_CLOSESOCKET
3534 CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
3535 CURL_CHECK_FUNC_FCNTL
3536 CURL_CHECK_FUNC_FREEADDRINFO
3537 CURL_CHECK_FUNC_FSETXATTR
3538 CURL_CHECK_FUNC_FTRUNCATE
3539 CURL_CHECK_FUNC_GETADDRINFO
3540 CURL_CHECK_FUNC_GETHOSTBYNAME
3541 CURL_CHECK_FUNC_GETHOSTBYNAME_R
3542 CURL_CHECK_FUNC_GETHOSTNAME
3543 CURL_CHECK_FUNC_GETPEERNAME
3544 CURL_CHECK_FUNC_GETSOCKNAME
3545 CURL_CHECK_FUNC_IF_NAMETOINDEX
3546 CURL_CHECK_FUNC_GETIFADDRS
3547 CURL_CHECK_FUNC_GMTIME_R
3548 CURL_CHECK_FUNC_INET_NTOP
3549 CURL_CHECK_FUNC_INET_PTON
3550 CURL_CHECK_FUNC_IOCTL
3551 CURL_CHECK_FUNC_IOCTLSOCKET
3552 CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
3553 CURL_CHECK_FUNC_MEMRCHR
3554 CURL_CHECK_FUNC_POLL
3555 CURL_CHECK_FUNC_SIGACTION
3556 CURL_CHECK_FUNC_SIGINTERRUPT
3557 CURL_CHECK_FUNC_SIGNAL
3558 CURL_CHECK_FUNC_SIGSETJMP
3559 CURL_CHECK_FUNC_SOCKET
3560 CURL_CHECK_FUNC_SOCKETPAIR
3561 CURL_CHECK_FUNC_STRCASECMP
3562 CURL_CHECK_FUNC_STRCMPI
3563 CURL_CHECK_FUNC_STRDUP
3564 CURL_CHECK_FUNC_STRERROR_R
3565 CURL_CHECK_FUNC_STRICMP
3566 CURL_CHECK_FUNC_STRTOK_R
3567 CURL_CHECK_FUNC_STRTOLL
3573 AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
3577 AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Set if getpwuid_r() declaration is missing")],
3579 #include <sys/types.h>]])
3594 mach_absolute_time \
3607 eval skipcheck=\$skipcheck_$func
3608 if test "x$skipcheck" != "xyes"; then
3609 AC_MSG_CHECKING([deeper for $func])
3616 AC_MSG_RESULT([yes])
3617 eval "ac_cv_func_$func=yes"
3618 AC_DEFINE_UNQUOTED(XC_SH_TR_CPP([HAVE_$func]), [1],
3619 [Define to 1 if you have the $func function.])
3621 AC_MSG_RESULT([but still no])
3626 dnl On Android, the only way to know if fseeko can be used is to see if it is
3627 dnl declared or not (for this API level), as the symbol always exists in the
3629 AC_CHECK_DECL([fseeko],
3630 [AC_DEFINE([HAVE_DECL_FSEEKO], [1],
3631 [Define to 1 if you have the fseeko declaration])],
3633 [[#include <stdio.h>]])
3635 CURL_CHECK_NONBLOCKING_SOCKET
3637 dnl ************************************************************
3638 dnl nroff tool stuff
3641 AC_PATH_PROG( PERL, perl, ,
3642 $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
3645 AC_PATH_PROGS( NROFF, gnroff nroff, ,
3646 $PATH:/usr/bin/:/usr/local/bin )
3649 if test -n "$NROFF"; then
3650 dnl only check for nroff options if an nroff command was found
3652 AC_MSG_CHECKING([how to use *nroff to get plain text from man pages])
3654 mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
3655 if test -z "$mancheck"; then
3657 mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
3658 if test -z "$mancheck"; then
3660 AC_MSG_RESULT([failed])
3661 AC_MSG_WARN([found no *nroff option to get plaintext from man pages])
3663 AC_MSG_RESULT([$MANOPT])
3666 AC_MSG_RESULT([$MANOPT])
3671 if test -z "$MANOPT"
3673 dnl if no nroff tool was found, or no option that could convert man pages
3674 dnl was found, then disable the built-in manual stuff
3675 AC_MSG_WARN([disabling built-in manual])
3679 dnl *************************************************************************
3680 dnl If the manual variable still is set, then we go with providing a built-in
3683 if test "$USE_MANUAL" = "1"; then
3684 AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
3685 curl_manual_msg="enabled"
3688 dnl set variable for use in automakefile(s)
3689 AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
3693 if test "x$curl_cv_native_windows" != "xyes" &&
3694 test "x$enable_shared" = "xyes"; then
3695 build_libhostname=yes
3697 build_libhostname=no
3699 AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes)
3701 if test "x$want_ares" != xyes; then
3702 CURL_CHECK_OPTION_THREADED_RESOLVER
3705 dnl ************************************************************
3706 dnl disable POSIX threads
3708 AC_MSG_CHECKING([whether to use POSIX threads for threaded resolver])
3709 AC_ARG_ENABLE(pthreads,
3710 AS_HELP_STRING([--enable-pthreads],
3711 [Enable POSIX threads (default for threaded resolver)])
3712 AS_HELP_STRING([--disable-pthreads],[Disable POSIX threads]),
3713 [ case "$enableval" in
3714 no) AC_MSG_RESULT(no)
3717 *) AC_MSG_RESULT(yes)
3726 dnl turn off pthreads if rt is disabled
3727 if test "$want_pthreads" != "no"; then
3728 if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then
3729 AC_MSG_ERROR([options --enable-pthreads and --disable-rt are mutually exclusive])
3731 if test "$dontwant_rt" != "no"; then
3732 dnl if --enable-pthreads was explicit then warn it's being ignored
3733 if test "$want_pthreads" = "yes"; then
3734 AC_MSG_WARN([--enable-pthreads Ignored since librt is disabled.])
3740 dnl turn off pthreads if no threaded resolver
3741 if test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then
3746 if test "$want_pthreads" != "no"; then
3747 AC_CHECK_HEADER(pthread.h,
3748 [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
3749 save_CFLAGS="$CFLAGS"
3750 dnl When statically linking against boringssl, -lpthread is added to LIBS.
3751 dnl Make sure to that this does not pass the check below, we really want
3752 dnl -pthread in CFLAGS as recommended for GCC. This also ensures that
3753 dnl lib1541 and lib1565 tests are built with these options. Otherwise
3754 dnl they fail the build since tests/libtest/Makefile.am clears LIBS.
3758 dnl Check for libc variants without a separate pthread lib like bionic
3759 AC_CHECK_FUNC(pthread_create, [USE_THREADS_POSIX=1] )
3762 dnl on HPUX, life is more complicated...
3765 dnl it doesn't actually work without -lpthread
3766 USE_THREADS_POSIX=""
3772 dnl if it wasn't found without lib, search for it in pthread lib
3773 if test "$USE_THREADS_POSIX" != "1"
3775 # assign PTHREAD for pkg-config use
3780 dnl Check if compiler is xlC
3781 COMPILER_VERSION=`"$CC" -qversion 2>/dev/null`
3782 if test x"$COMPILER_VERSION" = "x"; then
3783 CFLAGS="$CFLAGS -pthread"
3785 CFLAGS="$CFLAGS -qthreaded"
3789 dnl No -pthread option, but link with -lpthread
3790 PTHREAD=" -lpthread"
3793 CFLAGS="$CFLAGS -pthread"
3796 AC_CHECK_LIB(pthread, pthread_create,
3797 [USE_THREADS_POSIX=1],
3798 [ CFLAGS="$save_CFLAGS"])
3801 if test "x$USE_THREADS_POSIX" = "x1"
3803 AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
3804 curl_res_msg="POSIX threaded"
3809 dnl threaded resolver check
3810 if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then
3811 if test "$want_pthreads" = "yes"; then
3812 AC_MSG_ERROR([--enable-pthreads but pthreads was not found])
3814 dnl If native Windows fallback on Win32 threads since no POSIX threads
3815 if test "$curl_cv_native_windows" = "yes"; then
3817 AC_DEFINE(USE_THREADS_WIN32, 1, [if you want Win32 threaded DNS lookup])
3818 curl_res_msg="Win32 threaded"
3820 AC_MSG_ERROR([Threaded resolver enabled but no thread library found])
3824 CURL_CONVERT_INCLUDE_TO_ISYSTEM
3826 dnl ************************************************************
3827 dnl disable verbose text strings
3829 AC_MSG_CHECKING([whether to enable verbose strings])
3830 AC_ARG_ENABLE(verbose,
3831 AS_HELP_STRING([--enable-verbose],[Enable verbose strings])
3832 AS_HELP_STRING([--disable-verbose],[Disable verbose strings]),
3833 [ case "$enableval" in
3836 AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings])
3837 curl_verbose_msg="no"
3839 *) AC_MSG_RESULT(yes)
3845 dnl ************************************************************
3846 dnl enable SSPI support
3848 AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)])
3850 AS_HELP_STRING([--enable-sspi],[Enable SSPI])
3851 AS_HELP_STRING([--disable-sspi],[Disable SSPI]),
3852 [ case "$enableval" in
3854 if test "$curl_cv_native_windows" = "yes"; then
3856 AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
3857 AC_SUBST(USE_WINDOWS_SSPI, [1])
3858 curl_sspi_msg="enabled"
3861 AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.])
3865 if test "x$SCHANNEL_ENABLED" = "x1"; then
3866 # --with-schannel implies --enable-sspi
3873 if test "x$SCHANNEL_ENABLED" = "x1"; then
3874 # --with-schannel implies --enable-sspi
3881 dnl ************************************************************
3882 dnl disable basic authentication
3884 AC_MSG_CHECKING([whether to enable basic authentication method])
3885 AC_ARG_ENABLE(basic-auth,
3886 AS_HELP_STRING([--enable-basic-auth],[Enable basic authentication (default)])
3887 AS_HELP_STRING([--disable-basic-auth],[Disable basic authentication]),
3888 [ case "$enableval" in
3891 AC_DEFINE(CURL_DISABLE_BASIC_AUTH, 1, [to disable basic authentication])
3892 CURL_DISABLE_BASIC_AUTH=1
3894 *) AC_MSG_RESULT(yes)
3900 dnl ************************************************************
3901 dnl disable bearer authentication
3903 AC_MSG_CHECKING([whether to enable bearer authentication method])
3904 AC_ARG_ENABLE(bearer-auth,
3905 AS_HELP_STRING([--enable-bearer-auth],[Enable bearer authentication (default)])
3906 AS_HELP_STRING([--disable-bearer-auth],[Disable bearer authentication]),
3907 [ case "$enableval" in
3910 AC_DEFINE(CURL_DISABLE_BEARER_AUTH, 1, [to disable bearer authentication])
3911 CURL_DISABLE_BEARER_AUTH=1
3913 *) AC_MSG_RESULT(yes)
3919 dnl ************************************************************
3920 dnl disable digest authentication
3922 AC_MSG_CHECKING([whether to enable digest authentication method])
3923 AC_ARG_ENABLE(digest-auth,
3924 AS_HELP_STRING([--enable-digest-auth],[Enable digest authentication (default)])
3925 AS_HELP_STRING([--disable-digest-auth],[Disable digest authentication]),
3926 [ case "$enableval" in
3929 AC_DEFINE(CURL_DISABLE_DIGEST_AUTH, 1, [to disable digest authentication])
3930 CURL_DISABLE_DIGEST_AUTH=1
3932 *) AC_MSG_RESULT(yes)
3938 dnl ************************************************************
3939 dnl disable kerberos authentication
3941 AC_MSG_CHECKING([whether to enable kerberos authentication method])
3942 AC_ARG_ENABLE(kerberos-auth,
3943 AS_HELP_STRING([--enable-kerberos-auth],[Enable kerberos authentication (default)])
3944 AS_HELP_STRING([--disable-kerberos-auth],[Disable kerberos authentication]),
3945 [ case "$enableval" in
3948 AC_DEFINE(CURL_DISABLE_KERBEROS_AUTH, 1, [to disable kerberos authentication])
3949 CURL_DISABLE_KERBEROS_AUTH=1
3951 *) AC_MSG_RESULT(yes)
3957 dnl ************************************************************
3958 dnl disable negotiate authentication
3960 AC_MSG_CHECKING([whether to enable negotiate authentication method])
3961 AC_ARG_ENABLE(negotiate-auth,
3962 AS_HELP_STRING([--enable-negotiate-auth],[Enable negotiate authentication (default)])
3963 AS_HELP_STRING([--disable-negotiate-auth],[Disable negotiate authentication]),
3964 [ case "$enableval" in
3967 AC_DEFINE(CURL_DISABLE_NEGOTIATE_AUTH, 1, [to disable negotiate authentication])
3968 CURL_DISABLE_NEGOTIATE_AUTH=1
3970 *) AC_MSG_RESULT(yes)
3977 dnl ************************************************************
3980 AC_MSG_CHECKING([whether to enable aws sig methods])
3982 AS_HELP_STRING([--enable-aws],[Enable AWS sig support (default)])
3983 AS_HELP_STRING([--disable-aws],[Disable AWS sig support]),
3984 [ case "$enableval" in
3987 AC_DEFINE(CURL_DISABLE_AWS, 1, [to disable AWS sig support])
3990 *) AC_MSG_RESULT(yes)
3996 dnl ************************************************************
3997 dnl disable NTLM support
3999 AC_MSG_CHECKING([whether to support NTLM])
4001 AS_HELP_STRING([--enable-ntlm],[Enable NTLM support])
4002 AS_HELP_STRING([--disable-ntlm],[Disable NTLM support]),
4003 [ case "$enableval" in
4006 AC_DEFINE(CURL_DISABLE_NTLM, 1, [to disable NTLM support])
4009 *) AC_MSG_RESULT(yes)
4015 CURL_CHECK_OPTION_NTLM_WB
4019 dnl ************************************************************
4020 dnl disable TLS-SRP authentication
4022 AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
4023 AC_ARG_ENABLE(tls-srp,
4024 AS_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
4025 AS_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
4026 [ case "$enableval" in
4031 *) AC_MSG_RESULT(yes)
4039 if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1") ; then
4040 AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
4042 curl_tls_srp_msg="enabled"
4045 dnl ************************************************************
4046 dnl disable Unix domain sockets support
4048 AC_MSG_CHECKING([whether to enable Unix domain sockets])
4049 AC_ARG_ENABLE(unix-sockets,
4050 AS_HELP_STRING([--enable-unix-sockets],[Enable Unix domain sockets])
4051 AS_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]),
4052 [ case "$enableval" in
4053 no) AC_MSG_RESULT(no)
4054 want_unix_sockets=no
4056 *) AC_MSG_RESULT(yes)
4057 want_unix_sockets=yes
4061 want_unix_sockets=auto
4064 if test "x$want_unix_sockets" != "xno"; then
4065 if test "x$curl_cv_native_windows" = "xyes"; then
4067 AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
4068 curl_unix_sockets_msg="enabled"
4070 AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [
4071 AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
4072 AC_SUBST(USE_UNIX_SOCKETS, [1])
4073 curl_unix_sockets_msg="enabled"
4075 if test "x$want_unix_sockets" = "xyes"; then
4076 AC_MSG_ERROR([--enable-unix-sockets is not available on this platform!])
4084 dnl ************************************************************
4085 dnl disable cookies support
4087 AC_MSG_CHECKING([whether to support cookies])
4088 AC_ARG_ENABLE(cookies,
4089 AS_HELP_STRING([--enable-cookies],[Enable cookies support])
4090 AS_HELP_STRING([--disable-cookies],[Disable cookies support]),
4091 [ case "$enableval" in
4094 AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
4096 *) AC_MSG_RESULT(yes)
4102 dnl ************************************************************
4103 dnl disable socketpair
4105 AC_MSG_CHECKING([whether to support socketpair])
4106 AC_ARG_ENABLE(socketpair,
4107 AS_HELP_STRING([--enable-socketpair],[Enable socketpair support])
4108 AS_HELP_STRING([--disable-socketpair],[Disable socketpair support]),
4109 [ case "$enableval" in
4112 AC_DEFINE(CURL_DISABLE_SOCKETPAIR, 1, [to disable socketpair support])
4114 *) AC_MSG_RESULT(yes)
4120 dnl ************************************************************
4121 dnl disable HTTP authentication support
4123 AC_MSG_CHECKING([whether to support HTTP authentication])
4124 AC_ARG_ENABLE(http-auth,
4125 AS_HELP_STRING([--enable-http-auth],[Enable HTTP authentication support])
4126 AS_HELP_STRING([--disable-http-auth],[Disable HTTP authentication support]),
4127 [ case "$enableval" in
4130 AC_DEFINE(CURL_DISABLE_HTTP_AUTH, 1, [disable HTTP authentication])
4132 *) AC_MSG_RESULT(yes)
4138 dnl ************************************************************
4139 dnl disable DoH support
4141 AC_MSG_CHECKING([whether to support DoH])
4143 AS_HELP_STRING([--enable-doh],[Enable DoH support])
4144 AS_HELP_STRING([--disable-doh],[Disable DoH support]),
4145 [ case "$enableval" in
4148 AC_DEFINE(CURL_DISABLE_DOH, 1, [disable DoH])
4150 *) AC_MSG_RESULT(yes)
4156 dnl ************************************************************
4157 dnl disable mime API support
4159 AC_MSG_CHECKING([whether to support the MIME API])
4161 AS_HELP_STRING([--enable-mime],[Enable mime API support])
4162 AS_HELP_STRING([--disable-mime],[Disable mime API support]),
4163 [ case "$enableval" in
4166 AC_DEFINE(CURL_DISABLE_MIME, 1, [disable mime API])
4168 *) AC_MSG_RESULT(yes)
4174 dnl ************************************************************
4175 dnl disable bindlocal
4177 AC_MSG_CHECKING([whether to support binding connections locally])
4178 AC_ARG_ENABLE(bindlocal,
4179 AS_HELP_STRING([--enable-bindlocal],[Enable local binding support])
4180 AS_HELP_STRING([--disable-bindlocal],[Disable local binding support]),
4181 [ case "$enableval" in
4184 AC_DEFINE(CURL_DISABLE_BINDLOCAL, 1, [disable local binding support])
4186 *) AC_MSG_RESULT(yes)
4192 dnl ************************************************************
4193 dnl disable form API support
4195 AC_MSG_CHECKING([whether to support the form API])
4196 AC_ARG_ENABLE(form-api,
4197 AS_HELP_STRING([--enable-form-api],[Enable form API support])
4198 AS_HELP_STRING([--disable-form-api],[Disable form API support]),
4199 [ case "$enableval" in
4200 no) AC_MSG_RESULT(no)
4201 AC_DEFINE(CURL_DISABLE_FORM_API, 1, [disable form API])
4203 *) AC_MSG_RESULT(yes)
4204 test "$enable_mime" = no &&
4205 AC_MSG_ERROR(MIME support needs to be enabled in order to enable form API support)
4209 if test "$enable_mime" = no; then
4212 AC_DEFINE(CURL_DISABLE_FORM_API, 1, [disable form API])
4218 dnl ************************************************************
4219 dnl disable date parsing
4221 AC_MSG_CHECKING([whether to support date parsing])
4222 AC_ARG_ENABLE(dateparse,
4223 AS_HELP_STRING([--enable-dateparse],[Enable date parsing])
4224 AS_HELP_STRING([--disable-dateparse],[Disable date parsing]),
4225 [ case "$enableval" in
4228 AC_DEFINE(CURL_DISABLE_PARSEDATE, 1, [disable date parsing])
4230 *) AC_MSG_RESULT(yes)
4236 dnl ************************************************************
4239 AC_MSG_CHECKING([whether to support netrc parsing])
4240 AC_ARG_ENABLE(netrc,
4241 AS_HELP_STRING([--enable-netrc],[Enable netrc parsing])
4242 AS_HELP_STRING([--disable-netrc],[Disable netrc parsing]),
4243 [ case "$enableval" in
4246 AC_DEFINE(CURL_DISABLE_NETRC, 1, [disable netrc parsing])
4248 *) AC_MSG_RESULT(yes)
4254 dnl ************************************************************
4255 dnl disable progress-meter
4257 AC_MSG_CHECKING([whether to support progress-meter])
4258 AC_ARG_ENABLE(progress-meter,
4259 AS_HELP_STRING([--enable-progress-meter],[Enable progress-meter])
4260 AS_HELP_STRING([--disable-progress-meter],[Disable progress-meter]),
4261 [ case "$enableval" in
4264 AC_DEFINE(CURL_DISABLE_PROGRESS_METER, 1, [disable progress-meter])
4266 *) AC_MSG_RESULT(yes)
4272 dnl ************************************************************
4273 dnl disable shuffle DNS support
4275 AC_MSG_CHECKING([whether to support DNS shuffling])
4276 AC_ARG_ENABLE(dnsshuffle,
4277 AS_HELP_STRING([--enable-dnsshuffle],[Enable DNS shuffling])
4278 AS_HELP_STRING([--disable-dnsshuffle],[Disable DNS shuffling]),
4279 [ case "$enableval" in
4282 AC_DEFINE(CURL_DISABLE_SHUFFLE_DNS, 1, [disable DNS shuffling])
4284 *) AC_MSG_RESULT(yes)
4290 dnl ************************************************************
4291 dnl disable the curl_easy_options API
4293 AC_MSG_CHECKING([whether to support curl_easy_option*])
4294 AC_ARG_ENABLE(get-easy-options,
4295 AS_HELP_STRING([--enable-get-easy-options],[Enable curl_easy_options])
4296 AS_HELP_STRING([--disable-get-easy-options],[Disable curl_easy_options]),
4297 [ case "$enableval" in
4300 AC_DEFINE(CURL_DISABLE_GETOPTIONS, 1, [to disable curl_easy_options])
4302 *) AC_MSG_RESULT(yes)
4308 dnl ************************************************************
4309 dnl switch on/off alt-svc
4311 AC_MSG_CHECKING([whether to support alt-svc])
4312 AC_ARG_ENABLE(alt-svc,
4313 AS_HELP_STRING([--enable-alt-svc],[Enable alt-svc support])
4314 AS_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]),
4315 [ case "$enableval" in
4318 AC_DEFINE(CURL_DISABLE_ALTSVC, 1, [disable alt-svc])
4319 curl_altsvc_msg="no";
4322 *) AC_MSG_RESULT(yes)
4328 dnl ************************************************************
4329 dnl switch on/off headers-api
4331 AC_MSG_CHECKING([whether to support headers-api])
4332 AC_ARG_ENABLE(headers-api,
4333 AS_HELP_STRING([--enable-headers-api],[Enable headers-api support])
4334 AS_HELP_STRING([--disable-headers-api],[Disable headers-api support]),
4335 [ case "$enableval" in
4336 no) AC_MSG_RESULT(no)
4337 curl_headers_msg="no (--enable-headers-api)"
4338 AC_DEFINE(CURL_DISABLE_HEADERS_API, 1, [disable headers-api])
4347 dnl only check for HSTS if there's SSL present
4348 if test -n "$SSL_ENABLED"; then
4349 dnl ************************************************************
4350 dnl switch on/off hsts
4352 AC_MSG_CHECKING([whether to support HSTS])
4354 AS_HELP_STRING([--enable-hsts],[Enable HSTS support])
4355 AS_HELP_STRING([--disable-hsts],[Disable HSTS support]),
4356 [ case "$enableval" in
4361 *) AC_MSG_RESULT(yes)
4364 AC_MSG_RESULT($hsts)
4367 AC_MSG_NOTICE([disables HSTS due to lack of SSL])
4371 if test "x$hsts" != "xyes"; then
4372 curl_hsts_msg="no (--enable-hsts)";
4373 AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable alt-svc])
4376 dnl *************************************************************
4377 dnl check whether ECH support, if desired, is actually available
4379 if test "x$want_ech" != "xno"; then
4380 AC_MSG_CHECKING([whether ECH support is available])
4382 dnl assume NOT and look for sufficient condition
4386 dnl OpenSSL with a chosen ECH function should be enough
4387 dnl so more exhaustive checking seems unnecessary for now
4388 if test "x$OPENSSL_ENABLED" = "x1"; then
4389 AC_CHECK_FUNCS(SSL_get_ech_status,
4390 ECH_SUPPORT="ECH support available (OpenSSL with SSL_get_ech_status)"
4393 dnl add 'elif' chain here for additional implementations
4396 dnl now deal with whatever we found
4397 if test "x$ECH_ENABLED" = "x1"; then
4398 AC_DEFINE(USE_ECH, 1, [if ECH support is available])
4399 AC_MSG_RESULT($ECH_SUPPORT)
4400 experimental="$experimental ECH"
4402 AC_MSG_ERROR([--enable-ech ignored: No ECH support found])
4406 dnl *************************************************************
4407 dnl check whether OpenSSL (lookalikes) have SSL_set0_wbio
4409 if test "x$OPENSSL_ENABLED" = "x1"; then
4410 AC_CHECK_FUNCS([SSL_set0_wbio])
4413 dnl *************************************************************
4416 AC_MSG_CHECKING([whether to support WebSockets])
4417 AC_ARG_ENABLE(websockets,
4418 AS_HELP_STRING([--enable-websockets],[Enable WebSockets support])
4419 AS_HELP_STRING([--disable-websockets],[Disable WebSockets support]),
4420 [ case "$enableval" in
4425 if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
4427 curl_ws_msg="enabled"
4428 AC_DEFINE_UNQUOTED(USE_WEBSOCKETS, [1], [enable websockets support])
4429 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WS"
4430 if test "x$SSL_ENABLED" = "x1"; then
4431 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WSS"
4433 experimental="$experimental Websockets"
4435 dnl websockets requires >32 bit curl_off_t
4437 AC_MSG_WARN([Websockets disabled due to lack of >32 bit curl_off_t])
4445 dnl ************************************************************
4446 dnl hiding of library internal symbols
4448 CURL_CONFIGURE_SYMBOL_HIDING
4451 dnl All the library dependencies put into $LIB apply to libcurl only.
4453 LIBCURL_LIBS="$LIBS$PTHREAD"
4455 AC_SUBST(LIBCURL_LIBS)
4456 AC_SUBST(CURL_NETWORK_LIBS)
4457 AC_SUBST(CURL_NETWORK_AND_TIME_LIBS)
4459 dnl BLANK_AT_MAKETIME may be used in our Makefile.am files to blank
4460 dnl LIBS variable used in generated makefile at makefile processing
4461 dnl time. Doing this functionally prevents LIBS from being used for
4462 dnl all link targets in given makefile.
4464 AC_SUBST(BLANK_AT_MAKETIME)
4466 AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
4469 ENABLE_SHARED="$enable_shared"
4470 AC_SUBST(ENABLE_SHARED)
4472 dnl to let curl-config output the static libraries correctly
4473 ENABLE_STATIC="$enable_static"
4474 AC_SUBST(ENABLE_STATIC)
4476 dnl merge the pkg-config Libs.private field into Libs when static-only
4477 if test "x$enable_shared" = "xno"; then
4478 LIBCURL_NO_SHARED=$LIBCURL_LIBS
4482 AC_SUBST(LIBCURL_NO_SHARED)
4487 dnl For keeping supported features and protocols also in pkg-config file
4488 dnl since it is more cross-compile friendly than curl-config
4491 if test "x$OPENSSL_ENABLED" = "x1"; then
4492 SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
4493 elif test -n "$SSL_ENABLED"; then
4494 SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
4496 if test "x$IPV6_ENABLED" = "x1"; then
4497 SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
4499 if test "x$USE_UNIX_SOCKETS" = "x1"; then
4500 SUPPORT_FEATURES="$SUPPORT_FEATURES UnixSockets"
4502 if test "x$HAVE_LIBZ" = "x1"; then
4503 SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
4505 if test "x$HAVE_BROTLI" = "x1"; then
4506 SUPPORT_FEATURES="$SUPPORT_FEATURES brotli"
4508 if test "x$HAVE_ZSTD" = "x1"; then
4509 SUPPORT_FEATURES="$SUPPORT_FEATURES zstd"
4511 if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \
4512 -o "x$USE_THREADS_WIN32" = "x1"; then
4513 SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
4515 if test "x$IDN_ENABLED" = "x1"; then
4516 SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
4518 if test "x$USE_WINDOWS_SSPI" = "x1"; then
4519 SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
4522 if test "x$HAVE_GSSAPI" = "x1"; then
4523 SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API"
4526 if test "x$curl_psl_msg" = "xenabled"; then
4527 SUPPORT_FEATURES="$SUPPORT_FEATURES PSL"
4530 if test "x$curl_gsasl_msg" = "xenabled"; then
4531 SUPPORT_FEATURES="$SUPPORT_FEATURES GSASL"
4534 if test "x$enable_altsvc" = "xyes"; then
4535 SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc"
4537 if test "x$hsts" = "xyes"; then
4538 SUPPORT_FEATURES="$SUPPORT_FEATURES HSTS"
4541 if test "x$CURL_DISABLE_NEGOTIATE_AUTH" != "x1" -a \
4542 \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
4543 SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
4546 if test "x$CURL_DISABLE_KERBEROS_AUTH" != "x1" -a \
4547 \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
4548 SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos"
4551 use_curl_ntlm_core=no
4553 if test "x$CURL_DISABLE_NTLM" != "x1"; then
4554 if test "x$OPENSSL_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
4555 -o "x$GNUTLS_ENABLED" = "x1" \
4556 -o "x$SECURETRANSPORT_ENABLED" = "x1" \
4557 -o "x$USE_WIN32_CRYPTO" = "x1" \
4558 -o "x$WOLFSSL_NTLM" = "x1"; then
4559 use_curl_ntlm_core=yes
4562 if test "x$use_curl_ntlm_core" = "xyes" \
4563 -o "x$USE_WINDOWS_SSPI" = "x1"; then
4564 SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
4566 if test "x$CURL_DISABLE_HTTP" != "x1" -a \
4567 "x$NTLM_WB_ENABLED" = "x1"; then
4568 SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB"
4573 if test "x$USE_TLS_SRP" = "x1"; then
4574 SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
4577 if test "x$USE_NGHTTP2" = "x1"; then
4578 SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
4581 if test "x$USE_NGTCP2" = "x1" -o "x$USE_QUICHE" = "x1" \
4582 -o "x$USE_MSH3" = "x1"; then
4583 SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3"
4586 if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
4587 SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL"
4590 AC_MSG_CHECKING([if this build supports HTTPS-proxy])
4591 dnl if not explicitly turned off, HTTPS-proxy comes with some TLS backends
4592 if test "x$CURL_DISABLE_HTTP" != "x1"; then
4593 if test "x$https_proxy" != "xno"; then
4594 if test "x$OPENSSL_ENABLED" = "x1" \
4595 -o "x$GNUTLS_ENABLED" = "x1" \
4596 -o "x$SECURETRANSPORT_ENABLED" = "x1" \
4597 -o "x$RUSTLS_ENABLED" = "x1" \
4598 -o "x$BEARSSL_ENABLED" = "x1" \
4599 -o "x$SCHANNEL_ENABLED" = "x1" \
4600 -o "x$GNUTLS_ENABLED" = "x1" \
4601 -o "x$MBEDTLS_ENABLED" = "x1"; then
4602 SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
4603 AC_MSG_RESULT([yes])
4604 elif test "x$WOLFSSL_ENABLED" = "x1" -a "x$WOLFSSL_FULL_BIO" = "x1"; then
4605 SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
4606 AC_MSG_RESULT([yes])
4617 if test "x$ECH_ENABLED" = "x1"; then
4618 SUPPORT_FEATURES="$SUPPORT_FEATURES ECH"
4621 if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
4622 if test ${ac_cv_sizeof_off_t} -gt 4 -o \
4623 "$curl_win32_file_api" = "win32_large_files"; then
4624 SUPPORT_FEATURES="$SUPPORT_FEATURES Largefile"
4628 if test "$tst_atomic" = "yes"; then
4629 SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
4630 elif test "x$USE_THREADS_POSIX" = "x1" -a \
4631 "x$ac_cv_header_pthread_h" = "xyes"; then
4632 SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
4636 #include <windows.h>
4638 #if (WINVER < 0x600) && (_WIN32_WINNT < 0x600)
4643 SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
4648 dnl replace spaces with newlines
4650 dnl replace the newlines back to spaces
4651 SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '`
4652 AC_SUBST(SUPPORT_FEATURES)
4654 dnl For supported protocols in pkg-config file
4655 if test "x$CURL_DISABLE_HTTP" != "x1"; then
4656 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
4657 if test "x$SSL_ENABLED" = "x1"; then
4658 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
4661 if test "x$CURL_DISABLE_FTP" != "x1"; then
4662 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
4663 if test "x$SSL_ENABLED" = "x1"; then
4664 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
4667 if test "x$CURL_DISABLE_FILE" != "x1"; then
4668 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
4670 if test "x$CURL_DISABLE_TELNET" != "x1"; then
4671 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
4673 if test "x$CURL_DISABLE_LDAP" != "x1"; then
4674 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
4675 if test "x$CURL_DISABLE_LDAPS" != "x1"; then
4676 if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
4677 (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then
4678 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
4682 if test "x$CURL_DISABLE_DICT" != "x1"; then
4683 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
4685 if test "x$CURL_DISABLE_TFTP" != "x1"; then
4686 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
4688 if test "x$CURL_DISABLE_GOPHER" != "x1"; then
4689 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
4690 if test "x$SSL_ENABLED" = "x1"; then
4691 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHERS"
4694 if test "x$CURL_DISABLE_MQTT" != "x1"; then
4695 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS MQTT"
4697 if test "x$CURL_DISABLE_POP3" != "x1"; then
4698 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
4699 if test "x$SSL_ENABLED" = "x1"; then
4700 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S"
4703 if test "x$CURL_DISABLE_IMAP" != "x1"; then
4704 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP"
4705 if test "x$SSL_ENABLED" = "x1"; then
4706 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
4709 if test "x$CURL_DISABLE_SMB" != "x1" \
4710 -a "x$use_curl_ntlm_core" = "xyes"; then
4711 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB"
4712 if test "x$SSL_ENABLED" = "x1"; then
4713 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS"
4716 if test "x$CURL_DISABLE_SMTP" != "x1"; then
4717 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
4718 if test "x$SSL_ENABLED" = "x1"; then
4719 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS"
4722 if test "x$USE_LIBSSH2" = "x1"; then
4723 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
4724 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
4726 if test "x$USE_LIBSSH" = "x1"; then
4727 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
4728 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
4730 if test "x$USE_WOLFSSH" = "x1"; then
4731 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
4733 if test "x$CURL_DISABLE_RTSP" != "x1"; then
4734 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
4736 if test "x$USE_LIBRTMP" = "x1"; then
4737 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
4740 dnl replace spaces with newlines
4742 dnl replace the newlines back to spaces
4743 SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '`
4745 AC_SUBST(SUPPORT_PROTOCOLS)
4747 dnl squeeze whitespace out of some variables
4755 squeeze LIBCURL_LIBS
4756 squeeze CURL_NETWORK_LIBS
4757 squeeze CURL_NETWORK_AND_TIME_LIBS
4759 squeeze SUPPORT_FEATURES
4760 squeeze SUPPORT_PROTOCOLS
4762 XC_CHECK_BUILD_FLAGS
4764 SSL_BACKENDS=${ssl_backends}
4765 AC_SUBST(SSL_BACKENDS)
4767 if test "x$want_curldebug_assumed" = "xyes" &&
4768 test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
4769 ac_configure_args="$ac_configure_args --enable-curldebug"
4772 AC_CONFIG_FILES([Makefile \
4774 docs/examples/Makefile \
4775 docs/libcurl/Makefile \
4776 docs/libcurl/opts/Makefile \
4777 docs/cmdline-opts/Makefile \
4779 include/curl/Makefile \
4787 tests/certs/Makefile \
4788 tests/certs/scripts/Makefile \
4789 tests/data/Makefile \
4790 tests/server/Makefile \
4791 tests/libtest/Makefile \
4792 tests/unit/Makefile \
4793 tests/http/config.ini \
4794 tests/http/Makefile \
4795 tests/http/clients/Makefile \
4797 packages/vms/Makefile \
4803 CURL_GENERATE_CONFIGUREHELP_PM
4805 AC_MSG_NOTICE([Configured to build curl/libcurl:
4808 Install prefix: ${prefix}
4811 CPPFLAGS: ${CPPFLAGS}
4815 curl version: ${CURLVERSION}
4816 SSL: ${curl_ssl_msg}
4817 SSH: ${curl_ssh_msg}
4818 zlib: ${curl_zlib_msg}
4819 brotli: ${curl_brotli_msg}
4820 zstd: ${curl_zstd_msg}
4821 GSS-API: ${curl_gss_msg}
4822 GSASL: ${curl_gsasl_msg}
4823 TLS-SRP: ${curl_tls_srp_msg}
4824 resolver: ${curl_res_msg}
4825 IPv6: ${curl_ipv6_msg}
4826 Unix sockets: ${curl_unix_sockets_msg}
4827 IDN: ${curl_idn_msg}
4828 Build libcurl: Shared=${enable_shared}, Static=${enable_static}
4829 Built-in manual: ${curl_manual_msg}
4830 --libcurl option: ${curl_libcurl_msg}
4831 Verbose errors: ${curl_verbose_msg}
4832 Code coverage: ${curl_coverage_msg}
4833 SSPI: ${curl_sspi_msg}
4834 ca cert bundle: ${ca}${ca_warning}
4835 ca cert path: ${capath}${capath_warning}
4836 ca fallback: ${with_ca_fallback}
4837 LDAP: ${curl_ldap_msg}
4838 LDAPS: ${curl_ldaps_msg}
4839 RTSP: ${curl_rtsp_msg}
4840 RTMP: ${curl_rtmp_msg}
4841 PSL: ${curl_psl_msg}
4842 Alt-svc: ${curl_altsvc_msg}
4843 Headers API: ${curl_headers_msg}
4844 HSTS: ${curl_hsts_msg}
4845 HTTP1: ${curl_h1_msg}
4846 HTTP2: ${curl_h2_msg}
4847 HTTP3: ${curl_h3_msg}
4848 ECH: ${curl_ech_msg}
4849 WebSockets: ${curl_ws_msg}
4850 Protocols: ${SUPPORT_PROTOCOLS}
4851 Features: ${SUPPORT_FEATURES}
4853 if test -n "$experimental"; then
4855 WARNING: $experimental enabled but marked EXPERIMENTAL. Use with caution!