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