1*6236dae4SAndroid Build Coastguard Worker#*************************************************************************** 2*6236dae4SAndroid Build Coastguard Worker# _ _ ____ _ 3*6236dae4SAndroid Build Coastguard Worker# Project ___| | | | _ \| | 4*6236dae4SAndroid Build Coastguard Worker# / __| | | | |_) | | 5*6236dae4SAndroid Build Coastguard Worker# | (__| |_| | _ <| |___ 6*6236dae4SAndroid Build Coastguard Worker# \___|\___/|_| \_\_____| 7*6236dae4SAndroid Build Coastguard Worker# 8*6236dae4SAndroid Build Coastguard Worker# Copyright (C) Daniel Stenberg, <[email protected]>, et al. 9*6236dae4SAndroid Build Coastguard Worker# 10*6236dae4SAndroid Build Coastguard Worker# This software is licensed as described in the file COPYING, which 11*6236dae4SAndroid Build Coastguard Worker# you should have received as part of this distribution. The terms 12*6236dae4SAndroid Build Coastguard Worker# are also available at https://curl.se/docs/copyright.html. 13*6236dae4SAndroid Build Coastguard Worker# 14*6236dae4SAndroid Build Coastguard Worker# You may opt to use, copy, modify, merge, publish, distribute and/or sell 15*6236dae4SAndroid Build Coastguard Worker# copies of the Software, and permit persons to whom the Software is 16*6236dae4SAndroid Build Coastguard Worker# furnished to do so, under the terms of the COPYING file. 17*6236dae4SAndroid Build Coastguard Worker# 18*6236dae4SAndroid Build Coastguard Worker# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19*6236dae4SAndroid Build Coastguard Worker# KIND, either express or implied. 20*6236dae4SAndroid Build Coastguard Worker# 21*6236dae4SAndroid Build Coastguard Worker# SPDX-License-Identifier: curl 22*6236dae4SAndroid Build Coastguard Worker# 23*6236dae4SAndroid Build Coastguard Worker#*************************************************************************** 24*6236dae4SAndroid Build Coastguard Workerdnl Process this file with autoconf to produce a configure script. 25*6236dae4SAndroid Build Coastguard Worker 26*6236dae4SAndroid Build Coastguard WorkerAC_PREREQ(2.59) 27*6236dae4SAndroid Build Coastguard Worker 28*6236dae4SAndroid Build Coastguard Workerdnl We don't know the version number "statically" so we use a dash here 29*6236dae4SAndroid Build Coastguard WorkerAC_INIT([curl], [-], [a suitable curl mailing list: https://curl.se/mail/]) 30*6236dae4SAndroid Build Coastguard Worker 31*6236dae4SAndroid Build Coastguard WorkerXC_OVR_ZZ50 32*6236dae4SAndroid Build Coastguard WorkerXC_OVR_ZZ60 33*6236dae4SAndroid Build Coastguard WorkerCURL_OVERRIDE_AUTOCONF 34*6236dae4SAndroid Build Coastguard Worker 35*6236dae4SAndroid Build Coastguard Workerdnl configure script copyright 36*6236dae4SAndroid Build Coastguard WorkerAC_COPYRIGHT([Copyright (C) Daniel Stenberg, <[email protected]> 37*6236dae4SAndroid Build Coastguard WorkerThis configure script may be copied, distributed and modified under the 38*6236dae4SAndroid Build Coastguard Workerterms of the curl license; see COPYING for more details]) 39*6236dae4SAndroid Build Coastguard Worker 40*6236dae4SAndroid Build Coastguard WorkerAC_CONFIG_SRCDIR([lib/urldata.h]) 41*6236dae4SAndroid Build Coastguard WorkerAC_CONFIG_HEADERS(lib/curl_config.h) 42*6236dae4SAndroid Build Coastguard WorkerAC_CONFIG_MACRO_DIR([m4]) 43*6236dae4SAndroid Build Coastguard WorkerAM_MAINTAINER_MODE 44*6236dae4SAndroid Build Coastguard Workerm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 45*6236dae4SAndroid Build Coastguard Worker 46*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_OPTION_DEBUG 47*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL(DEBUGBUILD, test x$want_debug = xyes) 48*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_OPTION_OPTIMIZE 49*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_OPTION_WARNINGS 50*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_OPTION_WERROR 51*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_OPTION_CURLDEBUG 52*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_OPTION_SYMBOL_HIDING 53*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_OPTION_ARES 54*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_OPTION_RT 55*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_OPTION_HTTPSRR 56*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_OPTION_ECH 57*6236dae4SAndroid Build Coastguard Worker 58*6236dae4SAndroid Build Coastguard WorkerXC_CHECK_PATH_SEPARATOR 59*6236dae4SAndroid Build Coastguard Worker 60*6236dae4SAndroid Build Coastguard Worker# 61*6236dae4SAndroid Build Coastguard Worker# save the configure arguments 62*6236dae4SAndroid Build Coastguard Worker# 63*6236dae4SAndroid Build Coastguard WorkerCONFIGURE_OPTIONS="\"$ac_configure_args\"" 64*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(CONFIGURE_OPTIONS) 65*6236dae4SAndroid Build Coastguard Worker 66*6236dae4SAndroid Build Coastguard Workerdnl SED is mandatory for configure process and libtool. 67*6236dae4SAndroid Build Coastguard Workerdnl Set it now, allowing it to be changed later. 68*6236dae4SAndroid Build Coastguard Workerif test -z "$SED"; then 69*6236dae4SAndroid Build Coastguard Worker dnl allow it to be overridden 70*6236dae4SAndroid Build Coastguard Worker AC_PATH_PROG([SED], [sed], [not_found], 71*6236dae4SAndroid Build Coastguard Worker [$PATH:/usr/bin:/usr/local/bin]) 72*6236dae4SAndroid Build Coastguard Worker if test -z "$SED" || test "$SED" = "not_found"; then 73*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.]) 74*6236dae4SAndroid Build Coastguard Worker fi 75*6236dae4SAndroid Build Coastguard Workerfi 76*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([SED]) 77*6236dae4SAndroid Build Coastguard Worker 78*6236dae4SAndroid Build Coastguard Workerdnl GREP is mandatory for configure process and libtool. 79*6236dae4SAndroid Build Coastguard Workerdnl Set it now, allowing it to be changed later. 80*6236dae4SAndroid Build Coastguard Workerif test -z "$GREP"; then 81*6236dae4SAndroid Build Coastguard Worker dnl allow it to be overridden 82*6236dae4SAndroid Build Coastguard Worker AC_PATH_PROG([GREP], [grep], [not_found], 83*6236dae4SAndroid Build Coastguard Worker [$PATH:/usr/bin:/usr/local/bin]) 84*6236dae4SAndroid Build Coastguard Worker if test -z "$GREP" || test "$GREP" = "not_found"; then 85*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.]) 86*6236dae4SAndroid Build Coastguard Worker fi 87*6236dae4SAndroid Build Coastguard Workerfi 88*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([GREP]) 89*6236dae4SAndroid Build Coastguard Worker 90*6236dae4SAndroid Build Coastguard Workerdnl 'grep -E' is mandatory for configure process and libtool. 91*6236dae4SAndroid Build Coastguard Workerdnl Set it now, allowing it to be changed later. 92*6236dae4SAndroid Build Coastguard Workerif test -z "$EGREP"; then 93*6236dae4SAndroid Build Coastguard Worker dnl allow it to be overridden 94*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([that grep -E works]) 95*6236dae4SAndroid Build Coastguard Worker if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then 96*6236dae4SAndroid Build Coastguard Worker EGREP="$GREP -E" 97*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 98*6236dae4SAndroid Build Coastguard Worker else 99*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 100*6236dae4SAndroid Build Coastguard Worker AC_PATH_PROG([EGREP], [egrep], [not_found], 101*6236dae4SAndroid Build Coastguard Worker [$PATH:/usr/bin:/usr/local/bin]) 102*6236dae4SAndroid Build Coastguard Worker fi 103*6236dae4SAndroid Build Coastguard Workerfi 104*6236dae4SAndroid Build Coastguard Workerif test -z "$EGREP" || test "$EGREP" = "not_found"; then 105*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([grep -E is not working and egrep is not found in PATH. Cannot continue.]) 106*6236dae4SAndroid Build Coastguard Workerfi 107*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([EGREP]) 108*6236dae4SAndroid Build Coastguard Worker 109*6236dae4SAndroid Build Coastguard Workerdnl AR is mandatory for configure process and libtool. 110*6236dae4SAndroid Build Coastguard Workerdnl This is target dependent, so check it as a tool. 111*6236dae4SAndroid Build Coastguard Workerif test -z "$AR"; then 112*6236dae4SAndroid Build Coastguard Worker dnl allow it to be overridden 113*6236dae4SAndroid Build Coastguard Worker AC_PATH_TOOL([AR], [ar], [not_found], 114*6236dae4SAndroid Build Coastguard Worker [$PATH:/usr/bin:/usr/local/bin]) 115*6236dae4SAndroid Build Coastguard Worker if test -z "$AR" || test "$AR" = "not_found"; then 116*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.]) 117*6236dae4SAndroid Build Coastguard Worker fi 118*6236dae4SAndroid Build Coastguard Workerfi 119*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([AR]) 120*6236dae4SAndroid Build Coastguard Worker 121*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(libext) 122*6236dae4SAndroid Build Coastguard Worker 123*6236dae4SAndroid Build Coastguard Workerdnl figure out the libcurl version 124*6236dae4SAndroid Build Coastguard WorkerCURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h` 125*6236dae4SAndroid Build Coastguard WorkerXC_CHECK_PROG_CC 126*6236dae4SAndroid Build Coastguard WorkerCURL_ATOMIC 127*6236dae4SAndroid Build Coastguard Worker 128*6236dae4SAndroid Build Coastguard Workerdnl for --enable-code-coverage 129*6236dae4SAndroid Build Coastguard WorkerCURL_COVERAGE 130*6236dae4SAndroid Build Coastguard Worker 131*6236dae4SAndroid Build Coastguard WorkerXC_AUTOMAKE 132*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([curl version]) 133*6236dae4SAndroid Build Coastguard WorkerAC_MSG_RESULT($CURLVERSION) 134*6236dae4SAndroid Build Coastguard Worker 135*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(CURLVERSION) 136*6236dae4SAndroid Build Coastguard Worker 137*6236dae4SAndroid Build Coastguard Workerdnl 138*6236dae4SAndroid Build Coastguard Workerdnl we extract the numerical version for curl-config only 139*6236dae4SAndroid Build Coastguard WorkerVERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\([0-9A-Fa-f]*\).*/\1/p' ${srcdir}/include/curl/curlver.h` 140*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(VERSIONNUM) 141*6236dae4SAndroid Build Coastguard Worker 142*6236dae4SAndroid Build Coastguard Workerdnl Solaris pkgadd support definitions 143*6236dae4SAndroid Build Coastguard WorkerPKGADD_PKG="HAXXcurl" 144*6236dae4SAndroid Build Coastguard WorkerPKGADD_NAME="curl - a client that groks URLs" 145*6236dae4SAndroid Build Coastguard WorkerPKGADD_VENDOR="curl.se" 146*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(PKGADD_PKG) 147*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(PKGADD_NAME) 148*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(PKGADD_VENDOR) 149*6236dae4SAndroid Build Coastguard Worker 150*6236dae4SAndroid Build Coastguard Workerdnl 151*6236dae4SAndroid Build Coastguard Workerdnl initialize all the info variables 152*6236dae4SAndroid Build Coastguard Worker curl_ssl_msg="no (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,secure-transport,amissl,bearssl,rustls} )" 153*6236dae4SAndroid Build Coastguard Worker curl_ssh_msg="no (--with-{libssh,libssh2})" 154*6236dae4SAndroid Build Coastguard Worker curl_zlib_msg="no (--with-zlib)" 155*6236dae4SAndroid Build Coastguard Worker curl_brotli_msg="no (--with-brotli)" 156*6236dae4SAndroid Build Coastguard Worker curl_zstd_msg="no (--with-zstd)" 157*6236dae4SAndroid Build Coastguard Worker curl_gss_msg="no (--with-gssapi)" 158*6236dae4SAndroid Build Coastguard Worker curl_gsasl_msg="no (--with-gsasl)" 159*6236dae4SAndroid Build Coastguard Workercurl_tls_srp_msg="no (--enable-tls-srp)" 160*6236dae4SAndroid Build Coastguard Worker curl_res_msg="default (--enable-ares / --enable-threaded-resolver)" 161*6236dae4SAndroid Build Coastguard Worker curl_ipv6_msg="no (--enable-ipv6)" 162*6236dae4SAndroid Build Coastguard Workercurl_unix_sockets_msg="no (--enable-unix-sockets)" 163*6236dae4SAndroid Build Coastguard Worker curl_idn_msg="no (--with-{libidn2,winidn})" 164*6236dae4SAndroid Build Coastguard Worker curl_docs_msg="enabled (--disable-docs)" 165*6236dae4SAndroid Build Coastguard Worker curl_manual_msg="no (--enable-manual)" 166*6236dae4SAndroid Build Coastguard Workercurl_libcurl_msg="enabled (--disable-libcurl-option)" 167*6236dae4SAndroid Build Coastguard Workercurl_verbose_msg="enabled (--disable-verbose)" 168*6236dae4SAndroid Build Coastguard Worker curl_sspi_msg="no (--enable-sspi)" 169*6236dae4SAndroid Build Coastguard Worker curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)" 170*6236dae4SAndroid Build Coastguard Worker curl_ldaps_msg="no (--enable-ldaps)" 171*6236dae4SAndroid Build Coastguard Worker curl_ipfs_msg="no (--enable-ipfs)" 172*6236dae4SAndroid Build Coastguard Worker curl_rtsp_msg="no (--enable-rtsp)" 173*6236dae4SAndroid Build Coastguard Worker curl_rtmp_msg="no (--with-librtmp)" 174*6236dae4SAndroid Build Coastguard Worker curl_psl_msg="no (--with-libpsl)" 175*6236dae4SAndroid Build Coastguard Worker curl_altsvc_msg="enabled (--disable-alt-svc)" 176*6236dae4SAndroid Build Coastguard Workercurl_headers_msg="enabled (--disable-headers-api)" 177*6236dae4SAndroid Build Coastguard Worker curl_hsts_msg="enabled (--disable-hsts)" 178*6236dae4SAndroid Build Coastguard Worker ssl_backends= 179*6236dae4SAndroid Build Coastguard Worker curl_h1_msg="enabled (internal)" 180*6236dae4SAndroid Build Coastguard Worker curl_h2_msg="no (--with-nghttp2)" 181*6236dae4SAndroid Build Coastguard Worker curl_h3_msg="no (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-openssl-quic, --with-msh3)" 182*6236dae4SAndroid Build Coastguard Worker 183*6236dae4SAndroid Build Coastguard Workerenable_altsvc="yes" 184*6236dae4SAndroid Build Coastguard Workerhsts="yes" 185*6236dae4SAndroid Build Coastguard Worker 186*6236dae4SAndroid Build Coastguard Workerdnl 187*6236dae4SAndroid Build Coastguard Workerdnl Save some initial values the user might have provided 188*6236dae4SAndroid Build Coastguard Workerdnl 189*6236dae4SAndroid Build Coastguard WorkerINITIAL_LDFLAGS=$LDFLAGS 190*6236dae4SAndroid Build Coastguard WorkerINITIAL_LIBS=$LIBS 191*6236dae4SAndroid Build Coastguard Worker 192*6236dae4SAndroid Build Coastguard Workerdnl 193*6236dae4SAndroid Build Coastguard Workerdnl Generates a shell script to run the compiler with LD_LIBRARY_PATH set to 194*6236dae4SAndroid Build Coastguard Workerdnl the value used right now. This lets CURL_RUN_IFELSE set LD_LIBRARY_PATH to 195*6236dae4SAndroid Build Coastguard Workerdnl something different but only have that affect the execution of the results 196*6236dae4SAndroid Build Coastguard Workerdnl of the compile, not change the libraries for the compiler itself. 197*6236dae4SAndroid Build Coastguard Workerdnl 198*6236dae4SAndroid Build Coastguard Workercompilersh="run-compiler" 199*6236dae4SAndroid Build Coastguard WorkerCURL_SAVED_CC="$CC" 200*6236dae4SAndroid Build Coastguard Workerexport CURL_SAVED_CC 201*6236dae4SAndroid Build Coastguard WorkerCURL_SAVED_LD_LIBRARY_PATH="$LD_LIBRARY_PATH" 202*6236dae4SAndroid Build Coastguard Workerexport CURL_SAVED_LD_LIBRARY_PATH 203*6236dae4SAndroid Build Coastguard Workercat <<\EOF > "$compilersh" 204*6236dae4SAndroid Build Coastguard WorkerCC="$CURL_SAVED_CC" 205*6236dae4SAndroid Build Coastguard Workerexport CC 206*6236dae4SAndroid Build Coastguard WorkerLD_LIBRARY_PATH="$CURL_SAVED_LD_LIBRARY_PATH" 207*6236dae4SAndroid Build Coastguard Workerexport LD_LIBRARY_PATH 208*6236dae4SAndroid Build Coastguard Workerexec $CC "$@" 209*6236dae4SAndroid Build Coastguard WorkerEOF 210*6236dae4SAndroid Build Coastguard Worker 211*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 212*6236dae4SAndroid Build Coastguard Workerdnl See which TLS backend(s) that are requested. Just do all the 213*6236dae4SAndroid Build Coastguard Workerdnl TLS AC_ARG_WITH() invokes here and do the checks later 214*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 215*6236dae4SAndroid Build Coastguard WorkerOPT_SCHANNEL=no 216*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(schannel,dnl 217*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-schannel],[enable Windows native SSL/TLS]), 218*6236dae4SAndroid Build Coastguard Worker OPT_SCHANNEL=$withval 219*6236dae4SAndroid Build Coastguard Worker TLSCHOICE="schannel") 220*6236dae4SAndroid Build Coastguard Worker 221*6236dae4SAndroid Build Coastguard WorkerOPT_SECURETRANSPORT=no 222*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(secure-transport,dnl 223*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS]),[ 224*6236dae4SAndroid Build Coastguard Worker OPT_SECURETRANSPORT=$withval 225*6236dae4SAndroid Build Coastguard Worker TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }Secure-Transport" 226*6236dae4SAndroid Build Coastguard Worker]) 227*6236dae4SAndroid Build Coastguard Worker 228*6236dae4SAndroid Build Coastguard WorkerOPT_AMISSL=no 229*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(amissl,dnl 230*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]),[ 231*6236dae4SAndroid Build Coastguard Worker OPT_AMISSL=$withval 232*6236dae4SAndroid Build Coastguard Worker TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }AmiSSL" 233*6236dae4SAndroid Build Coastguard Worker]) 234*6236dae4SAndroid Build Coastguard Worker 235*6236dae4SAndroid Build Coastguard WorkerOPT_OPENSSL=no 236*6236dae4SAndroid Build Coastguard Workerdnl Default to no CA bundle 237*6236dae4SAndroid Build Coastguard Workerca="no" 238*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(ssl,dnl 239*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-ssl=PATH],[old version of --with-openssl]) 240*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-ssl], [build without any TLS library]),[ 241*6236dae4SAndroid Build Coastguard Worker OPT_SSL=$withval 242*6236dae4SAndroid Build Coastguard Worker OPT_OPENSSL=$withval 243*6236dae4SAndroid Build Coastguard Worker if test X"$withval" != Xno; then 244*6236dae4SAndroid Build Coastguard Worker TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL" 245*6236dae4SAndroid Build Coastguard Worker else 246*6236dae4SAndroid Build Coastguard Worker SSL_DISABLED="D" 247*6236dae4SAndroid Build Coastguard Worker fi 248*6236dae4SAndroid Build Coastguard Worker]) 249*6236dae4SAndroid Build Coastguard Worker 250*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(openssl,dnl 251*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-openssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]),[ 252*6236dae4SAndroid Build Coastguard Worker OPT_OPENSSL=$withval 253*6236dae4SAndroid Build Coastguard Worker if test X"$withval" != Xno; then 254*6236dae4SAndroid Build Coastguard Worker TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL" 255*6236dae4SAndroid Build Coastguard Worker fi 256*6236dae4SAndroid Build Coastguard Worker]) 257*6236dae4SAndroid Build Coastguard Worker 258*6236dae4SAndroid Build Coastguard WorkerOPT_GNUTLS=no 259*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(gnutls,dnl 260*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]),[ 261*6236dae4SAndroid Build Coastguard Worker OPT_GNUTLS=$withval 262*6236dae4SAndroid Build Coastguard Worker if test X"$withval" != Xno; then 263*6236dae4SAndroid Build Coastguard Worker TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }GnuTLS" 264*6236dae4SAndroid Build Coastguard Worker fi 265*6236dae4SAndroid Build Coastguard Worker]) 266*6236dae4SAndroid Build Coastguard Worker 267*6236dae4SAndroid Build Coastguard WorkerOPT_MBEDTLS=no 268*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(mbedtls,dnl 269*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root]),[ 270*6236dae4SAndroid Build Coastguard Worker OPT_MBEDTLS=$withval 271*6236dae4SAndroid Build Coastguard Worker if test X"$withval" != Xno; then 272*6236dae4SAndroid Build Coastguard Worker TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }mbedTLS" 273*6236dae4SAndroid Build Coastguard Worker fi 274*6236dae4SAndroid Build Coastguard Worker]) 275*6236dae4SAndroid Build Coastguard Worker 276*6236dae4SAndroid Build Coastguard WorkerOPT_WOLFSSL=no 277*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(wolfssl,dnl 278*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-wolfssl=PATH],[where to look for wolfSSL, PATH points to the installation root (default: system lib default)]),[ 279*6236dae4SAndroid Build Coastguard Worker OPT_WOLFSSL=$withval 280*6236dae4SAndroid Build Coastguard Worker if test X"$withval" != Xno; then 281*6236dae4SAndroid Build Coastguard Worker TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }wolfSSL" 282*6236dae4SAndroid Build Coastguard Worker fi 283*6236dae4SAndroid Build Coastguard Worker]) 284*6236dae4SAndroid Build Coastguard Worker 285*6236dae4SAndroid Build Coastguard WorkerOPT_BEARSSL=no 286*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(bearssl,dnl 287*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root]),[ 288*6236dae4SAndroid Build Coastguard Worker OPT_BEARSSL=$withval 289*6236dae4SAndroid Build Coastguard Worker if test X"$withval" != Xno; then 290*6236dae4SAndroid Build Coastguard Worker TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }BearSSL" 291*6236dae4SAndroid Build Coastguard Worker fi 292*6236dae4SAndroid Build Coastguard Worker]) 293*6236dae4SAndroid Build Coastguard Worker 294*6236dae4SAndroid Build Coastguard WorkerOPT_RUSTLS=no 295*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(rustls,dnl 296*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-rustls=PATH],[where to look for Rustls, PATH points to the installation root]),[ 297*6236dae4SAndroid Build Coastguard Worker OPT_RUSTLS=$withval 298*6236dae4SAndroid Build Coastguard Worker if test X"$withval" != Xno; then 299*6236dae4SAndroid Build Coastguard Worker TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }rustls" 300*6236dae4SAndroid Build Coastguard Worker experimental="$experimental rustls" 301*6236dae4SAndroid Build Coastguard Worker fi 302*6236dae4SAndroid Build Coastguard Worker]) 303*6236dae4SAndroid Build Coastguard Worker 304*6236dae4SAndroid Build Coastguard WorkerTEST_NGHTTPX=nghttpx 305*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(test-nghttpx,dnl 306*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-test-nghttpx=PATH],[where to find nghttpx for testing]), 307*6236dae4SAndroid Build Coastguard Worker TEST_NGHTTPX=$withval 308*6236dae4SAndroid Build Coastguard Worker if test X"$OPT_TEST_NGHTTPX" = "Xno"; then 309*6236dae4SAndroid Build Coastguard Worker TEST_NGHTTPX="" 310*6236dae4SAndroid Build Coastguard Worker fi 311*6236dae4SAndroid Build Coastguard Worker) 312*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(TEST_NGHTTPX) 313*6236dae4SAndroid Build Coastguard Worker 314*6236dae4SAndroid Build Coastguard WorkerCADDY=/usr/bin/caddy 315*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(test-caddy,dnl 316*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-test-caddy=PATH],[where to find caddy for testing]), 317*6236dae4SAndroid Build Coastguard Worker CADDY=$withval 318*6236dae4SAndroid Build Coastguard Worker if test X"$OPT_CADDY" = "Xno"; then 319*6236dae4SAndroid Build Coastguard Worker CADDY="" 320*6236dae4SAndroid Build Coastguard Worker fi 321*6236dae4SAndroid Build Coastguard Worker) 322*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(CADDY) 323*6236dae4SAndroid Build Coastguard Worker 324*6236dae4SAndroid Build Coastguard WorkerVSFTPD=/usr/sbin/vsftpd 325*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(test-vsftpd,dnl 326*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-test-vsftpd=PATH],[where to find vsftpd for testing]), 327*6236dae4SAndroid Build Coastguard Worker VSFTPD=$withval 328*6236dae4SAndroid Build Coastguard Worker if test X"$OPT_VSFTPD" = "Xno"; then 329*6236dae4SAndroid Build Coastguard Worker VSFTPD="" 330*6236dae4SAndroid Build Coastguard Worker fi 331*6236dae4SAndroid Build Coastguard Worker) 332*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(VSFTPD) 333*6236dae4SAndroid Build Coastguard Worker 334*6236dae4SAndroid Build Coastguard Workerdnl we'd like a httpd+apachectl as test server 335*6236dae4SAndroid Build Coastguard Workerdnl 336*6236dae4SAndroid Build Coastguard WorkerHTTPD_ENABLED="maybe" 337*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(test-httpd, [AS_HELP_STRING([--with-test-httpd=PATH], 338*6236dae4SAndroid Build Coastguard Worker [where to find httpd/apache2 for testing])], 339*6236dae4SAndroid Build Coastguard Worker [request_httpd=$withval], [request_httpd=check]) 340*6236dae4SAndroid Build Coastguard Workerif test x"$request_httpd" = "xcheck" -o x"$request_httpd" = "xyes"; then 341*6236dae4SAndroid Build Coastguard Worker if test -x "/usr/sbin/apache2" -a -x "/usr/sbin/apache2ctl"; then 342*6236dae4SAndroid Build Coastguard Worker # common location on distros (debian/ubuntu) 343*6236dae4SAndroid Build Coastguard Worker HTTPD="/usr/sbin/apache2" 344*6236dae4SAndroid Build Coastguard Worker APACHECTL="/usr/sbin/apache2ctl" 345*6236dae4SAndroid Build Coastguard Worker AC_PATH_PROG([APXS], [apxs]) 346*6236dae4SAndroid Build Coastguard Worker if test "x$APXS" = "x"; then 347*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([apache2-dev not installed, httpd tests disabled]) 348*6236dae4SAndroid Build Coastguard Worker HTTPD_ENABLED="no" 349*6236dae4SAndroid Build Coastguard Worker fi 350*6236dae4SAndroid Build Coastguard Worker else 351*6236dae4SAndroid Build Coastguard Worker AC_PATH_PROG([HTTPD], [httpd]) 352*6236dae4SAndroid Build Coastguard Worker if test "x$HTTPD" = "x"; then 353*6236dae4SAndroid Build Coastguard Worker AC_PATH_PROG([HTTPD], [apache2]) 354*6236dae4SAndroid Build Coastguard Worker fi 355*6236dae4SAndroid Build Coastguard Worker AC_PATH_PROG([APACHECTL], [apachectl]) 356*6236dae4SAndroid Build Coastguard Worker AC_PATH_PROG([APXS], [apxs]) 357*6236dae4SAndroid Build Coastguard Worker if test "x$HTTPD" = "x" -o "x$APACHECTL" = "x"; then 358*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([httpd/apache2 not in PATH, http tests disabled]) 359*6236dae4SAndroid Build Coastguard Worker HTTPD_ENABLED="no" 360*6236dae4SAndroid Build Coastguard Worker fi 361*6236dae4SAndroid Build Coastguard Worker if test "x$APXS" = "x"; then 362*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([apxs not in PATH, http tests disabled]) 363*6236dae4SAndroid Build Coastguard Worker HTTPD_ENABLED="no" 364*6236dae4SAndroid Build Coastguard Worker fi 365*6236dae4SAndroid Build Coastguard Worker fi 366*6236dae4SAndroid Build Coastguard Workerelif test x"$request_httpd" != "xno"; then 367*6236dae4SAndroid Build Coastguard Worker HTTPD="${request_httpd}/bin/httpd" 368*6236dae4SAndroid Build Coastguard Worker APACHECTL="${request_httpd}/bin/apachectl" 369*6236dae4SAndroid Build Coastguard Worker APXS="${request_httpd}/bin/apxs" 370*6236dae4SAndroid Build Coastguard Worker if test ! -x "${HTTPD}"; then 371*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([httpd not found as ${HTTPD}, http tests disabled]) 372*6236dae4SAndroid Build Coastguard Worker HTTPD_ENABLED="no" 373*6236dae4SAndroid Build Coastguard Worker elif test ! -x "${APACHECTL}"; then 374*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([apachectl not found as ${APACHECTL}, http tests disabled]) 375*6236dae4SAndroid Build Coastguard Worker HTTPD_ENABLED="no" 376*6236dae4SAndroid Build Coastguard Worker elif test ! -x "${APXS}"; then 377*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([apxs not found as ${APXS}, http tests disabled]) 378*6236dae4SAndroid Build Coastguard Worker HTTPD_ENABLED="no" 379*6236dae4SAndroid Build Coastguard Worker else 380*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([using HTTPD=$HTTPD for tests]) 381*6236dae4SAndroid Build Coastguard Worker fi 382*6236dae4SAndroid Build Coastguard Workerfi 383*6236dae4SAndroid Build Coastguard Workerif test x"$HTTPD_ENABLED" = "xno"; then 384*6236dae4SAndroid Build Coastguard Worker HTTPD="" 385*6236dae4SAndroid Build Coastguard Worker APACHECTL="" 386*6236dae4SAndroid Build Coastguard Worker APXS="" 387*6236dae4SAndroid Build Coastguard Workerfi 388*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(HTTPD) 389*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(APACHECTL) 390*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(APXS) 391*6236dae4SAndroid Build Coastguard Worker 392*6236dae4SAndroid Build Coastguard Workerdnl the nghttpx we might use in httpd testing 393*6236dae4SAndroid Build Coastguard Workerif test "x$TEST_NGHTTPX" != "x" -a "x$TEST_NGHTTPX" != "xnghttpx"; then 394*6236dae4SAndroid Build Coastguard Worker HTTPD_NGHTTPX="$TEST_NGHTTPX" 395*6236dae4SAndroid Build Coastguard Workerelse 396*6236dae4SAndroid Build Coastguard Worker AC_PATH_PROG([HTTPD_NGHTTPX], [nghttpx], [], 397*6236dae4SAndroid Build Coastguard Worker [$PATH:/usr/bin:/usr/local/bin]) 398*6236dae4SAndroid Build Coastguard Workerfi 399*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(HTTPD_NGHTTPX) 400*6236dae4SAndroid Build Coastguard Worker 401*6236dae4SAndroid Build Coastguard Workerdnl the Caddy server we might use in testing 402*6236dae4SAndroid Build Coastguard Workerif test "x$TEST_CADDY" != "x"; then 403*6236dae4SAndroid Build Coastguard Worker CADDY="$TEST_CADDY" 404*6236dae4SAndroid Build Coastguard Workerelse 405*6236dae4SAndroid Build Coastguard Worker AC_PATH_PROG([CADDY], [caddy]) 406*6236dae4SAndroid Build Coastguard Workerfi 407*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(CADDY) 408*6236dae4SAndroid Build Coastguard Worker 409*6236dae4SAndroid Build Coastguard Workerdnl If no TLS choice has been made, check if it was explicitly disabled or 410*6236dae4SAndroid Build Coastguard Workerdnl error out to force the user to decide. 411*6236dae4SAndroid Build Coastguard Workerif test -z "$TLSCHOICE"; then 412*6236dae4SAndroid Build Coastguard Worker if test "x$OPT_SSL" != "xno"; then 413*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([select TLS backend(s) or disable TLS with --without-ssl. 414*6236dae4SAndroid Build Coastguard Worker 415*6236dae4SAndroid Build Coastguard WorkerSelect from these: 416*6236dae4SAndroid Build Coastguard Worker 417*6236dae4SAndroid Build Coastguard Worker --with-amissl 418*6236dae4SAndroid Build Coastguard Worker --with-bearssl 419*6236dae4SAndroid Build Coastguard Worker --with-gnutls 420*6236dae4SAndroid Build Coastguard Worker --with-mbedtls 421*6236dae4SAndroid Build Coastguard Worker --with-openssl (also works for BoringSSL and LibreSSL) 422*6236dae4SAndroid Build Coastguard Worker --with-rustls 423*6236dae4SAndroid Build Coastguard Worker --with-schannel 424*6236dae4SAndroid Build Coastguard Worker --with-secure-transport 425*6236dae4SAndroid Build Coastguard Worker --with-wolfssl 426*6236dae4SAndroid Build Coastguard Worker]) 427*6236dae4SAndroid Build Coastguard Worker fi 428*6236dae4SAndroid Build Coastguard Workerfi 429*6236dae4SAndroid Build Coastguard Worker 430*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(darwinssl,, 431*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-darwin-ssl and --without-darwin-ssl no longer work!])) 432*6236dae4SAndroid Build Coastguard Worker 433*6236dae4SAndroid Build Coastguard Workerdnl 434*6236dae4SAndroid Build Coastguard Workerdnl Detect the canonical host and target build environment 435*6236dae4SAndroid Build Coastguard Workerdnl 436*6236dae4SAndroid Build Coastguard Worker 437*6236dae4SAndroid Build Coastguard WorkerAC_CANONICAL_HOST 438*6236dae4SAndroid Build Coastguard Workerdnl Get system canonical name 439*6236dae4SAndroid Build Coastguard WorkerAC_DEFINE_UNQUOTED(CURL_OS, "${host}", [cpu-machine-OS]) 440*6236dae4SAndroid Build Coastguard Worker 441*6236dae4SAndroid Build Coastguard Worker# Silence warning: ar: 'u' modifier ignored since 'D' is the default 442*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(AR_FLAGS, [cr]) 443*6236dae4SAndroid Build Coastguard Worker 444*6236dae4SAndroid Build Coastguard Workerdnl This defines _ALL_SOURCE for AIX 445*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_AIX_ALL_SOURCE 446*6236dae4SAndroid Build Coastguard Worker 447*6236dae4SAndroid Build Coastguard Workerdnl Our configure and build reentrant settings 448*6236dae4SAndroid Build Coastguard WorkerCURL_CONFIGURE_THREAD_SAFE 449*6236dae4SAndroid Build Coastguard WorkerCURL_CONFIGURE_REENTRANT 450*6236dae4SAndroid Build Coastguard Worker 451*6236dae4SAndroid Build Coastguard Workerdnl check for how to do large files 452*6236dae4SAndroid Build Coastguard WorkerAC_SYS_LARGEFILE 453*6236dae4SAndroid Build Coastguard Worker 454*6236dae4SAndroid Build Coastguard WorkerXC_LIBTOOL 455*6236dae4SAndroid Build Coastguard Worker 456*6236dae4SAndroid Build Coastguard WorkerLT_LANG([Windows Resource]) 457*6236dae4SAndroid Build Coastguard Worker 458*6236dae4SAndroid Build Coastguard Worker# 459*6236dae4SAndroid Build Coastguard Worker# Automake conditionals based on libtool related checks 460*6236dae4SAndroid Build Coastguard Worker# 461*6236dae4SAndroid Build Coastguard Worker 462*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSION_INFO], 463*6236dae4SAndroid Build Coastguard Worker [test "x$xc_lt_shlib_use_version_info" = 'xyes']) 464*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL([CURL_LT_SHLIB_USE_NO_UNDEFINED], 465*6236dae4SAndroid Build Coastguard Worker [test "x$xc_lt_shlib_use_no_undefined" = 'xyes']) 466*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL([CURL_LT_SHLIB_USE_MIMPURE_TEXT], 467*6236dae4SAndroid Build Coastguard Worker [test "x$xc_lt_shlib_use_mimpure_text" = 'xyes']) 468*6236dae4SAndroid Build Coastguard Worker 469*6236dae4SAndroid Build Coastguard Worker# 470*6236dae4SAndroid Build Coastguard Worker# Due to libtool and automake machinery limitations of not allowing 471*6236dae4SAndroid Build Coastguard Worker# specifying separate CPPFLAGS or CFLAGS when compiling objects for 472*6236dae4SAndroid Build Coastguard Worker# inclusion of these in shared or static libraries, we are forced to 473*6236dae4SAndroid Build Coastguard Worker# build using separate configure runs for shared and static libraries 474*6236dae4SAndroid Build Coastguard Worker# on systems where different CPPFLAGS or CFLAGS are mandatory in order 475*6236dae4SAndroid Build Coastguard Worker# to compile objects for each kind of library. Notice that relying on 476*6236dae4SAndroid Build Coastguard Worker# the '-DPIC' CFLAG that libtool provides is not valid given that the 477*6236dae4SAndroid Build Coastguard Worker# user might for example choose to build static libraries with PIC. 478*6236dae4SAndroid Build Coastguard Worker# 479*6236dae4SAndroid Build Coastguard Worker 480*6236dae4SAndroid Build Coastguard Worker# 481*6236dae4SAndroid Build Coastguard Worker# Make our Makefile.am files use the staticlib CPPFLAG only when strictly 482*6236dae4SAndroid Build Coastguard Worker# targeting a static library and not building its shared counterpart. 483*6236dae4SAndroid Build Coastguard Worker# 484*6236dae4SAndroid Build Coastguard Worker 485*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL([USE_CPPFLAG_CURL_STATICLIB], 486*6236dae4SAndroid Build Coastguard Worker [test "x$xc_lt_build_static_only" = 'xyes']) 487*6236dae4SAndroid Build Coastguard Worker 488*6236dae4SAndroid Build Coastguard Worker# 489*6236dae4SAndroid Build Coastguard Worker# Make staticlib CPPFLAG variable and its definition visible in output 490*6236dae4SAndroid Build Coastguard Worker# files unconditionally, providing an empty definition unless strictly 491*6236dae4SAndroid Build Coastguard Worker# targeting a static library and not building its shared counterpart. 492*6236dae4SAndroid Build Coastguard Worker# 493*6236dae4SAndroid Build Coastguard Worker 494*6236dae4SAndroid Build Coastguard WorkerLIBCURL_PC_CFLAGS_PRIVATE='-DCURL_STATICLIB' 495*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(LIBCURL_PC_CFLAGS_PRIVATE) 496*6236dae4SAndroid Build Coastguard Worker 497*6236dae4SAndroid Build Coastguard WorkerLIBCURL_PC_CFLAGS= 498*6236dae4SAndroid Build Coastguard Workerif test "x$xc_lt_build_static_only" = 'xyes'; then 499*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_CFLAGS="${LIBCURL_PC_CFLAGS_PRIVATE}" 500*6236dae4SAndroid Build Coastguard Workerfi 501*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([LIBCURL_PC_CFLAGS]) 502*6236dae4SAndroid Build Coastguard Worker 503*6236dae4SAndroid Build Coastguard Worker 504*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 505*6236dae4SAndroid Build Coastguard Workerdnl platform/compiler/architecture specific checks/flags 506*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 507*6236dae4SAndroid Build Coastguard Worker 508*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_COMPILER 509*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_NATIVE_WINDOWS 510*6236dae4SAndroid Build Coastguard WorkerCURL_SET_COMPILER_BASIC_OPTS 511*6236dae4SAndroid Build Coastguard WorkerCURL_SET_COMPILER_DEBUG_OPTS 512*6236dae4SAndroid Build Coastguard WorkerCURL_SET_COMPILER_OPTIMIZE_OPTS 513*6236dae4SAndroid Build Coastguard WorkerCURL_SET_COMPILER_WARNING_OPTS 514*6236dae4SAndroid Build Coastguard Worker 515*6236dae4SAndroid Build Coastguard Workerif test "$compiler_id" = "INTEL_UNIX_C"; then 516*6236dae4SAndroid Build Coastguard Worker # 517*6236dae4SAndroid Build Coastguard Worker if test "$compiler_num" -ge "1000"; then 518*6236dae4SAndroid Build Coastguard Worker dnl icc 10.X or later 519*6236dae4SAndroid Build Coastguard Worker CFLAGS="$CFLAGS -shared-intel" 520*6236dae4SAndroid Build Coastguard Worker elif test "$compiler_num" -ge "900"; then 521*6236dae4SAndroid Build Coastguard Worker dnl icc 9.X specific 522*6236dae4SAndroid Build Coastguard Worker CFLAGS="$CFLAGS -i-dynamic" 523*6236dae4SAndroid Build Coastguard Worker fi 524*6236dae4SAndroid Build Coastguard Worker # 525*6236dae4SAndroid Build Coastguard Workerfi 526*6236dae4SAndroid Build Coastguard Worker 527*6236dae4SAndroid Build Coastguard WorkerCURL_CFLAG_EXTRAS="" 528*6236dae4SAndroid Build Coastguard Workerif test X"$want_werror" = Xyes; then 529*6236dae4SAndroid Build Coastguard Worker CURL_CFLAG_EXTRAS="-Werror" 530*6236dae4SAndroid Build Coastguard Worker if test "$compiler_id" = "GNU_C"; then 531*6236dae4SAndroid Build Coastguard Worker dnl enable -pedantic-errors for GCC 5 and later, 532*6236dae4SAndroid Build Coastguard Worker dnl as before that it was the same as -Werror=pedantic 533*6236dae4SAndroid Build Coastguard Worker if test "$compiler_num" -ge "500"; then 534*6236dae4SAndroid Build Coastguard Worker CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors" 535*6236dae4SAndroid Build Coastguard Worker fi 536*6236dae4SAndroid Build Coastguard Worker elif test "$compiler_id" = "CLANG" -o "$compiler_id" = "APPLECLANG"; then 537*6236dae4SAndroid Build Coastguard Worker CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors" 538*6236dae4SAndroid Build Coastguard Worker fi 539*6236dae4SAndroid Build Coastguard Workerfi 540*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(CURL_CFLAG_EXTRAS) 541*6236dae4SAndroid Build Coastguard Worker 542*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_COMPILER_HALT_ON_ERROR 543*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE 544*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_COMPILER_PROTOTYPE_MISMATCH 545*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_COMPILER_SYMBOL_HIDING 546*6236dae4SAndroid Build Coastguard Worker 547*6236dae4SAndroid Build Coastguard Workersupports_unittests=yes 548*6236dae4SAndroid Build Coastguard Worker# cross-compilation of unit tests static library/programs fails when 549*6236dae4SAndroid Build Coastguard Worker# libcurl shared library is built. This might be due to a libtool or 550*6236dae4SAndroid Build Coastguard Worker# automake issue. In this case we disable unit tests. 551*6236dae4SAndroid Build Coastguard Workerif test "x$cross_compiling" != "xno" && 552*6236dae4SAndroid Build Coastguard Worker test "x$enable_shared" != "xno"; then 553*6236dae4SAndroid Build Coastguard Worker supports_unittests=no 554*6236dae4SAndroid Build Coastguard Workerfi 555*6236dae4SAndroid Build Coastguard Worker 556*6236dae4SAndroid Build Coastguard Worker# IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to 557*6236dae4SAndroid Build Coastguard Worker# a problem related with OpenSSL headers and library versions not matching. 558*6236dae4SAndroid Build Coastguard Worker# Disable unit tests while time to further investigate this is found. 559*6236dae4SAndroid Build Coastguard Workercase $host in 560*6236dae4SAndroid Build Coastguard Worker mips-sgi-irix6.5) 561*6236dae4SAndroid Build Coastguard Worker if test "$compiler_id" = "GNU_C"; then 562*6236dae4SAndroid Build Coastguard Worker supports_unittests=no 563*6236dae4SAndroid Build Coastguard Worker fi 564*6236dae4SAndroid Build Coastguard Worker ;; 565*6236dae4SAndroid Build Coastguard Workeresac 566*6236dae4SAndroid Build Coastguard Worker 567*6236dae4SAndroid Build Coastguard Worker# All AIX autobuilds fails unit tests linking against unittests library 568*6236dae4SAndroid Build Coastguard Worker# due to unittests library being built with no symbols or members. Libtool ? 569*6236dae4SAndroid Build Coastguard Worker# Disable unit tests while time to further investigate this is found. 570*6236dae4SAndroid Build Coastguard Workercase $host_os in 571*6236dae4SAndroid Build Coastguard Worker aix*) 572*6236dae4SAndroid Build Coastguard Worker supports_unittests=no 573*6236dae4SAndroid Build Coastguard Worker ;; 574*6236dae4SAndroid Build Coastguard Workeresac 575*6236dae4SAndroid Build Coastguard Worker 576*6236dae4SAndroid Build Coastguard Worker# In order to detect support of sendmmsg(), we need to escape the POSIX 577*6236dae4SAndroid Build Coastguard Worker# jail by defining _GNU_SOURCE or <sys/socket.h> will not expose it. 578*6236dae4SAndroid Build Coastguard Workercase $host_os in 579*6236dae4SAndroid Build Coastguard Worker linux*) 580*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" 581*6236dae4SAndroid Build Coastguard Worker ;; 582*6236dae4SAndroid Build Coastguard Workeresac 583*6236dae4SAndroid Build Coastguard Worker 584*6236dae4SAndroid Build Coastguard Workerdnl Build unit tests when option --enable-debug is given. 585*6236dae4SAndroid Build Coastguard Workerif test "x$want_debug" = "xyes" && 586*6236dae4SAndroid Build Coastguard Worker test "x$supports_unittests" = "xyes"; then 587*6236dae4SAndroid Build Coastguard Worker want_unittests=yes 588*6236dae4SAndroid Build Coastguard Workerelse 589*6236dae4SAndroid Build Coastguard Worker want_unittests=no 590*6236dae4SAndroid Build Coastguard Workerfi 591*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes) 592*6236dae4SAndroid Build Coastguard Worker 593*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 594*6236dae4SAndroid Build Coastguard Workerdnl Compilation based checks should not be done before this point. 595*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 596*6236dae4SAndroid Build Coastguard Worker 597*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_WIN32_LARGEFILE 598*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_WIN32_CRYPTO 599*6236dae4SAndroid Build Coastguard Worker 600*6236dae4SAndroid Build Coastguard WorkerCURL_DARWIN_CFLAGS 601*6236dae4SAndroid Build Coastguard Worker 602*6236dae4SAndroid Build Coastguard Workercase $host in 603*6236dae4SAndroid Build Coastguard Worker *-apple-*) 604*6236dae4SAndroid Build Coastguard Worker CURL_SUPPORTS_BUILTIN_AVAILABLE 605*6236dae4SAndroid Build Coastguard Worker ;; 606*6236dae4SAndroid Build Coastguard Workeresac 607*6236dae4SAndroid Build Coastguard Worker 608*6236dae4SAndroid Build Coastguard Workercurl_cv_cygwin='no' 609*6236dae4SAndroid Build Coastguard Workercase $host_os in 610*6236dae4SAndroid Build Coastguard Worker cygwin*|msys*) curl_cv_cygwin='yes';; 611*6236dae4SAndroid Build Coastguard Workeresac 612*6236dae4SAndroid Build Coastguard Worker 613*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL([HAVE_WINDRES], 614*6236dae4SAndroid Build Coastguard Worker [test "$curl_cv_native_windows" = "yes" && test -n "${RC}"]) 615*6236dae4SAndroid Build Coastguard Worker 616*6236dae4SAndroid Build Coastguard Workerif test "$curl_cv_native_windows" = "yes"; then 617*6236dae4SAndroid Build Coastguard Worker AM_COND_IF([HAVE_WINDRES],, 618*6236dae4SAndroid Build Coastguard Worker [AC_MSG_ERROR([windres not found in PATH. Windows builds require windres. Cannot continue.])]) 619*6236dae4SAndroid Build Coastguard Workerfi 620*6236dae4SAndroid Build Coastguard Worker 621*6236dae4SAndroid Build Coastguard Workerdnl ---------------------------------------- 622*6236dae4SAndroid Build Coastguard Workerdnl whether use "unity" mode for lib and src 623*6236dae4SAndroid Build Coastguard Workerdnl ---------------------------------------- 624*6236dae4SAndroid Build Coastguard Worker 625*6236dae4SAndroid Build Coastguard Workerwant_unity='no' 626*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to build libcurl and curl in "unity" mode]) 627*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(unity, 628*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-unity],[Enable unity mode]) 629*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-unity],[Disable unity (default)]), 630*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 631*6236dae4SAndroid Build Coastguard Worker yes) 632*6236dae4SAndroid Build Coastguard Worker want_unity='yes' 633*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 634*6236dae4SAndroid Build Coastguard Worker ;; 635*6236dae4SAndroid Build Coastguard Worker *) 636*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 637*6236dae4SAndroid Build Coastguard Worker ;; 638*6236dae4SAndroid Build Coastguard Worker esac ], 639*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 640*6236dae4SAndroid Build Coastguard Worker) 641*6236dae4SAndroid Build Coastguard Worker 642*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL([USE_UNITY], [test "$want_unity" = 'yes']) 643*6236dae4SAndroid Build Coastguard Worker 644*6236dae4SAndroid Build Coastguard Workerdnl ----------------------- 645*6236dae4SAndroid Build Coastguard Workerdnl whether to bundle tests 646*6236dae4SAndroid Build Coastguard Workerdnl ----------------------- 647*6236dae4SAndroid Build Coastguard Worker 648*6236dae4SAndroid Build Coastguard Workerwant_test_bundles='no' 649*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to build tests into single-binary bundles]) 650*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(test-bundles, 651*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-test-bundles],[Enable test bundles]) 652*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-test-bundles],[Disable test bundles (default)]), 653*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 654*6236dae4SAndroid Build Coastguard Worker yes) 655*6236dae4SAndroid Build Coastguard Worker want_test_bundles='yes' 656*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 657*6236dae4SAndroid Build Coastguard Worker ;; 658*6236dae4SAndroid Build Coastguard Worker *) 659*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 660*6236dae4SAndroid Build Coastguard Worker ;; 661*6236dae4SAndroid Build Coastguard Worker esac ], 662*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 663*6236dae4SAndroid Build Coastguard Worker) 664*6236dae4SAndroid Build Coastguard Worker 665*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL([USE_TEST_BUNDLES], [test "$want_test_bundles" = 'yes']) 666*6236dae4SAndroid Build Coastguard Worker 667*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 668*6236dae4SAndroid Build Coastguard Workerdnl switch off particular protocols 669*6236dae4SAndroid Build Coastguard Workerdnl 670*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support http]) 671*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(http, 672*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-http],[Enable HTTP support]) 673*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-http],[Disable HTTP support]), 674*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 675*6236dae4SAndroid Build Coastguard Worker no) 676*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 677*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP]) 678*6236dae4SAndroid Build Coastguard Worker disable_http="yes" 679*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([disable HTTP disables FTP over proxy, IPFS and RTSP]) 680*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_HTTP, [1]) 681*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_IPFS, 1, [to disable IPFS]) 682*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_IPFS, [1]) 683*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP]) 684*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_RTSP, [1]) 685*6236dae4SAndroid Build Coastguard Worker dnl toggle off alt-svc too when HTTP is disabled 686*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_ALTSVC, 1, [disable alt-svc]) 687*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable HSTS]) 688*6236dae4SAndroid Build Coastguard Worker curl_h1_msg="no (--enable-http, --with-hyper)" 689*6236dae4SAndroid Build Coastguard Worker curl_altsvc_msg="no"; 690*6236dae4SAndroid Build Coastguard Worker curl_hsts_msg="no (--enable-hsts)"; 691*6236dae4SAndroid Build Coastguard Worker enable_altsvc="no" 692*6236dae4SAndroid Build Coastguard Worker hsts="no" 693*6236dae4SAndroid Build Coastguard Worker ;; 694*6236dae4SAndroid Build Coastguard Worker *) 695*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 696*6236dae4SAndroid Build Coastguard Worker ;; 697*6236dae4SAndroid Build Coastguard Worker esac ], 698*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 699*6236dae4SAndroid Build Coastguard Worker) 700*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support ftp]) 701*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(ftp, 702*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-ftp],[Enable FTP support]) 703*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-ftp],[Disable FTP support]), 704*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 705*6236dae4SAndroid Build Coastguard Worker no) 706*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 707*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP]) 708*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_FTP, [1]) 709*6236dae4SAndroid Build Coastguard Worker ;; 710*6236dae4SAndroid Build Coastguard Worker *) 711*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 712*6236dae4SAndroid Build Coastguard Worker ;; 713*6236dae4SAndroid Build Coastguard Worker esac ], 714*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 715*6236dae4SAndroid Build Coastguard Worker) 716*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support file]) 717*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(file, 718*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-file],[Enable FILE support]) 719*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-file],[Disable FILE support]), 720*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 721*6236dae4SAndroid Build Coastguard Worker no) 722*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 723*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE]) 724*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_FILE, [1]) 725*6236dae4SAndroid Build Coastguard Worker ;; 726*6236dae4SAndroid Build Coastguard Worker *) 727*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 728*6236dae4SAndroid Build Coastguard Worker ;; 729*6236dae4SAndroid Build Coastguard Worker esac ], 730*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 731*6236dae4SAndroid Build Coastguard Worker) 732*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support IPFS]) 733*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(ipfs, 734*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-ipfs],[Enable IPFS support]) 735*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-ipfs],[Disable IPFS support]), 736*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 737*6236dae4SAndroid Build Coastguard Worker no) 738*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 739*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_IPFS, 1, [to disable IPFS]) 740*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_IPFS, [1]) 741*6236dae4SAndroid Build Coastguard Worker ;; 742*6236dae4SAndroid Build Coastguard Worker *) 743*6236dae4SAndroid Build Coastguard Worker if test x$CURL_DISABLE_HTTP = x1; then 744*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR(HTTP support needs to be enabled in order to enable IPFS support!) 745*6236dae4SAndroid Build Coastguard Worker else 746*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 747*6236dae4SAndroid Build Coastguard Worker curl_ipfs_msg="enabled" 748*6236dae4SAndroid Build Coastguard Worker fi 749*6236dae4SAndroid Build Coastguard Worker ;; 750*6236dae4SAndroid Build Coastguard Worker esac ], 751*6236dae4SAndroid Build Coastguard Worker if test "x$CURL_DISABLE_HTTP" != "x1"; then 752*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 753*6236dae4SAndroid Build Coastguard Worker curl_ipfs_msg="enabled" 754*6236dae4SAndroid Build Coastguard Worker else 755*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 756*6236dae4SAndroid Build Coastguard Worker fi 757*6236dae4SAndroid Build Coastguard Worker) 758*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support ldap]) 759*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(ldap, 760*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-ldap],[Enable LDAP support]) 761*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-ldap],[Disable LDAP support]), 762*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 763*6236dae4SAndroid Build Coastguard Worker no) 764*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 765*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) 766*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_LDAP, [1]) 767*6236dae4SAndroid Build Coastguard Worker ;; 768*6236dae4SAndroid Build Coastguard Worker yes) 769*6236dae4SAndroid Build Coastguard Worker ldap_askedfor="yes" 770*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 771*6236dae4SAndroid Build Coastguard Worker ;; 772*6236dae4SAndroid Build Coastguard Worker *) 773*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 774*6236dae4SAndroid Build Coastguard Worker ;; 775*6236dae4SAndroid Build Coastguard Worker esac ],[ 776*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) ] 777*6236dae4SAndroid Build Coastguard Worker) 778*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support ldaps]) 779*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(ldaps, 780*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-ldaps],[Enable LDAPS support]) 781*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-ldaps],[Disable LDAPS support]), 782*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 783*6236dae4SAndroid Build Coastguard Worker no) 784*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 785*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) 786*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_LDAPS, [1]) 787*6236dae4SAndroid Build Coastguard Worker ;; 788*6236dae4SAndroid Build Coastguard Worker *) 789*6236dae4SAndroid Build Coastguard Worker if test "x$CURL_DISABLE_LDAP" = "x1"; then 790*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS) 791*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) 792*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_LDAPS, [1]) 793*6236dae4SAndroid Build Coastguard Worker else 794*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 795*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation]) 796*6236dae4SAndroid Build Coastguard Worker AC_SUBST(HAVE_LDAP_SSL, [1]) 797*6236dae4SAndroid Build Coastguard Worker fi 798*6236dae4SAndroid Build Coastguard Worker ;; 799*6236dae4SAndroid Build Coastguard Worker esac ],[ 800*6236dae4SAndroid Build Coastguard Worker if test "x$CURL_DISABLE_LDAP" = "x1"; then 801*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 802*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) 803*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_LDAPS, [1]) 804*6236dae4SAndroid Build Coastguard Worker else 805*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 806*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation]) 807*6236dae4SAndroid Build Coastguard Worker AC_SUBST(HAVE_LDAP_SSL, [1]) 808*6236dae4SAndroid Build Coastguard Worker fi ] 809*6236dae4SAndroid Build Coastguard Worker) 810*6236dae4SAndroid Build Coastguard Worker 811*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 812*6236dae4SAndroid Build Coastguard Workerdnl Check for Hyper 813*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 814*6236dae4SAndroid Build Coastguard Worker 815*6236dae4SAndroid Build Coastguard WorkerOPT_HYPER="no" 816*6236dae4SAndroid Build Coastguard Worker 817*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(hyper, 818*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-hyper=PATH],[Enable hyper usage]) 819*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-hyper],[Disable hyper usage]), 820*6236dae4SAndroid Build Coastguard Worker [OPT_HYPER=$withval]) 821*6236dae4SAndroid Build Coastguard Workercase "$OPT_HYPER" in 822*6236dae4SAndroid Build Coastguard Worker no) 823*6236dae4SAndroid Build Coastguard Worker dnl --without-hyper option used 824*6236dae4SAndroid Build Coastguard Worker want_hyper="no" 825*6236dae4SAndroid Build Coastguard Worker ;; 826*6236dae4SAndroid Build Coastguard Worker yes) 827*6236dae4SAndroid Build Coastguard Worker dnl --with-hyper option used without path 828*6236dae4SAndroid Build Coastguard Worker want_hyper="default" 829*6236dae4SAndroid Build Coastguard Worker want_hyper_path="" 830*6236dae4SAndroid Build Coastguard Worker ;; 831*6236dae4SAndroid Build Coastguard Worker *) 832*6236dae4SAndroid Build Coastguard Worker dnl --with-hyper option used with path 833*6236dae4SAndroid Build Coastguard Worker want_hyper="yes" 834*6236dae4SAndroid Build Coastguard Worker want_hyper_path="$withval" 835*6236dae4SAndroid Build Coastguard Worker ;; 836*6236dae4SAndroid Build Coastguard Workeresac 837*6236dae4SAndroid Build Coastguard Worker 838*6236dae4SAndroid Build Coastguard Workerif test X"$want_hyper" != Xno; then 839*6236dae4SAndroid Build Coastguard Worker if test "x$disable_http" = "xyes"; then 840*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-hyper is not compatible with --disable-http]) 841*6236dae4SAndroid Build Coastguard Worker fi 842*6236dae4SAndroid Build Coastguard Worker 843*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-hyper variables 844*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 845*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 846*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 847*6236dae4SAndroid Build Coastguard Worker 848*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(hyper, $want_hyper_path) 849*6236dae4SAndroid Build Coastguard Worker 850*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 851*6236dae4SAndroid Build Coastguard Worker LIB_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path]) 852*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-l hyper` 853*6236dae4SAndroid Build Coastguard Worker CPP_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path]) dnl 854*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --cflags-only-I hyper` 855*6236dae4SAndroid Build Coastguard Worker LD_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path]) 856*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-L hyper` 857*6236dae4SAndroid Build Coastguard Worker else 858*6236dae4SAndroid Build Coastguard Worker dnl no hyper pkg-config found 859*6236dae4SAndroid Build Coastguard Worker LIB_HYPER="-lhyper -ldl -lpthread -lm" 860*6236dae4SAndroid Build Coastguard Worker if test X"$want_hyper" != Xdefault; then 861*6236dae4SAndroid Build Coastguard Worker CPP_HYPER=-I"$want_hyper_path/capi/include" 862*6236dae4SAndroid Build Coastguard Worker LD_HYPER="-L$want_hyper_path/target/release -L$want_hyper_path/target/debug" 863*6236dae4SAndroid Build Coastguard Worker fi 864*6236dae4SAndroid Build Coastguard Worker fi 865*6236dae4SAndroid Build Coastguard Worker if test -n "$LIB_HYPER"; then 866*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-l is $LIB_HYPER]) 867*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-I is $CPP_HYPER]) 868*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-L is $LD_HYPER]) 869*6236dae4SAndroid Build Coastguard Worker 870*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_HYPER" 871*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_HYPER" 872*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_HYPER $LIBS" 873*6236dae4SAndroid Build Coastguard Worker 874*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 875*6236dae4SAndroid Build Coastguard Worker dnl remove -L, separate with colon if more than one 876*6236dae4SAndroid Build Coastguard Worker DIR_HYPER=`echo $LD_HYPER | $SED -e 's/^-L//' -e 's/ -L/:/g'` 877*6236dae4SAndroid Build Coastguard Worker fi 878*6236dae4SAndroid Build Coastguard Worker 879*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(hyper, hyper_io_new, 880*6236dae4SAndroid Build Coastguard Worker [ 881*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(hyper.h, 882*6236dae4SAndroid Build Coastguard Worker experimental="$experimental Hyper" 883*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Hyper support is experimental]) 884*6236dae4SAndroid Build Coastguard Worker curl_h1_msg="enabled (Hyper)" 885*6236dae4SAndroid Build Coastguard Worker HYPER_ENABLED=1 886*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_HYPER, 1, [if hyper is in use]) 887*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_HYPER, [1]) 888*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_HYPER" 889*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 890*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_HYPER to CURL_LIBRARY_PATH]) 891*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE hyper" 892*6236dae4SAndroid Build Coastguard Worker ) 893*6236dae4SAndroid Build Coastguard Worker ], 894*6236dae4SAndroid Build Coastguard Worker for d in `echo $DIR_HYPER | $SED -e 's/:/ /'`; do 895*6236dae4SAndroid Build Coastguard Worker if test -f "$d/libhyper.a"; then 896*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([hyper was found in $d but was probably built with wrong flags. See docs/HYPER.md.]) 897*6236dae4SAndroid Build Coastguard Worker fi 898*6236dae4SAndroid Build Coastguard Worker done 899*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-hyper but hyper was not found. See docs/HYPER.md.]) 900*6236dae4SAndroid Build Coastguard Worker ) 901*6236dae4SAndroid Build Coastguard Worker fi 902*6236dae4SAndroid Build Coastguard Workerfi 903*6236dae4SAndroid Build Coastguard Worker 904*6236dae4SAndroid Build Coastguard Workerif test X"$want_hyper" != Xno; then 905*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Disable RTSP support with hyper]) 906*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP]) 907*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_RTSP, [1]) 908*6236dae4SAndroid Build Coastguard Workerelse 909*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to support rtsp]) 910*6236dae4SAndroid Build Coastguard Worker AC_ARG_ENABLE(rtsp, 911*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-rtsp],[Enable RTSP support]) 912*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-rtsp],[Disable RTSP support]), 913*6236dae4SAndroid Build Coastguard Worker [ case "$enableval" in 914*6236dae4SAndroid Build Coastguard Worker no) 915*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 916*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP]) 917*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_RTSP, [1]) 918*6236dae4SAndroid Build Coastguard Worker ;; 919*6236dae4SAndroid Build Coastguard Worker *) 920*6236dae4SAndroid Build Coastguard Worker if test x$CURL_DISABLE_HTTP = x1; then 921*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!) 922*6236dae4SAndroid Build Coastguard Worker else 923*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 924*6236dae4SAndroid Build Coastguard Worker curl_rtsp_msg="enabled" 925*6236dae4SAndroid Build Coastguard Worker fi 926*6236dae4SAndroid Build Coastguard Worker ;; 927*6236dae4SAndroid Build Coastguard Worker esac ], 928*6236dae4SAndroid Build Coastguard Worker if test "x$CURL_DISABLE_HTTP" != "x1"; then 929*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 930*6236dae4SAndroid Build Coastguard Worker curl_rtsp_msg="enabled" 931*6236dae4SAndroid Build Coastguard Worker else 932*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 933*6236dae4SAndroid Build Coastguard Worker fi 934*6236dae4SAndroid Build Coastguard Worker ) 935*6236dae4SAndroid Build Coastguard Workerfi 936*6236dae4SAndroid Build Coastguard Worker 937*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support proxies]) 938*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(proxy, 939*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-proxy],[Enable proxy support]) 940*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-proxy],[Disable proxy support]), 941*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 942*6236dae4SAndroid Build Coastguard Worker no) 943*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 944*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies]) 945*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_PROXY, [1]) 946*6236dae4SAndroid Build Coastguard Worker https_proxy="no" 947*6236dae4SAndroid Build Coastguard Worker ;; 948*6236dae4SAndroid Build Coastguard Worker *) 949*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 950*6236dae4SAndroid Build Coastguard Worker ;; 951*6236dae4SAndroid Build Coastguard Worker esac ], 952*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 953*6236dae4SAndroid Build Coastguard Worker) 954*6236dae4SAndroid Build Coastguard Worker 955*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support dict]) 956*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(dict, 957*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-dict],[Enable DICT support]) 958*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-dict],[Disable DICT support]), 959*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 960*6236dae4SAndroid Build Coastguard Worker no) 961*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 962*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT]) 963*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_DICT, [1]) 964*6236dae4SAndroid Build Coastguard Worker ;; 965*6236dae4SAndroid Build Coastguard Worker *) 966*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 967*6236dae4SAndroid Build Coastguard Worker ;; 968*6236dae4SAndroid Build Coastguard Worker esac ], 969*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 970*6236dae4SAndroid Build Coastguard Worker) 971*6236dae4SAndroid Build Coastguard Worker 972*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support telnet]) 973*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(telnet, 974*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-telnet],[Enable TELNET support]) 975*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-telnet],[Disable TELNET support]), 976*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 977*6236dae4SAndroid Build Coastguard Worker no) 978*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 979*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET]) 980*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_TELNET, [1]) 981*6236dae4SAndroid Build Coastguard Worker ;; 982*6236dae4SAndroid Build Coastguard Worker *) 983*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 984*6236dae4SAndroid Build Coastguard Worker ;; 985*6236dae4SAndroid Build Coastguard Worker esac ], 986*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 987*6236dae4SAndroid Build Coastguard Worker) 988*6236dae4SAndroid Build Coastguard Worker 989*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support tftp]) 990*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(tftp, 991*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-tftp],[Enable TFTP support]) 992*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-tftp],[Disable TFTP support]), 993*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 994*6236dae4SAndroid Build Coastguard Worker no) 995*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 996*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP]) 997*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_TFTP, [1]) 998*6236dae4SAndroid Build Coastguard Worker ;; 999*6236dae4SAndroid Build Coastguard Worker *) 1000*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1001*6236dae4SAndroid Build Coastguard Worker ;; 1002*6236dae4SAndroid Build Coastguard Worker esac ], 1003*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1004*6236dae4SAndroid Build Coastguard Worker) 1005*6236dae4SAndroid Build Coastguard Worker 1006*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support pop3]) 1007*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(pop3, 1008*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-pop3],[Enable POP3 support]) 1009*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-pop3],[Disable POP3 support]), 1010*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 1011*6236dae4SAndroid Build Coastguard Worker no) 1012*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1013*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_POP3, 1, [to disable POP3]) 1014*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_POP3, [1]) 1015*6236dae4SAndroid Build Coastguard Worker ;; 1016*6236dae4SAndroid Build Coastguard Worker *) 1017*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1018*6236dae4SAndroid Build Coastguard Worker ;; 1019*6236dae4SAndroid Build Coastguard Worker esac ], 1020*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1021*6236dae4SAndroid Build Coastguard Worker) 1022*6236dae4SAndroid Build Coastguard Worker 1023*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support imap]) 1024*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(imap, 1025*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-imap],[Enable IMAP support]) 1026*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-imap],[Disable IMAP support]), 1027*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 1028*6236dae4SAndroid Build Coastguard Worker no) 1029*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1030*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_IMAP, 1, [to disable IMAP]) 1031*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_IMAP, [1]) 1032*6236dae4SAndroid Build Coastguard Worker ;; 1033*6236dae4SAndroid Build Coastguard Worker *) 1034*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1035*6236dae4SAndroid Build Coastguard Worker ;; 1036*6236dae4SAndroid Build Coastguard Worker esac ], 1037*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1038*6236dae4SAndroid Build Coastguard Worker) 1039*6236dae4SAndroid Build Coastguard Worker 1040*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support smb]) 1041*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(smb, 1042*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-smb],[Enable SMB/CIFS support]) 1043*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-smb],[Disable SMB/CIFS support]), 1044*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 1045*6236dae4SAndroid Build Coastguard Worker no) 1046*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1047*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_SMB, 1, [to disable SMB/CIFS]) 1048*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_SMB, [1]) 1049*6236dae4SAndroid Build Coastguard Worker ;; 1050*6236dae4SAndroid Build Coastguard Worker *) 1051*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1052*6236dae4SAndroid Build Coastguard Worker ;; 1053*6236dae4SAndroid Build Coastguard Worker esac ], 1054*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1055*6236dae4SAndroid Build Coastguard Worker) 1056*6236dae4SAndroid Build Coastguard Worker 1057*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support smtp]) 1058*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(smtp, 1059*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-smtp],[Enable SMTP support]) 1060*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-smtp],[Disable SMTP support]), 1061*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 1062*6236dae4SAndroid Build Coastguard Worker no) 1063*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1064*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_SMTP, 1, [to disable SMTP]) 1065*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_SMTP, [1]) 1066*6236dae4SAndroid Build Coastguard Worker ;; 1067*6236dae4SAndroid Build Coastguard Worker *) 1068*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1069*6236dae4SAndroid Build Coastguard Worker ;; 1070*6236dae4SAndroid Build Coastguard Worker esac ], 1071*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1072*6236dae4SAndroid Build Coastguard Worker) 1073*6236dae4SAndroid Build Coastguard Worker 1074*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support gopher]) 1075*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(gopher, 1076*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-gopher],[Enable Gopher support]) 1077*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-gopher],[Disable Gopher support]), 1078*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 1079*6236dae4SAndroid Build Coastguard Worker no) 1080*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1081*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher]) 1082*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_GOPHER, [1]) 1083*6236dae4SAndroid Build Coastguard Worker ;; 1084*6236dae4SAndroid Build Coastguard Worker *) 1085*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1086*6236dae4SAndroid Build Coastguard Worker ;; 1087*6236dae4SAndroid Build Coastguard Worker esac ], 1088*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1089*6236dae4SAndroid Build Coastguard Worker) 1090*6236dae4SAndroid Build Coastguard Worker 1091*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support mqtt]) 1092*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(mqtt, 1093*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-mqtt],[Enable MQTT support]) 1094*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-mqtt],[Disable MQTT support]), 1095*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 1096*6236dae4SAndroid Build Coastguard Worker no) 1097*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1098*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_MQTT, 1, [to disable MQTT]) 1099*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_MQTT, [1]) 1100*6236dae4SAndroid Build Coastguard Worker ;; 1101*6236dae4SAndroid Build Coastguard Worker *) 1102*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1103*6236dae4SAndroid Build Coastguard Worker ;; 1104*6236dae4SAndroid Build Coastguard Worker esac ], 1105*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1106*6236dae4SAndroid Build Coastguard Worker) 1107*6236dae4SAndroid Build Coastguard Worker 1108*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1109*6236dae4SAndroid Build Coastguard Workerdnl Check for built-in manual 1110*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1111*6236dae4SAndroid Build Coastguard Worker 1112*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to provide built-in manual]) 1113*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(manual, 1114*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-manual],[Enable built-in manual]) 1115*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-manual],[Disable built-in manual]), 1116*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 1117*6236dae4SAndroid Build Coastguard Worker no) 1118*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1119*6236dae4SAndroid Build Coastguard Worker ;; 1120*6236dae4SAndroid Build Coastguard Worker *) 1121*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1122*6236dae4SAndroid Build Coastguard Worker USE_MANUAL="1" 1123*6236dae4SAndroid Build Coastguard Worker ;; 1124*6236dae4SAndroid Build Coastguard Worker esac ], 1125*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1126*6236dae4SAndroid Build Coastguard Worker USE_MANUAL="1" 1127*6236dae4SAndroid Build Coastguard Worker) 1128*6236dae4SAndroid Build Coastguard Workerdnl The actual use of the USE_MANUAL variable is done much later in this 1129*6236dae4SAndroid Build Coastguard Workerdnl script to allow other actions to disable it as well. 1130*6236dae4SAndroid Build Coastguard Worker 1131*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1132*6236dae4SAndroid Build Coastguard Workerdnl Check whether to build documentation 1133*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1134*6236dae4SAndroid Build Coastguard Worker 1135*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to build documentation]) 1136*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(docs, 1137*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-docs],[Enable documentation]) 1138*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-docs],[Disable documentation]), 1139*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 1140*6236dae4SAndroid Build Coastguard Worker no) 1141*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1142*6236dae4SAndroid Build Coastguard Worker BUILD_DOCS=0 1143*6236dae4SAndroid Build Coastguard Worker dnl disable manual too because it needs built documentation 1144*6236dae4SAndroid Build Coastguard Worker USE_MANUAL=0 1145*6236dae4SAndroid Build Coastguard Worker curl_docs_msg="no" 1146*6236dae4SAndroid Build Coastguard Worker ;; 1147*6236dae4SAndroid Build Coastguard Worker *) 1148*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1149*6236dae4SAndroid Build Coastguard Worker BUILD_DOCS=1 1150*6236dae4SAndroid Build Coastguard Worker ;; 1151*6236dae4SAndroid Build Coastguard Worker esac ], 1152*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1153*6236dae4SAndroid Build Coastguard Worker BUILD_DOCS=1 1154*6236dae4SAndroid Build Coastguard Worker) 1155*6236dae4SAndroid Build Coastguard Worker 1156*6236dae4SAndroid Build Coastguard Worker 1157*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 1158*6236dae4SAndroid Build Coastguard Workerdnl disable C code generation support 1159*6236dae4SAndroid Build Coastguard Workerdnl 1160*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable generation of C code]) 1161*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(libcurl_option, 1162*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support]) 1163*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]), 1164*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 1165*6236dae4SAndroid Build Coastguard Worker no) 1166*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1167*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option]) 1168*6236dae4SAndroid Build Coastguard Worker curl_libcurl_msg="no" 1169*6236dae4SAndroid Build Coastguard Worker ;; 1170*6236dae4SAndroid Build Coastguard Worker *) 1171*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1172*6236dae4SAndroid Build Coastguard Worker ;; 1173*6236dae4SAndroid Build Coastguard Worker esac ], 1174*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1175*6236dae4SAndroid Build Coastguard Worker) 1176*6236dae4SAndroid Build Coastguard Worker 1177*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1178*6236dae4SAndroid Build Coastguard Workerdnl Checks for libraries. 1179*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1180*6236dae4SAndroid Build Coastguard Worker 1181*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to use libgcc]) 1182*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(libgcc, 1183*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-libgcc],[use libgcc when linking]), 1184*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 1185*6236dae4SAndroid Build Coastguard Worker yes) 1186*6236dae4SAndroid Build Coastguard Worker LIBS="-lgcc $LIBS" 1187*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1188*6236dae4SAndroid Build Coastguard Worker ;; 1189*6236dae4SAndroid Build Coastguard Worker *) 1190*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1191*6236dae4SAndroid Build Coastguard Worker ;; 1192*6236dae4SAndroid Build Coastguard Worker esac ], 1193*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1194*6236dae4SAndroid Build Coastguard Worker) 1195*6236dae4SAndroid Build Coastguard Worker 1196*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_LIB_XNET 1197*6236dae4SAndroid Build Coastguard Worker 1198*6236dae4SAndroid Build Coastguard Workerdnl gethostbyname without lib or in the nsl lib? 1199*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_FUNC(gethostbyname, 1200*6236dae4SAndroid Build Coastguard Worker [ 1201*6236dae4SAndroid Build Coastguard Worker HAVE_GETHOSTBYNAME="1" 1202*6236dae4SAndroid Build Coastguard Worker ], 1203*6236dae4SAndroid Build Coastguard Worker [ 1204*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(nsl, gethostbyname, 1205*6236dae4SAndroid Build Coastguard Worker [ 1206*6236dae4SAndroid Build Coastguard Worker HAVE_GETHOSTBYNAME="1" 1207*6236dae4SAndroid Build Coastguard Worker LIBS="-lnsl $LIBS" 1208*6236dae4SAndroid Build Coastguard Worker ] 1209*6236dae4SAndroid Build Coastguard Worker ) 1210*6236dae4SAndroid Build Coastguard Worker ] 1211*6236dae4SAndroid Build Coastguard Worker) 1212*6236dae4SAndroid Build Coastguard Worker 1213*6236dae4SAndroid Build Coastguard Workerif test "$HAVE_GETHOSTBYNAME" != "1"; then 1214*6236dae4SAndroid Build Coastguard Worker dnl gethostbyname in the socket lib? 1215*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(socket, gethostbyname, 1216*6236dae4SAndroid Build Coastguard Worker [ 1217*6236dae4SAndroid Build Coastguard Worker HAVE_GETHOSTBYNAME="1" 1218*6236dae4SAndroid Build Coastguard Worker LIBS="-lsocket $LIBS" 1219*6236dae4SAndroid Build Coastguard Worker ] 1220*6236dae4SAndroid Build Coastguard Worker ) 1221*6236dae4SAndroid Build Coastguard Workerfi 1222*6236dae4SAndroid Build Coastguard Worker 1223*6236dae4SAndroid Build Coastguard Workerif test "$HAVE_GETHOSTBYNAME" != "1"; then 1224*6236dae4SAndroid Build Coastguard Worker dnl gethostbyname in the watt lib? 1225*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(watt, gethostbyname, 1226*6236dae4SAndroid Build Coastguard Worker [ 1227*6236dae4SAndroid Build Coastguard Worker HAVE_GETHOSTBYNAME="1" 1228*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="-I${WATT_ROOT}/inc" 1229*6236dae4SAndroid Build Coastguard Worker LDFLAGS="-L${WATT_ROOT}/lib" 1230*6236dae4SAndroid Build Coastguard Worker LIBS="-lwatt $LIBS" 1231*6236dae4SAndroid Build Coastguard Worker ] 1232*6236dae4SAndroid Build Coastguard Worker ) 1233*6236dae4SAndroid Build Coastguard Workerfi 1234*6236dae4SAndroid Build Coastguard Worker 1235*6236dae4SAndroid Build Coastguard Workerdnl At least one system has been identified to require BOTH nsl and socket 1236*6236dae4SAndroid Build Coastguard Workerdnl libs at the same time to link properly. 1237*6236dae4SAndroid Build Coastguard Workerif test "$HAVE_GETHOSTBYNAME" != "1"; then 1238*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs]) 1239*6236dae4SAndroid Build Coastguard Worker my_ac_save_LIBS=$LIBS 1240*6236dae4SAndroid Build Coastguard Worker LIBS="-lnsl -lsocket $LIBS" 1241*6236dae4SAndroid Build Coastguard Worker AC_LINK_IFELSE([ 1242*6236dae4SAndroid Build Coastguard Worker AC_LANG_PROGRAM([[ 1243*6236dae4SAndroid Build Coastguard Worker ]],[[ 1244*6236dae4SAndroid Build Coastguard Worker gethostbyname(); 1245*6236dae4SAndroid Build Coastguard Worker ]]) 1246*6236dae4SAndroid Build Coastguard Worker ],[ 1247*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 1248*6236dae4SAndroid Build Coastguard Worker HAVE_GETHOSTBYNAME="1" 1249*6236dae4SAndroid Build Coastguard Worker ],[ 1250*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 1251*6236dae4SAndroid Build Coastguard Worker LIBS=$my_ac_save_LIBS 1252*6236dae4SAndroid Build Coastguard Worker ]) 1253*6236dae4SAndroid Build Coastguard Workerfi 1254*6236dae4SAndroid Build Coastguard Worker 1255*6236dae4SAndroid Build Coastguard Workerif test "$HAVE_GETHOSTBYNAME" != "1"; then 1256*6236dae4SAndroid Build Coastguard Worker dnl This is for Winsock systems 1257*6236dae4SAndroid Build Coastguard Worker if test "$curl_cv_native_windows" = "yes"; then 1258*6236dae4SAndroid Build Coastguard Worker winsock_LIB="-lws2_32" 1259*6236dae4SAndroid Build Coastguard Worker if test ! -z "$winsock_LIB"; then 1260*6236dae4SAndroid Build Coastguard Worker my_ac_save_LIBS=$LIBS 1261*6236dae4SAndroid Build Coastguard Worker LIBS="$winsock_LIB $LIBS" 1262*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([for gethostbyname in $winsock_LIB]) 1263*6236dae4SAndroid Build Coastguard Worker AC_LINK_IFELSE([ 1264*6236dae4SAndroid Build Coastguard Worker AC_LANG_PROGRAM([[ 1265*6236dae4SAndroid Build Coastguard Worker #ifdef _WIN32 1266*6236dae4SAndroid Build Coastguard Worker #ifndef WIN32_LEAN_AND_MEAN 1267*6236dae4SAndroid Build Coastguard Worker #define WIN32_LEAN_AND_MEAN 1268*6236dae4SAndroid Build Coastguard Worker #endif 1269*6236dae4SAndroid Build Coastguard Worker #include <winsock2.h> 1270*6236dae4SAndroid Build Coastguard Worker #endif 1271*6236dae4SAndroid Build Coastguard Worker ]],[[ 1272*6236dae4SAndroid Build Coastguard Worker gethostbyname("localhost"); 1273*6236dae4SAndroid Build Coastguard Worker ]]) 1274*6236dae4SAndroid Build Coastguard Worker ],[ 1275*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 1276*6236dae4SAndroid Build Coastguard Worker HAVE_GETHOSTBYNAME="1" 1277*6236dae4SAndroid Build Coastguard Worker ],[ 1278*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 1279*6236dae4SAndroid Build Coastguard Worker winsock_LIB="" 1280*6236dae4SAndroid Build Coastguard Worker LIBS=$my_ac_save_LIBS 1281*6236dae4SAndroid Build Coastguard Worker ]) 1282*6236dae4SAndroid Build Coastguard Worker fi 1283*6236dae4SAndroid Build Coastguard Worker fi 1284*6236dae4SAndroid Build Coastguard Workerfi 1285*6236dae4SAndroid Build Coastguard Worker 1286*6236dae4SAndroid Build Coastguard Workerif test "$HAVE_GETHOSTBYNAME" != "1"; then 1287*6236dae4SAndroid Build Coastguard Worker dnl This is for Minix 3.1 1288*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([for gethostbyname for Minix 3]) 1289*6236dae4SAndroid Build Coastguard Worker AC_LINK_IFELSE([ 1290*6236dae4SAndroid Build Coastguard Worker AC_LANG_PROGRAM([[ 1291*6236dae4SAndroid Build Coastguard Worker /* Older Minix versions may need <net/gen/netdb.h> here instead */ 1292*6236dae4SAndroid Build Coastguard Worker #include <netdb.h> 1293*6236dae4SAndroid Build Coastguard Worker ]],[[ 1294*6236dae4SAndroid Build Coastguard Worker gethostbyname("localhost"); 1295*6236dae4SAndroid Build Coastguard Worker ]]) 1296*6236dae4SAndroid Build Coastguard Worker ],[ 1297*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 1298*6236dae4SAndroid Build Coastguard Worker HAVE_GETHOSTBYNAME="1" 1299*6236dae4SAndroid Build Coastguard Worker ],[ 1300*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 1301*6236dae4SAndroid Build Coastguard Worker ]) 1302*6236dae4SAndroid Build Coastguard Workerfi 1303*6236dae4SAndroid Build Coastguard Worker 1304*6236dae4SAndroid Build Coastguard Workerif test "$HAVE_GETHOSTBYNAME" != "1"; then 1305*6236dae4SAndroid Build Coastguard Worker dnl This is for eCos with a stubbed DNS implementation 1306*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([for gethostbyname for eCos]) 1307*6236dae4SAndroid Build Coastguard Worker AC_LINK_IFELSE([ 1308*6236dae4SAndroid Build Coastguard Worker AC_LANG_PROGRAM([[ 1309*6236dae4SAndroid Build Coastguard Worker #include <stdio.h> 1310*6236dae4SAndroid Build Coastguard Worker #include <netdb.h> 1311*6236dae4SAndroid Build Coastguard Worker ]],[[ 1312*6236dae4SAndroid Build Coastguard Worker gethostbyname("localhost"); 1313*6236dae4SAndroid Build Coastguard Worker ]]) 1314*6236dae4SAndroid Build Coastguard Worker ],[ 1315*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 1316*6236dae4SAndroid Build Coastguard Worker HAVE_GETHOSTBYNAME="1" 1317*6236dae4SAndroid Build Coastguard Worker ],[ 1318*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 1319*6236dae4SAndroid Build Coastguard Worker ]) 1320*6236dae4SAndroid Build Coastguard Workerfi 1321*6236dae4SAndroid Build Coastguard Worker 1322*6236dae4SAndroid Build Coastguard Workerif test "$HAVE_GETHOSTBYNAME" != "1" -o "${with_amissl+set}" = set; then 1323*6236dae4SAndroid Build Coastguard Worker dnl This is for AmigaOS with bsdsocket.library - needs testing before -lnet 1324*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library]) 1325*6236dae4SAndroid Build Coastguard Worker AC_LINK_IFELSE([ 1326*6236dae4SAndroid Build Coastguard Worker AC_LANG_PROGRAM([[ 1327*6236dae4SAndroid Build Coastguard Worker #define __USE_INLINE__ 1328*6236dae4SAndroid Build Coastguard Worker #include <proto/bsdsocket.h> 1329*6236dae4SAndroid Build Coastguard Worker #ifdef __amigaos4__ 1330*6236dae4SAndroid Build Coastguard Worker struct SocketIFace *ISocket = NULL; 1331*6236dae4SAndroid Build Coastguard Worker #else 1332*6236dae4SAndroid Build Coastguard Worker struct Library *SocketBase = NULL; 1333*6236dae4SAndroid Build Coastguard Worker #endif 1334*6236dae4SAndroid Build Coastguard Worker ]],[[ 1335*6236dae4SAndroid Build Coastguard Worker gethostbyname("localhost"); 1336*6236dae4SAndroid Build Coastguard Worker ]]) 1337*6236dae4SAndroid Build Coastguard Worker ],[ 1338*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 1339*6236dae4SAndroid Build Coastguard Worker HAVE_GETHOSTBYNAME="1" 1340*6236dae4SAndroid Build Coastguard Worker HAVE_PROTO_BSDSOCKET_H="1" 1341*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_PROTO_BSDSOCKET_H, 1, [if Amiga bsdsocket.library is in use]) 1342*6236dae4SAndroid Build Coastguard Worker AC_SUBST(HAVE_PROTO_BSDSOCKET_H, [1]) 1343*6236dae4SAndroid Build Coastguard Worker ],[ 1344*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 1345*6236dae4SAndroid Build Coastguard Worker ]) 1346*6236dae4SAndroid Build Coastguard Workerfi 1347*6236dae4SAndroid Build Coastguard Worker 1348*6236dae4SAndroid Build Coastguard Workerif test "$HAVE_GETHOSTBYNAME" != "1"; then 1349*6236dae4SAndroid Build Coastguard Worker dnl gethostbyname in the network lib - for Haiku OS 1350*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(network, gethostbyname, 1351*6236dae4SAndroid Build Coastguard Worker [ 1352*6236dae4SAndroid Build Coastguard Worker HAVE_GETHOSTBYNAME="1" 1353*6236dae4SAndroid Build Coastguard Worker LIBS="-lnetwork $LIBS" 1354*6236dae4SAndroid Build Coastguard Worker ] 1355*6236dae4SAndroid Build Coastguard Worker ) 1356*6236dae4SAndroid Build Coastguard Workerfi 1357*6236dae4SAndroid Build Coastguard Worker 1358*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_LIBS_CONNECT 1359*6236dae4SAndroid Build Coastguard Worker 1360*6236dae4SAndroid Build Coastguard WorkerCURL_NETWORK_LIBS=$LIBS 1361*6236dae4SAndroid Build Coastguard Worker 1362*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1363*6236dae4SAndroid Build Coastguard Workerdnl In case that function clock_gettime with monotonic timer is available, 1364*6236dae4SAndroid Build Coastguard Workerdnl check for additional required libraries. 1365*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1366*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC 1367*6236dae4SAndroid Build Coastguard Worker 1368*6236dae4SAndroid Build Coastguard Workerdnl Check for even better option 1369*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC_RAW 1370*6236dae4SAndroid Build Coastguard Worker 1371*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1372*6236dae4SAndroid Build Coastguard Workerdnl The preceding library checks are all potentially useful for test 1373*6236dae4SAndroid Build Coastguard Workerdnl servers and libtest cases which require networking and clock_gettime 1374*6236dae4SAndroid Build Coastguard Workerdnl support. Save the list of required libraries at this point for use 1375*6236dae4SAndroid Build Coastguard Workerdnl while linking those test servers and programs. 1376*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1377*6236dae4SAndroid Build Coastguard WorkerCURL_NETWORK_AND_TIME_LIBS=$LIBS 1378*6236dae4SAndroid Build Coastguard Worker 1379*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1380*6236dae4SAndroid Build Coastguard Workerdnl Check for the presence of ZLIB libraries and headers 1381*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1382*6236dae4SAndroid Build Coastguard Worker 1383*6236dae4SAndroid Build Coastguard Workerdnl Check for & handle argument to --with-zlib. 1384*6236dae4SAndroid Build Coastguard Worker 1385*6236dae4SAndroid Build Coastguard Workerclean_CPPFLAGS=$CPPFLAGS 1386*6236dae4SAndroid Build Coastguard Workerclean_LDFLAGS=$LDFLAGS 1387*6236dae4SAndroid Build Coastguard Workerclean_LIBS=$LIBS 1388*6236dae4SAndroid Build Coastguard WorkerZLIB_LIBS="" 1389*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(zlib, 1390*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH]) 1391*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-zlib],[disable use of zlib]), 1392*6236dae4SAndroid Build Coastguard Worker [OPT_ZLIB="$withval"]) 1393*6236dae4SAndroid Build Coastguard Worker 1394*6236dae4SAndroid Build Coastguard Workerif test "$OPT_ZLIB" = "no"; then 1395*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([zlib disabled]) 1396*6236dae4SAndroid Build Coastguard Workerelse 1397*6236dae4SAndroid Build Coastguard Worker if test "$OPT_ZLIB" = "yes"; then 1398*6236dae4SAndroid Build Coastguard Worker OPT_ZLIB="" 1399*6236dae4SAndroid Build Coastguard Worker fi 1400*6236dae4SAndroid Build Coastguard Worker 1401*6236dae4SAndroid Build Coastguard Worker if test -z "$OPT_ZLIB"; then 1402*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(zlib) 1403*6236dae4SAndroid Build Coastguard Worker 1404*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 1405*6236dae4SAndroid Build Coastguard Worker ZLIB_LIBS="`$PKGCONFIG --libs-only-l zlib`" 1406*6236dae4SAndroid Build Coastguard Worker if test -n "$ZLIB_LIBS"; then 1407*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`" 1408*6236dae4SAndroid Build Coastguard Worker else 1409*6236dae4SAndroid Build Coastguard Worker ZLIB_LIBS="`$PKGCONFIG --libs zlib`" 1410*6236dae4SAndroid Build Coastguard Worker fi 1411*6236dae4SAndroid Build Coastguard Worker LIBS="$ZLIB_LIBS $LIBS" 1412*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags zlib`" 1413*6236dae4SAndroid Build Coastguard Worker OPT_ZLIB="" 1414*6236dae4SAndroid Build Coastguard Worker HAVE_LIBZ="1" 1415*6236dae4SAndroid Build Coastguard Worker fi 1416*6236dae4SAndroid Build Coastguard Worker 1417*6236dae4SAndroid Build Coastguard Worker if test -z "$HAVE_LIBZ"; then 1418*6236dae4SAndroid Build Coastguard Worker 1419*6236dae4SAndroid Build Coastguard Worker dnl Check for the lib without setting any new path, since many 1420*6236dae4SAndroid Build Coastguard Worker dnl people have it in the default path 1421*6236dae4SAndroid Build Coastguard Worker 1422*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(z, inflateEnd, 1423*6236dae4SAndroid Build Coastguard Worker dnl libz found, set the variable 1424*6236dae4SAndroid Build Coastguard Worker [ 1425*6236dae4SAndroid Build Coastguard Worker HAVE_LIBZ="1" 1426*6236dae4SAndroid Build Coastguard Worker ZLIB_LIBS="-lz" 1427*6236dae4SAndroid Build Coastguard Worker LIBS="$ZLIB_LIBS $LIBS" 1428*6236dae4SAndroid Build Coastguard Worker ], 1429*6236dae4SAndroid Build Coastguard Worker dnl if no lib found, try /usr/local 1430*6236dae4SAndroid Build Coastguard Worker [ 1431*6236dae4SAndroid Build Coastguard Worker OPT_ZLIB="/usr/local" 1432*6236dae4SAndroid Build Coastguard Worker ] 1433*6236dae4SAndroid Build Coastguard Worker ) 1434*6236dae4SAndroid Build Coastguard Worker fi 1435*6236dae4SAndroid Build Coastguard Worker fi 1436*6236dae4SAndroid Build Coastguard Worker 1437*6236dae4SAndroid Build Coastguard Worker dnl Add a nonempty path to the compiler flags 1438*6236dae4SAndroid Build Coastguard Worker if test -n "$OPT_ZLIB"; then 1439*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include" 1440*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff" 1441*6236dae4SAndroid Build Coastguard Worker fi 1442*6236dae4SAndroid Build Coastguard Worker 1443*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADER(zlib.h, 1444*6236dae4SAndroid Build Coastguard Worker [ 1445*6236dae4SAndroid Build Coastguard Worker dnl zlib.h was found 1446*6236dae4SAndroid Build Coastguard Worker HAVE_ZLIB_H="1" 1447*6236dae4SAndroid Build Coastguard Worker dnl if the lib wasn't found already, try again with the new paths 1448*6236dae4SAndroid Build Coastguard Worker if test "$HAVE_LIBZ" != "1"; then 1449*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(z, gzread, 1450*6236dae4SAndroid Build Coastguard Worker [ 1451*6236dae4SAndroid Build Coastguard Worker dnl the lib was found! 1452*6236dae4SAndroid Build Coastguard Worker HAVE_LIBZ="1" 1453*6236dae4SAndroid Build Coastguard Worker ZLIB_LIBS="-lz" 1454*6236dae4SAndroid Build Coastguard Worker LIBS="$ZLIB_LIBS $LIBS" 1455*6236dae4SAndroid Build Coastguard Worker ], 1456*6236dae4SAndroid Build Coastguard Worker [ 1457*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$clean_CPPFLAGS 1458*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$clean_LDFLAGS 1459*6236dae4SAndroid Build Coastguard Worker ] 1460*6236dae4SAndroid Build Coastguard Worker ) 1461*6236dae4SAndroid Build Coastguard Worker fi 1462*6236dae4SAndroid Build Coastguard Worker ], 1463*6236dae4SAndroid Build Coastguard Worker [ 1464*6236dae4SAndroid Build Coastguard Worker dnl zlib.h was not found, restore the flags 1465*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$clean_CPPFLAGS 1466*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$clean_LDFLAGS] 1467*6236dae4SAndroid Build Coastguard Worker ) 1468*6236dae4SAndroid Build Coastguard Worker 1469*6236dae4SAndroid Build Coastguard Worker if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"; then 1470*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([configure found only the libz lib, not the header file!]) 1471*6236dae4SAndroid Build Coastguard Worker HAVE_LIBZ="" 1472*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$clean_CPPFLAGS 1473*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$clean_LDFLAGS 1474*6236dae4SAndroid Build Coastguard Worker LIBS=$clean_LIBS 1475*6236dae4SAndroid Build Coastguard Worker ZLIB_LIBS="" 1476*6236dae4SAndroid Build Coastguard Worker elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"; then 1477*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([configure found only the libz header file, not the lib!]) 1478*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$clean_CPPFLAGS 1479*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$clean_LDFLAGS 1480*6236dae4SAndroid Build Coastguard Worker LIBS=$clean_LIBS 1481*6236dae4SAndroid Build Coastguard Worker ZLIB_LIBS="" 1482*6236dae4SAndroid Build Coastguard Worker elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"; then 1483*6236dae4SAndroid Build Coastguard Worker dnl both header and lib were found! 1484*6236dae4SAndroid Build Coastguard Worker AC_SUBST(HAVE_LIBZ) 1485*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available]) 1486*6236dae4SAndroid Build Coastguard Worker LIBS="$ZLIB_LIBS $clean_LIBS" 1487*6236dae4SAndroid Build Coastguard Worker 1488*6236dae4SAndroid Build Coastguard Worker dnl replace 'HAVE_LIBZ' in the automake makefile.ams 1489*6236dae4SAndroid Build Coastguard Worker AMFIXLIB="1" 1490*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([found both libz and libz.h header]) 1491*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE zlib" 1492*6236dae4SAndroid Build Coastguard Worker curl_zlib_msg="enabled" 1493*6236dae4SAndroid Build Coastguard Worker fi 1494*6236dae4SAndroid Build Coastguard Workerfi 1495*6236dae4SAndroid Build Coastguard Worker 1496*6236dae4SAndroid Build Coastguard Workerdnl set variable for use in automakefile(s) 1497*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1) 1498*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(ZLIB_LIBS) 1499*6236dae4SAndroid Build Coastguard Worker 1500*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1501*6236dae4SAndroid Build Coastguard Workerdnl Check for the presence of BROTLI decoder libraries and headers 1502*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1503*6236dae4SAndroid Build Coastguard Worker 1504*6236dae4SAndroid Build Coastguard Workerdnl Brotli project home page: https://github.com/google/brotli 1505*6236dae4SAndroid Build Coastguard Worker 1506*6236dae4SAndroid Build Coastguard Workerdnl Default to compiler & linker defaults for BROTLI files & libraries. 1507*6236dae4SAndroid Build Coastguard WorkerOPT_BROTLI=off 1508*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(brotli,dnl 1509*6236dae4SAndroid Build Coastguard WorkerAS_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]) 1510*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-brotli], [disable BROTLI]), 1511*6236dae4SAndroid Build Coastguard Worker OPT_BROTLI=$withval) 1512*6236dae4SAndroid Build Coastguard Worker 1513*6236dae4SAndroid Build Coastguard Workerif test X"$OPT_BROTLI" != Xno; then 1514*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-brotli variables 1515*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 1516*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 1517*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 1518*6236dae4SAndroid Build Coastguard Worker 1519*6236dae4SAndroid Build Coastguard Worker case "$OPT_BROTLI" in 1520*6236dae4SAndroid Build Coastguard Worker yes) 1521*6236dae4SAndroid Build Coastguard Worker dnl --with-brotli (without path) used 1522*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libbrotlidec) 1523*6236dae4SAndroid Build Coastguard Worker 1524*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 1525*6236dae4SAndroid Build Coastguard Worker LIB_BROTLI=`$PKGCONFIG --libs-only-l libbrotlidec` 1526*6236dae4SAndroid Build Coastguard Worker LD_BROTLI=`$PKGCONFIG --libs-only-L libbrotlidec` 1527*6236dae4SAndroid Build Coastguard Worker CPP_BROTLI=`$PKGCONFIG --cflags-only-I libbrotlidec` 1528*6236dae4SAndroid Build Coastguard Worker version=`$PKGCONFIG --modversion libbrotlidec` 1529*6236dae4SAndroid Build Coastguard Worker DIR_BROTLI=`echo $LD_BROTLI | $SED -e 's/^-L//'` 1530*6236dae4SAndroid Build Coastguard Worker fi 1531*6236dae4SAndroid Build Coastguard Worker 1532*6236dae4SAndroid Build Coastguard Worker ;; 1533*6236dae4SAndroid Build Coastguard Worker off) 1534*6236dae4SAndroid Build Coastguard Worker dnl no --with-brotli option given, just check default places 1535*6236dae4SAndroid Build Coastguard Worker ;; 1536*6236dae4SAndroid Build Coastguard Worker *) 1537*6236dae4SAndroid Build Coastguard Worker dnl use the given --with-brotli spot 1538*6236dae4SAndroid Build Coastguard Worker PREFIX_BROTLI=$OPT_BROTLI 1539*6236dae4SAndroid Build Coastguard Worker ;; 1540*6236dae4SAndroid Build Coastguard Worker esac 1541*6236dae4SAndroid Build Coastguard Worker 1542*6236dae4SAndroid Build Coastguard Worker dnl if given with a prefix, we set -L and -I based on that 1543*6236dae4SAndroid Build Coastguard Worker if test -n "$PREFIX_BROTLI"; then 1544*6236dae4SAndroid Build Coastguard Worker LIB_BROTLI="-lbrotlidec" 1545*6236dae4SAndroid Build Coastguard Worker LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff 1546*6236dae4SAndroid Build Coastguard Worker CPP_BROTLI=-I${PREFIX_BROTLI}/include 1547*6236dae4SAndroid Build Coastguard Worker DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff 1548*6236dae4SAndroid Build Coastguard Worker fi 1549*6236dae4SAndroid Build Coastguard Worker 1550*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_BROTLI" 1551*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_BROTLI" 1552*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_BROTLI $LIBS" 1553*6236dae4SAndroid Build Coastguard Worker 1554*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(brotlidec, BrotliDecoderDecompress) 1555*6236dae4SAndroid Build Coastguard Worker 1556*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(brotli/decode.h, 1557*6236dae4SAndroid Build Coastguard Worker curl_brotli_msg="enabled (libbrotlidec)" 1558*6236dae4SAndroid Build Coastguard Worker HAVE_BROTLI=1 1559*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_BROTLI, 1, [if BROTLI is in use]) 1560*6236dae4SAndroid Build Coastguard Worker AC_SUBST(HAVE_BROTLI, [1]) 1561*6236dae4SAndroid Build Coastguard Worker ) 1562*6236dae4SAndroid Build Coastguard Worker 1563*6236dae4SAndroid Build Coastguard Worker if test X"$OPT_BROTLI" != Xoff && 1564*6236dae4SAndroid Build Coastguard Worker test "$HAVE_BROTLI" != "1"; then 1565*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([BROTLI libs and/or directories were not found where specified!]) 1566*6236dae4SAndroid Build Coastguard Worker fi 1567*6236dae4SAndroid Build Coastguard Worker 1568*6236dae4SAndroid Build Coastguard Worker if test "$HAVE_BROTLI" = "1"; then 1569*6236dae4SAndroid Build Coastguard Worker if test -n "$DIR_BROTLI"; then 1570*6236dae4SAndroid Build Coastguard Worker dnl when the brotli shared libs were found in a path that the run-time 1571*6236dae4SAndroid Build Coastguard Worker dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH 1572*6236dae4SAndroid Build Coastguard Worker dnl to prevent further configure tests to fail due to this 1573*6236dae4SAndroid Build Coastguard Worker 1574*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 1575*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_BROTLI" 1576*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 1577*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_BROTLI to CURL_LIBRARY_PATH]) 1578*6236dae4SAndroid Build Coastguard Worker fi 1579*6236dae4SAndroid Build Coastguard Worker fi 1580*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libbrotlidec" 1581*6236dae4SAndroid Build Coastguard Worker else 1582*6236dae4SAndroid Build Coastguard Worker dnl no brotli, revert back to clean variables 1583*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 1584*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 1585*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 1586*6236dae4SAndroid Build Coastguard Worker fi 1587*6236dae4SAndroid Build Coastguard Workerfi 1588*6236dae4SAndroid Build Coastguard Worker 1589*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1590*6236dae4SAndroid Build Coastguard Workerdnl Check for libzstd 1591*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1592*6236dae4SAndroid Build Coastguard Worker 1593*6236dae4SAndroid Build Coastguard Workerdnl Default to compiler & linker defaults for libzstd 1594*6236dae4SAndroid Build Coastguard WorkerOPT_ZSTD=off 1595*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(zstd,dnl 1596*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-zstd=PATH],[Where to look for libzstd, PATH points to the libzstd installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) 1597*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-zstd], [disable libzstd]), 1598*6236dae4SAndroid Build Coastguard Worker OPT_ZSTD=$withval) 1599*6236dae4SAndroid Build Coastguard Worker 1600*6236dae4SAndroid Build Coastguard Workerif test X"$OPT_ZSTD" != Xno; then 1601*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-zstd variables 1602*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 1603*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 1604*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 1605*6236dae4SAndroid Build Coastguard Worker 1606*6236dae4SAndroid Build Coastguard Worker case "$OPT_ZSTD" in 1607*6236dae4SAndroid Build Coastguard Worker yes) 1608*6236dae4SAndroid Build Coastguard Worker dnl --with-zstd (without path) used 1609*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libzstd) 1610*6236dae4SAndroid Build Coastguard Worker 1611*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 1612*6236dae4SAndroid Build Coastguard Worker LIB_ZSTD=`$PKGCONFIG --libs-only-l libzstd` 1613*6236dae4SAndroid Build Coastguard Worker LD_ZSTD=`$PKGCONFIG --libs-only-L libzstd` 1614*6236dae4SAndroid Build Coastguard Worker CPP_ZSTD=`$PKGCONFIG --cflags-only-I libzstd` 1615*6236dae4SAndroid Build Coastguard Worker version=`$PKGCONFIG --modversion libzstd` 1616*6236dae4SAndroid Build Coastguard Worker DIR_ZSTD=`echo $LD_ZSTD | $SED -e 's/-L//'` 1617*6236dae4SAndroid Build Coastguard Worker fi 1618*6236dae4SAndroid Build Coastguard Worker 1619*6236dae4SAndroid Build Coastguard Worker ;; 1620*6236dae4SAndroid Build Coastguard Worker off) 1621*6236dae4SAndroid Build Coastguard Worker dnl no --with-zstd option given, just check default places 1622*6236dae4SAndroid Build Coastguard Worker ;; 1623*6236dae4SAndroid Build Coastguard Worker *) 1624*6236dae4SAndroid Build Coastguard Worker dnl use the given --with-zstd spot 1625*6236dae4SAndroid Build Coastguard Worker PREFIX_ZSTD=$OPT_ZSTD 1626*6236dae4SAndroid Build Coastguard Worker ;; 1627*6236dae4SAndroid Build Coastguard Worker esac 1628*6236dae4SAndroid Build Coastguard Worker 1629*6236dae4SAndroid Build Coastguard Worker dnl if given with a prefix, we set -L and -I based on that 1630*6236dae4SAndroid Build Coastguard Worker if test -n "$PREFIX_ZSTD"; then 1631*6236dae4SAndroid Build Coastguard Worker LIB_ZSTD="-lzstd" 1632*6236dae4SAndroid Build Coastguard Worker LD_ZSTD=-L${PREFIX_ZSTD}/lib$libsuff 1633*6236dae4SAndroid Build Coastguard Worker CPP_ZSTD=-I${PREFIX_ZSTD}/include 1634*6236dae4SAndroid Build Coastguard Worker DIR_ZSTD=${PREFIX_ZSTD}/lib$libsuff 1635*6236dae4SAndroid Build Coastguard Worker fi 1636*6236dae4SAndroid Build Coastguard Worker 1637*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_ZSTD" 1638*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_ZSTD" 1639*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_ZSTD $LIBS" 1640*6236dae4SAndroid Build Coastguard Worker 1641*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(zstd, ZSTD_createDStream) 1642*6236dae4SAndroid Build Coastguard Worker 1643*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(zstd.h, 1644*6236dae4SAndroid Build Coastguard Worker curl_zstd_msg="enabled (libzstd)" 1645*6236dae4SAndroid Build Coastguard Worker HAVE_ZSTD=1 1646*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_ZSTD, 1, [if libzstd is in use]) 1647*6236dae4SAndroid Build Coastguard Worker AC_SUBST(HAVE_ZSTD, [1]) 1648*6236dae4SAndroid Build Coastguard Worker ) 1649*6236dae4SAndroid Build Coastguard Worker 1650*6236dae4SAndroid Build Coastguard Worker if test X"$OPT_ZSTD" != Xoff && 1651*6236dae4SAndroid Build Coastguard Worker test "$HAVE_ZSTD" != "1"; then 1652*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([libzstd was not found where specified!]) 1653*6236dae4SAndroid Build Coastguard Worker fi 1654*6236dae4SAndroid Build Coastguard Worker 1655*6236dae4SAndroid Build Coastguard Worker if test "$HAVE_ZSTD" = "1"; then 1656*6236dae4SAndroid Build Coastguard Worker if test -n "$DIR_ZSTD"; then 1657*6236dae4SAndroid Build Coastguard Worker dnl when the zstd shared lib were found in a path that the run-time 1658*6236dae4SAndroid Build Coastguard Worker dnl linker doesn't search through, we need to add it to 1659*6236dae4SAndroid Build Coastguard Worker dnl CURL_LIBRARY_PATH to prevent further configure tests to fail due to 1660*6236dae4SAndroid Build Coastguard Worker dnl this 1661*6236dae4SAndroid Build Coastguard Worker 1662*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 1663*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_ZSTD" 1664*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 1665*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_ZSTD to CURL_LIBRARY_PATH]) 1666*6236dae4SAndroid Build Coastguard Worker fi 1667*6236dae4SAndroid Build Coastguard Worker fi 1668*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libzstd" 1669*6236dae4SAndroid Build Coastguard Worker else 1670*6236dae4SAndroid Build Coastguard Worker dnl no zstd, revert back to clean variables 1671*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 1672*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 1673*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 1674*6236dae4SAndroid Build Coastguard Worker fi 1675*6236dae4SAndroid Build Coastguard Workerfi 1676*6236dae4SAndroid Build Coastguard Worker 1677*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1678*6236dae4SAndroid Build Coastguard Workerdnl Check for LDAP 1679*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1680*6236dae4SAndroid Build Coastguard Worker 1681*6236dae4SAndroid Build Coastguard WorkerLDAPLIBNAME="" 1682*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(ldap-lib, 1683*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]), 1684*6236dae4SAndroid Build Coastguard Worker [LDAPLIBNAME="$withval"]) 1685*6236dae4SAndroid Build Coastguard Worker 1686*6236dae4SAndroid Build Coastguard WorkerLBERLIBNAME="" 1687*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(lber-lib, 1688*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]), 1689*6236dae4SAndroid Build Coastguard Worker [LBERLIBNAME="$withval"]) 1690*6236dae4SAndroid Build Coastguard Worker 1691*6236dae4SAndroid Build Coastguard Workerif test x$CURL_DISABLE_LDAP != x1; then 1692*6236dae4SAndroid Build Coastguard Worker 1693*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_HEADER_LBER 1694*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_HEADER_LDAP 1695*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_HEADER_LDAP_SSL 1696*6236dae4SAndroid Build Coastguard Worker 1697*6236dae4SAndroid Build Coastguard Worker if test -z "$LDAPLIBNAME"; then 1698*6236dae4SAndroid Build Coastguard Worker if test "$curl_cv_native_windows" = "yes"; then 1699*6236dae4SAndroid Build Coastguard Worker dnl Windows uses a single and unique LDAP library name 1700*6236dae4SAndroid Build Coastguard Worker LDAPLIBNAME="wldap32" 1701*6236dae4SAndroid Build Coastguard Worker LBERLIBNAME="no" 1702*6236dae4SAndroid Build Coastguard Worker fi 1703*6236dae4SAndroid Build Coastguard Worker fi 1704*6236dae4SAndroid Build Coastguard Worker 1705*6236dae4SAndroid Build Coastguard Worker if test "$LDAPLIBNAME"; then 1706*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [ 1707*6236dae4SAndroid Build Coastguard Worker if test -n "$ldap_askedfor"; then 1708*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([couldn't detect the LDAP libraries]) 1709*6236dae4SAndroid Build Coastguard Worker fi 1710*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled]) 1711*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) 1712*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_LDAP, [1]) 1713*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) 1714*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_LDAPS, [1])]) 1715*6236dae4SAndroid Build Coastguard Worker else 1716*6236dae4SAndroid Build Coastguard Worker dnl Try to find the right ldap libraries for this system 1717*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_LIBS_LDAP 1718*6236dae4SAndroid Build Coastguard Worker case X-"$curl_cv_ldap_LIBS" in 1719*6236dae4SAndroid Build Coastguard Worker X-unknown) 1720*6236dae4SAndroid Build Coastguard Worker if test -n "$ldap_askedfor"; then 1721*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([couldn't detect the LDAP libraries]) 1722*6236dae4SAndroid Build Coastguard Worker fi 1723*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled]) 1724*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) 1725*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_LDAP, [1]) 1726*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) 1727*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_LDAPS, [1]) 1728*6236dae4SAndroid Build Coastguard Worker ;; 1729*6236dae4SAndroid Build Coastguard Worker esac 1730*6236dae4SAndroid Build Coastguard Worker fi 1731*6236dae4SAndroid Build Coastguard Workerfi 1732*6236dae4SAndroid Build Coastguard Worker 1733*6236dae4SAndroid Build Coastguard Workerif test x$CURL_DISABLE_LDAP != x1; then 1734*6236dae4SAndroid Build Coastguard Worker 1735*6236dae4SAndroid Build Coastguard Worker if test "$LBERLIBNAME"; then 1736*6236dae4SAndroid Build Coastguard Worker dnl If name is "no" then don't define this library at all 1737*6236dae4SAndroid Build Coastguard Worker dnl (it's only needed if libldap.so's dependencies are broken). 1738*6236dae4SAndroid Build Coastguard Worker if test "$LBERLIBNAME" != "no"; then 1739*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [ 1740*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled]) 1741*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) 1742*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_LDAP, [1]) 1743*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) 1744*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_LDAPS, [1])]) 1745*6236dae4SAndroid Build Coastguard Worker fi 1746*6236dae4SAndroid Build Coastguard Worker fi 1747*6236dae4SAndroid Build Coastguard Workerfi 1748*6236dae4SAndroid Build Coastguard Worker 1749*6236dae4SAndroid Build Coastguard Workerif test x$CURL_DISABLE_LDAP != x1; then 1750*6236dae4SAndroid Build Coastguard Worker AC_CHECK_FUNCS([ldap_url_parse \ 1751*6236dae4SAndroid Build Coastguard Worker ldap_init_fd]) 1752*6236dae4SAndroid Build Coastguard Worker 1753*6236dae4SAndroid Build Coastguard Worker if test "$LDAPLIBNAME" = "wldap32"; then 1754*6236dae4SAndroid Build Coastguard Worker curl_ldap_msg="enabled (winldap)" 1755*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation]) 1756*6236dae4SAndroid Build Coastguard Worker else 1757*6236dae4SAndroid Build Coastguard Worker if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then 1758*6236dae4SAndroid Build Coastguard Worker curl_ldap_msg="enabled (OpenLDAP)" 1759*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code]) 1760*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_OPENLDAP, [1]) 1761*6236dae4SAndroid Build Coastguard Worker else 1762*6236dae4SAndroid Build Coastguard Worker curl_ldap_msg="enabled (ancient OpenLDAP)" 1763*6236dae4SAndroid Build Coastguard Worker fi 1764*6236dae4SAndroid Build Coastguard Worker fi 1765*6236dae4SAndroid Build Coastguard Workerfi 1766*6236dae4SAndroid Build Coastguard Worker 1767*6236dae4SAndroid Build Coastguard Workerif test x$CURL_DISABLE_LDAPS != x1; then 1768*6236dae4SAndroid Build Coastguard Worker curl_ldaps_msg="enabled" 1769*6236dae4SAndroid Build Coastguard Workerfi 1770*6236dae4SAndroid Build Coastguard Worker 1771*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1772*6236dae4SAndroid Build Coastguard Workerdnl Checks for IPv6 1773*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1774*6236dae4SAndroid Build Coastguard Worker 1775*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable IPv6]) 1776*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(ipv6, 1777*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-ipv6],[Enable IPv6 (with IPv4) support]) 1778*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]), 1779*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 1780*6236dae4SAndroid Build Coastguard Worker no) 1781*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1782*6236dae4SAndroid Build Coastguard Worker ipv6=no 1783*6236dae4SAndroid Build Coastguard Worker ;; 1784*6236dae4SAndroid Build Coastguard Worker *) 1785*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1786*6236dae4SAndroid Build Coastguard Worker ipv6=yes 1787*6236dae4SAndroid Build Coastguard Worker ;; 1788*6236dae4SAndroid Build Coastguard Worker esac ], 1789*6236dae4SAndroid Build Coastguard Worker 1790*6236dae4SAndroid Build Coastguard Worker AC_RUN_IFELSE([AC_LANG_SOURCE([[ 1791*6236dae4SAndroid Build Coastguard Worker /* are AF_INET6 and sockaddr_in6 available? */ 1792*6236dae4SAndroid Build Coastguard Worker #include <sys/types.h> 1793*6236dae4SAndroid Build Coastguard Worker #ifdef _WIN32 1794*6236dae4SAndroid Build Coastguard Worker #include <winsock2.h> 1795*6236dae4SAndroid Build Coastguard Worker #include <ws2tcpip.h> 1796*6236dae4SAndroid Build Coastguard Worker #else 1797*6236dae4SAndroid Build Coastguard Worker #include <sys/socket.h> 1798*6236dae4SAndroid Build Coastguard Worker #include <netinet/in.h> 1799*6236dae4SAndroid Build Coastguard Worker #if defined (__TANDEM) 1800*6236dae4SAndroid Build Coastguard Worker # include <netinet/in6.h> 1801*6236dae4SAndroid Build Coastguard Worker #endif 1802*6236dae4SAndroid Build Coastguard Worker #endif 1803*6236dae4SAndroid Build Coastguard Worker 1804*6236dae4SAndroid Build Coastguard Worker int main(void) 1805*6236dae4SAndroid Build Coastguard Worker { 1806*6236dae4SAndroid Build Coastguard Worker struct sockaddr_in6 s; 1807*6236dae4SAndroid Build Coastguard Worker (void)s; 1808*6236dae4SAndroid Build Coastguard Worker return socket(AF_INET6, SOCK_STREAM, 0) < 0; 1809*6236dae4SAndroid Build Coastguard Worker } 1810*6236dae4SAndroid Build Coastguard Worker ]]) 1811*6236dae4SAndroid Build Coastguard Worker ], 1812*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1813*6236dae4SAndroid Build Coastguard Worker ipv6=yes, 1814*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1815*6236dae4SAndroid Build Coastguard Worker ipv6=no, 1816*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1817*6236dae4SAndroid Build Coastguard Worker ipv6=yes 1818*6236dae4SAndroid Build Coastguard Worker)) 1819*6236dae4SAndroid Build Coastguard Worker 1820*6236dae4SAndroid Build Coastguard Workerif test "$ipv6" = yes; then 1821*6236dae4SAndroid Build Coastguard Worker curl_ipv6_msg="enabled" 1822*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_IPV6, 1, [Define if you want to enable IPv6 support]) 1823*6236dae4SAndroid Build Coastguard Worker IPV6_ENABLED=1 1824*6236dae4SAndroid Build Coastguard Worker AC_SUBST(IPV6_ENABLED) 1825*6236dae4SAndroid Build Coastguard Worker 1826*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member]) 1827*6236dae4SAndroid Build Coastguard Worker AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ 1828*6236dae4SAndroid Build Coastguard Worker #include <sys/types.h> 1829*6236dae4SAndroid Build Coastguard Worker #ifdef _WIN32 1830*6236dae4SAndroid Build Coastguard Worker #include <winsock2.h> 1831*6236dae4SAndroid Build Coastguard Worker #include <ws2tcpip.h> 1832*6236dae4SAndroid Build Coastguard Worker #else 1833*6236dae4SAndroid Build Coastguard Worker #include <netinet/in.h> 1834*6236dae4SAndroid Build Coastguard Worker #if defined (__TANDEM) 1835*6236dae4SAndroid Build Coastguard Worker # include <netinet/in6.h> 1836*6236dae4SAndroid Build Coastguard Worker #endif 1837*6236dae4SAndroid Build Coastguard Worker #endif 1838*6236dae4SAndroid Build Coastguard Worker ]], [[ 1839*6236dae4SAndroid Build Coastguard Worker struct sockaddr_in6 s; 1840*6236dae4SAndroid Build Coastguard Worker s.sin6_scope_id = 0; 1841*6236dae4SAndroid Build Coastguard Worker ]])], [ 1842*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 1843*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member]) 1844*6236dae4SAndroid Build Coastguard Worker ], [ 1845*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 1846*6236dae4SAndroid Build Coastguard Worker ]) 1847*6236dae4SAndroid Build Coastguard Workerfi 1848*6236dae4SAndroid Build Coastguard Worker 1849*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1850*6236dae4SAndroid Build Coastguard Workerdnl Check if the operating system allows programs to write to their own argv[] 1851*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1852*6236dae4SAndroid Build Coastguard Worker 1853*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([if argv can be written to]) 1854*6236dae4SAndroid Build Coastguard WorkerCURL_RUN_IFELSE([[ 1855*6236dae4SAndroid Build Coastguard Workerint main(int argc, char **argv) 1856*6236dae4SAndroid Build Coastguard Worker{ 1857*6236dae4SAndroid Build Coastguard Worker#ifdef _WIN32 1858*6236dae4SAndroid Build Coastguard Worker /* on Windows, writing to the argv does not hide the argument in 1859*6236dae4SAndroid Build Coastguard Worker process lists so it can just be skipped */ 1860*6236dae4SAndroid Build Coastguard Worker (void)argc; 1861*6236dae4SAndroid Build Coastguard Worker (void)argv; 1862*6236dae4SAndroid Build Coastguard Worker return 1; 1863*6236dae4SAndroid Build Coastguard Worker#else 1864*6236dae4SAndroid Build Coastguard Worker (void)argc; 1865*6236dae4SAndroid Build Coastguard Worker argv[0][0] = ' '; 1866*6236dae4SAndroid Build Coastguard Worker return (argv[0][0] == ' ')?0:1; 1867*6236dae4SAndroid Build Coastguard Worker#endif 1868*6236dae4SAndroid Build Coastguard Worker} 1869*6236dae4SAndroid Build Coastguard Worker]],[ 1870*6236dae4SAndroid Build Coastguard Worker curl_cv_writable_argv=yes 1871*6236dae4SAndroid Build Coastguard Worker],[ 1872*6236dae4SAndroid Build Coastguard Worker curl_cv_writable_argv=no 1873*6236dae4SAndroid Build Coastguard Worker],[ 1874*6236dae4SAndroid Build Coastguard Worker curl_cv_writable_argv=cross 1875*6236dae4SAndroid Build Coastguard Worker]) 1876*6236dae4SAndroid Build Coastguard Workercase $curl_cv_writable_argv in 1877*6236dae4SAndroid Build Coastguard Worker yes) 1878*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv]) 1879*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1880*6236dae4SAndroid Build Coastguard Worker ;; 1881*6236dae4SAndroid Build Coastguard Worker no) 1882*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1883*6236dae4SAndroid Build Coastguard Worker ;; 1884*6236dae4SAndroid Build Coastguard Worker *) 1885*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 1886*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([the previous check could not be made default was used]) 1887*6236dae4SAndroid Build Coastguard Worker ;; 1888*6236dae4SAndroid Build Coastguard Workeresac 1889*6236dae4SAndroid Build Coastguard Worker 1890*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1891*6236dae4SAndroid Build Coastguard Workerdnl Check for GSS-API libraries 1892*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 1893*6236dae4SAndroid Build Coastguard Worker 1894*6236dae4SAndroid Build Coastguard Workerdnl check for GSS-API stuff in the /usr as default 1895*6236dae4SAndroid Build Coastguard Worker 1896*6236dae4SAndroid Build Coastguard WorkerGSSAPI_ROOT="/usr" 1897*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(gssapi-includes, 1898*6236dae4SAndroid Build Coastguard Worker AS_HELP_STRING([--with-gssapi-includes=DIR], [Specify location of GSS-API headers]), [ 1899*6236dae4SAndroid Build Coastguard Worker GSSAPI_INCS="-I$withval" 1900*6236dae4SAndroid Build Coastguard Worker want_gss="yes" 1901*6236dae4SAndroid Build Coastguard Worker ] 1902*6236dae4SAndroid Build Coastguard Worker) 1903*6236dae4SAndroid Build Coastguard Worker 1904*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(gssapi-libs, 1905*6236dae4SAndroid Build Coastguard Worker AS_HELP_STRING([--with-gssapi-libs=DIR], [Specify location of GSS-API libs]), [ 1906*6236dae4SAndroid Build Coastguard Worker GSSAPI_LIB_DIR="-L$withval" 1907*6236dae4SAndroid Build Coastguard Worker want_gss="yes" 1908*6236dae4SAndroid Build Coastguard Worker ] 1909*6236dae4SAndroid Build Coastguard Worker) 1910*6236dae4SAndroid Build Coastguard Worker 1911*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(gssapi, 1912*6236dae4SAndroid Build Coastguard Worker AS_HELP_STRING([--with-gssapi=DIR], [Where to look for GSS-API]), [ 1913*6236dae4SAndroid Build Coastguard Worker GSSAPI_ROOT="$withval" 1914*6236dae4SAndroid Build Coastguard Worker if test x"$GSSAPI_ROOT" != xno; then 1915*6236dae4SAndroid Build Coastguard Worker want_gss="yes" 1916*6236dae4SAndroid Build Coastguard Worker if test x"$GSSAPI_ROOT" = xyes; then 1917*6236dae4SAndroid Build Coastguard Worker dnl if yes, then use default root 1918*6236dae4SAndroid Build Coastguard Worker GSSAPI_ROOT="/usr" 1919*6236dae4SAndroid Build Coastguard Worker fi 1920*6236dae4SAndroid Build Coastguard Worker fi 1921*6236dae4SAndroid Build Coastguard Worker ] 1922*6236dae4SAndroid Build Coastguard Worker) 1923*6236dae4SAndroid Build Coastguard Worker 1924*6236dae4SAndroid Build Coastguard Worker: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"} 1925*6236dae4SAndroid Build Coastguard Worker 1926*6236dae4SAndroid Build Coastguard Workersave_CPPFLAGS="$CPPFLAGS" 1927*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([if GSS-API support is requested]) 1928*6236dae4SAndroid Build Coastguard Workerif test x"$want_gss" = xyes; then 1929*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 1930*6236dae4SAndroid Build Coastguard Worker 1931*6236dae4SAndroid Build Coastguard Worker if test $GSSAPI_ROOT != "/usr"; then 1932*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig) 1933*6236dae4SAndroid Build Coastguard Worker else 1934*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(mit-krb5-gssapi) 1935*6236dae4SAndroid Build Coastguard Worker fi 1936*6236dae4SAndroid Build Coastguard Worker if test -z "$GSSAPI_INCS"; then 1937*6236dae4SAndroid Build Coastguard Worker if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then 1938*6236dae4SAndroid Build Coastguard Worker GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi` 1939*6236dae4SAndroid Build Coastguard Worker elif test "$PKGCONFIG" != "no"; then 1940*6236dae4SAndroid Build Coastguard Worker GSSAPI_INCS=`$PKGCONFIG --cflags mit-krb5-gssapi` 1941*6236dae4SAndroid Build Coastguard Worker elif test -f "$KRB5CONFIG"; then 1942*6236dae4SAndroid Build Coastguard Worker GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi` 1943*6236dae4SAndroid Build Coastguard Worker elif test "$GSSAPI_ROOT" != "yes"; then 1944*6236dae4SAndroid Build Coastguard Worker GSSAPI_INCS="-I$GSSAPI_ROOT/include" 1945*6236dae4SAndroid Build Coastguard Worker fi 1946*6236dae4SAndroid Build Coastguard Worker fi 1947*6236dae4SAndroid Build Coastguard Worker 1948*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $GSSAPI_INCS" 1949*6236dae4SAndroid Build Coastguard Worker 1950*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADER(gss.h, 1951*6236dae4SAndroid Build Coastguard Worker [ 1952*6236dae4SAndroid Build Coastguard Worker dnl found in the given dirs 1953*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_GSSGNU, 1, [if you have GNU GSS]) 1954*6236dae4SAndroid Build Coastguard Worker gnu_gss=yes 1955*6236dae4SAndroid Build Coastguard Worker ], 1956*6236dae4SAndroid Build Coastguard Worker [ 1957*6236dae4SAndroid Build Coastguard Worker dnl not found, check Heimdal or MIT 1958*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1]) 1959*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS( 1960*6236dae4SAndroid Build Coastguard Worker [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h], 1961*6236dae4SAndroid Build Coastguard Worker [], 1962*6236dae4SAndroid Build Coastguard Worker [not_mit=1], 1963*6236dae4SAndroid Build Coastguard Worker [ 1964*6236dae4SAndroid Build Coastguard Worker AC_INCLUDES_DEFAULT 1965*6236dae4SAndroid Build Coastguard Worker #ifdef HAVE_GSSAPI_GSSAPI_H 1966*6236dae4SAndroid Build Coastguard Worker #include <gssapi/gssapi.h> 1967*6236dae4SAndroid Build Coastguard Worker #endif 1968*6236dae4SAndroid Build Coastguard Worker ]) 1969*6236dae4SAndroid Build Coastguard Worker if test "x$not_mit" = "x1"; then 1970*6236dae4SAndroid Build Coastguard Worker dnl MIT not found, check for Heimdal 1971*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADER(gssapi.h, 1972*6236dae4SAndroid Build Coastguard Worker [], 1973*6236dae4SAndroid Build Coastguard Worker [ 1974*6236dae4SAndroid Build Coastguard Worker dnl no header found, disabling GSS 1975*6236dae4SAndroid Build Coastguard Worker want_gss=no 1976*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN(disabling GSS-API support since no header files were found) 1977*6236dae4SAndroid Build Coastguard Worker ] 1978*6236dae4SAndroid Build Coastguard Worker ) 1979*6236dae4SAndroid Build Coastguard Worker else 1980*6236dae4SAndroid Build Coastguard Worker dnl MIT found 1981*6236dae4SAndroid Build Coastguard Worker dnl check if we have a really old MIT Kerberos version (<= 1.2) 1982*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE]) 1983*6236dae4SAndroid Build Coastguard Worker AC_COMPILE_IFELSE([ 1984*6236dae4SAndroid Build Coastguard Worker AC_LANG_PROGRAM([[ 1985*6236dae4SAndroid Build Coastguard Worker #include <gssapi/gssapi.h> 1986*6236dae4SAndroid Build Coastguard Worker #include <gssapi/gssapi_generic.h> 1987*6236dae4SAndroid Build Coastguard Worker #include <gssapi/gssapi_krb5.h> 1988*6236dae4SAndroid Build Coastguard Worker ]],[[ 1989*6236dae4SAndroid Build Coastguard Worker gss_import_name( 1990*6236dae4SAndroid Build Coastguard Worker (OM_uint32 *)0, 1991*6236dae4SAndroid Build Coastguard Worker (gss_buffer_t)0, 1992*6236dae4SAndroid Build Coastguard Worker GSS_C_NT_HOSTBASED_SERVICE, 1993*6236dae4SAndroid Build Coastguard Worker (gss_name_t *)0); 1994*6236dae4SAndroid Build Coastguard Worker ]]) 1995*6236dae4SAndroid Build Coastguard Worker ],[ 1996*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 1997*6236dae4SAndroid Build Coastguard Worker ],[ 1998*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 1999*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_OLD_GSSMIT, 1, 2000*6236dae4SAndroid Build Coastguard Worker [if you have an old MIT Kerberos version, lacking GSS_C_NT_HOSTBASED_SERVICE]) 2001*6236dae4SAndroid Build Coastguard Worker ]) 2002*6236dae4SAndroid Build Coastguard Worker fi 2003*6236dae4SAndroid Build Coastguard Worker ] 2004*6236dae4SAndroid Build Coastguard Worker ) 2005*6236dae4SAndroid Build Coastguard Workerelse 2006*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 2007*6236dae4SAndroid Build Coastguard Workerfi 2008*6236dae4SAndroid Build Coastguard Workerif test x"$want_gss" = xyes; then 2009*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_GSSAPI, 1, [if you have GSS-API libraries]) 2010*6236dae4SAndroid Build Coastguard Worker HAVE_GSSAPI=1 2011*6236dae4SAndroid Build Coastguard Worker curl_gss_msg="enabled (MIT Kerberos/Heimdal)" 2012*6236dae4SAndroid Build Coastguard Worker 2013*6236dae4SAndroid Build Coastguard Worker if test -n "$gnu_gss"; then 2014*6236dae4SAndroid Build Coastguard Worker curl_gss_msg="enabled (GNU GSS)" 2015*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" 2016*6236dae4SAndroid Build Coastguard Worker LIBS="-lgss $LIBS" 2017*6236dae4SAndroid Build Coastguard Worker elif test -z "$GSSAPI_LIB_DIR"; then 2018*6236dae4SAndroid Build Coastguard Worker case $host in 2019*6236dae4SAndroid Build Coastguard Worker *-apple-*) 2020*6236dae4SAndroid Build Coastguard Worker LIBS="-lgssapi_krb5 -lresolv $LIBS" 2021*6236dae4SAndroid Build Coastguard Worker ;; 2022*6236dae4SAndroid Build Coastguard Worker *) 2023*6236dae4SAndroid Build Coastguard Worker if test $GSSAPI_ROOT != "/usr"; then 2024*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig) 2025*6236dae4SAndroid Build Coastguard Worker else 2026*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(mit-krb5-gssapi) 2027*6236dae4SAndroid Build Coastguard Worker fi 2028*6236dae4SAndroid Build Coastguard Worker if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then 2029*6236dae4SAndroid Build Coastguard Worker dnl krb5-config doesn't have --libs-only-L or similar, put everything 2030*6236dae4SAndroid Build Coastguard Worker dnl into LIBS 2031*6236dae4SAndroid Build Coastguard Worker gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi` 2032*6236dae4SAndroid Build Coastguard Worker LIBS="$gss_libs $LIBS" 2033*6236dae4SAndroid Build Coastguard Worker elif test "$PKGCONFIG" != "no"; then 2034*6236dae4SAndroid Build Coastguard Worker gss_libs=`$PKGCONFIG --libs mit-krb5-gssapi` 2035*6236dae4SAndroid Build Coastguard Worker LIBS="$gss_libs $LIBS" 2036*6236dae4SAndroid Build Coastguard Worker elif test -f "$KRB5CONFIG"; then 2037*6236dae4SAndroid Build Coastguard Worker dnl krb5-config doesn't have --libs-only-L or similar, put everything 2038*6236dae4SAndroid Build Coastguard Worker dnl into LIBS 2039*6236dae4SAndroid Build Coastguard Worker gss_libs=`$KRB5CONFIG --libs gssapi` 2040*6236dae4SAndroid Build Coastguard Worker LIBS="$gss_libs $LIBS" 2041*6236dae4SAndroid Build Coastguard Worker else 2042*6236dae4SAndroid Build Coastguard Worker case $host in 2043*6236dae4SAndroid Build Coastguard Worker *-hp-hpux*) 2044*6236dae4SAndroid Build Coastguard Worker gss_libname="gss" 2045*6236dae4SAndroid Build Coastguard Worker ;; 2046*6236dae4SAndroid Build Coastguard Worker *) 2047*6236dae4SAndroid Build Coastguard Worker gss_libname="gssapi" 2048*6236dae4SAndroid Build Coastguard Worker ;; 2049*6236dae4SAndroid Build Coastguard Worker esac 2050*6236dae4SAndroid Build Coastguard Worker 2051*6236dae4SAndroid Build Coastguard Worker if test "$GSSAPI_ROOT" != "yes"; then 2052*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff" 2053*6236dae4SAndroid Build Coastguard Worker LIBS="-l$gss_libname $LIBS" 2054*6236dae4SAndroid Build Coastguard Worker else 2055*6236dae4SAndroid Build Coastguard Worker LIBS="-l$gss_libname $LIBS" 2056*6236dae4SAndroid Build Coastguard Worker fi 2057*6236dae4SAndroid Build Coastguard Worker fi 2058*6236dae4SAndroid Build Coastguard Worker ;; 2059*6236dae4SAndroid Build Coastguard Worker esac 2060*6236dae4SAndroid Build Coastguard Worker else 2061*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" 2062*6236dae4SAndroid Build Coastguard Worker case $host in 2063*6236dae4SAndroid Build Coastguard Worker *-hp-hpux*) 2064*6236dae4SAndroid Build Coastguard Worker LIBS="-lgss $LIBS" 2065*6236dae4SAndroid Build Coastguard Worker ;; 2066*6236dae4SAndroid Build Coastguard Worker *) 2067*6236dae4SAndroid Build Coastguard Worker LIBS="-lgssapi $LIBS" 2068*6236dae4SAndroid Build Coastguard Worker ;; 2069*6236dae4SAndroid Build Coastguard Worker esac 2070*6236dae4SAndroid Build Coastguard Worker fi 2071*6236dae4SAndroid Build Coastguard Worker if test -n "$gnu_gss"; then 2072*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE gss" 2073*6236dae4SAndroid Build Coastguard Worker elif test "x$not_mit" = "x1"; then 2074*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE heimdal-gssapi" 2075*6236dae4SAndroid Build Coastguard Worker else 2076*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE mit-krb5-gssapi" 2077*6236dae4SAndroid Build Coastguard Worker fi 2078*6236dae4SAndroid Build Coastguard Workerelse 2079*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$save_CPPFLAGS" 2080*6236dae4SAndroid Build Coastguard Workerfi 2081*6236dae4SAndroid Build Coastguard Worker 2082*6236dae4SAndroid Build Coastguard Workerif test x"$want_gss" = xyes; then 2083*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([if we can link against GSS-API library]) 2084*6236dae4SAndroid Build Coastguard Worker AC_LINK_IFELSE([ 2085*6236dae4SAndroid Build Coastguard Worker AC_LANG_FUNC_LINK_TRY([gss_init_sec_context]) 2086*6236dae4SAndroid Build Coastguard Worker ],[ 2087*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2088*6236dae4SAndroid Build Coastguard Worker ],[ 2089*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2090*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-gssapi was specified, but a GSS-API library was not found.]) 2091*6236dae4SAndroid Build Coastguard Worker ]) 2092*6236dae4SAndroid Build Coastguard Workerfi 2093*6236dae4SAndroid Build Coastguard Worker 2094*6236dae4SAndroid Build Coastguard Workerbuild_libstubgss=no 2095*6236dae4SAndroid Build Coastguard Workerif test x"$want_gss" = "xyes"; then 2096*6236dae4SAndroid Build Coastguard Worker build_libstubgss=yes 2097*6236dae4SAndroid Build Coastguard Workerfi 2098*6236dae4SAndroid Build Coastguard Worker 2099*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL(BUILD_STUB_GSS, test "x$build_libstubgss" = "xyes") 2100*6236dae4SAndroid Build Coastguard Worker 2101*6236dae4SAndroid Build Coastguard Workerdnl ------------------------------------------------------------- 2102*6236dae4SAndroid Build Coastguard Workerdnl parse --with-default-ssl-backend so it can be validated below 2103*6236dae4SAndroid Build Coastguard Workerdnl ------------------------------------------------------------- 2104*6236dae4SAndroid Build Coastguard Worker 2105*6236dae4SAndroid Build Coastguard WorkerDEFAULT_SSL_BACKEND=no 2106*6236dae4SAndroid Build Coastguard WorkerVALID_DEFAULT_SSL_BACKEND= 2107*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(default-ssl-backend, 2108*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-default-ssl-backend=NAME],[Use NAME as default SSL backend]) 2109*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-default-ssl-backend],[Use implicit default SSL backend]), 2110*6236dae4SAndroid Build Coastguard Worker [DEFAULT_SSL_BACKEND=$withval]) 2111*6236dae4SAndroid Build Coastguard Workercase "$DEFAULT_SSL_BACKEND" in 2112*6236dae4SAndroid Build Coastguard Worker no) 2113*6236dae4SAndroid Build Coastguard Worker dnl --without-default-ssl-backend option used 2114*6236dae4SAndroid Build Coastguard Worker ;; 2115*6236dae4SAndroid Build Coastguard Worker default|yes) 2116*6236dae4SAndroid Build Coastguard Worker dnl --with-default-ssl-backend option used without name 2117*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([The name of the default SSL backend is required.]) 2118*6236dae4SAndroid Build Coastguard Worker ;; 2119*6236dae4SAndroid Build Coastguard Worker *) 2120*6236dae4SAndroid Build Coastguard Worker dnl --with-default-ssl-backend option used with name 2121*6236dae4SAndroid Build Coastguard Worker AC_SUBST(DEFAULT_SSL_BACKEND) 2122*6236dae4SAndroid Build Coastguard Worker dnl needs to be validated below 2123*6236dae4SAndroid Build Coastguard Worker VALID_DEFAULT_SSL_BACKEND=no 2124*6236dae4SAndroid Build Coastguard Worker ;; 2125*6236dae4SAndroid Build Coastguard Workeresac 2126*6236dae4SAndroid Build Coastguard Worker 2127*6236dae4SAndroid Build Coastguard WorkerCURL_WITH_SCHANNEL 2128*6236dae4SAndroid Build Coastguard WorkerCURL_WITH_SECURETRANSPORT 2129*6236dae4SAndroid Build Coastguard WorkerCURL_WITH_AMISSL 2130*6236dae4SAndroid Build Coastguard WorkerCURL_WITH_OPENSSL 2131*6236dae4SAndroid Build Coastguard WorkerCURL_WITH_GNUTLS 2132*6236dae4SAndroid Build Coastguard WorkerCURL_WITH_MBEDTLS 2133*6236dae4SAndroid Build Coastguard WorkerCURL_WITH_WOLFSSL 2134*6236dae4SAndroid Build Coastguard WorkerCURL_WITH_BEARSSL 2135*6236dae4SAndroid Build Coastguard WorkerCURL_WITH_RUSTLS 2136*6236dae4SAndroid Build Coastguard Worker 2137*6236dae4SAndroid Build Coastguard Workerdnl link required libraries for USE_WIN32_CRYPTO or USE_SCHANNEL 2138*6236dae4SAndroid Build Coastguard Workerif test "x$USE_WIN32_CRYPTO" = "x1" -o "x$USE_SCHANNEL" = "x1"; then 2139*6236dae4SAndroid Build Coastguard Worker LIBS="-ladvapi32 -lcrypt32 $LIBS" 2140*6236dae4SAndroid Build Coastguard Workerfi 2141*6236dae4SAndroid Build Coastguard Worker 2142*6236dae4SAndroid Build Coastguard Workerdnl link bcrypt for BCryptGenRandom() (used when building for Vista or newer) 2143*6236dae4SAndroid Build Coastguard Workerif test "x$curl_cv_native_windows" = "xyes"; then 2144*6236dae4SAndroid Build Coastguard Worker LIBS="-lbcrypt $LIBS" 2145*6236dae4SAndroid Build Coastguard Workerfi 2146*6236dae4SAndroid Build Coastguard Worker 2147*6236dae4SAndroid Build Coastguard Workercase "x$SSL_DISABLED$OPENSSL_ENABLED$GNUTLS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED" in 2148*6236dae4SAndroid Build Coastguard Worker x) 2149*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([TLS not detected, you will not be able to use HTTPS, FTPS, NTLM and more. 2150*6236dae4SAndroid Build Coastguard WorkerUse --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this.]) 2151*6236dae4SAndroid Build Coastguard Worker ;; 2152*6236dae4SAndroid Build Coastguard Worker x1) 2153*6236dae4SAndroid Build Coastguard Worker # one SSL backend is enabled 2154*6236dae4SAndroid Build Coastguard Worker AC_SUBST(SSL_ENABLED) 2155*6236dae4SAndroid Build Coastguard Worker SSL_ENABLED="1" 2156*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([built with one SSL backend]) 2157*6236dae4SAndroid Build Coastguard Worker ;; 2158*6236dae4SAndroid Build Coastguard Worker xD) 2159*6236dae4SAndroid Build Coastguard Worker # explicitly built without TLS 2160*6236dae4SAndroid Build Coastguard Worker ;; 2161*6236dae4SAndroid Build Coastguard Worker xD*) 2162*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--without-ssl has been set together with an explicit option to use an ssl library 2163*6236dae4SAndroid Build Coastguard Worker(e.g. --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl, --with-rustls). 2164*6236dae4SAndroid Build Coastguard WorkerSince these are conflicting parameters, verify which is the desired one and drop the other.]) 2165*6236dae4SAndroid Build Coastguard Worker ;; 2166*6236dae4SAndroid Build Coastguard Worker *) 2167*6236dae4SAndroid Build Coastguard Worker # more than one SSL backend is enabled 2168*6236dae4SAndroid Build Coastguard Worker AC_SUBST(SSL_ENABLED) 2169*6236dae4SAndroid Build Coastguard Worker SSL_ENABLED="1" 2170*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_WITH_MULTI_SSL) 2171*6236dae4SAndroid Build Coastguard Worker CURL_WITH_MULTI_SSL="1" 2172*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_WITH_MULTI_SSL, 1, [built with multiple SSL backends]) 2173*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([built with multiple SSL backends]) 2174*6236dae4SAndroid Build Coastguard Worker ;; 2175*6236dae4SAndroid Build Coastguard Workeresac 2176*6236dae4SAndroid Build Coastguard Worker 2177*6236dae4SAndroid Build Coastguard Workerif test -n "$ssl_backends"; then 2178*6236dae4SAndroid Build Coastguard Worker curl_ssl_msg="enabled ($ssl_backends)" 2179*6236dae4SAndroid Build Coastguard Workerfi 2180*6236dae4SAndroid Build Coastguard Worker 2181*6236dae4SAndroid Build Coastguard Workerif test no = "$VALID_DEFAULT_SSL_BACKEND"; then 2182*6236dae4SAndroid Build Coastguard Worker if test -n "$SSL_ENABLED"; then 2183*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([Default SSL backend $DEFAULT_SSL_BACKEND not enabled!]) 2184*6236dae4SAndroid Build Coastguard Worker else 2185*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([Default SSL backend requires SSL!]) 2186*6236dae4SAndroid Build Coastguard Worker fi 2187*6236dae4SAndroid Build Coastguard Workerelif test yes = "$VALID_DEFAULT_SSL_BACKEND"; then 2188*6236dae4SAndroid Build Coastguard Worker AC_DEFINE_UNQUOTED([CURL_DEFAULT_SSL_BACKEND], ["$DEFAULT_SSL_BACKEND"], [Default SSL backend]) 2189*6236dae4SAndroid Build Coastguard Workerfi 2190*6236dae4SAndroid Build Coastguard Worker 2191*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2192*6236dae4SAndroid Build Coastguard Workerdnl Check for the CA bundle 2193*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2194*6236dae4SAndroid Build Coastguard Worker 2195*6236dae4SAndroid Build Coastguard Workerif test -n "$check_for_ca_bundle"; then 2196*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_CA_BUNDLE 2197*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_CA_EMBED 2198*6236dae4SAndroid Build Coastguard Workerfi 2199*6236dae4SAndroid Build Coastguard Worker 2200*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL(CURL_CA_EMBED_SET, test "x$CURL_CA_EMBED" != "x") 2201*6236dae4SAndroid Build Coastguard Worker 2202*6236dae4SAndroid Build Coastguard Workerdnl ---------------------- 2203*6236dae4SAndroid Build Coastguard Workerdnl check unsafe CA search 2204*6236dae4SAndroid Build Coastguard Workerdnl ---------------------- 2205*6236dae4SAndroid Build Coastguard Worker 2206*6236dae4SAndroid Build Coastguard Workerif test "$curl_cv_native_windows" = "yes"; then 2207*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to enable unsafe CA bundle search in PATH on Windows]) 2208*6236dae4SAndroid Build Coastguard Worker AC_ARG_ENABLE(ca-search, 2209*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-ca-search],[Enable unsafe CA bundle search in PATH on Windows (default)]) 2210*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-ca-search],[Disable unsafe CA bundle search in PATH on Windows]), 2211*6236dae4SAndroid Build Coastguard Worker [ case "$enableval" in 2212*6236dae4SAndroid Build Coastguard Worker no) 2213*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2214*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_CA_SEARCH, 1, [If unsafe CA bundle search in PATH on Windows is disabled]) 2215*6236dae4SAndroid Build Coastguard Worker ;; 2216*6236dae4SAndroid Build Coastguard Worker *) 2217*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2218*6236dae4SAndroid Build Coastguard Worker ;; 2219*6236dae4SAndroid Build Coastguard Worker esac ], 2220*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2221*6236dae4SAndroid Build Coastguard Worker ) 2222*6236dae4SAndroid Build Coastguard Workerfi 2223*6236dae4SAndroid Build Coastguard Worker 2224*6236dae4SAndroid Build Coastguard Workerdnl -------------------- 2225*6236dae4SAndroid Build Coastguard Workerdnl check safe CA search 2226*6236dae4SAndroid Build Coastguard Workerdnl -------------------- 2227*6236dae4SAndroid Build Coastguard Worker 2228*6236dae4SAndroid Build Coastguard Workerif test "$curl_cv_native_windows" = "yes"; then 2229*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to enable safe CA bundle search (within the curl tool directory) on Windows]) 2230*6236dae4SAndroid Build Coastguard Worker AC_ARG_ENABLE(ca-search-safe, 2231*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-ca-search-safe],[Enable safe CA bundle search]) 2232*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-ca-search-safe],[Disable safe CA bundle search (default)]), 2233*6236dae4SAndroid Build Coastguard Worker [ case "$enableval" in 2234*6236dae4SAndroid Build Coastguard Worker yes) 2235*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2236*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_CA_SEARCH_SAFE, 1, [If safe CA bundle search is enabled]) 2237*6236dae4SAndroid Build Coastguard Worker ;; 2238*6236dae4SAndroid Build Coastguard Worker *) 2239*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2240*6236dae4SAndroid Build Coastguard Worker ;; 2241*6236dae4SAndroid Build Coastguard Worker esac ], 2242*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2243*6236dae4SAndroid Build Coastguard Worker ) 2244*6236dae4SAndroid Build Coastguard Workerfi 2245*6236dae4SAndroid Build Coastguard Worker 2246*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2247*6236dae4SAndroid Build Coastguard Workerdnl Check for libpsl 2248*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2249*6236dae4SAndroid Build Coastguard Worker 2250*6236dae4SAndroid Build Coastguard Workerdnl Default to compiler & linker defaults for LIBPSL files & libraries. 2251*6236dae4SAndroid Build Coastguard WorkerOPT_LIBPSL=off 2252*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(libpsl,dnl 2253*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-libpsl=PATH],[Where to look for libpsl, PATH points to the LIBPSL installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) 2254*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-libpsl], [disable LIBPSL]), 2255*6236dae4SAndroid Build Coastguard Worker OPT_LIBPSL=$withval) 2256*6236dae4SAndroid Build Coastguard Worker 2257*6236dae4SAndroid Build Coastguard Workerif test X"$OPT_LIBPSL" != Xno; then 2258*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-libpsl variables 2259*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 2260*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 2261*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 2262*6236dae4SAndroid Build Coastguard Worker 2263*6236dae4SAndroid Build Coastguard Worker case "$OPT_LIBPSL" in 2264*6236dae4SAndroid Build Coastguard Worker yes|off) 2265*6236dae4SAndroid Build Coastguard Worker dnl --with-libpsl (without path) used 2266*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libpsl) 2267*6236dae4SAndroid Build Coastguard Worker 2268*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 2269*6236dae4SAndroid Build Coastguard Worker LIB_PSL=`$PKGCONFIG --libs-only-l libpsl` 2270*6236dae4SAndroid Build Coastguard Worker LD_PSL=`$PKGCONFIG --libs-only-L libpsl` 2271*6236dae4SAndroid Build Coastguard Worker CPP_PSL=`$PKGCONFIG --cflags-only-I libpsl` 2272*6236dae4SAndroid Build Coastguard Worker else 2273*6236dae4SAndroid Build Coastguard Worker dnl no libpsl pkg-config found 2274*6236dae4SAndroid Build Coastguard Worker LIB_PSL="-lpsl" 2275*6236dae4SAndroid Build Coastguard Worker fi 2276*6236dae4SAndroid Build Coastguard Worker 2277*6236dae4SAndroid Build Coastguard Worker ;; 2278*6236dae4SAndroid Build Coastguard Worker *) 2279*6236dae4SAndroid Build Coastguard Worker dnl use the given --with-libpsl spot 2280*6236dae4SAndroid Build Coastguard Worker LIB_PSL="-lpsl" 2281*6236dae4SAndroid Build Coastguard Worker PREFIX_PSL=$OPT_LIBPSL 2282*6236dae4SAndroid Build Coastguard Worker ;; 2283*6236dae4SAndroid Build Coastguard Worker esac 2284*6236dae4SAndroid Build Coastguard Worker 2285*6236dae4SAndroid Build Coastguard Worker dnl if given with a prefix, we set -L and -I based on that 2286*6236dae4SAndroid Build Coastguard Worker if test -n "$PREFIX_PSL"; then 2287*6236dae4SAndroid Build Coastguard Worker LD_PSL=-L${PREFIX_PSL}/lib$libsuff 2288*6236dae4SAndroid Build Coastguard Worker CPP_PSL=-I${PREFIX_PSL}/include 2289*6236dae4SAndroid Build Coastguard Worker fi 2290*6236dae4SAndroid Build Coastguard Worker 2291*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_PSL" 2292*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_PSL" 2293*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_PSL $LIBS" 2294*6236dae4SAndroid Build Coastguard Worker 2295*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(psl, psl_builtin, 2296*6236dae4SAndroid Build Coastguard Worker [ 2297*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(libpsl.h, 2298*6236dae4SAndroid Build Coastguard Worker curl_psl_msg="enabled" 2299*6236dae4SAndroid Build Coastguard Worker LIBPSL_ENABLED=1 2300*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_LIBPSL, 1, [if libpsl is in use]) 2301*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_LIBPSL, [1]) 2302*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libpsl" 2303*6236dae4SAndroid Build Coastguard Worker ) 2304*6236dae4SAndroid Build Coastguard Worker ], 2305*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 2306*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 2307*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 2308*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 2309*6236dae4SAndroid Build Coastguard Worker ) 2310*6236dae4SAndroid Build Coastguard Worker 2311*6236dae4SAndroid Build Coastguard Worker if test "$LIBPSL_ENABLED" != "1"; then 2312*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([libpsl libs and/or directories were not found where specified!]) 2313*6236dae4SAndroid Build Coastguard Worker fi 2314*6236dae4SAndroid Build Coastguard Workerfi 2315*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"]) 2316*6236dae4SAndroid Build Coastguard Worker 2317*6236dae4SAndroid Build Coastguard Worker 2318*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2319*6236dae4SAndroid Build Coastguard Workerdnl Check for libgsasl 2320*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2321*6236dae4SAndroid Build Coastguard Worker 2322*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(libgsasl, 2323*6236dae4SAndroid Build Coastguard Worker AS_HELP_STRING([--without-libgsasl], 2324*6236dae4SAndroid Build Coastguard Worker [disable libgsasl support for SCRAM]), 2325*6236dae4SAndroid Build Coastguard Worker with_libgsasl=$withval, 2326*6236dae4SAndroid Build Coastguard Worker with_libgsasl=yes) 2327*6236dae4SAndroid Build Coastguard Workerif test $with_libgsasl != "no"; then 2328*6236dae4SAndroid Build Coastguard Worker AC_SEARCH_LIBS(gsasl_init, gsasl, 2329*6236dae4SAndroid Build Coastguard Worker [curl_gsasl_msg="enabled"; 2330*6236dae4SAndroid Build Coastguard Worker AC_DEFINE([USE_GSASL], [1], [GSASL support enabled]) 2331*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libgsasl" 2332*6236dae4SAndroid Build Coastguard Worker ], 2333*6236dae4SAndroid Build Coastguard Worker [curl_gsasl_msg="no (libgsasl not found)"; 2334*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([libgsasl was not found]) 2335*6236dae4SAndroid Build Coastguard Worker ] 2336*6236dae4SAndroid Build Coastguard Worker ) 2337*6236dae4SAndroid Build Coastguard Workerfi 2338*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL([USE_GSASL], [test "$curl_gsasl_msg" = "enabled"]) 2339*6236dae4SAndroid Build Coastguard Worker 2340*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(libmetalink,, 2341*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-libmetalink and --without-libmetalink no longer work!])) 2342*6236dae4SAndroid Build Coastguard Worker 2343*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2344*6236dae4SAndroid Build Coastguard Workerdnl Check for the presence of libssh2 libraries and headers 2345*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2346*6236dae4SAndroid Build Coastguard Worker 2347*6236dae4SAndroid Build Coastguard Workerdnl Default to compiler & linker defaults for libssh2 files & libraries. 2348*6236dae4SAndroid Build Coastguard WorkerOPT_LIBSSH2=off 2349*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(libssh2,dnl 2350*6236dae4SAndroid Build Coastguard WorkerAS_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]) 2351*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-libssh2], [enable libssh2]), 2352*6236dae4SAndroid Build Coastguard Worker OPT_LIBSSH2=$withval, OPT_LIBSSH2=no) 2353*6236dae4SAndroid Build Coastguard Worker 2354*6236dae4SAndroid Build Coastguard Worker 2355*6236dae4SAndroid Build Coastguard WorkerOPT_LIBSSH=off 2356*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(libssh,dnl 2357*6236dae4SAndroid Build Coastguard WorkerAS_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]) 2358*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-libssh], [enable libssh]), 2359*6236dae4SAndroid Build Coastguard Worker OPT_LIBSSH=$withval, OPT_LIBSSH=no) 2360*6236dae4SAndroid Build Coastguard Worker 2361*6236dae4SAndroid Build Coastguard WorkerOPT_WOLFSSH=off 2362*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(wolfssh,dnl 2363*6236dae4SAndroid Build Coastguard WorkerAS_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]) 2364*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-wolfssh], [enable wolfssh]), 2365*6236dae4SAndroid Build Coastguard Worker OPT_WOLFSSH=$withval, OPT_WOLFSSH=no) 2366*6236dae4SAndroid Build Coastguard Worker 2367*6236dae4SAndroid Build Coastguard Workerif test X"$OPT_LIBSSH2" != Xno; then 2368*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-libssh2 variables 2369*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 2370*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 2371*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 2372*6236dae4SAndroid Build Coastguard Worker 2373*6236dae4SAndroid Build Coastguard Worker case "$OPT_LIBSSH2" in 2374*6236dae4SAndroid Build Coastguard Worker yes) 2375*6236dae4SAndroid Build Coastguard Worker dnl --with-libssh2 (without path) used 2376*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libssh2) 2377*6236dae4SAndroid Build Coastguard Worker 2378*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 2379*6236dae4SAndroid Build Coastguard Worker LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2` 2380*6236dae4SAndroid Build Coastguard Worker LD_SSH2=`$PKGCONFIG --libs-only-L libssh2` 2381*6236dae4SAndroid Build Coastguard Worker CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2` 2382*6236dae4SAndroid Build Coastguard Worker version=`$PKGCONFIG --modversion libssh2` 2383*6236dae4SAndroid Build Coastguard Worker DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/^-L//'` 2384*6236dae4SAndroid Build Coastguard Worker fi 2385*6236dae4SAndroid Build Coastguard Worker 2386*6236dae4SAndroid Build Coastguard Worker ;; 2387*6236dae4SAndroid Build Coastguard Worker off) 2388*6236dae4SAndroid Build Coastguard Worker dnl no --with-libssh2 option given, just check default places 2389*6236dae4SAndroid Build Coastguard Worker ;; 2390*6236dae4SAndroid Build Coastguard Worker *) 2391*6236dae4SAndroid Build Coastguard Worker dnl use the given --with-libssh2 spot 2392*6236dae4SAndroid Build Coastguard Worker PREFIX_SSH2=$OPT_LIBSSH2 2393*6236dae4SAndroid Build Coastguard Worker ;; 2394*6236dae4SAndroid Build Coastguard Worker esac 2395*6236dae4SAndroid Build Coastguard Worker 2396*6236dae4SAndroid Build Coastguard Worker dnl if given with a prefix, we set -L and -I based on that 2397*6236dae4SAndroid Build Coastguard Worker if test -n "$PREFIX_SSH2"; then 2398*6236dae4SAndroid Build Coastguard Worker LIB_SSH2="-lssh2" 2399*6236dae4SAndroid Build Coastguard Worker LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff 2400*6236dae4SAndroid Build Coastguard Worker CPP_SSH2=-I${PREFIX_SSH2}/include 2401*6236dae4SAndroid Build Coastguard Worker DIR_SSH2=${PREFIX_SSH2}/lib$libsuff 2402*6236dae4SAndroid Build Coastguard Worker fi 2403*6236dae4SAndroid Build Coastguard Worker 2404*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_SSH2" 2405*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_SSH2" 2406*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_SSH2 $LIBS" 2407*6236dae4SAndroid Build Coastguard Worker 2408*6236dae4SAndroid Build Coastguard Worker dnl check for function added in libssh2 version 1.0 2409*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(ssh2, libssh2_session_block_directions) 2410*6236dae4SAndroid Build Coastguard Worker 2411*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADER(libssh2.h, 2412*6236dae4SAndroid Build Coastguard Worker curl_ssh_msg="enabled (libssh2)" 2413*6236dae4SAndroid Build Coastguard Worker LIBSSH2_ENABLED=1 2414*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_LIBSSH2, 1, [if libssh2 is in use]) 2415*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_LIBSSH2, [1]) 2416*6236dae4SAndroid Build Coastguard Worker ) 2417*6236dae4SAndroid Build Coastguard Worker 2418*6236dae4SAndroid Build Coastguard Worker if test X"$OPT_LIBSSH2" != Xoff && 2419*6236dae4SAndroid Build Coastguard Worker test "$LIBSSH2_ENABLED" != "1"; then 2420*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([libssh2 libs and/or directories were not found where specified!]) 2421*6236dae4SAndroid Build Coastguard Worker fi 2422*6236dae4SAndroid Build Coastguard Worker 2423*6236dae4SAndroid Build Coastguard Worker if test "$LIBSSH2_ENABLED" = "1"; then 2424*6236dae4SAndroid Build Coastguard Worker if test -n "$DIR_SSH2"; then 2425*6236dae4SAndroid Build Coastguard Worker dnl when the libssh2 shared libs were found in a path that the run-time 2426*6236dae4SAndroid Build Coastguard Worker dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH 2427*6236dae4SAndroid Build Coastguard Worker dnl to prevent further configure tests to fail due to this 2428*6236dae4SAndroid Build Coastguard Worker 2429*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 2430*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH2" 2431*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 2432*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_SSH2 to CURL_LIBRARY_PATH]) 2433*6236dae4SAndroid Build Coastguard Worker fi 2434*6236dae4SAndroid Build Coastguard Worker fi 2435*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libssh2" 2436*6236dae4SAndroid Build Coastguard Worker else 2437*6236dae4SAndroid Build Coastguard Worker dnl no libssh2, revert back to clean variables 2438*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 2439*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 2440*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 2441*6236dae4SAndroid Build Coastguard Worker fi 2442*6236dae4SAndroid Build Coastguard Workerelif test X"$OPT_LIBSSH" != Xno; then 2443*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-libssh variables 2444*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 2445*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 2446*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 2447*6236dae4SAndroid Build Coastguard Worker 2448*6236dae4SAndroid Build Coastguard Worker case "$OPT_LIBSSH" in 2449*6236dae4SAndroid Build Coastguard Worker yes) 2450*6236dae4SAndroid Build Coastguard Worker dnl --with-libssh (without path) used 2451*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libssh) 2452*6236dae4SAndroid Build Coastguard Worker 2453*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 2454*6236dae4SAndroid Build Coastguard Worker LIB_SSH=`$PKGCONFIG --libs-only-l libssh` 2455*6236dae4SAndroid Build Coastguard Worker LD_SSH=`$PKGCONFIG --libs-only-L libssh` 2456*6236dae4SAndroid Build Coastguard Worker CPP_SSH=`$PKGCONFIG --cflags-only-I libssh` 2457*6236dae4SAndroid Build Coastguard Worker version=`$PKGCONFIG --modversion libssh` 2458*6236dae4SAndroid Build Coastguard Worker DIR_SSH=`echo $LD_SSH | $SED -e 's/^-L//'` 2459*6236dae4SAndroid Build Coastguard Worker fi 2460*6236dae4SAndroid Build Coastguard Worker 2461*6236dae4SAndroid Build Coastguard Worker ;; 2462*6236dae4SAndroid Build Coastguard Worker off) 2463*6236dae4SAndroid Build Coastguard Worker dnl no --with-libssh option given, just check default places 2464*6236dae4SAndroid Build Coastguard Worker ;; 2465*6236dae4SAndroid Build Coastguard Worker *) 2466*6236dae4SAndroid Build Coastguard Worker dnl use the given --with-libssh spot 2467*6236dae4SAndroid Build Coastguard Worker PREFIX_SSH=$OPT_LIBSSH 2468*6236dae4SAndroid Build Coastguard Worker ;; 2469*6236dae4SAndroid Build Coastguard Worker esac 2470*6236dae4SAndroid Build Coastguard Worker 2471*6236dae4SAndroid Build Coastguard Worker dnl if given with a prefix, we set -L and -I based on that 2472*6236dae4SAndroid Build Coastguard Worker if test -n "$PREFIX_SSH"; then 2473*6236dae4SAndroid Build Coastguard Worker LIB_SSH="-lssh" 2474*6236dae4SAndroid Build Coastguard Worker LD_SSH=-L${PREFIX_SSH}/lib$libsuff 2475*6236dae4SAndroid Build Coastguard Worker CPP_SSH=-I${PREFIX_SSH}/include 2476*6236dae4SAndroid Build Coastguard Worker DIR_SSH=${PREFIX_SSH}/lib$libsuff 2477*6236dae4SAndroid Build Coastguard Worker fi 2478*6236dae4SAndroid Build Coastguard Worker 2479*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_SSH" 2480*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_SSH" 2481*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_SSH $LIBS" 2482*6236dae4SAndroid Build Coastguard Worker 2483*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(ssh, ssh_new) 2484*6236dae4SAndroid Build Coastguard Worker 2485*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADER(libssh/libssh.h, 2486*6236dae4SAndroid Build Coastguard Worker curl_ssh_msg="enabled (libssh)" 2487*6236dae4SAndroid Build Coastguard Worker LIBSSH_ENABLED=1 2488*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_LIBSSH, 1, [if libssh is in use]) 2489*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_LIBSSH, [1]) 2490*6236dae4SAndroid Build Coastguard Worker ) 2491*6236dae4SAndroid Build Coastguard Worker 2492*6236dae4SAndroid Build Coastguard Worker if test X"$OPT_LIBSSH" != Xoff && 2493*6236dae4SAndroid Build Coastguard Worker test "$LIBSSH_ENABLED" != "1"; then 2494*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([libssh libs and/or directories were not found where specified!]) 2495*6236dae4SAndroid Build Coastguard Worker fi 2496*6236dae4SAndroid Build Coastguard Worker 2497*6236dae4SAndroid Build Coastguard Worker if test "$LIBSSH_ENABLED" = "1"; then 2498*6236dae4SAndroid Build Coastguard Worker if test "$curl_cv_native_windows" = "yes"; then 2499*6236dae4SAndroid Build Coastguard Worker dnl for if_nametoindex 2500*6236dae4SAndroid Build Coastguard Worker LIBS="-liphlpapi $LIBS" 2501*6236dae4SAndroid Build Coastguard Worker fi 2502*6236dae4SAndroid Build Coastguard Worker if test -n "$DIR_SSH"; then 2503*6236dae4SAndroid Build Coastguard Worker dnl when the libssh shared libs were found in a path that the run-time 2504*6236dae4SAndroid Build Coastguard Worker dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH 2505*6236dae4SAndroid Build Coastguard Worker dnl to prevent further configure tests to fail due to this 2506*6236dae4SAndroid Build Coastguard Worker 2507*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 2508*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH" 2509*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 2510*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_SSH to CURL_LIBRARY_PATH]) 2511*6236dae4SAndroid Build Coastguard Worker fi 2512*6236dae4SAndroid Build Coastguard Worker fi 2513*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libssh" 2514*6236dae4SAndroid Build Coastguard Worker else 2515*6236dae4SAndroid Build Coastguard Worker dnl no libssh, revert back to clean variables 2516*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 2517*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 2518*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 2519*6236dae4SAndroid Build Coastguard Worker fi 2520*6236dae4SAndroid Build Coastguard Workerelif test X"$OPT_WOLFSSH" != Xno; then 2521*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-wolfssh variables 2522*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 2523*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 2524*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 2525*6236dae4SAndroid Build Coastguard Worker 2526*6236dae4SAndroid Build Coastguard Worker if test "$OPT_WOLFSSH" != yes; then 2527*6236dae4SAndroid Build Coastguard Worker WOLFCONFIG="$OPT_WOLFSSH/bin/wolfssh-config" 2528*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS `$WOLFCONFIG --libs`" 2529*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS `$WOLFCONFIG --cflags`" 2530*6236dae4SAndroid Build Coastguard Worker fi 2531*6236dae4SAndroid Build Coastguard Worker 2532*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(wolfssh, wolfSSH_Init) 2533*6236dae4SAndroid Build Coastguard Worker 2534*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(wolfssh/ssh.h, 2535*6236dae4SAndroid Build Coastguard Worker curl_ssh_msg="enabled (wolfSSH)" 2536*6236dae4SAndroid Build Coastguard Worker WOLFSSH_ENABLED=1 2537*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_WOLFSSH, 1, [if wolfSSH is in use]) 2538*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_WOLFSSH, [1]) 2539*6236dae4SAndroid Build Coastguard Worker ) 2540*6236dae4SAndroid Build Coastguard Workerfi 2541*6236dae4SAndroid Build Coastguard Worker 2542*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2543*6236dae4SAndroid Build Coastguard Workerdnl Check for the presence of LIBRTMP libraries and headers 2544*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2545*6236dae4SAndroid Build Coastguard Worker 2546*6236dae4SAndroid Build Coastguard Workerdnl Default to compiler & linker defaults for LIBRTMP files & libraries. 2547*6236dae4SAndroid Build Coastguard WorkerOPT_LIBRTMP=off 2548*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(librtmp,dnl 2549*6236dae4SAndroid Build Coastguard WorkerAS_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]) 2550*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-librtmp], [disable LIBRTMP]), 2551*6236dae4SAndroid Build Coastguard Worker OPT_LIBRTMP=$withval) 2552*6236dae4SAndroid Build Coastguard Worker 2553*6236dae4SAndroid Build Coastguard Workerif test X"$OPT_LIBRTMP" != Xno; then 2554*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-librtmp variables 2555*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 2556*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 2557*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 2558*6236dae4SAndroid Build Coastguard Worker 2559*6236dae4SAndroid Build Coastguard Worker case "$OPT_LIBRTMP" in 2560*6236dae4SAndroid Build Coastguard Worker yes) 2561*6236dae4SAndroid Build Coastguard Worker dnl --with-librtmp (without path) used 2562*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(librtmp) 2563*6236dae4SAndroid Build Coastguard Worker 2564*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 2565*6236dae4SAndroid Build Coastguard Worker LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp` 2566*6236dae4SAndroid Build Coastguard Worker LD_RTMP=`$PKGCONFIG --libs-only-L librtmp` 2567*6236dae4SAndroid Build Coastguard Worker CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp` 2568*6236dae4SAndroid Build Coastguard Worker version=`$PKGCONFIG --modversion librtmp` 2569*6236dae4SAndroid Build Coastguard Worker DIR_RTMP=`echo $LD_RTMP | $SED -e 's/^-L//'` 2570*6236dae4SAndroid Build Coastguard Worker else 2571*6236dae4SAndroid Build Coastguard Worker dnl To avoid link errors, we do not allow --librtmp without 2572*6236dae4SAndroid Build Coastguard Worker dnl a pkgconfig file 2573*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.]) 2574*6236dae4SAndroid Build Coastguard Worker fi 2575*6236dae4SAndroid Build Coastguard Worker 2576*6236dae4SAndroid Build Coastguard Worker ;; 2577*6236dae4SAndroid Build Coastguard Worker off) 2578*6236dae4SAndroid Build Coastguard Worker dnl no --with-librtmp option given, just check default places 2579*6236dae4SAndroid Build Coastguard Worker LIB_RTMP="-lrtmp" 2580*6236dae4SAndroid Build Coastguard Worker ;; 2581*6236dae4SAndroid Build Coastguard Worker *) 2582*6236dae4SAndroid Build Coastguard Worker dnl use the given --with-librtmp spot 2583*6236dae4SAndroid Build Coastguard Worker LIB_RTMP="-lrtmp" 2584*6236dae4SAndroid Build Coastguard Worker PREFIX_RTMP=$OPT_LIBRTMP 2585*6236dae4SAndroid Build Coastguard Worker ;; 2586*6236dae4SAndroid Build Coastguard Worker esac 2587*6236dae4SAndroid Build Coastguard Worker 2588*6236dae4SAndroid Build Coastguard Worker dnl if given with a prefix, we set -L and -I based on that 2589*6236dae4SAndroid Build Coastguard Worker if test -n "$PREFIX_RTMP"; then 2590*6236dae4SAndroid Build Coastguard Worker LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff 2591*6236dae4SAndroid Build Coastguard Worker CPP_RTMP=-I${PREFIX_RTMP}/include 2592*6236dae4SAndroid Build Coastguard Worker DIR_RTMP=${PREFIX_RTMP}/lib$libsuff 2593*6236dae4SAndroid Build Coastguard Worker fi 2594*6236dae4SAndroid Build Coastguard Worker 2595*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_RTMP" 2596*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_RTMP" 2597*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_RTMP $LIBS" 2598*6236dae4SAndroid Build Coastguard Worker 2599*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(rtmp, RTMP_Init, 2600*6236dae4SAndroid Build Coastguard Worker [ 2601*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(librtmp/rtmp.h, 2602*6236dae4SAndroid Build Coastguard Worker curl_rtmp_msg="enabled (librtmp)" 2603*6236dae4SAndroid Build Coastguard Worker LIBRTMP_ENABLED=1 2604*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use]) 2605*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_LIBRTMP, [1]) 2606*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE librtmp" 2607*6236dae4SAndroid Build Coastguard Worker ) 2608*6236dae4SAndroid Build Coastguard Worker ], 2609*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 2610*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 2611*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 2612*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 2613*6236dae4SAndroid Build Coastguard Worker ) 2614*6236dae4SAndroid Build Coastguard Worker 2615*6236dae4SAndroid Build Coastguard Worker if test X"$OPT_LIBRTMP" != Xoff && 2616*6236dae4SAndroid Build Coastguard Worker test "$LIBRTMP_ENABLED" != "1"; then 2617*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!]) 2618*6236dae4SAndroid Build Coastguard Worker fi 2619*6236dae4SAndroid Build Coastguard Workerfi 2620*6236dae4SAndroid Build Coastguard Worker 2621*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2622*6236dae4SAndroid Build Coastguard Workerdnl Check for linker switch for versioned symbols 2623*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2624*6236dae4SAndroid Build Coastguard Worker 2625*6236dae4SAndroid Build Coastguard Workerversioned_symbols_flavour= 2626*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether versioned symbols are wanted]) 2627*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(versioned-symbols, 2628*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library]) 2629*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]), 2630*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 2631*6236dae4SAndroid Build Coastguard Worker no) 2632*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 2633*6236dae4SAndroid Build Coastguard Worker ;; 2634*6236dae4SAndroid Build Coastguard Worker *) 2635*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 2636*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([if libraries can be versioned]) 2637*6236dae4SAndroid Build Coastguard Worker GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script` 2638*6236dae4SAndroid Build Coastguard Worker if test -z "$GLD"; then 2639*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 2640*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([You need an ld version supporting the --version-script option]) 2641*6236dae4SAndroid Build Coastguard Worker else 2642*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 2643*6236dae4SAndroid Build Coastguard Worker if test "x$enableval" != "xyes"; then 2644*6236dae4SAndroid Build Coastguard Worker versioned_symbols_flavour="$enableval" 2645*6236dae4SAndroid Build Coastguard Worker elif test "x$CURL_WITH_MULTI_SSL" = "x1"; then 2646*6236dae4SAndroid Build Coastguard Worker versioned_symbols_flavour="MULTISSL_" 2647*6236dae4SAndroid Build Coastguard Worker elif test "x$OPENSSL_ENABLED" = "x1"; then 2648*6236dae4SAndroid Build Coastguard Worker versioned_symbols_flavour="OPENSSL_" 2649*6236dae4SAndroid Build Coastguard Worker elif test "x$MBEDTLS_ENABLED" = "x1"; then 2650*6236dae4SAndroid Build Coastguard Worker versioned_symbols_flavour="MBEDTLS_" 2651*6236dae4SAndroid Build Coastguard Worker elif test "x$BEARSSL_ENABLED" = "x1"; then 2652*6236dae4SAndroid Build Coastguard Worker versioned_symbols_flavour="BEARSSL_" 2653*6236dae4SAndroid Build Coastguard Worker elif test "x$WOLFSSL_ENABLED" = "x1"; then 2654*6236dae4SAndroid Build Coastguard Worker versioned_symbols_flavour="WOLFSSL_" 2655*6236dae4SAndroid Build Coastguard Worker elif test "x$GNUTLS_ENABLED" = "x1"; then 2656*6236dae4SAndroid Build Coastguard Worker versioned_symbols_flavour="GNUTLS_" 2657*6236dae4SAndroid Build Coastguard Worker elif test "x$RUSTLS_ENABLED" = "x1"; then 2658*6236dae4SAndroid Build Coastguard Worker versioned_symbols_flavour="RUSTLS_" 2659*6236dae4SAndroid Build Coastguard Worker else 2660*6236dae4SAndroid Build Coastguard Worker versioned_symbols_flavour="" 2661*6236dae4SAndroid Build Coastguard Worker fi 2662*6236dae4SAndroid Build Coastguard Worker versioned_symbols="yes" 2663*6236dae4SAndroid Build Coastguard Worker fi 2664*6236dae4SAndroid Build Coastguard Worker ;; 2665*6236dae4SAndroid Build Coastguard Worker 2666*6236dae4SAndroid Build Coastguard Worker esac 2667*6236dae4SAndroid Build Coastguard Worker], [ 2668*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 2669*6236dae4SAndroid Build Coastguard Worker] 2670*6236dae4SAndroid Build Coastguard Worker) 2671*6236dae4SAndroid Build Coastguard Worker 2672*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([CURL_LIBCURL_VERSIONED_SYMBOLS_PREFIX], ["$versioned_symbols_flavour"]) 2673*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([CURL_LIBCURL_VERSIONED_SYMBOLS_SONAME], ["4"]) dnl Keep in sync with VERSIONCHANGE - VERSIONDEL in lib/Makefile.soname 2674*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS], 2675*6236dae4SAndroid Build Coastguard Worker [test "x$versioned_symbols" = 'xyes']) 2676*6236dae4SAndroid Build Coastguard Worker 2677*6236dae4SAndroid Build Coastguard Workerdnl ---------------------------- 2678*6236dae4SAndroid Build Coastguard Workerdnl check Windows Unicode option 2679*6236dae4SAndroid Build Coastguard Workerdnl ---------------------------- 2680*6236dae4SAndroid Build Coastguard Worker 2681*6236dae4SAndroid Build Coastguard Workerwant_winuni="no" 2682*6236dae4SAndroid Build Coastguard Workerif test "$curl_cv_native_windows" = "yes"; then 2683*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to enable Windows Unicode (Windows native builds only)]) 2684*6236dae4SAndroid Build Coastguard Worker AC_ARG_ENABLE(windows-unicode, 2685*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-windows-unicode],[Enable Windows Unicode]) 2686*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-windows-unicode],[Disable Windows Unicode (default)]), 2687*6236dae4SAndroid Build Coastguard Worker [ case "$enableval" in 2688*6236dae4SAndroid Build Coastguard Worker yes) 2689*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="${CPPFLAGS} -DUNICODE -D_UNICODE" 2690*6236dae4SAndroid Build Coastguard Worker want_winuni="yes" 2691*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2692*6236dae4SAndroid Build Coastguard Worker ;; 2693*6236dae4SAndroid Build Coastguard Worker *) 2694*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2695*6236dae4SAndroid Build Coastguard Worker ;; 2696*6236dae4SAndroid Build Coastguard Worker esac ], 2697*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2698*6236dae4SAndroid Build Coastguard Worker ) 2699*6236dae4SAndroid Build Coastguard Workerfi 2700*6236dae4SAndroid Build Coastguard Worker 2701*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL([USE_UNICODE], [test "$want_winuni" = "yes"]) 2702*6236dae4SAndroid Build Coastguard Worker 2703*6236dae4SAndroid Build Coastguard Workerdnl ------------------------------------------------- 2704*6236dae4SAndroid Build Coastguard Workerdnl check WinIDN option before other IDN libraries 2705*6236dae4SAndroid Build Coastguard Workerdnl ------------------------------------------------- 2706*6236dae4SAndroid Build Coastguard Worker 2707*6236dae4SAndroid Build Coastguard Workertst_links_winidn='no' 2708*6236dae4SAndroid Build Coastguard Workerif test "$curl_cv_native_windows" = 'yes'; then 2709*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)]) 2710*6236dae4SAndroid Build Coastguard Worker OPT_WINIDN="default" 2711*6236dae4SAndroid Build Coastguard Worker AC_ARG_WITH(winidn, 2712*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN]) 2713*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-winidn], [disable Windows native IDN]), 2714*6236dae4SAndroid Build Coastguard Worker OPT_WINIDN=$withval) 2715*6236dae4SAndroid Build Coastguard Worker case "$OPT_WINIDN" in 2716*6236dae4SAndroid Build Coastguard Worker no|default) 2717*6236dae4SAndroid Build Coastguard Worker dnl --without-winidn option used or configure option not specified 2718*6236dae4SAndroid Build Coastguard Worker want_winidn="no" 2719*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2720*6236dae4SAndroid Build Coastguard Worker ;; 2721*6236dae4SAndroid Build Coastguard Worker yes) 2722*6236dae4SAndroid Build Coastguard Worker dnl --with-winidn option used without path 2723*6236dae4SAndroid Build Coastguard Worker want_winidn="yes" 2724*6236dae4SAndroid Build Coastguard Worker want_winidn_path="default" 2725*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2726*6236dae4SAndroid Build Coastguard Worker ;; 2727*6236dae4SAndroid Build Coastguard Worker *) 2728*6236dae4SAndroid Build Coastguard Worker dnl --with-winidn option used with path 2729*6236dae4SAndroid Build Coastguard Worker want_winidn="yes" 2730*6236dae4SAndroid Build Coastguard Worker want_winidn_path="$withval" 2731*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes ($withval)]) 2732*6236dae4SAndroid Build Coastguard Worker ;; 2733*6236dae4SAndroid Build Coastguard Worker esac 2734*6236dae4SAndroid Build Coastguard Worker 2735*6236dae4SAndroid Build Coastguard Worker if test "$want_winidn" = "yes"; then 2736*6236dae4SAndroid Build Coastguard Worker dnl WinIDN library support has been requested 2737*6236dae4SAndroid Build Coastguard Worker clean_CPPFLAGS="$CPPFLAGS" 2738*6236dae4SAndroid Build Coastguard Worker clean_LDFLAGS="$LDFLAGS" 2739*6236dae4SAndroid Build Coastguard Worker clean_LIBS="$LIBS" 2740*6236dae4SAndroid Build Coastguard Worker WINIDN_LIBS="-lnormaliz" 2741*6236dae4SAndroid Build Coastguard Worker WINIDN_CPPFLAGS="" 2742*6236dae4SAndroid Build Coastguard Worker # 2743*6236dae4SAndroid Build Coastguard Worker if test "$want_winidn_path" != "default"; then 2744*6236dae4SAndroid Build Coastguard Worker dnl path has been specified 2745*6236dae4SAndroid Build Coastguard Worker dnl pkg-config not available or provides no info 2746*6236dae4SAndroid Build Coastguard Worker WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff" 2747*6236dae4SAndroid Build Coastguard Worker WINIDN_CPPFLAGS="-I$want_winidn_path/include" 2748*6236dae4SAndroid Build Coastguard Worker fi 2749*6236dae4SAndroid Build Coastguard Worker # 2750*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $WINIDN_CPPFLAGS" 2751*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $WINIDN_LDFLAGS" 2752*6236dae4SAndroid Build Coastguard Worker LIBS="$WINIDN_LIBS $LIBS" 2753*6236dae4SAndroid Build Coastguard Worker # 2754*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([if IdnToUnicode can be linked]) 2755*6236dae4SAndroid Build Coastguard Worker AC_LINK_IFELSE([ 2756*6236dae4SAndroid Build Coastguard Worker AC_LANG_PROGRAM([[ 2757*6236dae4SAndroid Build Coastguard Worker #include <windows.h> 2758*6236dae4SAndroid Build Coastguard Worker ]],[[ 2759*6236dae4SAndroid Build Coastguard Worker #if (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x600) && \ 2760*6236dae4SAndroid Build Coastguard Worker (!defined(WINVER) || WINVER < 0x600) 2761*6236dae4SAndroid Build Coastguard Worker WINBASEAPI int WINAPI IdnToUnicode(DWORD dwFlags, 2762*6236dae4SAndroid Build Coastguard Worker const WCHAR *lpASCIICharStr, 2763*6236dae4SAndroid Build Coastguard Worker int cchASCIIChar, 2764*6236dae4SAndroid Build Coastguard Worker WCHAR *lpUnicodeCharStr, 2765*6236dae4SAndroid Build Coastguard Worker int cchUnicodeChar); 2766*6236dae4SAndroid Build Coastguard Worker #endif 2767*6236dae4SAndroid Build Coastguard Worker IdnToUnicode(0, NULL, 0, NULL, 0); 2768*6236dae4SAndroid Build Coastguard Worker ]]) 2769*6236dae4SAndroid Build Coastguard Worker ],[ 2770*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2771*6236dae4SAndroid Build Coastguard Worker tst_links_winidn="yes" 2772*6236dae4SAndroid Build Coastguard Worker ],[ 2773*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2774*6236dae4SAndroid Build Coastguard Worker tst_links_winidn="no" 2775*6236dae4SAndroid Build Coastguard Worker ]) 2776*6236dae4SAndroid Build Coastguard Worker # 2777*6236dae4SAndroid Build Coastguard Worker if test "$tst_links_winidn" = "yes"; then 2778*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_WIN32_IDN, 1, [Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz).]) 2779*6236dae4SAndroid Build Coastguard Worker AC_SUBST([IDN_ENABLED], [1]) 2780*6236dae4SAndroid Build Coastguard Worker curl_idn_msg="enabled (Windows-native)" 2781*6236dae4SAndroid Build Coastguard Worker else 2782*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled]) 2783*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$clean_CPPFLAGS" 2784*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$clean_LDFLAGS" 2785*6236dae4SAndroid Build Coastguard Worker LIBS="$clean_LIBS" 2786*6236dae4SAndroid Build Coastguard Worker fi 2787*6236dae4SAndroid Build Coastguard Worker fi 2788*6236dae4SAndroid Build Coastguard Workerfi 2789*6236dae4SAndroid Build Coastguard Worker 2790*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2791*6236dae4SAndroid Build Coastguard Workerdnl Check for the presence of AppleIDN 2792*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2793*6236dae4SAndroid Build Coastguard Worker 2794*6236dae4SAndroid Build Coastguard Workertst_links_appleidn='no' 2795*6236dae4SAndroid Build Coastguard Workercase $host in 2796*6236dae4SAndroid Build Coastguard Worker *-apple-*) 2797*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to build with Apple IDN]) 2798*6236dae4SAndroid Build Coastguard Worker OPT_IDN="default" 2799*6236dae4SAndroid Build Coastguard Worker AC_ARG_WITH(apple-idn, 2800*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-apple-idn],[Enable AppleIDN]) 2801*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-apple-idn],[Disable AppleIDN]), 2802*6236dae4SAndroid Build Coastguard Worker [OPT_IDN=$withval]) 2803*6236dae4SAndroid Build Coastguard Worker case "$OPT_IDN" in 2804*6236dae4SAndroid Build Coastguard Worker yes) 2805*6236dae4SAndroid Build Coastguard Worker dnl --with-apple-idn option used 2806*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes, check]) 2807*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(icucore, uidna_openUTS46, 2808*6236dae4SAndroid Build Coastguard Worker [ 2809*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(unicode/uidna.h, 2810*6236dae4SAndroid Build Coastguard Worker curl_idn_msg="enabled (AppleIDN)" 2811*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_APPLE_IDN, 1, [if AppleIDN]) 2812*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_APPLE_IDN, [1]) 2813*6236dae4SAndroid Build Coastguard Worker AC_SUBST([IDN_ENABLED], [1]) 2814*6236dae4SAndroid Build Coastguard Worker LIBS="-licucore -liconv $LIBS" 2815*6236dae4SAndroid Build Coastguard Worker tst_links_appleidn='yes' 2816*6236dae4SAndroid Build Coastguard Worker ) 2817*6236dae4SAndroid Build Coastguard Worker ]) 2818*6236dae4SAndroid Build Coastguard Worker ;; 2819*6236dae4SAndroid Build Coastguard Worker *) 2820*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2821*6236dae4SAndroid Build Coastguard Worker ;; 2822*6236dae4SAndroid Build Coastguard Worker esac 2823*6236dae4SAndroid Build Coastguard Worker ;; 2824*6236dae4SAndroid Build Coastguard Workeresac 2825*6236dae4SAndroid Build Coastguard Worker 2826*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2827*6236dae4SAndroid Build Coastguard Workerdnl Check for the presence of libidn2 2828*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2829*6236dae4SAndroid Build Coastguard Worker 2830*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to build with libidn2]) 2831*6236dae4SAndroid Build Coastguard WorkerOPT_IDN="default" 2832*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(libidn2, 2833*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-libidn2=PATH],[Enable libidn2 usage]) 2834*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-libidn2],[Disable libidn2 usage]), 2835*6236dae4SAndroid Build Coastguard Worker [OPT_IDN=$withval]) 2836*6236dae4SAndroid Build Coastguard Workerif test "x$tst_links_winidn" = "xyes"; then 2837*6236dae4SAndroid Build Coastguard Worker want_idn="no" 2838*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no (using WinIDN instead)]) 2839*6236dae4SAndroid Build Coastguard Workerelif test "x$tst_links_appleidn" = "xyes"; then 2840*6236dae4SAndroid Build Coastguard Worker want_idn="no" 2841*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no (using AppleIDN instead)]) 2842*6236dae4SAndroid Build Coastguard Workerelse 2843*6236dae4SAndroid Build Coastguard Worker case "$OPT_IDN" in 2844*6236dae4SAndroid Build Coastguard Worker no) 2845*6236dae4SAndroid Build Coastguard Worker dnl --without-libidn2 option used 2846*6236dae4SAndroid Build Coastguard Worker want_idn="no" 2847*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2848*6236dae4SAndroid Build Coastguard Worker ;; 2849*6236dae4SAndroid Build Coastguard Worker default) 2850*6236dae4SAndroid Build Coastguard Worker dnl configure option not specified 2851*6236dae4SAndroid Build Coastguard Worker want_idn="yes" 2852*6236dae4SAndroid Build Coastguard Worker want_idn_path="default" 2853*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([(assumed) yes]) 2854*6236dae4SAndroid Build Coastguard Worker ;; 2855*6236dae4SAndroid Build Coastguard Worker yes) 2856*6236dae4SAndroid Build Coastguard Worker dnl --with-libidn2 option used without path 2857*6236dae4SAndroid Build Coastguard Worker want_idn="yes" 2858*6236dae4SAndroid Build Coastguard Worker want_idn_path="default" 2859*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2860*6236dae4SAndroid Build Coastguard Worker ;; 2861*6236dae4SAndroid Build Coastguard Worker *) 2862*6236dae4SAndroid Build Coastguard Worker dnl --with-libidn2 option used with path 2863*6236dae4SAndroid Build Coastguard Worker want_idn="yes" 2864*6236dae4SAndroid Build Coastguard Worker want_idn_path="$withval" 2865*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes ($withval)]) 2866*6236dae4SAndroid Build Coastguard Worker ;; 2867*6236dae4SAndroid Build Coastguard Worker esac 2868*6236dae4SAndroid Build Coastguard Workerfi 2869*6236dae4SAndroid Build Coastguard Worker 2870*6236dae4SAndroid Build Coastguard Workerif test "$want_idn" = "yes"; then 2871*6236dae4SAndroid Build Coastguard Worker dnl idn library support has been requested 2872*6236dae4SAndroid Build Coastguard Worker clean_CPPFLAGS="$CPPFLAGS" 2873*6236dae4SAndroid Build Coastguard Worker clean_LDFLAGS="$LDFLAGS" 2874*6236dae4SAndroid Build Coastguard Worker clean_LIBS="$LIBS" 2875*6236dae4SAndroid Build Coastguard Worker PKGCONFIG="no" 2876*6236dae4SAndroid Build Coastguard Worker # 2877*6236dae4SAndroid Build Coastguard Worker if test "$want_idn_path" != "default"; then 2878*6236dae4SAndroid Build Coastguard Worker dnl path has been specified 2879*6236dae4SAndroid Build Coastguard Worker IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig" 2880*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libidn2, [$IDN_PCDIR]) 2881*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 2882*6236dae4SAndroid Build Coastguard Worker IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl 2883*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-l libidn2 2>/dev/null` 2884*6236dae4SAndroid Build Coastguard Worker IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl 2885*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-L libidn2 2>/dev/null` 2886*6236dae4SAndroid Build Coastguard Worker IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl 2887*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --cflags-only-I libidn2 2>/dev/null` 2888*6236dae4SAndroid Build Coastguard Worker IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'` 2889*6236dae4SAndroid Build Coastguard Worker else 2890*6236dae4SAndroid Build Coastguard Worker dnl pkg-config not available or provides no info 2891*6236dae4SAndroid Build Coastguard Worker IDN_LIBS="-lidn2" 2892*6236dae4SAndroid Build Coastguard Worker IDN_LDFLAGS="-L$want_idn_path/lib$libsuff" 2893*6236dae4SAndroid Build Coastguard Worker IDN_CPPFLAGS="-I$want_idn_path/include" 2894*6236dae4SAndroid Build Coastguard Worker IDN_DIR="$want_idn_path/lib$libsuff" 2895*6236dae4SAndroid Build Coastguard Worker fi 2896*6236dae4SAndroid Build Coastguard Worker else 2897*6236dae4SAndroid Build Coastguard Worker dnl path not specified 2898*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libidn2) 2899*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 2900*6236dae4SAndroid Build Coastguard Worker IDN_LIBS=`$PKGCONFIG --libs-only-l libidn2 2>/dev/null` 2901*6236dae4SAndroid Build Coastguard Worker IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn2 2>/dev/null` 2902*6236dae4SAndroid Build Coastguard Worker IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn2 2>/dev/null` 2903*6236dae4SAndroid Build Coastguard Worker IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'` 2904*6236dae4SAndroid Build Coastguard Worker else 2905*6236dae4SAndroid Build Coastguard Worker dnl pkg-config not available or provides no info 2906*6236dae4SAndroid Build Coastguard Worker IDN_LIBS="-lidn2" 2907*6236dae4SAndroid Build Coastguard Worker fi 2908*6236dae4SAndroid Build Coastguard Worker fi 2909*6236dae4SAndroid Build Coastguard Worker # 2910*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 2911*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"]) 2912*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"]) 2913*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"]) 2914*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"]) 2915*6236dae4SAndroid Build Coastguard Worker else 2916*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"]) 2917*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"]) 2918*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"]) 2919*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"]) 2920*6236dae4SAndroid Build Coastguard Worker fi 2921*6236dae4SAndroid Build Coastguard Worker # 2922*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS" 2923*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $IDN_LDFLAGS" 2924*6236dae4SAndroid Build Coastguard Worker LIBS="$IDN_LIBS $LIBS" 2925*6236dae4SAndroid Build Coastguard Worker # 2926*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([if idn2_lookup_ul can be linked]) 2927*6236dae4SAndroid Build Coastguard Worker AC_LINK_IFELSE([ 2928*6236dae4SAndroid Build Coastguard Worker AC_LANG_FUNC_LINK_TRY([idn2_lookup_ul]) 2929*6236dae4SAndroid Build Coastguard Worker ],[ 2930*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2931*6236dae4SAndroid Build Coastguard Worker tst_links_libidn="yes" 2932*6236dae4SAndroid Build Coastguard Worker ],[ 2933*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2934*6236dae4SAndroid Build Coastguard Worker tst_links_libidn="no" 2935*6236dae4SAndroid Build Coastguard Worker ]) 2936*6236dae4SAndroid Build Coastguard Worker # 2937*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS( idn2.h ) 2938*6236dae4SAndroid Build Coastguard Worker 2939*6236dae4SAndroid Build Coastguard Worker if test "$tst_links_libidn" = "yes"; then 2940*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_LIBIDN2, 1, [Define to 1 if you have the `idn2' library (-lidn2).]) 2941*6236dae4SAndroid Build Coastguard Worker dnl different versions of libidn have different setups of these: 2942*6236dae4SAndroid Build Coastguard Worker 2943*6236dae4SAndroid Build Coastguard Worker AC_SUBST([IDN_ENABLED], [1]) 2944*6236dae4SAndroid Build Coastguard Worker curl_idn_msg="enabled (libidn2)" 2945*6236dae4SAndroid Build Coastguard Worker if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then 2946*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$IDN_DIR" 2947*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 2948*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $IDN_DIR to CURL_LIBRARY_PATH]) 2949*6236dae4SAndroid Build Coastguard Worker fi 2950*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="libidn2 $LIBCURL_PC_REQUIRES_PRIVATE" 2951*6236dae4SAndroid Build Coastguard Worker else 2952*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([Cannot find libidn2]) 2953*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$clean_CPPFLAGS" 2954*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$clean_LDFLAGS" 2955*6236dae4SAndroid Build Coastguard Worker LIBS="$clean_LIBS" 2956*6236dae4SAndroid Build Coastguard Worker want_idn="no" 2957*6236dae4SAndroid Build Coastguard Worker fi 2958*6236dae4SAndroid Build Coastguard Workerfi 2959*6236dae4SAndroid Build Coastguard Worker 2960*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2961*6236dae4SAndroid Build Coastguard Workerdnl Check for nghttp2 2962*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 2963*6236dae4SAndroid Build Coastguard Worker 2964*6236dae4SAndroid Build Coastguard WorkerOPT_H2="yes" 2965*6236dae4SAndroid Build Coastguard Worker 2966*6236dae4SAndroid Build Coastguard Workerif test "x$disable_http" = "xyes" -o X"$want_hyper" != Xno; then 2967*6236dae4SAndroid Build Coastguard Worker # without HTTP or with Hyper, nghttp2 is no use 2968*6236dae4SAndroid Build Coastguard Worker OPT_H2="no" 2969*6236dae4SAndroid Build Coastguard Workerfi 2970*6236dae4SAndroid Build Coastguard Worker 2971*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(nghttp2, 2972*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage]) 2973*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]), 2974*6236dae4SAndroid Build Coastguard Worker [OPT_H2=$withval]) 2975*6236dae4SAndroid Build Coastguard Workercase "$OPT_H2" in 2976*6236dae4SAndroid Build Coastguard Worker no) 2977*6236dae4SAndroid Build Coastguard Worker dnl --without-nghttp2 option used 2978*6236dae4SAndroid Build Coastguard Worker want_nghttp2="no" 2979*6236dae4SAndroid Build Coastguard Worker ;; 2980*6236dae4SAndroid Build Coastguard Worker yes) 2981*6236dae4SAndroid Build Coastguard Worker dnl --with-nghttp2 option used without path 2982*6236dae4SAndroid Build Coastguard Worker want_nghttp2="default" 2983*6236dae4SAndroid Build Coastguard Worker want_nghttp2_path="" 2984*6236dae4SAndroid Build Coastguard Worker want_nghttp2_pkg_config_path="" 2985*6236dae4SAndroid Build Coastguard Worker ;; 2986*6236dae4SAndroid Build Coastguard Worker *) 2987*6236dae4SAndroid Build Coastguard Worker dnl --with-nghttp2 option used with path 2988*6236dae4SAndroid Build Coastguard Worker want_nghttp2="yes" 2989*6236dae4SAndroid Build Coastguard Worker want_nghttp2_path="$withval" 2990*6236dae4SAndroid Build Coastguard Worker want_nghttp2_pkg_config_path="$withval/lib/pkgconfig" 2991*6236dae4SAndroid Build Coastguard Worker ;; 2992*6236dae4SAndroid Build Coastguard Workeresac 2993*6236dae4SAndroid Build Coastguard Worker 2994*6236dae4SAndroid Build Coastguard Workerif test X"$want_nghttp2" != Xno; then 2995*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-nghttp2 variables 2996*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 2997*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 2998*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 2999*6236dae4SAndroid Build Coastguard Worker 3000*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libnghttp2, $want_nghttp2_pkg_config_path) 3001*6236dae4SAndroid Build Coastguard Worker 3002*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 3003*6236dae4SAndroid Build Coastguard Worker LIB_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path]) 3004*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-l libnghttp2` 3005*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-l is $LIB_H2]) 3006*6236dae4SAndroid Build Coastguard Worker 3007*6236dae4SAndroid Build Coastguard Worker CPP_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path]) dnl 3008*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --cflags-only-I libnghttp2` 3009*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-I is $CPP_H2]) 3010*6236dae4SAndroid Build Coastguard Worker 3011*6236dae4SAndroid Build Coastguard Worker LD_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path]) 3012*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-L libnghttp2` 3013*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-L is $LD_H2]) 3014*6236dae4SAndroid Build Coastguard Worker 3015*6236dae4SAndroid Build Coastguard Worker DIR_H2=`echo $LD_H2 | $SED -e 's/^-L//'` 3016*6236dae4SAndroid Build Coastguard Worker elif test x"$want_nghttp2_path" != x; then 3017*6236dae4SAndroid Build Coastguard Worker LIB_H2="-lnghttp2" 3018*6236dae4SAndroid Build Coastguard Worker LD_H2=-L${want_nghttp2_path}/lib$libsuff 3019*6236dae4SAndroid Build Coastguard Worker CPP_H2=-I${want_nghttp2_path}/include 3020*6236dae4SAndroid Build Coastguard Worker DIR_H2=${want_nghttp2_path}/lib$libsuff 3021*6236dae4SAndroid Build Coastguard Worker elif test X"$want_nghttp2" != Xdefault; then 3022*6236dae4SAndroid Build Coastguard Worker dnl no nghttp2 pkg-config found and no custom directory specified, 3023*6236dae4SAndroid Build Coastguard Worker dnl deal with it 3024*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-nghttp2 was specified but could not find libnghttp2 pkg-config file.]) 3025*6236dae4SAndroid Build Coastguard Worker else 3026*6236dae4SAndroid Build Coastguard Worker LIB_H2="-lnghttp2" 3027*6236dae4SAndroid Build Coastguard Worker fi 3028*6236dae4SAndroid Build Coastguard Worker 3029*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_H2" 3030*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_H2" 3031*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_H2 $LIBS" 3032*6236dae4SAndroid Build Coastguard Worker 3033*6236dae4SAndroid Build Coastguard Worker # use nghttp2_session_get_stream_local_window_size to require nghttp2 3034*6236dae4SAndroid Build Coastguard Worker # >= 1.15.0 3035*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(nghttp2, nghttp2_session_get_stream_local_window_size, 3036*6236dae4SAndroid Build Coastguard Worker [ 3037*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(nghttp2/nghttp2.h, 3038*6236dae4SAndroid Build Coastguard Worker curl_h2_msg="enabled (nghttp2)" 3039*6236dae4SAndroid Build Coastguard Worker NGHTTP2_ENABLED=1 3040*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_NGHTTP2, 1, [if nghttp2 is in use]) 3041*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_NGHTTP2, [1]) 3042*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libnghttp2" 3043*6236dae4SAndroid Build Coastguard Worker ) 3044*6236dae4SAndroid Build Coastguard Worker 3045*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_H2" 3046*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 3047*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_H2 to CURL_LIBRARY_PATH]) 3048*6236dae4SAndroid Build Coastguard Worker ], 3049*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 3050*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 3051*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 3052*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 3053*6236dae4SAndroid Build Coastguard Worker ) 3054*6236dae4SAndroid Build Coastguard Workerfi 3055*6236dae4SAndroid Build Coastguard Worker 3056*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3057*6236dae4SAndroid Build Coastguard Workerdnl Check for ngtcp2 (QUIC) 3058*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3059*6236dae4SAndroid Build Coastguard Worker 3060*6236dae4SAndroid Build Coastguard WorkerOPT_TCP2="no" 3061*6236dae4SAndroid Build Coastguard Worker 3062*6236dae4SAndroid Build Coastguard Workerif test "x$disable_http" = "xyes"; then 3063*6236dae4SAndroid Build Coastguard Worker # without HTTP, ngtcp2 is no use 3064*6236dae4SAndroid Build Coastguard Worker OPT_TCP2="no" 3065*6236dae4SAndroid Build Coastguard Workerfi 3066*6236dae4SAndroid Build Coastguard Worker 3067*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(ngtcp2, 3068*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-ngtcp2=PATH],[Enable ngtcp2 usage]) 3069*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-ngtcp2],[Disable ngtcp2 usage]), 3070*6236dae4SAndroid Build Coastguard Worker [OPT_TCP2=$withval]) 3071*6236dae4SAndroid Build Coastguard Workercase "$OPT_TCP2" in 3072*6236dae4SAndroid Build Coastguard Worker no) 3073*6236dae4SAndroid Build Coastguard Worker dnl --without-ngtcp2 option used 3074*6236dae4SAndroid Build Coastguard Worker want_tcp2="no" 3075*6236dae4SAndroid Build Coastguard Worker ;; 3076*6236dae4SAndroid Build Coastguard Worker yes) 3077*6236dae4SAndroid Build Coastguard Worker dnl --with-ngtcp2 option used without path 3078*6236dae4SAndroid Build Coastguard Worker want_tcp2="default" 3079*6236dae4SAndroid Build Coastguard Worker want_tcp2_path="" 3080*6236dae4SAndroid Build Coastguard Worker ;; 3081*6236dae4SAndroid Build Coastguard Worker *) 3082*6236dae4SAndroid Build Coastguard Worker dnl --with-ngtcp2 option used with path 3083*6236dae4SAndroid Build Coastguard Worker want_tcp2="yes" 3084*6236dae4SAndroid Build Coastguard Worker want_tcp2_path="$withval/lib/pkgconfig" 3085*6236dae4SAndroid Build Coastguard Worker ;; 3086*6236dae4SAndroid Build Coastguard Workeresac 3087*6236dae4SAndroid Build Coastguard Worker 3088*6236dae4SAndroid Build Coastguard Workercurl_tcp2_msg="no (--with-ngtcp2)" 3089*6236dae4SAndroid Build Coastguard Workerif test X"$want_tcp2" != Xno; then 3090*6236dae4SAndroid Build Coastguard Worker 3091*6236dae4SAndroid Build Coastguard Worker if test "$QUIC_ENABLED" != "yes"; then 3092*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-ngtcp2 a no-no]) 3093*6236dae4SAndroid Build Coastguard Worker fi 3094*6236dae4SAndroid Build Coastguard Worker 3095*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-ngtcp2 variables 3096*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 3097*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 3098*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 3099*6236dae4SAndroid Build Coastguard Worker 3100*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libngtcp2, $want_tcp2_path) 3101*6236dae4SAndroid Build Coastguard Worker 3102*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 3103*6236dae4SAndroid Build Coastguard Worker LIB_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) 3104*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-l libngtcp2` 3105*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-l is $LIB_TCP2]) 3106*6236dae4SAndroid Build Coastguard Worker 3107*6236dae4SAndroid Build Coastguard Worker CPP_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl 3108*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --cflags-only-I libngtcp2` 3109*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-I is $CPP_TCP2]) 3110*6236dae4SAndroid Build Coastguard Worker 3111*6236dae4SAndroid Build Coastguard Worker LD_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) 3112*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-L libngtcp2` 3113*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-L is $LD_TCP2]) 3114*6236dae4SAndroid Build Coastguard Worker 3115*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_TCP2" 3116*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_TCP2" 3117*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_TCP2 $LIBS" 3118*6236dae4SAndroid Build Coastguard Worker 3119*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 3120*6236dae4SAndroid Build Coastguard Worker DIR_TCP2=`echo $LD_TCP2 | $SED -e 's/^-L//'` 3121*6236dae4SAndroid Build Coastguard Worker fi 3122*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(ngtcp2, ngtcp2_conn_client_new_versioned, 3123*6236dae4SAndroid Build Coastguard Worker [ 3124*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(ngtcp2/ngtcp2.h, 3125*6236dae4SAndroid Build Coastguard Worker NGTCP2_ENABLED=1 3126*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_NGTCP2, 1, [if ngtcp2 is in use]) 3127*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_NGTCP2, [1]) 3128*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_TCP2" 3129*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 3130*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_TCP2 to CURL_LIBRARY_PATH]) 3131*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libngtcp2" 3132*6236dae4SAndroid Build Coastguard Worker ) 3133*6236dae4SAndroid Build Coastguard Worker ], 3134*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 3135*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 3136*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 3137*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 3138*6236dae4SAndroid Build Coastguard Worker ) 3139*6236dae4SAndroid Build Coastguard Worker 3140*6236dae4SAndroid Build Coastguard Worker else 3141*6236dae4SAndroid Build Coastguard Worker dnl no ngtcp2 pkg-config found, deal with it 3142*6236dae4SAndroid Build Coastguard Worker if test X"$want_tcp2" != Xdefault; then 3143*6236dae4SAndroid Build Coastguard Worker dnl To avoid link errors, we do not allow --with-ngtcp2 without 3144*6236dae4SAndroid Build Coastguard Worker dnl a pkgconfig file 3145*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2 pkg-config file.]) 3146*6236dae4SAndroid Build Coastguard Worker fi 3147*6236dae4SAndroid Build Coastguard Worker fi 3148*6236dae4SAndroid Build Coastguard Workerfi 3149*6236dae4SAndroid Build Coastguard Worker 3150*6236dae4SAndroid Build Coastguard Workerif test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "x$OPENSSL_IS_BORINGSSL" != "x1"; then 3151*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-ngtcp2_crypto_quictls variables 3152*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 3153*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 3154*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 3155*6236dae4SAndroid Build Coastguard Worker 3156*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libngtcp2_crypto_quictls, $want_tcp2_path) 3157*6236dae4SAndroid Build Coastguard Worker 3158*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 3159*6236dae4SAndroid Build Coastguard Worker LIB_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) 3160*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-l libngtcp2_crypto_quictls` 3161*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_QUICTLS]) 3162*6236dae4SAndroid Build Coastguard Worker 3163*6236dae4SAndroid Build Coastguard Worker CPP_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl 3164*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --cflags-only-I libngtcp2_crypto_quictls` 3165*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_QUICTLS]) 3166*6236dae4SAndroid Build Coastguard Worker 3167*6236dae4SAndroid Build Coastguard Worker LD_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) 3168*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-L libngtcp2_crypto_quictls` 3169*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_QUICTLS]) 3170*6236dae4SAndroid Build Coastguard Worker 3171*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_QUICTLS" 3172*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_QUICTLS" 3173*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_NGTCP2_CRYPTO_QUICTLS $LIBS" 3174*6236dae4SAndroid Build Coastguard Worker 3175*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 3176*6236dae4SAndroid Build Coastguard Worker DIR_NGTCP2_CRYPTO_QUICTLS=`echo $LD_NGTCP2_CRYPTO_QUICTLS | $SED -e 's/^-L//'` 3177*6236dae4SAndroid Build Coastguard Worker fi 3178*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(ngtcp2_crypto_quictls, ngtcp2_crypto_recv_client_initial_cb, 3179*6236dae4SAndroid Build Coastguard Worker [ 3180*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h, 3181*6236dae4SAndroid Build Coastguard Worker NGTCP2_ENABLED=1 3182*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_NGTCP2_CRYPTO_QUICTLS, 1, [if ngtcp2_crypto_quictls is in use]) 3183*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_NGTCP2_CRYPTO_QUICTLS, [1]) 3184*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_QUICTLS" 3185*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 3186*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_QUICTLS to CURL_LIBRARY_PATH]) 3187*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libngtcp2_crypto_quictls" 3188*6236dae4SAndroid Build Coastguard Worker ) 3189*6236dae4SAndroid Build Coastguard Worker ], 3190*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 3191*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 3192*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 3193*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 3194*6236dae4SAndroid Build Coastguard Worker ) 3195*6236dae4SAndroid Build Coastguard Worker 3196*6236dae4SAndroid Build Coastguard Worker else 3197*6236dae4SAndroid Build Coastguard Worker dnl no ngtcp2_crypto_quictls pkg-config found, deal with it 3198*6236dae4SAndroid Build Coastguard Worker if test X"$want_tcp2" != Xdefault; then 3199*6236dae4SAndroid Build Coastguard Worker dnl To avoid link errors, we do not allow --with-ngtcp2 without 3200*6236dae4SAndroid Build Coastguard Worker dnl a pkgconfig file 3201*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_quictls pkg-config file.]) 3202*6236dae4SAndroid Build Coastguard Worker fi 3203*6236dae4SAndroid Build Coastguard Worker fi 3204*6236dae4SAndroid Build Coastguard Workerfi 3205*6236dae4SAndroid Build Coastguard Worker 3206*6236dae4SAndroid Build Coastguard Workerif test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "x$OPENSSL_IS_BORINGSSL" = "x1"; then 3207*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-ngtcp2_crypto_boringssl variables 3208*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 3209*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 3210*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 3211*6236dae4SAndroid Build Coastguard Worker 3212*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libngtcp2_crypto_boringssl, $want_tcp2_path) 3213*6236dae4SAndroid Build Coastguard Worker 3214*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 3215*6236dae4SAndroid Build Coastguard Worker LIB_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) 3216*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-l libngtcp2_crypto_boringssl` 3217*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_BORINGSSL]) 3218*6236dae4SAndroid Build Coastguard Worker 3219*6236dae4SAndroid Build Coastguard Worker CPP_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl 3220*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --cflags-only-I libngtcp2_crypto_boringssl` 3221*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_BORINGSSL]) 3222*6236dae4SAndroid Build Coastguard Worker 3223*6236dae4SAndroid Build Coastguard Worker LD_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) 3224*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-L libngtcp2_crypto_boringssl` 3225*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_BORINGSSL]) 3226*6236dae4SAndroid Build Coastguard Worker 3227*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_BORINGSSL" 3228*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_BORINGSSL" 3229*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_NGTCP2_CRYPTO_BORINGSSL $LIBS" 3230*6236dae4SAndroid Build Coastguard Worker 3231*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 3232*6236dae4SAndroid Build Coastguard Worker DIR_NGTCP2_CRYPTO_BORINGSSL=`echo $LD_NGTCP2_CRYPTO_BORINGSSL | $SED -e 's/^-L//'` 3233*6236dae4SAndroid Build Coastguard Worker fi 3234*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(ngtcp2_crypto_boringssl, ngtcp2_crypto_recv_client_initial_cb, 3235*6236dae4SAndroid Build Coastguard Worker [ 3236*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h, 3237*6236dae4SAndroid Build Coastguard Worker NGTCP2_ENABLED=1 3238*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_NGTCP2_CRYPTO_BORINGSSL, 1, [if ngtcp2_crypto_boringssl is in use]) 3239*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_NGTCP2_CRYPTO_BORINGSSL, [1]) 3240*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_BORINGSSL" 3241*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 3242*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_BORINGSSL to CURL_LIBRARY_PATH]) 3243*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libngtcp2_crypto_boringssl" 3244*6236dae4SAndroid Build Coastguard Worker ) 3245*6236dae4SAndroid Build Coastguard Worker ], 3246*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 3247*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 3248*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 3249*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 3250*6236dae4SAndroid Build Coastguard Worker ) 3251*6236dae4SAndroid Build Coastguard Worker 3252*6236dae4SAndroid Build Coastguard Worker else 3253*6236dae4SAndroid Build Coastguard Worker dnl no ngtcp2_crypto_boringssl pkg-config found, deal with it 3254*6236dae4SAndroid Build Coastguard Worker if test X"$want_tcp2" != Xdefault; then 3255*6236dae4SAndroid Build Coastguard Worker dnl To avoid link errors, we do not allow --with-ngtcp2 without 3256*6236dae4SAndroid Build Coastguard Worker dnl a pkgconfig file 3257*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_boringssl pkg-config file.]) 3258*6236dae4SAndroid Build Coastguard Worker fi 3259*6236dae4SAndroid Build Coastguard Worker fi 3260*6236dae4SAndroid Build Coastguard Workerfi 3261*6236dae4SAndroid Build Coastguard Worker 3262*6236dae4SAndroid Build Coastguard Workerif test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then 3263*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-ngtcp2_crypto_gnutls variables 3264*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 3265*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 3266*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 3267*6236dae4SAndroid Build Coastguard Worker 3268*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libngtcp2_crypto_gnutls, $want_tcp2_path) 3269*6236dae4SAndroid Build Coastguard Worker 3270*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 3271*6236dae4SAndroid Build Coastguard Worker LIB_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) 3272*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls` 3273*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_GNUTLS]) 3274*6236dae4SAndroid Build Coastguard Worker 3275*6236dae4SAndroid Build Coastguard Worker CPP_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl 3276*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls` 3277*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_GNUTLS]) 3278*6236dae4SAndroid Build Coastguard Worker 3279*6236dae4SAndroid Build Coastguard Worker LD_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) 3280*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-L libngtcp2_crypto_gnutls` 3281*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_GNUTLS]) 3282*6236dae4SAndroid Build Coastguard Worker 3283*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_GNUTLS" 3284*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_GNUTLS" 3285*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_NGTCP2_CRYPTO_GNUTLS $LIBS" 3286*6236dae4SAndroid Build Coastguard Worker 3287*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 3288*6236dae4SAndroid Build Coastguard Worker DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/^-L//'` 3289*6236dae4SAndroid Build Coastguard Worker fi 3290*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(ngtcp2_crypto_gnutls, ngtcp2_crypto_recv_client_initial_cb, 3291*6236dae4SAndroid Build Coastguard Worker [ 3292*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h, 3293*6236dae4SAndroid Build Coastguard Worker NGTCP2_ENABLED=1 3294*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_NGTCP2_CRYPTO_GNUTLS, 1, [if ngtcp2_crypto_gnutls is in use]) 3295*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_NGTCP2_CRYPTO_GNUTLS, [1]) 3296*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS" 3297*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 3298*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH]) 3299*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libngtcp2_crypto_gnutls" 3300*6236dae4SAndroid Build Coastguard Worker ) 3301*6236dae4SAndroid Build Coastguard Worker ], 3302*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 3303*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 3304*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 3305*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 3306*6236dae4SAndroid Build Coastguard Worker ) 3307*6236dae4SAndroid Build Coastguard Worker 3308*6236dae4SAndroid Build Coastguard Worker else 3309*6236dae4SAndroid Build Coastguard Worker dnl no ngtcp2_crypto_gnutls pkg-config found, deal with it 3310*6236dae4SAndroid Build Coastguard Worker if test X"$want_tcp2" != Xdefault; then 3311*6236dae4SAndroid Build Coastguard Worker dnl To avoid link errors, we do not allow --with-ngtcp2 without 3312*6236dae4SAndroid Build Coastguard Worker dnl a pkgconfig file 3313*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_gnutls pkg-config file.]) 3314*6236dae4SAndroid Build Coastguard Worker fi 3315*6236dae4SAndroid Build Coastguard Worker fi 3316*6236dae4SAndroid Build Coastguard Workerfi 3317*6236dae4SAndroid Build Coastguard Worker 3318*6236dae4SAndroid Build Coastguard Workerif test "x$NGTCP2_ENABLED" = "x1" -a "x$WOLFSSL_ENABLED" = "x1"; then 3319*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-ngtcp2_crypto_wolfssl variables 3320*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 3321*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 3322*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 3323*6236dae4SAndroid Build Coastguard Worker 3324*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libngtcp2_crypto_wolfssl, $want_tcp2_path) 3325*6236dae4SAndroid Build Coastguard Worker 3326*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 3327*6236dae4SAndroid Build Coastguard Worker LIB_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) 3328*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-l libngtcp2_crypto_wolfssl` 3329*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_WOLFSSL]) 3330*6236dae4SAndroid Build Coastguard Worker 3331*6236dae4SAndroid Build Coastguard Worker CPP_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl 3332*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --cflags-only-I libngtcp2_crypto_wolfssl` 3333*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_WOLFSSL]) 3334*6236dae4SAndroid Build Coastguard Worker 3335*6236dae4SAndroid Build Coastguard Worker LD_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) 3336*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-L libngtcp2_crypto_wolfssl` 3337*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_WOLFSSL]) 3338*6236dae4SAndroid Build Coastguard Worker 3339*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_WOLFSSL" 3340*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_WOLFSSL" 3341*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_NGTCP2_CRYPTO_WOLFSSL $LIBS" 3342*6236dae4SAndroid Build Coastguard Worker 3343*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 3344*6236dae4SAndroid Build Coastguard Worker DIR_NGTCP2_CRYPTO_WOLFSSL=`echo $LD_NGTCP2_CRYPTO_WOLFSSL | $SED -e 's/^-L//'` 3345*6236dae4SAndroid Build Coastguard Worker fi 3346*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(ngtcp2_crypto_wolfssl, ngtcp2_crypto_recv_client_initial_cb, 3347*6236dae4SAndroid Build Coastguard Worker [ 3348*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h, 3349*6236dae4SAndroid Build Coastguard Worker NGTCP2_ENABLED=1 3350*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_NGTCP2_CRYPTO_WOLFSSL, 1, [if ngtcp2_crypto_wolfssl is in use]) 3351*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_NGTCP2_CRYPTO_WOLFSSL, [1]) 3352*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_WOLFSSL" 3353*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 3354*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_WOLFSSL to CURL_LIBRARY_PATH]) 3355*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libngtcp2_crypto_wolfssl" 3356*6236dae4SAndroid Build Coastguard Worker ) 3357*6236dae4SAndroid Build Coastguard Worker ], 3358*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 3359*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 3360*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 3361*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 3362*6236dae4SAndroid Build Coastguard Worker ) 3363*6236dae4SAndroid Build Coastguard Worker 3364*6236dae4SAndroid Build Coastguard Worker else 3365*6236dae4SAndroid Build Coastguard Worker dnl no ngtcp2_crypto_wolfssl pkg-config found, deal with it 3366*6236dae4SAndroid Build Coastguard Worker if test X"$want_tcp2" != Xdefault; then 3367*6236dae4SAndroid Build Coastguard Worker dnl To avoid link errors, we do not allow --with-ngtcp2 without 3368*6236dae4SAndroid Build Coastguard Worker dnl a pkgconfig file 3369*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_wolfssl pkg-config file.]) 3370*6236dae4SAndroid Build Coastguard Worker fi 3371*6236dae4SAndroid Build Coastguard Worker fi 3372*6236dae4SAndroid Build Coastguard Workerfi 3373*6236dae4SAndroid Build Coastguard Worker 3374*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3375*6236dae4SAndroid Build Coastguard Workerdnl Check for OpenSSL QUIC 3376*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3377*6236dae4SAndroid Build Coastguard Worker 3378*6236dae4SAndroid Build Coastguard WorkerOPT_OPENSSL_QUIC="no" 3379*6236dae4SAndroid Build Coastguard Worker 3380*6236dae4SAndroid Build Coastguard Workerif test "x$disable_http" = "xyes" -o "x$OPENSSL_ENABLED" != "x1"; then 3381*6236dae4SAndroid Build Coastguard Worker # without HTTP or without openssl, no use 3382*6236dae4SAndroid Build Coastguard Worker OPT_OPENSSL_QUIC="no" 3383*6236dae4SAndroid Build Coastguard Workerfi 3384*6236dae4SAndroid Build Coastguard Worker 3385*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(openssl-quic, 3386*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-openssl-quic],[Enable OpenSSL QUIC usage]) 3387*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-openssl-quic],[Disable OpenSSL QUIC usage]), 3388*6236dae4SAndroid Build Coastguard Worker [OPT_OPENSSL_QUIC=$withval]) 3389*6236dae4SAndroid Build Coastguard Workercase "$OPT_OPENSSL_QUIC" in 3390*6236dae4SAndroid Build Coastguard Worker no) 3391*6236dae4SAndroid Build Coastguard Worker dnl --without-openssl-quic option used 3392*6236dae4SAndroid Build Coastguard Worker want_openssl_quic="no" 3393*6236dae4SAndroid Build Coastguard Worker ;; 3394*6236dae4SAndroid Build Coastguard Worker yes) 3395*6236dae4SAndroid Build Coastguard Worker dnl --with-openssl-quic option used 3396*6236dae4SAndroid Build Coastguard Worker want_openssl_quic="yes" 3397*6236dae4SAndroid Build Coastguard Worker ;; 3398*6236dae4SAndroid Build Coastguard Workeresac 3399*6236dae4SAndroid Build Coastguard Worker 3400*6236dae4SAndroid Build Coastguard Workercurl_openssl_quic_msg="no (--with-openssl-quic)" 3401*6236dae4SAndroid Build Coastguard Workerif test "x$want_openssl_quic" = "xyes"; then 3402*6236dae4SAndroid Build Coastguard Worker 3403*6236dae4SAndroid Build Coastguard Worker if test "$NGTCP2_ENABLED" = 1; then 3404*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-openssl-quic and --with-ngtcp2 are mutually exclusive]) 3405*6236dae4SAndroid Build Coastguard Worker fi 3406*6236dae4SAndroid Build Coastguard Worker if test "$have_openssl_quic" != 1; then 3407*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-openssl-quic requires quic support and OpenSSL >= 3.3.0]) 3408*6236dae4SAndroid Build Coastguard Worker fi 3409*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_OPENSSL_QUIC, 1, [if openssl QUIC is in use]) 3410*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_OPENSSL_QUIC, [1]) 3411*6236dae4SAndroid Build Coastguard Workerfi 3412*6236dae4SAndroid Build Coastguard Worker 3413*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3414*6236dae4SAndroid Build Coastguard Workerdnl Check for nghttp3 (HTTP/3 with ngtcp2) 3415*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3416*6236dae4SAndroid Build Coastguard Worker 3417*6236dae4SAndroid Build Coastguard WorkerOPT_NGHTTP3="yes" 3418*6236dae4SAndroid Build Coastguard Worker 3419*6236dae4SAndroid Build Coastguard Workerif test "x$USE_NGTCP2" != "x1" -a "x$USE_OPENSSL_QUIC" != "x1"; then 3420*6236dae4SAndroid Build Coastguard Worker # without ngtcp2 or openssl quic, nghttp3 is of no use for us 3421*6236dae4SAndroid Build Coastguard Worker OPT_NGHTTP3="no" 3422*6236dae4SAndroid Build Coastguard Worker want_nghttp3="no" 3423*6236dae4SAndroid Build Coastguard Workerfi 3424*6236dae4SAndroid Build Coastguard Worker 3425*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(nghttp3, 3426*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-nghttp3=PATH],[Enable nghttp3 usage]) 3427*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-nghttp3],[Disable nghttp3 usage]), 3428*6236dae4SAndroid Build Coastguard Worker [OPT_NGHTTP3=$withval]) 3429*6236dae4SAndroid Build Coastguard Workercase "$OPT_NGHTTP3" in 3430*6236dae4SAndroid Build Coastguard Worker no) 3431*6236dae4SAndroid Build Coastguard Worker dnl --without-nghttp3 option used 3432*6236dae4SAndroid Build Coastguard Worker want_nghttp3="no" 3433*6236dae4SAndroid Build Coastguard Worker ;; 3434*6236dae4SAndroid Build Coastguard Worker yes) 3435*6236dae4SAndroid Build Coastguard Worker dnl --with-nghttp3 option used without path 3436*6236dae4SAndroid Build Coastguard Worker want_nghttp3="default" 3437*6236dae4SAndroid Build Coastguard Worker want_nghttp3_path="" 3438*6236dae4SAndroid Build Coastguard Worker ;; 3439*6236dae4SAndroid Build Coastguard Worker *) 3440*6236dae4SAndroid Build Coastguard Worker dnl --with-nghttp3 option used with path 3441*6236dae4SAndroid Build Coastguard Worker want_nghttp3="yes" 3442*6236dae4SAndroid Build Coastguard Worker want_nghttp3_path="$withval/lib/pkgconfig" 3443*6236dae4SAndroid Build Coastguard Worker ;; 3444*6236dae4SAndroid Build Coastguard Workeresac 3445*6236dae4SAndroid Build Coastguard Worker 3446*6236dae4SAndroid Build Coastguard Workercurl_http3_msg="no (--with-nghttp3)" 3447*6236dae4SAndroid Build Coastguard Workerif test X"$want_nghttp3" != Xno; then 3448*6236dae4SAndroid Build Coastguard Worker 3449*6236dae4SAndroid Build Coastguard Worker if test "x$USE_NGTCP2" != "x1" -a "x$USE_OPENSSL_QUIC" != "x1"; then 3450*6236dae4SAndroid Build Coastguard Worker # without ngtcp2 or openssl quic, nghttp3 is of no use for us 3451*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([nghttp3 enabled without a QUIC library; enable ngtcp2 or OpenSSL-QUIC]) 3452*6236dae4SAndroid Build Coastguard Worker fi 3453*6236dae4SAndroid Build Coastguard Worker 3454*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-nghttp3 variables 3455*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 3456*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 3457*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 3458*6236dae4SAndroid Build Coastguard Worker 3459*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libnghttp3, $want_nghttp3_path) 3460*6236dae4SAndroid Build Coastguard Worker 3461*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 3462*6236dae4SAndroid Build Coastguard Worker LIB_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) 3463*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-l libnghttp3` 3464*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-l is $LIB_NGHTTP3]) 3465*6236dae4SAndroid Build Coastguard Worker 3466*6236dae4SAndroid Build Coastguard Worker CPP_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) dnl 3467*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --cflags-only-I libnghttp3` 3468*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-I is $CPP_NGHTTP3]) 3469*6236dae4SAndroid Build Coastguard Worker 3470*6236dae4SAndroid Build Coastguard Worker LD_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) 3471*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-L libnghttp3` 3472*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-L is $LD_NGHTTP3]) 3473*6236dae4SAndroid Build Coastguard Worker 3474*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_NGHTTP3" 3475*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_NGHTTP3" 3476*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_NGHTTP3 $LIBS" 3477*6236dae4SAndroid Build Coastguard Worker 3478*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 3479*6236dae4SAndroid Build Coastguard Worker DIR_NGHTTP3=`echo $LD_NGHTTP3 | $SED -e 's/^-L//'` 3480*6236dae4SAndroid Build Coastguard Worker fi 3481*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(nghttp3, nghttp3_conn_client_new_versioned, 3482*6236dae4SAndroid Build Coastguard Worker [ 3483*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(nghttp3/nghttp3.h, 3484*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_NGHTTP3, 1, [if nghttp3 is in use]) 3485*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_NGHTTP3, [1]) 3486*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGHTTP3" 3487*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 3488*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH]) 3489*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libnghttp3" 3490*6236dae4SAndroid Build Coastguard Worker ) 3491*6236dae4SAndroid Build Coastguard Worker ], 3492*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 3493*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 3494*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 3495*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 3496*6236dae4SAndroid Build Coastguard Worker ) 3497*6236dae4SAndroid Build Coastguard Worker 3498*6236dae4SAndroid Build Coastguard Worker else 3499*6236dae4SAndroid Build Coastguard Worker dnl no nghttp3 pkg-config found, deal with it 3500*6236dae4SAndroid Build Coastguard Worker if test X"$want_nghttp3" != Xdefault; then 3501*6236dae4SAndroid Build Coastguard Worker dnl To avoid link errors, we do not allow --with-nghttp3 without 3502*6236dae4SAndroid Build Coastguard Worker dnl a pkgconfig file 3503*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-nghttp3 was specified but could not find nghttp3 pkg-config file.]) 3504*6236dae4SAndroid Build Coastguard Worker fi 3505*6236dae4SAndroid Build Coastguard Worker fi 3506*6236dae4SAndroid Build Coastguard Workerfi 3507*6236dae4SAndroid Build Coastguard Worker 3508*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3509*6236dae4SAndroid Build Coastguard Workerdnl Check for ngtcp2 and nghttp3 (HTTP/3 with ngtcp2 + nghttp3) 3510*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3511*6236dae4SAndroid Build Coastguard Worker 3512*6236dae4SAndroid Build Coastguard Workerif test "x$NGTCP2_ENABLED" = "x1" -a "x$USE_NGHTTP3" = "x1"; then 3513*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_NGTCP2_H3, 1, [if ngtcp2 + nghttp3 is in use]) 3514*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_NGTCP2_H3, [1]) 3515*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([HTTP3 support is experimental]) 3516*6236dae4SAndroid Build Coastguard Worker curl_h3_msg="enabled (ngtcp2 + nghttp3)" 3517*6236dae4SAndroid Build Coastguard Workerfi 3518*6236dae4SAndroid Build Coastguard Worker 3519*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3520*6236dae4SAndroid Build Coastguard Workerdnl Check for OpenSSL and nghttp3 (HTTP/3 with nghttp3 using OpenSSL QUIC) 3521*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3522*6236dae4SAndroid Build Coastguard Worker 3523*6236dae4SAndroid Build Coastguard Workerif test "x$USE_OPENSSL_QUIC" = "x1" -a "x$USE_NGHTTP3" = "x1"; then 3524*6236dae4SAndroid Build Coastguard Worker experimental="$experimental HTTP3" 3525*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_OPENSSL_H3, 1, [if openssl quic + nghttp3 is in use]) 3526*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_OPENSSL_H3, [1]) 3527*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([HTTP3 support is experimental]) 3528*6236dae4SAndroid Build Coastguard Worker curl_h3_msg="enabled (openssl + nghttp3)" 3529*6236dae4SAndroid Build Coastguard Workerfi 3530*6236dae4SAndroid Build Coastguard Worker 3531*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3532*6236dae4SAndroid Build Coastguard Workerdnl Check for quiche (QUIC) 3533*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3534*6236dae4SAndroid Build Coastguard Worker 3535*6236dae4SAndroid Build Coastguard WorkerOPT_QUICHE="no" 3536*6236dae4SAndroid Build Coastguard Worker 3537*6236dae4SAndroid Build Coastguard Workerif test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then 3538*6236dae4SAndroid Build Coastguard Worker # without HTTP or with ngtcp2, quiche is no use 3539*6236dae4SAndroid Build Coastguard Worker OPT_QUICHE="no" 3540*6236dae4SAndroid Build Coastguard Workerfi 3541*6236dae4SAndroid Build Coastguard Worker 3542*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(quiche, 3543*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-quiche=PATH],[Enable quiche usage]) 3544*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-quiche],[Disable quiche usage]), 3545*6236dae4SAndroid Build Coastguard Worker [OPT_QUICHE=$withval]) 3546*6236dae4SAndroid Build Coastguard Workercase "$OPT_QUICHE" in 3547*6236dae4SAndroid Build Coastguard Worker no) 3548*6236dae4SAndroid Build Coastguard Worker dnl --without-quiche option used 3549*6236dae4SAndroid Build Coastguard Worker want_quiche="no" 3550*6236dae4SAndroid Build Coastguard Worker ;; 3551*6236dae4SAndroid Build Coastguard Worker yes) 3552*6236dae4SAndroid Build Coastguard Worker dnl --with-quiche option used without path 3553*6236dae4SAndroid Build Coastguard Worker want_quiche="default" 3554*6236dae4SAndroid Build Coastguard Worker want_quiche_path="" 3555*6236dae4SAndroid Build Coastguard Worker ;; 3556*6236dae4SAndroid Build Coastguard Worker *) 3557*6236dae4SAndroid Build Coastguard Worker dnl --with-quiche option used with path 3558*6236dae4SAndroid Build Coastguard Worker want_quiche="yes" 3559*6236dae4SAndroid Build Coastguard Worker want_quiche_path="$withval" 3560*6236dae4SAndroid Build Coastguard Worker ;; 3561*6236dae4SAndroid Build Coastguard Workeresac 3562*6236dae4SAndroid Build Coastguard Worker 3563*6236dae4SAndroid Build Coastguard Workerif test X"$want_quiche" != Xno; then 3564*6236dae4SAndroid Build Coastguard Worker 3565*6236dae4SAndroid Build Coastguard Worker if test "$QUIC_ENABLED" != "yes"; then 3566*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-quiche a no-no]) 3567*6236dae4SAndroid Build Coastguard Worker fi 3568*6236dae4SAndroid Build Coastguard Worker 3569*6236dae4SAndroid Build Coastguard Worker if test "$NGHTTP3_ENABLED" = 1; then 3570*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-quiche and --with-ngtcp2 are mutually exclusive]) 3571*6236dae4SAndroid Build Coastguard Worker fi 3572*6236dae4SAndroid Build Coastguard Worker 3573*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-quiche variables 3574*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 3575*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 3576*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 3577*6236dae4SAndroid Build Coastguard Worker 3578*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(quiche, $want_quiche_path) 3579*6236dae4SAndroid Build Coastguard Worker 3580*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 3581*6236dae4SAndroid Build Coastguard Worker LIB_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) 3582*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-l quiche` 3583*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-l is $LIB_QUICHE]) 3584*6236dae4SAndroid Build Coastguard Worker 3585*6236dae4SAndroid Build Coastguard Worker CPP_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) dnl 3586*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --cflags-only-I quiche` 3587*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-I is $CPP_QUICHE]) 3588*6236dae4SAndroid Build Coastguard Worker 3589*6236dae4SAndroid Build Coastguard Worker LD_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) 3590*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-L quiche` 3591*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-L is $LD_QUICHE]) 3592*6236dae4SAndroid Build Coastguard Worker 3593*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_QUICHE" 3594*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_QUICHE" 3595*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_QUICHE $LIBS" 3596*6236dae4SAndroid Build Coastguard Worker 3597*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 3598*6236dae4SAndroid Build Coastguard Worker DIR_QUICHE=`echo $LD_QUICHE | $SED -e 's/^-L//'` 3599*6236dae4SAndroid Build Coastguard Worker fi 3600*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(quiche, quiche_conn_send_ack_eliciting, 3601*6236dae4SAndroid Build Coastguard Worker [ 3602*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(quiche.h, 3603*6236dae4SAndroid Build Coastguard Worker experimental="$experimental HTTP3" 3604*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([HTTP3 support is experimental]) 3605*6236dae4SAndroid Build Coastguard Worker curl_h3_msg="enabled (quiche)" 3606*6236dae4SAndroid Build Coastguard Worker QUICHE_ENABLED=1 3607*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_QUICHE, 1, [if quiche is in use]) 3608*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_QUICHE, [1]) 3609*6236dae4SAndroid Build Coastguard Worker AC_CHECK_FUNCS([quiche_conn_set_qlog_fd]) 3610*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_QUICHE" 3611*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 3612*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_QUICHE to CURL_LIBRARY_PATH]) 3613*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE quiche", 3614*6236dae4SAndroid Build Coastguard Worker [], 3615*6236dae4SAndroid Build Coastguard Worker [ 3616*6236dae4SAndroid Build Coastguard Worker AC_INCLUDES_DEFAULT 3617*6236dae4SAndroid Build Coastguard Worker #include <sys/socket.h> 3618*6236dae4SAndroid Build Coastguard Worker ] 3619*6236dae4SAndroid Build Coastguard Worker ) 3620*6236dae4SAndroid Build Coastguard Worker ], 3621*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 3622*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([couldn't use quiche]) 3623*6236dae4SAndroid Build Coastguard Worker ) 3624*6236dae4SAndroid Build Coastguard Worker else 3625*6236dae4SAndroid Build Coastguard Worker dnl no quiche pkg-config found, deal with it 3626*6236dae4SAndroid Build Coastguard Worker if test X"$want_quiche" != Xdefault; then 3627*6236dae4SAndroid Build Coastguard Worker dnl To avoid link errors, we do not allow --with-quiche without 3628*6236dae4SAndroid Build Coastguard Worker dnl a pkgconfig file 3629*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-quiche was specified but could not find quiche pkg-config file.]) 3630*6236dae4SAndroid Build Coastguard Worker fi 3631*6236dae4SAndroid Build Coastguard Worker fi 3632*6236dae4SAndroid Build Coastguard Workerfi 3633*6236dae4SAndroid Build Coastguard Worker 3634*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3635*6236dae4SAndroid Build Coastguard Workerdnl Check for msh3/msquic (QUIC) 3636*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3637*6236dae4SAndroid Build Coastguard Worker 3638*6236dae4SAndroid Build Coastguard WorkerOPT_MSH3="no" 3639*6236dae4SAndroid Build Coastguard Worker 3640*6236dae4SAndroid Build Coastguard Workerif test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then 3641*6236dae4SAndroid Build Coastguard Worker # without HTTP or with ngtcp2, msh3 is no use 3642*6236dae4SAndroid Build Coastguard Worker OPT_MSH3="no" 3643*6236dae4SAndroid Build Coastguard Workerfi 3644*6236dae4SAndroid Build Coastguard Worker 3645*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(msh3, 3646*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-msh3=PATH],[Enable msh3 usage]) 3647*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-msh3],[Disable msh3 usage]), 3648*6236dae4SAndroid Build Coastguard Worker [OPT_MSH3=$withval]) 3649*6236dae4SAndroid Build Coastguard Workercase "$OPT_MSH3" in 3650*6236dae4SAndroid Build Coastguard Worker no) 3651*6236dae4SAndroid Build Coastguard Worker dnl --without-msh3 option used 3652*6236dae4SAndroid Build Coastguard Worker want_msh3="no" 3653*6236dae4SAndroid Build Coastguard Worker ;; 3654*6236dae4SAndroid Build Coastguard Worker yes) 3655*6236dae4SAndroid Build Coastguard Worker dnl --with-msh3 option used without path 3656*6236dae4SAndroid Build Coastguard Worker want_msh3="default" 3657*6236dae4SAndroid Build Coastguard Worker want_msh3_path="" 3658*6236dae4SAndroid Build Coastguard Worker ;; 3659*6236dae4SAndroid Build Coastguard Worker *) 3660*6236dae4SAndroid Build Coastguard Worker dnl --with-msh3 option used with path 3661*6236dae4SAndroid Build Coastguard Worker want_msh3="yes" 3662*6236dae4SAndroid Build Coastguard Worker want_msh3_path="$withval" 3663*6236dae4SAndroid Build Coastguard Worker ;; 3664*6236dae4SAndroid Build Coastguard Workeresac 3665*6236dae4SAndroid Build Coastguard Worker 3666*6236dae4SAndroid Build Coastguard Workerif test X"$want_msh3" != Xno; then 3667*6236dae4SAndroid Build Coastguard Worker 3668*6236dae4SAndroid Build Coastguard Worker dnl msh3 on non-Windows needs an OpenSSL with the QUIC API 3669*6236dae4SAndroid Build Coastguard Worker if test "$curl_cv_native_windows" != "yes"; then 3670*6236dae4SAndroid Build Coastguard Worker if test "$QUIC_ENABLED" != "yes"; then 3671*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-msh3 a no-no]) 3672*6236dae4SAndroid Build Coastguard Worker fi 3673*6236dae4SAndroid Build Coastguard Worker if test "$OPENSSL_ENABLED" != "1"; then 3674*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([msh3/msquic requires OpenSSL]) 3675*6236dae4SAndroid Build Coastguard Worker fi 3676*6236dae4SAndroid Build Coastguard Worker fi 3677*6236dae4SAndroid Build Coastguard Worker 3678*6236dae4SAndroid Build Coastguard Worker if test "$NGHTTP3_ENABLED" = 1; then 3679*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-msh3 and --with-ngtcp2 are mutually exclusive]) 3680*6236dae4SAndroid Build Coastguard Worker fi 3681*6236dae4SAndroid Build Coastguard Worker if test "$QUICHE_ENABLED" = 1; then 3682*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-msh3 and --with-quiche are mutually exclusive]) 3683*6236dae4SAndroid Build Coastguard Worker fi 3684*6236dae4SAndroid Build Coastguard Worker 3685*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-msh3 variables 3686*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 3687*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 3688*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 3689*6236dae4SAndroid Build Coastguard Worker 3690*6236dae4SAndroid Build Coastguard Worker if test -n "$want_msh3_path"; then 3691*6236dae4SAndroid Build Coastguard Worker LD_MSH3="-L$want_msh3_path/lib" 3692*6236dae4SAndroid Build Coastguard Worker CPP_MSH3="-I$want_msh3_path/include" 3693*6236dae4SAndroid Build Coastguard Worker DIR_MSH3="$want_msh3_path/lib" 3694*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_MSH3" 3695*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_MSH3" 3696*6236dae4SAndroid Build Coastguard Worker fi 3697*6236dae4SAndroid Build Coastguard Worker LIBS="-lmsh3 $LIBS" 3698*6236dae4SAndroid Build Coastguard Worker 3699*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(msh3, MsH3ApiOpen, 3700*6236dae4SAndroid Build Coastguard Worker [ 3701*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(msh3.h, 3702*6236dae4SAndroid Build Coastguard Worker curl_h3_msg="enabled (msh3)" 3703*6236dae4SAndroid Build Coastguard Worker MSH3_ENABLED=1 3704*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_MSH3, 1, [if msh3 is in use]) 3705*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_MSH3, [1]) 3706*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_MSH3" 3707*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 3708*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_MSH3 to CURL_LIBRARY_PATH]) 3709*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libmsh3" 3710*6236dae4SAndroid Build Coastguard Worker experimental="$experimental HTTP3" 3711*6236dae4SAndroid Build Coastguard Worker ) 3712*6236dae4SAndroid Build Coastguard Worker ], 3713*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 3714*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 3715*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 3716*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 3717*6236dae4SAndroid Build Coastguard Worker ) 3718*6236dae4SAndroid Build Coastguard Workerfi 3719*6236dae4SAndroid Build Coastguard Worker 3720*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3721*6236dae4SAndroid Build Coastguard Workerdnl libuv is only ever used for debug purposes 3722*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3723*6236dae4SAndroid Build Coastguard Worker 3724*6236dae4SAndroid Build Coastguard WorkerOPT_LIBUV=no 3725*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(libuv, 3726*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-libuv=PATH],[Enable libuv]) 3727*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-libuv],[Disable libuv]), 3728*6236dae4SAndroid Build Coastguard Worker [OPT_LIBUV=$withval]) 3729*6236dae4SAndroid Build Coastguard Workercase "$OPT_LIBUV" in 3730*6236dae4SAndroid Build Coastguard Worker no) 3731*6236dae4SAndroid Build Coastguard Worker dnl --without-libuv option used 3732*6236dae4SAndroid Build Coastguard Worker want_libuv="no" 3733*6236dae4SAndroid Build Coastguard Worker ;; 3734*6236dae4SAndroid Build Coastguard Worker yes) 3735*6236dae4SAndroid Build Coastguard Worker dnl --with-libuv option used without path 3736*6236dae4SAndroid Build Coastguard Worker want_libuv="default" 3737*6236dae4SAndroid Build Coastguard Worker want_libuv_path="" 3738*6236dae4SAndroid Build Coastguard Worker ;; 3739*6236dae4SAndroid Build Coastguard Worker *) 3740*6236dae4SAndroid Build Coastguard Worker dnl --with-libuv option used with path 3741*6236dae4SAndroid Build Coastguard Worker want_libuv="yes" 3742*6236dae4SAndroid Build Coastguard Worker want_libuv_path="$withval" 3743*6236dae4SAndroid Build Coastguard Worker ;; 3744*6236dae4SAndroid Build Coastguard Workeresac 3745*6236dae4SAndroid Build Coastguard Worker 3746*6236dae4SAndroid Build Coastguard Workerif test X"$want_libuv" != Xno; then 3747*6236dae4SAndroid Build Coastguard Worker if test x$want_debug != xyes; then 3748*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([Using libuv without debug support enabled is useless]) 3749*6236dae4SAndroid Build Coastguard Worker fi 3750*6236dae4SAndroid Build Coastguard Worker 3751*6236dae4SAndroid Build Coastguard Worker dnl backup the pre-libuv variables 3752*6236dae4SAndroid Build Coastguard Worker CLEANLDFLAGS="$LDFLAGS" 3753*6236dae4SAndroid Build Coastguard Worker CLEANCPPFLAGS="$CPPFLAGS" 3754*6236dae4SAndroid Build Coastguard Worker CLEANLIBS="$LIBS" 3755*6236dae4SAndroid Build Coastguard Worker 3756*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(libuv, $want_libuv_path) 3757*6236dae4SAndroid Build Coastguard Worker 3758*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 3759*6236dae4SAndroid Build Coastguard Worker LIB_LIBUV=`CURL_EXPORT_PCDIR([$want_libuv_path]) 3760*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-l libuv` 3761*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-l is $LIB_LIBUV]) 3762*6236dae4SAndroid Build Coastguard Worker 3763*6236dae4SAndroid Build Coastguard Worker CPP_LIBUV=`CURL_EXPORT_PCDIR([$want_libuv_path]) dnl 3764*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --cflags-only-I libuv` 3765*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-I is $CPP_LIBUV]) 3766*6236dae4SAndroid Build Coastguard Worker 3767*6236dae4SAndroid Build Coastguard Worker LD_LIBUV=`CURL_EXPORT_PCDIR([$want_libuv_path]) 3768*6236dae4SAndroid Build Coastguard Worker $PKGCONFIG --libs-only-L libuv` 3769*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([-L is $LD_LIBUV]) 3770*6236dae4SAndroid Build Coastguard Worker 3771*6236dae4SAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $LD_LIBUV" 3772*6236dae4SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS $CPP_LIBUV" 3773*6236dae4SAndroid Build Coastguard Worker LIBS="$LIB_LIBUV $LIBS" 3774*6236dae4SAndroid Build Coastguard Worker 3775*6236dae4SAndroid Build Coastguard Worker if test "x$cross_compiling" != "xyes"; then 3776*6236dae4SAndroid Build Coastguard Worker DIR_LIBUV=`echo $LD_LIBUV | $SED -e 's/^-L//'` 3777*6236dae4SAndroid Build Coastguard Worker fi 3778*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(uv, uv_default_loop, 3779*6236dae4SAndroid Build Coastguard Worker [ 3780*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADERS(uv.h, 3781*6236dae4SAndroid Build Coastguard Worker LIBUV_ENABLED=1 3782*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_LIBUV, 1, [if libuv is in use]) 3783*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_LIBUV, [1]) 3784*6236dae4SAndroid Build Coastguard Worker CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_LIBUV" 3785*6236dae4SAndroid Build Coastguard Worker export CURL_LIBRARY_PATH 3786*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([Added $DIR_LIBUV to CURL_LIBRARY_PATH]) 3787*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libuv" 3788*6236dae4SAndroid Build Coastguard Worker ) 3789*6236dae4SAndroid Build Coastguard Worker ], 3790*6236dae4SAndroid Build Coastguard Worker dnl not found, revert back to clean variables 3791*6236dae4SAndroid Build Coastguard Worker LDFLAGS=$CLEANLDFLAGS 3792*6236dae4SAndroid Build Coastguard Worker CPPFLAGS=$CLEANCPPFLAGS 3793*6236dae4SAndroid Build Coastguard Worker LIBS=$CLEANLIBS 3794*6236dae4SAndroid Build Coastguard Worker ) 3795*6236dae4SAndroid Build Coastguard Worker 3796*6236dae4SAndroid Build Coastguard Worker else 3797*6236dae4SAndroid Build Coastguard Worker dnl no libuv pkg-config found, deal with it 3798*6236dae4SAndroid Build Coastguard Worker if test X"$want_libuv" != Xdefault; then 3799*6236dae4SAndroid Build Coastguard Worker dnl To avoid link errors, we do not allow --with-libuv without 3800*6236dae4SAndroid Build Coastguard Worker dnl a pkgconfig file 3801*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--with-libuv was specified but could not find libuv pkg-config file.]) 3802*6236dae4SAndroid Build Coastguard Worker fi 3803*6236dae4SAndroid Build Coastguard Worker fi 3804*6236dae4SAndroid Build Coastguard Worker 3805*6236dae4SAndroid Build Coastguard Workerfi 3806*6236dae4SAndroid Build Coastguard Worker 3807*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3808*6236dae4SAndroid Build Coastguard Workerdnl Check for zsh completion path 3809*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3810*6236dae4SAndroid Build Coastguard Worker 3811*6236dae4SAndroid Build Coastguard WorkerOPT_ZSH_FPATH=default 3812*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(zsh-functions-dir, 3813*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-zsh-functions-dir=PATH],[Install zsh completions to PATH]) 3814*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-zsh-functions-dir],[Do not install zsh completions]), 3815*6236dae4SAndroid Build Coastguard Worker [OPT_ZSH_FPATH=$withval]) 3816*6236dae4SAndroid Build Coastguard Workercase "$OPT_ZSH_FPATH" in 3817*6236dae4SAndroid Build Coastguard Worker default|no) 3818*6236dae4SAndroid Build Coastguard Worker dnl --without-zsh-functions-dir option used 3819*6236dae4SAndroid Build Coastguard Worker ;; 3820*6236dae4SAndroid Build Coastguard Worker yes) 3821*6236dae4SAndroid Build Coastguard Worker dnl --with-zsh-functions-dir option used without path 3822*6236dae4SAndroid Build Coastguard Worker ZSH_FUNCTIONS_DIR="$datarootdir/zsh/site-functions" 3823*6236dae4SAndroid Build Coastguard Worker AC_SUBST(ZSH_FUNCTIONS_DIR) 3824*6236dae4SAndroid Build Coastguard Worker ;; 3825*6236dae4SAndroid Build Coastguard Worker *) 3826*6236dae4SAndroid Build Coastguard Worker dnl --with-zsh-functions-dir option used with path 3827*6236dae4SAndroid Build Coastguard Worker ZSH_FUNCTIONS_DIR="$withval" 3828*6236dae4SAndroid Build Coastguard Worker AC_SUBST(ZSH_FUNCTIONS_DIR) 3829*6236dae4SAndroid Build Coastguard Worker ;; 3830*6236dae4SAndroid Build Coastguard Workeresac 3831*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL(USE_ZSH_COMPLETION, test x"$ZSH_FUNCTIONS_DIR" != x) 3832*6236dae4SAndroid Build Coastguard Worker 3833*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3834*6236dae4SAndroid Build Coastguard Workerdnl Check for fish completion path 3835*6236dae4SAndroid Build Coastguard Workerdnl ********************************************************************** 3836*6236dae4SAndroid Build Coastguard Worker 3837*6236dae4SAndroid Build Coastguard WorkerOPT_FISH_FPATH=default 3838*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH(fish-functions-dir, 3839*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--with-fish-functions-dir=PATH],[Install fish completions to PATH]) 3840*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--without-fish-functions-dir],[Do not install fish completions]), 3841*6236dae4SAndroid Build Coastguard Worker [OPT_FISH_FPATH=$withval]) 3842*6236dae4SAndroid Build Coastguard Workercase "$OPT_FISH_FPATH" in 3843*6236dae4SAndroid Build Coastguard Worker default|no) 3844*6236dae4SAndroid Build Coastguard Worker dnl --without-fish-functions-dir option used 3845*6236dae4SAndroid Build Coastguard Worker ;; 3846*6236dae4SAndroid Build Coastguard Worker yes) 3847*6236dae4SAndroid Build Coastguard Worker dnl --with-fish-functions-dir option used without path 3848*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_PKGCONFIG(fish) 3849*6236dae4SAndroid Build Coastguard Worker if test "$PKGCONFIG" != "no"; then 3850*6236dae4SAndroid Build Coastguard Worker FISH_FUNCTIONS_DIR=`$PKGCONFIG --variable completionsdir fish` 3851*6236dae4SAndroid Build Coastguard Worker else 3852*6236dae4SAndroid Build Coastguard Worker FISH_FUNCTIONS_DIR="$datarootdir/fish/vendor_completions.d" 3853*6236dae4SAndroid Build Coastguard Worker fi 3854*6236dae4SAndroid Build Coastguard Worker AC_SUBST(FISH_FUNCTIONS_DIR) 3855*6236dae4SAndroid Build Coastguard Worker ;; 3856*6236dae4SAndroid Build Coastguard Worker *) 3857*6236dae4SAndroid Build Coastguard Worker dnl --with-fish-functions-dir option used with path 3858*6236dae4SAndroid Build Coastguard Worker FISH_FUNCTIONS_DIR="$withval" 3859*6236dae4SAndroid Build Coastguard Worker AC_SUBST(FISH_FUNCTIONS_DIR) 3860*6236dae4SAndroid Build Coastguard Worker ;; 3861*6236dae4SAndroid Build Coastguard Workeresac 3862*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL(USE_FISH_COMPLETION, test x"$FISH_FUNCTIONS_DIR" != x) 3863*6236dae4SAndroid Build Coastguard Worker 3864*6236dae4SAndroid Build Coastguard Workerdnl Now check for the very most basic headers. Then we can use these 3865*6236dae4SAndroid Build Coastguard Workerdnl ones as default-headers when checking for the rest! 3866*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_HEADERS( 3867*6236dae4SAndroid Build Coastguard Worker sys/types.h \ 3868*6236dae4SAndroid Build Coastguard Worker sys/time.h \ 3869*6236dae4SAndroid Build Coastguard Worker sys/select.h \ 3870*6236dae4SAndroid Build Coastguard Worker sys/socket.h \ 3871*6236dae4SAndroid Build Coastguard Worker sys/ioctl.h \ 3872*6236dae4SAndroid Build Coastguard Worker unistd.h \ 3873*6236dae4SAndroid Build Coastguard Worker stdlib.h \ 3874*6236dae4SAndroid Build Coastguard Worker arpa/inet.h \ 3875*6236dae4SAndroid Build Coastguard Worker net/if.h \ 3876*6236dae4SAndroid Build Coastguard Worker netinet/in.h \ 3877*6236dae4SAndroid Build Coastguard Worker netinet/in6.h \ 3878*6236dae4SAndroid Build Coastguard Worker sys/un.h \ 3879*6236dae4SAndroid Build Coastguard Worker linux/tcp.h \ 3880*6236dae4SAndroid Build Coastguard Worker netinet/tcp.h \ 3881*6236dae4SAndroid Build Coastguard Worker netinet/udp.h \ 3882*6236dae4SAndroid Build Coastguard Worker netdb.h \ 3883*6236dae4SAndroid Build Coastguard Worker sys/sockio.h \ 3884*6236dae4SAndroid Build Coastguard Worker sys/stat.h \ 3885*6236dae4SAndroid Build Coastguard Worker sys/param.h \ 3886*6236dae4SAndroid Build Coastguard Worker termios.h \ 3887*6236dae4SAndroid Build Coastguard Worker termio.h \ 3888*6236dae4SAndroid Build Coastguard Worker fcntl.h \ 3889*6236dae4SAndroid Build Coastguard Worker io.h \ 3890*6236dae4SAndroid Build Coastguard Worker pwd.h \ 3891*6236dae4SAndroid Build Coastguard Worker utime.h \ 3892*6236dae4SAndroid Build Coastguard Worker sys/utime.h \ 3893*6236dae4SAndroid Build Coastguard Worker sys/poll.h \ 3894*6236dae4SAndroid Build Coastguard Worker poll.h \ 3895*6236dae4SAndroid Build Coastguard Worker sys/resource.h \ 3896*6236dae4SAndroid Build Coastguard Worker libgen.h \ 3897*6236dae4SAndroid Build Coastguard Worker locale.h \ 3898*6236dae4SAndroid Build Coastguard Worker stdbool.h \ 3899*6236dae4SAndroid Build Coastguard Worker sys/filio.h \ 3900*6236dae4SAndroid Build Coastguard Worker sys/wait.h \ 3901*6236dae4SAndroid Build Coastguard Worker sys/eventfd.h \ 3902*6236dae4SAndroid Build Coastguard Worker setjmp.h, 3903*6236dae4SAndroid Build Coastguard Workerdnl to do if not found 3904*6236dae4SAndroid Build Coastguard Worker[], 3905*6236dae4SAndroid Build Coastguard Workerdnl to do if found 3906*6236dae4SAndroid Build Coastguard Worker[], 3907*6236dae4SAndroid Build Coastguard Workerdnl default includes 3908*6236dae4SAndroid Build Coastguard Worker[ 3909*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_SYS_TYPES_H 3910*6236dae4SAndroid Build Coastguard Worker#include <sys/types.h> 3911*6236dae4SAndroid Build Coastguard Worker#endif 3912*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_SYS_TIME_H 3913*6236dae4SAndroid Build Coastguard Worker#include <sys/time.h> 3914*6236dae4SAndroid Build Coastguard Worker#endif 3915*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_SYS_SELECT_H 3916*6236dae4SAndroid Build Coastguard Worker#include <sys/select.h> 3917*6236dae4SAndroid Build Coastguard Worker#elif defined(HAVE_UNISTD_H) 3918*6236dae4SAndroid Build Coastguard Worker#include <unistd.h> 3919*6236dae4SAndroid Build Coastguard Worker#endif 3920*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_SYS_SOCKET_H 3921*6236dae4SAndroid Build Coastguard Worker#include <sys/socket.h> 3922*6236dae4SAndroid Build Coastguard Worker#endif 3923*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_NETINET_IN_H 3924*6236dae4SAndroid Build Coastguard Worker#include <netinet/in.h> 3925*6236dae4SAndroid Build Coastguard Worker#endif 3926*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_NETINET_IN6_H 3927*6236dae4SAndroid Build Coastguard Worker#include <netinet/in6.h> /* is this really required to detect other headers? */ 3928*6236dae4SAndroid Build Coastguard Worker#endif 3929*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_SYS_UN_H 3930*6236dae4SAndroid Build Coastguard Worker#include <sys/un.h> /* is this really required to detect other headers? */ 3931*6236dae4SAndroid Build Coastguard Worker#endif 3932*6236dae4SAndroid Build Coastguard Worker] 3933*6236dae4SAndroid Build Coastguard Worker) 3934*6236dae4SAndroid Build Coastguard Worker 3935*6236dae4SAndroid Build Coastguard Worker 3936*6236dae4SAndroid Build Coastguard Workerdnl Checks for typedefs, structures, and compiler characteristics. 3937*6236dae4SAndroid Build Coastguard WorkerAC_C_CONST 3938*6236dae4SAndroid Build Coastguard WorkerAC_TYPE_SIZE_T 3939*6236dae4SAndroid Build Coastguard Worker 3940*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_STRUCT_TIMEVAL 3941*6236dae4SAndroid Build Coastguard WorkerCURL_VERIFY_RUNTIMELIBS 3942*6236dae4SAndroid Build Coastguard Worker 3943*6236dae4SAndroid Build Coastguard WorkerCURL_SIZEOF(size_t) 3944*6236dae4SAndroid Build Coastguard WorkerCURL_SIZEOF(long) 3945*6236dae4SAndroid Build Coastguard WorkerCURL_SIZEOF(int) 3946*6236dae4SAndroid Build Coastguard WorkerCURL_SIZEOF(time_t) 3947*6236dae4SAndroid Build Coastguard WorkerCURL_SIZEOF(off_t) 3948*6236dae4SAndroid Build Coastguard Worker 3949*6236dae4SAndroid Build Coastguard Workero=$CPPFLAGS 3950*6236dae4SAndroid Build Coastguard WorkerCPPFLAGS="-I$srcdir/include $CPPFLAGS" 3951*6236dae4SAndroid Build Coastguard WorkerCURL_SIZEOF(curl_off_t, [ 3952*6236dae4SAndroid Build Coastguard Worker#include <curl/system.h> 3953*6236dae4SAndroid Build Coastguard Worker]) 3954*6236dae4SAndroid Build Coastguard WorkerCURL_SIZEOF(curl_socket_t, [ 3955*6236dae4SAndroid Build Coastguard Worker#include <curl/curl.h> 3956*6236dae4SAndroid Build Coastguard Worker]) 3957*6236dae4SAndroid Build Coastguard WorkerCPPFLAGS=$o 3958*6236dae4SAndroid Build Coastguard Worker 3959*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_TYPE(long long, 3960*6236dae4SAndroid Build Coastguard Worker [AC_DEFINE(HAVE_LONGLONG, 1, 3961*6236dae4SAndroid Build Coastguard Worker [Define to 1 if the compiler supports the 'long long' data type.])] 3962*6236dae4SAndroid Build Coastguard Worker longlong="yes" 3963*6236dae4SAndroid Build Coastguard Worker) 3964*6236dae4SAndroid Build Coastguard Worker 3965*6236dae4SAndroid Build Coastguard Workerif test ${ac_cv_sizeof_curl_off_t} -lt 8; then 3966*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([64 bit curl_off_t is required]) 3967*6236dae4SAndroid Build Coastguard Workerfi 3968*6236dae4SAndroid Build Coastguard Worker 3969*6236dae4SAndroid Build Coastguard Worker# check for ssize_t 3970*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_TYPE(ssize_t, , 3971*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(ssize_t, int, [the signed version of size_t])) 3972*6236dae4SAndroid Build Coastguard Worker 3973*6236dae4SAndroid Build Coastguard Worker# check for bool type 3974*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_TYPE([bool],[ 3975*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_BOOL_T, 1, 3976*6236dae4SAndroid Build Coastguard Worker [Define to 1 if bool is an available type.]) 3977*6236dae4SAndroid Build Coastguard Worker], ,[ 3978*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_SYS_TYPES_H 3979*6236dae4SAndroid Build Coastguard Worker#include <sys/types.h> 3980*6236dae4SAndroid Build Coastguard Worker#endif 3981*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_STDBOOL_H 3982*6236dae4SAndroid Build Coastguard Worker#include <stdbool.h> 3983*6236dae4SAndroid Build Coastguard Worker#endif 3984*6236dae4SAndroid Build Coastguard Worker]) 3985*6236dae4SAndroid Build Coastguard Worker 3986*6236dae4SAndroid Build Coastguard Worker# check for sa_family_t 3987*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_TYPE(sa_family_t, 3988*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_SA_FAMILY_T, sa_family_t, [IP address type in sockaddr]), 3989*6236dae4SAndroid Build Coastguard Worker [ 3990*6236dae4SAndroid Build Coastguard Worker # The Windows name? 3991*6236dae4SAndroid Build Coastguard Worker AC_CHECK_TYPE(ADDRESS_FAMILY, 3992*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_SA_FAMILY_T, ADDRESS_FAMILY, [IP address type in sockaddr]), 3993*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_SA_FAMILY_T, unsigned short, [IP address type in sockaddr]), 3994*6236dae4SAndroid Build Coastguard Worker [ 3995*6236dae4SAndroid Build Coastguard Worker#ifdef _WIN32 3996*6236dae4SAndroid Build Coastguard Worker#ifndef WIN32_LEAN_AND_MEAN 3997*6236dae4SAndroid Build Coastguard Worker#define WIN32_LEAN_AND_MEAN 3998*6236dae4SAndroid Build Coastguard Worker#endif 3999*6236dae4SAndroid Build Coastguard Worker#include <winsock2.h> 4000*6236dae4SAndroid Build Coastguard Worker#endif 4001*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_SYS_SOCKET_H 4002*6236dae4SAndroid Build Coastguard Worker#include <sys/socket.h> 4003*6236dae4SAndroid Build Coastguard Worker#endif 4004*6236dae4SAndroid Build Coastguard Worker ]) 4005*6236dae4SAndroid Build Coastguard Worker ], 4006*6236dae4SAndroid Build Coastguard Worker[ 4007*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_SYS_SOCKET_H 4008*6236dae4SAndroid Build Coastguard Worker#include <sys/socket.h> 4009*6236dae4SAndroid Build Coastguard Worker#endif 4010*6236dae4SAndroid Build Coastguard Worker]) 4011*6236dae4SAndroid Build Coastguard Worker 4012*6236dae4SAndroid Build Coastguard Worker# check for suseconds_t 4013*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_TYPE([suseconds_t],[ 4014*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_SUSECONDS_T, 1, 4015*6236dae4SAndroid Build Coastguard Worker [Define to 1 if suseconds_t is an available type.]) 4016*6236dae4SAndroid Build Coastguard Worker], ,[ 4017*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_SYS_TYPES_H 4018*6236dae4SAndroid Build Coastguard Worker#include <sys/types.h> 4019*6236dae4SAndroid Build Coastguard Worker#endif 4020*6236dae4SAndroid Build Coastguard Worker#ifdef HAVE_SYS_TIME_H 4021*6236dae4SAndroid Build Coastguard Worker#include <sys/time.h> 4022*6236dae4SAndroid Build Coastguard Worker#endif 4023*6236dae4SAndroid Build Coastguard Worker]) 4024*6236dae4SAndroid Build Coastguard Worker 4025*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([if time_t is unsigned]) 4026*6236dae4SAndroid Build Coastguard WorkerCURL_RUN_IFELSE( 4027*6236dae4SAndroid Build Coastguard Worker [ 4028*6236dae4SAndroid Build Coastguard Worker #include <time.h> 4029*6236dae4SAndroid Build Coastguard Worker #include <limits.h> 4030*6236dae4SAndroid Build Coastguard Worker int main(void) { 4031*6236dae4SAndroid Build Coastguard Worker time_t t = -1; 4032*6236dae4SAndroid Build Coastguard Worker return (t < 0); 4033*6236dae4SAndroid Build Coastguard Worker } 4034*6236dae4SAndroid Build Coastguard Worker ],[ 4035*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 4036*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned]) 4037*6236dae4SAndroid Build Coastguard Worker],[ 4038*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 4039*6236dae4SAndroid Build Coastguard Worker],[ 4040*6236dae4SAndroid Build Coastguard Worker dnl cross-compiling, most systems are unsigned 4041*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 4042*6236dae4SAndroid Build Coastguard Worker]) 4043*6236dae4SAndroid Build Coastguard Worker 4044*6236dae4SAndroid Build Coastguard WorkerTYPE_IN_ADDR_T 4045*6236dae4SAndroid Build Coastguard Worker 4046*6236dae4SAndroid Build Coastguard WorkerTYPE_SOCKADDR_STORAGE 4047*6236dae4SAndroid Build Coastguard Worker 4048*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_SELECT 4049*6236dae4SAndroid Build Coastguard Worker 4050*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_RECV 4051*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_SEND 4052*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_MSG_NOSIGNAL 4053*6236dae4SAndroid Build Coastguard Worker 4054*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_ALARM 4055*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_BASENAME 4056*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_CLOSESOCKET 4057*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_CLOSESOCKET_CAMEL 4058*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_FCNTL 4059*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_FREEADDRINFO 4060*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_FSETXATTR 4061*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_FTRUNCATE 4062*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_GETADDRINFO 4063*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_GETHOSTBYNAME 4064*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_GETHOSTBYNAME_R 4065*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_GETHOSTNAME 4066*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_GETPEERNAME 4067*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_GETSOCKNAME 4068*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_GETIFADDRS 4069*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_GMTIME_R 4070*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_INET_NTOP 4071*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_INET_PTON 4072*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_IOCTL 4073*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_IOCTLSOCKET 4074*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_IOCTLSOCKET_CAMEL 4075*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_MEMRCHR 4076*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_SIGACTION 4077*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_SIGINTERRUPT 4078*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_SIGNAL 4079*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_SIGSETJMP 4080*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_SOCKET 4081*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_SOCKETPAIR 4082*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_STRCASECMP 4083*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_STRCMPI 4084*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_STRDUP 4085*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_STRERROR_R 4086*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_STRICMP 4087*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_STRTOK_R 4088*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_FUNC_STRTOLL 4089*6236dae4SAndroid Build Coastguard Worker 4090*6236dae4SAndroid Build Coastguard Workercase $host in 4091*6236dae4SAndroid Build Coastguard Worker *msdosdjgpp) 4092*6236dae4SAndroid Build Coastguard Worker ac_cv_func_pipe=no 4093*6236dae4SAndroid Build Coastguard Worker skipcheck_pipe=yes 4094*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([skip check for pipe on msdosdjgpp]) 4095*6236dae4SAndroid Build Coastguard Worker ;; 4096*6236dae4SAndroid Build Coastguard Workeresac 4097*6236dae4SAndroid Build Coastguard Worker 4098*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Set if getpwuid_r() declaration is missing")], 4099*6236dae4SAndroid Build Coastguard Worker [[#include <pwd.h> 4100*6236dae4SAndroid Build Coastguard Worker #include <sys/types.h>]]) 4101*6236dae4SAndroid Build Coastguard Worker 4102*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_FUNCS([\ 4103*6236dae4SAndroid Build Coastguard Worker _fseeki64 \ 4104*6236dae4SAndroid Build Coastguard Worker eventfd \ 4105*6236dae4SAndroid Build Coastguard Worker fnmatch \ 4106*6236dae4SAndroid Build Coastguard Worker geteuid \ 4107*6236dae4SAndroid Build Coastguard Worker getpass_r \ 4108*6236dae4SAndroid Build Coastguard Worker getppid \ 4109*6236dae4SAndroid Build Coastguard Worker getpwuid \ 4110*6236dae4SAndroid Build Coastguard Worker getpwuid_r \ 4111*6236dae4SAndroid Build Coastguard Worker getrlimit \ 4112*6236dae4SAndroid Build Coastguard Worker gettimeofday \ 4113*6236dae4SAndroid Build Coastguard Worker if_nametoindex \ 4114*6236dae4SAndroid Build Coastguard Worker mach_absolute_time \ 4115*6236dae4SAndroid Build Coastguard Worker pipe \ 4116*6236dae4SAndroid Build Coastguard Worker poll \ 4117*6236dae4SAndroid Build Coastguard Worker sched_yield \ 4118*6236dae4SAndroid Build Coastguard Worker sendmsg \ 4119*6236dae4SAndroid Build Coastguard Worker sendmmsg \ 4120*6236dae4SAndroid Build Coastguard Worker setlocale \ 4121*6236dae4SAndroid Build Coastguard Worker setmode \ 4122*6236dae4SAndroid Build Coastguard Worker setrlimit \ 4123*6236dae4SAndroid Build Coastguard Worker snprintf \ 4124*6236dae4SAndroid Build Coastguard Worker utime \ 4125*6236dae4SAndroid Build Coastguard Worker utimes \ 4126*6236dae4SAndroid Build Coastguard Worker]) 4127*6236dae4SAndroid Build Coastguard Worker 4128*6236dae4SAndroid Build Coastguard Workerif test "$curl_cv_native_windows" = 'yes' -o "$curl_cv_cygwin" = 'yes'; then 4129*6236dae4SAndroid Build Coastguard Worker AC_CHECK_FUNCS([_setmode]) 4130*6236dae4SAndroid Build Coastguard Workerfi 4131*6236dae4SAndroid Build Coastguard Worker 4132*6236dae4SAndroid Build Coastguard Workerif test -z "$ssl_backends"; then 4133*6236dae4SAndroid Build Coastguard Worker AC_CHECK_FUNCS([arc4random]) 4134*6236dae4SAndroid Build Coastguard Workerfi 4135*6236dae4SAndroid Build Coastguard Worker 4136*6236dae4SAndroid Build Coastguard Workerif test "$curl_cv_native_windows" != 'yes'; then 4137*6236dae4SAndroid Build Coastguard Worker AC_CHECK_FUNCS([fseeko]) 4138*6236dae4SAndroid Build Coastguard Worker 4139*6236dae4SAndroid Build Coastguard Worker dnl On Android, the only way to know if fseeko can be used is to see if it is 4140*6236dae4SAndroid Build Coastguard Worker dnl declared or not (for this API level), as the symbol always exists in the 4141*6236dae4SAndroid Build Coastguard Worker dnl lib. 4142*6236dae4SAndroid Build Coastguard Worker AC_CHECK_DECL([fseeko], 4143*6236dae4SAndroid Build Coastguard Worker [AC_DEFINE([HAVE_DECL_FSEEKO], [1], 4144*6236dae4SAndroid Build Coastguard Worker [Define to 1 if you have the fseeko declaration])], 4145*6236dae4SAndroid Build Coastguard Worker [], 4146*6236dae4SAndroid Build Coastguard Worker [[#include <stdio.h>]]) 4147*6236dae4SAndroid Build Coastguard Workerfi 4148*6236dae4SAndroid Build Coastguard Worker 4149*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_NONBLOCKING_SOCKET 4150*6236dae4SAndroid Build Coastguard Worker 4151*6236dae4SAndroid Build Coastguard Workerif test "x$BUILD_DOCS" != "x0" -o "x$USE_MANUAL" != "x0" -o "x$CURL_CA_EMBED" != "x"; then 4152*6236dae4SAndroid Build Coastguard Worker AC_PATH_PROG(PERL, perl,, 4153*6236dae4SAndroid Build Coastguard Worker $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin) 4154*6236dae4SAndroid Build Coastguard Worker AC_SUBST(PERL) 4155*6236dae4SAndroid Build Coastguard Worker 4156*6236dae4SAndroid Build Coastguard Worker if test -z "$PERL"; then 4157*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([perl was not found, needed for docs, manual and CA embed]) 4158*6236dae4SAndroid Build Coastguard Worker fi 4159*6236dae4SAndroid Build Coastguard Workerfi 4160*6236dae4SAndroid Build Coastguard Worker 4161*6236dae4SAndroid Build Coastguard Workerdnl set variable for use in automakefile(s) 4162*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL(BUILD_DOCS, test x"$BUILD_DOCS" = x1) 4163*6236dae4SAndroid Build Coastguard Worker 4164*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************************* 4165*6236dae4SAndroid Build Coastguard Workerdnl If the manual variable still is set, then we go with providing a built-in 4166*6236dae4SAndroid Build Coastguard Workerdnl manual 4167*6236dae4SAndroid Build Coastguard Worker 4168*6236dae4SAndroid Build Coastguard Workerif test "$USE_MANUAL" = "1"; then 4169*6236dae4SAndroid Build Coastguard Worker curl_manual_msg="enabled" 4170*6236dae4SAndroid Build Coastguard Workerfi 4171*6236dae4SAndroid Build Coastguard Worker 4172*6236dae4SAndroid Build Coastguard Workerdnl set variable for use in automakefile(s) 4173*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1) 4174*6236dae4SAndroid Build Coastguard Worker 4175*6236dae4SAndroid Build Coastguard WorkerCURL_CHECK_LIB_ARES 4176*6236dae4SAndroid Build Coastguard Worker 4177*6236dae4SAndroid Build Coastguard Workerif test "x$want_ares" != xyes; then 4178*6236dae4SAndroid Build Coastguard Worker CURL_CHECK_OPTION_THREADED_RESOLVER 4179*6236dae4SAndroid Build Coastguard Worker 4180*6236dae4SAndroid Build Coastguard Worker if test "$ipv6" = yes; then 4181*6236dae4SAndroid Build Coastguard Worker CURL_DARWIN_SYSTEMCONFIGURATION 4182*6236dae4SAndroid Build Coastguard Worker fi 4183*6236dae4SAndroid Build Coastguard Workerfi 4184*6236dae4SAndroid Build Coastguard Worker 4185*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4186*6236dae4SAndroid Build Coastguard Workerdnl disable POSIX threads 4187*6236dae4SAndroid Build Coastguard Workerdnl 4188*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to use POSIX threads for threaded resolver]) 4189*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(pthreads, 4190*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-pthreads], 4191*6236dae4SAndroid Build Coastguard Worker [Enable POSIX threads (default for threaded resolver)]) 4192*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-pthreads],[Disable POSIX threads]), 4193*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4194*6236dae4SAndroid Build Coastguard Worker no) 4195*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4196*6236dae4SAndroid Build Coastguard Worker want_pthreads=no 4197*6236dae4SAndroid Build Coastguard Worker ;; 4198*6236dae4SAndroid Build Coastguard Worker *) 4199*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4200*6236dae4SAndroid Build Coastguard Worker want_pthreads=yes 4201*6236dae4SAndroid Build Coastguard Worker ;; 4202*6236dae4SAndroid Build Coastguard Worker esac ], [ 4203*6236dae4SAndroid Build Coastguard Worker default_pthreads=1 4204*6236dae4SAndroid Build Coastguard Worker if test "$curl_cv_native_windows" = "yes"; then 4205*6236dae4SAndroid Build Coastguard Worker default_pthreads=0 4206*6236dae4SAndroid Build Coastguard Worker else 4207*6236dae4SAndroid Build Coastguard Worker case $host_os in 4208*6236dae4SAndroid Build Coastguard Worker msdos*) 4209*6236dae4SAndroid Build Coastguard Worker default_pthreads=0 4210*6236dae4SAndroid Build Coastguard Worker ;; 4211*6236dae4SAndroid Build Coastguard Worker esac 4212*6236dae4SAndroid Build Coastguard Worker fi 4213*6236dae4SAndroid Build Coastguard Worker if test "$default_pthreads" = '0'; then 4214*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4215*6236dae4SAndroid Build Coastguard Worker want_pthreads=no 4216*6236dae4SAndroid Build Coastguard Worker else 4217*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(auto) 4218*6236dae4SAndroid Build Coastguard Worker want_pthreads=auto 4219*6236dae4SAndroid Build Coastguard Worker fi 4220*6236dae4SAndroid Build Coastguard Worker ] 4221*6236dae4SAndroid Build Coastguard Worker) 4222*6236dae4SAndroid Build Coastguard Worker 4223*6236dae4SAndroid Build Coastguard Workerdnl turn off pthreads if rt is disabled 4224*6236dae4SAndroid Build Coastguard Workerif test "$want_pthreads" != "no"; then 4225*6236dae4SAndroid Build Coastguard Worker if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then 4226*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([options --enable-pthreads and --disable-rt are mutually exclusive]) 4227*6236dae4SAndroid Build Coastguard Worker fi 4228*6236dae4SAndroid Build Coastguard Worker if test "$dontwant_rt" != "no"; then 4229*6236dae4SAndroid Build Coastguard Worker dnl if --enable-pthreads was explicit then warn it's being ignored 4230*6236dae4SAndroid Build Coastguard Worker if test "$want_pthreads" = "yes"; then 4231*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([--enable-pthreads Ignored since librt is disabled.]) 4232*6236dae4SAndroid Build Coastguard Worker fi 4233*6236dae4SAndroid Build Coastguard Worker want_pthreads=no 4234*6236dae4SAndroid Build Coastguard Worker fi 4235*6236dae4SAndroid Build Coastguard Workerfi 4236*6236dae4SAndroid Build Coastguard Worker 4237*6236dae4SAndroid Build Coastguard Workerdnl turn off pthreads if no threaded resolver 4238*6236dae4SAndroid Build Coastguard Workerif test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then 4239*6236dae4SAndroid Build Coastguard Worker want_pthreads=no 4240*6236dae4SAndroid Build Coastguard Workerfi 4241*6236dae4SAndroid Build Coastguard Worker 4242*6236dae4SAndroid Build Coastguard Workerdnl detect pthreads 4243*6236dae4SAndroid Build Coastguard Workerif test "$want_pthreads" != "no"; then 4244*6236dae4SAndroid Build Coastguard Worker AC_CHECK_HEADER(pthread.h, 4245*6236dae4SAndroid Build Coastguard Worker [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>]) 4246*6236dae4SAndroid Build Coastguard Worker save_CFLAGS="$CFLAGS" 4247*6236dae4SAndroid Build Coastguard Worker dnl When statically linking against BoringSSL, -lpthread is added to LIBS. 4248*6236dae4SAndroid Build Coastguard Worker dnl Make sure to that this does not pass the check below, we really want 4249*6236dae4SAndroid Build Coastguard Worker dnl -pthread in CFLAGS as recommended for GCC. This also ensures that 4250*6236dae4SAndroid Build Coastguard Worker dnl lib1541 and lib1565 tests are built with these options. Otherwise 4251*6236dae4SAndroid Build Coastguard Worker dnl they fail the build since tests/libtest/Makefile.am clears LIBS. 4252*6236dae4SAndroid Build Coastguard Worker save_LIBS="$LIBS" 4253*6236dae4SAndroid Build Coastguard Worker 4254*6236dae4SAndroid Build Coastguard Worker LIBS= 4255*6236dae4SAndroid Build Coastguard Worker dnl Check for libc variants without a separate pthread lib like bionic 4256*6236dae4SAndroid Build Coastguard Worker AC_CHECK_FUNC(pthread_create, [USE_THREADS_POSIX=1] ) 4257*6236dae4SAndroid Build Coastguard Worker LIBS="$save_LIBS" 4258*6236dae4SAndroid Build Coastguard Worker 4259*6236dae4SAndroid Build Coastguard Worker dnl on HP-UX, life is more complicated... 4260*6236dae4SAndroid Build Coastguard Worker case $host in 4261*6236dae4SAndroid Build Coastguard Worker *-hp-hpux*) 4262*6236dae4SAndroid Build Coastguard Worker dnl it doesn't actually work without -lpthread 4263*6236dae4SAndroid Build Coastguard Worker USE_THREADS_POSIX="" 4264*6236dae4SAndroid Build Coastguard Worker ;; 4265*6236dae4SAndroid Build Coastguard Worker *) 4266*6236dae4SAndroid Build Coastguard Worker ;; 4267*6236dae4SAndroid Build Coastguard Worker esac 4268*6236dae4SAndroid Build Coastguard Worker 4269*6236dae4SAndroid Build Coastguard Worker dnl if it wasn't found without lib, search for it in pthread lib 4270*6236dae4SAndroid Build Coastguard Worker if test "$USE_THREADS_POSIX" != "1"; then 4271*6236dae4SAndroid Build Coastguard Worker # assign PTHREAD for pkg-config use 4272*6236dae4SAndroid Build Coastguard Worker PTHREAD=" -pthread" 4273*6236dae4SAndroid Build Coastguard Worker 4274*6236dae4SAndroid Build Coastguard Worker case $host in 4275*6236dae4SAndroid Build Coastguard Worker *-ibm-aix*) 4276*6236dae4SAndroid Build Coastguard Worker dnl Check if compiler is xlC 4277*6236dae4SAndroid Build Coastguard Worker COMPILER_VERSION=`"$CC" -qversion 2>/dev/null` 4278*6236dae4SAndroid Build Coastguard Worker if test x"$COMPILER_VERSION" = "x"; then 4279*6236dae4SAndroid Build Coastguard Worker CFLAGS="$CFLAGS -pthread" 4280*6236dae4SAndroid Build Coastguard Worker else 4281*6236dae4SAndroid Build Coastguard Worker CFLAGS="$CFLAGS -qthreaded" 4282*6236dae4SAndroid Build Coastguard Worker fi 4283*6236dae4SAndroid Build Coastguard Worker ;; 4284*6236dae4SAndroid Build Coastguard Worker powerpc-*amigaos*) 4285*6236dae4SAndroid Build Coastguard Worker dnl No -pthread option, but link with -lpthread 4286*6236dae4SAndroid Build Coastguard Worker PTHREAD=" -lpthread" 4287*6236dae4SAndroid Build Coastguard Worker ;; 4288*6236dae4SAndroid Build Coastguard Worker *) 4289*6236dae4SAndroid Build Coastguard Worker CFLAGS="$CFLAGS -pthread" 4290*6236dae4SAndroid Build Coastguard Worker ;; 4291*6236dae4SAndroid Build Coastguard Worker esac 4292*6236dae4SAndroid Build Coastguard Worker AC_CHECK_LIB(pthread, pthread_create, 4293*6236dae4SAndroid Build Coastguard Worker [USE_THREADS_POSIX=1], 4294*6236dae4SAndroid Build Coastguard Worker [ CFLAGS="$save_CFLAGS"]) 4295*6236dae4SAndroid Build Coastguard Worker fi 4296*6236dae4SAndroid Build Coastguard Worker 4297*6236dae4SAndroid Build Coastguard Worker if test "x$USE_THREADS_POSIX" = "x1"; then 4298*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup]) 4299*6236dae4SAndroid Build Coastguard Worker curl_res_msg="POSIX threaded" 4300*6236dae4SAndroid Build Coastguard Worker fi 4301*6236dae4SAndroid Build Coastguard Worker ]) 4302*6236dae4SAndroid Build Coastguard Workerfi 4303*6236dae4SAndroid Build Coastguard Worker 4304*6236dae4SAndroid Build Coastguard Workerdnl threaded resolver check 4305*6236dae4SAndroid Build Coastguard Workerif test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then 4306*6236dae4SAndroid Build Coastguard Worker if test "$want_pthreads" = "yes"; then 4307*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--enable-pthreads but pthreads was not found]) 4308*6236dae4SAndroid Build Coastguard Worker fi 4309*6236dae4SAndroid Build Coastguard Worker dnl If native Windows fallback on Win32 threads since no POSIX threads 4310*6236dae4SAndroid Build Coastguard Worker if test "$curl_cv_native_windows" = "yes"; then 4311*6236dae4SAndroid Build Coastguard Worker USE_THREADS_WIN32=1 4312*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_THREADS_WIN32, 1, [if you want Win32 threaded DNS lookup]) 4313*6236dae4SAndroid Build Coastguard Worker curl_res_msg="Win32 threaded" 4314*6236dae4SAndroid Build Coastguard Worker else 4315*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([Threaded resolver enabled but no thread library found]) 4316*6236dae4SAndroid Build Coastguard Worker fi 4317*6236dae4SAndroid Build Coastguard Workerfi 4318*6236dae4SAndroid Build Coastguard Worker 4319*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_HEADER(dirent.h, 4320*6236dae4SAndroid Build Coastguard Worker [ AC_DEFINE(HAVE_DIRENT_H, 1, [if you have <dirent.h>]) 4321*6236dae4SAndroid Build Coastguard Worker AC_CHECK_FUNC(opendir, AC_DEFINE(HAVE_OPENDIR, 1, [if you have opendir]) ) 4322*6236dae4SAndroid Build Coastguard Worker ] 4323*6236dae4SAndroid Build Coastguard Worker) 4324*6236dae4SAndroid Build Coastguard Worker 4325*6236dae4SAndroid Build Coastguard WorkerCURL_CONVERT_INCLUDE_TO_ISYSTEM 4326*6236dae4SAndroid Build Coastguard Worker 4327*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4328*6236dae4SAndroid Build Coastguard Workerdnl disable verbose text strings 4329*6236dae4SAndroid Build Coastguard Workerdnl 4330*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable verbose strings]) 4331*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(verbose, 4332*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-verbose],[Enable verbose strings]) 4333*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-verbose],[Disable verbose strings]), 4334*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4335*6236dae4SAndroid Build Coastguard Worker no) 4336*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4337*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings]) 4338*6236dae4SAndroid Build Coastguard Worker curl_verbose_msg="no" 4339*6236dae4SAndroid Build Coastguard Worker ;; 4340*6236dae4SAndroid Build Coastguard Worker *) 4341*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4342*6236dae4SAndroid Build Coastguard Worker ;; 4343*6236dae4SAndroid Build Coastguard Worker esac ], 4344*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4345*6236dae4SAndroid Build Coastguard Worker) 4346*6236dae4SAndroid Build Coastguard Worker 4347*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4348*6236dae4SAndroid Build Coastguard Workerdnl enable SSPI support 4349*6236dae4SAndroid Build Coastguard Workerdnl 4350*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)]) 4351*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(sspi, 4352*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-sspi],[Enable SSPI]) 4353*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-sspi],[Disable SSPI]), 4354*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4355*6236dae4SAndroid Build Coastguard Worker yes) 4356*6236dae4SAndroid Build Coastguard Worker if test "$curl_cv_native_windows" = "yes"; then 4357*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4358*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support]) 4359*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_WINDOWS_SSPI, [1]) 4360*6236dae4SAndroid Build Coastguard Worker curl_sspi_msg="enabled" 4361*6236dae4SAndroid Build Coastguard Worker else 4362*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4363*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.]) 4364*6236dae4SAndroid Build Coastguard Worker fi 4365*6236dae4SAndroid Build Coastguard Worker ;; 4366*6236dae4SAndroid Build Coastguard Worker *) 4367*6236dae4SAndroid Build Coastguard Worker if test "x$SCHANNEL_ENABLED" = "x1"; then 4368*6236dae4SAndroid Build Coastguard Worker # --with-schannel implies --enable-sspi 4369*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4370*6236dae4SAndroid Build Coastguard Worker else 4371*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4372*6236dae4SAndroid Build Coastguard Worker fi 4373*6236dae4SAndroid Build Coastguard Worker ;; 4374*6236dae4SAndroid Build Coastguard Worker esac ], 4375*6236dae4SAndroid Build Coastguard Worker if test "x$SCHANNEL_ENABLED" = "x1"; then 4376*6236dae4SAndroid Build Coastguard Worker # --with-schannel implies --enable-sspi 4377*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4378*6236dae4SAndroid Build Coastguard Worker else 4379*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4380*6236dae4SAndroid Build Coastguard Worker fi 4381*6236dae4SAndroid Build Coastguard Worker) 4382*6236dae4SAndroid Build Coastguard Worker 4383*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4384*6236dae4SAndroid Build Coastguard Workerdnl disable basic authentication 4385*6236dae4SAndroid Build Coastguard Workerdnl 4386*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable basic authentication method]) 4387*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(basic-auth, 4388*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-basic-auth],[Enable basic authentication (default)]) 4389*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-basic-auth],[Disable basic authentication]), 4390*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4391*6236dae4SAndroid Build Coastguard Worker no) 4392*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4393*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_BASIC_AUTH, 1, [to disable basic authentication]) 4394*6236dae4SAndroid Build Coastguard Worker CURL_DISABLE_BASIC_AUTH=1 4395*6236dae4SAndroid Build Coastguard Worker ;; 4396*6236dae4SAndroid Build Coastguard Worker *) 4397*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4398*6236dae4SAndroid Build Coastguard Worker ;; 4399*6236dae4SAndroid Build Coastguard Worker esac ], 4400*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4401*6236dae4SAndroid Build Coastguard Worker) 4402*6236dae4SAndroid Build Coastguard Worker 4403*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4404*6236dae4SAndroid Build Coastguard Workerdnl disable bearer authentication 4405*6236dae4SAndroid Build Coastguard Workerdnl 4406*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable bearer authentication method]) 4407*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(bearer-auth, 4408*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-bearer-auth],[Enable bearer authentication (default)]) 4409*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-bearer-auth],[Disable bearer authentication]), 4410*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4411*6236dae4SAndroid Build Coastguard Worker no) 4412*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4413*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_BEARER_AUTH, 1, [to disable bearer authentication]) 4414*6236dae4SAndroid Build Coastguard Worker CURL_DISABLE_BEARER_AUTH=1 4415*6236dae4SAndroid Build Coastguard Worker ;; 4416*6236dae4SAndroid Build Coastguard Worker *) 4417*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4418*6236dae4SAndroid Build Coastguard Worker ;; 4419*6236dae4SAndroid Build Coastguard Worker esac ], 4420*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4421*6236dae4SAndroid Build Coastguard Worker) 4422*6236dae4SAndroid Build Coastguard Worker 4423*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4424*6236dae4SAndroid Build Coastguard Workerdnl disable digest authentication 4425*6236dae4SAndroid Build Coastguard Workerdnl 4426*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable digest authentication method]) 4427*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(digest-auth, 4428*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-digest-auth],[Enable digest authentication (default)]) 4429*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-digest-auth],[Disable digest authentication]), 4430*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4431*6236dae4SAndroid Build Coastguard Worker no) 4432*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4433*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_DIGEST_AUTH, 1, [to disable digest authentication]) 4434*6236dae4SAndroid Build Coastguard Worker CURL_DISABLE_DIGEST_AUTH=1 4435*6236dae4SAndroid Build Coastguard Worker ;; 4436*6236dae4SAndroid Build Coastguard Worker *) 4437*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4438*6236dae4SAndroid Build Coastguard Worker ;; 4439*6236dae4SAndroid Build Coastguard Worker esac ], 4440*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4441*6236dae4SAndroid Build Coastguard Worker) 4442*6236dae4SAndroid Build Coastguard Worker 4443*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4444*6236dae4SAndroid Build Coastguard Workerdnl disable kerberos authentication 4445*6236dae4SAndroid Build Coastguard Workerdnl 4446*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable kerberos authentication method]) 4447*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(kerberos-auth, 4448*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-kerberos-auth],[Enable kerberos authentication (default)]) 4449*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-kerberos-auth],[Disable kerberos authentication]), 4450*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4451*6236dae4SAndroid Build Coastguard Worker no) 4452*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4453*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_KERBEROS_AUTH, 1, [to disable kerberos authentication]) 4454*6236dae4SAndroid Build Coastguard Worker CURL_DISABLE_KERBEROS_AUTH=1 4455*6236dae4SAndroid Build Coastguard Worker ;; 4456*6236dae4SAndroid Build Coastguard Worker *) 4457*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4458*6236dae4SAndroid Build Coastguard Worker ;; 4459*6236dae4SAndroid Build Coastguard Worker esac ], 4460*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4461*6236dae4SAndroid Build Coastguard Worker) 4462*6236dae4SAndroid Build Coastguard Worker 4463*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4464*6236dae4SAndroid Build Coastguard Workerdnl disable negotiate authentication 4465*6236dae4SAndroid Build Coastguard Workerdnl 4466*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable negotiate authentication method]) 4467*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(negotiate-auth, 4468*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-negotiate-auth],[Enable negotiate authentication (default)]) 4469*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-negotiate-auth],[Disable negotiate authentication]), 4470*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4471*6236dae4SAndroid Build Coastguard Worker no) 4472*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4473*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_NEGOTIATE_AUTH, 1, [to disable negotiate authentication]) 4474*6236dae4SAndroid Build Coastguard Worker CURL_DISABLE_NEGOTIATE_AUTH=1 4475*6236dae4SAndroid Build Coastguard Worker ;; 4476*6236dae4SAndroid Build Coastguard Worker *) 4477*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4478*6236dae4SAndroid Build Coastguard Worker ;; 4479*6236dae4SAndroid Build Coastguard Worker esac ], 4480*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4481*6236dae4SAndroid Build Coastguard Worker) 4482*6236dae4SAndroid Build Coastguard Worker 4483*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4484*6236dae4SAndroid Build Coastguard Workerdnl disable aws 4485*6236dae4SAndroid Build Coastguard Workerdnl 4486*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable aws sig methods]) 4487*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(aws, 4488*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-aws],[Enable AWS sig support (default)]) 4489*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-aws],[Disable AWS sig support]), 4490*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4491*6236dae4SAndroid Build Coastguard Worker no) 4492*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4493*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_AWS, 1, [to disable AWS sig support]) 4494*6236dae4SAndroid Build Coastguard Worker CURL_DISABLE_AWS=1 4495*6236dae4SAndroid Build Coastguard Worker ;; 4496*6236dae4SAndroid Build Coastguard Worker *) 4497*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4498*6236dae4SAndroid Build Coastguard Worker ;; 4499*6236dae4SAndroid Build Coastguard Worker esac ], 4500*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4501*6236dae4SAndroid Build Coastguard Worker) 4502*6236dae4SAndroid Build Coastguard Worker 4503*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4504*6236dae4SAndroid Build Coastguard Workerdnl disable NTLM support 4505*6236dae4SAndroid Build Coastguard Workerdnl 4506*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support NTLM]) 4507*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(ntlm, 4508*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-ntlm],[Enable NTLM support]) 4509*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-ntlm],[Disable NTLM support]), 4510*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4511*6236dae4SAndroid Build Coastguard Worker no) 4512*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4513*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_NTLM, 1, [to disable NTLM support]) 4514*6236dae4SAndroid Build Coastguard Worker CURL_DISABLE_NTLM=1 4515*6236dae4SAndroid Build Coastguard Worker ;; 4516*6236dae4SAndroid Build Coastguard Worker *) 4517*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4518*6236dae4SAndroid Build Coastguard Worker ;; 4519*6236dae4SAndroid Build Coastguard Worker esac ], 4520*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4521*6236dae4SAndroid Build Coastguard Worker) 4522*6236dae4SAndroid Build Coastguard Worker 4523*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4524*6236dae4SAndroid Build Coastguard Workerdnl disable TLS-SRP authentication 4525*6236dae4SAndroid Build Coastguard Workerdnl 4526*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable TLS-SRP authentication]) 4527*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(tls-srp, 4528*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication]) 4529*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]), 4530*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4531*6236dae4SAndroid Build Coastguard Worker no) 4532*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4533*6236dae4SAndroid Build Coastguard Worker want_tls_srp=no 4534*6236dae4SAndroid Build Coastguard Worker ;; 4535*6236dae4SAndroid Build Coastguard Worker *) 4536*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4537*6236dae4SAndroid Build Coastguard Worker want_tls_srp=yes 4538*6236dae4SAndroid Build Coastguard Worker ;; 4539*6236dae4SAndroid Build Coastguard Worker esac ], 4540*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4541*6236dae4SAndroid Build Coastguard Worker want_tls_srp=yes 4542*6236dae4SAndroid Build Coastguard Worker) 4543*6236dae4SAndroid Build Coastguard Worker 4544*6236dae4SAndroid Build Coastguard Workerif test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1"); then 4545*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication]) 4546*6236dae4SAndroid Build Coastguard Worker USE_TLS_SRP=1 4547*6236dae4SAndroid Build Coastguard Worker curl_tls_srp_msg="enabled" 4548*6236dae4SAndroid Build Coastguard Workerfi 4549*6236dae4SAndroid Build Coastguard Worker 4550*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4551*6236dae4SAndroid Build Coastguard Workerdnl disable Unix domain sockets support 4552*6236dae4SAndroid Build Coastguard Workerdnl 4553*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to enable Unix domain sockets]) 4554*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(unix-sockets, 4555*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-unix-sockets],[Enable Unix domain sockets]) 4556*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]), 4557*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4558*6236dae4SAndroid Build Coastguard Worker no) 4559*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4560*6236dae4SAndroid Build Coastguard Worker want_unix_sockets=no 4561*6236dae4SAndroid Build Coastguard Worker ;; 4562*6236dae4SAndroid Build Coastguard Worker *) 4563*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4564*6236dae4SAndroid Build Coastguard Worker want_unix_sockets=yes 4565*6236dae4SAndroid Build Coastguard Worker ;; 4566*6236dae4SAndroid Build Coastguard Worker esac ], [ 4567*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(auto) 4568*6236dae4SAndroid Build Coastguard Worker want_unix_sockets=auto 4569*6236dae4SAndroid Build Coastguard Worker ] 4570*6236dae4SAndroid Build Coastguard Worker) 4571*6236dae4SAndroid Build Coastguard Workerif test "x$want_unix_sockets" != "xno"; then 4572*6236dae4SAndroid Build Coastguard Worker if test "x$curl_cv_native_windows" = "xyes"; then 4573*6236dae4SAndroid Build Coastguard Worker USE_UNIX_SOCKETS=1 4574*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets]) 4575*6236dae4SAndroid Build Coastguard Worker curl_unix_sockets_msg="enabled" 4576*6236dae4SAndroid Build Coastguard Worker else 4577*6236dae4SAndroid Build Coastguard Worker AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [ 4578*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets]) 4579*6236dae4SAndroid Build Coastguard Worker AC_SUBST(USE_UNIX_SOCKETS, [1]) 4580*6236dae4SAndroid Build Coastguard Worker curl_unix_sockets_msg="enabled" 4581*6236dae4SAndroid Build Coastguard Worker ], [ 4582*6236dae4SAndroid Build Coastguard Worker if test "x$want_unix_sockets" = "xyes"; then 4583*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--enable-unix-sockets is not available on this platform!]) 4584*6236dae4SAndroid Build Coastguard Worker fi 4585*6236dae4SAndroid Build Coastguard Worker ], [ 4586*6236dae4SAndroid Build Coastguard Worker #include <sys/un.h> 4587*6236dae4SAndroid Build Coastguard Worker ]) 4588*6236dae4SAndroid Build Coastguard Worker fi 4589*6236dae4SAndroid Build Coastguard Workerfi 4590*6236dae4SAndroid Build Coastguard Worker 4591*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4592*6236dae4SAndroid Build Coastguard Workerdnl disable cookies support 4593*6236dae4SAndroid Build Coastguard Workerdnl 4594*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support cookies]) 4595*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(cookies, 4596*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-cookies],[Enable cookies support]) 4597*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-cookies],[Disable cookies support]), 4598*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4599*6236dae4SAndroid Build Coastguard Worker no) 4600*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4601*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support]) 4602*6236dae4SAndroid Build Coastguard Worker ;; 4603*6236dae4SAndroid Build Coastguard Worker *) 4604*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4605*6236dae4SAndroid Build Coastguard Worker ;; 4606*6236dae4SAndroid Build Coastguard Worker esac ], 4607*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4608*6236dae4SAndroid Build Coastguard Worker) 4609*6236dae4SAndroid Build Coastguard Worker 4610*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4611*6236dae4SAndroid Build Coastguard Workerdnl disable socketpair 4612*6236dae4SAndroid Build Coastguard Workerdnl 4613*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support socketpair]) 4614*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(socketpair, 4615*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-socketpair],[Enable socketpair support]) 4616*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-socketpair],[Disable socketpair support]), 4617*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4618*6236dae4SAndroid Build Coastguard Worker no) 4619*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4620*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_SOCKETPAIR, 1, [to disable socketpair support]) 4621*6236dae4SAndroid Build Coastguard Worker ;; 4622*6236dae4SAndroid Build Coastguard Worker *) 4623*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4624*6236dae4SAndroid Build Coastguard Worker ;; 4625*6236dae4SAndroid Build Coastguard Worker esac ], 4626*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4627*6236dae4SAndroid Build Coastguard Worker) 4628*6236dae4SAndroid Build Coastguard Worker 4629*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4630*6236dae4SAndroid Build Coastguard Workerdnl disable HTTP authentication support 4631*6236dae4SAndroid Build Coastguard Workerdnl 4632*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support HTTP authentication]) 4633*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(http-auth, 4634*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-http-auth],[Enable HTTP authentication support]) 4635*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-http-auth],[Disable HTTP authentication support]), 4636*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4637*6236dae4SAndroid Build Coastguard Worker no) 4638*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4639*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_HTTP_AUTH, 1, [disable HTTP authentication]) 4640*6236dae4SAndroid Build Coastguard Worker ;; 4641*6236dae4SAndroid Build Coastguard Worker *) 4642*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4643*6236dae4SAndroid Build Coastguard Worker ;; 4644*6236dae4SAndroid Build Coastguard Worker esac ], 4645*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4646*6236dae4SAndroid Build Coastguard Worker) 4647*6236dae4SAndroid Build Coastguard Worker 4648*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4649*6236dae4SAndroid Build Coastguard Workerdnl disable DoH support 4650*6236dae4SAndroid Build Coastguard Workerdnl 4651*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support DoH]) 4652*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(doh, 4653*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-doh],[Enable DoH support]) 4654*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-doh],[Disable DoH support]), 4655*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4656*6236dae4SAndroid Build Coastguard Worker no) 4657*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4658*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_DOH, 1, [disable DoH]) 4659*6236dae4SAndroid Build Coastguard Worker ;; 4660*6236dae4SAndroid Build Coastguard Worker *) 4661*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4662*6236dae4SAndroid Build Coastguard Worker ;; 4663*6236dae4SAndroid Build Coastguard Worker esac ], 4664*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4665*6236dae4SAndroid Build Coastguard Worker) 4666*6236dae4SAndroid Build Coastguard Worker 4667*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4668*6236dae4SAndroid Build Coastguard Workerdnl disable mime API support 4669*6236dae4SAndroid Build Coastguard Workerdnl 4670*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support the MIME API]) 4671*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(mime, 4672*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-mime],[Enable mime API support]) 4673*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-mime],[Disable mime API support]), 4674*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4675*6236dae4SAndroid Build Coastguard Worker no) 4676*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4677*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_MIME, 1, [disable mime API]) 4678*6236dae4SAndroid Build Coastguard Worker ;; 4679*6236dae4SAndroid Build Coastguard Worker *) 4680*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4681*6236dae4SAndroid Build Coastguard Worker ;; 4682*6236dae4SAndroid Build Coastguard Worker esac ], 4683*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4684*6236dae4SAndroid Build Coastguard Worker) 4685*6236dae4SAndroid Build Coastguard Worker 4686*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4687*6236dae4SAndroid Build Coastguard Workerdnl disable bindlocal 4688*6236dae4SAndroid Build Coastguard Workerdnl 4689*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support binding connections locally]) 4690*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(bindlocal, 4691*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-bindlocal],[Enable local binding support]) 4692*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-bindlocal],[Disable local binding support]), 4693*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4694*6236dae4SAndroid Build Coastguard Worker no) 4695*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4696*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_BINDLOCAL, 1, [disable local binding support]) 4697*6236dae4SAndroid Build Coastguard Worker ;; 4698*6236dae4SAndroid Build Coastguard Worker *) 4699*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4700*6236dae4SAndroid Build Coastguard Worker ;; 4701*6236dae4SAndroid Build Coastguard Worker esac ], 4702*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4703*6236dae4SAndroid Build Coastguard Worker) 4704*6236dae4SAndroid Build Coastguard Worker 4705*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4706*6236dae4SAndroid Build Coastguard Workerdnl disable form API support 4707*6236dae4SAndroid Build Coastguard Workerdnl 4708*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support the form API]) 4709*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(form-api, 4710*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-form-api],[Enable form API support]) 4711*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-form-api],[Disable form API support]), 4712*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4713*6236dae4SAndroid Build Coastguard Worker no) 4714*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4715*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_FORM_API, 1, [disable form API]) 4716*6236dae4SAndroid Build Coastguard Worker ;; 4717*6236dae4SAndroid Build Coastguard Worker *) 4718*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4719*6236dae4SAndroid Build Coastguard Worker test "$enable_mime" = no && 4720*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR(MIME support needs to be enabled in order to enable form API support) 4721*6236dae4SAndroid Build Coastguard Worker ;; 4722*6236dae4SAndroid Build Coastguard Worker esac ], 4723*6236dae4SAndroid Build Coastguard Worker[ 4724*6236dae4SAndroid Build Coastguard Worker if test "$enable_mime" = no; then 4725*6236dae4SAndroid Build Coastguard Worker enable_form_api=no 4726*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4727*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_FORM_API, 1, [disable form API]) 4728*6236dae4SAndroid Build Coastguard Worker else 4729*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4730*6236dae4SAndroid Build Coastguard Worker fi ] 4731*6236dae4SAndroid Build Coastguard Worker) 4732*6236dae4SAndroid Build Coastguard Worker 4733*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4734*6236dae4SAndroid Build Coastguard Workerdnl disable date parsing 4735*6236dae4SAndroid Build Coastguard Workerdnl 4736*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support date parsing]) 4737*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(dateparse, 4738*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-dateparse],[Enable date parsing]) 4739*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-dateparse],[Disable date parsing]), 4740*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4741*6236dae4SAndroid Build Coastguard Worker no) 4742*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4743*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_PARSEDATE, 1, [disable date parsing]) 4744*6236dae4SAndroid Build Coastguard Worker ;; 4745*6236dae4SAndroid Build Coastguard Worker *) 4746*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4747*6236dae4SAndroid Build Coastguard Worker ;; 4748*6236dae4SAndroid Build Coastguard Worker esac ], 4749*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4750*6236dae4SAndroid Build Coastguard Worker) 4751*6236dae4SAndroid Build Coastguard Worker 4752*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4753*6236dae4SAndroid Build Coastguard Workerdnl disable netrc 4754*6236dae4SAndroid Build Coastguard Workerdnl 4755*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support netrc parsing]) 4756*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(netrc, 4757*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-netrc],[Enable netrc parsing]) 4758*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-netrc],[Disable netrc parsing]), 4759*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4760*6236dae4SAndroid Build Coastguard Worker no) 4761*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4762*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_NETRC, 1, [disable netrc parsing]) 4763*6236dae4SAndroid Build Coastguard Worker ;; 4764*6236dae4SAndroid Build Coastguard Worker *) 4765*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4766*6236dae4SAndroid Build Coastguard Worker ;; 4767*6236dae4SAndroid Build Coastguard Worker esac ], 4768*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4769*6236dae4SAndroid Build Coastguard Worker) 4770*6236dae4SAndroid Build Coastguard Worker 4771*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4772*6236dae4SAndroid Build Coastguard Workerdnl disable progress-meter 4773*6236dae4SAndroid Build Coastguard Workerdnl 4774*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support progress-meter]) 4775*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(progress-meter, 4776*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-progress-meter],[Enable progress-meter]) 4777*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-progress-meter],[Disable progress-meter]), 4778*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4779*6236dae4SAndroid Build Coastguard Worker no) 4780*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4781*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_PROGRESS_METER, 1, [disable progress-meter]) 4782*6236dae4SAndroid Build Coastguard Worker ;; 4783*6236dae4SAndroid Build Coastguard Worker *) 4784*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4785*6236dae4SAndroid Build Coastguard Worker ;; 4786*6236dae4SAndroid Build Coastguard Worker esac ], 4787*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4788*6236dae4SAndroid Build Coastguard Worker) 4789*6236dae4SAndroid Build Coastguard Worker 4790*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4791*6236dae4SAndroid Build Coastguard Workerdnl disable SHA-512/256 hash algorithm 4792*6236dae4SAndroid Build Coastguard Workerdnl 4793*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support the SHA-512/256 hash algorithm]) 4794*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(sha512-256, 4795*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-sha512-256],[Enable SHA-512/256 hash algorithm (default)]) 4796*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-sha512-256],[Disable SHA-512/256 hash algorithm]), 4797*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4798*6236dae4SAndroid Build Coastguard Worker no) 4799*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4800*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_SHA512_256, 1, [disable SHA-512/256 hash algorithm]) 4801*6236dae4SAndroid Build Coastguard Worker ;; 4802*6236dae4SAndroid Build Coastguard Worker *) 4803*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4804*6236dae4SAndroid Build Coastguard Worker ;; 4805*6236dae4SAndroid Build Coastguard Worker esac ], 4806*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4807*6236dae4SAndroid Build Coastguard Worker) 4808*6236dae4SAndroid Build Coastguard Worker 4809*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4810*6236dae4SAndroid Build Coastguard Workerdnl disable shuffle DNS support 4811*6236dae4SAndroid Build Coastguard Workerdnl 4812*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support DNS shuffling]) 4813*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(dnsshuffle, 4814*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-dnsshuffle],[Enable DNS shuffling]) 4815*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-dnsshuffle],[Disable DNS shuffling]), 4816*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4817*6236dae4SAndroid Build Coastguard Worker no) 4818*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4819*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_SHUFFLE_DNS, 1, [disable DNS shuffling]) 4820*6236dae4SAndroid Build Coastguard Worker ;; 4821*6236dae4SAndroid Build Coastguard Worker *) 4822*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4823*6236dae4SAndroid Build Coastguard Worker ;; 4824*6236dae4SAndroid Build Coastguard Worker esac ], 4825*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4826*6236dae4SAndroid Build Coastguard Worker) 4827*6236dae4SAndroid Build Coastguard Worker 4828*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4829*6236dae4SAndroid Build Coastguard Workerdnl disable the curl_easy_options API 4830*6236dae4SAndroid Build Coastguard Workerdnl 4831*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support curl_easy_option*]) 4832*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(get-easy-options, 4833*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-get-easy-options],[Enable curl_easy_options]) 4834*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-get-easy-options],[Disable curl_easy_options]), 4835*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4836*6236dae4SAndroid Build Coastguard Worker no) 4837*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4838*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_GETOPTIONS, 1, [to disable curl_easy_options]) 4839*6236dae4SAndroid Build Coastguard Worker ;; 4840*6236dae4SAndroid Build Coastguard Worker *) 4841*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4842*6236dae4SAndroid Build Coastguard Worker ;; 4843*6236dae4SAndroid Build Coastguard Worker esac ], 4844*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4845*6236dae4SAndroid Build Coastguard Worker) 4846*6236dae4SAndroid Build Coastguard Worker 4847*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4848*6236dae4SAndroid Build Coastguard Workerdnl switch on/off alt-svc 4849*6236dae4SAndroid Build Coastguard Workerdnl 4850*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support alt-svc]) 4851*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(alt-svc, 4852*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-alt-svc],[Enable alt-svc support]) 4853*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]), 4854*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4855*6236dae4SAndroid Build Coastguard Worker no) 4856*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4857*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_ALTSVC, 1, [disable alt-svc]) 4858*6236dae4SAndroid Build Coastguard Worker curl_altsvc_msg="no"; 4859*6236dae4SAndroid Build Coastguard Worker enable_altsvc="no" 4860*6236dae4SAndroid Build Coastguard Worker ;; 4861*6236dae4SAndroid Build Coastguard Worker *) 4862*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4863*6236dae4SAndroid Build Coastguard Worker ;; 4864*6236dae4SAndroid Build Coastguard Worker esac ], 4865*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4866*6236dae4SAndroid Build Coastguard Worker) 4867*6236dae4SAndroid Build Coastguard Worker 4868*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 4869*6236dae4SAndroid Build Coastguard Workerdnl switch on/off headers-api 4870*6236dae4SAndroid Build Coastguard Workerdnl 4871*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether to support headers-api]) 4872*6236dae4SAndroid Build Coastguard WorkerAC_ARG_ENABLE(headers-api, 4873*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-headers-api],[Enable headers-api support]) 4874*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-headers-api],[Disable headers-api support]), 4875*6236dae4SAndroid Build Coastguard Worker[ case "$enableval" in 4876*6236dae4SAndroid Build Coastguard Worker no) 4877*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4878*6236dae4SAndroid Build Coastguard Worker curl_headers_msg="no (--enable-headers-api)" 4879*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_HEADERS_API, 1, [disable headers-api]) 4880*6236dae4SAndroid Build Coastguard Worker ;; 4881*6236dae4SAndroid Build Coastguard Worker *) 4882*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4883*6236dae4SAndroid Build Coastguard Worker ;; 4884*6236dae4SAndroid Build Coastguard Worker esac ], 4885*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4886*6236dae4SAndroid Build Coastguard Worker) 4887*6236dae4SAndroid Build Coastguard Worker 4888*6236dae4SAndroid Build Coastguard Workerdnl only check for HSTS if there's SSL present 4889*6236dae4SAndroid Build Coastguard Workerif test -n "$SSL_ENABLED"; then 4890*6236dae4SAndroid Build Coastguard Worker dnl ************************************************************ 4891*6236dae4SAndroid Build Coastguard Worker dnl switch on/off hsts 4892*6236dae4SAndroid Build Coastguard Worker dnl 4893*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to support HSTS]) 4894*6236dae4SAndroid Build Coastguard Worker AC_ARG_ENABLE(hsts, 4895*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--enable-hsts],[Enable HSTS support]) 4896*6236dae4SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-hsts],[Disable HSTS support]), 4897*6236dae4SAndroid Build Coastguard Worker [ case "$enableval" in 4898*6236dae4SAndroid Build Coastguard Worker no) 4899*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4900*6236dae4SAndroid Build Coastguard Worker hsts="no" 4901*6236dae4SAndroid Build Coastguard Worker ;; 4902*6236dae4SAndroid Build Coastguard Worker *) 4903*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4904*6236dae4SAndroid Build Coastguard Worker ;; 4905*6236dae4SAndroid Build Coastguard Worker esac ], 4906*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT($hsts) 4907*6236dae4SAndroid Build Coastguard Worker ) 4908*6236dae4SAndroid Build Coastguard Workerelse 4909*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([disables HSTS due to lack of SSL]) 4910*6236dae4SAndroid Build Coastguard Worker hsts="no" 4911*6236dae4SAndroid Build Coastguard Workerfi 4912*6236dae4SAndroid Build Coastguard Worker 4913*6236dae4SAndroid Build Coastguard Workerif test "x$hsts" != "xyes"; then 4914*6236dae4SAndroid Build Coastguard Worker curl_hsts_msg="no (--enable-hsts)"; 4915*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable alt-svc]) 4916*6236dae4SAndroid Build Coastguard Workerfi 4917*6236dae4SAndroid Build Coastguard Worker 4918*6236dae4SAndroid Build Coastguard Worker 4919*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************* 4920*6236dae4SAndroid Build Coastguard Workerdnl check whether HTTPSRR support if desired 4921*6236dae4SAndroid Build Coastguard Workerdnl 4922*6236dae4SAndroid Build Coastguard Workerif test "x$want_httpsrr" != "xno"; then 4923*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([HTTPSRR support is available]) 4924*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_HTTPSRR, 1, [enable HTTPS RR support]) 4925*6236dae4SAndroid Build Coastguard Worker experimental="$experimental HTTPSRR" 4926*6236dae4SAndroid Build Coastguard Workerfi 4927*6236dae4SAndroid Build Coastguard Worker 4928*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************* 4929*6236dae4SAndroid Build Coastguard Workerdnl check whether ECH support, if desired, is actually available 4930*6236dae4SAndroid Build Coastguard Workerdnl 4931*6236dae4SAndroid Build Coastguard Workerif test "x$want_ech" != "xno"; then 4932*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([whether ECH support is available]) 4933*6236dae4SAndroid Build Coastguard Worker 4934*6236dae4SAndroid Build Coastguard Worker dnl assume NOT and look for sufficient condition 4935*6236dae4SAndroid Build Coastguard Worker ECH_ENABLED=0 4936*6236dae4SAndroid Build Coastguard Worker ECH_SUPPORT='' 4937*6236dae4SAndroid Build Coastguard Worker 4938*6236dae4SAndroid Build Coastguard Worker dnl check for OpenSSL 4939*6236dae4SAndroid Build Coastguard Worker if test "x$OPENSSL_ENABLED" = "x1"; then 4940*6236dae4SAndroid Build Coastguard Worker AC_CHECK_FUNCS(SSL_ech_set1_echconfig, 4941*6236dae4SAndroid Build Coastguard Worker ECH_SUPPORT="ECH support available via OpenSSL with SSL_ech_set1_echconfig" 4942*6236dae4SAndroid Build Coastguard Worker ECH_ENABLED=1) 4943*6236dae4SAndroid Build Coastguard Worker fi 4944*6236dae4SAndroid Build Coastguard Worker dnl check for BoringSSL equivalent 4945*6236dae4SAndroid Build Coastguard Worker if test "x$OPENSSL_ENABLED" = "x1"; then 4946*6236dae4SAndroid Build Coastguard Worker AC_CHECK_FUNCS(SSL_set1_ech_config_list, 4947*6236dae4SAndroid Build Coastguard Worker ECH_SUPPORT="ECH support available via BoringSSL with SSL_set1_ech_config_list" 4948*6236dae4SAndroid Build Coastguard Worker ECH_ENABLED=1) 4949*6236dae4SAndroid Build Coastguard Worker fi 4950*6236dae4SAndroid Build Coastguard Worker if test "x$WOLFSSL_ENABLED" = "x1"; then 4951*6236dae4SAndroid Build Coastguard Worker AC_CHECK_FUNCS(wolfSSL_CTX_GenerateEchConfig, 4952*6236dae4SAndroid Build Coastguard Worker ECH_SUPPORT="ECH support available via wolfSSL with wolfSSL_CTX_GenerateEchConfig" 4953*6236dae4SAndroid Build Coastguard Worker ECH_ENABLED=1) 4954*6236dae4SAndroid Build Coastguard Worker fi 4955*6236dae4SAndroid Build Coastguard Worker 4956*6236dae4SAndroid Build Coastguard Worker dnl now deal with whatever we found 4957*6236dae4SAndroid Build Coastguard Worker if test "x$ECH_ENABLED" = "x1"; then 4958*6236dae4SAndroid Build Coastguard Worker dnl force pre-requisites for ECH 4959*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_HTTPSRR, 1, [force HTTPS RR support for ECH]) 4960*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(USE_ECH, 1, [if ECH support is available]) 4961*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT($ECH_SUPPORT) 4962*6236dae4SAndroid Build Coastguard Worker experimental="$experimental ECH" 4963*6236dae4SAndroid Build Coastguard Worker else 4964*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([--enable-ech ignored: No ECH support found]) 4965*6236dae4SAndroid Build Coastguard Worker fi 4966*6236dae4SAndroid Build Coastguard Workerfi 4967*6236dae4SAndroid Build Coastguard Worker 4968*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************* 4969*6236dae4SAndroid Build Coastguard Workerdnl check whether OpenSSL (lookalikes) have SSL_set0_wbio 4970*6236dae4SAndroid Build Coastguard Workerdnl 4971*6236dae4SAndroid Build Coastguard Workerif test "x$OPENSSL_ENABLED" = "x1"; then 4972*6236dae4SAndroid Build Coastguard Worker AC_CHECK_FUNCS([SSL_set0_wbio]) 4973*6236dae4SAndroid Build Coastguard Workerfi 4974*6236dae4SAndroid Build Coastguard Worker 4975*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_HTTP" != "x1"; then 4976*6236dae4SAndroid Build Coastguard Worker dnl ************************************************************* 4977*6236dae4SAndroid Build Coastguard Worker dnl WebSockets 4978*6236dae4SAndroid Build Coastguard Worker dnl 4979*6236dae4SAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to support WebSockets]) 4980*6236dae4SAndroid Build Coastguard Worker AC_ARG_ENABLE(websockets, 4981*6236dae4SAndroid Build Coastguard Worker AS_HELP_STRING([--enable-websockets],[Enable WebSockets support]) 4982*6236dae4SAndroid Build Coastguard Worker AS_HELP_STRING([--disable-websockets],[Disable WebSockets support]), 4983*6236dae4SAndroid Build Coastguard Worker [ case "$enableval" in 4984*6236dae4SAndroid Build Coastguard Worker no) 4985*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4986*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_WEBSOCKETS, [1], [disable WebSockets]) 4987*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_WEBSOCKETS, [1]) 4988*6236dae4SAndroid Build Coastguard Worker ;; 4989*6236dae4SAndroid Build Coastguard Worker *) 4990*6236dae4SAndroid Build Coastguard Worker if test ${ac_cv_sizeof_curl_off_t} -gt 4; then 4991*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 4992*6236dae4SAndroid Build Coastguard Worker else 4993*6236dae4SAndroid Build Coastguard Worker dnl WebSockets requires >32 bit curl_off_t 4994*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(no) 4995*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([WebSockets disabled due to lack of >32 bit curl_off_t]) 4996*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_WEBSOCKETS, [1], [disable WebSockets]) 4997*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_WEBSOCKETS, [1]) 4998*6236dae4SAndroid Build Coastguard Worker fi 4999*6236dae4SAndroid Build Coastguard Worker ;; 5000*6236dae4SAndroid Build Coastguard Worker esac ], 5001*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT(yes) 5002*6236dae4SAndroid Build Coastguard Worker ) 5003*6236dae4SAndroid Build Coastguard Workerelse 5004*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([WebSockets disabled because HTTP is disabled]) 5005*6236dae4SAndroid Build Coastguard Worker AC_DEFINE(CURL_DISABLE_WEBSOCKETS, [1], [disable WebSockets]) 5006*6236dae4SAndroid Build Coastguard Worker AC_SUBST(CURL_DISABLE_WEBSOCKETS, [1]) 5007*6236dae4SAndroid Build Coastguard Workerfi 5008*6236dae4SAndroid Build Coastguard Worker 5009*6236dae4SAndroid Build Coastguard Workerdnl ************************************************************ 5010*6236dae4SAndroid Build Coastguard Workerdnl hiding of library internal symbols 5011*6236dae4SAndroid Build Coastguard Workerdnl 5012*6236dae4SAndroid Build Coastguard WorkerCURL_CONFIGURE_SYMBOL_HIDING 5013*6236dae4SAndroid Build Coastguard Worker 5014*6236dae4SAndroid Build Coastguard Workerdnl 5015*6236dae4SAndroid Build Coastguard Workerdnl All the library dependencies put into $LIB apply to libcurl only. 5016*6236dae4SAndroid Build Coastguard Workerdnl 5017*6236dae4SAndroid Build Coastguard WorkerLIBCURL_PC_LIBS_PRIVATE="$LIBS$PTHREAD" 5018*6236dae4SAndroid Build Coastguard Worker 5019*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(LIBCURL_PC_LIBS_PRIVATE) 5020*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(CURL_NETWORK_LIBS) 5021*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(CURL_NETWORK_AND_TIME_LIBS) 5022*6236dae4SAndroid Build Coastguard Worker 5023*6236dae4SAndroid Build Coastguard Workerdnl BLANK_AT_MAKETIME may be used in our Makefile.am files to blank 5024*6236dae4SAndroid Build Coastguard Workerdnl LIBS variable used in generated makefile at makefile processing 5025*6236dae4SAndroid Build Coastguard Workerdnl time. Doing this functionally prevents LIBS from being used for 5026*6236dae4SAndroid Build Coastguard Workerdnl all link targets in given makefile. 5027*6236dae4SAndroid Build Coastguard WorkerBLANK_AT_MAKETIME= 5028*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(BLANK_AT_MAKETIME) 5029*6236dae4SAndroid Build Coastguard Worker 5030*6236dae4SAndroid Build Coastguard WorkerAM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes) 5031*6236dae4SAndroid Build Coastguard Worker 5032*6236dae4SAndroid Build Coastguard Workerdnl yes or no 5033*6236dae4SAndroid Build Coastguard WorkerENABLE_SHARED="$enable_shared" 5034*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(ENABLE_SHARED) 5035*6236dae4SAndroid Build Coastguard Worker 5036*6236dae4SAndroid Build Coastguard Workerdnl to let curl-config output the static libraries correctly 5037*6236dae4SAndroid Build Coastguard WorkerENABLE_STATIC="$enable_static" 5038*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(ENABLE_STATIC) 5039*6236dae4SAndroid Build Coastguard Worker 5040*6236dae4SAndroid Build Coastguard Workersqueeze LIBCURL_PC_REQUIRES_PRIVATE 5041*6236dae4SAndroid Build Coastguard WorkerLIBCURL_PC_REQUIRES_PRIVATE=`echo $LIBCURL_PC_REQUIRES_PRIVATE | tr ' ' ','` 5042*6236dae4SAndroid Build Coastguard Worker 5043*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(LIBCURL_PC_REQUIRES_PRIVATE) 5044*6236dae4SAndroid Build Coastguard Worker 5045*6236dae4SAndroid Build Coastguard Workerdnl Merge pkg-config private fields into public ones when static-only 5046*6236dae4SAndroid Build Coastguard Workerif test "x$enable_shared" = "xno"; then 5047*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES=$LIBCURL_PC_REQUIRES_PRIVATE 5048*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_LIBS=$LIBCURL_PC_LIBS_PRIVATE 5049*6236dae4SAndroid Build Coastguard Workerelse 5050*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_REQUIRES= 5051*6236dae4SAndroid Build Coastguard Worker LIBCURL_PC_LIBS= 5052*6236dae4SAndroid Build Coastguard Workerfi 5053*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(LIBCURL_PC_REQUIRES) 5054*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(LIBCURL_PC_LIBS) 5055*6236dae4SAndroid Build Coastguard Worker 5056*6236dae4SAndroid Build Coastguard Workerrm $compilersh 5057*6236dae4SAndroid Build Coastguard Worker 5058*6236dae4SAndroid Build Coastguard Workerdnl 5059*6236dae4SAndroid Build Coastguard Workerdnl For keeping supported features and protocols also in pkg-config file 5060*6236dae4SAndroid Build Coastguard Workerdnl since it is more cross-compile friendly than curl-config 5061*6236dae4SAndroid Build Coastguard Workerdnl 5062*6236dae4SAndroid Build Coastguard Worker 5063*6236dae4SAndroid Build Coastguard Workerif test "x$OPENSSL_ENABLED" = "x1"; then 5064*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" 5065*6236dae4SAndroid Build Coastguard Workerelif test -n "$SSL_ENABLED"; then 5066*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" 5067*6236dae4SAndroid Build Coastguard Workerfi 5068*6236dae4SAndroid Build Coastguard Workerif test "x$IPV6_ENABLED" = "x1"; then 5069*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6" 5070*6236dae4SAndroid Build Coastguard Workerfi 5071*6236dae4SAndroid Build Coastguard Workerif test "x$USE_UNIX_SOCKETS" = "x1"; then 5072*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES UnixSockets" 5073*6236dae4SAndroid Build Coastguard Workerfi 5074*6236dae4SAndroid Build Coastguard Workerif test "x$HAVE_LIBZ" = "x1"; then 5075*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES libz" 5076*6236dae4SAndroid Build Coastguard Workerfi 5077*6236dae4SAndroid Build Coastguard Workerif test "x$HAVE_BROTLI" = "x1"; then 5078*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES brotli" 5079*6236dae4SAndroid Build Coastguard Workerfi 5080*6236dae4SAndroid Build Coastguard Workerif test "x$HAVE_ZSTD" = "x1"; then 5081*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES zstd" 5082*6236dae4SAndroid Build Coastguard Workerfi 5083*6236dae4SAndroid Build Coastguard Workerif test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \ 5084*6236dae4SAndroid Build Coastguard Worker -o "x$USE_THREADS_WIN32" = "x1"; then 5085*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS" 5086*6236dae4SAndroid Build Coastguard Workerfi 5087*6236dae4SAndroid Build Coastguard Workerif test "x$IDN_ENABLED" = "x1"; then 5088*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES IDN" 5089*6236dae4SAndroid Build Coastguard Workerfi 5090*6236dae4SAndroid Build Coastguard Workerif test "x$USE_WINDOWS_SSPI" = "x1"; then 5091*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI" 5092*6236dae4SAndroid Build Coastguard Workerfi 5093*6236dae4SAndroid Build Coastguard Worker 5094*6236dae4SAndroid Build Coastguard Workerif test "x$HAVE_GSSAPI" = "x1"; then 5095*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API" 5096*6236dae4SAndroid Build Coastguard Workerfi 5097*6236dae4SAndroid Build Coastguard Worker 5098*6236dae4SAndroid Build Coastguard Workerif test "x$curl_psl_msg" = "xenabled"; then 5099*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES PSL" 5100*6236dae4SAndroid Build Coastguard Workerfi 5101*6236dae4SAndroid Build Coastguard Worker 5102*6236dae4SAndroid Build Coastguard Workerif test "x$curl_gsasl_msg" = "xenabled"; then 5103*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES gsasl" 5104*6236dae4SAndroid Build Coastguard Workerfi 5105*6236dae4SAndroid Build Coastguard Worker 5106*6236dae4SAndroid Build Coastguard Workerif test "x$enable_altsvc" = "xyes"; then 5107*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc" 5108*6236dae4SAndroid Build Coastguard Workerfi 5109*6236dae4SAndroid Build Coastguard Workerif test "x$hsts" = "xyes"; then 5110*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES HSTS" 5111*6236dae4SAndroid Build Coastguard Workerfi 5112*6236dae4SAndroid Build Coastguard Worker 5113*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_NEGOTIATE_AUTH" != "x1" -a \ 5114*6236dae4SAndroid Build Coastguard Worker \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then 5115*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO" 5116*6236dae4SAndroid Build Coastguard Workerfi 5117*6236dae4SAndroid Build Coastguard Worker 5118*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_KERBEROS_AUTH" != "x1" -a \ 5119*6236dae4SAndroid Build Coastguard Worker \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then 5120*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos" 5121*6236dae4SAndroid Build Coastguard Workerfi 5122*6236dae4SAndroid Build Coastguard Worker 5123*6236dae4SAndroid Build Coastguard Workeruse_curl_ntlm_core=no 5124*6236dae4SAndroid Build Coastguard Worker 5125*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_NTLM" != "x1"; then 5126*6236dae4SAndroid Build Coastguard Worker if test "x$OPENSSL_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \ 5127*6236dae4SAndroid Build Coastguard Worker -o "x$GNUTLS_ENABLED" = "x1" \ 5128*6236dae4SAndroid Build Coastguard Worker -o "x$SECURETRANSPORT_ENABLED" = "x1" \ 5129*6236dae4SAndroid Build Coastguard Worker -o "x$USE_WIN32_CRYPTO" = "x1" \ 5130*6236dae4SAndroid Build Coastguard Worker -o "x$WOLFSSL_NTLM" = "x1"; then 5131*6236dae4SAndroid Build Coastguard Worker use_curl_ntlm_core=yes 5132*6236dae4SAndroid Build Coastguard Worker fi 5133*6236dae4SAndroid Build Coastguard Worker 5134*6236dae4SAndroid Build Coastguard Worker if test "x$use_curl_ntlm_core" = "xyes" \ 5135*6236dae4SAndroid Build Coastguard Worker -o "x$USE_WINDOWS_SSPI" = "x1"; then 5136*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM" 5137*6236dae4SAndroid Build Coastguard Worker fi 5138*6236dae4SAndroid Build Coastguard Workerfi 5139*6236dae4SAndroid Build Coastguard Worker 5140*6236dae4SAndroid Build Coastguard Workerif test "x$USE_TLS_SRP" = "x1"; then 5141*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP" 5142*6236dae4SAndroid Build Coastguard Workerfi 5143*6236dae4SAndroid Build Coastguard Worker 5144*6236dae4SAndroid Build Coastguard Workerif test "x$USE_NGHTTP2" = "x1"; then 5145*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2" 5146*6236dae4SAndroid Build Coastguard Workerfi 5147*6236dae4SAndroid Build Coastguard Worker 5148*6236dae4SAndroid Build Coastguard Workerif test "x$USE_NGTCP2_H3" = "x1" -o "x$USE_QUICHE" = "x1" \ 5149*6236dae4SAndroid Build Coastguard Worker -o "x$USE_OPENSSL_H3" = "x1" -o "x$USE_MSH3" = "x1"; then 5150*6236dae4SAndroid Build Coastguard Worker if test "x$CURL_WITH_MULTI_SSL" = "x1"; then 5151*6236dae4SAndroid Build Coastguard Worker AC_MSG_ERROR([MultiSSL cannot be enabled with HTTP/3 and vice versa]) 5152*6236dae4SAndroid Build Coastguard Worker fi 5153*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3" 5154*6236dae4SAndroid Build Coastguard Workerfi 5155*6236dae4SAndroid Build Coastguard Worker 5156*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_WITH_MULTI_SSL" = "x1"; then 5157*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL" 5158*6236dae4SAndroid Build Coastguard Workerfi 5159*6236dae4SAndroid Build Coastguard Worker 5160*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([if this build supports HTTPS-proxy]) 5161*6236dae4SAndroid Build Coastguard Workerdnl if not explicitly turned off, HTTPS-proxy comes with some TLS backends 5162*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_HTTP" != "x1"; then 5163*6236dae4SAndroid Build Coastguard Worker if test "x$https_proxy" != "xno"; then 5164*6236dae4SAndroid Build Coastguard Worker if test "x$OPENSSL_ENABLED" = "x1" \ 5165*6236dae4SAndroid Build Coastguard Worker -o "x$GNUTLS_ENABLED" = "x1" \ 5166*6236dae4SAndroid Build Coastguard Worker -o "x$SECURETRANSPORT_ENABLED" = "x1" \ 5167*6236dae4SAndroid Build Coastguard Worker -o "x$RUSTLS_ENABLED" = "x1" \ 5168*6236dae4SAndroid Build Coastguard Worker -o "x$BEARSSL_ENABLED" = "x1" \ 5169*6236dae4SAndroid Build Coastguard Worker -o "x$SCHANNEL_ENABLED" = "x1" \ 5170*6236dae4SAndroid Build Coastguard Worker -o "x$GNUTLS_ENABLED" = "x1" \ 5171*6236dae4SAndroid Build Coastguard Worker -o "x$MBEDTLS_ENABLED" = "x1"; then 5172*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy" 5173*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 5174*6236dae4SAndroid Build Coastguard Worker elif test "x$WOLFSSL_ENABLED" = "x1" -a "x$WOLFSSL_BIO" = "x1"; then 5175*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy" 5176*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 5177*6236dae4SAndroid Build Coastguard Worker else 5178*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 5179*6236dae4SAndroid Build Coastguard Worker fi 5180*6236dae4SAndroid Build Coastguard Worker else 5181*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 5182*6236dae4SAndroid Build Coastguard Worker fi 5183*6236dae4SAndroid Build Coastguard Workerelse 5184*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 5185*6236dae4SAndroid Build Coastguard Workerfi 5186*6236dae4SAndroid Build Coastguard Worker 5187*6236dae4SAndroid Build Coastguard Workerif test "x$OPENSSL_ENABLED" = "x1" -o -n "$SSL_ENABLED"; then 5188*6236dae4SAndroid Build Coastguard Worker if test "x$ECH_ENABLED" = "x1"; then 5189*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES ECH" 5190*6236dae4SAndroid Build Coastguard Worker fi 5191*6236dae4SAndroid Build Coastguard Workerfi 5192*6236dae4SAndroid Build Coastguard Worker 5193*6236dae4SAndroid Build Coastguard Workerif test ${ac_cv_sizeof_curl_off_t} -gt 4; then 5194*6236dae4SAndroid Build Coastguard Worker if test ${ac_cv_sizeof_off_t} -gt 4 -o \ 5195*6236dae4SAndroid Build Coastguard Worker "$curl_win32_file_api" = "win32_large_files"; then 5196*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES Largefile" 5197*6236dae4SAndroid Build Coastguard Worker fi 5198*6236dae4SAndroid Build Coastguard Workerfi 5199*6236dae4SAndroid Build Coastguard Worker 5200*6236dae4SAndroid Build Coastguard Workerif test "$tst_atomic" = "yes"; then 5201*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe" 5202*6236dae4SAndroid Build Coastguard Workerelif test "x$USE_THREADS_POSIX" = "x1" -a \ 5203*6236dae4SAndroid Build Coastguard Worker "x$ac_cv_header_pthread_h" = "xyes"; then 5204*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe" 5205*6236dae4SAndroid Build Coastguard Workerelse 5206*6236dae4SAndroid Build Coastguard Worker AC_COMPILE_IFELSE([ 5207*6236dae4SAndroid Build Coastguard Worker AC_LANG_PROGRAM([[ 5208*6236dae4SAndroid Build Coastguard Worker #include <windows.h> 5209*6236dae4SAndroid Build Coastguard Worker ]],[[ 5210*6236dae4SAndroid Build Coastguard Worker #if (WINVER < 0x600) && (_WIN32_WINNT < 0x600) 5211*6236dae4SAndroid Build Coastguard Worker #error 5212*6236dae4SAndroid Build Coastguard Worker #endif 5213*6236dae4SAndroid Build Coastguard Worker ]]) 5214*6236dae4SAndroid Build Coastguard Worker ],[ 5215*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe" 5216*6236dae4SAndroid Build Coastguard Worker ],[ 5217*6236dae4SAndroid Build Coastguard Worker ]) 5218*6236dae4SAndroid Build Coastguard Workerfi 5219*6236dae4SAndroid Build Coastguard Worker 5220*6236dae4SAndroid Build Coastguard Workerif test "x$want_winuni" = "xyes"; then 5221*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES Unicode" 5222*6236dae4SAndroid Build Coastguard Workerfi 5223*6236dae4SAndroid Build Coastguard Workerif test "x$want_debug" = "xyes"; then 5224*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES Debug" 5225*6236dae4SAndroid Build Coastguard Workerfi 5226*6236dae4SAndroid Build Coastguard Workerif test "x$want_curldebug" = "xyes"; then 5227*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES TrackMemory" 5228*6236dae4SAndroid Build Coastguard Workerfi 5229*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_CA_EMBED" != "x"; then 5230*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES="$SUPPORT_FEATURES CAcert" 5231*6236dae4SAndroid Build Coastguard Worker CURL_CA_EMBED_msg="$CURL_CA_EMBED" 5232*6236dae4SAndroid Build Coastguard Workerelse 5233*6236dae4SAndroid Build Coastguard Worker CURL_CA_EMBED_msg='no' 5234*6236dae4SAndroid Build Coastguard Workerfi 5235*6236dae4SAndroid Build Coastguard Worker 5236*6236dae4SAndroid Build Coastguard Workerdnl replace spaces with newlines 5237*6236dae4SAndroid Build Coastguard Workerdnl sort the lines 5238*6236dae4SAndroid Build Coastguard Workerdnl replace the newlines back to spaces 5239*6236dae4SAndroid Build Coastguard Workerif sort -f </dev/null >/dev/null 2>&1; then 5240*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort -f | tr '\012' ' '` 5241*6236dae4SAndroid Build Coastguard Workerelse 5242*6236dae4SAndroid Build Coastguard Worker SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '` 5243*6236dae4SAndroid Build Coastguard Workerfi 5244*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(SUPPORT_FEATURES) 5245*6236dae4SAndroid Build Coastguard Worker 5246*6236dae4SAndroid Build Coastguard Workerdnl For supported protocols in pkg-config file 5247*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_HTTP" != "x1"; then 5248*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP" 5249*6236dae4SAndroid Build Coastguard Worker if test "x$SSL_ENABLED" = "x1"; then 5250*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS" 5251*6236dae4SAndroid Build Coastguard Worker fi 5252*6236dae4SAndroid Build Coastguard Workerfi 5253*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_FTP" != "x1"; then 5254*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP" 5255*6236dae4SAndroid Build Coastguard Worker if test "x$SSL_ENABLED" = "x1"; then 5256*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS" 5257*6236dae4SAndroid Build Coastguard Worker fi 5258*6236dae4SAndroid Build Coastguard Workerfi 5259*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_FILE" != "x1"; then 5260*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE" 5261*6236dae4SAndroid Build Coastguard Workerfi 5262*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_TELNET" != "x1"; then 5263*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET" 5264*6236dae4SAndroid Build Coastguard Workerfi 5265*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_LDAP" != "x1"; then 5266*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP" 5267*6236dae4SAndroid Build Coastguard Worker if test "x$CURL_DISABLE_LDAPS" != "x1"; then 5268*6236dae4SAndroid Build Coastguard Worker if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") || 5269*6236dae4SAndroid Build Coastguard Worker (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then 5270*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS" 5271*6236dae4SAndroid Build Coastguard Worker fi 5272*6236dae4SAndroid Build Coastguard Worker fi 5273*6236dae4SAndroid Build Coastguard Workerfi 5274*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_DICT" != "x1"; then 5275*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT" 5276*6236dae4SAndroid Build Coastguard Workerfi 5277*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_TFTP" != "x1"; then 5278*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP" 5279*6236dae4SAndroid Build Coastguard Workerfi 5280*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_GOPHER" != "x1"; then 5281*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER" 5282*6236dae4SAndroid Build Coastguard Worker if test "x$SSL_ENABLED" = "x1"; then 5283*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHERS" 5284*6236dae4SAndroid Build Coastguard Worker fi 5285*6236dae4SAndroid Build Coastguard Workerfi 5286*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_MQTT" != "x1"; then 5287*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS MQTT" 5288*6236dae4SAndroid Build Coastguard Workerfi 5289*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_POP3" != "x1"; then 5290*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3" 5291*6236dae4SAndroid Build Coastguard Worker if test "x$SSL_ENABLED" = "x1"; then 5292*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S" 5293*6236dae4SAndroid Build Coastguard Worker fi 5294*6236dae4SAndroid Build Coastguard Workerfi 5295*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_IMAP" != "x1"; then 5296*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP" 5297*6236dae4SAndroid Build Coastguard Worker if test "x$SSL_ENABLED" = "x1"; then 5298*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS" 5299*6236dae4SAndroid Build Coastguard Worker fi 5300*6236dae4SAndroid Build Coastguard Workerfi 5301*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_SMB" != "x1" \ 5302*6236dae4SAndroid Build Coastguard Worker -a "x$use_curl_ntlm_core" = "xyes"; then 5303*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB" 5304*6236dae4SAndroid Build Coastguard Worker if test "x$SSL_ENABLED" = "x1"; then 5305*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS" 5306*6236dae4SAndroid Build Coastguard Worker fi 5307*6236dae4SAndroid Build Coastguard Workerfi 5308*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_SMTP" != "x1"; then 5309*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP" 5310*6236dae4SAndroid Build Coastguard Worker if test "x$SSL_ENABLED" = "x1"; then 5311*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS" 5312*6236dae4SAndroid Build Coastguard Worker fi 5313*6236dae4SAndroid Build Coastguard Workerfi 5314*6236dae4SAndroid Build Coastguard Workerif test "x$USE_LIBSSH2" = "x1"; then 5315*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" 5316*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" 5317*6236dae4SAndroid Build Coastguard Workerfi 5318*6236dae4SAndroid Build Coastguard Workerif test "x$USE_LIBSSH" = "x1"; then 5319*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" 5320*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" 5321*6236dae4SAndroid Build Coastguard Workerfi 5322*6236dae4SAndroid Build Coastguard Workerif test "x$USE_WOLFSSH" = "x1"; then 5323*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" 5324*6236dae4SAndroid Build Coastguard Workerfi 5325*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_IPFS" != "x1"; then 5326*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IPFS IPNS" 5327*6236dae4SAndroid Build Coastguard Workerfi 5328*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_RTSP" != "x1"; then 5329*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP" 5330*6236dae4SAndroid Build Coastguard Workerfi 5331*6236dae4SAndroid Build Coastguard Workerif test "x$USE_LIBRTMP" = "x1"; then 5332*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP" 5333*6236dae4SAndroid Build Coastguard Workerfi 5334*6236dae4SAndroid Build Coastguard Workerif test "x$CURL_DISABLE_WEBSOCKETS" != "x1"; then 5335*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WS" 5336*6236dae4SAndroid Build Coastguard Worker if test "x$SSL_ENABLED" = "x1"; then 5337*6236dae4SAndroid Build Coastguard Worker SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WSS" 5338*6236dae4SAndroid Build Coastguard Worker fi 5339*6236dae4SAndroid Build Coastguard Workerfi 5340*6236dae4SAndroid Build Coastguard Worker 5341*6236dae4SAndroid Build Coastguard Workerdnl replace spaces with newlines 5342*6236dae4SAndroid Build Coastguard Workerdnl sort the lines 5343*6236dae4SAndroid Build Coastguard Workerdnl replace the newlines back to spaces 5344*6236dae4SAndroid Build Coastguard WorkerSUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '` 5345*6236dae4SAndroid Build Coastguard Worker 5346*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(SUPPORT_PROTOCOLS) 5347*6236dae4SAndroid Build Coastguard Worker 5348*6236dae4SAndroid Build Coastguard Workerdnl squeeze whitespace out of some variables 5349*6236dae4SAndroid Build Coastguard Worker 5350*6236dae4SAndroid Build Coastguard Workersqueeze CFLAGS 5351*6236dae4SAndroid Build Coastguard Workersqueeze CPPFLAGS 5352*6236dae4SAndroid Build Coastguard Workersqueeze DEFS 5353*6236dae4SAndroid Build Coastguard Workersqueeze LDFLAGS 5354*6236dae4SAndroid Build Coastguard Workersqueeze LIBS 5355*6236dae4SAndroid Build Coastguard Worker 5356*6236dae4SAndroid Build Coastguard Workersqueeze LIBCURL_PC_LIBS_PRIVATE 5357*6236dae4SAndroid Build Coastguard Workersqueeze CURL_NETWORK_LIBS 5358*6236dae4SAndroid Build Coastguard Workersqueeze CURL_NETWORK_AND_TIME_LIBS 5359*6236dae4SAndroid Build Coastguard Worker 5360*6236dae4SAndroid Build Coastguard Workersqueeze SUPPORT_FEATURES 5361*6236dae4SAndroid Build Coastguard Workersqueeze SUPPORT_PROTOCOLS 5362*6236dae4SAndroid Build Coastguard Worker 5363*6236dae4SAndroid Build Coastguard WorkerXC_CHECK_BUILD_FLAGS 5364*6236dae4SAndroid Build Coastguard Worker 5365*6236dae4SAndroid Build Coastguard WorkerSSL_BACKENDS=${ssl_backends} 5366*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(SSL_BACKENDS) 5367*6236dae4SAndroid Build Coastguard Worker 5368*6236dae4SAndroid Build Coastguard Workerif test "x$want_curldebug_assumed" = "xyes" && 5369*6236dae4SAndroid Build Coastguard Worker test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then 5370*6236dae4SAndroid Build Coastguard Worker ac_configure_args="$ac_configure_args --enable-curldebug" 5371*6236dae4SAndroid Build Coastguard Workerfi 5372*6236dae4SAndroid Build Coastguard Worker 5373*6236dae4SAndroid Build Coastguard WorkerCURL_PREPARE_CONFIGUREHELP_PM 5374*6236dae4SAndroid Build Coastguard Worker 5375*6236dae4SAndroid Build Coastguard WorkerAC_CONFIG_FILES([\ 5376*6236dae4SAndroid Build Coastguard Worker Makefile \ 5377*6236dae4SAndroid Build Coastguard Worker docs/Makefile \ 5378*6236dae4SAndroid Build Coastguard Worker docs/examples/Makefile \ 5379*6236dae4SAndroid Build Coastguard Worker docs/libcurl/Makefile \ 5380*6236dae4SAndroid Build Coastguard Worker docs/libcurl/opts/Makefile \ 5381*6236dae4SAndroid Build Coastguard Worker docs/cmdline-opts/Makefile \ 5382*6236dae4SAndroid Build Coastguard Worker include/Makefile \ 5383*6236dae4SAndroid Build Coastguard Worker include/curl/Makefile \ 5384*6236dae4SAndroid Build Coastguard Worker src/Makefile \ 5385*6236dae4SAndroid Build Coastguard Worker lib/Makefile \ 5386*6236dae4SAndroid Build Coastguard Worker scripts/Makefile \ 5387*6236dae4SAndroid Build Coastguard Worker lib/libcurl.vers \ 5388*6236dae4SAndroid Build Coastguard Worker tests/Makefile \ 5389*6236dae4SAndroid Build Coastguard Worker tests/config \ 5390*6236dae4SAndroid Build Coastguard Worker tests/configurehelp.pm \ 5391*6236dae4SAndroid Build Coastguard Worker tests/certs/Makefile \ 5392*6236dae4SAndroid Build Coastguard Worker tests/certs/scripts/Makefile \ 5393*6236dae4SAndroid Build Coastguard Worker tests/data/Makefile \ 5394*6236dae4SAndroid Build Coastguard Worker tests/server/Makefile \ 5395*6236dae4SAndroid Build Coastguard Worker tests/libtest/Makefile \ 5396*6236dae4SAndroid Build Coastguard Worker tests/unit/Makefile \ 5397*6236dae4SAndroid Build Coastguard Worker tests/http/config.ini \ 5398*6236dae4SAndroid Build Coastguard Worker tests/http/Makefile \ 5399*6236dae4SAndroid Build Coastguard Worker tests/http/clients/Makefile \ 5400*6236dae4SAndroid Build Coastguard Worker packages/Makefile \ 5401*6236dae4SAndroid Build Coastguard Worker packages/vms/Makefile \ 5402*6236dae4SAndroid Build Coastguard Worker curl-config \ 5403*6236dae4SAndroid Build Coastguard Worker libcurl.pc 5404*6236dae4SAndroid Build Coastguard Worker]) 5405*6236dae4SAndroid Build Coastguard WorkerAC_OUTPUT 5406*6236dae4SAndroid Build Coastguard Worker 5407*6236dae4SAndroid Build Coastguard WorkerSUPPORT_PROTOCOLS_LOWER=`echo "$SUPPORT_PROTOCOLS" | tr A-Z a-z` 5408*6236dae4SAndroid Build Coastguard Worker 5409*6236dae4SAndroid Build Coastguard WorkerAC_MSG_NOTICE([Configured to build curl/libcurl: 5410*6236dae4SAndroid Build Coastguard Worker 5411*6236dae4SAndroid Build Coastguard Worker Host setup: ${host} 5412*6236dae4SAndroid Build Coastguard Worker Install prefix: ${prefix} 5413*6236dae4SAndroid Build Coastguard Worker Compiler: ${CC} 5414*6236dae4SAndroid Build Coastguard Worker CFLAGS: ${CFLAGS} 5415*6236dae4SAndroid Build Coastguard Worker CFLAGS extras: ${CURL_CFLAG_EXTRAS} 5416*6236dae4SAndroid Build Coastguard Worker CPPFLAGS: ${CPPFLAGS} 5417*6236dae4SAndroid Build Coastguard Worker LDFLAGS: ${LDFLAGS} 5418*6236dae4SAndroid Build Coastguard Worker LIBS: ${LIBS} 5419*6236dae4SAndroid Build Coastguard Worker 5420*6236dae4SAndroid Build Coastguard Worker curl version: ${CURLVERSION} 5421*6236dae4SAndroid Build Coastguard Worker SSL: ${curl_ssl_msg} 5422*6236dae4SAndroid Build Coastguard Worker SSH: ${curl_ssh_msg} 5423*6236dae4SAndroid Build Coastguard Worker zlib: ${curl_zlib_msg} 5424*6236dae4SAndroid Build Coastguard Worker brotli: ${curl_brotli_msg} 5425*6236dae4SAndroid Build Coastguard Worker zstd: ${curl_zstd_msg} 5426*6236dae4SAndroid Build Coastguard Worker GSS-API: ${curl_gss_msg} 5427*6236dae4SAndroid Build Coastguard Worker GSASL: ${curl_gsasl_msg} 5428*6236dae4SAndroid Build Coastguard Worker TLS-SRP: ${curl_tls_srp_msg} 5429*6236dae4SAndroid Build Coastguard Worker resolver: ${curl_res_msg} 5430*6236dae4SAndroid Build Coastguard Worker IPv6: ${curl_ipv6_msg} 5431*6236dae4SAndroid Build Coastguard Worker Unix sockets: ${curl_unix_sockets_msg} 5432*6236dae4SAndroid Build Coastguard Worker IDN: ${curl_idn_msg} 5433*6236dae4SAndroid Build Coastguard Worker Build docs: ${curl_docs_msg} 5434*6236dae4SAndroid Build Coastguard Worker Build libcurl: Shared=${enable_shared}, Static=${enable_static} 5435*6236dae4SAndroid Build Coastguard Worker Built-in manual: ${curl_manual_msg} 5436*6236dae4SAndroid Build Coastguard Worker --libcurl option: ${curl_libcurl_msg} 5437*6236dae4SAndroid Build Coastguard Worker Verbose errors: ${curl_verbose_msg} 5438*6236dae4SAndroid Build Coastguard Worker Code coverage: ${curl_coverage_msg} 5439*6236dae4SAndroid Build Coastguard Worker SSPI: ${curl_sspi_msg} 5440*6236dae4SAndroid Build Coastguard Worker ca cert bundle: ${ca}${ca_warning} 5441*6236dae4SAndroid Build Coastguard Worker ca cert path: ${capath}${capath_warning} 5442*6236dae4SAndroid Build Coastguard Worker ca cert embed: ${CURL_CA_EMBED_msg} 5443*6236dae4SAndroid Build Coastguard Worker ca fallback: ${with_ca_fallback} 5444*6236dae4SAndroid Build Coastguard Worker LDAP: ${curl_ldap_msg} 5445*6236dae4SAndroid Build Coastguard Worker LDAPS: ${curl_ldaps_msg} 5446*6236dae4SAndroid Build Coastguard Worker IPFS/IPNS: ${curl_ipfs_msg} 5447*6236dae4SAndroid Build Coastguard Worker RTSP: ${curl_rtsp_msg} 5448*6236dae4SAndroid Build Coastguard Worker RTMP: ${curl_rtmp_msg} 5449*6236dae4SAndroid Build Coastguard Worker PSL: ${curl_psl_msg} 5450*6236dae4SAndroid Build Coastguard Worker Alt-svc: ${curl_altsvc_msg} 5451*6236dae4SAndroid Build Coastguard Worker Headers API: ${curl_headers_msg} 5452*6236dae4SAndroid Build Coastguard Worker HSTS: ${curl_hsts_msg} 5453*6236dae4SAndroid Build Coastguard Worker HTTP1: ${curl_h1_msg} 5454*6236dae4SAndroid Build Coastguard Worker HTTP2: ${curl_h2_msg} 5455*6236dae4SAndroid Build Coastguard Worker HTTP3: ${curl_h3_msg} 5456*6236dae4SAndroid Build Coastguard Worker ECH: ${curl_ech_msg} 5457*6236dae4SAndroid Build Coastguard Worker Protocols: ${SUPPORT_PROTOCOLS_LOWER} 5458*6236dae4SAndroid Build Coastguard Worker Features: ${SUPPORT_FEATURES} 5459*6236dae4SAndroid Build Coastguard Worker]) 5460*6236dae4SAndroid Build Coastguard Worker 5461*6236dae4SAndroid Build Coastguard Worker# grep -o would simplify this, but is nonportable 5462*6236dae4SAndroid Build Coastguard Worker[non13=`echo "$TLSCHOICE" | $AWK '{split("bearssl secure-transport", a); for (i in a) if(match(tolower($0), a[i])) print a[i];}'`] 5463*6236dae4SAndroid Build Coastguard Workerif test -n "$non13"; then 5464*6236dae4SAndroid Build Coastguard Worker for a in $non13; do 5465*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([$a is enabled for TLS but it does not support TLS 1.3]) 5466*6236dae4SAndroid Build Coastguard Worker done 5467*6236dae4SAndroid Build Coastguard Workerfi 5468*6236dae4SAndroid Build Coastguard Worker 5469*6236dae4SAndroid Build Coastguard Workerif test -n "$experimental"; then 5470*6236dae4SAndroid Build Coastguard Worker for a in $experimental; do 5471*6236dae4SAndroid Build Coastguard Worker AC_MSG_WARN([$a is enabled but marked EXPERIMENTAL. Use with caution!]) 5472*6236dae4SAndroid Build Coastguard Worker done 5473*6236dae4SAndroid Build Coastguard Workerfi 5474*6236dae4SAndroid Build Coastguard Worker 5475*6236dae4SAndroid Build Coastguard WorkerCURL_PREPARE_BUILDINFO 5476*6236dae4SAndroid Build Coastguard Workerecho "[@%:@] This is a generated file. Do not edit.${curl_buildinfo}" > ./buildinfo.txt 5477*6236dae4SAndroid Build Coastguard Workerif test -n "$CURL_BUILDINFO$CURL_CI$CI"; then 5478*6236dae4SAndroid Build Coastguard Worker AC_MSG_NOTICE([${curl_buildinfo}]) 5479*6236dae4SAndroid Build Coastguard Workerfi 5480