File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / configure.ac
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Jun 3 10:01:14 2020 UTC (4 years ago) by misho
Branches: curl, MAIN
CVS tags: v7_70_0p4, HEAD
curl

    1: #***************************************************************************
    2: #                                  _   _ ____  _
    3: #  Project                     ___| | | |  _ \| |
    4: #                             / __| | | | |_) | |
    5: #                            | (__| |_| |  _ <| |___
    6: #                             \___|\___/|_| \_\_____|
    7: #
    8: # Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
    9: #
   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.haxx.se/docs/copyright.html.
   13: #
   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.
   17: #
   18: # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
   19: # KIND, either express or implied.
   20: #
   21: #***************************************************************************
   22: dnl Process this file with autoconf to produce a configure script.
   23: 
   24: AC_PREREQ(2.57)
   25: 
   26: dnl We don't know the version number "statically" so we use a dash here
   27: AC_INIT([curl], [-], [a suitable curl mailing list: https://curl.haxx.se/mail/])
   28: 
   29: XC_OVR_ZZ50
   30: XC_OVR_ZZ60
   31: CURL_OVERRIDE_AUTOCONF
   32: 
   33: dnl configure script copyright
   34: AC_COPYRIGHT([Copyright (c) 1998 - 2020 Daniel Stenberg, <daniel@haxx.se>
   35: This configure script may be copied, distributed and modified under the
   36: terms of the curl license; see COPYING for more details])
   37: 
   38: AC_CONFIG_SRCDIR([lib/urldata.h])
   39: AC_CONFIG_HEADERS(lib/curl_config.h)
   40: AC_CONFIG_MACRO_DIR([m4])
   41: AM_MAINTAINER_MODE
   42: m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
   43: 
   44: CURL_CHECK_OPTION_DEBUG
   45: CURL_CHECK_OPTION_OPTIMIZE
   46: CURL_CHECK_OPTION_WARNINGS
   47: CURL_CHECK_OPTION_WERROR
   48: CURL_CHECK_OPTION_CURLDEBUG
   49: CURL_CHECK_OPTION_SYMBOL_HIDING
   50: CURL_CHECK_OPTION_ARES
   51: CURL_CHECK_OPTION_RT
   52: CURL_CHECK_OPTION_ESNI
   53: 
   54: XC_CHECK_PATH_SEPARATOR
   55: 
   56: #
   57: # save the configure arguments
   58: #
   59: CONFIGURE_OPTIONS="\"$ac_configure_args\""
   60: AC_SUBST(CONFIGURE_OPTIONS)
   61: 
   62: dnl SED is mandatory for configure process and libtool.
   63: dnl Set it now, allowing it to be changed later.
   64: if test -z "$SED"; then
   65:   dnl allow it to be overridden
   66:   AC_PATH_PROG([SED], [sed], [not_found],
   67:     [$PATH:/usr/bin:/usr/local/bin])
   68:   if test -z "$SED" || test "$SED" = "not_found"; then
   69:     AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
   70:   fi
   71: fi
   72: AC_SUBST([SED])
   73: 
   74: dnl GREP is mandatory for configure process and libtool.
   75: dnl Set it now, allowing it to be changed later.
   76: if test -z "$GREP"; then
   77:   dnl allow it to be overridden
   78:   AC_PATH_PROG([GREP], [grep], [not_found],
   79:     [$PATH:/usr/bin:/usr/local/bin])
   80:   if test -z "$GREP" || test "$GREP" = "not_found"; then
   81:     AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
   82:   fi
   83: fi
   84: AC_SUBST([GREP])
   85: 
   86: dnl EGREP is mandatory for configure process and libtool.
   87: dnl Set it now, allowing it to be changed later.
   88: if test -z "$EGREP"; then
   89:   dnl allow it to be overridden
   90:   if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
   91:     AC_MSG_CHECKING([for egrep])
   92:     EGREP="$GREP -E"
   93:     AC_MSG_RESULT([$EGREP])
   94:   else
   95:     AC_PATH_PROG([EGREP], [egrep], [not_found],
   96:       [$PATH:/usr/bin:/usr/local/bin])
   97:   fi
   98: fi
   99: if test -z "$EGREP" || test "$EGREP" = "not_found"; then
  100:   AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
  101: fi
  102: AC_SUBST([EGREP])
  103: 
  104: dnl AR is mandatory for configure process and libtool.
  105: dnl This is target dependent, so check it as a tool.
  106: if test -z "$AR"; then
  107:   dnl allow it to be overridden
  108:   AC_PATH_TOOL([AR], [ar], [not_found],
  109:     [$PATH:/usr/bin:/usr/local/bin])
  110:   if test -z "$AR" || test "$AR" = "not_found"; then
  111:     AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
  112:   fi
  113: fi
  114: AC_SUBST([AR])
  115: 
  116: AC_SUBST(libext)
  117: 
  118: dnl figure out the libcurl version
  119: CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h`
  120: XC_CHECK_PROG_CC
  121: 
  122: dnl for --enable-code-coverage
  123: CURL_COVERAGE
  124: 
  125: XC_AUTOMAKE
  126: AC_MSG_CHECKING([curl version])
  127: AC_MSG_RESULT($CURLVERSION)
  128: 
  129: AC_SUBST(CURLVERSION)
  130: 
  131: dnl
  132: dnl we extract the numerical version for curl-config only
  133: VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\([0-9A-Fa-f]*\).*/\1/p' ${srcdir}/include/curl/curlver.h`
  134: AC_SUBST(VERSIONNUM)
  135: 
  136: dnl Solaris pkgadd support definitions
  137: PKGADD_PKG="HAXXcurl"
  138: PKGADD_NAME="curl - a client that groks URLs"
  139: PKGADD_VENDOR="curl.haxx.se"
  140: AC_SUBST(PKGADD_PKG)
  141: AC_SUBST(PKGADD_NAME)
  142: AC_SUBST(PKGADD_VENDOR)
  143: 
  144: dnl
  145: dnl initialize all the info variables
  146:     curl_ssl_msg="no      (--with-{ssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,mesalink,amissl,bearssl} )"
  147:     curl_ssh_msg="no      (--with-{libssh,libssh2})"
  148:    curl_zlib_msg="no      (--with-zlib)"
  149:  curl_brotli_msg="no      (--with-brotli)"
  150:     curl_gss_msg="no      (--with-gssapi)"
  151: curl_tls_srp_msg="no      (--enable-tls-srp)"
  152:     curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
  153:    curl_ipv6_msg="no      (--enable-ipv6)"
  154: curl_unix_sockets_msg="no      (--enable-unix-sockets)"
  155:     curl_idn_msg="no      (--with-{libidn2,winidn})"
  156:  curl_manual_msg="no      (--enable-manual)"
  157: curl_libcurl_msg="enabled (--disable-libcurl-option)"
  158: curl_verbose_msg="enabled (--disable-verbose)"
  159:    curl_sspi_msg="no      (--enable-sspi)"
  160:    curl_ldap_msg="no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
  161:   curl_ldaps_msg="no      (--enable-ldaps)"
  162:    curl_rtsp_msg="no      (--enable-rtsp)"
  163:    curl_rtmp_msg="no      (--with-librtmp)"
  164:   curl_mtlnk_msg="no      (--with-libmetalink)"
  165:     curl_psl_msg="no      (--with-libpsl)"
  166: 
  167:     ssl_backends=
  168: 
  169: dnl
  170: dnl Save some initial values the user might have provided
  171: dnl
  172: INITIAL_LDFLAGS=$LDFLAGS
  173: INITIAL_LIBS=$LIBS
  174: 
  175: dnl
  176: dnl Detect the canonical host and target build environment
  177: dnl
  178: 
  179: AC_CANONICAL_HOST
  180: dnl Get system canonical name
  181: AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
  182: 
  183: # Silence warning: ar: 'u' modifier ignored since 'D' is the default
  184: AC_SUBST(AR_FLAGS, [cr])
  185: 
  186: dnl This defines _ALL_SOURCE for AIX
  187: CURL_CHECK_AIX_ALL_SOURCE
  188: 
  189: dnl Our configure and build reentrant settings
  190: CURL_CONFIGURE_THREAD_SAFE
  191: CURL_CONFIGURE_REENTRANT
  192: 
  193: dnl check for how to do large files
  194: AC_SYS_LARGEFILE
  195: 
  196: XC_LIBTOOL
  197: 
  198: #
  199: # Automake conditionals based on libtool related checks
  200: #
  201: 
  202: AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSION_INFO],
  203:   [test "x$xc_lt_shlib_use_version_info" = 'xyes'])
  204: AM_CONDITIONAL([CURL_LT_SHLIB_USE_NO_UNDEFINED],
  205:   [test "x$xc_lt_shlib_use_no_undefined" = 'xyes'])
  206: AM_CONDITIONAL([CURL_LT_SHLIB_USE_MIMPURE_TEXT],
  207:   [test "x$xc_lt_shlib_use_mimpure_text" = 'xyes'])
  208: 
  209: #
  210: # Due to libtool and automake machinery limitations of not allowing
  211: # specifying separate CPPFLAGS or CFLAGS when compiling objects for
  212: # inclusion of these in shared or static libraries, we are forced to
  213: # build using separate configure runs for shared and static libraries
  214: # on systems where different CPPFLAGS or CFLAGS are mandatory in order
  215: # to compile objects for each kind of library. Notice that relying on
  216: # the '-DPIC' CFLAG that libtool provides is not valid given that the
  217: # user might for example choose to build static libraries with PIC.
  218: #
  219: 
  220: #
  221: # Make our Makefile.am files use the staticlib CPPFLAG only when strictly
  222: # targeting a static library and not building its shared counterpart.
  223: #
  224: 
  225: AM_CONDITIONAL([USE_CPPFLAG_CURL_STATICLIB],
  226:   [test "x$xc_lt_build_static_only" = 'xyes'])
  227: 
  228: #
  229: # Make staticlib CPPFLAG variable and its definition visible in output
  230: # files unconditionally, providing an empty definition unless strictly
  231: # targeting a static library and not building its shared counterpart.
  232: #
  233: 
  234: CPPFLAG_CURL_STATICLIB=
  235: if test "x$xc_lt_build_static_only" = 'xyes'; then
  236:   CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB'
  237: fi
  238: AC_SUBST([CPPFLAG_CURL_STATICLIB])
  239: 
  240: 
  241: # Determine whether all dependent libraries must be specified when linking
  242: if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
  243: then
  244:     REQUIRE_LIB_DEPS=no
  245: else
  246:     REQUIRE_LIB_DEPS=yes
  247: fi
  248: AC_SUBST(REQUIRE_LIB_DEPS)
  249: AM_CONDITIONAL(USE_EXPLICIT_LIB_DEPS, test x$REQUIRE_LIB_DEPS = xyes)
  250: 
  251: dnl check if there's a way to force code inline
  252: AC_C_INLINE
  253: 
  254: dnl **********************************************************************
  255: dnl platform/compiler/architecture specific checks/flags
  256: dnl **********************************************************************
  257: 
  258: CURL_CHECK_COMPILER
  259: CURL_SET_COMPILER_BASIC_OPTS
  260: CURL_SET_COMPILER_DEBUG_OPTS
  261: CURL_SET_COMPILER_OPTIMIZE_OPTS
  262: CURL_SET_COMPILER_WARNING_OPTS
  263: 
  264: if test "$compiler_id" = "INTEL_UNIX_C"; then
  265:   #
  266:   if test "$compiler_num" -ge "1000"; then
  267:     dnl icc 10.X or later
  268:     CFLAGS="$CFLAGS -shared-intel"
  269:   elif test "$compiler_num" -ge "900"; then
  270:     dnl icc 9.X specific
  271:     CFLAGS="$CFLAGS -i-dynamic"
  272:   fi
  273:   #
  274: fi
  275: 
  276: CURL_CFLAG_EXTRAS=""
  277: if test X"$want_werror" = Xyes; then
  278:   CURL_CFLAG_EXTRAS="-Werror"
  279:   if test "$compiler_id" = "GNU_C"; then
  280:     dnl enable -pedantic-errors for GCC 5 and later,
  281:     dnl as before that it was the same as -Werror=pedantic
  282:     if test "$compiler_num" -ge "500"; then
  283:       CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors"
  284:     fi
  285:   fi
  286: fi
  287: AC_SUBST(CURL_CFLAG_EXTRAS)
  288: 
  289: CURL_CHECK_COMPILER_HALT_ON_ERROR
  290: CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
  291: CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
  292: CURL_CHECK_COMPILER_SYMBOL_HIDING
  293: 
  294: CURL_CHECK_CURLDEBUG
  295: AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
  296: 
  297: supports_unittests=yes
  298: # cross-compilation of unit tests static library/programs fails when
  299: # libcurl shared library is built. This might be due to a libtool or
  300: # automake issue. In this case we disable unit tests.
  301: if test "x$cross_compiling" != "xno" &&
  302:    test "x$enable_shared" != "xno"; then
  303:   supports_unittests=no
  304: fi
  305: 
  306: # IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
  307: # a problem related with OpenSSL headers and library versions not matching.
  308: # Disable unit tests while time to further investigate this is found.
  309: case $host in
  310:   mips-sgi-irix6.5)
  311:     if test "$compiler_id" = "GNU_C"; then
  312:       supports_unittests=no
  313:     fi
  314:     ;;
  315: esac
  316: 
  317: # All AIX autobuilds fails unit tests linking against unittests library
  318: # due to unittests library being built with no symbols or members. Libtool ?
  319: # Disable unit tests while time to further investigate this is found.
  320: case $host_os in
  321:   aix*)
  322:     supports_unittests=no
  323:     ;;
  324: esac
  325: 
  326: dnl Build unit tests when option --enable-debug is given.
  327: if test "x$want_debug" = "xyes" &&
  328:    test "x$supports_unittests" = "xyes"; then
  329:   want_unittests=yes
  330: else
  331:   want_unittests=no
  332: fi
  333: AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes)
  334: 
  335: dnl **********************************************************************
  336: dnl Compilation based checks should not be done before this point.
  337: dnl **********************************************************************
  338: 
  339: dnl **********************************************************************
  340: dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
  341: dnl and ws2tcpip.h take precedence over any other further checks which
  342: dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
  343: dnl this specific header files. And do them before its results are used.
  344: dnl **********************************************************************
  345: 
  346: CURL_CHECK_HEADER_WINDOWS
  347: CURL_CHECK_NATIVE_WINDOWS
  348: case X-"$curl_cv_native_windows" in
  349:   X-yes)
  350:     CURL_CHECK_HEADER_WINSOCK
  351:     CURL_CHECK_HEADER_WINSOCK2
  352:     CURL_CHECK_HEADER_WS2TCPIP
  353:     CURL_CHECK_HEADER_WINLDAP
  354:     CURL_CHECK_HEADER_WINBER
  355:     ;;
  356:   *)
  357:     curl_cv_header_winsock_h="no"
  358:     curl_cv_header_winsock2_h="no"
  359:     curl_cv_header_ws2tcpip_h="no"
  360:     curl_cv_header_winldap_h="no"
  361:     curl_cv_header_winber_h="no"
  362:     ;;
  363: esac
  364: CURL_CHECK_WIN32_LARGEFILE
  365: 
  366: CURL_MAC_CFLAGS
  367: CURL_SUPPORTS_BUILTIN_AVAILABLE
  368: 
  369: 
  370: dnl ************************************************************
  371: dnl switch off particular protocols
  372: dnl
  373: AC_MSG_CHECKING([whether to support http])
  374: AC_ARG_ENABLE(http,
  375: AC_HELP_STRING([--enable-http],[Enable HTTP support])
  376: AC_HELP_STRING([--disable-http],[Disable HTTP support]),
  377: [ case "$enableval" in
  378:   no)
  379:        AC_MSG_RESULT(no)
  380:        AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP])
  381:        disable_http="yes"
  382:        AC_MSG_WARN([disable HTTP disables FTP over proxy and RTSP])
  383:        AC_SUBST(CURL_DISABLE_HTTP, [1])
  384:        AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
  385:        AC_SUBST(CURL_DISABLE_RTSP, [1])
  386:        ;;
  387:   *)   AC_MSG_RESULT(yes)
  388:        ;;
  389:   esac ],
  390:        AC_MSG_RESULT(yes)
  391: )
  392: AC_MSG_CHECKING([whether to support ftp])
  393: AC_ARG_ENABLE(ftp,
  394: AC_HELP_STRING([--enable-ftp],[Enable FTP support])
  395: AC_HELP_STRING([--disable-ftp],[Disable FTP support]),
  396: [ case "$enableval" in
  397:   no)
  398:        AC_MSG_RESULT(no)
  399:        AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP])
  400:        AC_SUBST(CURL_DISABLE_FTP, [1])
  401:        ;;
  402:   *)   AC_MSG_RESULT(yes)
  403:        ;;
  404:   esac ],
  405:        AC_MSG_RESULT(yes)
  406: )
  407: AC_MSG_CHECKING([whether to support file])
  408: AC_ARG_ENABLE(file,
  409: AC_HELP_STRING([--enable-file],[Enable FILE support])
  410: AC_HELP_STRING([--disable-file],[Disable FILE support]),
  411: [ case "$enableval" in
  412:   no)
  413:        AC_MSG_RESULT(no)
  414:        AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE])
  415:        AC_SUBST(CURL_DISABLE_FILE, [1])
  416:        ;;
  417:   *)   AC_MSG_RESULT(yes)
  418:        ;;
  419:   esac ],
  420:        AC_MSG_RESULT(yes)
  421: )
  422: AC_MSG_CHECKING([whether to support ldap])
  423: AC_ARG_ENABLE(ldap,
  424: AC_HELP_STRING([--enable-ldap],[Enable LDAP support])
  425: AC_HELP_STRING([--disable-ldap],[Disable LDAP support]),
  426: [ case "$enableval" in
  427:   no)
  428:        AC_MSG_RESULT(no)
  429:        AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
  430:        AC_SUBST(CURL_DISABLE_LDAP, [1])
  431:        ;;
  432:   *)
  433:        AC_MSG_RESULT(yes)
  434:        ;;
  435:   esac ],[
  436:        AC_MSG_RESULT(yes) ]
  437: )
  438: AC_MSG_CHECKING([whether to support ldaps])
  439: AC_ARG_ENABLE(ldaps,
  440: AC_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
  441: AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
  442: [ case "$enableval" in
  443:   no)
  444:        AC_MSG_RESULT(no)
  445:        AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  446:        AC_SUBST(CURL_DISABLE_LDAPS, [1])
  447:        ;;
  448:   *)   if test "x$CURL_DISABLE_LDAP" = "x1" ; then
  449:          AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS)
  450:          AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  451:          AC_SUBST(CURL_DISABLE_LDAPS, [1])
  452:        else
  453:          AC_MSG_RESULT(yes)
  454:          AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
  455:          AC_SUBST(HAVE_LDAP_SSL, [1])
  456:        fi
  457:        ;;
  458:   esac ],[
  459:        if test "x$CURL_DISABLE_LDAP" = "x1" ; then
  460:          AC_MSG_RESULT(no)
  461:          AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  462:          AC_SUBST(CURL_DISABLE_LDAPS, [1])
  463:        else
  464:          AC_MSG_RESULT(yes)
  465:          AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
  466:          AC_SUBST(HAVE_LDAP_SSL, [1])
  467:        fi ]
  468: )
  469: 
  470: AC_MSG_CHECKING([whether to support rtsp])
  471: AC_ARG_ENABLE(rtsp,
  472: AC_HELP_STRING([--enable-rtsp],[Enable RTSP support])
  473: AC_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
  474: [ case "$enableval" in
  475:   no)
  476:        AC_MSG_RESULT(no)
  477:        AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
  478:        AC_SUBST(CURL_DISABLE_RTSP, [1])
  479:        ;;
  480:   *)   if test x$CURL_DISABLE_HTTP = x1 ; then
  481:           AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
  482:        else
  483:           AC_MSG_RESULT(yes)
  484:           curl_rtsp_msg="enabled"
  485:        fi
  486:        ;;
  487:   esac ],
  488:        if test "x$CURL_DISABLE_HTTP" != "x1"; then
  489:           AC_MSG_RESULT(yes)
  490:           curl_rtsp_msg="enabled"
  491:        else
  492:           AC_MSG_RESULT(no)
  493:        fi
  494: )
  495: 
  496: AC_MSG_CHECKING([whether to support proxies])
  497: AC_ARG_ENABLE(proxy,
  498: AC_HELP_STRING([--enable-proxy],[Enable proxy support])
  499: AC_HELP_STRING([--disable-proxy],[Disable proxy support]),
  500: [ case "$enableval" in
  501:   no)
  502:        AC_MSG_RESULT(no)
  503:        AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies])
  504:        AC_SUBST(CURL_DISABLE_PROXY, [1])
  505:        ;;
  506:   *)   AC_MSG_RESULT(yes)
  507:        ;;
  508:   esac ],
  509:        AC_MSG_RESULT(yes)
  510: )
  511: 
  512: AC_MSG_CHECKING([whether to support dict])
  513: AC_ARG_ENABLE(dict,
  514: AC_HELP_STRING([--enable-dict],[Enable DICT support])
  515: AC_HELP_STRING([--disable-dict],[Disable DICT support]),
  516: [ case "$enableval" in
  517:   no)
  518:        AC_MSG_RESULT(no)
  519:        AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT])
  520:        AC_SUBST(CURL_DISABLE_DICT, [1])
  521:        ;;
  522:   *)   AC_MSG_RESULT(yes)
  523:        ;;
  524:   esac ],
  525:        AC_MSG_RESULT(yes)
  526: )
  527: AC_MSG_CHECKING([whether to support telnet])
  528: AC_ARG_ENABLE(telnet,
  529: AC_HELP_STRING([--enable-telnet],[Enable TELNET support])
  530: AC_HELP_STRING([--disable-telnet],[Disable TELNET support]),
  531: [ case "$enableval" in
  532:   no)
  533:        AC_MSG_RESULT(no)
  534:        AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
  535:        AC_SUBST(CURL_DISABLE_TELNET, [1])
  536:        ;;
  537:   *)   AC_MSG_RESULT(yes)
  538:        ;;
  539:   esac ],
  540:        AC_MSG_RESULT(yes)
  541: )
  542: AC_MSG_CHECKING([whether to support tftp])
  543: AC_ARG_ENABLE(tftp,
  544: AC_HELP_STRING([--enable-tftp],[Enable TFTP support])
  545: AC_HELP_STRING([--disable-tftp],[Disable TFTP support]),
  546: [ case "$enableval" in
  547:   no)
  548:        AC_MSG_RESULT(no)
  549:        AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP])
  550:        AC_SUBST(CURL_DISABLE_TFTP, [1])
  551:        ;;
  552:   *)   AC_MSG_RESULT(yes)
  553:        ;;
  554:   esac ],
  555:        AC_MSG_RESULT(yes)
  556: )
  557: 
  558: AC_MSG_CHECKING([whether to support pop3])
  559: AC_ARG_ENABLE(pop3,
  560: AC_HELP_STRING([--enable-pop3],[Enable POP3 support])
  561: AC_HELP_STRING([--disable-pop3],[Disable POP3 support]),
  562: [ case "$enableval" in
  563:   no)
  564:        AC_MSG_RESULT(no)
  565:        AC_DEFINE(CURL_DISABLE_POP3, 1, [to disable POP3])
  566:        AC_SUBST(CURL_DISABLE_POP3, [1])
  567:        ;;
  568:   *)   AC_MSG_RESULT(yes)
  569:        ;;
  570:   esac ],
  571:        AC_MSG_RESULT(yes)
  572: )
  573: 
  574: 
  575: AC_MSG_CHECKING([whether to support imap])
  576: AC_ARG_ENABLE(imap,
  577: AC_HELP_STRING([--enable-imap],[Enable IMAP support])
  578: AC_HELP_STRING([--disable-imap],[Disable IMAP support]),
  579: [ case "$enableval" in
  580:   no)
  581:        AC_MSG_RESULT(no)
  582:        AC_DEFINE(CURL_DISABLE_IMAP, 1, [to disable IMAP])
  583:        AC_SUBST(CURL_DISABLE_IMAP, [1])
  584:        ;;
  585:   *)   AC_MSG_RESULT(yes)
  586:        ;;
  587:   esac ],
  588:        AC_MSG_RESULT(yes)
  589: )
  590: 
  591: 
  592: AC_MSG_CHECKING([whether to support smb])
  593: AC_ARG_ENABLE(smb,
  594: AC_HELP_STRING([--enable-smb],[Enable SMB/CIFS support])
  595: AC_HELP_STRING([--disable-smb],[Disable SMB/CIFS support]),
  596: [ case "$enableval" in
  597:   no)
  598:        AC_MSG_RESULT(no)
  599:        AC_DEFINE(CURL_DISABLE_SMB, 1, [to disable SMB/CIFS])
  600:        AC_SUBST(CURL_DISABLE_SMB, [1])
  601:        ;;
  602:   *)   AC_MSG_RESULT(yes)
  603:        ;;
  604:   esac ],
  605:        AC_MSG_RESULT(yes)
  606: )
  607: 
  608: AC_MSG_CHECKING([whether to support smtp])
  609: AC_ARG_ENABLE(smtp,
  610: AC_HELP_STRING([--enable-smtp],[Enable SMTP support])
  611: AC_HELP_STRING([--disable-smtp],[Disable SMTP support]),
  612: [ case "$enableval" in
  613:   no)
  614:        AC_MSG_RESULT(no)
  615:        AC_DEFINE(CURL_DISABLE_SMTP, 1, [to disable SMTP])
  616:        AC_SUBST(CURL_DISABLE_SMTP, [1])
  617:        ;;
  618:   *)   AC_MSG_RESULT(yes)
  619:        ;;
  620:   esac ],
  621:        AC_MSG_RESULT(yes)
  622: )
  623: 
  624: AC_MSG_CHECKING([whether to support gopher])
  625: AC_ARG_ENABLE(gopher,
  626: AC_HELP_STRING([--enable-gopher],[Enable Gopher support])
  627: AC_HELP_STRING([--disable-gopher],[Disable Gopher support]),
  628: [ case "$enableval" in
  629:   no)
  630:        AC_MSG_RESULT(no)
  631:        AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher])
  632:        AC_SUBST(CURL_DISABLE_GOPHER, [1])
  633:        ;;
  634:   *)   AC_MSG_RESULT(yes)
  635:        ;;
  636:   esac ],
  637:        AC_MSG_RESULT(yes)
  638: )
  639: 
  640: AC_MSG_CHECKING([whether to support mqtt])
  641: AC_ARG_ENABLE(mqtt,
  642: AC_HELP_STRING([--enable-mqtt],[Enable MQTT support])
  643: AC_HELP_STRING([--disable-mqtt],[Disable MQTT support]),
  644: [ case "$enableval" in
  645:   no)
  646:        AC_MSG_RESULT(no)
  647:        ;;
  648:   *)   AC_MSG_RESULT(yes)
  649:        experimental="$experimental MQTT"
  650:        AC_DEFINE(CURL_ENABLE_MQTT, 1, [to enable MQTT])
  651:        AC_SUBST(CURL_ENABLE_MQTT, [1])
  652:        ;;
  653:   esac ],
  654:        AC_MSG_RESULT(no)
  655: )
  656: 
  657: dnl **********************************************************************
  658: dnl Check for built-in manual
  659: dnl **********************************************************************
  660: 
  661: AC_MSG_CHECKING([whether to provide built-in manual])
  662: AC_ARG_ENABLE(manual,
  663: AC_HELP_STRING([--enable-manual],[Enable built-in manual])
  664: AC_HELP_STRING([--disable-manual],[Disable built-in manual]),
  665: [ case "$enableval" in
  666:   no)
  667:        AC_MSG_RESULT(no)
  668:        ;;
  669:   *)   AC_MSG_RESULT(yes)
  670:        USE_MANUAL="1"
  671:        ;;
  672:   esac ],
  673:        AC_MSG_RESULT(yes)
  674:        USE_MANUAL="1"
  675: )
  676: dnl The actual use of the USE_MANUAL variable is done much later in this
  677: dnl script to allow other actions to disable it as well.
  678: 
  679: dnl ************************************************************
  680: dnl disable C code generation support
  681: dnl
  682: AC_MSG_CHECKING([whether to enable generation of C code])
  683: AC_ARG_ENABLE(libcurl_option,
  684: AC_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
  685: AC_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
  686: [ case "$enableval" in
  687:   no)
  688:        AC_MSG_RESULT(no)
  689:        AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option])
  690:        curl_libcurl_msg="no"
  691:        ;;
  692:   *)   AC_MSG_RESULT(yes)
  693:        ;;
  694:   esac ],
  695:        AC_MSG_RESULT(yes)
  696: )
  697: 
  698: dnl **********************************************************************
  699: dnl Checks for libraries.
  700: dnl **********************************************************************
  701: 
  702: AC_MSG_CHECKING([whether to use libgcc])
  703: AC_ARG_ENABLE(libgcc,
  704: AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
  705: [ case "$enableval" in
  706:   yes)
  707:        LIBS="-lgcc $LIBS"
  708:        AC_MSG_RESULT(yes)
  709:        ;;
  710:   *)   AC_MSG_RESULT(no)
  711:        ;;
  712:   esac ],
  713:        AC_MSG_RESULT(no)
  714: )
  715: 
  716: CURL_CHECK_LIB_XNET
  717: 
  718: dnl gethostbyname without lib or in the nsl lib?
  719: AC_CHECK_FUNC(gethostbyname,
  720:               [HAVE_GETHOSTBYNAME="1"
  721:               ],
  722:               [ AC_CHECK_LIB(nsl, gethostbyname,
  723:                              [HAVE_GETHOSTBYNAME="1"
  724:                              LIBS="-lnsl $LIBS"
  725:                              ])
  726:               ])
  727: 
  728: if test "$HAVE_GETHOSTBYNAME" != "1"
  729: then
  730:   dnl gethostbyname in the socket lib?
  731:   AC_CHECK_LIB(socket, gethostbyname,
  732:                [HAVE_GETHOSTBYNAME="1"
  733:                LIBS="-lsocket $LIBS"
  734:                ])
  735: fi
  736: 
  737: if test "$HAVE_GETHOSTBYNAME" != "1"
  738: then
  739:   dnl gethostbyname in the watt lib?
  740:   AC_CHECK_LIB(watt, gethostbyname,
  741:                [HAVE_GETHOSTBYNAME="1"
  742:                CPPFLAGS="-I/dev/env/WATT_ROOT/inc"
  743:                LDFLAGS="-L/dev/env/WATT_ROOT/lib"
  744:                LIBS="-lwatt $LIBS"
  745:                ])
  746: fi
  747: 
  748: dnl At least one system has been identified to require BOTH nsl and socket
  749: dnl libs at the same time to link properly.
  750: if test "$HAVE_GETHOSTBYNAME" != "1"
  751: then
  752:   AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
  753:   my_ac_save_LIBS=$LIBS
  754:   LIBS="-lnsl -lsocket $LIBS"
  755:   AC_LINK_IFELSE([
  756:     AC_LANG_PROGRAM([[
  757:     ]],[[
  758:       gethostbyname();
  759:     ]])
  760:   ],[
  761:     AC_MSG_RESULT([yes])
  762:     HAVE_GETHOSTBYNAME="1"
  763:   ],[
  764:     AC_MSG_RESULT([no])
  765:     LIBS=$my_ac_save_LIBS
  766:   ])
  767: fi
  768: 
  769: if test "$HAVE_GETHOSTBYNAME" != "1"
  770: then
  771:   dnl This is for winsock systems
  772:   if test "$curl_cv_header_windows_h" = "yes"; then
  773:     if test "$curl_cv_header_winsock_h" = "yes"; then
  774:       case $host in
  775:         *-*-mingw32ce*)
  776:           winsock_LIB="-lwinsock"
  777:           ;;
  778:         *)
  779:           winsock_LIB="-lwsock32"
  780:           ;;
  781:       esac
  782:     fi
  783:     if test "$curl_cv_header_winsock2_h" = "yes"; then
  784:       winsock_LIB="-lws2_32"
  785:     fi
  786:     if test ! -z "$winsock_LIB"; then
  787:       my_ac_save_LIBS=$LIBS
  788:       LIBS="$winsock_LIB $LIBS"
  789:       AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
  790:       AC_LINK_IFELSE([
  791:         AC_LANG_PROGRAM([[
  792: #ifdef HAVE_WINDOWS_H
  793: #ifndef WIN32_LEAN_AND_MEAN
  794: #define WIN32_LEAN_AND_MEAN
  795: #endif
  796: #include <windows.h>
  797: #ifdef HAVE_WINSOCK2_H
  798: #include <winsock2.h>
  799: #else
  800: #ifdef HAVE_WINSOCK_H
  801: #include <winsock.h>
  802: #endif
  803: #endif
  804: #endif
  805:         ]],[[
  806:           gethostbyname("www.dummysite.com");
  807:         ]])
  808:       ],[
  809:         AC_MSG_RESULT([yes])
  810:         HAVE_GETHOSTBYNAME="1"
  811:       ],[
  812:         AC_MSG_RESULT([no])
  813:         winsock_LIB=""
  814:         LIBS=$my_ac_save_LIBS
  815:       ])
  816:     fi
  817:   fi
  818: fi
  819: 
  820: if test "$HAVE_GETHOSTBYNAME" != "1"
  821: then
  822:   dnl This is for Minix 3.1
  823:   AC_MSG_CHECKING([for gethostbyname for Minix 3])
  824:   AC_LINK_IFELSE([
  825:     AC_LANG_PROGRAM([[
  826: /* Older Minix versions may need <net/gen/netdb.h> here instead */
  827: #include <netdb.h>
  828:     ]],[[
  829:       gethostbyname("www.dummysite.com");
  830:     ]])
  831:   ],[
  832:     AC_MSG_RESULT([yes])
  833:     HAVE_GETHOSTBYNAME="1"
  834:   ],[
  835:     AC_MSG_RESULT([no])
  836:   ])
  837: fi
  838: 
  839: if test "$HAVE_GETHOSTBYNAME" != "1"
  840: then
  841:   dnl This is for eCos with a stubbed DNS implementation
  842:   AC_MSG_CHECKING([for gethostbyname for eCos])
  843:   AC_LINK_IFELSE([
  844:     AC_LANG_PROGRAM([[
  845: #include <stdio.h>
  846: #include <netdb.h>
  847:     ]],[[
  848:       gethostbyname("www.dummysite.com");
  849:     ]])
  850:   ],[
  851:     AC_MSG_RESULT([yes])
  852:     HAVE_GETHOSTBYNAME="1"
  853:   ],[
  854:     AC_MSG_RESULT([no])
  855:   ])
  856: fi
  857: 
  858: if test "$HAVE_GETHOSTBYNAME" != "1"
  859: then
  860:   dnl This is for AmigaOS with bsdsocket.library - needs testing before -lnet
  861:   AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library])
  862:   AC_LINK_IFELSE([
  863:     AC_LANG_PROGRAM([[
  864: #include <proto/bsdsocket.h>
  865: struct Library *SocketBase = NULL;
  866:     ]],[[
  867:       gethostbyname("www.dummysite.com");
  868:     ]])
  869:   ],[
  870:     AC_MSG_RESULT([yes])
  871:     HAVE_GETHOSTBYNAME="1"
  872:     HAVE_PROTO_BSDSOCKET_H="1"
  873:     AC_DEFINE(HAVE_PROTO_BSDSOCKET_H, 1, [if Amiga bsdsocket.library is in use])
  874:     AC_SUBST(HAVE_PROTO_BSDSOCKET_H, [1])
  875:   ],[
  876:     AC_MSG_RESULT([no])
  877:   ])
  878: fi
  879: 
  880: if test "$HAVE_GETHOSTBYNAME" != "1"
  881: then
  882:   dnl gethostbyname in the network lib - for Haiku OS
  883:   AC_CHECK_LIB(network, gethostbyname,
  884:                [HAVE_GETHOSTBYNAME="1"
  885:                LIBS="-lnetwork $LIBS"
  886:                ])
  887: fi
  888: 
  889: if test "$HAVE_GETHOSTBYNAME" != "1"
  890: then
  891:   dnl gethostbyname in the net lib - for BeOS
  892:   AC_CHECK_LIB(net, gethostbyname,
  893:                [HAVE_GETHOSTBYNAME="1"
  894:                LIBS="-lnet $LIBS"
  895:                ])
  896: fi
  897: 
  898: 
  899: if test "$HAVE_GETHOSTBYNAME" != "1"; then
  900:   AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
  901: fi
  902: 
  903: CURL_CHECK_LIBS_CONNECT
  904: 
  905: CURL_NETWORK_LIBS=$LIBS
  906: 
  907: dnl **********************************************************************
  908: dnl In case that function clock_gettime with monotonic timer is available,
  909: dnl check for additional required libraries.
  910: dnl **********************************************************************
  911: CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
  912: 
  913: dnl **********************************************************************
  914: dnl The preceding library checks are all potentially useful for test
  915: dnl servers and libtest cases which require networking and clock_gettime
  916: dnl support.  Save the list of required libraries at this point for use
  917: dnl while linking those test servers and programs.
  918: dnl **********************************************************************
  919: CURL_NETWORK_AND_TIME_LIBS=$LIBS
  920: 
  921: dnl **********************************************************************
  922: dnl Check for the presence of ZLIB libraries and headers
  923: dnl **********************************************************************
  924: 
  925: dnl Check for & handle argument to --with-zlib.
  926: 
  927: clean_CPPFLAGS=$CPPFLAGS
  928: clean_LDFLAGS=$LDFLAGS
  929: clean_LIBS=$LIBS
  930: ZLIB_LIBS=""
  931: AC_ARG_WITH(zlib,
  932: AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
  933: AC_HELP_STRING([--without-zlib],[disable use of zlib]),
  934:                [OPT_ZLIB="$withval"])
  935: 
  936: if test "$OPT_ZLIB" = "no" ; then
  937:     AC_MSG_WARN([zlib disabled])
  938: else
  939:   if test "$OPT_ZLIB" = "yes" ; then
  940:     OPT_ZLIB=""
  941:   fi
  942: 
  943:   if test -z "$OPT_ZLIB" ; then
  944:     CURL_CHECK_PKGCONFIG(zlib)
  945: 
  946:     if test "$PKGCONFIG" != "no" ; then
  947:       LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS"
  948:       LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`"
  949:       CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags-only-I zlib`"
  950:       OPT_ZLIB=""
  951:       HAVE_LIBZ="1"
  952:     fi
  953: 
  954:     if test -z "$HAVE_LIBZ"; then
  955: 
  956:       dnl Check for the lib without setting any new path, since many
  957:       dnl people have it in the default path
  958: 
  959:       AC_CHECK_LIB(z, inflateEnd,
  960:                    dnl libz found, set the variable
  961:                    [HAVE_LIBZ="1"
  962:                     LIBS="-lz $LIBS"],
  963:                    dnl if no lib found, try /usr/local
  964:                    [OPT_ZLIB="/usr/local"])
  965:     fi
  966:   fi
  967: 
  968:   dnl Add a nonempty path to the compiler flags
  969:   if test -n "$OPT_ZLIB"; then
  970:      CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
  971:      LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
  972:   fi
  973: 
  974:   AC_CHECK_HEADER(zlib.h,
  975:     [
  976:     dnl zlib.h was found
  977:     HAVE_ZLIB_H="1"
  978:     dnl if the lib wasn't found already, try again with the new paths
  979:     if test "$HAVE_LIBZ" != "1"; then
  980:       AC_CHECK_LIB(z, gzread,
  981:                    [
  982:                    dnl the lib was found!
  983:                    HAVE_LIBZ="1"
  984:                    LIBS="-lz $LIBS"
  985:                    ],
  986:                    [ CPPFLAGS=$clean_CPPFLAGS
  987:                    LDFLAGS=$clean_LDFLAGS])
  988:     fi
  989:     ],
  990:     [
  991:       dnl zlib.h was not found, restore the flags
  992:       CPPFLAGS=$clean_CPPFLAGS
  993:       LDFLAGS=$clean_LDFLAGS]
  994:     )
  995: 
  996:   if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
  997:   then
  998:     AC_MSG_WARN([configure found only the libz lib, not the header file!])
  999:     HAVE_LIBZ=""
 1000:     CPPFLAGS=$clean_CPPFLAGS
 1001:     LDFLAGS=$clean_LDFLAGS
 1002:     LIBS=$clean_LIBS
 1003:   elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
 1004:   then
 1005:     AC_MSG_WARN([configure found only the libz header file, not the lib!])
 1006:     CPPFLAGS=$clean_CPPFLAGS
 1007:     LDFLAGS=$clean_LDFLAGS
 1008:     LIBS=$clean_LIBS
 1009:   elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
 1010:   then
 1011:     dnl both header and lib were found!
 1012:     AC_SUBST(HAVE_LIBZ)
 1013:     AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
 1014:     AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
 1015: 
 1016:     ZLIB_LIBS="-lz"
 1017:     LIBS="-lz $clean_LIBS"
 1018: 
 1019:     dnl replace 'HAVE_LIBZ' in the automake makefile.ams
 1020:     AMFIXLIB="1"
 1021:     AC_MSG_NOTICE([found both libz and libz.h header])
 1022:     curl_zlib_msg="enabled"
 1023:   fi
 1024: fi
 1025: 
 1026: dnl set variable for use in automakefile(s)
 1027: AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
 1028: AC_SUBST(ZLIB_LIBS)
 1029: 
 1030: dnl **********************************************************************
 1031: dnl Check for the presence of BROTLI decoder libraries and headers
 1032: dnl **********************************************************************
 1033: 
 1034: dnl Brotli project home page: https://github.com/google/brotli
 1035: 
 1036: dnl Default to compiler & linker defaults for BROTLI files & libraries.
 1037: OPT_BROTLI=off
 1038: AC_ARG_WITH(brotli,dnl
 1039: AC_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])
 1040: AC_HELP_STRING([--without-brotli], [disable BROTLI]),
 1041:   OPT_BROTLI=$withval)
 1042: 
 1043: if test X"$OPT_BROTLI" != Xno; then
 1044:   dnl backup the pre-brotli variables
 1045:   CLEANLDFLAGS="$LDFLAGS"
 1046:   CLEANCPPFLAGS="$CPPFLAGS"
 1047:   CLEANLIBS="$LIBS"
 1048: 
 1049:   case "$OPT_BROTLI" in
 1050:   yes)
 1051:     dnl --with-brotli (without path) used
 1052:     CURL_CHECK_PKGCONFIG(libbrotlidec)
 1053: 
 1054:     if test "$PKGCONFIG" != "no" ; then
 1055:       LIB_BROTLI=`$PKGCONFIG --libs-only-l libbrotlidec`
 1056:       LD_BROTLI=`$PKGCONFIG --libs-only-L libbrotlidec`
 1057:       CPP_BROTLI=`$PKGCONFIG --cflags-only-I libbrotlidec`
 1058:       version=`$PKGCONFIG --modversion libbrotlidec`
 1059:       DIR_BROTLI=`echo $LD_BROTLI | $SED -e 's/-L//'`
 1060:     fi
 1061: 
 1062:     ;;
 1063:   off)
 1064:     dnl no --with-brotli option given, just check default places
 1065:     ;;
 1066:   *)
 1067:     dnl use the given --with-brotli spot
 1068:     PREFIX_BROTLI=$OPT_BROTLI
 1069:     ;;
 1070:   esac
 1071: 
 1072:   dnl if given with a prefix, we set -L and -I based on that
 1073:   if test -n "$PREFIX_BROTLI"; then
 1074:     LIB_BROTLI="-lbrotlidec"
 1075:     LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff
 1076:     CPP_BROTLI=-I${PREFIX_BROTLI}/include
 1077:     DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff
 1078:   fi
 1079: 
 1080:   LDFLAGS="$LDFLAGS $LD_BROTLI"
 1081:   CPPFLAGS="$CPPFLAGS $CPP_BROTLI"
 1082:   LIBS="$LIB_BROTLI $LIBS"
 1083: 
 1084:   AC_CHECK_LIB(brotlidec, BrotliDecoderDecompress)
 1085: 
 1086:   AC_CHECK_HEADERS(brotli/decode.h,
 1087:     curl_brotli_msg="enabled (libbrotlidec)"
 1088:     HAVE_BROTLI=1
 1089:     AC_DEFINE(HAVE_BROTLI, 1, [if BROTLI is in use])
 1090:     AC_SUBST(HAVE_BROTLI, [1])
 1091:   )
 1092: 
 1093:   if test X"$OPT_BROTLI" != Xoff &&
 1094:      test "$HAVE_BROTLI" != "1"; then
 1095:     AC_MSG_ERROR([BROTLI libs and/or directories were not found where specified!])
 1096:   fi
 1097: 
 1098:   if test "$HAVE_BROTLI" = "1"; then
 1099:     if test -n "$DIR_BROTLI"; then
 1100:        dnl when the brotli shared libs were found in a path that the run-time
 1101:        dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
 1102:        dnl to prevent further configure tests to fail due to this
 1103: 
 1104:        if test "x$cross_compiling" != "xyes"; then
 1105:          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_BROTLI"
 1106:          export CURL_LIBRARY_PATH
 1107:          AC_MSG_NOTICE([Added $DIR_BROTLI to CURL_LIBRARY_PATH])
 1108:        fi
 1109:     fi
 1110:   else
 1111:     dnl no brotli, revert back to clean variables
 1112:     LDFLAGS=$CLEANLDFLAGS
 1113:     CPPFLAGS=$CLEANCPPFLAGS
 1114:     LIBS=$CLEANLIBS
 1115:   fi
 1116: fi
 1117: 
 1118: dnl **********************************************************************
 1119: dnl Check for LDAP
 1120: dnl **********************************************************************
 1121: 
 1122: LDAPLIBNAME=""
 1123: AC_ARG_WITH(ldap-lib,
 1124: AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
 1125:  [LDAPLIBNAME="$withval"])
 1126: 
 1127: LBERLIBNAME=""
 1128: AC_ARG_WITH(lber-lib,
 1129: AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
 1130:  [LBERLIBNAME="$withval"])
 1131: 
 1132: if test x$CURL_DISABLE_LDAP != x1 ; then
 1133: 
 1134:   CURL_CHECK_HEADER_LBER
 1135:   CURL_CHECK_HEADER_LDAP
 1136:   CURL_CHECK_HEADER_LDAPSSL
 1137:   CURL_CHECK_HEADER_LDAP_SSL
 1138: 
 1139:   if test -z "$LDAPLIBNAME" ; then
 1140:     if test "$curl_cv_native_windows" = "yes"; then
 1141:       dnl Windows uses a single and unique LDAP library name
 1142:       LDAPLIBNAME="wldap32"
 1143:       LBERLIBNAME="no"
 1144:     fi
 1145:   fi
 1146: 
 1147:   if test "$LDAPLIBNAME" ; then
 1148:     AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
 1149:       AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
 1150:       AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
 1151:       AC_SUBST(CURL_DISABLE_LDAP, [1])
 1152:       AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
 1153:       AC_SUBST(CURL_DISABLE_LDAPS, [1])])
 1154:   else
 1155:     dnl Try to find the right ldap libraries for this system
 1156:     CURL_CHECK_LIBS_LDAP
 1157:     case X-"$curl_cv_ldap_LIBS" in
 1158:       X-unknown)
 1159:         AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
 1160:         AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
 1161:         AC_SUBST(CURL_DISABLE_LDAP, [1])
 1162:         AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
 1163:         AC_SUBST(CURL_DISABLE_LDAPS, [1])
 1164:         ;;
 1165:     esac
 1166:   fi
 1167: fi
 1168: 
 1169: if test x$CURL_DISABLE_LDAP != x1 ; then
 1170: 
 1171:   if test "$LBERLIBNAME" ; then
 1172:     dnl If name is "no" then don't define this library at all
 1173:     dnl (it's only needed if libldap.so's dependencies are broken).
 1174:     if test "$LBERLIBNAME" != "no" ; then
 1175:       AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
 1176:         AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
 1177:         AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
 1178:         AC_SUBST(CURL_DISABLE_LDAP, [1])
 1179:         AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
 1180:         AC_SUBST(CURL_DISABLE_LDAPS, [1])])
 1181:     fi
 1182:   fi
 1183: fi
 1184: 
 1185: if test x$CURL_DISABLE_LDAP != x1 ; then
 1186:   AC_CHECK_FUNCS([ldap_url_parse ldap_init_fd])
 1187: 
 1188:   if test "$LDAPLIBNAME" = "wldap32"; then
 1189:     curl_ldap_msg="enabled (winldap)"
 1190:     AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation])
 1191:   else
 1192:     curl_ldap_msg="enabled (OpenLDAP)"
 1193:     if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
 1194:       AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
 1195:       AC_SUBST(USE_OPENLDAP, [1])
 1196:     fi
 1197:   fi
 1198: fi
 1199: 
 1200: if test x$CURL_DISABLE_LDAPS != x1 ; then
 1201:     curl_ldaps_msg="enabled"
 1202: fi
 1203: 
 1204: dnl **********************************************************************
 1205: dnl Checks for IPv6
 1206: dnl **********************************************************************
 1207: 
 1208: AC_MSG_CHECKING([whether to enable IPv6])
 1209: AC_ARG_ENABLE(ipv6,
 1210: AC_HELP_STRING([--enable-ipv6],[Enable IPv6 (with IPv4) support])
 1211: AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
 1212: [ case "$enableval" in
 1213:   no)
 1214:        AC_MSG_RESULT(no)
 1215:        ipv6=no
 1216:        ;;
 1217:   *)   AC_MSG_RESULT(yes)
 1218:        ipv6=yes
 1219:        ;;
 1220:   esac ],
 1221: 
 1222:   AC_TRY_RUN([ /* are AF_INET6 and sockaddr_in6 available? */
 1223: #include <sys/types.h>
 1224: #ifdef HAVE_WINSOCK2_H
 1225: #include <winsock2.h>
 1226: #include <ws2tcpip.h>
 1227: #else
 1228: #include <sys/socket.h>
 1229: #include <netinet/in.h>
 1230: #if defined (__TANDEM)
 1231: # include <netinet/in6.h>
 1232: #endif
 1233: #endif
 1234: #include <stdlib.h> /* for exit() */
 1235: main()
 1236: {
 1237:  struct sockaddr_in6 s;
 1238:  (void)s;
 1239:  if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
 1240:    exit(1);
 1241:  else
 1242:    exit(0);
 1243: }
 1244: ],
 1245:   AC_MSG_RESULT(yes)
 1246:   ipv6=yes,
 1247:   AC_MSG_RESULT(no)
 1248:   ipv6=no,
 1249:   AC_MSG_RESULT(yes)
 1250:   ipv6=yes
 1251: ))
 1252: 
 1253: if test "$ipv6" = yes; then
 1254:   curl_ipv6_msg="enabled"
 1255:   AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
 1256:   IPV6_ENABLED=1
 1257:   AC_SUBST(IPV6_ENABLED)
 1258: 
 1259:   AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
 1260:   AC_TRY_COMPILE([
 1261: #include <sys/types.h>
 1262: #ifdef HAVE_WINSOCK2_H
 1263: #include <winsock2.h>
 1264: #include <ws2tcpip.h>
 1265: #else
 1266: #include <netinet/in.h>
 1267: #if defined (__TANDEM)
 1268: # include <netinet/in6.h>
 1269: #endif
 1270: #endif] ,
 1271:   struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
 1272:   if test "$have_sin6_scope_id" = yes; then
 1273:     AC_MSG_RESULT([yes])
 1274:     AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
 1275:   else
 1276:     AC_MSG_RESULT([no])
 1277:   fi
 1278: fi
 1279: 
 1280: dnl **********************************************************************
 1281: dnl Check if the operating system allows programs to write to their own argv[]
 1282: dnl **********************************************************************
 1283: 
 1284: AC_MSG_CHECKING([if argv can be written to])
 1285: CURL_RUN_IFELSE([
 1286: int main(int argc, char ** argv) {
 1287:     argv[0][0] = ' ';
 1288:     return (argv[0][0] == ' ')?0:1;
 1289: }
 1290: ],[
 1291:   curl_cv_writable_argv=yes
 1292: ],[
 1293:   curl_cv_writable_argv=no
 1294: ],[
 1295:   curl_cv_writable_argv=cross
 1296: ])
 1297: case $curl_cv_writable_argv in
 1298: yes)
 1299:         AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
 1300:         AC_MSG_RESULT(yes)
 1301:         ;;
 1302: no)
 1303:         AC_MSG_RESULT(no)
 1304:         ;;
 1305: *)
 1306:         AC_MSG_RESULT(no)
 1307:         AC_MSG_WARN([the previous check could not be made default was used])
 1308:         ;;
 1309: esac
 1310: 
 1311: dnl **********************************************************************
 1312: dnl Check for GSS-API libraries
 1313: dnl **********************************************************************
 1314: 
 1315: dnl check for GSS-API stuff in the /usr as default
 1316: 
 1317: GSSAPI_ROOT="/usr"
 1318: AC_ARG_WITH(gssapi-includes,
 1319:   AC_HELP_STRING([--with-gssapi-includes=DIR],
 1320:                  [Specify location of GSS-API headers]),
 1321:   [ GSSAPI_INCS="-I$withval"
 1322:     want_gss="yes" ]
 1323: )
 1324: 
 1325: AC_ARG_WITH(gssapi-libs,
 1326:   AC_HELP_STRING([--with-gssapi-libs=DIR],
 1327:                  [Specify location of GSS-API libs]),
 1328:   [ GSSAPI_LIB_DIR="-L$withval"
 1329:     want_gss="yes" ]
 1330: )
 1331: 
 1332: AC_ARG_WITH(gssapi,
 1333:   AC_HELP_STRING([--with-gssapi=DIR],
 1334:                  [Where to look for GSS-API]), [
 1335:   GSSAPI_ROOT="$withval"
 1336:   if test x"$GSSAPI_ROOT" != xno; then
 1337:     want_gss="yes"
 1338:     if test x"$GSSAPI_ROOT" = xyes; then
 1339:       dnl if yes, then use default root
 1340:       GSSAPI_ROOT="/usr"
 1341:     fi
 1342:   fi
 1343: ])
 1344: 
 1345: : ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
 1346: 
 1347: save_CPPFLAGS="$CPPFLAGS"
 1348: AC_MSG_CHECKING([if GSS-API support is requested])
 1349: if test x"$want_gss" = xyes; then
 1350:   AC_MSG_RESULT(yes)
 1351: 
 1352:   if test -z "$GSSAPI_INCS"; then
 1353:      if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
 1354:         GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
 1355:      elif test -f "$KRB5CONFIG"; then
 1356:         GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
 1357:      elif test "$GSSAPI_ROOT" != "yes"; then
 1358:         GSSAPI_INCS="-I$GSSAPI_ROOT/include"
 1359:      fi
 1360:   fi
 1361: 
 1362:   CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
 1363: 
 1364:   AC_CHECK_HEADER(gss.h,
 1365:     [
 1366:       dnl found in the given dirs
 1367:       AC_DEFINE(HAVE_GSSGNU, 1, [if you have GNU GSS])
 1368:       gnu_gss=yes
 1369:     ],
 1370:     [
 1371:       dnl not found, check Heimdal or MIT
 1372:       AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
 1373:       AC_CHECK_HEADERS(
 1374:         [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
 1375:         [],
 1376:         [not_mit=1],
 1377:         [
 1378: AC_INCLUDES_DEFAULT
 1379: #ifdef HAVE_GSSAPI_GSSAPI_H
 1380: #include <gssapi/gssapi.h>
 1381: #endif
 1382:         ])
 1383:       if test "x$not_mit" = "x1"; then
 1384:         dnl MIT not found, check for Heimdal
 1385:         AC_CHECK_HEADER(gssapi.h,
 1386:             [
 1387:               dnl found
 1388:               AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have Heimdal])
 1389:             ],
 1390:             [
 1391:               dnl no header found, disabling GSS
 1392:               want_gss=no
 1393:               AC_MSG_WARN(disabling GSS-API support since no header files were found)
 1394:             ]
 1395:           )
 1396:       else
 1397:         dnl MIT found
 1398:         AC_DEFINE(HAVE_GSSMIT, 1, [if you have MIT Kerberos])
 1399:         dnl check if we have a really old MIT Kerberos version (<= 1.2)
 1400:         AC_MSG_CHECKING([if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE])
 1401:         AC_COMPILE_IFELSE([
 1402:           AC_LANG_PROGRAM([[
 1403: #include <gssapi/gssapi.h>
 1404: #include <gssapi/gssapi_generic.h>
 1405: #include <gssapi/gssapi_krb5.h>
 1406:           ]],[[
 1407:             gss_import_name(
 1408:                             (OM_uint32 *)0,
 1409:                             (gss_buffer_t)0,
 1410:                             GSS_C_NT_HOSTBASED_SERVICE,
 1411:                             (gss_name_t *)0);
 1412:           ]])
 1413:         ],[
 1414:           AC_MSG_RESULT([yes])
 1415:         ],[
 1416:           AC_MSG_RESULT([no])
 1417:           AC_DEFINE(HAVE_OLD_GSSMIT, 1,
 1418:             [if you have an old MIT Kerberos version, lacking GSS_C_NT_HOSTBASED_SERVICE])
 1419:         ])
 1420:       fi
 1421:     ]
 1422:   )
 1423: else
 1424:   AC_MSG_RESULT(no)
 1425: fi
 1426: if test x"$want_gss" = xyes; then
 1427:   AC_DEFINE(HAVE_GSSAPI, 1, [if you have GSS-API libraries])
 1428:   HAVE_GSSAPI=1
 1429:   curl_gss_msg="enabled (MIT Kerberos/Heimdal)"
 1430: 
 1431:   if test -n "$gnu_gss"; then
 1432:     curl_gss_msg="enabled (GNU GSS)"
 1433:     LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
 1434:     LIBS="-lgss $LIBS"
 1435:   elif test -z "$GSSAPI_LIB_DIR"; then
 1436:      case $host in
 1437:      *-*-darwin*)
 1438:         LIBS="-lgssapi_krb5 -lresolv $LIBS"
 1439:         ;;
 1440:      *)
 1441:         if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
 1442:            dnl krb5-config doesn't have --libs-only-L or similar, put everything
 1443:            dnl into LIBS
 1444:            gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
 1445:            LIBS="$gss_libs $LIBS"
 1446:         elif test -f "$KRB5CONFIG"; then
 1447:            dnl krb5-config doesn't have --libs-only-L or similar, put everything
 1448:            dnl into LIBS
 1449:            gss_libs=`$KRB5CONFIG --libs gssapi`
 1450:            LIBS="$gss_libs $LIBS"
 1451:         else
 1452:            case $host in
 1453:            *-hp-hpux*)
 1454:               gss_libname="gss"
 1455:               ;;
 1456:            *)
 1457:               gss_libname="gssapi"
 1458:               ;;
 1459:            esac
 1460: 
 1461:            if test "$GSSAPI_ROOT" != "yes"; then
 1462:               LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
 1463:               LIBS="-l$gss_libname $LIBS"
 1464:            else
 1465:               LIBS="-l$gss_libname $LIBS"
 1466:            fi
 1467:         fi
 1468:         ;;
 1469:      esac
 1470:   else
 1471:      LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
 1472:      case $host in
 1473:      *-hp-hpux*)
 1474:         LIBS="-lgss $LIBS"
 1475:         ;;
 1476:      *)
 1477:         LIBS="-lgssapi $LIBS"
 1478:         ;;
 1479:      esac
 1480:   fi
 1481: else
 1482:   CPPFLAGS="$save_CPPFLAGS"
 1483: fi
 1484: 
 1485: build_libstubgss=no
 1486: if test x"$want_gss" = "xyes"; then
 1487:   build_libstubgss=yes
 1488: fi
 1489: 
 1490: AM_CONDITIONAL(BUILD_STUB_GSS, test "x$build_libstubgss" = "xyes")
 1491: 
 1492: dnl -------------------------------------------------------------
 1493: dnl parse --with-default-ssl-backend so it can be validated below
 1494: dnl -------------------------------------------------------------
 1495: 
 1496: DEFAULT_SSL_BACKEND=no
 1497: VALID_DEFAULT_SSL_BACKEND=
 1498: AC_ARG_WITH(default-ssl-backend,
 1499: AC_HELP_STRING([--with-default-ssl-backend=NAME],[Use NAME as default SSL backend])
 1500: AC_HELP_STRING([--without-default-ssl-backend],[Use implicit default SSL backend]),
 1501:   [DEFAULT_SSL_BACKEND=$withval])
 1502: case "$DEFAULT_SSL_BACKEND" in
 1503:   no)
 1504:     dnl --without-default-ssl-backend option used
 1505:     ;;
 1506:   default|yes)
 1507:     dnl --with-default-ssl-backend option used without name
 1508:     AC_MSG_ERROR([The name of the default SSL backend is required.])
 1509:     ;;
 1510:   *)
 1511:     dnl --with-default-ssl-backend option used with name
 1512:     AC_SUBST(DEFAULT_SSL_BACKEND)
 1513:     dnl needs to be validated below
 1514:     VALID_DEFAULT_SSL_BACKEND=no
 1515:     ;;
 1516: esac
 1517: 
 1518: dnl **********************************************************************
 1519: 
 1520: dnl -------------------------------------------------
 1521: dnl check winssl option before other SSL libraries
 1522: dnl -------------------------------------------------
 1523: 
 1524: OPT_WINSSL=no
 1525: AC_ARG_WITH(winssl,dnl
 1526: AC_HELP_STRING([--with-winssl],[enable Windows native SSL/TLS])
 1527: AC_HELP_STRING([--without-winssl], [disable Windows native SSL/TLS]),
 1528:   OPT_WINSSL=$withval)
 1529: 
 1530: AC_ARG_WITH(schannel,dnl
 1531: AC_HELP_STRING([--with-schannel],[enable Windows native SSL/TLS])
 1532: AC_HELP_STRING([--without-schannel], [disable Windows native SSL/TLS]),
 1533:   OPT_WINSSL=$withval)
 1534: 
 1535: AC_MSG_CHECKING([whether to enable Windows native SSL/TLS (Windows native builds only)])
 1536: if test -z "$ssl_backends" -o "x$OPT_WINSSL" != xno; then
 1537:   ssl_msg=
 1538:   if test "x$OPT_WINSSL" != "xno"  &&
 1539:      test "x$curl_cv_native_windows" = "xyes"; then
 1540:     AC_MSG_RESULT(yes)
 1541:     AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support])
 1542:     AC_SUBST(USE_SCHANNEL, [1])
 1543:     ssl_msg="Windows-native"
 1544:     test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 1545:     WINSSL_ENABLED=1
 1546:     # --with-winssl implies --enable-sspi
 1547:     AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
 1548:     AC_SUBST(USE_WINDOWS_SSPI, [1])
 1549:     curl_sspi_msg="enabled"
 1550:     LIBS="-lcrypt32 $LIBS"
 1551:   else
 1552:     AC_MSG_RESULT(no)
 1553:   fi
 1554:   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 1555: else
 1556:   AC_MSG_RESULT(no)
 1557: fi
 1558: 
 1559: OPT_SECURETRANSPORT=no
 1560: AC_ARG_WITH(darwinssl,dnl
 1561: AC_HELP_STRING([--with-darwinssl],[enable Apple OS native SSL/TLS])
 1562: AC_HELP_STRING([--without-darwinssl], [disable Apple OS native SSL/TLS]),
 1563:   OPT_SECURETRANSPORT=$withval)
 1564: 
 1565: AC_ARG_WITH(secure-transport,dnl
 1566: AC_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS])
 1567: AC_HELP_STRING([--without-secure-transport], [disable Apple OS native SSL/TLS]),
 1568:   OPT_SECURETRANSPORT=$withval)
 1569: 
 1570: AC_MSG_CHECKING([whether to enable Secure Transport])
 1571: if test -z "$ssl_backends" -o "x$OPT_SECURETRANSPORT" != xno; then
 1572:   if test "x$OPT_SECURETRANSPORT" != "xno" &&
 1573:      (test "x$cross_compiling" != "xno" || test -d "/System/Library/Frameworks/Security.framework"); then
 1574:     AC_MSG_RESULT(yes)
 1575:     AC_DEFINE(USE_SECTRANSP, 1, [enable Secure Transport])
 1576:     AC_SUBST(USE_SECTRANSP, [1])
 1577:     ssl_msg="Secure Transport"
 1578:     test secure-transport != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 1579:     SECURETRANSPORT_ENABLED=1
 1580:     LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
 1581:   else
 1582:     AC_MSG_RESULT(no)
 1583:   fi
 1584:   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 1585: else
 1586:   AC_MSG_RESULT(no)
 1587: fi
 1588: 
 1589: OPT_AMISSL=no
 1590: AC_ARG_WITH(amissl,dnl
 1591: AC_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)])
 1592: AC_HELP_STRING([--without-amissl], [disable Amiga native SSL/TLS (AmiSSL)]),
 1593:   OPT_AMISSL=$withval)
 1594: 
 1595: AC_MSG_CHECKING([whether to enable Amiga native SSL/TLS (AmiSSL)])
 1596: if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
 1597:   if test -z "$ssl_backends" -o "x$OPT_AMISSL" != xno; then
 1598:     ssl_msg=
 1599:     if test "x$OPT_AMISSL" != "xno"; then
 1600:       AC_MSG_RESULT(yes)
 1601:       ssl_msg="AmiSSL"
 1602:       test amissl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 1603:       AMISSL_ENABLED=1
 1604:       LIBS="-lamisslauto $LIBS"
 1605:       AC_DEFINE(USE_AMISSL, 1, [if AmiSSL is in use])
 1606:       AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use])
 1607:     else
 1608:       AC_MSG_RESULT(no)
 1609:     fi
 1610:     test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 1611:   else
 1612:     AC_MSG_RESULT(no)
 1613:   fi
 1614: else
 1615:   AC_MSG_RESULT(no)
 1616: fi
 1617: 
 1618: dnl **********************************************************************
 1619: dnl Check for the presence of SSL libraries and headers
 1620: dnl **********************************************************************
 1621: 
 1622: dnl Default to compiler & linker defaults for SSL files & libraries.
 1623: OPT_SSL=off
 1624: dnl Default to no CA bundle
 1625: ca="no"
 1626: AC_ARG_WITH(ssl,dnl
 1627: AC_HELP_STRING([--with-ssl=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])
 1628: AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
 1629:   OPT_SSL=$withval)
 1630: 
 1631: if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
 1632:    test X"$OPT_SSL" != Xno; then
 1633:   ssl_msg=
 1634: 
 1635:   dnl backup the pre-ssl variables
 1636:   CLEANLDFLAGS="$LDFLAGS"
 1637:   CLEANCPPFLAGS="$CPPFLAGS"
 1638:   CLEANLIBS="$LIBS"
 1639: 
 1640:   dnl This is for Msys/Mingw
 1641:   case $host in
 1642:     *-*-msys* | *-*-mingw*)
 1643:       AC_MSG_CHECKING([for gdi32])
 1644:       my_ac_save_LIBS=$LIBS
 1645:       LIBS="-lgdi32 $LIBS"
 1646:       AC_TRY_LINK([#include <windef.h>
 1647:                    #include <wingdi.h>],
 1648:                    [GdiFlush();],
 1649:                    [ dnl worked!
 1650:                    AC_MSG_RESULT([yes])],
 1651:                    [ dnl failed, restore LIBS
 1652:                    LIBS=$my_ac_save_LIBS
 1653:                    AC_MSG_RESULT(no)]
 1654:                   )
 1655:       ;;
 1656:   esac
 1657: 
 1658:   case "$OPT_SSL" in
 1659:   yes)
 1660:     dnl --with-ssl (without path) used
 1661:     if test x$cross_compiling != xyes; then
 1662:       dnl only do pkg-config magic when not cross-compiling
 1663:       PKGTEST="yes"
 1664:     fi
 1665:     PREFIX_OPENSSL=/usr/local/ssl
 1666:     LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
 1667:     ;;
 1668:   off)
 1669:     dnl no --with-ssl option given, just check default places
 1670:     if test x$cross_compiling != xyes; then
 1671:       dnl only do pkg-config magic when not cross-compiling
 1672:       PKGTEST="yes"
 1673:     fi
 1674:     PREFIX_OPENSSL=
 1675:     ;;
 1676:   *)
 1677:     dnl check the given --with-ssl spot
 1678:     PKGTEST="no"
 1679:     PREFIX_OPENSSL=$OPT_SSL
 1680: 
 1681:     dnl Try pkg-config even when cross-compiling.  Since we
 1682:     dnl specify PKG_CONFIG_LIBDIR we're only looking where
 1683:     dnl the user told us to look
 1684:     OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
 1685:     if test -f "$OPENSSL_PCDIR/openssl.pc"; then
 1686:       AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
 1687:       PKGTEST="yes"
 1688:     elif test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
 1689:       AC_MSG_ERROR([$PREFIX_OPENSSL is a bad --with-ssl prefix!])
 1690:     fi
 1691: 
 1692:     dnl in case pkg-config comes up empty, use what we got
 1693:     dnl via --with-ssl
 1694:     LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
 1695:     if test "$PREFIX_OPENSSL" != "/usr" ; then
 1696:       SSL_LDFLAGS="-L$LIB_OPENSSL"
 1697:       SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
 1698:     fi
 1699:     SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
 1700:     ;;
 1701:   esac
 1702: 
 1703:   if test "$PKGTEST" = "yes"; then
 1704: 
 1705:     CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
 1706: 
 1707:     if test "$PKGCONFIG" != "no" ; then
 1708:       SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
 1709:         $PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null`
 1710: 
 1711:       SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
 1712:         $PKGCONFIG --libs-only-L openssl 2>/dev/null`
 1713: 
 1714:       SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
 1715:         $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
 1716: 
 1717:       AC_SUBST(SSL_LIBS)
 1718:       AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
 1719:       AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
 1720:       AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
 1721: 
 1722:       LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
 1723: 
 1724:       dnl use the values pkg-config reported.  This is here
 1725:       dnl instead of below with CPPFLAGS and LDFLAGS because we only
 1726:       dnl learn about this via pkg-config.  If we only have
 1727:       dnl the argument to --with-ssl we don't know what
 1728:       dnl additional libs may be necessary.  Hope that we
 1729:       dnl don't need any.
 1730:       LIBS="$SSL_LIBS $LIBS"
 1731:     fi
 1732:   fi
 1733: 
 1734:   dnl finally, set flags to use SSL
 1735:   CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
 1736:   LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
 1737: 
 1738:   AC_CHECK_LIB(crypto, HMAC_Update,[
 1739:      HAVECRYPTO="yes"
 1740:      LIBS="-lcrypto $LIBS"
 1741:      ],[
 1742:      LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
 1743:      if test "$PKGCONFIG" = "no" ; then
 1744:        # only set this if pkg-config wasn't used
 1745:        CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
 1746:      fi
 1747:      AC_CHECK_LIB(crypto, HMAC_Init_ex,[
 1748:        HAVECRYPTO="yes"
 1749:        LIBS="-lcrypto $LIBS"], [
 1750: 
 1751:        dnl still no, but what about with -ldl?
 1752:        AC_MSG_CHECKING([OpenSSL linking with -ldl])
 1753:        LIBS="$CLEANLIBS -lcrypto -ldl"
 1754:        AC_TRY_LINK(
 1755:        [
 1756:          #include <openssl/err.h>
 1757:        ],
 1758:        [
 1759:          ERR_clear_error();
 1760:        ],
 1761:        [
 1762:          AC_MSG_RESULT(yes)
 1763:          HAVECRYPTO="yes"
 1764:        ],
 1765:        [
 1766:          AC_MSG_RESULT(no)
 1767:          dnl ok, so what about both -ldl and -lpthread?
 1768: 
 1769:          AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
 1770:          LIBS="$CLEANLIBS -lcrypto -ldl -lpthread"
 1771:          AC_TRY_LINK(
 1772:          [
 1773:            #include <openssl/err.h>
 1774:          ],
 1775:          [
 1776:            ERR_clear_error();
 1777:          ],
 1778:          [
 1779:            AC_MSG_RESULT(yes)
 1780:            HAVECRYPTO="yes"
 1781:          ],
 1782:          [
 1783:            AC_MSG_RESULT(no)
 1784:            LDFLAGS="$CLEANLDFLAGS"
 1785:            CPPFLAGS="$CLEANCPPFLAGS"
 1786:            LIBS="$CLEANLIBS"
 1787: 
 1788:          ])
 1789: 
 1790:        ])
 1791: 
 1792:      ])
 1793:   ])
 1794: 
 1795:   if test X"$HAVECRYPTO" = X"yes"; then
 1796:     dnl This is only reasonable to do if crypto actually is there: check for
 1797:     dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
 1798: 
 1799:     AC_CHECK_LIB(ssl, SSL_connect)
 1800: 
 1801:     if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
 1802:         dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
 1803:         AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
 1804:         OLIBS=$LIBS
 1805:         LIBS="-lRSAglue -lrsaref $LIBS"
 1806:         AC_CHECK_LIB(ssl, SSL_connect)
 1807:         if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
 1808:             dnl still no SSL_connect
 1809:             AC_MSG_RESULT(no)
 1810:             LIBS=$OLIBS
 1811:         else
 1812:             AC_MSG_RESULT(yes)
 1813:         fi
 1814: 
 1815:     else
 1816: 
 1817:       dnl Have the libraries--check for OpenSSL headers
 1818:       AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
 1819:                        openssl/pem.h openssl/ssl.h openssl/err.h,
 1820:         ssl_msg="OpenSSL"
 1821: 	test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 1822:         OPENSSL_ENABLED=1
 1823:         AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
 1824: 
 1825:       if test $ac_cv_header_openssl_x509_h = no; then
 1826:         dnl we don't use the "action" part of the AC_CHECK_HEADERS macro
 1827:         dnl since 'err.h' might in fact find a krb4 header with the same
 1828:         dnl name
 1829:         AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
 1830: 
 1831:         if test $ac_cv_header_x509_h = yes &&
 1832:            test $ac_cv_header_crypto_h = yes &&
 1833:            test $ac_cv_header_ssl_h = yes; then
 1834:           dnl three matches
 1835:           ssl_msg="OpenSSL"
 1836:           OPENSSL_ENABLED=1
 1837:         fi
 1838:       fi
 1839:     fi
 1840: 
 1841:     if test X"$OPENSSL_ENABLED" != X"1"; then
 1842:        LIBS="$CLEANLIBS"
 1843:     fi
 1844: 
 1845:     if test X"$OPT_SSL" != Xoff &&
 1846:        test "$OPENSSL_ENABLED" != "1"; then
 1847:       AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
 1848:     fi
 1849:   fi
 1850: 
 1851:   if test X"$OPENSSL_ENABLED" = X"1"; then
 1852:     dnl These can only exist if OpenSSL exists
 1853:     dnl OpenSSL_version is introduced in 3.0.0
 1854: 
 1855:     AC_CHECK_FUNCS( RAND_egd \
 1856:                     SSLv2_client_method \
 1857:                     OpenSSL_version )
 1858: 
 1859:     AC_MSG_CHECKING([for BoringSSL])
 1860:     AC_COMPILE_IFELSE([
 1861:         AC_LANG_PROGRAM([[
 1862:                 #include <openssl/base.h>
 1863:                 ]],[[
 1864:                 #ifndef OPENSSL_IS_BORINGSSL
 1865:                 #error not boringssl
 1866:                 #endif
 1867:        ]])
 1868:     ],[
 1869:         AC_MSG_RESULT([yes])
 1870:         AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
 1871:                            [Define to 1 if using BoringSSL.])
 1872:         ssl_msg="BoringSSL"
 1873:     ],[
 1874:         AC_MSG_RESULT([no])
 1875:     ])
 1876: 
 1877:     AC_MSG_CHECKING([for libressl])
 1878:     AC_COMPILE_IFELSE([
 1879:       AC_LANG_PROGRAM([[
 1880: #include <openssl/opensslv.h>
 1881:       ]],[[
 1882:         int dummy = LIBRESSL_VERSION_NUMBER;
 1883:       ]])
 1884:     ],[
 1885:       AC_MSG_RESULT([yes])
 1886:       AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1,
 1887:         [Define to 1 if using libressl.])
 1888:       ssl_msg="libressl"
 1889:     ],[
 1890:       AC_MSG_RESULT([no])
 1891:     ])
 1892: 
 1893:     AC_MSG_CHECKING([for OpenSSL >= v3])
 1894:     AC_COMPILE_IFELSE([
 1895:       AC_LANG_PROGRAM([[
 1896: #include <openssl/opensslv.h>
 1897:       ]],[[
 1898:         #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
 1899:         return 0;
 1900:         #else
 1901:         #error older than 3
 1902:         #endif
 1903:       ]])
 1904:     ],[
 1905:       AC_MSG_RESULT([yes])
 1906:       AC_DEFINE_UNQUOTED(HAVE_OPENSSL3, 1,
 1907:         [Define to 1 if using OpenSSL 3 or later.])
 1908:       dnl OpenSSLv3 marks the DES functions deprecated but we have no
 1909:       dnl replacements (yet) so tell the compiler to not warn for them
 1910:       dnl
 1911:       dnl Ask OpenSSL to suppress the warnings.
 1912:       CPPFLAGS="$CPPFLAGS -DOPENSSL_SUPPRESS_DEPRECATED"
 1913:       ssl_msg="OpenSSL v3+"
 1914:     ],[
 1915:       AC_MSG_RESULT([no])
 1916:     ])
 1917:   fi
 1918: 
 1919:   if test "$OPENSSL_ENABLED" = "1"; then
 1920:     if test -n "$LIB_OPENSSL"; then
 1921:        dnl when the ssl shared libs were found in a path that the run-time
 1922:        dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
 1923:        dnl to prevent further configure tests to fail due to this
 1924:        if test "x$cross_compiling" != "xyes"; then
 1925:          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
 1926:          export CURL_LIBRARY_PATH
 1927:          AC_MSG_NOTICE([Added $LIB_OPENSSL to CURL_LIBRARY_PATH])
 1928:        fi
 1929:     fi
 1930:     CURL_CHECK_OPENSSL_API
 1931:     check_for_ca_bundle=1
 1932:   fi
 1933: 
 1934:   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 1935: fi
 1936: 
 1937: if test X"$OPT_SSL" != Xoff &&
 1938:   test X"$OPT_SSL" != Xno &&
 1939:   test "$OPENSSL_ENABLED" != "1"; then
 1940:   AC_MSG_NOTICE([OPT_SSL: $OPT_SSL])
 1941:   AC_MSG_NOTICE([OPENSSL_ENABLED: $OPENSSL_ENABLED])
 1942:   AC_MSG_ERROR([--with-ssl was given but OpenSSL could not be detected])
 1943: fi
 1944: 
 1945: dnl **********************************************************************
 1946: dnl Check for the random seed preferences
 1947: dnl **********************************************************************
 1948: 
 1949: if test X"$OPENSSL_ENABLED" = X"1"; then
 1950:   AC_ARG_WITH(egd-socket,
 1951:   AC_HELP_STRING([--with-egd-socket=FILE],
 1952:                  [Entropy Gathering Daemon socket pathname]),
 1953:       [ EGD_SOCKET="$withval" ]
 1954:   )
 1955:   if test -n "$EGD_SOCKET" ; then
 1956:           AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET",
 1957:           [your Entropy Gathering Daemon socket pathname] )
 1958:   fi
 1959: 
 1960:   dnl Check for user-specified random device
 1961:   AC_ARG_WITH(random,
 1962:   AC_HELP_STRING([--with-random=FILE],
 1963:                  [read randomness from FILE (default=/dev/urandom)]),
 1964:       [ RANDOM_FILE="$withval" ],
 1965:       [
 1966:           if test x$cross_compiling != xyes; then
 1967:             dnl Check for random device
 1968:             AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
 1969:           else
 1970:             AC_MSG_WARN([skipped the /dev/urandom detection when cross-compiling])
 1971:           fi
 1972:       ]
 1973:   )
 1974:   if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
 1975:           AC_SUBST(RANDOM_FILE)
 1976:           AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
 1977:           [a suitable file to read random data from])
 1978:   fi
 1979: fi
 1980: 
 1981: dnl ---
 1982: dnl We require OpenSSL with SRP support.
 1983: dnl ---
 1984: if test "$OPENSSL_ENABLED" = "1"; then
 1985:   AC_CHECK_LIB(crypto, SRP_Calc_client_key,
 1986:    [
 1987:      AC_DEFINE(HAVE_OPENSSL_SRP, 1, [if you have the function SRP_Calc_client_key])
 1988:      AC_SUBST(HAVE_OPENSSL_SRP, [1])
 1989:    ])
 1990: fi
 1991: 
 1992: dnl ---
 1993: dnl Whether the OpenSSL configuration will be loaded automatically
 1994: dnl ---
 1995: if test X"$OPENSSL_ENABLED" = X"1"; then
 1996: AC_ARG_ENABLE(openssl-auto-load-config,
 1997: AC_HELP_STRING([--enable-openssl-auto-load-config],[Enable automatic loading of OpenSSL configuration])
 1998: AC_HELP_STRING([--disable-openssl-auto-load-config],[Disable automatic loading of OpenSSL configuration]),
 1999: [ if test X"$enableval" = X"no"; then
 2000:     AC_MSG_NOTICE([automatic loading of OpenSSL configuration disabled])
 2001:     AC_DEFINE(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG, 1, [if the OpenSSL configuration won't be loaded automatically])
 2002:   fi
 2003: ])
 2004: fi
 2005: 
 2006: dnl ----------------------------------------------------
 2007: dnl check for GnuTLS
 2008: dnl ----------------------------------------------------
 2009: 
 2010: dnl Default to compiler & linker defaults for GnuTLS files & libraries.
 2011: OPT_GNUTLS=no
 2012: 
 2013: AC_ARG_WITH(gnutls,dnl
 2014: AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root])
 2015: AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
 2016:   OPT_GNUTLS=$withval)
 2017: 
 2018: if test -z "$ssl_backends" -o "x$OPT_GNUTLS" != xno; then
 2019:   ssl_msg=
 2020: 
 2021:   if test X"$OPT_GNUTLS" != Xno; then
 2022: 
 2023:     addld=""
 2024:     addlib=""
 2025:     gtlslib=""
 2026:     version=""
 2027:     addcflags=""
 2028: 
 2029:     if test "x$OPT_GNUTLS" = "xyes"; then
 2030:       dnl this is with no partiular path given
 2031:       CURL_CHECK_PKGCONFIG(gnutls)
 2032: 
 2033:       if test "$PKGCONFIG" != "no" ; then
 2034:         addlib=`$PKGCONFIG --libs-only-l gnutls`
 2035:         addld=`$PKGCONFIG --libs-only-L gnutls`
 2036:         addcflags=`$PKGCONFIG --cflags-only-I gnutls`
 2037:         version=`$PKGCONFIG --modversion gnutls`
 2038:         gtlslib=`echo $addld | $SED -e 's/-L//'`
 2039:       else
 2040:         dnl without pkg-config, we try libgnutls-config as that was how it
 2041:         dnl used to be done
 2042:         check=`libgnutls-config --version 2>/dev/null`
 2043:         if test -n "$check"; then
 2044:           addlib=`libgnutls-config --libs`
 2045:           addcflags=`libgnutls-config --cflags`
 2046:           version=`libgnutls-config --version`
 2047:           gtlslib=`libgnutls-config --prefix`/lib$libsuff
 2048:         fi
 2049:       fi
 2050:     else
 2051:       dnl this is with a given path, first check if there's a libgnutls-config
 2052:       dnl there and if not, make an educated guess
 2053:       cfg=$OPT_GNUTLS/bin/libgnutls-config
 2054:       check=`$cfg --version 2>/dev/null`
 2055:       if test -n "$check"; then
 2056:         addlib=`$cfg --libs`
 2057:         addcflags=`$cfg --cflags`
 2058:         version=`$cfg --version`
 2059:         gtlslib=`$cfg --prefix`/lib$libsuff
 2060:       else
 2061:         dnl without pkg-config and libgnutls-config, we guess a lot!
 2062:         addlib=-lgnutls
 2063:         addld=-L$OPT_GNUTLS/lib$libsuff
 2064:         addcflags=-I$OPT_GNUTLS/include
 2065:         version="" # we just don't know
 2066:         gtlslib=$OPT_GNUTLS/lib$libsuff
 2067:       fi
 2068:     fi
 2069: 
 2070:     if test -z "$version"; then
 2071:       dnl lots of efforts, still no go
 2072:       version="unknown"
 2073:     fi
 2074: 
 2075:     if test -n "$addlib"; then
 2076: 
 2077:       CLEANLIBS="$LIBS"
 2078:       CLEANCPPFLAGS="$CPPFLAGS"
 2079:       CLEANLDFLAGS="$LDFLAGS"
 2080: 
 2081:       LIBS="$addlib $LIBS"
 2082:       LDFLAGS="$LDFLAGS $addld"
 2083:       if test "$addcflags" != "-I/usr/include"; then
 2084:          CPPFLAGS="$CPPFLAGS $addcflags"
 2085:       fi
 2086: 
 2087:       dnl this function is selected since it was introduced in 3.1.10
 2088:       AC_CHECK_LIB(gnutls, gnutls_x509_crt_get_dn2,
 2089:        [
 2090:        AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
 2091:        AC_SUBST(USE_GNUTLS, [1])
 2092:        GNUTLS_ENABLED=1
 2093:        USE_GNUTLS="yes"
 2094:        ssl_msg="GnuTLS"
 2095:        test gnutls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 2096:        ],
 2097:        [
 2098:          LIBS="$CLEANLIBS"
 2099:          CPPFLAGS="$CLEANCPPFLAGS"
 2100:        ])
 2101: 
 2102:       if test "x$USE_GNUTLS" = "xyes"; then
 2103:         AC_MSG_NOTICE([detected GnuTLS version $version])
 2104:         check_for_ca_bundle=1
 2105:         if test -n "$gtlslib"; then
 2106:           dnl when shared libs were found in a path that the run-time
 2107:           dnl linker doesn't search through, we need to add it to
 2108:           dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
 2109:           dnl due to this
 2110:           if test "x$cross_compiling" != "xyes"; then
 2111:             CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib"
 2112:             export CURL_LIBRARY_PATH
 2113:             AC_MSG_NOTICE([Added $gtlslib to CURL_LIBRARY_PATH])
 2114:           fi
 2115:         fi
 2116:       fi
 2117: 
 2118:     fi
 2119: 
 2120:   fi dnl GNUTLS not disabled
 2121: 
 2122:   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 2123: fi
 2124: 
 2125: dnl ---
 2126: dnl Check which crypto backend GnuTLS uses
 2127: dnl ---
 2128: 
 2129: if test "$GNUTLS_ENABLED" = "1"; then
 2130:   USE_GNUTLS_NETTLE=
 2131:   # First check if we can detect either crypto library via transitive linking
 2132:   AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
 2133:   if test "$USE_GNUTLS_NETTLE" = ""; then
 2134:     AC_CHECK_LIB(gnutls, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
 2135:   fi
 2136:   # If not, try linking directly to both of them to see if they are available
 2137:   if test "$USE_GNUTLS_NETTLE" = ""; then
 2138:     AC_CHECK_LIB(nettle, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
 2139:   fi
 2140:   if test "$USE_GNUTLS_NETTLE" = ""; then
 2141:     AC_CHECK_LIB(gcrypt, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
 2142:   fi
 2143:   if test "$USE_GNUTLS_NETTLE" = ""; then
 2144:     AC_MSG_ERROR([GnuTLS found, but neither gcrypt nor nettle found])
 2145:   fi
 2146:   if test "$USE_GNUTLS_NETTLE" = "1"; then
 2147:     AC_DEFINE(USE_GNUTLS_NETTLE, 1, [if GnuTLS uses nettle as crypto backend])
 2148:     AC_SUBST(USE_GNUTLS_NETTLE, [1])
 2149:     LIBS="-lnettle $LIBS"
 2150:   else
 2151:     LIBS="-lgcrypt $LIBS"
 2152:   fi
 2153: fi
 2154: 
 2155: dnl ---
 2156: dnl We require GnuTLS with SRP support.
 2157: dnl ---
 2158: if test "$GNUTLS_ENABLED" = "1"; then
 2159:   AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
 2160:    [
 2161:      AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
 2162:      AC_SUBST(HAVE_GNUTLS_SRP, [1])
 2163:    ])
 2164: fi
 2165: 
 2166: dnl ----------------------------------------------------
 2167: dnl check for mbedTLS
 2168: dnl ----------------------------------------------------
 2169: 
 2170: OPT_MBEDTLS=no
 2171: 
 2172: _cppflags=$CPPFLAGS
 2173: _ldflags=$LDFLAGS
 2174: AC_ARG_WITH(mbedtls,dnl
 2175: AC_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root])
 2176: AC_HELP_STRING([--without-mbedtls], [disable mbedTLS detection]),
 2177:   OPT_MBEDTLS=$withval)
 2178: 
 2179: if test -z "$ssl_backends" -o "x$OPT_MBEDTLS" != xno; then
 2180:   ssl_msg=
 2181: 
 2182:   if test X"$OPT_MBEDTLS" != Xno; then
 2183: 
 2184:     if test "$OPT_MBEDTLS" = "yes"; then
 2185:       OPT_MBEDTLS=""
 2186:     fi
 2187: 
 2188:     if test -z "$OPT_MBEDTLS" ; then
 2189:       dnl check for lib first without setting any new path
 2190: 
 2191:       AC_CHECK_LIB(mbedtls, mbedtls_havege_init,
 2192:       dnl libmbedtls found, set the variable
 2193:        [
 2194:          AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled])
 2195:          AC_SUBST(USE_MBEDTLS, [1])
 2196:          MBEDTLS_ENABLED=1
 2197:          USE_MBEDTLS="yes"
 2198:          ssl_msg="mbedTLS"
 2199: 	 test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 2200:         ], [], -lmbedx509 -lmbedcrypto)
 2201:     fi
 2202: 
 2203:     addld=""
 2204:     addlib=""
 2205:     addcflags=""
 2206:     mbedtlslib=""
 2207: 
 2208:     if test "x$USE_MBEDTLS" != "xyes"; then
 2209:       dnl add the path and test again
 2210:       addld=-L$OPT_MBEDTLS/lib$libsuff
 2211:       addcflags=-I$OPT_MBEDTLS/include
 2212:       mbedtlslib=$OPT_MBEDTLS/lib$libsuff
 2213: 
 2214:       LDFLAGS="$LDFLAGS $addld"
 2215:       if test "$addcflags" != "-I/usr/include"; then
 2216:          CPPFLAGS="$CPPFLAGS $addcflags"
 2217:       fi
 2218: 
 2219:       AC_CHECK_LIB(mbedtls, mbedtls_ssl_init,
 2220:        [
 2221:        AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled])
 2222:        AC_SUBST(USE_MBEDTLS, [1])
 2223:        MBEDTLS_ENABLED=1
 2224:        USE_MBEDTLS="yes"
 2225:        ssl_msg="mbedTLS"
 2226:        test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 2227:        ],
 2228:        [
 2229:          CPPFLAGS=$_cppflags
 2230:          LDFLAGS=$_ldflags
 2231:        ], -lmbedx509 -lmbedcrypto)
 2232:     fi
 2233: 
 2234:     if test "x$USE_MBEDTLS" = "xyes"; then
 2235:       AC_MSG_NOTICE([detected mbedTLS])
 2236:       check_for_ca_bundle=1
 2237: 
 2238:       LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS"
 2239: 
 2240:       if test -n "$mbedtlslib"; then
 2241:         dnl when shared libs were found in a path that the run-time
 2242:         dnl linker doesn't search through, we need to add it to
 2243:         dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
 2244:         dnl due to this
 2245:         if test "x$cross_compiling" != "xyes"; then
 2246:           CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$mbedtlslib"
 2247:           export CURL_LIBRARY_PATH
 2248:           AC_MSG_NOTICE([Added $mbedtlslib to CURL_LIBRARY_PATH])
 2249:         fi
 2250:       fi
 2251:     fi
 2252: 
 2253:   fi dnl mbedTLS not disabled
 2254: 
 2255:   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 2256: fi
 2257: 
 2258: dnl ----------------------------------------------------
 2259: dnl check for wolfSSL
 2260: dnl ----------------------------------------------------
 2261: 
 2262: dnl Default to compiler & linker defaults for wolfSSL files & libraries.
 2263: OPT_WOLFSSL=no
 2264: 
 2265: _cppflags=$CPPFLAGS
 2266: _ldflags=$LDFLAGS
 2267: 
 2268: AC_ARG_WITH(wolfssl,dnl
 2269: AC_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)])
 2270: AC_HELP_STRING([--without-wolfssl], [disable WolfSSL detection]),
 2271:   OPT_WOLFSSL=$withval)
 2272: 
 2273: if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then
 2274:   ssl_msg=
 2275: 
 2276:   if test X"$OPT_WOLFSSL" != Xno; then
 2277: 
 2278:     if test "$OPT_WOLFSSL" = "yes"; then
 2279:       OPT_WOLFSSL=""
 2280:     fi
 2281: 
 2282:     addld=""
 2283:     addlib=""
 2284:     addcflags=""
 2285: 
 2286:     if test "x$USE_WOLFSSL" != "xyes"; then
 2287:       addld=-L$OPT_WOLFSSL/lib$libsuff
 2288:       addcflags=-I$OPT_WOLFSSL/include
 2289:       wolfssllibpath=$OPT_WOLFSSL/lib$libsuff
 2290: 
 2291:       LDFLAGS="$LDFLAGS $addld"
 2292:       if test "$addcflags" != "-I/usr/include"; then
 2293:          CPPFLAGS="$CPPFLAGS $addcflags"
 2294:       fi
 2295: 
 2296:       my_ac_save_LIBS="$LIBS"
 2297:       LIBS="-lwolfssl -lm $LIBS"
 2298: 
 2299:       AC_MSG_CHECKING([for wolfSSL_Init in -lwolfssl])
 2300:       AC_LINK_IFELSE([
 2301: 	AC_LANG_PROGRAM([[
 2302: /* These aren't needed for detection and confuse WolfSSL.
 2303:    They are set up properly later if it is detected.  */
 2304: #undef SIZEOF_LONG
 2305: #undef SIZEOF_LONG_LONG
 2306: #include <wolfssl/ssl.h>
 2307: 	]],[[
 2308: 	  return wolfSSL_Init();
 2309: 	]])
 2310:       ],[
 2311:          AC_MSG_RESULT(yes)
 2312:          AC_DEFINE(USE_WOLFSSL, 1, [if wolfSSL is enabled])
 2313:          AC_SUBST(USE_WOLFSSL, [1])
 2314:          WOLFSSL_ENABLED=1
 2315:          USE_WOLFSSL="yes"
 2316:          ssl_msg="WolfSSL"
 2317: 	 test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 2318:        ],
 2319:        [
 2320:          AC_MSG_RESULT(no)
 2321:          CPPFLAGS=$_cppflags
 2322:          LDFLAGS=$_ldflags
 2323:          wolfssllibpath=""
 2324:        ])
 2325:       LIBS="$my_ac_save_LIBS"
 2326:     fi
 2327: 
 2328:     if test "x$USE_WOLFSSL" = "xyes"; then
 2329:       AC_MSG_NOTICE([detected wolfSSL])
 2330:       check_for_ca_bundle=1
 2331: 
 2332:       dnl wolfssl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
 2333:       AX_COMPILE_CHECK_SIZEOF(long long)
 2334: 
 2335:       LIBS="-lwolfssl -lm $LIBS"
 2336: 
 2337:       dnl Recent WolfSSL versions build without SSLv3 by default
 2338:       dnl WolfSSL needs configure --enable-opensslextra to have *get_peer*
 2339:       AC_CHECK_FUNCS(wolfSSLv3_client_method \
 2340:                      wolfSSL_get_peer_certificate \
 2341:                      wolfSSL_UseALPN)
 2342: 
 2343:       if test -n "$wolfssllibpath"; then
 2344:         dnl when shared libs were found in a path that the run-time
 2345:         dnl linker doesn't search through, we need to add it to
 2346:         dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
 2347:         dnl due to this
 2348:         if test "x$cross_compiling" != "xyes"; then
 2349:           CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath"
 2350:           export CURL_LIBRARY_PATH
 2351:           AC_MSG_NOTICE([Added $wolfssllibpath to CURL_LIBRARY_PATH])
 2352:         fi
 2353:       fi
 2354: 
 2355:     fi
 2356: 
 2357:   fi dnl wolfSSL not disabled
 2358: 
 2359:   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 2360: fi
 2361: 
 2362: dnl ----------------------------------------------------
 2363: dnl check for MesaLink
 2364: dnl ----------------------------------------------------
 2365: 
 2366: dnl Default to compiler & linker defaults for MesaLink files & libraries.
 2367: OPT_MESALINK=no
 2368: 
 2369: _cppflags=$CPPFLAGS
 2370: _ldflags=$LDFLAGS
 2371: AC_ARG_WITH(mesalink,dnl
 2372: AC_HELP_STRING([--with-mesalink=PATH],[where to look for MesaLink, PATH points to the installation root])
 2373: AC_HELP_STRING([--without-mesalink], [disable MesaLink detection]),
 2374:   OPT_MESALINK=$withval)
 2375: 
 2376: if test -z "$ssl_backends" -o "x$OPT_MESALINK" != xno; then
 2377:   ssl_msg=
 2378: 
 2379:   if test X"$OPT_MESALINK" != Xno; then
 2380: 
 2381:     if test "$OPT_MESALINK" = "yes"; then
 2382:       OPT_MESALINK=""
 2383:     fi
 2384: 
 2385:     if test -z "$OPT_MESALINK" ; then
 2386:       dnl check for lib first without setting any new path
 2387: 
 2388:       AC_CHECK_LIB(mesalink, mesalink_library_init,
 2389:       dnl libmesalink found, set the variable
 2390:        [
 2391:          AC_DEFINE(USE_MESALINK, 1, [if MesaLink is enabled])
 2392:          AC_SUBST(USE_MESALINK, [1])
 2393:          MESALINK_ENABLED=1
 2394:          USE_MESALINK="yes"
 2395:          ssl_msg="MesaLink"
 2396: 	 test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 2397:         ])
 2398:     fi
 2399: 
 2400:     addld=""
 2401:     addlib=""
 2402:     addcflags=""
 2403:     mesalinklib=""
 2404: 
 2405:     if test "x$USE_MESALINK" != "xyes"; then
 2406:       dnl add the path and test again
 2407:       addld=-L$OPT_MESALINK/lib$libsuff
 2408:       addcflags=-I$OPT_MESALINK/include
 2409:       mesalinklib=$OPT_MESALINK/lib$libsuff
 2410: 
 2411:       LDFLAGS="$LDFLAGS $addld"
 2412:       if test "$addcflags" != "-I/usr/include"; then
 2413:          CPPFLAGS="$CPPFLAGS $addcflags"
 2414:       fi
 2415: 
 2416:       AC_CHECK_LIB(mesalink, mesalink_library_init,
 2417:        [
 2418:        AC_DEFINE(USE_MESALINK, 1, [if MesaLink is enabled])
 2419:        AC_SUBST(USE_MESALINK, [1])
 2420:        MESALINK_ENABLED=1
 2421:        USE_MESALINK="yes"
 2422:        ssl_msg="MesaLink"
 2423:        test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 2424:        ],
 2425:        [
 2426:          CPPFLAGS=$_cppflags
 2427:          LDFLAGS=$_ldflags
 2428:        ])
 2429:     fi
 2430: 
 2431:     if test "x$USE_MESALINK" = "xyes"; then
 2432:       AC_MSG_NOTICE([detected MesaLink])
 2433: 
 2434:       LIBS="-lmesalink $LIBS"
 2435: 
 2436:       if test -n "$mesalinklib"; then
 2437:         dnl when shared libs were found in a path that the run-time
 2438:         dnl linker doesn't search through, we need to add it to
 2439:         dnl LD_LIBRARY_PATH to prevent further configure tests to fail
 2440:         dnl due to this
 2441:         if test "x$cross_compiling" != "xyes"; then
 2442:           LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$mesalinklib"
 2443:           export LD_LIBRARY_PATH
 2444:           AC_MSG_NOTICE([Added $mesalinklib to LD_LIBRARY_PATH])
 2445:         fi
 2446:       fi
 2447:     fi
 2448: 
 2449:   fi dnl MesaLink not disabled
 2450: 
 2451:   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 2452: fi
 2453: 
 2454: dnl ----------------------------------------------------
 2455: dnl check for BearSSL
 2456: dnl ----------------------------------------------------
 2457: 
 2458: OPT_BEARSSL=no
 2459: 
 2460: _cppflags=$CPPFLAGS
 2461: _ldflags=$LDFLAGS
 2462: AC_ARG_WITH(bearssl,dnl
 2463: AC_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root])
 2464: AC_HELP_STRING([--without-bearssl], [disable BearSSL detection]),
 2465:   OPT_BEARSSL=$withval)
 2466: 
 2467: if test -z "$ssl_backends" -o "x$OPT_BEARSSL" != xno; then
 2468:   ssl_msg=
 2469: 
 2470:   if test X"$OPT_BEARSSL" != Xno; then
 2471: 
 2472:     if test "$OPT_BEARSSL" = "yes"; then
 2473:       OPT_BEARSSL=""
 2474:     fi
 2475: 
 2476:     if test -z "$OPT_BEARSSL" ; then
 2477:       dnl check for lib first without setting any new path
 2478: 
 2479:       AC_CHECK_LIB(bearssl, br_ssl_client_init_full,
 2480:       dnl libbearssl found, set the variable
 2481:        [
 2482:          AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled])
 2483:          AC_SUBST(USE_BEARSSL, [1])
 2484:          BEARSSL_ENABLED=1
 2485:          USE_BEARSSL="yes"
 2486:          ssl_msg="BearSSL"
 2487: 	 test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 2488:         ], [], -lbearssl)
 2489:     fi
 2490: 
 2491:     addld=""
 2492:     addlib=""
 2493:     addcflags=""
 2494:     bearssllib=""
 2495: 
 2496:     if test "x$USE_BEARSSL" != "xyes"; then
 2497:       dnl add the path and test again
 2498:       addld=-L$OPT_BEARSSL/lib$libsuff
 2499:       addcflags=-I$OPT_BEARSSL/include
 2500:       bearssllib=$OPT_BEARSSL/lib$libsuff
 2501: 
 2502:       LDFLAGS="$LDFLAGS $addld"
 2503:       if test "$addcflags" != "-I/usr/include"; then
 2504:          CPPFLAGS="$CPPFLAGS $addcflags"
 2505:       fi
 2506: 
 2507:       AC_CHECK_LIB(bearssl, br_ssl_client_init_full,
 2508:        [
 2509:        AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled])
 2510:        AC_SUBST(USE_BEARSSL, [1])
 2511:        BEARSSL_ENABLED=1
 2512:        USE_BEARSSL="yes"
 2513:        ssl_msg="BearSSL"
 2514:        test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 2515:        ],
 2516:        [
 2517:          CPPFLAGS=$_cppflags
 2518:          LDFLAGS=$_ldflags
 2519:        ], -lbearssl)
 2520:     fi
 2521: 
 2522:     if test "x$USE_BEARSSL" = "xyes"; then
 2523:       AC_MSG_NOTICE([detected BearSSL])
 2524:       check_for_ca_bundle=1
 2525: 
 2526:       LIBS="-lbearssl $LIBS"
 2527: 
 2528:       if test -n "$bearssllib"; then
 2529:         dnl when shared libs were found in a path that the run-time
 2530:         dnl linker doesn't search through, we need to add it to
 2531:         dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
 2532:         dnl due to this
 2533:         if test "x$cross_compiling" != "xyes"; then
 2534:           CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$bearssllib"
 2535:           export CURL_LIBRARY_PATH
 2536:           AC_MSG_NOTICE([Added $bearssllib to CURL_LIBRARY_PATH])
 2537:         fi
 2538:       fi
 2539:     fi
 2540: 
 2541:   fi dnl BearSSL not disabled
 2542: 
 2543:   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 2544: fi
 2545: 
 2546: dnl ----------------------------------------------------
 2547: dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
 2548: dnl ----------------------------------------------------
 2549: 
 2550: dnl Default to compiler & linker defaults for NSS files & libraries.
 2551: OPT_NSS=no
 2552: 
 2553: AC_ARG_WITH(nss,dnl
 2554: AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root])
 2555: AC_HELP_STRING([--without-nss], [disable NSS detection]),
 2556:   OPT_NSS=$withval)
 2557: 
 2558: if test -z "$ssl_backends" -o "x$OPT_NSS" != xno; then
 2559:   ssl_msg=
 2560: 
 2561:   if test X"$OPT_NSS" != Xno; then
 2562: 
 2563:     addld=""
 2564:     addlib=""
 2565:     addcflags=""
 2566:     nssprefix=""
 2567:     version=""
 2568: 
 2569:     if test "x$OPT_NSS" = "xyes"; then
 2570: 
 2571:       CURL_CHECK_PKGCONFIG(nss)
 2572: 
 2573:       if test "$PKGCONFIG" != "no" ; then
 2574:         addlib=`$PKGCONFIG --libs nss`
 2575:         addcflags=`$PKGCONFIG --cflags nss`
 2576:         version=`$PKGCONFIG --modversion nss`
 2577:         nssprefix=`$PKGCONFIG --variable=prefix nss`
 2578:       else
 2579:         dnl Without pkg-config, we check for nss-config
 2580: 
 2581:         check=`nss-config --version 2>/dev/null`
 2582:         if test -n "$check"; then
 2583:           addlib=`nss-config --libs`
 2584:           addcflags=`nss-config --cflags`
 2585:           version=`nss-config --version`
 2586:           nssprefix=`nss-config --prefix`
 2587:         else
 2588:           addlib="-lnss3"
 2589:           addcflags=""
 2590:           version="unknown"
 2591:         fi
 2592:       fi
 2593:     else
 2594:       NSS_PCDIR="$OPT_NSS/lib/pkgconfig"
 2595:       if test -f "$NSS_PCDIR/nss.pc"; then
 2596:         CURL_CHECK_PKGCONFIG(nss, [$NSS_PCDIR])
 2597:         if test "$PKGCONFIG" != "no" ; then
 2598:           addld=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-L nss`
 2599:           addlib=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-l nss`
 2600:           addcflags=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --cflags nss`
 2601:           version=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --modversion nss`
 2602:           nssprefix=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --variable=prefix nss`
 2603:         fi
 2604:       fi
 2605:     fi
 2606: 
 2607:     if test -z "$addlib"; then
 2608:       # Without pkg-config, we'll kludge in some defaults
 2609:       AC_MSG_WARN([Using hard-wired libraries and compilation flags for NSS.])
 2610:       addld="-L$OPT_NSS/lib"
 2611:       addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
 2612:       addcflags="-I$OPT_NSS/include"
 2613:       version="unknown"
 2614:       nssprefix=$OPT_NSS
 2615:     fi
 2616: 
 2617:     CLEANLDFLAGS="$LDFLAGS"
 2618:     CLEANLIBS="$LIBS"
 2619:     CLEANCPPFLAGS="$CPPFLAGS"
 2620: 
 2621:     LDFLAGS="$addld $LDFLAGS"
 2622:     LIBS="$addlib $LIBS"
 2623:     if test "$addcflags" != "-I/usr/include"; then
 2624:        CPPFLAGS="$CPPFLAGS $addcflags"
 2625:     fi
 2626: 
 2627:     dnl The function SSL_VersionRangeSet() is needed to enable TLS > 1.0
 2628:     AC_CHECK_LIB(nss3, SSL_VersionRangeSet,
 2629:      [
 2630:      AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
 2631:      AC_SUBST(USE_NSS, [1])
 2632:      USE_NSS="yes"
 2633:      NSS_ENABLED=1
 2634:      ssl_msg="NSS"
 2635:      test nss != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 2636:      ],
 2637:      [
 2638:        LDFLAGS="$CLEANLDFLAGS"
 2639:        LIBS="$CLEANLIBS"
 2640:        CPPFLAGS="$CLEANCPPFLAGS"
 2641:      ])
 2642: 
 2643:     if test "x$USE_NSS" = "xyes"; then
 2644:       AC_MSG_NOTICE([detected NSS version $version])
 2645: 
 2646:       dnl PK11_CreateManagedGenericObject() was introduced in NSS 3.34 because
 2647:       dnl PK11_DestroyGenericObject() does not release resources allocated by
 2648:       dnl PK11_CreateGenericObject() early enough.
 2649:       AC_CHECK_FUNC(PK11_CreateManagedGenericObject,
 2650:         [
 2651:           AC_DEFINE(HAVE_PK11_CREATEMANAGEDGENERICOBJECT, 1,
 2652:                     [if you have the PK11_CreateManagedGenericObject function])
 2653:         ])
 2654: 
 2655:       dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS
 2656:       NSS_LIBS=$addlib
 2657:       AC_SUBST([NSS_LIBS])
 2658: 
 2659:       dnl when shared libs were found in a path that the run-time
 2660:       dnl linker doesn't search through, we need to add it to
 2661:       dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
 2662:       dnl due to this
 2663:       if test "x$cross_compiling" != "xyes"; then
 2664:         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$nssprefix/lib$libsuff"
 2665:         export CURL_LIBRARY_PATH
 2666:         AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH])
 2667:       fi
 2668: 
 2669:     fi dnl NSS found
 2670: 
 2671:   fi dnl NSS not disabled
 2672: 
 2673:   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 2674: fi
 2675: 
 2676: case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$WINSSL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$BEARSSL_ENABLED$AMISSL_ENABLED" in
 2677: x)
 2678:   AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
 2679:   AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl or --with-bearssl to address this.])
 2680:   ;;
 2681: x1)
 2682:   # one SSL backend is enabled
 2683:   AC_SUBST(SSL_ENABLED)
 2684:   SSL_ENABLED="1"
 2685:   AC_MSG_NOTICE([built with one SSL backend])
 2686:   ;;
 2687: *)
 2688:   # more than one SSL backend is enabled
 2689:   AC_SUBST(SSL_ENABLED)
 2690:   SSL_ENABLED="1"
 2691:   AC_SUBST(CURL_WITH_MULTI_SSL)
 2692:   CURL_WITH_MULTI_SSL="1"
 2693:   AC_DEFINE(CURL_WITH_MULTI_SSL, 1, [built with multiple SSL backends])
 2694:   AC_MSG_NOTICE([built with multiple SSL backends])
 2695:   ;;
 2696: esac
 2697: 
 2698: if test -n "$ssl_backends"; then
 2699:   curl_ssl_msg="enabled ($ssl_backends)"
 2700: fi
 2701: 
 2702: if test no = "$VALID_DEFAULT_SSL_BACKEND"
 2703: then
 2704:   if test -n "$SSL_ENABLED"
 2705:   then
 2706:     AC_MSG_ERROR([Default SSL backend $DEFAULT_SSL_BACKEND not enabled!])
 2707:   else
 2708:     AC_MSG_ERROR([Default SSL backend requires SSL!])
 2709:   fi
 2710: elif test yes = "$VALID_DEFAULT_SSL_BACKEND"
 2711: then
 2712:   AC_DEFINE_UNQUOTED([CURL_DEFAULT_SSL_BACKEND], ["$DEFAULT_SSL_BACKEND"], [Default SSL backend])
 2713: fi
 2714: 
 2715: dnl **********************************************************************
 2716: dnl Check for the CA bundle
 2717: dnl **********************************************************************
 2718: 
 2719: if test -n "$check_for_ca_bundle"; then
 2720:   CURL_CHECK_CA_BUNDLE
 2721: fi
 2722: 
 2723: dnl **********************************************************************
 2724: dnl Check for libpsl
 2725: dnl **********************************************************************
 2726: 
 2727: AC_ARG_WITH(libpsl,
 2728:            AS_HELP_STRING([--without-libpsl],
 2729:            [disable support for libpsl cookie checking]),
 2730:            with_libpsl=$withval,
 2731:            with_libpsl=yes)
 2732: if test $with_libpsl != "no"; then
 2733:   AC_SEARCH_LIBS(psl_builtin, psl,
 2734:     [curl_psl_msg="enabled";
 2735:      AC_DEFINE([USE_LIBPSL], [1], [PSL support enabled])
 2736:      ],
 2737:     [curl_psl_msg="no      (libpsl not found)";
 2738:      AC_MSG_WARN([libpsl was not found])
 2739:      ]
 2740:   )
 2741: fi
 2742: AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"])
 2743: 
 2744: dnl **********************************************************************
 2745: dnl Check for libmetalink
 2746: dnl **********************************************************************
 2747: 
 2748: OPT_LIBMETALINK=no
 2749: 
 2750: AC_ARG_WITH(libmetalink,dnl
 2751: AC_HELP_STRING([--with-libmetalink=PATH],[where to look for libmetalink, PATH points to the installation root])
 2752: AC_HELP_STRING([--without-libmetalink], [disable libmetalink detection]),
 2753:   OPT_LIBMETALINK=$withval)
 2754: 
 2755: if test X"$OPT_LIBMETALINK" != Xno; then
 2756: 
 2757:   addld=""
 2758:   addlib=""
 2759:   addcflags=""
 2760:   version=""
 2761:   libmetalinklib=""
 2762: 
 2763:   PKGTEST="no"
 2764:   if test "x$OPT_LIBMETALINK" = "xyes"; then
 2765:     dnl this is with no partiular path given
 2766:     PKGTEST="yes"
 2767:     CURL_CHECK_PKGCONFIG(libmetalink)
 2768:   else
 2769:     dnl When particular path is given, set PKG_CONFIG_LIBDIR using the path.
 2770:     LIBMETALINK_PCDIR="$OPT_LIBMETALINK/lib/pkgconfig"
 2771:     AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$LIBMETALINK_PCDIR"])
 2772:     if test -f "$LIBMETALINK_PCDIR/libmetalink.pc"; then
 2773:       PKGTEST="yes"
 2774:     fi
 2775:     if test "$PKGTEST" = "yes"; then
 2776:       CURL_CHECK_PKGCONFIG(libmetalink, [$LIBMETALINK_PCDIR])
 2777:     fi
 2778:   fi
 2779:   if test "$PKGTEST" = "yes" && test "$PKGCONFIG" != "no"; then
 2780:     addlib=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
 2781:       $PKGCONFIG --libs-only-l libmetalink`
 2782:     addld=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
 2783:       $PKGCONFIG --libs-only-L libmetalink`
 2784:     addcflags=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
 2785:       $PKGCONFIG --cflags-only-I libmetalink`
 2786:     version=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
 2787:       $PKGCONFIG --modversion libmetalink`
 2788:     libmetalinklib=`echo $addld | $SED -e 's/-L//'`
 2789:   fi
 2790:   if test -n "$addlib"; then
 2791: 
 2792:     clean_CPPFLAGS="$CPPFLAGS"
 2793:     clean_LDFLAGS="$LDFLAGS"
 2794:     clean_LIBS="$LIBS"
 2795:     CPPFLAGS="$clean_CPPFLAGS $addcflags"
 2796:     LDFLAGS="$clean_LDFLAGS $addld"
 2797:     LIBS="$addlib $clean_LIBS"
 2798:     AC_MSG_CHECKING([if libmetalink is recent enough])
 2799:     AC_LINK_IFELSE([
 2800:       AC_LANG_PROGRAM([[
 2801: #       include <metalink/metalink.h>
 2802:       ]],[[
 2803:         if(0 != metalink_strerror(0)) /* added in 0.1.0 */
 2804:           return 1;
 2805:       ]])
 2806:     ],[
 2807:       AC_MSG_RESULT([yes ($version)])
 2808:       want_metalink="yes"
 2809:     ],[
 2810:       AC_MSG_RESULT([no ($version)])
 2811:       AC_MSG_NOTICE([libmetalink library defective or too old])
 2812:       want_metalink="no"
 2813:     ])
 2814:     if test "x$OPENSSL_ENABLED" != "x1" -a "x$USE_WINDOWS_SSPI" != "x1" \
 2815:         -a "x$GNUTLS_ENABLED" != "x1" -a "x$NSS_ENABLED" != "x1" \
 2816:         -a "x$SECURETRANSPORT_ENABLED" != "x1"; then
 2817:       AC_MSG_WARN([metalink support requires a compatible SSL/TLS backend])
 2818:       want_metalink="no"
 2819:     fi
 2820:     CPPFLAGS="$clean_CPPFLAGS"
 2821:     LDFLAGS="$clean_LDFLAGS"
 2822:     LIBS="$clean_LIBS"
 2823:     if test "$want_metalink" = "yes"; then
 2824:       dnl finally libmetalink will be used
 2825:       AC_DEFINE(USE_METALINK, 1, [Define to enable metalink support])
 2826:       LIBMETALINK_LIBS=$addlib
 2827:       LIBMETALINK_LDFLAGS=$addld
 2828:       LIBMETALINK_CPPFLAGS=$addcflags
 2829:       AC_SUBST([LIBMETALINK_LIBS])
 2830:       AC_SUBST([LIBMETALINK_LDFLAGS])
 2831:       AC_SUBST([LIBMETALINK_CPPFLAGS])
 2832:       curl_mtlnk_msg="enabled"
 2833:     fi
 2834: 
 2835:   fi
 2836: fi
 2837: 
 2838: dnl **********************************************************************
 2839: dnl Check for the presence of LIBSSH2 libraries and headers
 2840: dnl **********************************************************************
 2841: 
 2842: dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
 2843: OPT_LIBSSH2=off
 2844: AC_ARG_WITH(libssh2,dnl
 2845: AC_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])
 2846: AC_HELP_STRING([--with-libssh2], [enable libssh2]),
 2847:   OPT_LIBSSH2=$withval, OPT_LIBSSH2=no)
 2848: 
 2849: 
 2850: OPT_LIBSSH=off
 2851: AC_ARG_WITH(libssh,dnl
 2852: AC_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])
 2853: AC_HELP_STRING([--with-libssh], [enable libssh]),
 2854:   OPT_LIBSSH=$withval, OPT_LIBSSH=no)
 2855: 
 2856: OPT_WOLFSSH=off
 2857: AC_ARG_WITH(wolfssh,dnl
 2858: AC_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])
 2859: AC_HELP_STRING([--with-wolfssh], [enable wolfssh]),
 2860:   OPT_WOLFSSH=$withval, OPT_WOLFSSH=no)
 2861: 
 2862: if test X"$OPT_LIBSSH2" != Xno; then
 2863:   dnl backup the pre-libssh2 variables
 2864:   CLEANLDFLAGS="$LDFLAGS"
 2865:   CLEANCPPFLAGS="$CPPFLAGS"
 2866:   CLEANLIBS="$LIBS"
 2867: 
 2868:   case "$OPT_LIBSSH2" in
 2869:   yes)
 2870:     dnl --with-libssh2 (without path) used
 2871:     CURL_CHECK_PKGCONFIG(libssh2)
 2872: 
 2873:     if test "$PKGCONFIG" != "no" ; then
 2874:       LIB_SSH2=`$PKGCONFIG --libs libssh2`
 2875:       LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
 2876:       CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
 2877:       version=`$PKGCONFIG --modversion libssh2`
 2878:       DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/-L//'`
 2879:     fi
 2880: 
 2881:     ;;
 2882:   off)
 2883:     dnl no --with-libssh2 option given, just check default places
 2884:     ;;
 2885:   *)
 2886:     dnl use the given --with-libssh2 spot
 2887:     PREFIX_SSH2=$OPT_LIBSSH2
 2888:     ;;
 2889:   esac
 2890: 
 2891:   dnl if given with a prefix, we set -L and -I based on that
 2892:   if test -n "$PREFIX_SSH2"; then
 2893:     LIB_SSH2="-lssh2"
 2894:     LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
 2895:     CPP_SSH2=-I${PREFIX_SSH2}/include
 2896:     DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
 2897:   fi
 2898: 
 2899:   LDFLAGS="$LDFLAGS $LD_SSH2"
 2900:   CPPFLAGS="$CPPFLAGS $CPP_SSH2"
 2901:   LIBS="$LIB_SSH2 $LIBS"
 2902: 
 2903:   AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
 2904: 
 2905:   AC_CHECK_HEADERS(libssh2.h,
 2906:     curl_ssh_msg="enabled (libSSH2)"
 2907:     LIBSSH2_ENABLED=1
 2908:     AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use])
 2909:     AC_SUBST(USE_LIBSSH2, [1])
 2910:   )
 2911: 
 2912:   if test X"$OPT_LIBSSH2" != Xoff &&
 2913:      test "$LIBSSH2_ENABLED" != "1"; then
 2914:     AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!])
 2915:   fi
 2916: 
 2917:   if test "$LIBSSH2_ENABLED" = "1"; then
 2918:     if test -n "$DIR_SSH2"; then
 2919:        dnl when the libssh2 shared libs were found in a path that the run-time
 2920:        dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
 2921:        dnl to prevent further configure tests to fail due to this
 2922: 
 2923:        if test "x$cross_compiling" != "xyes"; then
 2924:          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH2"
 2925:          export CURL_LIBRARY_PATH
 2926:          AC_MSG_NOTICE([Added $DIR_SSH2 to CURL_LIBRARY_PATH])
 2927:        fi
 2928:     fi
 2929:   else
 2930:     dnl no libssh2, revert back to clean variables
 2931:     LDFLAGS=$CLEANLDFLAGS
 2932:     CPPFLAGS=$CLEANCPPFLAGS
 2933:     LIBS=$CLEANLIBS
 2934:   fi
 2935: elif test X"$OPT_LIBSSH" != Xno; then
 2936:   dnl backup the pre-libssh variables
 2937:   CLEANLDFLAGS="$LDFLAGS"
 2938:   CLEANCPPFLAGS="$CPPFLAGS"
 2939:   CLEANLIBS="$LIBS"
 2940: 
 2941:   case "$OPT_LIBSSH" in
 2942:   yes)
 2943:     dnl --with-libssh (without path) used
 2944:     CURL_CHECK_PKGCONFIG(libssh)
 2945: 
 2946:     if test "$PKGCONFIG" != "no" ; then
 2947:       LIB_SSH=`$PKGCONFIG --libs-only-l libssh`
 2948:       LD_SSH=`$PKGCONFIG --libs-only-L libssh`
 2949:       CPP_SSH=`$PKGCONFIG --cflags-only-I libssh`
 2950:       version=`$PKGCONFIG --modversion libssh`
 2951:       DIR_SSH=`echo $LD_SSH | $SED -e 's/-L//'`
 2952:     fi
 2953: 
 2954:     ;;
 2955:   off)
 2956:     dnl no --with-libssh option given, just check default places
 2957:     ;;
 2958:   *)
 2959:     dnl use the given --with-libssh spot
 2960:     PREFIX_SSH=$OPT_LIBSSH
 2961:     ;;
 2962:   esac
 2963: 
 2964:   dnl if given with a prefix, we set -L and -I based on that
 2965:   if test -n "$PREFIX_SSH"; then
 2966:     LIB_SSH="-lssh"
 2967:     LD_SSH=-L${PREFIX_SSH}/lib$libsuff
 2968:     CPP_SSH=-I${PREFIX_SSH}/include
 2969:     DIR_SSH=${PREFIX_SSH}/lib$libsuff
 2970:   fi
 2971: 
 2972:   LDFLAGS="$LDFLAGS $LD_SSH"
 2973:   CPPFLAGS="$CPPFLAGS $CPP_SSH"
 2974:   LIBS="$LIB_SSH $LIBS"
 2975: 
 2976:   AC_CHECK_LIB(ssh, ssh_new)
 2977: 
 2978:   AC_CHECK_HEADERS(libssh/libssh.h,
 2979:     curl_ssh_msg="enabled (libSSH)"
 2980:     LIBSSH_ENABLED=1
 2981:     AC_DEFINE(USE_LIBSSH, 1, [if libSSH is in use])
 2982:     AC_SUBST(USE_LIBSSH, [1])
 2983:   )
 2984: 
 2985:   if test X"$OPT_LIBSSH" != Xoff &&
 2986:      test "$LIBSSH_ENABLED" != "1"; then
 2987:     AC_MSG_ERROR([libSSH libs and/or directories were not found where specified!])
 2988:   fi
 2989: 
 2990:   if test "$LIBSSH_ENABLED" = "1"; then
 2991:     if test -n "$DIR_SSH"; then
 2992:        dnl when the libssh shared libs were found in a path that the run-time
 2993:        dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
 2994:        dnl to prevent further configure tests to fail due to this
 2995: 
 2996:        if test "x$cross_compiling" != "xyes"; then
 2997:          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH"
 2998:          export CURL_LIBRARY_PATH
 2999:          AC_MSG_NOTICE([Added $DIR_SSH to CURL_LIBRARY_PATH])
 3000:        fi
 3001:     fi
 3002:   else
 3003:     dnl no libssh, revert back to clean variables
 3004:     LDFLAGS=$CLEANLDFLAGS
 3005:     CPPFLAGS=$CLEANCPPFLAGS
 3006:     LIBS=$CLEANLIBS
 3007:   fi
 3008: elif test X"$OPT_WOLFSSH" != Xno; then
 3009:   dnl backup the pre-wolfssh variables
 3010:   CLEANLDFLAGS="$LDFLAGS"
 3011:   CLEANCPPFLAGS="$CPPFLAGS"
 3012:   CLEANLIBS="$LIBS"
 3013: 
 3014: 
 3015:   if test "$OPT_WOLFSSH" != yes; then
 3016:      WOLFCONFIG="$OPT_WOLFSSH/bin/wolfssh-config"
 3017:      LDFLAGS="$LDFLAGS `$WOLFCONFIG --libs`"
 3018:      CPPFLAGS="$CPPFLAGS `$WOLFCONFIG --cflags`"
 3019:   fi
 3020: 
 3021:   AC_CHECK_LIB(wolfssh, wolfSSH_Init)
 3022: 
 3023:   AC_CHECK_HEADERS(wolfssh/ssh.h,
 3024:     curl_ssh_msg="enabled (wolfSSH)"
 3025:     WOLFSSH_ENABLED=1
 3026:     AC_DEFINE(USE_WOLFSSH, 1, [if wolfSSH is in use])
 3027:     AC_SUBST(USE_WOLFSSH, [1])
 3028:   )
 3029: 
 3030: fi
 3031: 
 3032: dnl **********************************************************************
 3033: dnl Check for the presence of LIBRTMP libraries and headers
 3034: dnl **********************************************************************
 3035: 
 3036: dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
 3037: OPT_LIBRTMP=off
 3038: AC_ARG_WITH(librtmp,dnl
 3039: AC_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])
 3040: AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
 3041:   OPT_LIBRTMP=$withval)
 3042: 
 3043: if test X"$OPT_LIBRTMP" != Xno; then
 3044:   dnl backup the pre-librtmp variables
 3045:   CLEANLDFLAGS="$LDFLAGS"
 3046:   CLEANCPPFLAGS="$CPPFLAGS"
 3047:   CLEANLIBS="$LIBS"
 3048: 
 3049:   case "$OPT_LIBRTMP" in
 3050:   yes)
 3051:     dnl --with-librtmp (without path) used
 3052:     CURL_CHECK_PKGCONFIG(librtmp)
 3053: 
 3054:     if test "$PKGCONFIG" != "no" ; then
 3055:       LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
 3056:       LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
 3057:       CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
 3058:       version=`$PKGCONFIG --modversion librtmp`
 3059:       DIR_RTMP=`echo $LD_RTMP | $SED -e 's/-L//'`
 3060:     else
 3061:       dnl To avoid link errors, we do not allow --librtmp without
 3062:       dnl a pkgconfig file
 3063:       AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
 3064:     fi
 3065: 
 3066:     ;;
 3067:   off)
 3068:     dnl no --with-librtmp option given, just check default places
 3069:     LIB_RTMP="-lrtmp"
 3070:     ;;
 3071:   *)
 3072:     dnl use the given --with-librtmp spot
 3073:     LIB_RTMP="-lrtmp"
 3074:     PREFIX_RTMP=$OPT_LIBRTMP
 3075:     ;;
 3076:   esac
 3077: 
 3078:   dnl if given with a prefix, we set -L and -I based on that
 3079:   if test -n "$PREFIX_RTMP"; then
 3080:     LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
 3081:     CPP_RTMP=-I${PREFIX_RTMP}/include
 3082:     DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
 3083:   fi
 3084: 
 3085:   LDFLAGS="$LDFLAGS $LD_RTMP"
 3086:   CPPFLAGS="$CPPFLAGS $CPP_RTMP"
 3087:   LIBS="$LIB_RTMP $LIBS"
 3088: 
 3089:   AC_CHECK_LIB(rtmp, RTMP_Init,
 3090:     [
 3091:      AC_CHECK_HEADERS(librtmp/rtmp.h,
 3092:         curl_rtmp_msg="enabled (librtmp)"
 3093:         LIBRTMP_ENABLED=1
 3094:         AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use])
 3095:         AC_SUBST(USE_LIBRTMP, [1])
 3096:      )
 3097:     ],
 3098:       dnl not found, revert back to clean variables
 3099:       LDFLAGS=$CLEANLDFLAGS
 3100:       CPPFLAGS=$CLEANCPPFLAGS
 3101:       LIBS=$CLEANLIBS
 3102:   )
 3103: 
 3104:   if test X"$OPT_LIBRTMP" != Xoff &&
 3105:      test "$LIBRTMP_ENABLED" != "1"; then
 3106:     AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!])
 3107:   fi
 3108: 
 3109: fi
 3110: 
 3111: dnl **********************************************************************
 3112: dnl Check for linker switch for versioned symbols
 3113: dnl **********************************************************************
 3114: 
 3115: versioned_symbols_flavour=
 3116: AC_MSG_CHECKING([whether versioned symbols are wanted])
 3117: AC_ARG_ENABLE(versioned-symbols,
 3118: AC_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
 3119: AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
 3120: [ case "$enableval" in
 3121:   yes) AC_MSG_RESULT(yes)
 3122:     AC_MSG_CHECKING([if libraries can be versioned])
 3123:     GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
 3124:     if test -z "$GLD"; then
 3125:         AC_MSG_RESULT(no)
 3126:         AC_MSG_WARN([You need an ld version supporting the --version-script option])
 3127:     else
 3128:         AC_MSG_RESULT(yes)
 3129:         if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
 3130:           versioned_symbols_flavour="MULTISSL_"
 3131:         elif test "x$OPENSSL_ENABLED" = "x1"; then
 3132:           versioned_symbols_flavour="OPENSSL_"
 3133:         elif test "x$GNUTLS_ENABLED" = "x1"; then
 3134:           versioned_symbols_flavour="GNUTLS_"
 3135:         elif test "x$NSS_ENABLED" = "x1"; then
 3136:           versioned_symbols_flavour="NSS_"
 3137:         elif test "x$WOLFSSL_ENABLED" = "x1"; then
 3138:           versioned_symbols_flavour="WOLFSSL_"
 3139:         elif test "x$WINSSL_ENABLED" = "x1"; then
 3140:           versioned_symbols_flavour="SCHANNEL_"
 3141:         elif test "x$SECURETRANSPORT_ENABLED" = "x1"; then
 3142:           versioned_symbols_flavour="SECURE_TRANSPORT_"
 3143:         else
 3144:           versioned_symbols_flavour=""
 3145:         fi
 3146:         versioned_symbols="yes"
 3147:     fi
 3148:     ;;
 3149: 
 3150:   *)   AC_MSG_RESULT(no)
 3151:     ;;
 3152:   esac
 3153: ], [
 3154: AC_MSG_RESULT(no)
 3155: ]
 3156: )
 3157: 
 3158: AC_SUBST([CURL_LT_SHLIB_VERSIONED_FLAVOUR],
 3159:   ["$versioned_symbols_flavour"])
 3160: AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS],
 3161:   [test "x$versioned_symbols" = 'xyes'])
 3162: 
 3163: dnl -------------------------------------------------
 3164: dnl check winidn option before other IDN libraries
 3165: dnl -------------------------------------------------
 3166: 
 3167: AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)])
 3168: OPT_WINIDN="default"
 3169: AC_ARG_WITH(winidn,
 3170: AC_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN])
 3171: AC_HELP_STRING([--without-winidn], [disable Windows native IDN]),
 3172:   OPT_WINIDN=$withval)
 3173: case "$OPT_WINIDN" in
 3174:   no|default)
 3175:     dnl --without-winidn option used or configure option not specified
 3176:     want_winidn="no"
 3177:     AC_MSG_RESULT([no])
 3178:     ;;
 3179:   yes)
 3180:     dnl --with-winidn option used without path
 3181:     want_winidn="yes"
 3182:     want_winidn_path="default"
 3183:     AC_MSG_RESULT([yes])
 3184:     ;;
 3185:   *)
 3186:     dnl --with-winidn option used with path
 3187:     want_winidn="yes"
 3188:     want_winidn_path="$withval"
 3189:     AC_MSG_RESULT([yes ($withval)])
 3190:     ;;
 3191: esac
 3192: 
 3193: if test "$want_winidn" = "yes"; then
 3194:   dnl winidn library support has been requested
 3195:   clean_CPPFLAGS="$CPPFLAGS"
 3196:   clean_LDFLAGS="$LDFLAGS"
 3197:   clean_LIBS="$LIBS"
 3198:   WINIDN_LIBS="-lnormaliz"
 3199:   WINIDN_CPPFLAGS="-DWINVER=0x0600"
 3200:   #
 3201:   if test "$want_winidn_path" != "default"; then
 3202:     dnl path has been specified
 3203:     dnl pkg-config not available or provides no info
 3204:     WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff"
 3205:     WINIDN_CPPFLAGS="-I$want_winidn_path/include"
 3206:     WINIDN_DIR="$want_winidn_path/lib$libsuff"
 3207:   fi
 3208:   #
 3209:   CPPFLAGS="$CPPFLAGS $WINIDN_CPPFLAGS"
 3210:   LDFLAGS="$LDFLAGS $WINIDN_LDFLAGS"
 3211:   LIBS="$WINIDN_LIBS $LIBS"
 3212:   #
 3213:   AC_MSG_CHECKING([if IdnToUnicode can be linked])
 3214:   AC_LINK_IFELSE([
 3215:     AC_LANG_PROGRAM([[
 3216:       #include <windows.h>
 3217:     ]],[[
 3218:       IdnToUnicode(0, NULL, 0, NULL, 0);
 3219:     ]])
 3220:   ],[
 3221:     AC_MSG_RESULT([yes])
 3222:     tst_links_winidn="yes"
 3223:   ],[
 3224:     AC_MSG_RESULT([no])
 3225:     tst_links_winidn="no"
 3226:   ])
 3227:   #
 3228:   if test "$tst_links_winidn" = "yes"; then
 3229:     AC_DEFINE(USE_WIN32_IDN, 1, [Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz).])
 3230:     AC_DEFINE(WANT_IDN_PROTOTYPES, 1, [Define to 1 to provide own prototypes.])
 3231:     AC_SUBST([IDN_ENABLED], [1])
 3232:     curl_idn_msg="enabled (Windows-native)"
 3233:   else
 3234:     AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
 3235:     CPPFLAGS="$clean_CPPFLAGS"
 3236:     LDFLAGS="$clean_LDFLAGS"
 3237:     LIBS="$clean_LIBS"
 3238:   fi
 3239: fi
 3240: 
 3241: dnl **********************************************************************
 3242: dnl Check for the presence of IDN libraries and headers
 3243: dnl **********************************************************************
 3244: 
 3245: AC_MSG_CHECKING([whether to build with libidn2])
 3246: OPT_IDN="default"
 3247: AC_ARG_WITH(libidn2,
 3248: AC_HELP_STRING([--with-libidn2=PATH],[Enable libidn2 usage])
 3249: AC_HELP_STRING([--without-libidn2],[Disable libidn2 usage]),
 3250:   [OPT_IDN=$withval])
 3251: case "$OPT_IDN" in
 3252:   no)
 3253:     dnl --without-libidn2 option used
 3254:     want_idn="no"
 3255:     AC_MSG_RESULT([no])
 3256:     ;;
 3257:   default)
 3258:     dnl configure option not specified
 3259:     want_idn="yes"
 3260:     want_idn_path="default"
 3261:     AC_MSG_RESULT([(assumed) yes])
 3262:     ;;
 3263:   yes)
 3264:     dnl --with-libidn2 option used without path
 3265:     want_idn="yes"
 3266:     want_idn_path="default"
 3267:     AC_MSG_RESULT([yes])
 3268:     ;;
 3269:   *)
 3270:     dnl --with-libidn2 option used with path
 3271:     want_idn="yes"
 3272:     want_idn_path="$withval"
 3273:     AC_MSG_RESULT([yes ($withval)])
 3274:     ;;
 3275: esac
 3276: 
 3277: if test "$want_idn" = "yes"; then
 3278:   dnl idn library support has been requested
 3279:   clean_CPPFLAGS="$CPPFLAGS"
 3280:   clean_LDFLAGS="$LDFLAGS"
 3281:   clean_LIBS="$LIBS"
 3282:   PKGCONFIG="no"
 3283:   #
 3284:   if test "$want_idn_path" != "default"; then
 3285:     dnl path has been specified
 3286:     IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
 3287:     CURL_CHECK_PKGCONFIG(libidn2, [$IDN_PCDIR])
 3288:     if test "$PKGCONFIG" != "no"; then
 3289:       IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
 3290:         $PKGCONFIG --libs-only-l libidn2 2>/dev/null`
 3291:       IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
 3292:         $PKGCONFIG --libs-only-L libidn2 2>/dev/null`
 3293:       IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
 3294:         $PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
 3295:       IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
 3296:     else
 3297:       dnl pkg-config not available or provides no info
 3298:       IDN_LIBS="-lidn2"
 3299:       IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
 3300:       IDN_CPPFLAGS="-I$want_idn_path/include"
 3301:       IDN_DIR="$want_idn_path/lib$libsuff"
 3302:     fi
 3303:   else
 3304:     dnl path not specified
 3305:     CURL_CHECK_PKGCONFIG(libidn2)
 3306:     if test "$PKGCONFIG" != "no"; then
 3307:       IDN_LIBS=`$PKGCONFIG --libs-only-l libidn2 2>/dev/null`
 3308:       IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn2 2>/dev/null`
 3309:       IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
 3310:       IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
 3311:     else
 3312:       dnl pkg-config not available or provides no info
 3313:       IDN_LIBS="-lidn2"
 3314:     fi
 3315:   fi
 3316:   #
 3317:   if test "$PKGCONFIG" != "no"; then
 3318:     AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"])
 3319:     AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"])
 3320:     AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
 3321:     AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"])
 3322:   else
 3323:     AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"])
 3324:     AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"])
 3325:     AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
 3326:     AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"])
 3327:   fi
 3328:   #
 3329:   CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS"
 3330:   LDFLAGS="$LDFLAGS $IDN_LDFLAGS"
 3331:   LIBS="$IDN_LIBS $LIBS"
 3332:   #
 3333:   AC_MSG_CHECKING([if idn2_lookup_ul can be linked])
 3334:   AC_LINK_IFELSE([
 3335:     AC_LANG_FUNC_LINK_TRY([idn2_lookup_ul])
 3336:   ],[
 3337:     AC_MSG_RESULT([yes])
 3338:     tst_links_libidn="yes"
 3339:   ],[
 3340:     AC_MSG_RESULT([no])
 3341:     tst_links_libidn="no"
 3342:   ])
 3343:   #
 3344:   AC_CHECK_HEADERS( idn2.h )
 3345: 
 3346:   if test "$tst_links_libidn" = "yes"; then
 3347:     AC_DEFINE(HAVE_LIBIDN2, 1, [Define to 1 if you have the `idn2' library (-lidn2).])
 3348:     dnl different versions of libidn have different setups of these:
 3349: 
 3350:     AC_SUBST([IDN_ENABLED], [1])
 3351:     curl_idn_msg="enabled (libidn2)"
 3352:     if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
 3353:       CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$IDN_DIR"
 3354:       export CURL_LIBRARY_PATH
 3355:       AC_MSG_NOTICE([Added $IDN_DIR to CURL_LIBRARY_PATH])
 3356:     fi
 3357:   else
 3358:     AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
 3359:     CPPFLAGS="$clean_CPPFLAGS"
 3360:     LDFLAGS="$clean_LDFLAGS"
 3361:     LIBS="$clean_LIBS"
 3362:   fi
 3363: fi
 3364: 
 3365: 
 3366: dnl Let's hope this split URL remains working:
 3367: dnl https://www15.software.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
 3368: dnl genprogc/thread_quick_ref.htm
 3369: 
 3370: 
 3371: dnl **********************************************************************
 3372: dnl Check for nghttp2
 3373: dnl **********************************************************************
 3374: 
 3375: OPT_H2="yes"
 3376: 
 3377: if test "x$disable_http" = "xyes"; then
 3378:   # without HTTP, nghttp2 is no use
 3379:   OPT_H2="no"
 3380: fi
 3381: 
 3382: AC_ARG_WITH(nghttp2,
 3383: AC_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage])
 3384: AC_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]),
 3385:   [OPT_H2=$withval])
 3386: case "$OPT_H2" in
 3387:   no)
 3388:     dnl --without-nghttp2 option used
 3389:     want_h2="no"
 3390:     ;;
 3391:   yes)
 3392:     dnl --with-nghttp2 option used without path
 3393:     want_h2="default"
 3394:     want_h2_path=""
 3395:     ;;
 3396:   *)
 3397:     dnl --with-nghttp2 option used with path
 3398:     want_h2="yes"
 3399:     want_h2_path="$withval/lib/pkgconfig"
 3400:     ;;
 3401: esac
 3402: 
 3403: curl_h2_msg="disabled (--with-nghttp2)"
 3404: if test X"$want_h2" != Xno; then
 3405:   dnl backup the pre-nghttp2 variables
 3406:   CLEANLDFLAGS="$LDFLAGS"
 3407:   CLEANCPPFLAGS="$CPPFLAGS"
 3408:   CLEANLIBS="$LIBS"
 3409: 
 3410:   CURL_CHECK_PKGCONFIG(libnghttp2, $want_h2_path)
 3411: 
 3412:   if test "$PKGCONFIG" != "no" ; then
 3413:     LIB_H2=`CURL_EXPORT_PCDIR([$want_h2_path])
 3414:       $PKGCONFIG --libs-only-l libnghttp2`
 3415:     AC_MSG_NOTICE([-l is $LIB_H2])
 3416: 
 3417:     CPP_H2=`CURL_EXPORT_PCDIR([$want_h2_path]) dnl
 3418:       $PKGCONFIG --cflags-only-I libnghttp2`
 3419:     AC_MSG_NOTICE([-I is $CPP_H2])
 3420: 
 3421:     LD_H2=`CURL_EXPORT_PCDIR([$want_h2_path])
 3422:       $PKGCONFIG --libs-only-L libnghttp2`
 3423:     AC_MSG_NOTICE([-L is $LD_H2])
 3424: 
 3425:     LDFLAGS="$LDFLAGS $LD_H2"
 3426:     CPPFLAGS="$CPPFLAGS $CPP_H2"
 3427:     LIBS="$LIB_H2 $LIBS"
 3428: 
 3429:     # use nghttp2_session_set_local_window_size to require nghttp2
 3430:     # >= 1.12.0
 3431:     AC_CHECK_LIB(nghttp2, nghttp2_session_set_local_window_size,
 3432:       [
 3433:        AC_CHECK_HEADERS(nghttp2/nghttp2.h,
 3434:           curl_h2_msg="enabled (nghttp2)"
 3435:           NGHTTP2_ENABLED=1
 3436:           AC_DEFINE(USE_NGHTTP2, 1, [if nghttp2 is in use])
 3437:           AC_SUBST(USE_NGHTTP2, [1])
 3438:        )
 3439:       ],
 3440:         dnl not found, revert back to clean variables
 3441:         LDFLAGS=$CLEANLDFLAGS
 3442:         CPPFLAGS=$CLEANCPPFLAGS
 3443:         LIBS=$CLEANLIBS
 3444:     )
 3445: 
 3446:   else
 3447:     dnl no nghttp2 pkg-config found, deal with it
 3448:     if test X"$want_h2" != Xdefault; then
 3449:       dnl To avoid link errors, we do not allow --with-nghttp2 without
 3450:       dnl a pkgconfig file
 3451:       AC_MSG_ERROR([--with-nghttp2 was specified but could not find libnghttp2 pkg-config file.])
 3452:     fi
 3453:   fi
 3454: 
 3455: fi
 3456: 
 3457: dnl **********************************************************************
 3458: dnl Check for ngtcp2 (QUIC)
 3459: dnl **********************************************************************
 3460: 
 3461: OPT_TCP2="yes"
 3462: curl_h3_msg="disabled (--with-ngtcp2, --with-quiche)"
 3463: 
 3464: if test "x$disable_http" = "xyes"; then
 3465:   # without HTTP, ngtcp2 is no use
 3466:   OPT_TCP2="no"
 3467: fi
 3468: 
 3469: AC_ARG_WITH(ngtcp2,
 3470: AC_HELP_STRING([--with-ngtcp2=PATH],[Enable ngtcp2 usage])
 3471: AC_HELP_STRING([--without-ngtcp2],[Disable ngtcp2 usage]),
 3472:   [OPT_TCP2=$withval])
 3473: case "$OPT_TCP2" in
 3474:   no)
 3475:     dnl --without-ngtcp2 option used
 3476:     want_tcp2="no"
 3477:     ;;
 3478:   yes)
 3479:     dnl --with-ngtcp2 option used without path
 3480:     want_tcp2="default"
 3481:     want_tcp2_path=""
 3482:     ;;
 3483:   *)
 3484:     dnl --with-ngtcp2 option used with path
 3485:     want_tcp2="yes"
 3486:     want_tcp2_path="$withval/lib/pkgconfig"
 3487:     ;;
 3488: esac
 3489: 
 3490: curl_tcp2_msg="disabled (--with-ngtcp2)"
 3491: if test X"$want_tcp2" != Xno; then
 3492:   dnl backup the pre-ngtcp2 variables
 3493:   CLEANLDFLAGS="$LDFLAGS"
 3494:   CLEANCPPFLAGS="$CPPFLAGS"
 3495:   CLEANLIBS="$LIBS"
 3496: 
 3497:   CURL_CHECK_PKGCONFIG(libngtcp2, $want_tcp2_path)
 3498: 
 3499:   if test "$PKGCONFIG" != "no" ; then
 3500:     LIB_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path])
 3501:       $PKGCONFIG --libs-only-l libngtcp2`
 3502:     AC_MSG_NOTICE([-l is $LIB_TCP2])
 3503: 
 3504:     CPP_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
 3505:       $PKGCONFIG --cflags-only-I libngtcp2`
 3506:     AC_MSG_NOTICE([-I is $CPP_TCP2])
 3507: 
 3508:     LD_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path])
 3509:       $PKGCONFIG --libs-only-L libngtcp2`
 3510:     AC_MSG_NOTICE([-L is $LD_TCP2])
 3511: 
 3512:     LDFLAGS="$LDFLAGS $LD_TCP2"
 3513:     CPPFLAGS="$CPPFLAGS $CPP_TCP2"
 3514:     LIBS="$LIB_TCP2 $LIBS"
 3515: 
 3516:     if test "x$cross_compiling" != "xyes"; then
 3517:       DIR_TCP2=`echo $LD_TCP2 | $SED -e 's/-L//'`
 3518:     fi
 3519:     AC_CHECK_LIB(ngtcp2, ngtcp2_conn_client_new,
 3520:       [
 3521:        AC_CHECK_HEADERS(ngtcp2/ngtcp2.h,
 3522:           NGTCP2_ENABLED=1
 3523:           AC_DEFINE(USE_NGTCP2, 1, [if ngtcp2 is in use])
 3524:           AC_SUBST(USE_NGTCP2, [1])
 3525:           CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_TCP2"
 3526:           export CURL_LIBRARY_PATH
 3527:           AC_MSG_NOTICE([Added $DIR_TCP2 to CURL_LIBRARY_PATH])
 3528:        )
 3529:       ],
 3530:         dnl not found, revert back to clean variables
 3531:         LDFLAGS=$CLEANLDFLAGS
 3532:         CPPFLAGS=$CLEANCPPFLAGS
 3533:         LIBS=$CLEANLIBS
 3534:     )
 3535: 
 3536:   else
 3537:     dnl no ngtcp2 pkg-config found, deal with it
 3538:     if test X"$want_tcp2" != Xdefault; then
 3539:       dnl To avoid link errors, we do not allow --with-ngtcp2 without
 3540:       dnl a pkgconfig file
 3541:       AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2 pkg-config file.])
 3542:     fi
 3543:   fi
 3544: 
 3545: fi
 3546: 
 3547: if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1"; then
 3548:   dnl backup the pre-ngtcp2_crypto_openssl variables
 3549:   CLEANLDFLAGS="$LDFLAGS"
 3550:   CLEANCPPFLAGS="$CPPFLAGS"
 3551:   CLEANLIBS="$LIBS"
 3552: 
 3553:   CURL_CHECK_PKGCONFIG(libngtcp2_crypto_openssl, $want_tcp2_path)
 3554: 
 3555:   if test "$PKGCONFIG" != "no" ; then
 3556:     LIB_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
 3557:       $PKGCONFIG --libs-only-l libngtcp2_crypto_openssl`
 3558:     AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_OPENSSL])
 3559: 
 3560:     CPP_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
 3561:       $PKGCONFIG --cflags-only-I libngtcp2_crypto_openssl`
 3562:     AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_OPENSSL])
 3563: 
 3564:     LD_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
 3565:       $PKGCONFIG --libs-only-L libngtcp2_crypto_openssl`
 3566:     AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_OPENSSL])
 3567: 
 3568:     LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_OPENSSL"
 3569:     CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_OPENSSL"
 3570:     LIBS="$LIB_NGTCP2_CRYPTO_OPENSSL $LIBS"
 3571: 
 3572:     if test "x$cross_compiling" != "xyes"; then
 3573:       DIR_NGTCP2_CRYPTO_OPENSSL=`echo $LD_NGTCP2_CRYPTO_OPENSSL | $SED -e 's/-L//'`
 3574:     fi
 3575:     AC_CHECK_LIB(ngtcp2_crypto_openssl, ngtcp2_crypto_ctx_initial,
 3576:       [
 3577:        AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
 3578:           NGTCP2_ENABLED=1
 3579:           AC_DEFINE(USE_NGTCP2_CRYPTO_OPENSSL, 1, [if ngtcp2_crypto_openssl is in use])
 3580:           AC_SUBST(USE_NGTCP2_CRYPTO_OPENSSL, [1])
 3581:           CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_OPENSSL"
 3582:           export CURL_LIBRARY_PATH
 3583:           AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_OPENSSL to CURL_LIBRARY_PATH])
 3584:        )
 3585:       ],
 3586:         dnl not found, revert back to clean variables
 3587:         LDFLAGS=$CLEANLDFLAGS
 3588:         CPPFLAGS=$CLEANCPPFLAGS
 3589:         LIBS=$CLEANLIBS
 3590:     )
 3591: 
 3592:   else
 3593:     dnl no ngtcp2_crypto_openssl pkg-config found, deal with it
 3594:     if test X"$want_tcp2" != Xdefault; then
 3595:       dnl To avoid link errors, we do not allow --with-ngtcp2 without
 3596:       dnl a pkgconfig file
 3597:       AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_openssl pkg-config file.])
 3598:     fi
 3599:   fi
 3600: fi
 3601: 
 3602: if test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then
 3603:   dnl backup the pre-ngtcp2_crypto_gnutls variables
 3604:   CLEANLDFLAGS="$LDFLAGS"
 3605:   CLEANCPPFLAGS="$CPPFLAGS"
 3606:   CLEANLIBS="$LIBS"
 3607: 
 3608:   CURL_CHECK_PKGCONFIG(libngtcp2_crypto_gnutls, $want_tcp2_path)
 3609: 
 3610:   if test "$PKGCONFIG" != "no" ; then
 3611:     LIB_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
 3612:       $PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls`
 3613:     AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_GNUTLS])
 3614: 
 3615:     CPP_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
 3616:       $PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls`
 3617:     AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_GNUTLS])
 3618: 
 3619:     LD_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
 3620:       $PKGCONFIG --libs-only-L libngtcp2_crypto_gnutls`
 3621:     AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_GNUTLS])
 3622: 
 3623:     LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_GNUTLS"
 3624:     CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_GNUTLS"
 3625:     LIBS="$LIB_NGTCP2_CRYPTO_GNUTLS $LIBS"
 3626: 
 3627:     if test "x$cross_compiling" != "xyes"; then
 3628:       DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/-L//'`
 3629:     fi
 3630:     AC_CHECK_LIB(ngtcp2_crypto_gnutls, ngtcp2_crypto_ctx_initial,
 3631:       [
 3632:        AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
 3633:           NGTCP2_ENABLED=1
 3634:           AC_DEFINE(USE_NGTCP2_CRYPTO_GNUTLS, 1, [if ngtcp2_crypto_gnutls is in use])
 3635:           AC_SUBST(USE_NGTCP2_CRYPTO_GNUTLS, [1])
 3636:           CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS"
 3637:           export CURL_LIBRARY_PATH
 3638:           AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH])
 3639:        )
 3640:       ],
 3641:         dnl not found, revert back to clean variables
 3642:         LDFLAGS=$CLEANLDFLAGS
 3643:         CPPFLAGS=$CLEANCPPFLAGS
 3644:         LIBS=$CLEANLIBS
 3645:     )
 3646: 
 3647:   else
 3648:     dnl no ngtcp2_crypto_gnutls pkg-config found, deal with it
 3649:     if test X"$want_tcp2" != Xdefault; then
 3650:       dnl To avoid link errors, we do not allow --with-ngtcp2 without
 3651:       dnl a pkgconfig file
 3652:       AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_gnutls pkg-config file.])
 3653:     fi
 3654:   fi
 3655: fi
 3656: 
 3657: dnl **********************************************************************
 3658: dnl Check for nghttp3 (HTTP/3 with ngtcp2)
 3659: dnl **********************************************************************
 3660: 
 3661: OPT_NGHTTP3="yes"
 3662: 
 3663: if test "x$NGTCP2_ENABLED" = "x"; then
 3664:   # without ngtcp2, nghttp3 is of no use for us
 3665:   OPT_NGHTTP3="no"
 3666: fi
 3667: 
 3668: AC_ARG_WITH(nghttp3,
 3669: AC_HELP_STRING([--with-nghttp3=PATH],[Enable nghttp3 usage])
 3670: AC_HELP_STRING([--without-nghttp3],[Disable nghttp3 usage]),
 3671:   [OPT_NGHTTP3=$withval])
 3672: case "$OPT_NGHTTP3" in
 3673:   no)
 3674:     dnl --without-nghttp3 option used
 3675:     want_nghttp3="no"
 3676:     ;;
 3677:   yes)
 3678:     dnl --with-nghttp3 option used without path
 3679:     want_nghttp3="default"
 3680:     want_nghttp3_path=""
 3681:     ;;
 3682:   *)
 3683:     dnl --with-nghttp3 option used with path
 3684:     want_nghttp3="yes"
 3685:     want_nghttp3_path="$withval/lib/pkgconfig"
 3686:     ;;
 3687: esac
 3688: 
 3689: curl_http3_msg="disabled (--with-nghttp3)"
 3690: if test X"$want_nghttp3" != Xno; then
 3691:   dnl backup the pre-nghttp3 variables
 3692:   CLEANLDFLAGS="$LDFLAGS"
 3693:   CLEANCPPFLAGS="$CPPFLAGS"
 3694:   CLEANLIBS="$LIBS"
 3695: 
 3696:   CURL_CHECK_PKGCONFIG(libnghttp3, $want_nghttp3_path)
 3697: 
 3698:   if test "$PKGCONFIG" != "no" ; then
 3699:     LIB_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path])
 3700:       $PKGCONFIG --libs-only-l libnghttp3`
 3701:     AC_MSG_NOTICE([-l is $LIB_NGHTTP3])
 3702: 
 3703:     CPP_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) dnl
 3704:       $PKGCONFIG --cflags-only-I libnghttp3`
 3705:     AC_MSG_NOTICE([-I is $CPP_NGHTTP3])
 3706: 
 3707:     LD_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path])
 3708:       $PKGCONFIG --libs-only-L libnghttp3`
 3709:     AC_MSG_NOTICE([-L is $LD_NGHTTP3])
 3710: 
 3711:     LDFLAGS="$LDFLAGS $LD_NGHTTP3"
 3712:     CPPFLAGS="$CPPFLAGS $CPP_NGHTTP3"
 3713:     LIBS="$LIB_NGHTTP3 $LIBS"
 3714: 
 3715:     if test "x$cross_compiling" != "xyes"; then
 3716:       DIR_NGHTTP3=`echo $LD_NGHTTP3 | $SED -e 's/-L//'`
 3717:     fi
 3718:     AC_CHECK_LIB(nghttp3, nghttp3_conn_client_new,
 3719:       [
 3720:        AC_CHECK_HEADERS(nghttp3/nghttp3.h,
 3721:           curl_h3_msg="enabled (ngtcp2 + nghttp3)"
 3722:           NGHTTP3_ENABLED=1
 3723:           AC_DEFINE(USE_NGHTTP3, 1, [if nghttp3 is in use])
 3724:           AC_SUBST(USE_NGHTTP3, [1])
 3725:           CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGHTTP3"
 3726:           export CURL_LIBRARY_PATH
 3727:           AC_MSG_NOTICE([Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH])
 3728:           experimental="$experimental HTTP3"
 3729:        )
 3730:       ],
 3731:         dnl not found, revert back to clean variables
 3732:         LDFLAGS=$CLEANLDFLAGS
 3733:         CPPFLAGS=$CLEANCPPFLAGS
 3734:         LIBS=$CLEANLIBS
 3735:     )
 3736: 
 3737:   else
 3738:     dnl no nghttp3 pkg-config found, deal with it
 3739:     if test X"$want_nghttp3" != Xdefault; then
 3740:       dnl To avoid link errors, we do not allow --with-nghttp3 without
 3741:       dnl a pkgconfig file
 3742:       AC_MSG_ERROR([--with-nghttp3 was specified but could not find nghttp3 pkg-config file.])
 3743:     fi
 3744:   fi
 3745: 
 3746: fi
 3747: 
 3748: dnl **********************************************************************
 3749: dnl Check for quiche (QUIC)
 3750: dnl **********************************************************************
 3751: 
 3752: OPT_QUICHE="yes"
 3753: 
 3754: if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
 3755:   # without HTTP or with ngtcp2, quiche is no use
 3756:   OPT_QUICHE="no"
 3757: fi
 3758: 
 3759: AC_ARG_WITH(quiche,
 3760: AC_HELP_STRING([--with-quiche=PATH],[Enable quiche usage])
 3761: AC_HELP_STRING([--without-quiche],[Disable quiche usage]),
 3762:   [OPT_QUICHE=$withval])
 3763: case "$OPT_QUICHE" in
 3764:   no)
 3765:     dnl --without-quiche option used
 3766:     want_quiche="no"
 3767:     ;;
 3768:   yes)
 3769:     dnl --with-quiche option used without path
 3770:     want_quiche="default"
 3771:     want_quiche_path=""
 3772:     ;;
 3773:   *)
 3774:     dnl --with-quiche option used with path
 3775:     want_quiche="yes"
 3776:     want_quiche_path="$withval"
 3777:     ;;
 3778: esac
 3779: 
 3780: if test X"$want_quiche" != Xno; then
 3781:   dnl backup the pre-quiche variables
 3782:   CLEANLDFLAGS="$LDFLAGS"
 3783:   CLEANCPPFLAGS="$CPPFLAGS"
 3784:   CLEANLIBS="$LIBS"
 3785: 
 3786:   CURL_CHECK_PKGCONFIG(quiche, $want_quiche_path)
 3787: 
 3788:   if test "$PKGCONFIG" != "no" ; then
 3789:     LIB_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path])
 3790:       $PKGCONFIG --libs-only-l quiche`
 3791:     AC_MSG_NOTICE([-l is $LIB_QUICHE])
 3792: 
 3793:     CPP_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) dnl
 3794:       $PKGCONFIG --cflags-only-I quiche`
 3795:     AC_MSG_NOTICE([-I is $CPP_QUICHE])
 3796: 
 3797:     LD_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path])
 3798:       $PKGCONFIG --libs-only-L quiche`
 3799:     AC_MSG_NOTICE([-L is $LD_QUICHE])
 3800: 
 3801:     LDFLAGS="$LDFLAGS $LD_QUICHE"
 3802:     CPPFLAGS="$CPPFLAGS $CPP_QUICHE"
 3803:     LIBS="$LIB_QUICHE $LIBS"
 3804: 
 3805:     if test "x$cross_compiling" != "xyes"; then
 3806:       DIR_QUICHE=`echo $LD_QUICHE | $SED -e 's/-L//'`
 3807:     fi
 3808:     AC_CHECK_LIB(quiche, quiche_connect,
 3809:       [
 3810:        AC_CHECK_HEADERS(quiche.h,
 3811:           experimental="$experimental HTTP3"
 3812:           AC_MSG_NOTICE([HTTP3 support is experimental])
 3813:           curl_h3_msg="enabled (quiche)"
 3814:           QUICHE_ENABLED=1
 3815:           AC_DEFINE(USE_QUICHE, 1, [if quiche is in use])
 3816:           AC_SUBST(USE_QUICHE, [1])
 3817:           CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_QUICHE"
 3818:           export CURL_LIBRARY_PATH
 3819:           AC_MSG_NOTICE([Added $DIR_QUICHE to CURL_LIBRARY_PATH]),
 3820:        )
 3821:       ],
 3822:         dnl not found, revert back to clean variables
 3823:         LDFLAGS=$CLEANLDFLAGS
 3824:         CPPFLAGS=$CLEANCPPFLAGS
 3825:         LIBS=$CLEANLIBS
 3826:     )
 3827:   else
 3828:     dnl no quiche pkg-config found, deal with it
 3829:     if test X"$want_quiche" != Xdefault; then
 3830:       dnl To avoid link errors, we do not allow --with-quiche without
 3831:       dnl a pkgconfig file
 3832:       AC_MSG_ERROR([--with-quiche was specified but could not find quiche pkg-config file.])
 3833:     fi
 3834:   fi
 3835: fi
 3836: 
 3837: dnl **********************************************************************
 3838: dnl Check for zsh completion path
 3839: dnl **********************************************************************
 3840: 
 3841: OPT_ZSH_FPATH=default
 3842: AC_ARG_WITH(zsh-functions-dir,
 3843: AC_HELP_STRING([--with-zsh-functions-dir=PATH],[Install zsh completions to PATH])
 3844: AC_HELP_STRING([--without-zsh-functions-dir],[Do not install zsh completions]),
 3845:   [OPT_ZSH_FPATH=$withval])
 3846: case "$OPT_ZSH_FPATH" in
 3847:   no)
 3848:     dnl --without-zsh-functions-dir option used
 3849:     ;;
 3850:   default|yes)
 3851:     dnl --with-zsh-functions-dir option used without path
 3852:     ZSH_FUNCTIONS_DIR="$datarootdir/zsh/site-functions"
 3853:     AC_SUBST(ZSH_FUNCTIONS_DIR)
 3854:     ;;
 3855:   *)
 3856:     dnl --with-zsh-functions-dir option used with path
 3857:     ZSH_FUNCTIONS_DIR="$withval"
 3858:     AC_SUBST(ZSH_FUNCTIONS_DIR)
 3859:     ;;
 3860: esac
 3861: 
 3862: dnl **********************************************************************
 3863: dnl Check for fish completion path
 3864: dnl **********************************************************************
 3865: 
 3866: OPT_FISH_FPATH=default
 3867: AC_ARG_WITH(fish-functions-dir,
 3868: AC_HELP_STRING([--with-fish-functions-dir=PATH],[Install fish completions to PATH])
 3869: AC_HELP_STRING([--without-fish-functions-dir],[Do not install fish completions]),
 3870:   [OPT_FISH_FPATH=$withval])
 3871: case "$OPT_FISH_FPATH" in
 3872:   no)
 3873:     dnl --without-fish-functions-dir option used
 3874:     ;;
 3875:   default|yes)
 3876:     dnl --with-fish-functions-dir option used without path
 3877:     CURL_CHECK_PKGCONFIG(fish)
 3878:     if test "$PKGCONFIG" != "no" ; then
 3879:       FISH_FUNCTIONS_DIR="$($PKGCONFIG --variable completionsdir fish)"
 3880:     else
 3881:       FISH_FUNCTIONS_DIR="$datarootdir/fish/vendor_completions.d"
 3882:     fi
 3883:     AC_SUBST(FISH_FUNCTIONS_DIR)
 3884:     ;;
 3885:   *)
 3886:     dnl --with-fish-functions-dir option used with path
 3887:     FISH_FUNCTIONS_DIR="$withval"
 3888:     AC_SUBST(FISH_FUNCTIONS_DIR)
 3889:     ;;
 3890: esac
 3891: 
 3892: dnl **********************************************************************
 3893: dnl Back to "normal" configuring
 3894: dnl **********************************************************************
 3895: 
 3896: dnl Checks for header files.
 3897: AC_HEADER_STDC
 3898: 
 3899: CURL_CHECK_HEADER_MALLOC
 3900: CURL_CHECK_HEADER_MEMORY
 3901: 
 3902: dnl Now check for the very most basic headers. Then we can use these
 3903: dnl ones as default-headers when checking for the rest!
 3904: AC_CHECK_HEADERS(
 3905:         sys/types.h \
 3906:         sys/time.h \
 3907:         sys/select.h \
 3908:         sys/socket.h \
 3909:         sys/ioctl.h \
 3910:         sys/uio.h \
 3911:         assert.h \
 3912:         unistd.h \
 3913:         stdlib.h \
 3914:         arpa/inet.h \
 3915:         net/if.h \
 3916:         netinet/in.h \
 3917: 	netinet/in6.h \
 3918:         sys/un.h \
 3919:         linux/tcp.h \
 3920:         netinet/tcp.h \
 3921:         netdb.h \
 3922:         sys/sockio.h \
 3923:         sys/stat.h \
 3924:         sys/param.h \
 3925:         termios.h \
 3926:         termio.h \
 3927:         sgtty.h \
 3928:         fcntl.h \
 3929:         alloca.h \
 3930:         time.h \
 3931:         io.h \
 3932:         pwd.h \
 3933:         utime.h \
 3934:         sys/utime.h \
 3935:         sys/poll.h \
 3936:         poll.h \
 3937:         socket.h \
 3938:         sys/resource.h \
 3939:         libgen.h \
 3940:         locale.h \
 3941:         errno.h \
 3942:         stdbool.h \
 3943:         arpa/tftp.h \
 3944:         sys/filio.h \
 3945:         sys/wait.h \
 3946:         setjmp.h,
 3947: dnl to do if not found
 3948: [],
 3949: dnl to do if found
 3950: [],
 3951: dnl default includes
 3952: [
 3953: #ifdef HAVE_SYS_TYPES_H
 3954: #include <sys/types.h>
 3955: #endif
 3956: #ifdef HAVE_SYS_TIME_H
 3957: #include <sys/time.h>
 3958: #endif
 3959: #ifdef HAVE_SYS_SELECT_H
 3960: #include <sys/select.h>
 3961: #elif defined(HAVE_UNISTD_H)
 3962: #include <unistd.h>
 3963: #endif
 3964: #ifdef HAVE_SYS_SOCKET_H
 3965: #include <sys/socket.h>
 3966: #endif
 3967: #ifdef HAVE_NETINET_IN_H
 3968: #include <netinet/in.h>
 3969: #endif
 3970: #ifdef HAVE_NETINET_IN6_H
 3971: #include <netinet/in6.h>
 3972: #endif
 3973: #ifdef HAVE_SYS_UN_H
 3974: #include <sys/un.h>
 3975: #endif
 3976: ]
 3977: )
 3978: 
 3979: 
 3980: dnl Checks for typedefs, structures, and compiler characteristics.
 3981: AC_C_CONST
 3982: CURL_CHECK_VARIADIC_MACROS
 3983: AC_TYPE_SIZE_T
 3984: AC_HEADER_TIME
 3985: CURL_CHECK_STRUCT_TIMEVAL
 3986: CURL_VERIFY_RUNTIMELIBS
 3987: 
 3988: AX_COMPILE_CHECK_SIZEOF(size_t)
 3989: AX_COMPILE_CHECK_SIZEOF(long)
 3990: AX_COMPILE_CHECK_SIZEOF(int)
 3991: AX_COMPILE_CHECK_SIZEOF(short)
 3992: AX_COMPILE_CHECK_SIZEOF(time_t)
 3993: AX_COMPILE_CHECK_SIZEOF(off_t)
 3994: 
 3995: o=$CPPFLAGS
 3996: CPPFLAGS="-I$srcdir/include $CPPFLAGS"
 3997: AX_COMPILE_CHECK_SIZEOF(curl_off_t, [
 3998: #include <curl/system.h>
 3999: ])
 4000: CPPFLAGS=$o
 4001: 
 4002: AC_CHECK_TYPE(long long,
 4003:    [AC_DEFINE(HAVE_LONGLONG, 1,
 4004:       [Define to 1 if the compiler supports the 'long long' data type.])]
 4005:    longlong="yes"
 4006: )
 4007: 
 4008: if test "xyes" = "x$longlong"; then
 4009:   AC_MSG_CHECKING([if numberLL works])
 4010:   AC_COMPILE_IFELSE([
 4011:     AC_LANG_PROGRAM([[
 4012:     ]],[[
 4013:       long long val = 1000LL;
 4014:     ]])
 4015:   ],[
 4016:     AC_MSG_RESULT([yes])
 4017:     AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])
 4018:   ],[
 4019:     AC_MSG_RESULT([no])
 4020:   ])
 4021: fi
 4022: 
 4023: 
 4024: # check for ssize_t
 4025: AC_CHECK_TYPE(ssize_t, ,
 4026:    AC_DEFINE(ssize_t, int, [the signed version of size_t]))
 4027: 
 4028: # check for bool type
 4029: AC_CHECK_TYPE([bool],[
 4030:   AC_DEFINE(HAVE_BOOL_T, 1,
 4031:     [Define to 1 if bool is an available type.])
 4032: ], ,[
 4033: #ifdef HAVE_SYS_TYPES_H
 4034: #include <sys/types.h>
 4035: #endif
 4036: #ifdef HAVE_STDBOOL_H
 4037: #include <stdbool.h>
 4038: #endif
 4039: ])
 4040: 
 4041: # check for sa_family_t
 4042: AC_CHECK_TYPE(sa_family_t,
 4043:    AC_DEFINE(CURL_SA_FAMILY_T, sa_family_t, [IP address type in sockaddr]),
 4044:    [
 4045:    # The windows name?
 4046:    AC_CHECK_TYPE(ADDRESS_FAMILY,
 4047:      AC_DEFINE(CURL_SA_FAMILY_T, ADDRESS_FAMILY, [IP address type in sockaddr]),
 4048:      AC_DEFINE(CURL_SA_FAMILY_T, unsigned short, [IP address type in sockaddr]),
 4049:     [
 4050: #ifdef HAVE_SYS_SOCKET_H
 4051: #include <sys/socket.h>
 4052: #endif
 4053:     ])
 4054:    ],
 4055: [
 4056: #ifdef HAVE_SYS_SOCKET_H
 4057: #include <sys/socket.h>
 4058: #endif
 4059: ])
 4060: 
 4061: AC_MSG_CHECKING([if time_t is unsigned])
 4062: CURL_RUN_IFELSE(
 4063:   [
 4064:   #include <time.h>
 4065:   #include <limits.h>
 4066:   time_t t = -1;
 4067:   return (t > 0);
 4068:   ],[
 4069:   AC_MSG_RESULT([yes])
 4070:   AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned])
 4071: ],[
 4072:   AC_MSG_RESULT([no])
 4073: ],[
 4074:   dnl cross-compiling, most systems are unsigned
 4075:   AC_MSG_RESULT([no])
 4076: ])
 4077: 
 4078: CURL_CONFIGURE_PULL_SYS_POLL
 4079: 
 4080: TYPE_IN_ADDR_T
 4081: 
 4082: TYPE_SOCKADDR_STORAGE
 4083: 
 4084: TYPE_SIG_ATOMIC_T
 4085: 
 4086: AC_TYPE_SIGNAL
 4087: 
 4088: CURL_CHECK_FUNC_SELECT
 4089: 
 4090: CURL_CHECK_FUNC_RECV
 4091: CURL_CHECK_FUNC_SEND
 4092: CURL_CHECK_MSG_NOSIGNAL
 4093: 
 4094: CURL_CHECK_FUNC_ALARM
 4095: CURL_CHECK_FUNC_BASENAME
 4096: CURL_CHECK_FUNC_CLOSESOCKET
 4097: CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
 4098: CURL_CHECK_FUNC_CONNECT
 4099: CURL_CHECK_FUNC_FCNTL
 4100: CURL_CHECK_FUNC_FREEADDRINFO
 4101: CURL_CHECK_FUNC_FREEIFADDRS
 4102: CURL_CHECK_FUNC_FSETXATTR
 4103: CURL_CHECK_FUNC_FTRUNCATE
 4104: CURL_CHECK_FUNC_GETADDRINFO
 4105: CURL_CHECK_FUNC_GAI_STRERROR
 4106: CURL_CHECK_FUNC_GETHOSTBYADDR
 4107: CURL_CHECK_FUNC_GETHOSTBYADDR_R
 4108: CURL_CHECK_FUNC_GETHOSTBYNAME
 4109: CURL_CHECK_FUNC_GETHOSTBYNAME_R
 4110: CURL_CHECK_FUNC_GETHOSTNAME
 4111: CURL_CHECK_FUNC_GETPEERNAME
 4112: CURL_CHECK_FUNC_GETSOCKNAME
 4113: CURL_CHECK_FUNC_IF_NAMETOINDEX
 4114: CURL_CHECK_FUNC_GETIFADDRS
 4115: CURL_CHECK_FUNC_GETSERVBYPORT_R
 4116: CURL_CHECK_FUNC_GMTIME_R
 4117: CURL_CHECK_FUNC_INET_NTOA_R
 4118: CURL_CHECK_FUNC_INET_NTOP
 4119: CURL_CHECK_FUNC_INET_PTON
 4120: CURL_CHECK_FUNC_IOCTL
 4121: CURL_CHECK_FUNC_IOCTLSOCKET
 4122: CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
 4123: CURL_CHECK_FUNC_LOCALTIME_R
 4124: CURL_CHECK_FUNC_MEMRCHR
 4125: CURL_CHECK_FUNC_POLL
 4126: CURL_CHECK_FUNC_SETSOCKOPT
 4127: CURL_CHECK_FUNC_SIGACTION
 4128: CURL_CHECK_FUNC_SIGINTERRUPT
 4129: CURL_CHECK_FUNC_SIGNAL
 4130: CURL_CHECK_FUNC_SIGSETJMP
 4131: CURL_CHECK_FUNC_SOCKET
 4132: CURL_CHECK_FUNC_SOCKETPAIR
 4133: CURL_CHECK_FUNC_STRCASECMP
 4134: CURL_CHECK_FUNC_STRCMPI
 4135: CURL_CHECK_FUNC_STRDUP
 4136: CURL_CHECK_FUNC_STRERROR_R
 4137: CURL_CHECK_FUNC_STRICMP
 4138: CURL_CHECK_FUNC_STRNCASECMP
 4139: CURL_CHECK_FUNC_STRNCMPI
 4140: CURL_CHECK_FUNC_STRNICMP
 4141: CURL_CHECK_FUNC_STRSTR
 4142: CURL_CHECK_FUNC_STRTOK_R
 4143: CURL_CHECK_FUNC_STRTOLL
 4144: CURL_CHECK_FUNC_WRITEV
 4145: 
 4146: case $host in
 4147:   *msdosdjgpp)
 4148:      ac_cv_func_pipe=no
 4149:      skipcheck_pipe=yes
 4150:      AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
 4151:     ;;
 4152: esac
 4153: 
 4154: AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Set if getpwuid_r() declaration is missing")],
 4155:         [[#include <pwd.h>
 4156:           #include <sys/types.h>]])
 4157: 
 4158: 
 4159: AC_CHECK_FUNCS([fnmatch \
 4160:   geteuid \
 4161:   getpass_r \
 4162:   getppid \
 4163:   getpwuid \
 4164:   getpwuid_r \
 4165:   getrlimit \
 4166:   gettimeofday \
 4167:   if_nametoindex \
 4168:   mach_absolute_time \
 4169:   pipe \
 4170:   setlocale \
 4171:   setmode \
 4172:   setrlimit \
 4173:   usleep \
 4174:   utime \
 4175:   utimes
 4176: ],[
 4177: ],[
 4178:   func="$ac_func"
 4179:   eval skipcheck=\$skipcheck_$func
 4180:   if test "x$skipcheck" != "xyes"; then
 4181:     AC_MSG_CHECKING([deeper for $func])
 4182:     AC_LINK_IFELSE([
 4183:       AC_LANG_PROGRAM([[
 4184:       ]],[[
 4185:         $func ();
 4186:       ]])
 4187:     ],[
 4188:       AC_MSG_RESULT([yes])
 4189:       eval "ac_cv_func_$func=yes"
 4190:       AC_DEFINE_UNQUOTED(XC_SH_TR_CPP([HAVE_$func]), [1],
 4191:         [Define to 1 if you have the $func function.])
 4192:     ],[
 4193:       AC_MSG_RESULT([but still no])
 4194:     ])
 4195:   fi
 4196: ])
 4197: 
 4198: CURL_CHECK_NONBLOCKING_SOCKET
 4199: 
 4200: dnl ************************************************************
 4201: dnl nroff tool stuff
 4202: dnl
 4203: 
 4204: AC_PATH_PROG( PERL, perl, ,
 4205:   $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
 4206: AC_SUBST(PERL)
 4207: 
 4208: AC_PATH_PROGS( NROFF, gnroff nroff, ,
 4209:   $PATH:/usr/bin/:/usr/local/bin )
 4210: AC_SUBST(NROFF)
 4211: 
 4212: if test -n "$NROFF"; then
 4213:   dnl only check for nroff options if an nroff command was found
 4214: 
 4215:   AC_MSG_CHECKING([how to use *nroff to get plain text from man pages])
 4216:   MANOPT="-man"
 4217:   mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
 4218:   if test -z "$mancheck"; then
 4219:     MANOPT="-mandoc"
 4220:    mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
 4221:     if test -z "$mancheck"; then
 4222:       MANOPT=""
 4223:       AC_MSG_RESULT([failed])
 4224:       AC_MSG_WARN([found no *nroff option to get plaintext from man pages])
 4225:     else
 4226:       AC_MSG_RESULT([$MANOPT])
 4227:     fi
 4228:   else
 4229:     AC_MSG_RESULT([$MANOPT])
 4230:   fi
 4231:   AC_SUBST(MANOPT)
 4232: fi
 4233: 
 4234: if test -z "$MANOPT"
 4235: then
 4236:   dnl if no nroff tool was found, or no option that could convert man pages
 4237:   dnl was found, then disable the built-in manual stuff
 4238:   AC_MSG_WARN([disabling built-in manual])
 4239:   USE_MANUAL="no";
 4240: fi
 4241: 
 4242: dnl *************************************************************************
 4243: dnl If the manual variable still is set, then we go with providing a built-in
 4244: dnl manual
 4245: 
 4246: if test "$USE_MANUAL" = "1"; then
 4247:   AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
 4248:   curl_manual_msg="enabled"
 4249: fi
 4250: 
 4251: dnl set variable for use in automakefile(s)
 4252: AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
 4253: 
 4254: CURL_CHECK_LIB_ARES
 4255: AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
 4256: 
 4257: if test "x$curl_cv_native_windows" != "xyes" &&
 4258:    test "x$enable_shared" = "xyes"; then
 4259:   build_libhostname=yes
 4260: else
 4261:   build_libhostname=no
 4262: fi
 4263: AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes)
 4264: 
 4265: if test "x$want_ares" != xyes; then
 4266:   CURL_CHECK_OPTION_THREADED_RESOLVER
 4267: fi
 4268: 
 4269: dnl ************************************************************
 4270: dnl disable POSIX threads
 4271: dnl
 4272: AC_MSG_CHECKING([whether to use POSIX threads for threaded resolver])
 4273: AC_ARG_ENABLE(pthreads,
 4274: AC_HELP_STRING([--enable-pthreads],
 4275:                [Enable POSIX threads (default for threaded resolver)])
 4276: AC_HELP_STRING([--disable-pthreads],[Disable POSIX threads]),
 4277: [ case "$enableval" in
 4278:   no)  AC_MSG_RESULT(no)
 4279:        want_pthreads=no
 4280:        ;;
 4281:   *)   AC_MSG_RESULT(yes)
 4282:        want_pthreads=yes
 4283:        ;;
 4284:   esac ], [
 4285:        AC_MSG_RESULT(auto)
 4286:        want_pthreads=auto
 4287:        ]
 4288: )
 4289: 
 4290: dnl turn off pthreads if rt is disabled
 4291: if test "$want_pthreads" != "no"; then
 4292:   if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then
 4293:     AC_MSG_ERROR([options --enable-pthreads and --disable-rt are mutually exclusive])
 4294:   fi
 4295:   if test "$dontwant_rt" != "no"; then
 4296:     dnl if --enable-pthreads was explicit then warn it's being ignored
 4297:     if test "$want_pthreads" = "yes"; then
 4298:       AC_MSG_WARN([--enable-pthreads Ignored since librt is disabled.])
 4299:     fi
 4300:     want_pthreads=no
 4301:   fi
 4302: fi
 4303: 
 4304: dnl turn off pthreads if no threaded resolver
 4305: if test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then
 4306:   want_pthreads=no
 4307: fi
 4308: 
 4309: dnl detect pthreads
 4310: if test "$want_pthreads" != "no"; then
 4311:   AC_CHECK_HEADER(pthread.h,
 4312:     [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
 4313:       save_CFLAGS="$CFLAGS"
 4314: 
 4315:       dnl first check for function without lib
 4316:       AC_CHECK_FUNC(pthread_create, [USE_THREADS_POSIX=1] )
 4317: 
 4318:       dnl on HPUX, life is more complicated...
 4319:       case $host in
 4320:       *-hp-hpux*)
 4321:          dnl it doesn't actually work without -lpthread
 4322:          USE_THREADS_POSIX=""
 4323:          ;;
 4324:       *)
 4325:          ;;
 4326:       esac
 4327: 
 4328:       dnl if it wasn't found without lib, search for it in pthread lib
 4329:       if test "$USE_THREADS_POSIX" != "1"
 4330:       then
 4331:         CFLAGS="$CFLAGS -pthread"
 4332:         AC_CHECK_LIB(pthread, pthread_create,
 4333:                      [USE_THREADS_POSIX=1],
 4334:                      [ CFLAGS="$save_CFLAGS"])
 4335:       fi
 4336: 
 4337:       if test "x$USE_THREADS_POSIX" = "x1"
 4338:       then
 4339:         AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
 4340:         curl_res_msg="POSIX threaded"
 4341:       fi
 4342:   ])
 4343: fi
 4344: 
 4345: dnl threaded resolver check
 4346: if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then
 4347:   if test "$want_pthreads" = "yes"; then
 4348:     AC_MSG_ERROR([--enable-pthreads but pthreads was not found])
 4349:   fi
 4350:   dnl If native Windows fallback on Win32 threads since no POSIX threads
 4351:   if test "$curl_cv_native_windows" = "yes"; then
 4352:     USE_THREADS_WIN32=1
 4353:     AC_DEFINE(USE_THREADS_WIN32, 1, [if you want Win32 threaded DNS lookup])
 4354:     curl_res_msg="Win32 threaded"
 4355:   else
 4356:     AC_MSG_ERROR([Threaded resolver enabled but no thread library found])
 4357:   fi
 4358: fi
 4359: 
 4360: CURL_CONVERT_INCLUDE_TO_ISYSTEM
 4361: 
 4362: dnl ************************************************************
 4363: dnl disable verbose text strings
 4364: dnl
 4365: AC_MSG_CHECKING([whether to enable verbose strings])
 4366: AC_ARG_ENABLE(verbose,
 4367: AC_HELP_STRING([--enable-verbose],[Enable verbose strings])
 4368: AC_HELP_STRING([--disable-verbose],[Disable verbose strings]),
 4369: [ case "$enableval" in
 4370:   no)
 4371:        AC_MSG_RESULT(no)
 4372:        AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings])
 4373:        curl_verbose_msg="no"
 4374:        ;;
 4375:   *)   AC_MSG_RESULT(yes)
 4376:        ;;
 4377:   esac ],
 4378:        AC_MSG_RESULT(yes)
 4379: )
 4380: 
 4381: dnl ************************************************************
 4382: dnl enable SSPI support
 4383: dnl
 4384: AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)])
 4385: AC_ARG_ENABLE(sspi,
 4386: AC_HELP_STRING([--enable-sspi],[Enable SSPI])
 4387: AC_HELP_STRING([--disable-sspi],[Disable SSPI]),
 4388: [ case "$enableval" in
 4389:   yes)
 4390:        if test "$curl_cv_native_windows" = "yes"; then
 4391:          AC_MSG_RESULT(yes)
 4392:          AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
 4393:          AC_SUBST(USE_WINDOWS_SSPI, [1])
 4394:          curl_sspi_msg="enabled"
 4395:        else
 4396:          AC_MSG_RESULT(no)
 4397:          AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.])
 4398:        fi
 4399:        ;;
 4400:   *)
 4401:        if test "x$WINSSL_ENABLED" = "x1"; then
 4402:          # --with-winssl implies --enable-sspi
 4403:          AC_MSG_RESULT(yes)
 4404:        else
 4405:          AC_MSG_RESULT(no)
 4406:        fi
 4407:        ;;
 4408:   esac ],
 4409:        if test "x$WINSSL_ENABLED" = "x1"; then
 4410:          # --with-winssl implies --enable-sspi
 4411:          AC_MSG_RESULT(yes)
 4412:        else
 4413:          AC_MSG_RESULT(no)
 4414:        fi
 4415: )
 4416: 
 4417: dnl ************************************************************
 4418: dnl disable cryptographic authentication
 4419: dnl
 4420: AC_MSG_CHECKING([whether to enable cryptographic authentication methods])
 4421: AC_ARG_ENABLE(crypto-auth,
 4422: AC_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication])
 4423: AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
 4424: [ case "$enableval" in
 4425:   no)
 4426:        AC_MSG_RESULT(no)
 4427:        AC_DEFINE(CURL_DISABLE_CRYPTO_AUTH, 1, [to disable cryptographic authentication])
 4428:        CURL_DISABLE_CRYPTO_AUTH=1
 4429:        ;;
 4430:   *)   AC_MSG_RESULT(yes)
 4431:        ;;
 4432:   esac ],
 4433:        AC_MSG_RESULT(yes)
 4434: )
 4435: 
 4436: CURL_CHECK_OPTION_NTLM_WB
 4437: 
 4438: CURL_CHECK_NTLM_WB
 4439: 
 4440: dnl ************************************************************
 4441: dnl disable TLS-SRP authentication
 4442: dnl
 4443: AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
 4444: AC_ARG_ENABLE(tls-srp,
 4445: AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
 4446: AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
 4447: [ case "$enableval" in
 4448:   no)
 4449:        AC_MSG_RESULT(no)
 4450:        want_tls_srp=no
 4451:        ;;
 4452:   *)   AC_MSG_RESULT(yes)
 4453:        want_tls_srp=yes
 4454:        ;;
 4455:   esac ],
 4456:        AC_MSG_RESULT(yes)
 4457:        want_tls_srp=yes
 4458: )
 4459: 
 4460: if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1") ; then
 4461:    AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
 4462:    USE_TLS_SRP=1
 4463:    curl_tls_srp_msg="enabled"
 4464: fi
 4465: 
 4466: dnl ************************************************************
 4467: dnl disable Unix domain sockets support
 4468: dnl
 4469: AC_MSG_CHECKING([whether to enable Unix domain sockets])
 4470: AC_ARG_ENABLE(unix-sockets,
 4471: AC_HELP_STRING([--enable-unix-sockets],[Enable Unix domain sockets])
 4472: AC_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]),
 4473: [ case "$enableval" in
 4474:   no)  AC_MSG_RESULT(no)
 4475:        want_unix_sockets=no
 4476:        ;;
 4477:   *)   AC_MSG_RESULT(yes)
 4478:        want_unix_sockets=yes
 4479:        ;;
 4480:   esac ], [
 4481:        AC_MSG_RESULT(auto)
 4482:        want_unix_sockets=auto
 4483:        ]
 4484: )
 4485: if test "x$want_unix_sockets" != "xno"; then
 4486:   AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [
 4487:     AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
 4488:     AC_SUBST(USE_UNIX_SOCKETS, [1])
 4489:     curl_unix_sockets_msg="enabled"
 4490:   ], [
 4491:     if test "x$want_unix_sockets" = "xyes"; then
 4492:       AC_MSG_ERROR([--enable-unix-sockets is not available on this platform!])
 4493:     fi
 4494:   ], [
 4495:     #include <sys/un.h>
 4496:   ])
 4497: fi
 4498: 
 4499: dnl ************************************************************
 4500: dnl disable cookies support
 4501: dnl
 4502: AC_MSG_CHECKING([whether to support cookies])
 4503: AC_ARG_ENABLE(cookies,
 4504: AC_HELP_STRING([--enable-cookies],[Enable cookies support])
 4505: AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
 4506: [ case "$enableval" in
 4507:   no)
 4508:        AC_MSG_RESULT(no)
 4509:        AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
 4510:        ;;
 4511:   *)   AC_MSG_RESULT(yes)
 4512:        ;;
 4513:   esac ],
 4514:        AC_MSG_RESULT(yes)
 4515: )
 4516: 
 4517: dnl ************************************************************
 4518: dnl disable HTTP authentication support
 4519: dnl
 4520: AC_MSG_CHECKING([whether to support HTTP authentication])
 4521: AC_ARG_ENABLE(http-auth,
 4522: AC_HELP_STRING([--enable-http-auth],[Enable HTTP authentication support])
 4523: AC_HELP_STRING([--disable-http-auth],[Disable HTTP authentication support]),
 4524: [ case "$enableval" in
 4525:   no)
 4526:        AC_MSG_RESULT(no)
 4527:        AC_DEFINE(CURL_DISABLE_HTTP_AUTH, 1, [disable HTTP authentication])
 4528:        ;;
 4529:   *)   AC_MSG_RESULT(yes)
 4530:        ;;
 4531:   esac ],
 4532:        AC_MSG_RESULT(yes)
 4533: )
 4534: 
 4535: dnl ************************************************************
 4536: dnl disable DoH support
 4537: dnl
 4538: AC_MSG_CHECKING([whether to support DoH])
 4539: AC_ARG_ENABLE(doh,
 4540: AC_HELP_STRING([--enable-doh],[Enable DoH support])
 4541: AC_HELP_STRING([--disable-doh],[Disable DoH support]),
 4542: [ case "$enableval" in
 4543:   no)
 4544:        AC_MSG_RESULT(no)
 4545:        AC_DEFINE(CURL_DISABLE_DOH, 1, [disable DoH])
 4546:        ;;
 4547:   *)   AC_MSG_RESULT(yes)
 4548:        ;;
 4549:   esac ],
 4550:        AC_MSG_RESULT(yes)
 4551: )
 4552: 
 4553: dnl ************************************************************
 4554: dnl disable mime API support
 4555: dnl
 4556: AC_MSG_CHECKING([whether to support the MIME API])
 4557: AC_ARG_ENABLE(mime,
 4558: AC_HELP_STRING([--enable-mime],[Enable mime API support])
 4559: AC_HELP_STRING([--disable-mime],[Disable mime API support]),
 4560: [ case "$enableval" in
 4561:   no)
 4562:        AC_MSG_RESULT(no)
 4563:        AC_DEFINE(CURL_DISABLE_MIME, 1, [disable mime API])
 4564:        ;;
 4565:   *)   AC_MSG_RESULT(yes)
 4566:        ;;
 4567:   esac ],
 4568:        AC_MSG_RESULT(yes)
 4569: )
 4570: 
 4571: dnl ************************************************************
 4572: dnl disable date parsing
 4573: dnl
 4574: AC_MSG_CHECKING([whether to support date parsing])
 4575: AC_ARG_ENABLE(dateparse,
 4576: AC_HELP_STRING([--enable-dateparse],[Enable date parsing])
 4577: AC_HELP_STRING([--disable-dateparse],[Disable date parsing]),
 4578: [ case "$enableval" in
 4579:   no)
 4580:        AC_MSG_RESULT(no)
 4581:        AC_DEFINE(CURL_DISABLE_PARSEDATE, 1, [disable date parsing])
 4582:        ;;
 4583:   *)   AC_MSG_RESULT(yes)
 4584:        ;;
 4585:   esac ],
 4586:        AC_MSG_RESULT(yes)
 4587: )
 4588: 
 4589: dnl ************************************************************
 4590: dnl disable netrc
 4591: dnl
 4592: AC_MSG_CHECKING([whether to support netrc parsing])
 4593: AC_ARG_ENABLE(netrc,
 4594: AC_HELP_STRING([--enable-netrc],[Enable netrc parsing])
 4595: AC_HELP_STRING([--disable-netrc],[Disable netrc parsing]),
 4596: [ case "$enableval" in
 4597:   no)
 4598:        AC_MSG_RESULT(no)
 4599:        AC_DEFINE(CURL_DISABLE_NETRC, 1, [disable netrc parsing])
 4600:        ;;
 4601:   *)   AC_MSG_RESULT(yes)
 4602:        ;;
 4603:   esac ],
 4604:        AC_MSG_RESULT(yes)
 4605: )
 4606: 
 4607: dnl ************************************************************
 4608: dnl disable progress-meter
 4609: dnl
 4610: AC_MSG_CHECKING([whether to support progress-meter])
 4611: AC_ARG_ENABLE(progress-meter,
 4612: AC_HELP_STRING([--enable-progress-meter],[Enable progress-meter])
 4613: AC_HELP_STRING([--disable-progress-meter],[Disable progress-meter]),
 4614: [ case "$enableval" in
 4615:   no)
 4616:        AC_MSG_RESULT(no)
 4617:        AC_DEFINE(CURL_DISABLE_PROGRESS_METER, 1, [disable progress-meter])
 4618:        ;;
 4619:   *)   AC_MSG_RESULT(yes)
 4620:        ;;
 4621:   esac ],
 4622:        AC_MSG_RESULT(yes)
 4623: )
 4624: 
 4625: dnl ************************************************************
 4626: dnl disable shuffle DNS support
 4627: dnl
 4628: AC_MSG_CHECKING([whether to support DNS shuffling])
 4629: AC_ARG_ENABLE(dnsshuffle,
 4630: AC_HELP_STRING([--enable-dnsshuffle],[Enable DNS shuffling])
 4631: AC_HELP_STRING([--disable-dnsshuffle],[Disable DNS shuffling]),
 4632: [ case "$enableval" in
 4633:   no)
 4634:        AC_MSG_RESULT(no)
 4635:        AC_DEFINE(CURL_DISABLE_SHUFFLE_DNS, 1, [disable DNS shuffling])
 4636:        ;;
 4637:   *)   AC_MSG_RESULT(yes)
 4638:        ;;
 4639:   esac ],
 4640:        AC_MSG_RESULT(yes)
 4641: )
 4642: 
 4643: dnl ************************************************************
 4644: dnl switch on/off alt-svc
 4645: dnl
 4646: curl_altsvc_msg="no      (--enable-alt-svc)";
 4647: AC_MSG_CHECKING([whether to support alt-svc])
 4648: AC_ARG_ENABLE(alt-svc,
 4649: AC_HELP_STRING([--enable-alt-svc],[Enable alt-svc support])
 4650: AC_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]),
 4651: [ case "$enableval" in
 4652:   no)
 4653:        AC_MSG_RESULT(no)
 4654:        ;;
 4655:   *) AC_MSG_RESULT(yes)
 4656:        curl_altsvc_msg="enabled";
 4657:        enable_altsvc="yes"
 4658:        ;;
 4659:   esac ],
 4660:        AC_MSG_RESULT(no)
 4661: )
 4662: 
 4663: if test "$enable_altsvc" = "yes"; then
 4664:   AC_DEFINE(USE_ALTSVC, 1, [to enable alt-svc])
 4665:   experimental="$experimental alt-svc"
 4666: fi
 4667: 
 4668: dnl *************************************************************
 4669: dnl check whether ESNI support, if desired, is actually available
 4670: dnl
 4671: if test "x$want_esni" != "xno"; then
 4672:   AC_MSG_CHECKING([whether ESNI support is available])
 4673: 
 4674:   dnl assume NOT and look for sufficient condition
 4675:   ESNI_ENABLED=0
 4676:   ESNI_SUPPORT=''
 4677: 
 4678:   dnl OpenSSL with a chosen ESNI function should be enough
 4679:   dnl so more exhaustive checking seems unnecessary for now
 4680:   if test "x$OPENSSL_ENABLED" = "x1"; then
 4681:     AC_CHECK_FUNCS(SSL_get_esni_status,
 4682:       ESNI_SUPPORT="ESNI support available (OpenSSL with SSL_get_esni_status)"
 4683:       ESNI_ENABLED=1)
 4684: 
 4685:   dnl add 'elif' chain here for additional implementations
 4686:   fi
 4687: 
 4688:   dnl now deal with whatever we found
 4689:   if test "x$ESNI_ENABLED" = "x1"; then
 4690:     AC_DEFINE(USE_ESNI, 1, [if ESNI support is available])
 4691:     AC_MSG_RESULT($ESNI_SUPPORT)
 4692:     experimental="$experimental ESNI"
 4693:   else
 4694:     AC_MSG_ERROR([--enable-esni ignored: No ESNI support found])
 4695:   fi
 4696: fi
 4697: 
 4698: dnl ************************************************************
 4699: dnl hiding of library internal symbols
 4700: dnl
 4701: CURL_CONFIGURE_SYMBOL_HIDING
 4702: 
 4703: dnl
 4704: dnl All the library dependencies put into $LIB apply to libcurl only.
 4705: dnl
 4706: LIBCURL_LIBS=$LIBS
 4707: 
 4708: AC_SUBST(LIBCURL_LIBS)
 4709: AC_SUBST(CURL_NETWORK_LIBS)
 4710: AC_SUBST(CURL_NETWORK_AND_TIME_LIBS)
 4711: 
 4712: dnl BLANK_AT_MAKETIME may be used in our Makefile.am files to blank
 4713: dnl LIBS variable used in generated makefile at makefile processing
 4714: dnl time. Doing this functionally prevents LIBS from being used for
 4715: dnl all link targets in given makefile.
 4716: BLANK_AT_MAKETIME=
 4717: AC_SUBST(BLANK_AT_MAKETIME)
 4718: 
 4719: AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
 4720: 
 4721: dnl yes or no
 4722: ENABLE_SHARED="$enable_shared"
 4723: AC_SUBST(ENABLE_SHARED)
 4724: 
 4725: dnl to let curl-config output the static libraries correctly
 4726: ENABLE_STATIC="$enable_static"
 4727: AC_SUBST(ENABLE_STATIC)
 4728: 
 4729: 
 4730: dnl
 4731: dnl For keeping supported features and protocols also in pkg-config file
 4732: dnl since it is more cross-compile friendly than curl-config
 4733: dnl
 4734: 
 4735: if test "x$OPENSSL_ENABLED" = "x1"; then
 4736:   SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
 4737: elif test -n "$SSL_ENABLED"; then
 4738:   SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
 4739: fi
 4740: if test "x$IPV6_ENABLED" = "x1"; then
 4741:   SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
 4742: fi
 4743: if test "x$USE_UNIX_SOCKETS" = "x1"; then
 4744:   SUPPORT_FEATURES="$SUPPORT_FEATURES UnixSockets"
 4745: fi
 4746: if test "x$HAVE_LIBZ" = "x1"; then
 4747:   SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
 4748: fi
 4749: if test "x$HAVE_BROTLI" = "x1"; then
 4750:   SUPPORT_FEATURES="$SUPPORT_FEATURES brotli"
 4751: fi
 4752: if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \
 4753:                             -o "x$USE_THREADS_WIN32" = "x1"; then
 4754:   SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
 4755: fi
 4756: if test "x$IDN_ENABLED" = "x1"; then
 4757:   SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
 4758: fi
 4759: if test "x$USE_WINDOWS_SSPI" = "x1"; then
 4760:   SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
 4761: fi
 4762: 
 4763: if test "x$HAVE_GSSAPI" = "x1"; then
 4764:   SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API"
 4765: fi
 4766: 
 4767: if test "x$curl_psl_msg" = "xenabled"; then
 4768:   SUPPORT_FEATURES="$SUPPORT_FEATURES PSL"
 4769: fi
 4770: 
 4771: if test "x$enable_altsvc" = "xyes"; then
 4772:   SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc"
 4773: fi
 4774: 
 4775: if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
 4776:     \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
 4777:   SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
 4778: fi
 4779: 
 4780: if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
 4781:     \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
 4782:   SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos"
 4783: fi
 4784: 
 4785: if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then
 4786:   if test "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
 4787:       -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
 4788:       -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1"; then
 4789:     SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
 4790: 
 4791:     if test "x$CURL_DISABLE_HTTP" != "x1" -a \
 4792:         "x$NTLM_WB_ENABLED" = "x1"; then
 4793:       SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB"
 4794:     fi
 4795:   fi
 4796: fi
 4797: 
 4798: if test "x$USE_TLS_SRP" = "x1"; then
 4799:   SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
 4800: fi
 4801: 
 4802: if test "x$USE_NGHTTP2" = "x1"; then
 4803:   SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
 4804: fi
 4805: 
 4806: if test "x$USE_NGTCP2" = "x1" -o "x$USE_QUICHE" = "x1"; then
 4807:   SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3"
 4808: fi
 4809: 
 4810: if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
 4811:   SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL"
 4812: fi
 4813: 
 4814: if test "x$OPENSSL_ENABLED" = "x1" -o "x$GNUTLS_ENABLED" = "x1" \
 4815:     -o "x$NSS_ENABLED" = "x1"; then
 4816:   SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
 4817: fi
 4818: 
 4819: if test "x$ESNI_ENABLED" = "x1"; then
 4820:   SUPPORT_FEATURES="$SUPPORT_FEATURES ESNI"
 4821: fi
 4822: 
 4823: AC_SUBST(SUPPORT_FEATURES)
 4824: 
 4825: dnl For supported protocols in pkg-config file
 4826: if test "x$CURL_DISABLE_HTTP" != "x1"; then
 4827:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
 4828:   if test "x$SSL_ENABLED" = "x1"; then
 4829:     SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
 4830:   fi
 4831: fi
 4832: if test "x$CURL_DISABLE_FTP" != "x1"; then
 4833:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
 4834:   if test "x$SSL_ENABLED" = "x1"; then
 4835:     SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
 4836:   fi
 4837: fi
 4838: if test "x$CURL_DISABLE_FILE" != "x1"; then
 4839:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
 4840: fi
 4841: if test "x$CURL_DISABLE_TELNET" != "x1"; then
 4842:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
 4843: fi
 4844: if test "x$CURL_DISABLE_LDAP" != "x1"; then
 4845:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
 4846:   if test "x$CURL_DISABLE_LDAPS" != "x1"; then
 4847:     if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
 4848:       (test "x$USE_OPENLDAP" != "x1"  && test "x$HAVE_LDAP_SSL" = "x1"); then
 4849:       SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
 4850:     fi
 4851:   fi
 4852: fi
 4853: if test "x$CURL_DISABLE_DICT" != "x1"; then
 4854:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
 4855: fi
 4856: if test "x$CURL_DISABLE_TFTP" != "x1"; then
 4857:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
 4858: fi
 4859: if test "x$CURL_DISABLE_GOPHER" != "x1"; then
 4860:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
 4861: fi
 4862: if test "x$CURL_ENABLE_MQTT" = "x1"; then
 4863:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS MQTT"
 4864: fi
 4865: if test "x$CURL_DISABLE_POP3" != "x1"; then
 4866:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
 4867:   if test "x$SSL_ENABLED" = "x1"; then
 4868:     SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S"
 4869:   fi
 4870: fi
 4871: if test "x$CURL_DISABLE_IMAP" != "x1"; then
 4872:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP"
 4873:   if test "x$SSL_ENABLED" = "x1"; then
 4874:     SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
 4875:   fi
 4876: fi
 4877: if test "x$CURL_DISABLE_SMB" != "x1" \
 4878:     -a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \
 4879:     -a \( "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
 4880:       -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
 4881:       -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1" \); then
 4882:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB"
 4883:   if test "x$SSL_ENABLED" = "x1"; then
 4884:     SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS"
 4885:   fi
 4886: fi
 4887: if test "x$CURL_DISABLE_SMTP" != "x1"; then
 4888:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
 4889:   if test "x$SSL_ENABLED" = "x1"; then
 4890:     SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS"
 4891:   fi
 4892: fi
 4893: if test "x$USE_LIBSSH2" = "x1"; then
 4894:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
 4895:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
 4896: fi
 4897: if test "x$USE_LIBSSH" = "x1"; then
 4898:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
 4899:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
 4900: fi
 4901: if test "x$USE_WOLFSSH" = "x1"; then
 4902:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
 4903:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
 4904: fi
 4905: if test "x$CURL_DISABLE_RTSP" != "x1"; then
 4906:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
 4907: fi
 4908: if test "x$USE_LIBRTMP" = "x1"; then
 4909:   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
 4910: fi
 4911: 
 4912: dnl replace spaces with newlines
 4913: dnl sort the lines
 4914: dnl replace the newlines back to spaces
 4915: SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '`
 4916: 
 4917: AC_SUBST(SUPPORT_PROTOCOLS)
 4918: 
 4919: dnl squeeze whitespace out of some variables
 4920: 
 4921: squeeze CFLAGS
 4922: squeeze CPPFLAGS
 4923: squeeze DEFS
 4924: squeeze LDFLAGS
 4925: squeeze LIBS
 4926: 
 4927: squeeze LIBCURL_LIBS
 4928: squeeze CURL_NETWORK_LIBS
 4929: squeeze CURL_NETWORK_AND_TIME_LIBS
 4930: 
 4931: squeeze SUPPORT_FEATURES
 4932: squeeze SUPPORT_PROTOCOLS
 4933: 
 4934: XC_CHECK_BUILD_FLAGS
 4935: 
 4936: SSL_BACKENDS=${ssl_backends}
 4937: AC_SUBST(SSL_BACKENDS)
 4938: 
 4939: if test "x$want_curldebug_assumed" = "xyes" &&
 4940:   test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
 4941:   ac_configure_args="$ac_configure_args --enable-curldebug"
 4942: fi
 4943: 
 4944: AC_CONFIG_FILES([Makefile \
 4945:            docs/Makefile \
 4946:            docs/examples/Makefile \
 4947:            docs/libcurl/Makefile \
 4948:            docs/libcurl/opts/Makefile \
 4949:            docs/cmdline-opts/Makefile \
 4950:            include/Makefile \
 4951:            include/curl/Makefile \
 4952:            src/Makefile \
 4953:            lib/Makefile \
 4954:            scripts/Makefile \
 4955:            lib/libcurl.vers \
 4956:            tests/Makefile \
 4957:            tests/certs/Makefile \
 4958:            tests/certs/scripts/Makefile \
 4959:            tests/data/Makefile \
 4960:            tests/server/Makefile \
 4961:            tests/libtest/Makefile \
 4962:            tests/unit/Makefile \
 4963:            packages/Makefile \
 4964:            packages/vms/Makefile \
 4965:            curl-config \
 4966:            libcurl.pc
 4967: ])
 4968: AC_OUTPUT
 4969: 
 4970: CURL_GENERATE_CONFIGUREHELP_PM
 4971: 
 4972: XC_AMEND_DISTCLEAN([lib src tests/unit tests/server tests/libtest docs/examples])
 4973: 
 4974: AC_MSG_NOTICE([Configured to build curl/libcurl:
 4975: 
 4976:   Host setup:       ${host}
 4977:   Install prefix:   ${prefix}
 4978:   Compiler:         ${CC}
 4979:    CFLAGS:          ${CFLAGS}
 4980:    CPPFLAGS:        ${CPPFLAGS}
 4981:    LDFLAGS:         ${LDFLAGS}
 4982:    LIBS:            ${LIBS}
 4983: 
 4984:   curl version:     ${CURLVERSION}
 4985:   SSL:              ${curl_ssl_msg}
 4986:   SSH:              ${curl_ssh_msg}
 4987:   zlib:             ${curl_zlib_msg}
 4988:   brotli:           ${curl_brotli_msg}
 4989:   GSS-API:          ${curl_gss_msg}
 4990:   TLS-SRP:          ${curl_tls_srp_msg}
 4991:   resolver:         ${curl_res_msg}
 4992:   IPv6:             ${curl_ipv6_msg}
 4993:   Unix sockets:     ${curl_unix_sockets_msg}
 4994:   IDN:              ${curl_idn_msg}
 4995:   Build libcurl:    Shared=${enable_shared}, Static=${enable_static}
 4996:   Built-in manual:  ${curl_manual_msg}
 4997:   --libcurl option: ${curl_libcurl_msg}
 4998:   Verbose errors:   ${curl_verbose_msg}
 4999:   Code coverage:    ${curl_coverage_msg}
 5000:   SSPI:             ${curl_sspi_msg}
 5001:   ca cert bundle:   ${ca}${ca_warning}
 5002:   ca cert path:     ${capath}${capath_warning}
 5003:   ca fallback:      ${with_ca_fallback}
 5004:   LDAP:             ${curl_ldap_msg}
 5005:   LDAPS:            ${curl_ldaps_msg}
 5006:   RTSP:             ${curl_rtsp_msg}
 5007:   RTMP:             ${curl_rtmp_msg}
 5008:   Metalink:         ${curl_mtlnk_msg}
 5009:   PSL:              ${curl_psl_msg}
 5010:   Alt-svc:          ${curl_altsvc_msg}
 5011:   HTTP2:            ${curl_h2_msg}
 5012:   HTTP3:            ${curl_h3_msg}
 5013:   ESNI:             ${curl_esni_msg}
 5014:   Protocols:        ${SUPPORT_PROTOCOLS}
 5015:   Features:         ${SUPPORT_FEATURES}
 5016: ])
 5017: if test -n "$experimental"; then
 5018:  cat >&2 << _EOF
 5019:   WARNING: $experimental enabled but marked EXPERIMENTAL. Use with caution!
 5020: _EOF
 5021: fi

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>