Disable a debug option
[platform/upstream/curl.git] / configure
index ec37ba3..2bd4ff2 100755 (executable)
--- a/configure
+++ b/configure
@@ -12,7 +12,7 @@
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 #
-# Copyright (c) 1998 - 2021 Daniel Stenberg, <daniel@haxx.se>
+# Copyright (C) Daniel Stenberg, <daniel@haxx.se>
 # This configure script may be copied, distributed and modified under the
 # terms of the curl license; see COPYING for more details
 
@@ -898,7 +898,6 @@ ac_includes_default="\
 #endif"
 
 ac_header_c_list=
-enable_option_checking=no
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
@@ -921,10 +920,7 @@ DOING_CURL_SYMBOL_HIDING_TRUE
 USE_UNIX_SOCKETS
 BUILD_LIBHOSTNAME_FALSE
 BUILD_LIBHOSTNAME_TRUE
-USE_EMBEDDED_ARES_FALSE
-USE_EMBEDDED_ARES_TRUE
 USE_ARES
-subdirs
 USE_MANUAL_FALSE
 USE_MANUAL_TRUE
 MANOPT
@@ -932,13 +928,16 @@ NROFF
 PERL
 FISH_FUNCTIONS_DIR
 ZSH_FUNCTIONS_DIR
+USE_MSH3
 USE_QUICHE
 USE_NGHTTP3
+USE_NGTCP2_CRYPTO_WOLFSSL
 USE_NGTCP2_CRYPTO_GNUTLS
-USE_NGTCP2_CRYPTO_OPENSSL
+USE_NGTCP2_CRYPTO_QUICTLS
 USE_NGTCP2
 USE_NGHTTP2
 IDN_ENABLED
+CURL_PLIST_VERSION
 CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE
 CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE
 CURL_LT_SHLIB_VERSIONED_FLAVOUR
@@ -953,11 +952,8 @@ USE_LIBPSL_TRUE
 CURL_CA_BUNDLE
 CURL_WITH_MULTI_SSL
 SSL_ENABLED
-NSS_LIBS
-USE_NSS
 USE_RUSTLS
 USE_BEARSSL
-USE_MESALINK
 USE_WOLFSSL
 USE_MBEDTLS
 HAVE_GNUTLS_SRP
@@ -999,6 +995,8 @@ CURL_DISABLE_FILE
 CURL_DISABLE_FTP
 CURL_DISABLE_RTSP
 CURL_DISABLE_HTTP
+HAVE_WINDRES_FALSE
+HAVE_WINDRES_TRUE
 USE_WIN32_CRYPTO
 USE_WIN32_SMALL_FILES
 USE_WIN32_LARGE_FILES
@@ -1021,6 +1019,7 @@ CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE
 CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE
 CURL_LT_SHLIB_USE_VERSION_INFO_FALSE
 CURL_LT_SHLIB_USE_VERSION_INFO_TRUE
+RC
 LT_SYS_LIBRARY_PATH
 OTOOL64
 OTOOL
@@ -1030,6 +1029,7 @@ DSYMUTIL
 MANIFEST_TOOL
 RANLIB
 ac_ct_AR
+FILECMD
 LN_S
 NM
 ac_ct_DUMPBIN
@@ -1049,6 +1049,12 @@ build_os
 build_vendor
 build_cpu
 build
+HTTPD_NGHTTPX
+APACHECTL
+HTTPD
+APXS
+CADDY
+TEST_NGHTTPX
 PKGADD_VENDOR
 PKGADD_NAME
 PKGADD_PKG
@@ -1176,10 +1182,11 @@ with_openssl
 with_gnutls
 with_mbedtls
 with_wolfssl
-with_mesalink
 with_bearssl
 with_rustls
-with_nss
+with_test_nghttpx
+with_test_caddy
+with_test_httpd
 with_darwinssl
 enable_largefile
 enable_shared
@@ -1220,7 +1227,6 @@ with_gssapi_includes
 with_gssapi_libs
 with_gssapi
 with_default_ssl_backend
-with_egd_socket
 with_random
 enable_openssl_auto_load_config
 with_ca_bundle
@@ -1240,13 +1246,19 @@ with_nghttp2
 with_ngtcp2
 with_nghttp3
 with_quiche
+with_msh3
 with_zsh_functions_dir
 with_fish_functions_dir
 enable_threaded_resolver
 enable_pthreads
 enable_verbose
 enable_sspi
-enable_crypto_auth
+enable_basic_auth
+enable_bearer_auth
+enable_digest_auth
+enable_kerberos_auth
+enable_negotiate_auth
+enable_aws
 enable_ntlm
 enable_ntlm_wb
 enable_tls_srp
@@ -1256,13 +1268,17 @@ enable_socketpair
 enable_http_auth
 enable_doh
 enable_mime
+enable_bindlocal
+enable_form_api
 enable_dateparse
 enable_netrc
 enable_progress_meter
 enable_dnsshuffle
 enable_get_easy_options
 enable_alt_svc
+enable_headers_api
 enable_hsts
+enable_websockets
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1274,7 +1290,7 @@ LIBS
 CPPFLAGS
 CPP
 LT_SYS_LIBRARY_PATH'
-ac_subdirs_all='ares'
+
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -1945,7 +1961,7 @@ Optional Features:
   --enable-ldaps          Enable LDAPS support
   --disable-ldaps         Disable LDAPS support
   --enable-rtsp           Enable RTSP support
-    --disable-rtsp          Disable RTSP support
+  --disable-rtsp          Disable RTSP support
   --enable-proxy          Enable proxy support
   --disable-proxy         Disable proxy support
   --enable-dict           Enable DICT support
@@ -1992,8 +2008,19 @@ Optional Features:
   --disable-verbose       Disable verbose strings
   --enable-sspi           Enable SSPI
   --disable-sspi          Disable SSPI
-  --enable-crypto-auth    Enable cryptographic authentication
-  --disable-crypto-auth   Disable cryptographic authentication
+  --enable-basic-auth     Enable basic authentication (default)
+  --disable-basic-auth    Disable basic authentication
+  --enable-bearer-auth    Enable bearer authentication (default)
+  --disable-bearer-auth   Disable bearer authentication
+  --enable-digest-auth    Enable digest authentication (default)
+  --disable-digest-auth   Disable digest authentication
+  --enable-kerberos-auth  Enable kerberos authentication (default)
+  --disable-kerberos-auth Disable kerberos authentication
+  --enable-negotiate-auth Enable negotiate authentication (default)
+  --disable-negotiate-auth
+                          Disable negotiate authentication
+  --enable-aws            Enable AWS sig support (default)
+  --disable-aws           Disable AWS sig support
   --enable-ntlm           Enable NTLM support
   --disable-ntlm          Disable NTLM support
   --enable-ntlm-wb[=FILE] Enable NTLM delegation to winbind's ntlm_auth
@@ -2015,6 +2042,10 @@ Optional Features:
   --disable-doh           Disable DoH support
   --enable-mime           Enable mime API support
   --disable-mime          Disable mime API support
+  --enable-bindlocal      Enable local binding support
+  --disable-bindlocal     Disable local binding support
+  --enable-form-api       Enable form API support
+  --disable-form-api      Disable form API support
   --enable-dateparse      Enable date parsing
   --disable-dateparse     Disable date parsing
   --enable-netrc          Enable netrc parsing
@@ -2030,8 +2061,12 @@ Optional Features:
                           Disable curl_easy_options
   --enable-alt-svc        Enable alt-svc support
   --disable-alt-svc       Disable alt-svc support
+  --enable-headers-api    Enable headers-api support
+  --disable-headers-api   Disable headers-api support
   --enable-hsts           Enable HSTS support
-    --disable-hsts          Disable HSTS support
+  --disable-hsts          Disable HSTS support
+  --enable-websockets     Enable WebSockets support
+  --disable-websockets    Disable WebSockets support
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -2051,14 +2086,14 @@ Optional Packages:
                           installation root
   --with-wolfssl=PATH     where to look for WolfSSL, PATH points to the
                           installation root (default: system lib default)
-  --with-mesalink=PATH    where to look for MesaLink, PATH points to the
-                          installation root
   --with-bearssl=PATH     where to look for BearSSL, PATH points to the
                           installation root
   --with-rustls=PATH      where to look for rustls, PATH points to the
                           installation root
-  --with-nss=PATH         where to look for NSS, PATH points to the
-                          installation root
+  --with-test-nghttpx=PATH
+                          where to find nghttpx for testing
+  --with-test-caddy=PATH  where to find caddy for testing
+  --with-test-httpd=PATH  where to find httpd/apache2 for testing
 
   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                           both]
@@ -2091,7 +2126,6 @@ Optional Packages:
                           Use NAME as default SSL backend
   --without-default-ssl-backend
                           Use implicit default SSL backend
-  --with-egd-socket=FILE  Entropy Gathering Daemon socket pathname
   --with-random=FILE      read randomness from FILE (default=/dev/urandom)
   --with-ca-bundle=FILE   Path to a file containing CA certificates (example:
                           /etc/ca-bundle.crt)
@@ -2100,8 +2134,9 @@ Optional Packages:
                           Path to a directory containing CA certificates
                           stored individually, with their filenames in a hash
                           format. This option can be used with the OpenSSL,
-                          GnuTLS and mbedTLS backends. Refer to OpenSSL
-                          c_rehash for details. (example: /etc/certificates)
+                          GnuTLS, mbedTLS and wolfSSL backends. Refer to
+                          OpenSSL c_rehash for details. (example:
+                          /etc/certificates)
   --without-ca-path       Don't use a default CA path
   --with-ca-fallback      Use the built in CA store of the SSL library
   --without-ca-fallback   Don't use the built in CA store of the SSL library
@@ -2138,6 +2173,8 @@ Optional Packages:
   --without-nghttp3       Disable nghttp3 usage
   --with-quiche=PATH      Enable quiche usage
   --without-quiche        Disable quiche usage
+  --with-msh3=PATH        Enable msh3 usage
+  --without-msh3          Disable msh3 usage
   --with-zsh-functions-dir=PATH
                           Install zsh completions to PATH
   --without-zsh-functions-dir
@@ -2233,7 +2270,7 @@ Copyright (C) 2021 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 
-Copyright (c) 1998 - 2021 Daniel Stenberg, <daniel@haxx.se>
+Copyright (C) Daniel Stenberg, <daniel@haxx.se>
 This configure script may be copied, distributed and modified under the
 terms of the curl license; see COPYING for more details
 _ACEOF
@@ -2321,6 +2358,39 @@ fi
 
 } # ac_fn_c_try_cpp
 
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  eval "$3=yes"
+else $as_nop
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
 # ac_fn_c_try_link LINENO
 # -----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -2368,39 +2438,6 @@ fi
 
 } # ac_fn_c_try_link
 
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-printf %s "checking for $2... " >&6; }
-if eval test \${$3+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  eval "$3=yes"
-else $as_nop
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-eval ac_res=\$$3
-              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
 # ac_fn_c_check_func LINENO FUNC VAR
 # ----------------------------------
 # Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -2497,8 +2534,8 @@ fi
 
 } # ac_fn_c_try_run
 
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
+# ac_fn_c_check_type LINENO SIZEOF_LONG_LONG VAR INCLUDES
+# -------------------------------------------------------
 # Tests whether TYPE exists after having included INCLUDES, setting cache
 # variable VAR accordingly.
 ac_fn_c_check_type ()
@@ -3930,13 +3967,15 @@ fi
 
 
 if test -z "$EGREP"; then
-    if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-printf %s "checking for egrep... " >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that grep -E works" >&5
+printf %s "checking that grep -E works... " >&6; }
+  if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
     EGREP="$GREP -E"
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
-printf "%s\n" "$EGREP" >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
   else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
     # Extract the first word of "egrep", so it can be a program name with args.
 set dummy egrep; ac_word=$2
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -3987,7 +4026,7 @@ fi
   fi
 fi
 if test -z "$EGREP" || test "$EGREP" = "not_found"; then
-  as_fn_error $? "egrep not found in PATH. Cannot continue without egrep." "$LINENO" 5
+  as_fn_error $? "grep -E is not working and egrep is not found in PATH. Cannot continue." "$LINENO" 5
 fi
 
 
@@ -5582,6 +5621,87 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+  if test $ac_cache; then
+    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+      printf "%s\n" "#define $ac_item 1" >> confdefs.h
+    fi
+    ac_header= ac_cache=
+  elif test $ac_header; then
+    ac_cache=$ac_item
+  else
+    ac_header=$ac_item
+  fi
+done
+
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+         for ac_header in stdatomic.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "stdatomic.h" "ac_cv_header_stdatomic_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdatomic_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_STDATOMIC_H 1" >>confdefs.h
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _Atomic is available" >&5
+printf %s "checking if _Atomic is available... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+        $curl_includes_unistd
+
+int main (void)
+{
+
+        _Atomic int i = 0;
+        i = 4;  // Force an atomic-write operation.
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_ATOMIC 1" >>confdefs.h
+
+      tst_atomic="yes"
+
+else $as_nop
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      tst_atomic="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+done
+
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 printf %s "checking for a sed that does not truncate output... " >&6; }
 if test ${ac_cv_path_SED+y}
@@ -5834,7 +5954,7 @@ fi
     fi
 
     CPPFLAGS="$CPPFLAGS -DNDEBUG"
-    CFLAGS="$CLAGS -O0 -g -fprofile-arcs -ftest-coverage"
+    CFLAGS="$CFLAGS -O0 -g -fprofile-arcs -ftest-coverage"
     LIBS="$LIBS -lgcov"
   fi
 
@@ -6530,7 +6650,7 @@ PKGADD_VENDOR="curl.se"
 
 
 
-    curl_ssl_msg="no      (--with-{openssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,mesalink,amissl,bearssl,rustls} )"
+    curl_ssl_msg="no      (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,secure-transport,amissl,bearssl,rustls} )"
     curl_ssh_msg="no      (--with-{libssh,libssh2})"
    curl_zlib_msg="no      (--with-zlib)"
  curl_brotli_msg="no      (--with-brotli)"
@@ -6552,11 +6672,13 @@ curl_verbose_msg="enabled (--disable-verbose)"
    curl_rtmp_msg="no      (--with-librtmp)"
     curl_psl_msg="no      (--with-libpsl)"
  curl_altsvc_msg="enabled (--disable-alt-svc)"
+curl_headers_msg="enabled (--disable-headers-api)"
    curl_hsts_msg="enabled (--disable-hsts)"
+     curl_ws_msg="no      (--enable-websockets)"
     ssl_backends=
      curl_h1_msg="enabled (internal)"
-     curl_h2_msg="no      (--with-nghttp2, --with-hyper)"
-     curl_h3_msg="no      (--with-ngtcp2, --with-quiche)"
+     curl_h2_msg="no      (--with-nghttp2)"
+     curl_h3_msg="no      (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-msh3)"
 
 enable_altsvc="yes"
 hsts="yes"
@@ -6564,6 +6686,19 @@ hsts="yes"
 INITIAL_LDFLAGS=$LDFLAGS
 INITIAL_LIBS=$LIBS
 
+compilersh="run-compiler"
+CURL_SAVED_CC="$CC"
+export CURL_SAVED_CC
+CURL_SAVED_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
+export CURL_SAVED_LD_LIBRARY_PATH
+cat <<\EOF > "$compilersh"
+CC="$CURL_SAVED_CC"
+export CC
+LD_LIBRARY_PATH="$CURL_SAVED_LD_LIBRARY_PATH"
+export LD_LIBRARY_PATH
+exec $CC "$@"
+EOF
+
 OPT_SCHANNEL=no
 
 # Check whether --with-schannel was given.
@@ -6579,10 +6714,9 @@ OPT_SECURETRANSPORT=no
 # Check whether --with-secure-transport was given.
 if test ${with_secure_transport+y}
 then :
-  withval=$with_secure_transport; OPT_SECURETRANSPORT=$withval
-  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
-else $as_nop
-  }Secure-Transport"
+  withval=$with_secure_transport;
+  OPT_SECURETRANSPORT=$withval
+  TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }Secure-Transport"
 
 fi
 
@@ -6592,10 +6726,10 @@ OPT_AMISSL=no
 # Check whether --with-amissl was given.
 if test ${with_amissl+y}
 then :
-  withval=$with_amissl; OPT_AMISSL=$withval
-  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
-else $as_nop
-  }AmiSSL"
+  withval=$with_amissl;
+  OPT_AMISSL=$withval
+  TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }AmiSSL"
+
 fi
 
 
@@ -6605,126 +6739,521 @@ ca="no"
 # Check whether --with-ssl was given.
 if test ${with_ssl+y}
 then :
-  withval=$with_ssl; OPT_SSL=$withval
+  withval=$with_ssl;
+  OPT_SSL=$withval
   OPT_OPENSSL=$withval
   if test X"$withval" != Xno; then
-    test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
-else $as_nop
-  }OpenSSL"
+    TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
+  else
+    SSL_DISABLED="D"
+  fi
+
 fi
 
-  fi
 
 
 # Check whether --with-openssl was given.
 if test ${with_openssl+y}
 then :
-  withval=$with_openssl; OPT_OPENSSL=$withval
+  withval=$with_openssl;
+  OPT_OPENSSL=$withval
   if test X"$withval" != Xno; then
-    test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
-else $as_nop
-  }OpenSSL"
+    TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
+  fi
+
 fi
 
-  fi
 
 OPT_GNUTLS=no
 
 # Check whether --with-gnutls was given.
 if test ${with_gnutls+y}
 then :
-  withval=$with_gnutls; OPT_GNUTLS=$withval
+  withval=$with_gnutls;
+  OPT_GNUTLS=$withval
   if test X"$withval" != Xno; then
-    test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
-else $as_nop
-  }GnuTLS"
+    TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }GnuTLS"
+  fi
+
 fi
 
-  fi
 
 OPT_MBEDTLS=no
 
 # Check whether --with-mbedtls was given.
 if test ${with_mbedtls+y}
 then :
-  withval=$with_mbedtls; OPT_MBEDTLS=$withval
+  withval=$with_mbedtls;
+  OPT_MBEDTLS=$withval
   if test X"$withval" != Xno; then
-    test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
-else $as_nop
-  }mbedTLS"
+    TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }mbedTLS"
+  fi
+
 fi
 
-  fi
 
 OPT_WOLFSSL=no
 
 # Check whether --with-wolfssl was given.
 if test ${with_wolfssl+y}
 then :
-  withval=$with_wolfssl; OPT_WOLFSSL=$withval
+  withval=$with_wolfssl;
+  OPT_WOLFSSL=$withval
   if test X"$withval" != Xno; then
-    test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
-else $as_nop
-  }wolfSSL"
+    TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }wolfSSL"
+  fi
+
 fi
 
+
+OPT_BEARSSL=no
+
+# Check whether --with-bearssl was given.
+if test ${with_bearssl+y}
+then :
+  withval=$with_bearssl;
+  OPT_BEARSSL=$withval
+  if test X"$withval" != Xno; then
+    TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }BearSSL"
   fi
 
-OPT_MESALINK=no
+fi
+
+
+OPT_RUSTLS=no
 
-# Check whether --with-mesalink was given.
-if test ${with_mesalink+y}
+# Check whether --with-rustls was given.
+if test ${with_rustls+y}
 then :
-  withval=$with_mesalink; OPT_MESALINK=$withval
+  withval=$with_rustls;
+  OPT_RUSTLS=$withval
   if test X"$withval" != Xno; then
-    test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+    TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }rustls"
+    experimental="$experimental rustls"
+  fi
+
+fi
+
+
+TEST_NGHTTPX=nghttpx
+
+# Check whether --with-test-nghttpx was given.
+if test ${with_test_nghttpx+y}
+then :
+  withval=$with_test_nghttpx; TEST_NGHTTPX=$withval
+  if test X"$OPT_TEST_NGHTTPX" = "Xno" ; then
+      TEST_NGHTTPX=""
+  fi
+
+fi
+
+
+
+CADDY=caddy
+
+# Check whether --with-test-caddy was given.
+if test ${with_test_caddy+y}
+then :
+  withval=$with_test_caddy; CADDY=$withval
+  if test X"$OPT_CADDY" = "Xno" ; then
+      CADDY=""
+  fi
+
+fi
+
+
+
+HTTPD_ENABLED="maybe"
+
+# Check whether --with-test-httpd was given.
+if test ${with_test_httpd+y}
+then :
+  withval=$with_test_httpd; request_httpd=$withval
 else $as_nop
-  }MesaLink"
+  request_httpd=check
 fi
 
+if test x"$request_httpd" = "xcheck" -o x"$request_httpd" = "xyes"; then
+  if test -x "/usr/sbin/apache2" -a -x "/usr/sbin/apache2ctl"; then
+    # common location on distros (debian/ubuntu)
+    HTTPD="/usr/sbin/apache2"
+    APACHECTL="/usr/sbin/apache2ctl"
+    # Extract the first word of "apxs", so it can be a program name with args.
+set dummy apxs; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_APXS+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $APXS in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_APXS="$APXS" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_APXS="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+  done
+IFS=$as_save_IFS
 
-OPT_BEARSSL=no
+  ;;
+esac
+fi
+APXS=$ac_cv_path_APXS
+if test -n "$APXS"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $APXS" >&5
+printf "%s\n" "$APXS" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
-# Check whether --with-bearssl was given.
-if test ${with_bearssl+y}
+
+    if test "x$APXS" = "x"; then
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: apache2-dev not installed, httpd tests disabled" >&5
+printf "%s\n" "$as_me: apache2-dev not installed, httpd tests disabled" >&6;}
+      HTTPD_ENABLED="no"
+    fi
+  else
+    # Extract the first word of "httpd", so it can be a program name with args.
+set dummy httpd; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_HTTPD+y}
 then :
-  withval=$with_bearssl; OPT_BEARSSL=$withval
-  if test X"$withval" != Xno; then
-    test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+  printf %s "(cached) " >&6
 else $as_nop
-  }BearSSL"
+  case $HTTPD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_HTTPD="$HTTPD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_HTTPD="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+HTTPD=$ac_cv_path_HTTPD
+if test -n "$HTTPD"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HTTPD" >&5
+printf "%s\n" "$HTTPD" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
+
+    if test "x$HTTPD" = "x"; then
+      # Extract the first word of "apache2", so it can be a program name with args.
+set dummy apache2; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_HTTPD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $HTTPD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_HTTPD="$HTTPD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_HTTPD="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+  done
+IFS=$as_save_IFS
 
-OPT_RUSTLS=no
+  ;;
+esac
+fi
+HTTPD=$ac_cv_path_HTTPD
+if test -n "$HTTPD"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HTTPD" >&5
+printf "%s\n" "$HTTPD" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
-# Check whether --with-rustls was given.
-if test ${with_rustls+y}
+
+    fi
+    # Extract the first word of "apachectl", so it can be a program name with args.
+set dummy apachectl; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_APACHECTL+y}
 then :
-  withval=$with_rustls; OPT_RUSTLS=$withval
-  if test X"$withval" != Xno; then
-    test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+  printf %s "(cached) " >&6
+else $as_nop
+  case $APACHECTL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_APACHECTL="$APACHECTL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_APACHECTL="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+APACHECTL=$ac_cv_path_APACHECTL
+if test -n "$APACHECTL"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $APACHECTL" >&5
+printf "%s\n" "$APACHECTL" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+    # Extract the first word of "apxs", so it can be a program name with args.
+set dummy apxs; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_APXS+y}
+then :
+  printf %s "(cached) " >&6
 else $as_nop
-  }rustls"
+  case $APXS in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_APXS="$APXS" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_APXS="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+APXS=$ac_cv_path_APXS
+if test -n "$APXS"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $APXS" >&5
+printf "%s\n" "$APXS" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
+
+    if test "x$HTTPD" = "x" -o "x$APACHECTL" = "x"; then
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: httpd/apache2 not in PATH, http tests disabled" >&5
+printf "%s\n" "$as_me: httpd/apache2 not in PATH, http tests disabled" >&6;}
+      HTTPD_ENABLED="no"
+    fi
+    if test "x$APXS" = "x"; then
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: apxs not in PATH, http tests disabled" >&5
+printf "%s\n" "$as_me: apxs not in PATH, http tests disabled" >&6;}
+      HTTPD_ENABLED="no"
+    fi
+  fi
+elif test x"$request_httpd" != "xno"; then
+  HTTPD="${request_httpd}/bin/httpd"
+  APACHECTL="${request_httpd}/bin/apachectl"
+  APXS="${request_httpd}/bin/apxs"
+  if test ! -x "${HTTPD}"; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: httpd not found as ${HTTPD}, http tests disabled" >&5
+printf "%s\n" "$as_me: httpd not found as ${HTTPD}, http tests disabled" >&6;}
+    HTTPD_ENABLED="no"
+  elif test ! -x "${APACHECTL}"; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: apachectl not found as ${APACHECTL}, http tests disabled" >&5
+printf "%s\n" "$as_me: apachectl not found as ${APACHECTL}, http tests disabled" >&6;}
+    HTTPD_ENABLED="no"
+  elif test ! -x "${APXS}"; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: apxs not found as ${APXS}, http tests disabled" >&5
+printf "%s\n" "$as_me: apxs not found as ${APXS}, http tests disabled" >&6;}
+    HTTPD_ENABLED="no"
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using HTTPD=$HTTPD for tests" >&5
+printf "%s\n" "$as_me: using HTTPD=$HTTPD for tests" >&6;}
   fi
+fi
+if test x"$HTTPD_ENABLED" = "xno"; then
+  HTTPD=""
+  APACHECTL=""
+  APXS=""
+fi
+
+
 
-OPT_NSS=no
 
-# Check whether --with-nss was given.
-if test ${with_nss+y}
+if test "x$TEST_NGHTTPX" != "x" -a "x$TEST_NGHTTPX" != "xnghttpx"; then
+  HTTPD_NGHTTPX="$TEST_NGHTTPX"
+else
+  # Extract the first word of "nghttpx", so it can be a program name with args.
+set dummy nghttpx; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_HTTPD_NGHTTPX+y}
 then :
-  withval=$with_nss; OPT_NSS=$withval
-  if test X"$withval" != Xno; then
-    test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+  printf %s "(cached) " >&6
 else $as_nop
-  }NSS"
+  case $HTTPD_NGHTTPX in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_HTTPD_NGHTTPX="$HTTPD_NGHTTPX" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_HTTPD_NGHTTPX="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+HTTPD_NGHTTPX=$ac_cv_path_HTTPD_NGHTTPX
+if test -n "$HTTPD_NGHTTPX"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HTTPD_NGHTTPX" >&5
+printf "%s\n" "$HTTPD_NGHTTPX" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
 fi
 
+
+if test "x$TEST_CADDY" != "x"; then
+  CADDY="$TEST_CADDY"
+else
+  # Extract the first word of "caddy", so it can be a program name with args.
+set dummy caddy; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_CADDY+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $CADDY in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CADDY="$CADDY" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_CADDY="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CADDY=$ac_cv_path_CADDY
+if test -n "$CADDY"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CADDY" >&5
+printf "%s\n" "$CADDY" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+
 
 if test -z "$TLSCHOICE"; then
   if test "x$OPT_SSL" != "xno"; then
@@ -6736,8 +7265,6 @@ Select from these:
   --with-bearssl
   --with-gnutls
   --with-mbedtls
-  --with-mesalink
-  --with-nss
   --with-openssl (also works for BoringSSL and libressl)
   --with-rustls
   --with-schannel
@@ -6751,7 +7278,7 @@ fi
 # Check whether --with-darwinssl was given.
 if test ${with_darwinssl+y}
 then :
-  withval=$with_darwinssl; as_fn_error $? "--with-darwin-ssl no longer works!" "$LINENO" 5
+  withval=$with_darwinssl; as_fn_error $? "--with-darwin-ssl and --without-darwin-ssl no longer work!" "$LINENO" 5
 fi
 
 
@@ -6840,7 +7367,6 @@ AR_FLAGS=cr
 
 
 
-
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 printf %s "checking for grep that handles long lines and -e... " >&6; }
 if test ${ac_cv_path_GREP+y}
@@ -7981,8 +8507,8 @@ esac
 
 
 
-macro_version='2.4.6'
-macro_revision='2.4.6'
+macro_version='2.4.7'
+macro_revision='2.4.7'
 
 
 
@@ -8393,13 +8919,13 @@ else
        mingw*) lt_bad_file=conftest.nm/nofile ;;
        *) lt_bad_file=/dev/null ;;
        esac
-       case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+       case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
        *$lt_bad_file* | *'Invalid file or object type'*)
          lt_cv_path_NM="$tmp_nm -B"
          break 2
          ;;
        *)
-         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+         case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
          */dev/null*)
            lt_cv_path_NM="$tmp_nm -p"
            break 2
@@ -8537,7 +9063,7 @@ esac
   fi
 fi
 
-    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
     *COFF*)
       DUMPBIN="$DUMPBIN -symbols -headers"
       ;;
@@ -8641,7 +9167,7 @@ else $as_nop
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -8684,7 +9210,7 @@ else $as_nop
   sysv5* | sco5v6* | sysv4.2uw2*)
     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
     if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[         ]//'`
+      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[        ]//'`
     else
       lt_cv_sys_max_cmd_len=32768
     fi
@@ -8890,6 +9416,114 @@ esac
 
 
 if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
+set dummy ${ac_tool_prefix}file; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_FILECMD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$FILECMD"; then
+  ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_FILECMD="${ac_tool_prefix}file"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+FILECMD=$ac_cv_prog_FILECMD
+if test -n "$FILECMD"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
+printf "%s\n" "$FILECMD" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_FILECMD"; then
+  ac_ct_FILECMD=$FILECMD
+  # Extract the first word of "file", so it can be a program name with args.
+set dummy file; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_FILECMD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ac_ct_FILECMD"; then
+  ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_FILECMD="file"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
+if test -n "$ac_ct_FILECMD"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
+printf "%s\n" "$ac_ct_FILECMD" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+  if test "x$ac_ct_FILECMD" = x; then
+    FILECMD=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    FILECMD=$ac_ct_FILECMD
+  fi
+else
+  FILECMD="$ac_cv_prog_FILECMD"
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
 set dummy ${ac_tool_prefix}objdump; ac_word=$2
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -9029,7 +9663,7 @@ beos*)
 
 bsdi[45]*)
   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_cmd='$FILECMD -L'
   lt_cv_file_magic_test_file=/shlib/libc.so
   ;;
 
@@ -9063,14 +9697,14 @@ darwin* | rhapsody*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
       # Not sure whether the presence of OpenBSD here was a mistake.
       # Let's accept both of them until this is cleared up.
       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_cmd=$FILECMD
       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
       ;;
     esac
@@ -9084,7 +9718,7 @@ haiku*)
   ;;
 
 hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   case $host_cpu in
   ia64*)
     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
@@ -9131,7 +9765,7 @@ netbsd* | netbsdelf*-gnu)
 
 newos6*)
   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   lt_cv_file_magic_test_file=/usr/lib/libnls.so
   ;;
 
@@ -9501,13 +10135,29 @@ esac
 fi
 
 : ${AR=ar}
-: ${AR_FLAGS=cr}
 
 
 
 
 
 
+# Use ARFLAGS variable as AR's operation code to sync the variable naming with
+# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
+# higher priority because thats what people were doing historically (setting
+# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
+# variable obsoleted/removed.
+
+test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
+lt_ar_flags=$AR_FLAGS
+
+
+
+
+
+
+# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
+# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
+
 
 
 
@@ -9923,7 +10573,7 @@ esac
 
 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
   # Gets list of data symbols to import.
-  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
   # Adjust the below global symbol transforms to fixup imported variables.
   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
 $lt_cdecl_hook\
 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
 $lt_c_name_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
 
 # Transform an extracted symbol line into symbol name with lib prefix and
 # symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
 $lt_c_name_lib_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
@@ -9978,7 +10628,7 @@ for ac_symprfx in "" "_"; do
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
     # Fake it for dumpbin and say T for any non-static function,
     # D for any global variable and I for any imported variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
+    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
@@ -9996,9 +10646,9 @@ for ac_symprfx in "" "_"; do
 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx"
   else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[    ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
-  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -10198,7 +10848,7 @@ case $with_sysroot in #(
    fi
    ;; #(
  /*)
-   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
    ;; #(
  no|'')
    ;; #(
@@ -10323,7 +10973,7 @@ ia64-*-hpux*)
   ac_status=$?
   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *ELF-32*)
        HPUX_IA64_MODE=32
        ;;
@@ -10344,7 +10994,7 @@ ia64-*-hpux*)
   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
     if test yes = "$lt_cv_prog_gnu_ld"; then
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
        *32-bit*)
          LD="${LD-ld} -melf32bsmip"
          ;;
@@ -10356,7 +11006,7 @@ ia64-*-hpux*)
        ;;
       esac
     else
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
        *32-bit*)
          LD="${LD-ld} -32"
          ;;
@@ -10382,7 +11032,7 @@ mips64*-*linux*)
   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
     emul=elf
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *32-bit*)
        emul="${emul}32"
        ;;
@@ -10390,7 +11040,7 @@ mips64*-*linux*)
        emul="${emul}64"
        ;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *MSB*)
        emul="${emul}btsmip"
        ;;
@@ -10398,7 +11048,7 @@ mips64*-*linux*)
        emul="${emul}ltsmip"
        ;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *N32*)
        emul="${emul}n32"
        ;;
@@ -10422,14 +11072,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   ac_status=$?
   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
       *32-bit*)
        case $host in
          x86_64-*kfreebsd*-gnu)
            LD="${LD-ld} -m elf_i386_fbsd"
            ;;
          x86_64-*linux*)
-           case `/usr/bin/file conftest.o` in
+           case `$FILECMD conftest.o` in
              *x86-64*)
                LD="${LD-ld} -m elf32_x86_64"
                ;;
@@ -10536,7 +11186,7 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
   ac_status=$?
   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
       yes*)
@@ -11318,8 +11968,8 @@ int forced_loaded() { return 2;}
 _LT_EOF
       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
-      echo "$AR cr libconftest.a conftest.o" >&5
-      $AR cr libconftest.a conftest.o 2>&5
+      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
+      $AR $AR_FLAGS libconftest.a conftest.o 2>&5
       echo "$RANLIB libconftest.a" >&5
       $RANLIB libconftest.a 2>&5
       cat > conftest.c << _LT_EOF
@@ -11346,17 +11996,12 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; }
       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-       10.0,*86*-darwin8*|10.0,*-darwin[912]*)
-         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-       10.[012][,.]*)
-         _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-       10.*|11.*)
-         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+    darwin*)
+      case $MACOSX_DEPLOYMENT_TARGET,$host in
+        10.[012],*|,*powerpc*-darwin[5-8]*)
+          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+        *)
+          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
@@ -11411,35 +12056,6 @@ func_munge_path_list ()
     esac
 }
 
-ac_header= ac_cache=
-for ac_item in $ac_header_c_list
-do
-  if test $ac_cache; then
-    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
-    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
-      printf "%s\n" "#define $ac_item 1" >> confdefs.h
-    fi
-    ac_header= ac_cache=
-  elif test $ac_header; then
-    ac_cache=$ac_item
-  else
-    ac_header=$ac_item
-  fi
-done
-
-
-
-
-
-
-
-
-if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
-then :
-
-printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
 "
 if test "x$ac_cv_header_dlfcn_h" = xyes
@@ -12179,8 +12795,8 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC and
+# ICC, which need '.lib').
 libext=a
 
 with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -12698,7 +13314,7 @@ lt_prog_compiler_static=
        lt_prog_compiler_static='-qstaticlink'
        ;;
       *)
-       case `$CC -V 2>&1 | sed 5q` in
+       case `$CC -V 2>&1 | $SED 5q` in
        *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
          lt_prog_compiler_pic='-KPIC'
@@ -13121,15 +13737,15 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
 
   case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
+    # Microsoft Visual C++ or Intel C++ Compiler.
     if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
   interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
     with_gnu_ld=yes
     ;;
   openbsd* | bitrig*)
@@ -13184,7 +13800,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
       whole_archive_flag_spec=
     fi
     supports_anon_versioning=no
-    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -13296,6 +13912,7 @@ _LT_EOF
        emximp -o $lib $output_objdir/$libname.def'
       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       enable_shared_with_static_runtimes=yes
+      file_list_spec='@'
       ;;
 
     interix[3-9]*)
@@ -13310,7 +13927,7 @@ _LT_EOF
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -13353,7 +13970,7 @@ _LT_EOF
          compiler_needs_object=yes
          ;;
        esac
-       case `$CC -V 2>&1 | sed 5q` in
+       case `$CC -V 2>&1 | $SED 5q` in
        *Sun\ C*)                       # Sun C 5.9
          whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          compiler_needs_object=yes
@@ -13365,13 +13982,14 @@ _LT_EOF
 
         if test yes = "$supports_anon_versioning"; then
           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
             echo "local: *; };" >> $output_objdir/$libname.ver~
             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
        case $cc_basename in
        tcc*)
+         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
          export_dynamic_flag_spec='-rdynamic'
          ;;
        xlf* | bgf* | bgxlf* | mpixlf*)
@@ -13381,7 +13999,7 @@ _LT_EOF
          archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
          if test yes = "$supports_anon_versioning"; then
            archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
               echo "local: *; };" >> $output_objdir/$libname.ver~
               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
          fi
@@ -13513,7 +14131,7 @@ _LT_EOF
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
          export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
        else
-         export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+         export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
        fi
        aix_use_runtimelinking=no
 
 
     cygwin* | mingw* | pw32* | cegcc*)
       # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
+      # Microsoft Visual C++ or Intel C++ Compiler.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
       case $cc_basename in
-      cl*)
-       # Native MSVC
+      cl* | icl*)
+       # Native MSVC or ICC
        hardcode_libdir_flag_spec=' '
        allow_undefined_flag=unsupported
        always_export_symbols=yes
@@ -13828,7 +14446,7 @@ fi
           fi'
        ;;
       *)
-       # Assume MSVC wrapper
+       # Assume MSVC and ICC wrapper
        hardcode_libdir_flag_spec=' '
        allow_undefined_flag=unsupported
        # Tell ltmain to make .lib files, not .a files.
@@ -13869,8 +14487,8 @@ fi
     output_verbose_link_cmd=func_echo_all
     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
-    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
-    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+    archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
 
   else
   ld_shlibs=no
@@ -13904,7 +14522,7 @@ fi
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
+    freebsd* | dragonfly* | midnightbsd*)
       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
@@ -14085,6 +14703,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
        # Fabrice Bellard et al's Tiny C Compiler
        ld_shlibs=yes
        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
        ;;
       esac
       ;;
@@ -14156,6 +14775,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
        emximp -o $lib $output_objdir/$libname.def'
       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       enable_shared_with_static_runtimes=yes
+      file_list_spec='@'
       ;;
 
     osf3*)
@@ -14848,7 +15468,7 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -14858,14 +15478,14 @@ cygwin* | mingw* | pw32* | cegcc*)
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
     ;;
 
-  *,cl*)
-    # Native MSVC
+  *,cl* | *,icl*)
+    # Native MSVC or ICC
     libname_spec='$name'
     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
     library_names_spec='$libname.dll.lib'
@@ -14884,7 +15504,7 @@ cygwin* | mingw* | pw32* | cegcc*)
       done
       IFS=$lt_save_ifs
       # Convert to MSYS style.
-      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
       ;;
     cygwin*)
       # Convert to unix form, then to dos form, then back to unix form
@@ -14921,7 +15541,7 @@ cygwin* | mingw* | pw32* | cegcc*)
     ;;
 
   *)
-    # Assume MSVC wrapper
+    # Assume MSVC and ICC wrapper
     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
@@ -14954,7 +15574,7 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
   if test -x /usr/bin/objformat; then
@@ -16118,30 +16738,41 @@ striplib=
 old_striplib=
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
 printf %s "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
+if test -z "$STRIP"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP"; then
+  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+    old_striplib="$STRIP --strip-debug"
+    striplib="$STRIP --strip-unneeded"
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+  else
+    case $host_os in
+    darwin*)
+      # FIXME - insert some real tests, host_os isn't really good enough
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+      ;;
+    freebsd*)
+      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+        old_striplib="$STRIP --strip-debug"
+        striplib="$STRIP --strip-unneeded"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
-    fi
-    ;;
-  *)
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+      fi
+      ;;
+    *)
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
-    ;;
-  esac
+      ;;
+    esac
+  fi
 fi
 
 
@@ -16316,7 +16947,7 @@ esac
 printf "%s\n" "$xc_lt_shlib_use_mimpure_text" >&6; }
 
 #
-# Find out whether libtool libraries would be built wit PIC
+# Find out whether libtool libraries would be built with PIC
 #
 
 case "x$pic_mode" in # ((((
@@ -16381,6 +17012,187 @@ printf "%s\n" "$xc_lt_build_static_only" >&6; }
 
 
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$RC"; then
+  ac_cv_prog_RC="$RC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RC="${ac_tool_prefix}windres"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RC=$ac_cv_prog_RC
+if test -n "$RC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
+printf "%s\n" "$RC" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RC"; then
+  ac_ct_RC=$RC
+  # Extract the first word of "windres", so it can be a program name with args.
+set dummy windres; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ac_ct_RC"; then
+  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RC="windres"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RC=$ac_cv_prog_ac_ct_RC
+if test -n "$ac_ct_RC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
+printf "%s\n" "$ac_ct_RC" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+  if test "x$ac_ct_RC" = x; then
+    RC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RC=$ac_ct_RC
+  fi
+else
+  RC="$ac_cv_prog_RC"
+fi
+
+
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=$lt_simple_compile_test_code
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+compiler_RC=$CC
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
+
+lt_cv_prog_compiler_c_o_RC=yes
+
+if test -n "$compiler"; then
+  :
+
+
+
+fi
+
+GCC=$lt_save_GCC
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+
+
 #
 # Automake conditionals based on libtool related checks
 #
@@ -16872,7 +17684,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
   if test "$curl_cv_have_def___INTEL_COMPILER" = "yes"; then
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking compiler version" >&5
+printf %s "checking compiler version... " >&6; }
     compiler_num="$curl_cv_def___INTEL_COMPILER"
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Intel C '$compiler_num'" >&5
+printf "%s\n" "Intel C '$compiler_num'" >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
   # CPPPFLAG comes from CURL_CPP_P
@@ -17043,21 +17859,44 @@ printf "%s\n" "yes" >&6; }
 printf "%s\n" "no" >&6; }
       compiler_id="CLANG"
     fi
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking compiler version" >&5
+printf %s "checking compiler version... " >&6; }
     fullclangver=`$CC -v 2>&1 | grep version`
+    if echo $fullclangver | grep 'Apple' >/dev/null; then
+      appleclang=1
+    else
+      appleclang=0
+    fi
     clangver=`echo $fullclangver | grep "based on LLVM " | "$SED" 's/.*(based on LLVM \([0-9]*\.[0-9]*\).*)/\1/'`
     if test -z "$clangver"; then
-      if echo $fullclangver | grep "Apple LLVM version " >/dev/null; then
-                clangver="3.7"
-      else
-        clangver=`echo $fullclangver | "$SED" 's/.*version \([0-9]*\.[0-9]*\).*/\1/'`
-      fi
+      clangver=`echo $fullclangver | "$SED" 's/.*version \([0-9]*\.[0-9]*\).*/\1/'`
+      oldapple=0
+    else
+      oldapple=1
     fi
     clangvhi=`echo $clangver | cut -d . -f1`
     clangvlo=`echo $clangver | cut -d . -f2`
     compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null`
+    if test "$appleclang" = '1' && test "$oldapple" = '0'; then
+            if   test "$compiler_num" -ge '1300'; then compiler_num='1200'
+      elif test "$compiler_num" -ge '1205'; then compiler_num='1101'
+      elif test "$compiler_num" -ge '1204'; then compiler_num='1000'
+      elif test "$compiler_num" -ge '1107'; then compiler_num='900'
+      elif test "$compiler_num" -ge '1103'; then compiler_num='800'
+      elif test "$compiler_num" -ge '1003'; then compiler_num='700'
+      elif test "$compiler_num" -ge '1001'; then compiler_num='600'
+      elif test "$compiler_num" -ge  '904'; then compiler_num='500'
+      elif test "$compiler_num" -ge  '902'; then compiler_num='400'
+      elif test "$compiler_num" -ge  '803'; then compiler_num='309'
+      elif test "$compiler_num" -ge  '703'; then compiler_num='308'
+      else                                       compiler_num='307'
+      fi
+    fi
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: clang '$compiler_num' (raw: '$fullclangver' / '$clangver')" >&5
+printf "%s\n" "clang '$compiler_num' (raw: '$fullclangver' / '$clangver')" >&6; }
     flags_dbg_yes="-g"
     flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
-    flags_opt_yes="-Os"
+    flags_opt_yes="-O2"
     flags_opt_off="-O0"
   else
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -17117,10 +17956,19 @@ rm -f conftest.err conftest.i conftest.$ac_ext
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
     compiler_id="GNU_C"
-    gccver=`$CC -dumpversion`
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking compiler version" >&5
+printf %s "checking compiler version... " >&6; }
+    # strip '-suffix' parts, e.g. Ubuntu Windows cross-gcc returns '10-win32'
+    gccver=`$CC -dumpversion | sed -E 's/-.+$//'`
     gccvhi=`echo $gccver | cut -d . -f1`
-    gccvlo=`echo $gccver | cut -d . -f2`
+    if echo $gccver | grep -F '.' >/dev/null; then
+      gccvlo=`echo $gccver | cut -d . -f2`
+    else
+      gccvlo="0"
+    fi
     compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gcc '$compiler_num' (raw: '$gccver')" >&5
+printf "%s\n" "gcc '$compiler_num' (raw: '$gccver')" >&6; }
     flags_dbg_yes="-g"
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast"
     flags_opt_yes="-O2"
@@ -17176,67 +18024,6 @@ printf "%s\n" "no" >&6; }
   fi
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is LCC" >&5
-printf %s "checking if compiler is LCC... " >&6; }
-
-    OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAG comes from CURL_CPP_P
-  CPPFLAGS="$CPPFLAGS $CPPPFLAG"
-      if test -z "$SED"; then
-    as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
-  fi
-  if test -z "$GREP"; then
-    as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
-  fi
-
-  tmp_exp=""
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __LCC__
-CURL_DEF_TOKEN __LCC__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
-
-    tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
-      "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
-      "$SED" 's/["][ ]*["]//g' 2>/dev/null`
-    if test -z "$tmp_exp" || test "$tmp_exp" = "__LCC__"; then
-      tmp_exp=""
-    fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-  if test -z "$tmp_exp"; then
-    curl_cv_have_def___LCC__=no
-
-  else
-    curl_cv_have_def___LCC__=yes
-    curl_cv_def___LCC__=$tmp_exp
-
-  fi
-      CPPFLAGS=$OLDCPPFLAGS
-
-  if test "$curl_cv_have_def___LCC__" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-    compiler_id="LCC"
-    flags_dbg_yes="-g"
-    flags_opt_all=""
-    flags_opt_yes=""
-    flags_opt_off=""
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-  fi
-
-
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is SGI MIPSpro C" >&5
 printf %s "checking if compiler is SGI MIPSpro C... " >&6; }
 
@@ -17619,120 +18406,6 @@ printf "%s\n" "yes" >&6; }
 printf "%s\n" "no" >&6; }
   fi
 
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is Watcom C" >&5
-printf %s "checking if compiler is Watcom C... " >&6; }
-
-    OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAG comes from CURL_CPP_P
-  CPPFLAGS="$CPPFLAGS $CPPPFLAG"
-      if test -z "$SED"; then
-    as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
-  fi
-  if test -z "$GREP"; then
-    as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
-  fi
-
-  tmp_exp=""
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __WATCOMC__
-CURL_DEF_TOKEN __WATCOMC__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
-
-    tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
-      "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
-      "$SED" 's/["][ ]*["]//g' 2>/dev/null`
-    if test -z "$tmp_exp" || test "$tmp_exp" = "__WATCOMC__"; then
-      tmp_exp=""
-    fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-  if test -z "$tmp_exp"; then
-    curl_cv_have_def___WATCOMC__=no
-
-  else
-    curl_cv_have_def___WATCOMC__=yes
-    curl_cv_def___WATCOMC__=$tmp_exp
-
-  fi
-      CPPFLAGS=$OLDCPPFLAGS
-
-  if test "$curl_cv_have_def___WATCOMC__" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-    OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAG comes from CURL_CPP_P
-  CPPFLAGS="$CPPFLAGS $CPPPFLAG"
-      if test -z "$SED"; then
-    as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
-  fi
-  if test -z "$GREP"; then
-    as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
-  fi
-
-  tmp_exp=""
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __UNIX__
-CURL_DEF_TOKEN __UNIX__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
-
-    tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
-      "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
-      "$SED" 's/["][ ]*["]//g' 2>/dev/null`
-    if test -z "$tmp_exp" || test "$tmp_exp" = "__UNIX__"; then
-      tmp_exp=""
-    fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-  if test -z "$tmp_exp"; then
-    curl_cv_have_def___UNIX__=no
-
-  else
-    curl_cv_have_def___UNIX__=yes
-    curl_cv_def___UNIX__=$tmp_exp
-
-  fi
-      CPPFLAGS=$OLDCPPFLAGS
-
-    if test "$curl_cv_have_def___UNIX__" = "yes"; then
-      compiler_id="WATCOM_UNIX_C"
-      flags_dbg_yes="-g2"
-      flags_opt_all="-O0 -O1 -O2 -O3"
-      flags_opt_yes="-O2"
-      flags_opt_off="-O0"
-    else
-      compiler_id="WATCOM_WINDOWS_C"
-      flags_dbg_yes=""
-      flags_opt_all=""
-      flags_opt_yes=""
-      flags_opt_off=""
-    fi
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-  fi
-
   #
   if test "$compiler_id" = "unknown"; then
   cat <<_EOF 1>&2
@@ -17779,7 +18452,6 @@ squeeze() {
       CLANG)
         #
                                 tmp_CFLAGS="$tmp_CFLAGS -Qunused-arguments"
-                        tmp_CFLAGS="$tmp_CFLAGS -Wno-pointer-bool-conversion"
         ;;
         #
       DEC_C)
@@ -17813,8 +18485,8 @@ squeeze() {
       INTEL_UNIX_C)
         #
                         tmp_CFLAGS="$tmp_CFLAGS -std=gnu89"
-                                                tmp_CPPFLAGS="$tmp_CPPFLAGS -we140,147,165,266"
-                                        tmp_CPPFLAGS="$tmp_CPPFLAGS -wd279,981,1469"
+                                                tmp_CPPFLAGS="$tmp_CPPFLAGS -diag-error 140,147,165,266"
+                                                        tmp_CPPFLAGS="$tmp_CPPFLAGS -diag-disable 279,981,1025,1469,2259"
         ;;
         #
       INTEL_WINDOWS_C)
@@ -17822,11 +18494,6 @@ squeeze() {
                 tmp_CFLAGS="$tmp_CFLAGS"
         ;;
         #
-      LCC)
-        #
-                tmp_CFLAGS="$tmp_CFLAGS -n"
-        ;;
-        #
       SGI_MIPS_C)
         #
                 tmp_CFLAGS="$tmp_CFLAGS"
@@ -17847,16 +18514,6 @@ squeeze() {
                 tmp_CFLAGS="$tmp_CFLAGS"
         ;;
         #
-      WATCOM_UNIX_C)
-        #
-                tmp_CFLAGS="$tmp_CFLAGS"
-        ;;
-        #
-      WATCOM_WINDOWS_C)
-        #
-                tmp_CFLAGS="$tmp_CFLAGS"
-        ;;
-        #
     esac
     #
     squeeze tmp_CPPFLAGS
@@ -17938,15 +18595,56 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
     test "$tmp_compiler_works" = "yes"; then
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#       ifdef __STDC__
+#         include <stdlib.h>
+#       endif
+
+int main (void)
+{
+
+        int i = 0;
+        exit(i);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  tmp_compiler_works="yes"
+
+else $as_nop
+  tmp_compiler_works="no"
+      echo " " >&6
+      echo "run-fail: test program exited with status $ac_status" >&6
+      echo " " >&6
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -17987,7 +18685,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
   fi
     if test "$tmp_compiler_works" = "yes"; then
@@ -18226,15 +18927,56 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
     test "$tmp_compiler_works" = "yes"; then
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#       ifdef __STDC__
+#         include <stdlib.h>
+#       endif
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+int main (void)
+{
+
+        int i = 0;
+        exit(i);
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  tmp_compiler_works="yes"
+
+else $as_nop
+  tmp_compiler_works="no"
+      echo " " >&6
+      echo "run-fail: test program exited with status $ac_status" >&6
+      echo " " >&6
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -18275,7 +19017,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
   fi
     if test "$tmp_compiler_works" = "yes"; then
@@ -18458,7 +19203,7 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
 
 
     ac_var_added_warnings=""
-  for warning in no-multichar sign-compare; do
+  for warning in sign-compare; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18476,6 +19221,7 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
+          tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar"
 
     ac_var_added_warnings=""
   for warning in undef; do
@@ -18602,33 +19348,10 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
 
           fi
           #
-                    if test "$compiler_num" -ge "208"; then
-
-    ac_var_added_warnings=""
-  for warning in vla; do
-
-  ac_var_match_word="no"
-  for word1 in $CFLAGS; do
-    for word2 in -Wno-$warning -W$warning; do
-      if test "$word1" = "$word2"; then
-        ac_var_match_word="yes"
-      fi
-    done
-  done
-
-    if test "$ac_var_match_word" = "no"; then
-      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
-    fi
-  done
-    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
-  squeeze tmp_CFLAGS
-
-          fi
-          #
-                    if test "$compiler_num" -ge "209"; then
+                    if test "$compiler_num" -ge "207"; then
 
     ac_var_added_warnings=""
-  for warning in shift-sign-overflow; do
+  for warning in address; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18646,16 +19369,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-          fi
-          #
-                    if test "$compiler_num" -ge "302"; then
-            case $host_os in
-            cygwin* | mingw*)
-                                          ;;
-            *)
 
     ac_var_added_warnings=""
-  for warning in missing-variable-declarations; do
+  for warning in attributes; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18673,14 +19389,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-              ;;
-            esac
-          fi
-          #
-                    if test "$compiler_num" -ge "306"; then
 
     ac_var_added_warnings=""
-  for warning in double-promotion; do
+  for warning in bad-function-cast; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18698,12 +19409,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-          fi
-          #
-                    if test "$compiler_num" -ge "309"; then
 
     ac_var_added_warnings=""
-  for warning in comma; do
+  for warning in conversion; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18721,16 +19429,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-            # avoid the varargs warning, fixed in 4.0
-            # https://bugs.llvm.org/show_bug.cgi?id=29140
-            if test "$compiler_num" -lt "400"; then
-              tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs"
-            fi
-          fi
-                    if test "$compiler_num" -ge "700"; then
 
     ac_var_added_warnings=""
-  for warning in assign-enum; do
+  for warning in div-by-zero format-security; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18750,7 +19451,7 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
 
 
     ac_var_added_warnings=""
-  for warning in extra-semi-stmt; do
+  for warning in empty-body; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18768,29 +19469,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-          fi
-        fi
-        ;;
-        #
-      DEC_C)
-        #
-        if test "$want_warnings" = "yes"; then
-                    tmp_CFLAGS="$tmp_CFLAGS -msg_enable level3"
-        fi
-        ;;
-        #
-      GNU_C)
-        #
-        if test "$want_warnings" = "yes"; then
-          #
-                              if test "x$cross_compiling" != "xyes" ||
-            test "$compiler_num" -ge "300"; then
-            tmp_CFLAGS="$tmp_CFLAGS -pedantic"
-          fi
-          #
 
     ac_var_added_warnings=""
-  for warning in all; do
+  for warning in missing-field-initializers; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18808,12 +19489,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-          tmp_CFLAGS="$tmp_CFLAGS -W"
-          #
-                    if test "$compiler_num" -ge "104"; then
 
     ac_var_added_warnings=""
-  for warning in pointer-arith write-strings; do
+  for warning in missing-noreturn; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18831,35 +19509,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-                        if test "x$cross_compiling" != "xyes" ||
-              test "$compiler_num" -ge "300"; then
 
     ac_var_added_warnings=""
-  for warning in unused shadow; do
-
-  ac_var_match_word="no"
-  for word1 in $CFLAGS; do
-    for word2 in -Wno-$warning -W$warning; do
-      if test "$word1" = "$word2"; then
-        ac_var_match_word="yes"
-      fi
-    done
-  done
-
-    if test "$ac_var_match_word" = "no"; then
-      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
-    fi
-  done
-    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
-  squeeze tmp_CFLAGS
-
-            fi
-          fi
-          #
-                    if test "$compiler_num" -ge "207"; then
-
-    ac_var_added_warnings=""
-  for warning in inline nested-externs; do
+  for warning in old-style-definition; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18877,11 +19529,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-                        if test "x$cross_compiling" != "xyes" ||
-              test "$compiler_num" -ge "300"; then
 
     ac_var_added_warnings=""
-  for warning in missing-declarations; do
+  for warning in redundant-decls; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18899,9 +19549,10 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
+          # CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [switch-enum])      # Not used because this basically disallows default case
 
     ac_var_added_warnings=""
-  for warning in missing-prototypes; do
+  for warning in type-limits; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18919,14 +19570,10 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-            fi
-          fi
-          #
-                    if test "$compiler_num" -ge "295"; then
-            tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
+          # CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-macros])    # Not practical
 
     ac_var_added_warnings=""
-  for warning in bad-function-cast; do
+  for warning in unreachable-code unused-parameter; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18946,10 +19593,10 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
 
           fi
           #
-                    if test "$compiler_num" -ge "296"; then
+                    if test "$compiler_num" -ge "208"; then
 
     ac_var_added_warnings=""
-  for warning in float-equal; do
+  for warning in ignored-qualifiers; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18967,10 +19614,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-            tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar"
 
     ac_var_added_warnings=""
-  for warning in sign-compare; do
+  for warning in vla; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -18988,9 +19634,13 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
+          fi
+          #
+                    if test "$compiler_num" -ge "209"; then
+            tmp_CFLAGS="$tmp_CFLAGS -Wno-sign-conversion"
 
     ac_var_added_warnings=""
-  for warning in undef; do
+  for warning in shift-sign-overflow; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19008,20 +19658,13 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-          fi
-          #
-                    if test "$compiler_num" -ge "297"; then
-            tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
+          # CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [padded])  # Not used because we cannot change public structs
           fi
           #
                     if test "$compiler_num" -ge "300"; then
-                                                            tmp_CFLAGS="$tmp_CFLAGS"
-          fi
-          #
-                    if test "$compiler_num" -ge "303"; then
 
     ac_var_added_warnings=""
-  for warning in endif-labels strict-prototypes; do
+  for warning in language-extension-token; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19041,10 +19684,10 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
 
           fi
           #
-                    if test "$compiler_num" -ge "304"; then
+                    if test "$compiler_num" -ge "302"; then
 
     ac_var_added_warnings=""
-  for warning in declaration-after-statement; do
+  for warning in enum-conversion; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19064,7 +19707,7 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
 
 
     ac_var_added_warnings=""
-  for warning in old-style-definition; do
+  for warning in sometimes-uninitialized; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19082,16 +19725,13 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-          fi
-          #
-                    if test "$compiler_num" -ge "400"; then
-            tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
-          fi
-          #
-                    if test "$compiler_num" -ge "402"; then
+            case $host_os in
+            cygwin* | mingw*)
+                                          ;;
+            *)
 
     ac_var_added_warnings=""
-  for warning in cast-align; do
+  for warning in missing-variable-declarations; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19109,32 +19749,14 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
+              ;;
+            esac
           fi
           #
-                    if test "$compiler_num" -ge "403"; then
-
-    ac_var_added_warnings=""
-  for warning in type-limits old-style-declaration; do
-
-  ac_var_match_word="no"
-  for word1 in $CFLAGS; do
-    for word2 in -Wno-$warning -W$warning; do
-      if test "$word1" = "$word2"; then
-        ac_var_match_word="yes"
-      fi
-    done
-  done
-
-    if test "$ac_var_match_word" = "no"; then
-      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
-    fi
-  done
-    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
-  squeeze tmp_CFLAGS
-
+                    if test "$compiler_num" -ge "304"; then
 
     ac_var_added_warnings=""
-  for warning in missing-parameter-type empty-body; do
+  for warning in header-guard; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19154,7 +19776,7 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
 
 
     ac_var_added_warnings=""
-  for warning in clobbered ignored-qualifiers; do
+  for warning in unused-const-variable; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19172,9 +19794,12 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
+          fi
+          #
+                    if test "$compiler_num" -ge "305"; then
 
     ac_var_added_warnings=""
-  for warning in conversion; do
+  for warning in pragmas; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19192,10 +19817,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-            tmp_CFLAGS="$tmp_CFLAGS -Wno-sign-conversion"
 
     ac_var_added_warnings=""
-  for warning in vla; do
+  for warning in unreachable-code-break; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19213,16 +19837,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-                        tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"
           fi
           #
-                    if test "$compiler_num" -ge "405"; then
-                        if test "$curl_cv_have_def__WIN32" = "yes"; then
-              tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
-            fi
-          fi
-          #
-                    if test "$compiler_num" -ge "406"; then
+                    if test "$compiler_num" -ge "306"; then
 
     ac_var_added_warnings=""
   for warning in double-promotion; do
@@ -19245,18 +19862,37 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
 
           fi
           #
-                    if test "$compiler_num" -ge "408"; then
-            tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
-          fi
-          #
-                    if test "$compiler_num" -ge "500"; then
-            tmp_CFLAGS="$tmp_CFLAGS -Warray-bounds=2"
+                    if test "$compiler_num" -ge "309"; then
+
+    ac_var_added_warnings=""
+  for warning in comma; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+            # avoid the varargs warning, fixed in 4.0
+            # https://bugs.llvm.org/show_bug.cgi?id=29140
+            if test "$compiler_num" -lt "400"; then
+              tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs"
+            fi
           fi
-          #
-                    if test "$compiler_num" -ge "600"; then
+                    if test "$compiler_num" -ge "700"; then
 
     ac_var_added_warnings=""
-  for warning in shift-negative-value; do
+  for warning in assign-enum; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19274,10 +19910,9 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-            tmp_CFLAGS="$tmp_CFLAGS -Wshift-overflow=2"
 
     ac_var_added_warnings=""
-  for warning in null-dereference; do
+  for warning in extra-semi-stmt; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19295,10 +19930,53 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-            tmp_CFLAGS="$tmp_CFLAGS -fdelete-null-pointer-checks"
+          fi
+        fi
+                                tmp_CFLAGS="$tmp_CFLAGS -Wno-pointer-bool-conversion"
+        ;;
+        #
+      DEC_C)
+        #
+        if test "$want_warnings" = "yes"; then
+                    tmp_CFLAGS="$tmp_CFLAGS -msg_enable level3"
+        fi
+        ;;
+        #
+      GNU_C)
+        #
+        if test "$want_warnings" = "yes"; then
+          #
+                              if test "x$cross_compiling" != "xyes" ||
+            test "$compiler_num" -ge "300"; then
+            tmp_CFLAGS="$tmp_CFLAGS -pedantic"
+          fi
+          #
 
     ac_var_added_warnings=""
-  for warning in duplicated-cond; do
+  for warning in all; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+          tmp_CFLAGS="$tmp_CFLAGS -W"
+          #
+                    if test "$compiler_num" -ge "104"; then
+
+    ac_var_added_warnings=""
+  for warning in pointer-arith write-strings; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19316,9 +19994,11 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
+                        if test "x$cross_compiling" != "xyes" ||
+              test "$compiler_num" -ge "300"; then
 
     ac_var_added_warnings=""
-  for warning in unused-const-variable; do
+  for warning in unused shadow; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19336,12 +20016,13 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
+            fi
           fi
           #
-                    if test "$compiler_num" -ge "700"; then
+                    if test "$compiler_num" -ge "207"; then
 
     ac_var_added_warnings=""
-  for warning in duplicated-branches; do
+  for warning in inline nested-externs; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19359,9 +20040,11 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
+                        if test "x$cross_compiling" != "xyes" ||
+              test "$compiler_num" -ge "300"; then
 
     ac_var_added_warnings=""
-  for warning in restrict; do
+  for warning in missing-declarations; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19381,7 +20064,7 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
 
 
     ac_var_added_warnings=""
-  for warning in alloc-zero; do
+  for warning in missing-prototypes; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19399,32 +20082,14 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-            tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2"
-            tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
-            if test "$compiler_num" -lt "1200"; then
-                            tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
             fi
           fi
           #
-        fi
-        #
-                if test "$compiler_num" -ge "300"; then
-          tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
-        else
-                              if test "x$cross_compiling" = "xyes"; then
-            if test "$compiler_num" -ge "104"; then
-                            tmp_CFLAGS="$tmp_CFLAGS -Wno-unused -Wno-shadow"
-            fi
-            if test "$compiler_num" -ge "207"; then
-                            tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-declarations"
-              tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-prototypes"
-            fi
-          fi
-        fi
-                if test "$compiler_num" -ge "1000"; then
+                    if test "$compiler_num" -ge "295"; then
+            tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
 
     ac_var_added_warnings=""
-  for warning in enum-conversion; do
+  for warning in bad-function-cast; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19442,83 +20107,12 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-        fi
-        ;;
-        #
-      HP_UX_C)
-        #
-        if test "$want_warnings" = "yes"; then
-                    tmp_CFLAGS="$tmp_CFLAGS +w1"
-        fi
-        ;;
-        #
-      IBM_C)
-        #
-                tmp_CFLAGS="$tmp_CFLAGS"
-        ;;
-        #
-      INTEL_UNIX_C)
-        #
-        if test "$want_warnings" = "yes"; then
-          if test "$compiler_num" -gt "600"; then
-                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wall -w2"
-                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcheck"
-                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcomment"
-                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wdeprecated"
-                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wmissing-prototypes"
-                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wp64"
-                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wpointer-arith"
-                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wreturn-type"
-                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wshadow"
-                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wuninitialized"
-                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wunused-function"
           fi
-        fi
-                tmp_CFLAGS="$tmp_CFLAGS -fno-omit-frame-pointer"
-                tmp_CFLAGS="$tmp_CFLAGS -fno-strict-aliasing"
-                tmp_CFLAGS="$tmp_CFLAGS -fp-model precise"
-        ;;
-        #
-      INTEL_WINDOWS_C)
-        #
-                tmp_CFLAGS="$tmp_CFLAGS"
-        ;;
-        #
-      LCC)
-        #
-        if test "$want_warnings" = "yes"; then
-                                                  tmp_CFLAGS="$tmp_CFLAGS"
-        fi
-        ;;
-        #
-      SGI_MIPS_C)
-        #
-        if test "$want_warnings" = "yes"; then
-                    tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
-        fi
-        ;;
-        #
-      SGI_MIPSPRO_C)
-        #
-        if test "$want_warnings" = "yes"; then
-                    tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
-                              tmp_CFLAGS="$tmp_CFLAGS -woff 1209"
-        fi
-        ;;
-        #
-      SUNPRO_C)
-        #
-        if test "$want_warnings" = "yes"; then
-                    tmp_CFLAGS="$tmp_CFLAGS -v"
-        fi
-        ;;
-        #
-      TINY_C)
-        #
-        if test "$want_warnings" = "yes"; then
+          #
+                    if test "$compiler_num" -ge "296"; then
 
     ac_var_added_warnings=""
-  for warning in all; do
+  for warning in float-equal; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19536,9 +20130,10 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
+            tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar"
 
     ac_var_added_warnings=""
-  for warning in write-strings; do
+  for warning in sign-compare; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19558,7 +20153,7 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
 
 
     ac_var_added_warnings=""
-  for warning in unsupported; do
+  for warning in undef; do
 
   ac_var_match_word="no"
   for word1 in $CFLAGS; do
@@ -19576,186 +20171,972 @@ printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
-        fi
-        ;;
-        #
-      WATCOM_UNIX_C)
-        #
-        if test "$want_warnings" = "yes"; then
-                    tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra"
-        fi
-        ;;
-        #
-      WATCOM_WINDOWS_C)
-        #
-                tmp_CFLAGS="$tmp_CFLAGS"
-        ;;
-        #
-    esac
-    #
-    squeeze tmp_CPPFLAGS
-    squeeze tmp_CFLAGS
-    #
-    if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts strict warning options" >&5
-printf %s "checking if compiler accepts strict warning options... " >&6; }
-      CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
-      CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
-      squeeze CPPFLAGS
-      squeeze CFLAGS
-
-    tmp_compiler_works="unknown"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+          fi
+          #
+                    if test "$compiler_num" -ge "297"; then
+            tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
+          fi
+          #
+                    if test "$compiler_num" -ge "300"; then
+                                                            tmp_CFLAGS="$tmp_CFLAGS"
+          fi
+          #
+                    if test "$compiler_num" -ge "303"; then
 
+    ac_var_added_warnings=""
+  for warning in endif-labels strict-prototypes; do
 
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
 
-int main (void)
-{
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
 
-      int i = 1;
-      return i;
+          fi
+          #
+                    if test "$compiler_num" -ge "304"; then
 
- ;
- return 0;
-}
+    ac_var_added_warnings=""
+  for warning in declaration-after-statement; do
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
 
-    tmp_compiler_works="yes"
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
 
-else $as_nop
 
-    tmp_compiler_works="no"
-    echo " " >&6
-    sed 's/^/cc-fail: /' conftest.err >&6
-    echo " " >&6
+    ac_var_added_warnings=""
+  for warning in old-style-definition; do
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-    if test "$tmp_compiler_works" = "yes"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
 
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
 
+          fi
+          #
+                    if test "$compiler_num" -ge "400"; then
+            tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
+          fi
+          #
+                    if test "$compiler_num" -ge "401"; then
 
-int main (void)
-{
+    ac_var_added_warnings=""
+  for warning in attributes; do
 
-        int i = 1;
-        return i;
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
 
- ;
- return 0;
-}
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
 
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
 
-      tmp_compiler_works="yes"
+    ac_var_added_warnings=""
+  for warning in div-by-zero format-security; do
 
-else $as_nop
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
 
-      tmp_compiler_works="no"
-      echo " " >&6
-      sed 's/^/link-fail: /' conftest.err >&6
-      echo " " >&6
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  fi
-    if test "x$cross_compiling" != "xyes" &&
-    test "$tmp_compiler_works" = "yes"; then
 
-   case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+    ac_var_added_warnings=""
+  for warning in missing-field-initializers; do
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
-then :
-  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
 
+            case $host in
+              *-*-msys*)
+                ;;
+              *)
 
-#       ifdef __STDC__
-#         include <stdlib.h>
-#       endif
+    ac_var_added_warnings=""
+  for warning in missing-noreturn; do
 
-int main (void)
-{
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
 
-        int i = 0;
-        exit(i);
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+  # Seen to clash with libtool-generated stub code
+                ;;
+            esac
 
- ;
- return 0;
-}
+    ac_var_added_warnings=""
+  for warning in unreachable-code unused-parameter; do
 
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  tmp_compiler_works="yes"
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
 
-else $as_nop
-  tmp_compiler_works="no"
-      echo " " >&6
-      echo "run-fail: test program exited with status $ac_status" >&6
-      echo " " >&6
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
 
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+          # CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [padded])           # Not used because we cannot change public structs
 
-   eval "$library_path_var=\$old" # restore
+    ac_var_added_warnings=""
+  for warning in pragmas; do
 
-  fi
-    if test "$tmp_compiler_works" = "yes"; then
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
 
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
-printf "%s\n" "$as_me: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&6;}
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
 
-  else
 
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
-printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&2;}
-                CPPFLAGS="$tmp_save_CPPFLAGS"
-        CFLAGS="$tmp_save_CFLAGS"
+    ac_var_added_warnings=""
+  for warning in redundant-decls; do
 
-  fi
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
 
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
     fi
-    #
-  fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
 
+          # CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [switch-enum])      # Not used because this basically disallows default case
+          # CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-macros])    # Not practical
+          fi
+          #
+                    if test "$compiler_num" -ge "402"; then
 
-if test "$compiler_id" = "INTEL_UNIX_C"; then
-  #
-  if test "$compiler_num" -ge "1000"; then
-        CFLAGS="$CFLAGS -shared-intel"
-  elif test "$compiler_num" -ge "900"; then
-        CFLAGS="$CFLAGS -i-dynamic"
-  fi
-  #
-fi
+    ac_var_added_warnings=""
+  for warning in cast-align; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+          fi
+          #
+                    if test "$compiler_num" -ge "403"; then
+
+    ac_var_added_warnings=""
+  for warning in address; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+
+    ac_var_added_warnings=""
+  for warning in type-limits old-style-declaration; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+
+    ac_var_added_warnings=""
+  for warning in missing-parameter-type empty-body; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+
+    ac_var_added_warnings=""
+  for warning in clobbered ignored-qualifiers; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+
+    ac_var_added_warnings=""
+  for warning in conversion; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+            tmp_CFLAGS="$tmp_CFLAGS -Wno-sign-conversion"
+
+    ac_var_added_warnings=""
+  for warning in vla; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+                        tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"
+          fi
+          #
+                    if test "$compiler_num" -ge "405"; then
+                        if test "$curl_cv_have_def__WIN32" = "yes"; then
+              tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
+            fi
+          fi
+          #
+                    if test "$compiler_num" -ge "406"; then
+
+    ac_var_added_warnings=""
+  for warning in double-promotion; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+          fi
+          #
+                    if test "$compiler_num" -ge "408"; then
+            tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
+          fi
+          #
+                    if test "$compiler_num" -ge "500"; then
+            tmp_CFLAGS="$tmp_CFLAGS -Warray-bounds=2"
+          fi
+          #
+                    if test "$compiler_num" -ge "600"; then
+
+    ac_var_added_warnings=""
+  for warning in shift-negative-value; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+            tmp_CFLAGS="$tmp_CFLAGS -Wshift-overflow=2"
+
+    ac_var_added_warnings=""
+  for warning in null-dereference; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+            tmp_CFLAGS="$tmp_CFLAGS -fdelete-null-pointer-checks"
+
+    ac_var_added_warnings=""
+  for warning in duplicated-cond; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+
+    ac_var_added_warnings=""
+  for warning in unused-const-variable; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+          fi
+          #
+                    if test "$compiler_num" -ge "700"; then
+
+    ac_var_added_warnings=""
+  for warning in duplicated-branches; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+
+    ac_var_added_warnings=""
+  for warning in restrict; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+
+    ac_var_added_warnings=""
+  for warning in alloc-zero; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+            tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2"
+            tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
+            if test "$compiler_num" -lt "1200"; then
+                            tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
+            fi
+          fi
+          #
+                    if test "$compiler_num" -ge "1000"; then
+
+    ac_var_added_warnings=""
+  for warning in arith-conversion; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+
+    ac_var_added_warnings=""
+  for warning in enum-conversion; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+          fi
+          #
+        fi
+        #
+                if test "$compiler_num" -ge "300"; then
+          tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
+        else
+                              if test "x$cross_compiling" = "xyes"; then
+            if test "$compiler_num" -ge "104"; then
+                            tmp_CFLAGS="$tmp_CFLAGS -Wno-unused -Wno-shadow"
+            fi
+            if test "$compiler_num" -ge "207"; then
+                            tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-declarations"
+              tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-prototypes"
+            fi
+          fi
+        fi
+        ;;
+        #
+      HP_UX_C)
+        #
+        if test "$want_warnings" = "yes"; then
+                    tmp_CFLAGS="$tmp_CFLAGS +w1"
+        fi
+        ;;
+        #
+      IBM_C)
+        #
+                tmp_CFLAGS="$tmp_CFLAGS"
+        ;;
+        #
+      INTEL_UNIX_C)
+        #
+        if test "$want_warnings" = "yes"; then
+          if test "$compiler_num" -gt "600"; then
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wall -w2"
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcheck"
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcomment"
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wdeprecated"
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wmissing-prototypes"
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wp64"
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wpointer-arith"
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wreturn-type"
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wshadow"
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wuninitialized"
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -Wunused-function"
+          fi
+        fi
+                tmp_CFLAGS="$tmp_CFLAGS -fno-omit-frame-pointer"
+                tmp_CFLAGS="$tmp_CFLAGS -fno-strict-aliasing"
+                tmp_CFLAGS="$tmp_CFLAGS -fp-model precise"
+        ;;
+        #
+      INTEL_WINDOWS_C)
+        #
+                tmp_CFLAGS="$tmp_CFLAGS"
+        ;;
+        #
+      SGI_MIPS_C)
+        #
+        if test "$want_warnings" = "yes"; then
+                    tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
+        fi
+        ;;
+        #
+      SGI_MIPSPRO_C)
+        #
+        if test "$want_warnings" = "yes"; then
+                    tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
+                              tmp_CFLAGS="$tmp_CFLAGS -woff 1209"
+        fi
+        ;;
+        #
+      SUNPRO_C)
+        #
+        if test "$want_warnings" = "yes"; then
+                    tmp_CFLAGS="$tmp_CFLAGS -v"
+        fi
+        ;;
+        #
+      TINY_C)
+        #
+        if test "$want_warnings" = "yes"; then
+
+    ac_var_added_warnings=""
+  for warning in all; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+
+    ac_var_added_warnings=""
+  for warning in write-strings; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+
+    ac_var_added_warnings=""
+  for warning in unsupported; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
+        fi
+        ;;
+        #
+    esac
+    #
+    squeeze tmp_CPPFLAGS
+    squeeze tmp_CFLAGS
+    #
+    if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts strict warning options" >&5
+printf %s "checking if compiler accepts strict warning options... " >&6; }
+      CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
+      CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
+      squeeze CPPFLAGS
+      squeeze CFLAGS
+
+    tmp_compiler_works="unknown"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+
+int main (void)
+{
+
+      int i = 1;
+      return i;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+    tmp_compiler_works="yes"
+
+else $as_nop
+
+    tmp_compiler_works="no"
+    echo " " >&6
+    sed 's/^/cc-fail: /' conftest.err >&6
+    echo " " >&6
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    if test "$tmp_compiler_works" = "yes"; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+
+int main (void)
+{
+
+        int i = 1;
+        return i;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+      tmp_compiler_works="yes"
+
+else $as_nop
+
+      tmp_compiler_works="no"
+      echo " " >&6
+      sed 's/^/link-fail: /' conftest.err >&6
+      echo " " >&6
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+  fi
+    if test "x$cross_compiling" != "xyes" &&
+    test "$tmp_compiler_works" = "yes"; then
+
+   case $host_os in
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#       ifdef __STDC__
+#         include <stdlib.h>
+#       endif
+
+int main (void)
+{
+
+        int i = 0;
+        exit(i);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  tmp_compiler_works="yes"
+
+else $as_nop
+  tmp_compiler_works="no"
+      echo " " >&6
+      echo "run-fail: test program exited with status $ac_status" >&6
+      echo " " >&6
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#       ifdef __STDC__
+#         include <stdlib.h>
+#       endif
+
+int main (void)
+{
+
+        int i = 0;
+        exit(i);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  tmp_compiler_works="yes"
+
+else $as_nop
+  tmp_compiler_works="no"
+      echo " " >&6
+      echo "run-fail: test program exited with status $ac_status" >&6
+      echo " " >&6
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
+
+  fi
+    if test "$tmp_compiler_works" = "yes"; then
+
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
+printf "%s\n" "$as_me: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&6;}
+
+  else
+
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
+printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&2;}
+                CPPFLAGS="$tmp_save_CPPFLAGS"
+        CFLAGS="$tmp_save_CFLAGS"
+
+  fi
+
+    fi
+    #
+  fi
+
+
+if test "$compiler_id" = "INTEL_UNIX_C"; then
+  #
+  if test "$compiler_num" -ge "1000"; then
+        CFLAGS="$CFLAGS -shared-intel"
+  elif test "$compiler_num" -ge "900"; then
+        CFLAGS="$CFLAGS -i-dynamic"
+  fi
+  #
+fi
 
 CURL_CFLAG_EXTRAS=""
 if test X"$want_werror" = Xyes; then
@@ -20101,51 +21482,6 @@ else
 fi
 
 
-# For original MinGW (ie not MinGW-w64) define the Windows minimum supported OS
-# version to Windows XP (0x501) if it hasn't already been defined by the user.
-# Without this override original MinGW defaults the version to Windows NT 4.0.
-# Note original MinGW sets _WIN32_WINNT if not defined to whatever WINVER is.
-case $host in
-  *-*-mingw32*)
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if MinGW minimum supported OS should be set to XP" >&5
-printf %s "checking if MinGW minimum supported OS should be set to XP... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#include <_mingw.h>
-
-int main (void)
-{
-
-#if defined(__MINGW64_VERSION_MAJOR) || \
-    defined(WINVER) || \
-    defined(_WIN32_WINNT)
-#error
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      CPPFLAGS="$CPPFLAGS -DWINVER=0x501"
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-    ;;
-esac
-
 
 
 
@@ -20374,185 +21710,10 @@ printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
       ;;
   esac
 
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wincrypt.h" >&5
-printf %s "checking for wincrypt.h... " >&6; }
-if test ${curl_cv_header_wincrypt_h+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <wincrypt.h>
-
-int main (void)
-{
-
-        int dummy=2*PROV_RSA_FULL;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      curl_cv_header_wincrypt_h="yes"
-
-else $as_nop
-
-      curl_cv_header_wincrypt_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_wincrypt_h" >&5
-printf "%s\n" "$curl_cv_header_wincrypt_h" >&6; }
-  case "$curl_cv_header_wincrypt_h" in
-    yes)
-
-printf "%s\n" "#define HAVE_WINCRYPT_H 1" >>confdefs.h
-
-      ;;
-  esac
-
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winldap.h" >&5
-printf %s "checking for winldap.h... " >&6; }
-if test ${curl_cv_header_winldap_h+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#endif
-#include <winldap.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__)
-        HAVE_WINLDAP_H shall not be defined.
-#else
-        LDAP *ldp = ldap_init("dummy", LDAP_PORT);
-        ULONG res = ldap_unbind(ldp);
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      curl_cv_header_winldap_h="yes"
-
-else $as_nop
-
-      curl_cv_header_winldap_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winldap_h" >&5
-printf "%s\n" "$curl_cv_header_winldap_h" >&6; }
-  case "$curl_cv_header_winldap_h" in
-    yes)
-
-printf "%s\n" "#define HAVE_WINLDAP_H 1" >>confdefs.h
-
-      ;;
-  esac
-
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winber.h" >&5
-printf %s "checking for winber.h... " >&6; }
-if test ${curl_cv_header_winber_h+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#endif
-#include <winldap.h>
-#include <winber.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__)
-        HAVE_WINBER_H shall not be defined.
-#else
-        BERVAL *bvp = NULL;
-        BerElement *bep = ber_init(bvp);
-        ber_free(bep, 1);
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      curl_cv_header_winber_h="yes"
-
-else $as_nop
-
-      curl_cv_header_winber_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winber_h" >&5
-printf "%s\n" "$curl_cv_header_winber_h" >&6; }
-  case "$curl_cv_header_winber_h" in
-    yes)
-
-printf "%s\n" "#define HAVE_WINBER_H 1" >>confdefs.h
-
-      ;;
-  esac
-
     ;;
   *)
     curl_cv_header_winsock2_h="no"
     curl_cv_header_ws2tcpip_h="no"
-    curl_cv_header_wincrypt_h="no"
-    curl_cv_header_winldap_h="no"
-    curl_cv_header_winber_h="no"
     ;;
 esac
 
@@ -20648,7 +21809,7 @@ printf "%s\n" "no" >&6; }
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build target supports WIN32 crypto API" >&5
 printf %s "checking whether build target supports WIN32 crypto API... " >&6; }
   curl_win32_crypto_api="no"
-  if test "$curl_cv_header_wincrypt_h" = "yes"; then
+  if test "$curl_cv_header_windows_h" = "yes"; then
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -20742,8 +21903,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to link macOS CoreFoundation and SystemConfiguration framework" >&5
-printf %s "checking whether to link macOS CoreFoundation and SystemConfiguration framework... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to link macOS CoreFoundation, CoreServices, and SystemConfiguration frameworks" >&5
+printf %s "checking whether to link macOS CoreFoundation, CoreServices, and SystemConfiguration frameworks... " >&6; }
 case $host_os in
   darwin*)
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -20755,10 +21916,10 @@ case $host_os in
 int main (void)
 {
 
-#if (TARGET_OS_OSX)
+#if TARGET_OS_MAC && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
       return 0;
 #else
-#error Not macOS
+#error Not macOS
 #endif
 
  ;
@@ -20780,7 +21941,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
     if test "x$build_for_macos" != xno; then
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
-      LDFLAGS="$LDFLAGS -framework CoreFoundation -framework SystemConfiguration"
+      LDFLAGS="$LDFLAGS -framework CoreFoundation -framework CoreServices -framework SystemConfiguration"
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 
+ if test "$curl_cv_native_windows" = "yes" && test -n "${RC}"; then
+  HAVE_WINDRES_TRUE=
+  HAVE_WINDRES_FALSE='#'
+else
+  HAVE_WINDRES_TRUE='#'
+  HAVE_WINDRES_FALSE=
+fi
+
+
+if test "$curl_cv_native_windows" = "yes"; then
+  if test -z "$HAVE_WINDRES_TRUE"; then :
+  else
+  as_fn_error $? "windres not found in PATH. Windows builds require windres. Cannot continue." "$LINENO" 5
+fi
+fi
 
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support http" >&5
 printf %s "checking whether to support http... " >&6; }
@@ -21274,7 +22450,6 @@ then :
           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Hyper support is experimental" >&5
 printf "%s\n" "$as_me: Hyper support is experimental" >&6;}
           curl_h1_msg="enabled (Hyper)"
-          curl_h2_msg=$curl_h1_msg
           HYPER_ENABLED=1
 
 printf "%s\n" "#define USE_HYPER 1" >>confdefs.h
@@ -21290,7 +22465,7 @@ fi
 done
 
 else $as_nop
-  for d in `echo $DIR_HYPER | sed -e 's/:/ /'`; do
+  for d in `echo $DIR_HYPER | $SED -e 's/:/ /'`; do
         if test -f "$d/libhyper.a"; then
           as_fn_error $? "hyper was found in $d but was probably built with wrong flags. See docs/HYPER.md." "$LINENO" 5
         fi
@@ -21310,9 +22485,7 @@ printf "%s\n" "#define CURL_DISABLE_RTSP 1" >>confdefs.h
 
   CURL_DISABLE_RTSP=1
 
-
 else
-
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support rtsp" >&5
 printf %s "checking whether to support rtsp... " >&6; }
   # Check whether --enable-rtsp was given.
@@ -21922,16 +23095,16 @@ printf %s "checking for gethostbyname in $winsock_LIB... " >&6; }
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
-#include <windows.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
+#include <windows.h>
 #endif
 
 int main (void)
 {
 
-          gethostbyname("www.dummysite.com");
+          gethostbyname("localhost");
 
  ;
  return 0;
@@ -21973,7 +23146,7 @@ printf %s "checking for gethostbyname for Minix 3... " >&6; }
 int main (void)
 {
 
-      gethostbyname("www.dummysite.com");
+      gethostbyname("localhost");
 
  ;
  return 0;
@@ -22011,7 +23184,7 @@ printf %s "checking for gethostbyname for eCos... " >&6; }
 int main (void)
 {
 
-      gethostbyname("www.dummysite.com");
+      gethostbyname("localhost");
 
  ;
  return 0;
@@ -22043,13 +23216,18 @@ printf %s "checking for gethostbyname for AmigaOS bsdsocket.library... " >&6; }
 /* end confdefs.h.  */
 
 
+  #define __USE_INLINE__
   #include <proto/bsdsocket.h>
+  #ifdef __amigaos4__
+  struct SocketIFace *ISocket = NULL;
+  #else
   struct Library *SocketBase = NULL;
+  #endif
 
 int main (void)
 {
 
-      gethostbyname("www.dummysite.com");
+      gethostbyname("localhost");
 
  ;
  return 0;
 
 fi
 
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnet" >&5
-printf %s "checking for gethostbyname in -lnet... " >&6; }
-if test ${ac_cv_lib_net_gethostbyname+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnet  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int main (void)
-{
-return gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_lib_net_gethostbyname=yes
-else $as_nop
-  ac_cv_lib_net_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_gethostbyname" >&5
-printf "%s\n" "$ac_cv_lib_net_gethostbyname" >&6; }
-if test "x$ac_cv_lib_net_gethostbyname" = xyes
-then :
-  HAVE_GETHOSTBYNAME="1"
-               LIBS="-lnet $LIBS"
-
-fi
-
-fi
-
-
 if test "$HAVE_GETHOSTBYNAME" != "1"; then
   as_fn_error $? "couldn't find libraries for gethostbyname()" "$LINENO" 5
 fi
@@ -22183,10 +23314,10 @@ curl_includes_winsock2="\
 #  ifndef WIN32_LEAN_AND_MEAN
 #    define WIN32_LEAN_AND_MEAN
 #  endif
-#  include <windows.h>
 #  ifdef HAVE_WINSOCK2_H
 #    include <winsock2.h>
 #  endif
+#  include <windows.h>
 #endif
 /* includes end */"
 
@@ -22304,12 +23435,22 @@ printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
 
 curl_includes_bsdsocket="\
 /* includes start */
-#ifdef HAVE_PROTO_BSDSOCKET_H
+#if defined(HAVE_PROTO_BSDSOCKET_H)
+#  define __NO_NET_API
+#  define __USE_INLINE__
 #  include <proto/bsdsocket.h>
-  struct Library *SocketBase = NULL;
+#  ifdef HAVE_SYS_IOCTL_H
+#    include <sys/ioctl.h>
+#  endif
+#  ifdef __amigaos4__
+struct SocketIFace *ISocket = NULL;
+#  else
+struct Library *SocketBase = NULL;
+#  endif
+#  define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
 #endif
 /* includes end */"
-  ac_fn_c_check_header_compile "$LINENO" "proto/bsdsocket.h" "ac_cv_header_proto_bsdsocket_h" "      $curl_includes_bsdsocket
+  ac_fn_c_check_header_compile "$LINENO" "proto/bsdsocket.h" "ac_cv_header_proto_bsdsocket_h" "$curl_includes_bsdsocket
 "
 if test "x$ac_cv_header_proto_bsdsocket_h" = xyes
 then :
@@ -22521,15 +23662,67 @@ printf "%s\n" "$curl_cv_gclk_LIBS" >&6; }
 printf %s "checking if monotonic clock_gettime works... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#include <stdlib.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <time.h>
+
+int main (void)
+{
+
+          struct timespec ts;
+          if (0 == clock_gettime(CLOCK_MONOTONIC, &ts))
+            exit(0);
+          else
+            exit(1);
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+ ;
+ return 0;
+}
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&5
+printf "%s\n" "$as_me: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&2;}
+        curl_func_clock_gettime="no"
+        LIBS="$curl_cv_save_LIBS"
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -22540,9 +23733,7 @@ else $as_nop
 /* end confdefs.h.  */
 
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -22583,7 +23774,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
     fi
     #
@@ -22599,6 +23793,66 @@ printf "%s\n" "#define HAVE_CLOCK_GETTIME_MONOTONIC 1" >>confdefs.h
   #
 
 
+
+  ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_types_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
+
+fi
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for raw monotonic clock_gettime" >&5
+printf %s "checking for raw monotonic clock_gettime... " >&6; }
+  #
+  if test "x$dontwant_rt" = "xno" ; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <time.h>
+
+int main (void)
+{
+
+        struct timespec ts;
+        (void)clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_CLOCK_GETTIME_MONOTONIC_RAW 1" >>confdefs.h
+
+
+else $as_nop
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+  fi
+
+
 CURL_NETWORK_AND_TIME_LIBS=$LIBS
 
 
@@ -22762,9 +24016,14 @@ printf "%s\n" "found" >&6; }
 
 
     if test "$PKGCONFIG" != "no" ; then
-      LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS"
-      LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`"
-      CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags-only-I zlib`"
+      ZLIB_LIBS="`$PKGCONFIG --libs-only-l zlib`"
+      if test -n "$ZLIB_LIBS"; then
+        LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`"
+      else
+        ZLIB_LIBS="`$PKGCONFIG --libs zlib`"
+      fi
+      LIBS="$ZLIB_LIBS $LIBS"
+      CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags zlib`"
       OPT_ZLIB=""
       HAVE_LIBZ="1"
     fi
@@ -22810,7 +24069,8 @@ printf "%s\n" "$ac_cv_lib_z_inflateEnd" >&6; }
 if test "x$ac_cv_lib_z_inflateEnd" = xyes
 then :
                      HAVE_LIBZ="1"
-                    LIBS="-lz $LIBS"
+                    ZLIB_LIBS="-lz"
+                    LIBS="$ZLIB_LIBS $LIBS"
 else $as_nop
                      OPT_ZLIB="/usr/local"
 fi
@@ -22868,7 +24128,8 @@ if test "x$ac_cv_lib_z_gzread" = xyes
 then :
 
                                       HAVE_LIBZ="1"
-                   LIBS="-lz $LIBS"
+                   ZLIB_LIBS="-lz"
+                   LIBS="$ZLIB_LIBS $LIBS"
 
 else $as_nop
    CPPFLAGS=$clean_CPPFLAGS
@@ -22893,6 +24154,7 @@ printf "%s\n" "$as_me: WARNING: configure found only the libz lib, not the heade
     CPPFLAGS=$clean_CPPFLAGS
     LDFLAGS=$clean_LDFLAGS
     LIBS=$clean_LIBS
+    ZLIB_LIBS=""
   elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
   then
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz header file, not the lib!" >&5
@@ -22900,18 +24162,14 @@ printf "%s\n" "$as_me: WARNING: configure found only the libz header file, not t
     CPPFLAGS=$clean_CPPFLAGS
     LDFLAGS=$clean_LDFLAGS
     LIBS=$clean_LIBS
+    ZLIB_LIBS=""
   elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
   then
 
 
-printf "%s\n" "#define HAVE_ZLIB_H 1" >>confdefs.h
-
-
 printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
 
-
-    ZLIB_LIBS="-lz"
-    LIBS="-lz $clean_LIBS"
+    LIBS="$ZLIB_LIBS $clean_LIBS"
 
         AMFIXLIB="1"
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: found both libz and libz.h header" >&5
@@ -23632,7 +24890,7 @@ else $as_nop
 int main (void)
 {
 
-        LDAP *ldp = ldap_init("dummy", LDAP_PORT);
+        LDAP *ldp = ldap_init("0.0.0.0", LDAP_PORT);
         int res = ldap_unbind(ldp);
 
  ;
@@ -23664,77 +24922,6 @@ printf "%s\n" "#define HAVE_LDAP_H 1" >>confdefs.h
   esac
 
 
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ldapssl.h" >&5
-printf %s "checking for ldapssl.h... " >&6; }
-if test ${curl_cv_header_ldapssl_h+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef NULL
-#define NULL (void *)0
-#endif
-#ifndef LDAP_DEPRECATED
-#define LDAP_DEPRECATED 1
-#endif
-#ifdef NEED_LBER_H
-#include <lber.h>
-#endif
-#ifdef HAVE_LDAP_H
-#include <ldap.h>
-#endif
-#include <ldapssl.h>
-
-int main (void)
-{
-
-        char *cert_label = NULL;
-        LDAP *ldp = ldap_ssl_init("dummy", LDAPS_PORT, cert_label);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      curl_cv_header_ldapssl_h="yes"
-
-else $as_nop
-
-      curl_cv_header_ldapssl_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ldapssl_h" >&5
-printf "%s\n" "$curl_cv_header_ldapssl_h" >&6; }
-  case "$curl_cv_header_ldapssl_h" in
-    yes)
-
-printf "%s\n" "#define HAVE_LDAPSSL_H 1" >>confdefs.h
-
-      ;;
-  esac
-
-
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ldap_ssl.h" >&5
 printf %s "checking for ldap_ssl.h... " >&6; }
 if test ${curl_cv_header_ldap_ssl_h+y}
@@ -23771,7 +24958,7 @@ else $as_nop
 int main (void)
 {
 
-        LDAP *ldp = ldapssl_init("dummy", LDAPS_PORT, 1);
+        LDAP *ldp = ldapssl_init("0.0.0.0", LDAPS_PORT, 1);
 
  ;
  return 0;
@@ -23934,7 +25121,7 @@ int main (void)
 
           BerValue *bvp = NULL;
           BerElement *bep = ber_init(bvp);
-          LDAP *ldp = ldap_init("dummy", LDAP_PORT);
+          LDAP *ldp = ldap_init("0.0.0.0", LDAP_PORT);
           int res = ldap_unbind(ldp);
           ber_free(bep, 1);
 
 printf "%s\n" "#define USE_WIN32_LDAP 1" >>confdefs.h
 
   else
-    curl_ldap_msg="enabled (OpenLDAP)"
     if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
+      curl_ldap_msg="enabled (OpenLDAP)"
 
 printf "%s\n" "#define USE_OPENLDAP 1" >>confdefs.h
 
       USE_OPENLDAP=1
 
+    else
+      curl_ldap_msg="enabled (ancient OpenLDAP)"
     fi
   fi
 fi
 printf %s "checking if argv can be written to... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  curl_cv_writable_argv=cross
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+int main(int argc, char **argv)
+{
+#ifdef _WIN32
+  /* on Windows, writing to the argv does not hide the argument in
+     process lists so it can just be skipped */
+  (void)argc;
+  (void)argv;
+  return 1;
+#else
+  (void)argc;
+  argv[0][0] = ' ';
+  return (argv[0][0] == ' ')?0:1;
+#endif
+}
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  curl_cv_writable_argv=yes
+
+else $as_nop
+  curl_cv_writable_argv=no
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   curl_cv_writable_argv=cross
 
@@ -24249,9 +25474,17 @@ else $as_nop
 
 int main(int argc, char **argv)
 {
+#ifdef _WIN32
+  /* on Windows, writing to the argv does not hide the argument in
+     process lists so it can just be skipped */
+  (void)argc;
+  (void)argv;
+  return 1;
+#else
   (void)argc;
   argv[0][0] = ' ';
   return (argv[0][0] == ' ')?0:1;
+#endif
 }
 
 _ACEOF
@@ -24267,7 +25500,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
 case $curl_cv_writable_argv in
 yes)
@@ -24328,6 +25564,8 @@ then :
 fi
 
 
+: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
+
 save_CPPFLAGS="$CPPFLAGS"
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GSS-API support is requested" >&5
 printf %s "checking if GSS-API support is requested... " >&6; }
@@ -24335,6 +25573,7 @@ if test x"$want_gss" = xyes; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
 
+  if test $GSSAPI_ROOT != "/usr"; then
 
     if test -n "$PKG_CONFIG"; then
       PKGCONFIG="$PKG_CONFIG"
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mit-krb5-gssapi options with pkg-config" >&5
 printf %s "checking for mit-krb5-gssapi options with pkg-config... " >&6; }
             itexists=`
-    if test -n ""; then
-      PKG_CONFIG_LIBDIR=""
+    if test -n "$GSSAPI_ROOT/lib/pkgconfig"; then
+      PKG_CONFIG_LIBDIR="$GSSAPI_ROOT/lib/pkgconfig"
       export PKG_CONFIG_LIBDIR
     fi
          $PKGCONFIG --exists mit-krb5-gssapi >/dev/null 2>&1 && echo 1`
 
       if test -z "$itexists"; then
                         PKGCONFIG="no"
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      else
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
-printf "%s\n" "found" >&6; }
-      fi
-    fi
-
-  if test -z "$GSSAPI_INCS"; then
-     if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
-        GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
-     elif test "$PKGCONFIG" != "no" ; then
-        GSSAPI_INCS=`$PKGCONFIG --cflags mit-krb5-gssapi`
-     elif test "$GSSAPI_ROOT" != "yes"; then
-        GSSAPI_INCS="-I$GSSAPI_ROOT/include"
-     fi
-  fi
-
-  CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
-
-  ac_fn_c_check_header_compile "$LINENO" "gss.h" "ac_cv_header_gss_h" "$ac_includes_default"
-if test "x$ac_cv_header_gss_h" = xyes
-then :
-
-
-printf "%s\n" "#define HAVE_GSSGNU 1" >>confdefs.h
-
-      gnu_gss=yes
-
-else $as_nop
-
-                   for ac_header in gssapi/gssapi.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
-if test "x$ac_cv_header_gssapi_gssapi_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_GSSAPI_GSSAPI_H 1" >>confdefs.h
-
-else $as_nop
-  not_mit=1
-fi
-
-done
-             for ac_header in gssapi/gssapi_generic.h gssapi/gssapi_krb5.h
-do :
-  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
-$ac_includes_default
-#ifdef HAVE_GSSAPI_GSSAPI_H
-#include <gssapi/gssapi.h>
-#endif
-
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"
-then :
-  cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-else $as_nop
-  not_mit=1
-fi
-
-done
-      if test "x$not_mit" = "x1"; then
-                ac_fn_c_check_header_compile "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
-if test "x$ac_cv_header_gssapi_h" = xyes
-then :
-
-
-printf "%s\n" "#define HAVE_GSSHEIMDAL 1" >>confdefs.h
-
-
-else $as_nop
-
-                            want_gss=no
-              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: disabling GSS-API support since no header files were found" >&5
-printf "%s\n" "$as_me: WARNING: disabling GSS-API support since no header files were found" >&2;}
-
-
-fi
-
-      else
-
-printf "%s\n" "#define HAVE_GSSMIT 1" >>confdefs.h
-
-                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE" >&5
-printf %s "checking if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE... " >&6; }
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#include <gssapi/gssapi.h>
-#include <gssapi/gssapi_generic.h>
-#include <gssapi/gssapi_krb5.h>
-
-int main (void)
-{
-
-            gss_import_name(
-                            (OM_uint32 *)0,
-                            (gss_buffer_t)0,
-                            GSS_C_NT_HOSTBASED_SERVICE,
-                            (gss_name_t *)0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-else $as_nop
-
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-
-printf "%s\n" "#define HAVE_OLD_GSSMIT 1" >>confdefs.h
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-      fi
-
-
-fi
-
-else
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-if test x"$want_gss" = xyes; then
-
-printf "%s\n" "#define HAVE_GSSAPI 1" >>confdefs.h
-
-  HAVE_GSSAPI=1
-  curl_gss_msg="enabled (MIT Kerberos/Heimdal)"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
+printf "%s\n" "found" >&6; }
+      fi
+    fi
 
-  if test -n "$gnu_gss"; then
-    curl_gss_msg="enabled (GNU GSS)"
-    LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
-    LIBS="-lgss $LIBS"
-  elif test -z "$GSSAPI_LIB_DIR"; then
-     case $host in
-     *-*-darwin*)
-        LIBS="-lgssapi_krb5 -lresolv $LIBS"
-        ;;
-     *)
+  else
 
     if test -n "$PKG_CONFIG"; then
       PKGCONFIG="$PKG_CONFIG"
@@ -24751,265 +25847,154 @@ printf "%s\n" "found" >&6; }
       fi
     fi
 
-        if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
-                                 gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
-           LIBS="$gss_libs $LIBS"
-        elif test "$PKGCONFIG" != "no" ; then
-           gss_libs=`$PKGCONFIG --libs mit-krb5-gssapi`
-           LIBS="$gss_libs $LIBS"
-        else
-           case $host in
-           *-hp-hpux*)
-              gss_libname="gss"
-              ;;
-           *)
-              gss_libname="gssapi"
-              ;;
-           esac
-
-           if test "$GSSAPI_ROOT" != "yes"; then
-              LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
-              LIBS="-l$gss_libname $LIBS"
-           else
-              LIBS="-l$gss_libname $LIBS"
-           fi
-        fi
-        ;;
-     esac
-  else
-     LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
-     case $host in
-     *-hp-hpux*)
-        LIBS="-lgss $LIBS"
-        ;;
-     *)
-        LIBS="-lgssapi $LIBS"
-        ;;
-     esac
   fi
-else
-  CPPFLAGS="$save_CPPFLAGS"
-fi
-
-build_libstubgss=no
-if test x"$want_gss" = "xyes"; then
-  build_libstubgss=yes
-fi
-
- if test "x$build_libstubgss" = "xyes"; then
-  BUILD_STUB_GSS_TRUE=
-  BUILD_STUB_GSS_FALSE='#'
-else
-  BUILD_STUB_GSS_TRUE='#'
-  BUILD_STUB_GSS_FALSE=
-fi
-
-
+  if test -z "$GSSAPI_INCS"; then
+     if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
+        GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
+     elif test "$PKGCONFIG" != "no" ; then
+        GSSAPI_INCS=`$PKGCONFIG --cflags mit-krb5-gssapi`
+     elif test -f "$KRB5CONFIG"; then
+        GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
+     elif test "$GSSAPI_ROOT" != "yes"; then
+        GSSAPI_INCS="-I$GSSAPI_ROOT/include"
+     fi
+  fi
 
-DEFAULT_SSL_BACKEND=no
-VALID_DEFAULT_SSL_BACKEND=
+  CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
 
-# Check whether --with-default-ssl-backend was given.
-if test ${with_default_ssl_backend+y}
+  ac_fn_c_check_header_compile "$LINENO" "gss.h" "ac_cv_header_gss_h" "$ac_includes_default"
+if test "x$ac_cv_header_gss_h" = xyes
 then :
-  withval=$with_default_ssl_backend; DEFAULT_SSL_BACKEND=$withval
-fi
-
-case "$DEFAULT_SSL_BACKEND" in
-  no)
-        ;;
-  default|yes)
-        as_fn_error $? "The name of the default SSL backend is required." "$LINENO" 5
-    ;;
-  *)
-
-        VALID_DEFAULT_SSL_BACKEND=no
-    ;;
-esac
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native SSL/TLS" >&5
-printf %s "checking whether to enable Windows native SSL/TLS... " >&6; }
-if test "x$OPT_SCHANNEL" != xno; then
-  ssl_msg=
-  if test "x$OPT_SCHANNEL" != "xno"  &&
-     test "x$curl_cv_native_windows" = "xyes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
 
-printf "%s\n" "#define USE_SCHANNEL 1" >>confdefs.h
 
-    USE_SCHANNEL=1
+printf "%s\n" "#define HAVE_GSSGNU 1" >>confdefs.h
 
-    ssl_msg="Schannel"
-    test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-    SCHANNEL_ENABLED=1
-    # --with-schannel implies --enable-sspi
+      gnu_gss=yes
 
-printf "%s\n" "#define USE_WINDOWS_SSPI 1" >>confdefs.h
+else $as_nop
 
-    USE_WINDOWS_SSPI=1
+                   for ac_header in gssapi/gssapi.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
+if test "x$ac_cv_header_gssapi_gssapi_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_GSSAPI_GSSAPI_H 1" >>confdefs.h
 
-    curl_sspi_msg="enabled"
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-  fi
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-else
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else $as_nop
+  not_mit=1
 fi
 
+done
+             for ac_header in gssapi/gssapi_generic.h gssapi/gssapi_krb5.h
+do :
+  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+$ac_includes_default
+#ifdef HAVE_GSSAPI_GSSAPI_H
+#include <gssapi/gssapi.h>
+#endif
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Secure Transport" >&5
-printf %s "checking whether to enable Secure Transport... " >&6; }
-if test "x$OPT_SECURETRANSPORT" != xno; then
-  if test "x$OPT_SECURETRANSPORT" != "xno" &&
-     (test "x$cross_compiling" != "xno" || test -d "/System/Library/Frameworks/Security.framework"); then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-printf "%s\n" "#define USE_SECTRANSP 1" >>confdefs.h
-
-    USE_SECTRANSP=1
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
+  cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-    ssl_msg="Secure Transport"
-    test secure-transport != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-    SECURETRANSPORT_ENABLED=1
-    LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-  fi
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-else
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else $as_nop
+  not_mit=1
 fi
 
+done
+      if test "x$not_mit" = "x1"; then
+                ac_fn_c_check_header_compile "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
+if test "x$ac_cv_header_gssapi_h" = xyes
+then :
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Amiga native SSL/TLS (AmiSSL)" >&5
-printf %s "checking whether to enable Amiga native SSL/TLS (AmiSSL)... " >&6; }
-if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
-  if test "x$OPT_AMISSL" != xno; then
-    ssl_msg=
-    if test "x$OPT_AMISSL" != "xno"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      ssl_msg="AmiSSL"
-      test amissl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-      AMISSL_ENABLED=1
-      LIBS="-lamisslauto $LIBS"
-
-printf "%s\n" "#define USE_AMISSL 1" >>confdefs.h
+printf "%s\n" "#define HAVE_GSSHEIMDAL 1" >>confdefs.h
 
 
-printf "%s\n" "#define USE_OPENSSL 1" >>confdefs.h
+else $as_nop
 
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    fi
-    test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-  fi
-else
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
+                            want_gss=no
+              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: disabling GSS-API support since no header files were found" >&5
+printf "%s\n" "$as_me: WARNING: disabling GSS-API support since no header files were found" >&2;}
 
 
+fi
 
-if test "x$OPT_OPENSSL" != xno; then
-  ssl_msg=
+      else
 
-    CLEANLDFLAGS="$LDFLAGS"
-  CLEANCPPFLAGS="$CPPFLAGS"
-  CLEANLIBS="$LIBS"
+printf "%s\n" "#define HAVE_GSSMIT 1" >>confdefs.h
 
-    case $host in
-    *-*-msys* | *-*-mingw*)
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gdi32" >&5
-printf %s "checking for gdi32... " >&6; }
-      my_ac_save_LIBS=$LIBS
-      LIBS="-lgdi32 $LIBS"
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE" >&5
+printf %s "checking if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE... " >&6; }
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-        #include <windef.h>
-        #include <wingdi.h>
+
+#include <gssapi/gssapi.h>
+#include <gssapi/gssapi_generic.h>
+#include <gssapi/gssapi_krb5.h>
 
 int main (void)
 {
 
-          GdiFlush();
+            gss_import_name(
+                            (OM_uint32 *)0,
+                            (gss_buffer_t)0,
+                            GSS_C_NT_HOSTBASED_SERVICE,
+                            (gss_name_t *)0);
 
  ;
  return 0;
 }
+
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
+
 else $as_nop
-           LIBS=$my_ac_save_LIBS
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-      ;;
-  esac
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
-  case "$OPT_OPENSSL" in
-  yes)
-        PKGTEST="yes"
-    PREFIX_OPENSSL=
-    ;;
-  *)
-        PKGTEST="no"
-    PREFIX_OPENSSL=$OPT_OPENSSL
+printf "%s\n" "#define HAVE_OLD_GSSMIT 1" >>confdefs.h
 
-                OPENSSL_PCDIR="$OPT_OPENSSL/lib/pkgconfig"
-    if test -f "$OPENSSL_PCDIR/openssl.pc"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
-printf "%s\n" "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
-      PKGTEST="yes"
-    fi
 
-    if test "$PKGTEST" != "yes"; then
-      # try lib64 instead
-      OPENSSL_PCDIR="$OPT_OPENSSL/lib64/pkgconfig"
-      if test -f "$OPENSSL_PCDIR/openssl.pc"; then
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
-printf "%s\n" "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
-        PKGTEST="yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
       fi
-    fi
 
-    if test "$PKGTEST" != "yes"; then
-      if test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
-        as_fn_error $? "$PREFIX_OPENSSL is a bad --with-openssl prefix!" "$LINENO" 5
-      fi
-    fi
 
-            LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
-    if test "$PREFIX_OPENSSL" != "/usr" ; then
-      SSL_LDFLAGS="-L$LIB_OPENSSL"
-      SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
-    fi
-    SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
-    ;;
-  esac
+fi
 
-  if test "$PKGTEST" = "yes"; then
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+if test x"$want_gss" = xyes; then
+
+printf "%s\n" "#define HAVE_GSSAPI 1" >>confdefs.h
+
+  HAVE_GSSAPI=1
+  curl_gss_msg="enabled (MIT Kerberos/Heimdal)"
 
+  if test -n "$gnu_gss"; then
+    curl_gss_msg="enabled (GNU GSS)"
+    LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
+    LIBS="-lgss $LIBS"
+  elif test -z "$GSSAPI_LIB_DIR"; then
+     case $host in
+     *-*-darwin*)
+        LIBS="-lgssapi_krb5 -lresolv $LIBS"
+        ;;
+     *)
+        if test $GSSAPI_ROOT != "/usr"; then
 
     if test -n "$PKG_CONFIG"; then
       PKGCONFIG="$PKG_CONFIG"
     fi
 
     if test "x$PKGCONFIG" != "xno"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl options with pkg-config" >&5
-printf %s "checking for openssl options with pkg-config... " >&6; }
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mit-krb5-gssapi options with pkg-config" >&5
+printf %s "checking for mit-krb5-gssapi options with pkg-config... " >&6; }
             itexists=`
-    if test -n "$OPENSSL_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
+    if test -n "$GSSAPI_ROOT/lib/pkgconfig"; then
+      PKG_CONFIG_LIBDIR="$GSSAPI_ROOT/lib/pkgconfig"
       export PKG_CONFIG_LIBDIR
     fi
-         $PKGCONFIG --exists openssl >/dev/null 2>&1 && echo 1`
+         $PKGCONFIG --exists mit-krb5-gssapi >/dev/null 2>&1 && echo 1`
 
       if test -z "$itexists"; then
                         PKGCONFIG="no"
@@ -25144,429 +26129,357 @@ printf "%s\n" "no" >&6; }
         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
 printf "%s\n" "found" >&6; }
       fi
-    fi
-
-
-    if test "$PKGCONFIG" != "no" ; then
-      SSL_LIBS=`
-    if test -n "$OPENSSL_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
-         $PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null`
-
-      SSL_LDFLAGS=`
-    if test -n "$OPENSSL_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
-         $PKGCONFIG --libs-only-L openssl 2>/dev/null`
-
-      SSL_CPPFLAGS=`
-    if test -n "$OPENSSL_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
-         $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
-
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_LIBS: \"$SSL_LIBS\"" >&5
-printf "%s\n" "$as_me: pkg-config: SSL_LIBS: \"$SSL_LIBS\"" >&6;}
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_LDFLAGS: \"$SSL_LDFLAGS\"" >&5
-printf "%s\n" "$as_me: pkg-config: SSL_LDFLAGS: \"$SSL_LDFLAGS\"" >&6;}
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&5
-printf "%s\n" "$as_me: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&6;}
-
-      LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/^-L//'`
-
-                                          LIBS="$SSL_LIBS $LIBS"
-    fi
-  fi
-
-    CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
-  LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
-printf %s "checking for HMAC_Update in -lcrypto... " >&6; }
-if test ${ac_cv_lib_crypto_HMAC_Update+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char HMAC_Update ();
-int main (void)
-{
-return HMAC_Update ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_lib_crypto_HMAC_Update=yes
-else $as_nop
-  ac_cv_lib_crypto_HMAC_Update=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_HMAC_Update" >&5
-printf "%s\n" "$ac_cv_lib_crypto_HMAC_Update" >&6; }
-if test "x$ac_cv_lib_crypto_HMAC_Update" = xyes
-then :
-
-     HAVECRYPTO="yes"
-     LIBS="-lcrypto $LIBS"
-
-else $as_nop
-
-     if test -n "$LIB_OPENSSL" ; then
-       LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
-     fi
-     if test "$PKGCONFIG" = "no" -a -n "$PREFIX_OPENSSL" ; then
-       # only set this if pkg-config wasn't used
-       CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
-     fi
-     # Linking previously failed, try extra paths from --with-openssl or
-     # pkg-config.  Use a different function name to avoid reusing the earlier
-     # cached result.
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HMAC_Init_ex in -lcrypto" >&5
-printf %s "checking for HMAC_Init_ex in -lcrypto... " >&6; }
-if test ${ac_cv_lib_crypto_HMAC_Init_ex+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char HMAC_Init_ex ();
-int main (void)
-{
-return HMAC_Init_ex ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_lib_crypto_HMAC_Init_ex=yes
-else $as_nop
-  ac_cv_lib_crypto_HMAC_Init_ex=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_HMAC_Init_ex" >&5
-printf "%s\n" "$ac_cv_lib_crypto_HMAC_Init_ex" >&6; }
-if test "x$ac_cv_lib_crypto_HMAC_Init_ex" = xyes
-then :
-
-       HAVECRYPTO="yes"
-       LIBS="-lcrypto $LIBS"
-else $as_nop
-
-
-              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl" >&5
-printf %s "checking OpenSSL linking with -ldl... " >&6; }
-       LIBS="-lcrypto $CLEANLIBS -ldl"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-         #include <openssl/err.h>
-
-int main (void)
-{
-
-         ERR_clear_error();
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-
-         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-         HAVECRYPTO="yes"
-
-else $as_nop
-
-         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-
-         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl and -lpthread" >&5
-printf %s "checking OpenSSL linking with -ldl and -lpthread... " >&6; }
-         LIBS="-lcrypto $CLEANLIBS -ldl -lpthread"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-           #include <openssl/err.h>
-
-int main (void)
-{
-
-           ERR_clear_error();
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
+    fi
 
-           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-           HAVECRYPTO="yes"
+        else
 
+    if test -n "$PKG_CONFIG"; then
+      PKGCONFIG="$PKG_CONFIG"
+    else
+      if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKGCONFIG+y}
+then :
+  printf %s "(cached) " >&6
 else $as_nop
+  case $PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  ;;
+esac
+fi
+PKGCONFIG=$ac_cv_path_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+printf "%s\n" "$PKGCONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
-           LDFLAGS="$CLEANLDFLAGS"
-           CPPFLAGS="$CLEANCPPFLAGS"
-           LIBS="$CLEANLIBS"
-
-
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
 
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $ac_pt_PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+  ;;
+esac
+fi
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
 fi
 
+    fi
 
-fi
+    if test "x$PKGCONFIG" != "xno"; then
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mit-krb5-gssapi options with pkg-config" >&5
+printf %s "checking for mit-krb5-gssapi options with pkg-config... " >&6; }
+            itexists=`
+    if test -n ""; then
+      PKG_CONFIG_LIBDIR=""
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --exists mit-krb5-gssapi >/dev/null 2>&1 && echo 1`
 
+      if test -z "$itexists"; then
+                        PKGCONFIG="no"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
+printf "%s\n" "found" >&6; }
+      fi
+    fi
 
-  if test X"$HAVECRYPTO" = X"yes"; then
+        fi
+        if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
+                                 gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
+           LIBS="$gss_libs $LIBS"
+        elif test "$PKGCONFIG" != "no" ; then
+           gss_libs=`$PKGCONFIG --libs mit-krb5-gssapi`
+           LIBS="$gss_libs $LIBS"
+        elif test -f "$KRB5CONFIG"; then
+                                 gss_libs=`$KRB5CONFIG --libs gssapi`
+           LIBS="$gss_libs $LIBS"
+        else
+           case $host in
+           *-hp-hpux*)
+              gss_libname="gss"
+              ;;
+           *)
+              gss_libname="gssapi"
+              ;;
+           esac
 
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5
-printf %s "checking for SSL_connect in -lssl... " >&6; }
-if test ${ac_cv_lib_ssl_SSL_connect+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lssl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+           if test "$GSSAPI_ROOT" != "yes"; then
+              LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
+              LIBS="-l$gss_libname $LIBS"
+           else
+              LIBS="-l$gss_libname $LIBS"
+           fi
+        fi
+        ;;
+     esac
+  else
+     LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
+     case $host in
+     *-hp-hpux*)
+        LIBS="-lgss $LIBS"
+        ;;
+     *)
+        LIBS="-lgssapi $LIBS"
+        ;;
+     esac
+  fi
+else
+  CPPFLAGS="$save_CPPFLAGS"
+fi
+
+if test x"$want_gss" = xyes; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can link against GSS-API library" >&5
+printf %s "checking if we can link against GSS-API library... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
+#define gss_init_sec_context innocuous_gss_init_sec_context
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef gss_init_sec_context
 #ifdef __cplusplus
 extern "C"
 #endif
-char SSL_connect ();
+char gss_init_sec_context ();
+#if defined __stub_gss_init_sec_context || defined __stub___gss_init_sec_context
+choke me
+#endif
+
 int main (void)
 {
-return SSL_connect ();
+return gss_init_sec_context ();
  ;
  return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  ac_cv_lib_ssl_SSL_connect=yes
-else $as_nop
-  ac_cv_lib_ssl_SSL_connect=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5
-printf "%s\n" "$ac_cv_lib_ssl_SSL_connect" >&6; }
-if test "x$ac_cv_lib_ssl_SSL_connect" = xyes
-then :
-  printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h
-
-  LIBS="-lssl $LIBS"
-
-fi
 
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
-    if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
-                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssl with RSAglue/rsaref libs in use" >&5
-printf %s "checking for ssl with RSAglue/rsaref libs in use... " >&6; };
-        OLIBS=$LIBS
-        LIBS="-lRSAglue -lrsaref $LIBS"
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5
-printf %s "checking for SSL_connect in -lssl... " >&6; }
-if test ${ac_cv_lib_ssl_SSL_connect+y}
-then :
-  printf %s "(cached) " >&6
 else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lssl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+    as_fn_error $? "--with-gssapi was specified, but a GSS-API library was not found." "$LINENO" 5
 
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_connect ();
-int main (void)
-{
-return SSL_connect ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_lib_ssl_SSL_connect=yes
-else $as_nop
-  ac_cv_lib_ssl_SSL_connect=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5
-printf "%s\n" "$ac_cv_lib_ssl_SSL_connect" >&6; }
-if test "x$ac_cv_lib_ssl_SSL_connect" = xyes
-then :
-  printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h
-
-  LIBS="-lssl $LIBS"
 
+build_libstubgss=no
+if test x"$want_gss" = "xyes"; then
+  build_libstubgss=yes
 fi
 
-        if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
-                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-            LIBS=$OLIBS
-        else
-            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-        fi
+ if test "x$build_libstubgss" = "xyes"; then
+  BUILD_STUB_GSS_TRUE=
+  BUILD_STUB_GSS_FALSE='#'
+else
+  BUILD_STUB_GSS_TRUE='#'
+  BUILD_STUB_GSS_FALSE=
+fi
 
-    else
 
-                   for ac_header in openssl/x509.h openssl/rsa.h openssl/crypto.h openssl/pem.h openssl/ssl.h openssl/err.h
-do :
-  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"
-then :
-  cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ssl_msg="OpenSSL"
-       test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-        OPENSSL_ENABLED=1
 
-printf "%s\n" "#define USE_OPENSSL 1" >>confdefs.h
+DEFAULT_SSL_BACKEND=no
+VALID_DEFAULT_SSL_BACKEND=
 
+# Check whether --with-default-ssl-backend was given.
+if test ${with_default_ssl_backend+y}
+then :
+  withval=$with_default_ssl_backend; DEFAULT_SSL_BACKEND=$withval
 fi
 
-done
+case "$DEFAULT_SSL_BACKEND" in
+  no)
+        ;;
+  default|yes)
+        as_fn_error $? "The name of the default SSL backend is required." "$LINENO" 5
+    ;;
+  *)
 
-      if test $ac_cv_header_openssl_x509_h = no; then
-                                ac_fn_c_check_header_compile "$LINENO" "x509.h" "ac_cv_header_x509_h" "$ac_includes_default"
-if test "x$ac_cv_header_x509_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_X509_H 1" >>confdefs.h
+        VALID_DEFAULT_SSL_BACKEND=no
+    ;;
+esac
 
-fi
-ac_fn_c_check_header_compile "$LINENO" "rsa.h" "ac_cv_header_rsa_h" "$ac_includes_default"
-if test "x$ac_cv_header_rsa_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_RSA_H 1" >>confdefs.h
 
-fi
-ac_fn_c_check_header_compile "$LINENO" "crypto.h" "ac_cv_header_crypto_h" "$ac_includes_default"
-if test "x$ac_cv_header_crypto_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_CRYPTO_H 1" >>confdefs.h
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native SSL/TLS" >&5
+printf %s "checking whether to enable Windows native SSL/TLS... " >&6; }
+if test "x$OPT_SCHANNEL" != xno; then
+  ssl_msg=
+  if test "x$OPT_SCHANNEL" != "xno"  &&
+     test "x$curl_cv_native_windows" = "xyes"; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
-fi
-ac_fn_c_check_header_compile "$LINENO" "pem.h" "ac_cv_header_pem_h" "$ac_includes_default"
-if test "x$ac_cv_header_pem_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_PEM_H 1" >>confdefs.h
+printf "%s\n" "#define USE_SCHANNEL 1" >>confdefs.h
 
-fi
-ac_fn_c_check_header_compile "$LINENO" "ssl.h" "ac_cv_header_ssl_h" "$ac_includes_default"
-if test "x$ac_cv_header_ssl_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SSL_H 1" >>confdefs.h
+    USE_SCHANNEL=1
 
-fi
-ac_fn_c_check_header_compile "$LINENO" "err.h" "ac_cv_header_err_h" "$ac_includes_default"
-if test "x$ac_cv_header_err_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_ERR_H 1" >>confdefs.h
+    ssl_msg="Schannel"
+    test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+    SCHANNEL_ENABLED=1
+    # --with-schannel implies --enable-sspi
 
-fi
+printf "%s\n" "#define USE_WINDOWS_SSPI 1" >>confdefs.h
 
+    USE_WINDOWS_SSPI=1
 
-        if test $ac_cv_header_x509_h = yes &&
-           test $ac_cv_header_crypto_h = yes &&
-           test $ac_cv_header_ssl_h = yes; then
-                    ssl_msg="OpenSSL"
-          OPENSSL_ENABLED=1
-        fi
-      fi
-    fi
+    curl_sspi_msg="enabled"
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+  fi
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
-    if test X"$OPENSSL_ENABLED" != X"1"; then
-       LIBS="$CLEANLIBS"
-    fi
 
-    if test X"$OPT_OPENSSL" != Xoff &&
-       test "$OPENSSL_ENABLED" != "1"; then
-      as_fn_error $? "OpenSSL libs and/or directories were not found where specified!" "$LINENO" 5
-    fi
-  fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Secure Transport" >&5
+printf %s "checking whether to enable Secure Transport... " >&6; }
+if test "x$OPT_SECURETRANSPORT" != xno; then
+  if test "x$OPT_SECURETRANSPORT" != "xno" &&
+     (test "x$cross_compiling" != "xno" || test -d "/System/Library/Frameworks/Security.framework"); then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
-  if test X"$OPENSSL_ENABLED" = X"1"; then
+printf "%s\n" "#define USE_SECTRANSP 1" >>confdefs.h
 
-    ac_fn_c_check_func "$LINENO" "RAND_egd" "ac_cv_func_RAND_egd"
-if test "x$ac_cv_func_RAND_egd" = xyes
-then :
-  printf "%s\n" "#define HAVE_RAND_EGD 1" >>confdefs.h
+    USE_SECTRANSP=1
 
+    ssl_msg="Secure Transport"
+    test secure-transport != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+    SECURETRANSPORT_ENABLED=1
+    LDFLAGS="$LDFLAGS -framework CoreFoundation -framework CoreServices -framework Security"
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+  fi
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BoringSSL" >&5
-printf %s "checking for BoringSSL... " >&6; }
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Amiga native SSL/TLS (AmiSSL v5)" >&5
+printf %s "checking whether to enable Amiga native SSL/TLS (AmiSSL v5)... " >&6; }
+if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
+  if test "x$OPT_AMISSL" != xno; then
+    ssl_msg=
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-                #include <openssl/base.h>
+        #include <libraries/amisslmaster.h>
+        #include <openssl/opensslv.h>
 
 int main (void)
 {
 
-                #ifndef OPENSSL_IS_BORINGSSL
-                #error not boringssl
-                #endif
+        #if defined(AMISSL_CURRENT_VERSION) && defined(AMISSL_V3xx) && \
+            (OPENSSL_VERSION_NUMBER >= 0x30000000L) && \
+            defined(PROTO_AMISSL_H)
+        return 0;
+        #else
+        #error not AmiSSL v5 / OpenSSL 3
+        #endif
 
  ;
  return 0;
@@ -25576,48 +26489,62 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
 
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
+      ssl_msg="AmiSSL"
+      test amissl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+      AMISSL_ENABLED=1
+      OPENSSL_ENABLED=1
+      # Use AmiSSL's built-in ca bundle
+      check_for_ca_bundle=1
+      with_ca_fallback=yes
+      LIBS="-lamisslstubs -lamisslauto $LIBS"
 
-printf "%s\n" "#define HAVE_BORINGSSL 1" >>confdefs.h
-
-        ssl_msg="BoringSSL"
-
-else $as_nop
+printf "%s\n" "#define USE_AMISSL 1" >>confdefs.h
 
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+printf "%s\n" "#define USE_OPENSSL 1" >>confdefs.h
 
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libressl" >&5
-printf %s "checking for libressl... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
+printf "%s\n" "#define HAVE_OPENSSL3 1" >>confdefs.h
 
-#include <openssl/opensslv.h>
+      ac_fn_c_check_header_compile "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_x509_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_OPENSSL_X509_H 1" >>confdefs.h
 
-int main (void)
-{
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/rsa.h" "ac_cv_header_openssl_rsa_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_rsa_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_OPENSSL_RSA_H 1" >>confdefs.h
 
-        int dummy = LIBRESSL_VERSION_NUMBER;
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_crypto_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_OPENSSL_CRYPTO_H 1" >>confdefs.h
 
- ;
- return 0;
-}
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/pem.h" "ac_cv_header_openssl_pem_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_pem_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_OPENSSL_PEM_H 1" >>confdefs.h
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes
 then :
+  printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
 
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_err_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_OPENSSL_ERR_H 1" >>confdefs.h
 
-printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
+fi
 
-      ssl_msg="libressl"
 
 else $as_nop
 
@@ -25626,830 +26553,794 @@ printf "%s\n" "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+  fi
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL >= v3" >&5
-printf %s "checking for OpenSSL >= v3... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
 
-#include <openssl/opensslv.h>
+if test "x$OPT_OPENSSL" != xno; then
+  ssl_msg=
+
+    CLEANLDFLAGS="$LDFLAGS"
+  CLEANCPPFLAGS="$CPPFLAGS"
+  CLEANLIBS="$LIBS"
+
+    case $host in
+    *-*-msys* | *-*-mingw*)
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gdi32" >&5
+printf %s "checking for gdi32... " >&6; }
+      my_ac_save_LIBS=$LIBS
+      LIBS="-lgdi32 $LIBS"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+        #include <windef.h>
+        #include <wingdi.h>
 
 int main (void)
 {
 
-        #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
-        return 0;
-        #else
-        #error older than 3
-        #endif
+          GdiFlush();
 
  ;
  return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
-
-printf "%s\n" "#define HAVE_OPENSSL3 1" >>confdefs.h
-
-                              CPPFLAGS="$CPPFLAGS -DOPENSSL_SUPPRESS_DEPRECATED"
-      ssl_msg="OpenSSL v3+"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+else $as_nop
+           LIBS=$my_ac_save_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  fi
-
-  if test "$OPENSSL_ENABLED" = "1"; then
-    if test -n "$LIB_OPENSSL"; then
-                            if test "x$cross_compiling" != "xyes"; then
-         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
-         export CURL_LIBRARY_PATH
-         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $LIB_OPENSSL to CURL_LIBRARY_PATH" >&5
-printf "%s\n" "$as_me: Added $LIB_OPENSSL to CURL_LIBRARY_PATH" >&6;}
-       fi
-    fi
-
-  #
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+      ;;
+  esac
 
-  #
-  tst_api="unknown"
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL headers version" >&5
-printf %s "checking for OpenSSL headers version... " >&6; }
+  case "$OPT_OPENSSL" in
+  yes)
+        PKGTEST="yes"
+    PREFIX_OPENSSL=
+    ;;
+  *)
+        PKGTEST="no"
+    PREFIX_OPENSSL=$OPT_OPENSSL
 
-    OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAG comes from CURL_CPP_P
-  CPPFLAGS="$CPPFLAGS $CPPPFLAG"
-      if test -z "$SED"; then
-    as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
-  fi
-  if test -z "$GREP"; then
-    as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
-  fi
+                OPENSSL_PCDIR="$OPT_OPENSSL/lib/pkgconfig"
+    if test -f "$OPENSSL_PCDIR/openssl.pc"; then
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
+printf "%s\n" "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
+      PKGTEST="yes"
+    fi
 
-  tmp_exp=""
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+    if test "$PKGTEST" != "yes"; then
+      # try lib64 instead
+      OPENSSL_PCDIR="$OPT_OPENSSL/lib64/pkgconfig"
+      if test -f "$OPENSSL_PCDIR/openssl.pc"; then
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
+printf "%s\n" "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
+        PKGTEST="yes"
+      fi
+    fi
 
+    if test "$PKGTEST" != "yes"; then
+      if test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
+        as_fn_error $? "$PREFIX_OPENSSL is a bad --with-openssl prefix!" "$LINENO" 5
+      fi
+    fi
 
-#   ifdef USE_OPENSSL
-#     include <openssl/crypto.h>
-#   else
-#     include <crypto.h>
-#   endif
+            LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
+    if test "$PREFIX_OPENSSL" != "/usr" ; then
+      SSL_LDFLAGS="-L$LIB_OPENSSL"
+      SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
+    fi
+    ;;
+  esac
 
-#ifdef OPENSSL_VERSION_NUMBER
-CURL_DEF_TOKEN OPENSSL_VERSION_NUMBER
-#endif
+  if test "$PKGTEST" = "yes"; then
 
 
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
+    if test -n "$PKG_CONFIG"; then
+      PKGCONFIG="$PKG_CONFIG"
+    else
+      if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKGCONFIG+y}
 then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-    tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
-      "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
-      "$SED" 's/["][ ]*["]//g' 2>/dev/null`
-    if test -z "$tmp_exp" || test "$tmp_exp" = "OPENSSL_VERSION_NUMBER"; then
-      tmp_exp=""
-    fi
-
+  ;;
+esac
+fi
+PKGCONFIG=$ac_cv_path_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+printf "%s\n" "$PKGCONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-  if test -z "$tmp_exp"; then
-    curl_cv_have_def_OPENSSL_VERSION_NUMBER=no
 
-  else
-    curl_cv_have_def_OPENSSL_VERSION_NUMBER=yes
-    curl_cv_def_OPENSSL_VERSION_NUMBER=$tmp_exp
 
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $ac_pt_PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-      CPPFLAGS=$OLDCPPFLAGS
+done
+  done
+IFS=$as_save_IFS
 
+  ;;
+esac
+fi
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
-    OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAG comes from CURL_CPP_P
-  CPPFLAGS="$CPPFLAGS $CPPPFLAG"
-      if test -z "$SED"; then
-    as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
-  fi
-  if test -z "$GREP"; then
-    as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
   fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
 
-  tmp_exp=""
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+    fi
 
+    if test "x$PKGCONFIG" != "xno"; then
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl options with pkg-config" >&5
+printf %s "checking for openssl options with pkg-config... " >&6; }
+            itexists=`
+    if test -n "$OPENSSL_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --exists openssl >/dev/null 2>&1 && echo 1`
 
-#     include <openssl/crypto.h>
+      if test -z "$itexists"; then
+                        PKGCONFIG="no"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
+printf "%s\n" "found" >&6; }
+      fi
+    fi
 
-#ifdef OPENSSL_VERSION_STR
-CURL_DEF_TOKEN OPENSSL_VERSION_STR
-#endif
 
+    if test "$PKGCONFIG" != "no" ; then
+      SSL_LIBS=`
+    if test -n "$OPENSSL_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null`
 
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
+      SSL_LDFLAGS=`
+    if test -n "$OPENSSL_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --libs-only-L openssl 2>/dev/null`
 
-    tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
-      "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
-      "$SED" 's/["][ ]*["]//g' 2>/dev/null`
-    if test -z "$tmp_exp" || test "$tmp_exp" = "OPENSSL_VERSION_STR"; then
-      tmp_exp=""
+      SSL_CPPFLAGS=`
+    if test -n "$OPENSSL_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
+      export PKG_CONFIG_LIBDIR
     fi
+         $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
 
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-  if test -z "$tmp_exp"; then
-    curl_cv_have_def_OPENSSL_VERSION_STR=no
 
-  else
-    curl_cv_have_def_OPENSSL_VERSION_STR=yes
-    curl_cv_def_OPENSSL_VERSION_STR=$tmp_exp
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_LIBS: \"$SSL_LIBS\"" >&5
+printf "%s\n" "$as_me: pkg-config: SSL_LIBS: \"$SSL_LIBS\"" >&6;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_LDFLAGS: \"$SSL_LDFLAGS\"" >&5
+printf "%s\n" "$as_me: pkg-config: SSL_LDFLAGS: \"$SSL_LDFLAGS\"" >&6;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&5
+printf "%s\n" "$as_me: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&6;}
 
-  fi
-      CPPFLAGS=$OLDCPPFLAGS
+      LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/^-L//'`
 
-  if test "$curl_cv_have_def_OPENSSL_VERSION_NUMBER" = "yes"; then
-    tst_verlen=`expr "$curl_cv_def_OPENSSL_VERSION_NUMBER" : '.*'`
-    case "x$tst_verlen" in
-      x6)
-        tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3`
-        tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 4`
-        tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
-        tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
-        ;;
-      x11|x10)
-        tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3`
-        tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
-        tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 7`
-        tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
-        ;;
-      *)
-        if test "$curl_cv_have_def_OPENSSL_VERSION_STR" = "yes"; then
-          ver=`echo $curl_cv_def_OPENSSL_VERSION_STR | sed 's/"//g'`;
-          tst_vermaj=`echo $ver | cut -d. -f1`
-          tst_vermin=`echo $ver | cut -d. -f2`
-          tst_verfix=`echo $ver | cut -d. -f3`
-          tst_show="$ver"
-          tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
-        else
-          tst_api="unknown"
-        fi
-        ;;
-    esac
-    case $tst_api in
-      0x111) tst_show="1.1.1" ;;
-      0x110) tst_show="1.1.0" ;;
-      0x102) tst_show="1.0.2" ;;
-      0x101) tst_show="1.0.1" ;;
-      0x100) tst_show="1.0.0" ;;
-      0x099) tst_show="0.9.9" ;;
-      0x098) tst_show="0.9.8" ;;
-      0x097) tst_show="0.9.7" ;;
-      0x096) tst_show="0.9.6" ;;
-      0x095) tst_show="0.9.5" ;;
-      0x094) tst_show="0.9.4" ;;
-      0x093) tst_show="0.9.3" ;;
-      0x092) tst_show="0.9.2" ;;
-      0x091) tst_show="0.9.1" ;;
-      *)
-      if test -z "$tst_show"; then
-        tst_show="unknown"
-      fi
-      ;;
-    esac
-    tst_show="$tst_show - $tst_api"
-  else
-    tst_show="unknown"
+                                          LIBS="$SSL_LIBS $LIBS"
+    fi
   fi
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_show" >&5
-printf "%s\n" "$tst_show" >&6; }
-  #
-  curl_openssl_api_headers=$tst_api
 
+    CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
+  LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
 
-  #
-  tst_api="unknown"
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL library version" >&5
-printf %s "checking for OpenSSL library version... " >&6; }
-  if test "$tst_api" = "unknown"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
+printf %s "checking for HMAC_Update in -lcrypto... " >&6; }
+if test ${ac_cv_lib_crypto_HMAC_Update+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define SSL_CTX_load_verify_dir innocuous_SSL_CTX_load_verify_dir
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef SSL_CTX_load_verify_dir
 #ifdef __cplusplus
 extern "C"
 #endif
-char SSL_CTX_load_verify_dir ();
-#if defined __stub_SSL_CTX_load_verify_dir || defined __stub___SSL_CTX_load_verify_dir
-choke me
-#endif
-
+char HMAC_Update ();
 int main (void)
 {
-return SSL_CTX_load_verify_dir ();
+return HMAC_Update ();
  ;
  return 0;
 }
-
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-
-      tst_api="0x300"
-
+  ac_cv_lib_crypto_HMAC_Update=yes
+else $as_nop
+  ac_cv_lib_crypto_HMAC_Update=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-  fi
-  if test "$tst_api" = "unknown"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_HMAC_Update" >&5
+printf "%s\n" "$ac_cv_lib_crypto_HMAC_Update" >&6; }
+if test "x$ac_cv_lib_crypto_HMAC_Update" = xyes
+then :
 
-#define ERR_clear_last_mark innocuous_ERR_clear_last_mark
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef ERR_clear_last_mark
-#ifdef __cplusplus
-extern "C"
-#endif
-char ERR_clear_last_mark ();
-#if defined __stub_ERR_clear_last_mark || defined __stub___ERR_clear_last_mark
-choke me
-#endif
+     HAVECRYPTO="yes"
+     LIBS="-lcrypto $LIBS"
 
-int main (void)
-{
-return ERR_clear_last_mark ();
- ;
- return 0;
-}
+else $as_nop
 
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
+     if test -n "$LIB_OPENSSL" ; then
+       LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
+     fi
+     if test "$PKGCONFIG" = "no" -a -n "$PREFIX_OPENSSL" ; then
+       # only set this if pkg-config wasn't used
+       CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include"
+     fi
+     # Linking previously failed, try extra paths from --with-openssl or
+     # pkg-config.  Use a different function name to avoid reusing the earlier
+     # cached result.
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HMAC_Init_ex in -lcrypto" >&5
+printf %s "checking for HMAC_Init_ex in -lcrypto... " >&6; }
+if test ${ac_cv_lib_crypto_HMAC_Init_ex+y}
 then :
-
-      tst_api="0x111"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  fi
-  if test "$tst_api" = "unknown"; then
-    case $host in
-      *-*-vms*)
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define SSL_CTX_set_not_resumbl_sess_cb innocuous_SSL_CTX_set_not_resumbl_sess_cb
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef SSL_CTX_set_not_resumbl_sess_cb
 #ifdef __cplusplus
 extern "C"
 #endif
-char SSL_CTX_set_not_resumbl_sess_cb ();
-#if defined __stub_SSL_CTX_set_not_resumbl_sess_cb || defined __stub___SSL_CTX_set_not_resumbl_sess_cb
-choke me
-#endif
-
+char HMAC_Init_ex ();
 int main (void)
 {
-return SSL_CTX_set_not_resumbl_sess_cb ();
+return HMAC_Init_ex ();
  ;
  return 0;
 }
-
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-
-          tst_api="0x110"
-
+  ac_cv_lib_crypto_HMAC_Init_ex=yes
+else $as_nop
+  ac_cv_lib_crypto_HMAC_Init_ex=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-        ;;
-      *)
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_HMAC_Init_ex" >&5
+printf "%s\n" "$ac_cv_lib_crypto_HMAC_Init_ex" >&6; }
+if test "x$ac_cv_lib_crypto_HMAC_Init_ex" = xyes
+then :
 
+       HAVECRYPTO="yes"
+       LIBS="-lcrypto $LIBS"
+else $as_nop
 
-#define SSL_CTX_set_not_resumable_session_callback innocuous_SSL_CTX_set_not_resumable_session_callback
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef SSL_CTX_set_not_resumable_session_callback
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_CTX_set_not_resumable_session_callback ();
-#if defined __stub_SSL_CTX_set_not_resumable_session_callback || defined __stub___SSL_CTX_set_not_resumable_session_callback
-choke me
-#endif
+
+              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl" >&5
+printf %s "checking OpenSSL linking with -ldl... " >&6; }
+       LIBS="-lcrypto $CLEANLIBS -ldl"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+         #include <openssl/err.h>
 
 int main (void)
 {
-return SSL_CTX_set_not_resumable_session_callback ();
+
+         ERR_clear_error();
+
  ;
  return 0;
 }
-
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
 
-          tst_api="0x110"
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+         HAVECRYPTO="yes"
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-        ;;
-    esac
-  fi
-  if test "$tst_api" = "unknown"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl and -lpthread" >&5
+printf %s "checking OpenSSL linking with -ldl and -lpthread... " >&6; }
+         LIBS="-lcrypto $CLEANLIBS -ldl -lpthread"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define SSL_CONF_CTX_new innocuous_SSL_CONF_CTX_new
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef SSL_CONF_CTX_new
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_CONF_CTX_new ();
-#if defined __stub_SSL_CONF_CTX_new || defined __stub___SSL_CONF_CTX_new
-choke me
-#endif
+           #include <openssl/err.h>
 
 int main (void)
 {
-return SSL_CONF_CTX_new ();
+
+           ERR_clear_error();
+
  ;
  return 0;
 }
-
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
 
-      tst_api="0x102"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  fi
-  if test "$tst_api" = "unknown"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+           HAVECRYPTO="yes"
 
+else $as_nop
 
-#define SSL_renegotiate_abbreviated innocuous_SSL_renegotiate_abbreviated
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef SSL_renegotiate_abbreviated
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_renegotiate_abbreviated ();
-#if defined __stub_SSL_renegotiate_abbreviated || defined __stub___SSL_renegotiate_abbreviated
-choke me
-#endif
+           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+           LDFLAGS="$CLEANLDFLAGS"
+           CPPFLAGS="$CLEANCPPFLAGS"
+           LIBS="$CLEANLIBS"
 
-int main (void)
-{
-return SSL_renegotiate_abbreviated ();
- ;
- return 0;
-}
 
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
 
-      tst_api="0x101"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-  fi
-  if test "$tst_api" = "unknown"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
 
-#define OBJ_add_sigid innocuous_OBJ_add_sigid
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef OBJ_add_sigid
-#ifdef __cplusplus
-extern "C"
-#endif
-char OBJ_add_sigid ();
-#if defined __stub_OBJ_add_sigid || defined __stub___OBJ_add_sigid
-choke me
-#endif
+fi
 
-int main (void)
-{
-return OBJ_add_sigid ();
- ;
- return 0;
-}
 
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
+fi
 
-      tst_api="0x100"
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  fi
-  if test "$tst_api" = "unknown"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test X"$HAVECRYPTO" = X"yes"; then
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5
+printf %s "checking for SSL_connect in -lssl... " >&6; }
+if test ${ac_cv_lib_ssl_SSL_connect+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define ERR_set_mark innocuous_ERR_set_mark
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef ERR_set_mark
 #ifdef __cplusplus
 extern "C"
 #endif
-char ERR_set_mark ();
-#if defined __stub_ERR_set_mark || defined __stub___ERR_set_mark
-choke me
-#endif
-
+char SSL_connect ();
 int main (void)
 {
-return ERR_set_mark ();
+return SSL_connect ();
  ;
  return 0;
 }
-
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-
-      tst_api="0x098"
-
+  ac_cv_lib_ssl_SSL_connect=yes
+else $as_nop
+  ac_cv_lib_ssl_SSL_connect=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-  fi
-  if test "$tst_api" = "unknown"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5
+printf "%s\n" "$ac_cv_lib_ssl_SSL_connect" >&6; }
+if test "x$ac_cv_lib_ssl_SSL_connect" = xyes
+then :
+  printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h
+
+  LIBS="-lssl $LIBS"
+
+fi
+
+
+    if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssl with RSAglue/rsaref libs in use" >&5
+printf %s "checking for ssl with RSAglue/rsaref libs in use... " >&6; };
+        OLIBS=$LIBS
+        LIBS="-lRSAglue -lrsaref $LIBS"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5
+printf %s "checking for SSL_connect in -lssl... " >&6; }
+if test ${ac_cv_lib_ssl_SSL_connect+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define ERR_peek_last_error innocuous_ERR_peek_last_error
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef ERR_peek_last_error
 #ifdef __cplusplus
 extern "C"
 #endif
-char ERR_peek_last_error ();
-#if defined __stub_ERR_peek_last_error || defined __stub___ERR_peek_last_error
-choke me
-#endif
-
+char SSL_connect ();
 int main (void)
 {
-return ERR_peek_last_error ();
+return SSL_connect ();
  ;
  return 0;
 }
-
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-
-      tst_api="0x097"
-
+  ac_cv_lib_ssl_SSL_connect=yes
+else $as_nop
+  ac_cv_lib_ssl_SSL_connect=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-  fi
-  if test "$tst_api" = "unknown"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5
+printf "%s\n" "$ac_cv_lib_ssl_SSL_connect" >&6; }
+if test "x$ac_cv_lib_ssl_SSL_connect" = xyes
+then :
+  printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h
 
+  LIBS="-lssl $LIBS"
 
-#define c2i_ASN1_OBJECT innocuous_c2i_ASN1_OBJECT
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef c2i_ASN1_OBJECT
-#ifdef __cplusplus
-extern "C"
-#endif
-char c2i_ASN1_OBJECT ();
-#if defined __stub_c2i_ASN1_OBJECT || defined __stub___c2i_ASN1_OBJECT
-choke me
-#endif
+fi
 
-int main (void)
-{
-return c2i_ASN1_OBJECT ();
- ;
- return 0;
-}
+        if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
+                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+            LIBS=$OLIBS
+        else
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+        fi
 
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
+    else
+
+                   for ac_header in openssl/x509.h openssl/rsa.h openssl/crypto.h openssl/pem.h openssl/ssl.h openssl/err.h
+do :
+  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
 then :
+  cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ssl_msg="OpenSSL"
+        test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+        OPENSSL_ENABLED=1
 
-      tst_api="0x096"
+printf "%s\n" "#define USE_OPENSSL 1" >>confdefs.h
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  fi
-  if test "$tst_api" = "unknown"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
+done
 
-#define SSL_CTX_set_purpose innocuous_SSL_CTX_set_purpose
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef SSL_CTX_set_purpose
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_CTX_set_purpose ();
-#if defined __stub_SSL_CTX_set_purpose || defined __stub___SSL_CTX_set_purpose
-choke me
-#endif
+      if test $ac_cv_header_openssl_x509_h = no; then
+                                ac_fn_c_check_header_compile "$LINENO" "x509.h" "ac_cv_header_x509_h" "$ac_includes_default"
+if test "x$ac_cv_header_x509_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_X509_H 1" >>confdefs.h
 
-int main (void)
-{
-return SSL_CTX_set_purpose ();
- ;
- return 0;
-}
+fi
+ac_fn_c_check_header_compile "$LINENO" "rsa.h" "ac_cv_header_rsa_h" "$ac_includes_default"
+if test "x$ac_cv_header_rsa_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_RSA_H 1" >>confdefs.h
 
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
+fi
+ac_fn_c_check_header_compile "$LINENO" "crypto.h" "ac_cv_header_crypto_h" "$ac_includes_default"
+if test "x$ac_cv_header_crypto_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_CRYPTO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "pem.h" "ac_cv_header_pem_h" "$ac_includes_default"
+if test "x$ac_cv_header_pem_h" = xyes
 then :
+  printf "%s\n" "#define HAVE_PEM_H 1" >>confdefs.h
 
-      tst_api="0x095"
+fi
+ac_fn_c_check_header_compile "$LINENO" "ssl.h" "ac_cv_header_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_ssl_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SSL_H 1" >>confdefs.h
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
+ac_fn_c_check_header_compile "$LINENO" "err.h" "ac_cv_header_err_h" "$ac_includes_default"
+if test "x$ac_cv_header_err_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_ERR_H 1" >>confdefs.h
+
+fi
+
+
+        if test $ac_cv_header_x509_h = yes &&
+           test $ac_cv_header_crypto_h = yes &&
+           test $ac_cv_header_ssl_h = yes; then
+                    ssl_msg="OpenSSL"
+          OPENSSL_ENABLED=1
+        fi
+      fi
+    fi
+
+    if test X"$OPENSSL_ENABLED" != X"1"; then
+       LIBS="$CLEANLIBS"
+    fi
+
+    if test X"$OPT_OPENSSL" != Xoff &&
+       test "$OPENSSL_ENABLED" != "1"; then
+      as_fn_error $? "OpenSSL libs and/or directories were not found where specified!" "$LINENO" 5
+    fi
   fi
-  if test "$tst_api" = "unknown"; then
+
+  if test X"$OPENSSL_ENABLED" = X"1"; then
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BoringSSL" >&5
+printf %s "checking for BoringSSL... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define OBJ_obj2txt innocuous_OBJ_obj2txt
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef OBJ_obj2txt
-#ifdef __cplusplus
-extern "C"
-#endif
-char OBJ_obj2txt ();
-#if defined __stub_OBJ_obj2txt || defined __stub___OBJ_obj2txt
-choke me
-#endif
+                #include <openssl/base.h>
 
 int main (void)
 {
-return OBJ_obj2txt ();
+
+                #ifndef OPENSSL_IS_BORINGSSL
+                #error not boringssl
+                #endif
+
  ;
  return 0;
 }
 
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
 
-      tst_api="0x094"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+        ssl_msg="BoringSSL"
+
+else $as_nop
+
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  fi
-  if test "$tst_api" = "unknown"; then
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AWS-LC" >&5
+printf %s "checking for AWS-LC... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define SSL_get_verify_depth innocuous_SSL_get_verify_depth
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef SSL_get_verify_depth
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_get_verify_depth ();
-#if defined __stub_SSL_get_verify_depth || defined __stub___SSL_get_verify_depth
-choke me
-#endif
+                #include <openssl/base.h>
 
 int main (void)
 {
-return SSL_get_verify_depth ();
+
+                #ifndef OPENSSL_IS_AWSLC
+                #error not AWS-LC
+                #endif
+
  ;
  return 0;
 }
 
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
 
-      tst_api="0x093"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+        ssl_msg="AWS-LC"
+
+else $as_nop
+
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  fi
-  if test "$tst_api" = "unknown"; then
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libressl" >&5
+printf %s "checking for libressl... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define SSL_library_init innocuous_SSL_library_init
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef SSL_library_init
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_library_init ();
-#if defined __stub_SSL_library_init || defined __stub___SSL_library_init
-choke me
-#endif
+#include <openssl/opensslv.h>
 
 int main (void)
 {
-return SSL_library_init ();
+
+        int dummy = LIBRESSL_VERSION_NUMBER;
+
  ;
  return 0;
 }
 
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
 
-      tst_api="0x092"
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
+
+      ssl_msg="libressl"
+
+else $as_nop
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  fi
-  if test "$tst_api" = "unknown"; then
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL >= v3" >&5
+printf %s "checking for OpenSSL >= v3... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define SSL_CTX_set_cipher_list innocuous_SSL_CTX_set_cipher_list
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef SSL_CTX_set_cipher_list
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_CTX_set_cipher_list ();
-#if defined __stub_SSL_CTX_set_cipher_list || defined __stub___SSL_CTX_set_cipher_list
-choke me
-#endif
+#include <openssl/opensslv.h>
 
 int main (void)
 {
-return SSL_CTX_set_cipher_list ();
+
+        #if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+        return 0;
+        #else
+        #error older than 3
+        #endif
+
  ;
  return 0;
 }
 
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
 
-      tst_api="0x091"
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_OPENSSL3 1" >>confdefs.h
+
+      ssl_msg="OpenSSL v3+"
+
+else $as_nop
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  fi
-  case $tst_api in
-    0x300) tst_show="3.0.0" ;;
-    0x111) tst_show="1.1.1" ;;
-    0x110) tst_show="1.1.0" ;;
-    0x102) tst_show="1.0.2" ;;
-    0x101) tst_show="1.0.1" ;;
-    0x100) tst_show="1.0.0" ;;
-    0x099) tst_show="0.9.9" ;;
-    0x098) tst_show="0.9.8" ;;
-    0x097) tst_show="0.9.7" ;;
-    0x096) tst_show="0.9.6" ;;
-    0x095) tst_show="0.9.5" ;;
-    0x094) tst_show="0.9.4" ;;
-    0x093) tst_show="0.9.3" ;;
-    0x092) tst_show="0.9.2" ;;
-    0x091) tst_show="0.9.1" ;;
-    *)     tst_show="unknown" ;;
-  esac
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_show" >&5
-printf "%s\n" "$tst_show" >&6; }
-  #
-  curl_openssl_api_library=$tst_api
-
-  #
-  tst_match="yes"
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL headers and library versions matching" >&5
-printf %s "checking for OpenSSL headers and library versions matching... " >&6; }
-  if test "$curl_openssl_api_headers" = "unknown" ||
-    test "$curl_openssl_api_library" = "unknown"; then
-    tst_match="fail"
-    tst_warns="Can not compare OpenSSL headers and library versions."
-  elif test "$curl_openssl_api_headers" != "$curl_openssl_api_library"; then
-    tst_match="no"
-    tst_warns="OpenSSL headers and library versions do not match."
-  fi
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_match" >&5
-printf "%s\n" "$tst_match" >&6; }
-  if test "$tst_match" != "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $tst_warns" >&5
-printf "%s\n" "$as_me: WARNING: $tst_warns" >&2;}
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   fi
 
+  if test "$OPENSSL_ENABLED" = "1"; then
+    if test -n "$LIB_OPENSSL"; then
+                            if test "x$cross_compiling" != "xyes"; then
+         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
+         export CURL_LIBRARY_PATH
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $LIB_OPENSSL to CURL_LIBRARY_PATH" >&5
+printf "%s\n" "$as_me: Added $LIB_OPENSSL to CURL_LIBRARY_PATH" >&6;}
+       fi
+    fi
     check_for_ca_bundle=1
   fi
 
 
 if test X"$OPENSSL_ENABLED" = X"1"; then
 
-# Check whether --with-egd-socket was given.
-if test ${with_egd_socket+y}
-then :
-  withval=$with_egd_socket;  EGD_SOCKET="$withval"
-
-fi
-
-  if test -n "$EGD_SOCKET" ; then
-
-printf "%s\n" "#define EGD_SOCKET \"$EGD_SOCKET\"" >>confdefs.h
-
-  fi
-
-
 # Check whether --with-random was given.
 if test ${with_random+y}
 then :
@@ -26529,53 +27406,45 @@ printf "%s\n" "#define RANDOM_FILE \"$RANDOM_FILE\"" >>confdefs.h
 fi
 
 if test "$OPENSSL_ENABLED" = "1"; then
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SRP_Calc_client_key in -lcrypto" >&5
-printf %s "checking for SRP_Calc_client_key in -lcrypto... " >&6; }
-if test ${ac_cv_lib_crypto_SRP_Calc_client_key+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SRP support in OpenSSL" >&5
+printf %s "checking for SRP support in OpenSSL... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#ifdef __cplusplus
-extern "C"
-#endif
-char SRP_Calc_client_key ();
+#include <openssl/ssl.h>
+
 int main (void)
 {
-return SRP_Calc_client_key ();
+
+      SSL_CTX_set_srp_username(NULL, "");
+      SSL_CTX_set_srp_password(NULL, "");
+
  ;
  return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  ac_cv_lib_crypto_SRP_Calc_client_key=yes
-else $as_nop
-  ac_cv_lib_crypto_SRP_Calc_client_key=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SRP_Calc_client_key" >&5
-printf "%s\n" "$ac_cv_lib_crypto_SRP_Calc_client_key" >&6; }
-if test "x$ac_cv_lib_crypto_SRP_Calc_client_key" = xyes
-then :
 
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
 printf "%s\n" "#define HAVE_OPENSSL_SRP 1" >>confdefs.h
 
-     HAVE_OPENSSL_SRP=1
+    HAVE_OPENSSL_SRP=1
 
 
-fi
+else $as_nop
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+fi
 
 if test X"$OPENSSL_ENABLED" = X"1"; then
 # Check whether --enable-openssl-auto-load-config was given.
@@ -27073,7 +27942,7 @@ printf "%s\n" "#define USE_MBEDTLS 1" >>confdefs.h
          MBEDTLS_ENABLED=1
          USE_MBEDTLS="yes"
          ssl_msg="mbedTLS"
-        test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+         test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 
 fi
 
@@ -27403,12 +28272,13 @@ printf %s "checking for wolfSSL_Init in -lwolfssl... " >&6; }
    They are set up properly later if it is detected.  */
 #undef SIZEOF_LONG
 #undef SIZEOF_LONG_LONG
+#include <wolfssl/options.h>
 #include <wolfssl/ssl.h>
 
 int main (void)
 {
 
-         return wolfSSL_Init();
+          return wolfSSL_Init();
 
  ;
  return 0;
@@ -27428,7 +28298,7 @@ printf "%s\n" "#define USE_WOLFSSL 1" >>confdefs.h
          WOLFSSL_ENABLED=1
          USE_WOLFSSL="yes"
          ssl_msg="WolfSSL"
-        test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+         test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 
 else $as_nop
 
@@ -27449,14 +28319,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
 printf "%s\n" "$as_me: detected wolfSSL" >&6;}
       check_for_ca_bundle=1
 
-            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
 printf %s "checking size of long long... " >&6; }
-if test ${ac_cv_sizeof_long_long+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  r=0
+    for typesize in 8 4 2 16 1; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -27464,28 +28333,39 @@ else $as_nop
 
 int main (void)
 {
-switch (0) case 0: case (sizeof (long long) == $ac_size):;
+switch(0) {
+       case 0:
+       case (sizeof(long long) == $typesize):;
+     }
+
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_sizeof_long_long=$ac_size
+
+       r=$typesize
+else $as_nop
+
+       r=0
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  if test x$ac_cv_sizeof_long_long != x ; then break; fi
-done
+        if test $r -gt 0; then
+      break;
+    fi
+  done
+  if test $r -eq 0; then
+    as_fn_error $? "Failed to find size of long long" "$LINENO" 5
+  fi
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r" >&5
+printf "%s\n" "$r" >&6; }
+    tname=$(echo "ac_cv_sizeof_long long" | tr A-Z a-z | tr " " "_")
+  eval "$tname=$r"
 
-fi
 
-if test x$ac_cv_sizeof_long_long = x ; then
-  as_fn_error $? "cannot determine a size for long long" "$LINENO" 5
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
-printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
+printf "%s\n" "#define SIZEOF_LONG_LONG $r" >>confdefs.h
 
-printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
 
 
 
@@ -27512,193 +28392,35 @@ then :
 
 printf "%s\n" "#define HAVE_WOLFSSL_DES_ECB_ENCRYPT 1" >>confdefs.h
 
-            if test -n "$addcflags"; then
-                            for f in $addcflags; do
-                CPPFLAGS="$f/wolfssl $CPPFLAGS"
-                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Add $f/wolfssl to CPPFLAGS" >&5
-printf "%s\n" "$as_me: Add $f/wolfssl to CPPFLAGS" >&6;}
-                break
-              done
-            else
-                                          CPPFLAGS="-I/usr/include/wolfssl $CPPFLAGS"
-              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Add /usr/include/wolfssl to CPPFLAGS" >&5
-printf "%s\n" "$as_me: Add /usr/include/wolfssl to CPPFLAGS" >&6;}
-            fi
             WOLFSSL_NTLM=1
 
 
 fi
 
 
-      if test -n "$wolfssllibpath"; then
-                                        if test "x$cross_compiling" != "xyes"; then
-          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath"
-          export CURL_LIBRARY_PATH
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $wolfssllibpath to CURL_LIBRARY_PATH" >&5
-printf "%s\n" "$as_me: Added $wolfssllibpath to CURL_LIBRARY_PATH" >&6;}
-        fi
-      fi
-
-    fi
-
-  fi
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-fi
-
-
-
-
-if test "x$OPT_MESALINK" != xno; then
-  _cppflags=$CPPFLAGS
-  _ldflags=$LDFLAGS
-  ssl_msg=
-
-  if test X"$OPT_MESALINK" != Xno; then
-
-    if test "$OPT_MESALINK" = "yes"; then
-      OPT_MESALINK=""
-    fi
-
-    if test -z "$OPT_MESALINK" ; then
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mesalink_library_init in -lmesalink" >&5
-printf %s "checking for mesalink_library_init in -lmesalink... " >&6; }
-if test ${ac_cv_lib_mesalink_mesalink_library_init+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmesalink  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char mesalink_library_init ();
-int main (void)
-{
-return mesalink_library_init ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_lib_mesalink_mesalink_library_init=yes
-else $as_nop
-  ac_cv_lib_mesalink_mesalink_library_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mesalink_mesalink_library_init" >&5
-printf "%s\n" "$ac_cv_lib_mesalink_mesalink_library_init" >&6; }
-if test "x$ac_cv_lib_mesalink_mesalink_library_init" = xyes
-then :
-
-
-printf "%s\n" "#define USE_MESALINK 1" >>confdefs.h
-
-         USE_MESALINK=1
-
-         MESALINK_ENABLED=1
-         USE_MESALINK="yes"
-         ssl_msg="MesaLink"
-        test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-
-fi
-
-    fi
-
-    addld=""
-    addlib=""
-    addcflags=""
-    mesalinklib=""
-
-    if test "x$USE_MESALINK" != "xyes"; then
-            addld=-L$OPT_MESALINK/lib$libsuff
-      addcflags=-I$OPT_MESALINK/include
-      mesalinklib=$OPT_MESALINK/lib$libsuff
-
-      LDFLAGS="$LDFLAGS $addld"
-      if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
-      fi
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mesalink_library_init in -lmesalink" >&5
-printf %s "checking for mesalink_library_init in -lmesalink... " >&6; }
-if test ${ac_cv_lib_mesalink_mesalink_library_init+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmesalink  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char mesalink_library_init ();
-int main (void)
-{
-return mesalink_library_init ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_lib_mesalink_mesalink_library_init=yes
-else $as_nop
-  ac_cv_lib_mesalink_mesalink_library_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mesalink_mesalink_library_init" >&5
-printf "%s\n" "$ac_cv_lib_mesalink_mesalink_library_init" >&6; }
-if test "x$ac_cv_lib_mesalink_mesalink_library_init" = xyes
+            ac_fn_c_check_func "$LINENO" "wolfSSL_BIO_set_shutdown" "ac_cv_func_wolfSSL_BIO_set_shutdown"
+if test "x$ac_cv_func_wolfSSL_BIO_set_shutdown" = xyes
 then :
 
 
-printf "%s\n" "#define USE_MESALINK 1" >>confdefs.h
-
-       USE_MESALINK=1
-
-       MESALINK_ENABLED=1
-       USE_MESALINK="yes"
-       ssl_msg="MesaLink"
-       test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+printf "%s\n" "#define HAVE_WOLFSSL_FULL_BIO 1" >>confdefs.h
 
-else $as_nop
+            WOLFSSL_FULL_BIO=1
 
-         CPPFLAGS=$_cppflags
-         LDFLAGS=$_ldflags
 
 fi
 
-    fi
-
-    if test "x$USE_MESALINK" = "xyes"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected MesaLink" >&5
-printf "%s\n" "$as_me: detected MesaLink" >&6;}
-
-      LIBS="-lmesalink $LIBS"
 
-      if test -n "$mesalinklib"; then
+      if test -n "$wolfssllibpath"; then
                                         if test "x$cross_compiling" != "xyes"; then
-          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$mesalinklib"
-          export LD_LIBRARY_PATH
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $mesalinklib to LD_LIBRARY_PATH" >&5
-printf "%s\n" "$as_me: Added $mesalinklib to LD_LIBRARY_PATH" >&6;}
+          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath"
+          export CURL_LIBRARY_PATH
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $wolfssllibpath to CURL_LIBRARY_PATH" >&5
+printf "%s\n" "$as_me: Added $wolfssllibpath to CURL_LIBRARY_PATH" >&6;}
         fi
       fi
+    else
+        as_fn_error $? "--with-wolfssl but wolfSSL was not found or doesn't work" "$LINENO" 5
     fi
 
   fi
@@ -27707,6 +28429,7 @@ fi
 
 
 
+
 if test "x$OPT_BEARSSL" != xno; then
   _cppflags=$CPPFLAGS
   _ldflags=$LDFLAGS
@@ -27766,7 +28489,7 @@ printf "%s\n" "#define USE_BEARSSL 1" >>confdefs.h
          BEARSSL_ENABLED=1
          USE_BEARSSL="yes"
          ssl_msg="BearSSL"
-        test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+         test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 
 fi
 
@@ -27878,6 +28601,14 @@ if test "x$OPT_RUSTLS" != xno; then
       OPT_RUSTLS=""
     fi
 
+    case $host_os in
+      darwin*)
+        LDFLAGS="$LDFLAGS -framework Security"
+        ;;
+      *)
+        ;;
+    esac
+
     if test -z "$OPT_RUSTLS" ; then
 
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rustls_client_session_read in -lrustls" >&5
@@ -27926,7 +28657,7 @@ printf "%s\n" "#define USE_RUSTLS 1" >>confdefs.h
          RUSTLS_ENABLED=1
          USE_RUSTLS="yes"
          ssl_msg="rustls"
-        test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+         test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
 
 fi
 
@@ -28018,470 +28749,19 @@ printf "%s\n" "$as_me: Added $rustlslib to CURL_LIBRARY_PATH" >&6;}
 fi
 
 
-if test "x$OPT_NSS" != xno; then
-  ssl_msg=
-
-  if test X"$OPT_NSS" != Xno; then
-
-    addld=""
-    addlib=""
-    addcflags=""
-    nssprefix=""
-    version=""
-
-    if test "x$OPT_NSS" = "xyes"; then
-
-
-    if test -n "$PKG_CONFIG"; then
-      PKGCONFIG="$PKG_CONFIG"
-    else
-      if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_path_PKGCONFIG+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  case $PKGCONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  case $as_dir in #(((
-    '') as_dir=./ ;;
-    */) ;;
-    *) as_dir=$as_dir/ ;;
-  esac
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
-    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-printf "%s\n" "$PKGCONFIG" >&6; }
-else
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKGCONFIG"; then
-  ac_pt_PKGCONFIG=$PKGCONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  case $ac_pt_PKGCONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  case $as_dir in #(((
-    '') as_dir=./ ;;
-    */) ;;
-    *) as_dir=$as_dir/ ;;
-  esac
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
-    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
-if test -n "$ac_pt_PKGCONFIG"; then
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
-printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
-else
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
-  if test "x$ac_pt_PKGCONFIG" = x; then
-    PKGCONFIG="no"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKGCONFIG=$ac_pt_PKGCONFIG
-  fi
-else
-  PKGCONFIG="$ac_cv_path_PKGCONFIG"
-fi
-
-    fi
-
-    if test "x$PKGCONFIG" != "xno"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nss options with pkg-config" >&5
-printf %s "checking for nss options with pkg-config... " >&6; }
-            itexists=`
-    if test -n ""; then
-      PKG_CONFIG_LIBDIR=""
-      export PKG_CONFIG_LIBDIR
-    fi
-         $PKGCONFIG --exists nss >/dev/null 2>&1 && echo 1`
-
-      if test -z "$itexists"; then
-                        PKGCONFIG="no"
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      else
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
-printf "%s\n" "found" >&6; }
-      fi
-    fi
-
-
-      if test "$PKGCONFIG" != "no" ; then
-        addlib=`$PKGCONFIG --libs nss`
-        addcflags=`$PKGCONFIG --cflags nss`
-        version=`$PKGCONFIG --modversion nss`
-        nssprefix=`$PKGCONFIG --variable=prefix nss`
-      else
-
-        check=`nss-config --version 2>/dev/null`
-        if test -n "$check"; then
-          addlib=`nss-config --libs`
-          addcflags=`nss-config --cflags`
-          version=`nss-config --version`
-          nssprefix=`nss-config --prefix`
-        else
-          addlib="-lnss3"
-          addcflags=""
-          version="unknown"
-        fi
-      fi
-    else
-      NSS_PCDIR="$OPT_NSS/lib/pkgconfig"
-      if test -f "$NSS_PCDIR/nss.pc"; then
-
-    if test -n "$PKG_CONFIG"; then
-      PKGCONFIG="$PKG_CONFIG"
-    else
-      if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_path_PKGCONFIG+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  case $PKGCONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  case $as_dir in #(((
-    '') as_dir=./ ;;
-    */) ;;
-    *) as_dir=$as_dir/ ;;
-  esac
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
-    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-printf "%s\n" "$PKGCONFIG" >&6; }
-else
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKGCONFIG"; then
-  ac_pt_PKGCONFIG=$PKGCONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  case $ac_pt_PKGCONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  case $as_dir in #(((
-    '') as_dir=./ ;;
-    */) ;;
-    *) as_dir=$as_dir/ ;;
-  esac
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
-    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
-if test -n "$ac_pt_PKGCONFIG"; then
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
-printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
-else
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
-  if test "x$ac_pt_PKGCONFIG" = x; then
-    PKGCONFIG="no"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKGCONFIG=$ac_pt_PKGCONFIG
-  fi
-else
-  PKGCONFIG="$ac_cv_path_PKGCONFIG"
-fi
-
-    fi
-
-    if test "x$PKGCONFIG" != "xno"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nss options with pkg-config" >&5
-printf %s "checking for nss options with pkg-config... " >&6; }
-            itexists=`
-    if test -n "$NSS_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$NSS_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
-         $PKGCONFIG --exists nss >/dev/null 2>&1 && echo 1`
-
-      if test -z "$itexists"; then
-                        PKGCONFIG="no"
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      else
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
-printf "%s\n" "found" >&6; }
-      fi
-    fi
-
-        if test "$PKGCONFIG" != "no" ; then
-          addld=`
-    if test -n "$NSS_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$NSS_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
- $PKGCONFIG --libs-only-L nss`
-          addlib=`
-    if test -n "$NSS_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$NSS_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
- $PKGCONFIG --libs-only-l nss`
-          addcflags=`
-    if test -n "$NSS_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$NSS_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
- $PKGCONFIG --cflags nss`
-          version=`
-    if test -n "$NSS_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$NSS_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
- $PKGCONFIG --modversion nss`
-          nssprefix=`
-    if test -n "$NSS_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$NSS_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
- $PKGCONFIG --variable=prefix nss`
-        fi
-      fi
-    fi
-
-    if test -z "$addlib"; then
-      # Without pkg-config, we'll kludge in some defaults
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Using hard-wired libraries and compilation flags for NSS." >&5
-printf "%s\n" "$as_me: WARNING: Using hard-wired libraries and compilation flags for NSS." >&2;}
-      addld="-L$OPT_NSS/lib"
-      addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
-      addcflags="-I$OPT_NSS/include"
-      version="unknown"
-      nssprefix=$OPT_NSS
-    fi
-
-    CLEANLDFLAGS="$LDFLAGS"
-    CLEANLIBS="$LIBS"
-    CLEANCPPFLAGS="$CPPFLAGS"
-
-    LDFLAGS="$addld $LDFLAGS"
-    LIBS="$addlib $LIBS"
-    if test "$addcflags" != "-I/usr/include"; then
-       CPPFLAGS="$CPPFLAGS $addcflags"
-    fi
-
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_VersionRangeSet in -lnss3" >&5
-printf %s "checking for SSL_VersionRangeSet in -lnss3... " >&6; }
-if test ${ac_cv_lib_nss3_SSL_VersionRangeSet+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnss3  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_VersionRangeSet ();
-int main (void)
-{
-return SSL_VersionRangeSet ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_lib_nss3_SSL_VersionRangeSet=yes
-else $as_nop
-  ac_cv_lib_nss3_SSL_VersionRangeSet=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_SSL_VersionRangeSet" >&5
-printf "%s\n" "$ac_cv_lib_nss3_SSL_VersionRangeSet" >&6; }
-if test "x$ac_cv_lib_nss3_SSL_VersionRangeSet" = xyes
-then :
-
-
-printf "%s\n" "#define USE_NSS 1" >>confdefs.h
-
-     USE_NSS=1
-
-     USE_NSS="yes"
-     NSS_ENABLED=1
-     ssl_msg="NSS"
-     test nss != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-
-else $as_nop
-
-       LDFLAGS="$CLEANLDFLAGS"
-       LIBS="$CLEANLIBS"
-       CPPFLAGS="$CLEANCPPFLAGS"
-
-fi
-
-
-    if test "x$USE_NSS" = "xyes"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected NSS version $version" >&5
-printf "%s\n" "$as_me: detected NSS version $version" >&6;}
-
-                        ac_fn_c_check_func "$LINENO" "PK11_CreateManagedGenericObject" "ac_cv_func_PK11_CreateManagedGenericObject"
-if test "x$ac_cv_func_PK11_CreateManagedGenericObject" = xyes
-then :
-
-
-printf "%s\n" "#define HAVE_PK11_CREATEMANAGEDGENERICOBJECT 1" >>confdefs.h
-
-
-fi
-
-
-            NSS_LIBS=$addlib
-
-
-                              if test "x$cross_compiling" != "xyes"; then
-        CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$nssprefix/lib$libsuff"
-        export CURL_LIBRARY_PATH
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH" >&5
-printf "%s\n" "$as_me: Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH" >&6;}
-      fi
-
-    fi
-  fi
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-fi
-
-
-
 if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$USE_SCHANNEL" = "x1"; then
   LIBS="-ladvapi32 -lcrypt32 $LIBS"
 fi
 
-case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$BEARSSL_ENABLED$AMISSL_ENABLED$RUSTLS_ENABLED"
+if test "x$curl_cv_native_windows" = "xyes"; then
+  LIBS="-lbcrypt $LIBS"
+fi
+
+case "x$SSL_DISABLED$OPENSSL_ENABLED$GNUTLS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED"
 in
 x)
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&5
-printf "%s\n" "$as_me: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&2;}
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl, --with-bearssl or --with-rustls to address this." >&5
-printf "%s\n" "$as_me: WARNING: Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl, --with-bearssl or --with-rustls to address this." >&2;}
+  as_fn_error $? "TLS not detected, you will not be able to use HTTPS, FTPS, NTLM and more.
+Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this." "$LINENO" 5
   ;;
 x1)
   # one SSL backend is enabled
@@ -28490,6 +28770,14 @@ x1)
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: built with one SSL backend" >&5
 printf "%s\n" "$as_me: built with one SSL backend" >&6;}
   ;;
+xD)
+  # explicitly built without TLS
+  ;;
+xD*)
+  as_fn_error $? "--without-ssl has been set together with an explicit option to use an ssl library
+(e.g. --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl, --with-rustls).
+Since these are conflicting parameters, verify which is the desired one and drop the other." "$LINENO" 5
+  ;;
 *)
   # more than one SSL backend is enabled
 
         ca="$want_ca"
     capath="no"
   elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
-        if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$MBEDTLS_ENABLED" != "x1"; then
-      as_fn_error $? "--with-ca-path only works with OpenSSL, GnuTLS or mbedTLS" "$LINENO" 5
+        if test "x$OPENSSL_ENABLED" != "x1" -a \
+            "x$GNUTLS_ENABLED" != "x1" -a \
+            "x$MBEDTLS_ENABLED" != "x1" -a \
+            "x$WOLFSSL_ENABLED" != "x1"; then
+      as_fn_error $? "--with-ca-path only works with OpenSSL, GnuTLS, mbedTLS or wolfSSL" "$LINENO" 5
     fi
     capath="$want_capath"
     ca="no"
           fi
         done
       fi
-      if test "x$want_capath" = "xunset" -a "x$ca" = "xno" -a \
-              "x$OPENSSL_ENABLED" = "x1"; then
-        check_capath="/etc/ssl/certs/"
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: want $want_capath ca $ca" >&5
+printf "%s\n" "$as_me: want $want_capath ca $ca" >&6;}
+      if test "x$want_capath" = "xunset"; then
+        if test "x$OPENSSL_ENABLED" = "x1" -o \
+                "x$GNUTLS_ENABLED" = "x1" -o \
+                "x$MBEDTLS_ENABLED" = "x1" -o \
+                "x$WOLFSSL_ENABLED" = "x1"; then
+          check_capath="/etc/ssl/certs"
+        fi
       fi
     else
             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: skipped the ca-cert path detection when cross-compiling" >&5
@@ -28868,7 +29165,7 @@ fi
 # Check whether --with-libmetalink was given.
 if test ${with_libmetalink+y}
 then :
-  withval=$with_libmetalink; as_fn_error $? "--with-libmetalink no longer works!" "$LINENO" 5
+  withval=$with_libmetalink; as_fn_error $? "--with-libmetalink and --without-libmetalink no longer work!" "$LINENO" 5
 fi
 
 
@@ -29052,7 +29349,7 @@ printf "%s\n" "found" >&6; }
 
 
     if test "$PKGCONFIG" != "no" ; then
-      LIB_SSH2=`$PKGCONFIG --libs libssh2`
+      LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
       LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
       CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
       version=`$PKGCONFIG --modversion libssh2`
@@ -29122,13 +29419,10 @@ then :
 fi
 
 
-         for ac_header in libssh2.h
-do :
   ac_fn_c_check_header_compile "$LINENO" "libssh2.h" "ac_cv_header_libssh2_h" "$ac_includes_default"
 if test "x$ac_cv_header_libssh2_h" = xyes
 then :
-  printf "%s\n" "#define HAVE_LIBSSH2_H 1" >>confdefs.h
- curl_ssh_msg="enabled (libSSH2)"
+  curl_ssh_msg="enabled (libSSH2)"
     LIBSSH2_ENABLED=1
 
 printf "%s\n" "#define USE_LIBSSH2 1" >>confdefs.h
@@ -29138,7 +29432,6 @@ printf "%s\n" "#define USE_LIBSSH2 1" >>confdefs.h
 
 fi
 
-done
 
   if test X"$OPT_LIBSSH2" != Xoff &&
      test "$LIBSSH2_ENABLED" != "1"; then
@@ -29375,13 +29668,10 @@ then :
 fi
 
 
-         for ac_header in libssh/libssh.h
-do :
   ac_fn_c_check_header_compile "$LINENO" "libssh/libssh.h" "ac_cv_header_libssh_libssh_h" "$ac_includes_default"
 if test "x$ac_cv_header_libssh_libssh_h" = xyes
 then :
-  printf "%s\n" "#define HAVE_LIBSSH_LIBSSH_H 1" >>confdefs.h
- curl_ssh_msg="enabled (libSSH)"
+  curl_ssh_msg="enabled (libSSH)"
     LIBSSH_ENABLED=1
 
 printf "%s\n" "#define USE_LIBSSH 1" >>confdefs.h
@@ -29391,7 +29681,6 @@ printf "%s\n" "#define USE_LIBSSH 1" >>confdefs.h
 
 fi
 
-done
 
   if test X"$OPT_LIBSSH" != Xoff &&
      test "$LIBSSH_ENABLED" != "1"; then
@@ -29771,8 +30060,6 @@ printf "%s\n" "yes" >&6; }
           versioned_symbols_flavour="OPENSSL_"
         elif test "x$GNUTLS_ENABLED" = "x1"; then
           versioned_symbols_flavour="GNUTLS_"
-        elif test "x$NSS_ENABLED" = "x1"; then
-          versioned_symbols_flavour="NSS_"
         elif test "x$WOLFSSL_ENABLED" = "x1"; then
           versioned_symbols_flavour="WOLFSSL_"
         elif test "x$SCHANNEL_ENABLED" = "x1"; then
@@ -29811,6 +30098,9 @@ else
 fi
 
 
+CURL_PLIST_VERSION="$CURLVERSION"
+
+
 
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native IDN (Windows native builds only)" >&5
 printf %s "checking whether to enable Windows native IDN (Windows native builds only)... " >&6; }
@@ -29932,9 +30222,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
 
 printf "%s\n" "#define USE_WIN32_IDN 1" >>confdefs.h
 
-
-printf "%s\n" "#define WANT_IDN_PROTOTYPES 1" >>confdefs.h
-
     IDN_ENABLED=1
 
     curl_idn_msg="enabled (Windows-native)"
@@ -29959,31 +30246,37 @@ then :
   withval=$with_libidn2; OPT_IDN=$withval
 fi
 
-case "$OPT_IDN" in
-  no)
-        want_idn="no"
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+if test "x$tst_links_winidn" = "xyes"; then
+  want_idn="no"
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (using winidn instead)" >&5
+printf "%s\n" "no (using winidn instead)" >&6; }
+else
+  case "$OPT_IDN" in
+    no)
+            want_idn="no"
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
-    ;;
-  default)
-        want_idn="yes"
-    want_idn_path="default"
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5
+      ;;
+    default)
+            want_idn="yes"
+      want_idn_path="default"
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5
 printf "%s\n" "(assumed) yes" >&6; }
-    ;;
-  yes)
-        want_idn="yes"
-    want_idn_path="default"
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+      ;;
+    yes)
+            want_idn="yes"
+      want_idn_path="default"
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
-    ;;
-  *)
-        want_idn="yes"
-    want_idn_path="$withval"
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($withval)" >&5
+      ;;
+    *)
+            want_idn="yes"
+      want_idn_path="$withval"
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($withval)" >&5
 printf "%s\n" "yes ($withval)" >&6; }
-    ;;
-esac
+      ;;
+  esac
+fi
 
 if test "$want_idn" = "yes"; then
     clean_CPPFLAGS="$CPPFLAGS"
@@ -30425,10 +30718,12 @@ case "$OPT_H2" in
   yes)
         want_nghttp2="default"
     want_nghttp2_path=""
+    want_nghttp2_pkg_config_path=""
     ;;
   *)
         want_nghttp2="yes"
-    want_nghttp2_path="$withval/lib/pkgconfig"
+    want_nghttp2_path="$withval"
+    want_nghttp2_pkg_config_path="$withval/lib/pkgconfig"
     ;;
 esac
 
@@ -30557,8 +30852,8 @@ fi
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2 options with pkg-config" >&5
 printf %s "checking for libnghttp2 options with pkg-config... " >&6; }
             itexists=`
-    if test -n "$want_nghttp2_path"; then
-      PKG_CONFIG_LIBDIR="$want_nghttp2_path"
+    if test -n "$want_nghttp2_pkg_config_path"; then
+      PKG_CONFIG_LIBDIR="$want_nghttp2_pkg_config_path"
       export PKG_CONFIG_LIBDIR
     fi
          $PKGCONFIG --exists libnghttp2 >/dev/null 2>&1 && echo 1`
@@ -30576,8 +30871,8 @@ printf "%s\n" "found" >&6; }
 
   if test "$PKGCONFIG" != "no" ; then
     LIB_H2=`
-    if test -n "$want_nghttp2_path"; then
-      PKG_CONFIG_LIBDIR="$want_nghttp2_path"
+    if test -n "$want_nghttp2_pkg_config_path"; then
+      PKG_CONFIG_LIBDIR="$want_nghttp2_pkg_config_path"
       export PKG_CONFIG_LIBDIR
     fi
 
@@ -30586,8 +30881,8 @@ printf "%s\n" "found" >&6; }
 printf "%s\n" "$as_me: -l is $LIB_H2" >&6;}
 
     CPP_H2=`
-    if test -n "$want_nghttp2_path"; then
-      PKG_CONFIG_LIBDIR="$want_nghttp2_path"
+    if test -n "$want_nghttp2_pkg_config_path"; then
+      PKG_CONFIG_LIBDIR="$want_nghttp2_pkg_config_path"
       export PKG_CONFIG_LIBDIR
     fi
        $PKGCONFIG --cflags-only-I libnghttp2`
@@ -30595,8 +30890,8 @@ printf "%s\n" "$as_me: -l is $LIB_H2" >&6;}
 printf "%s\n" "$as_me: -I is $CPP_H2" >&6;}
 
     LD_H2=`
-    if test -n "$want_nghttp2_path"; then
-      PKG_CONFIG_LIBDIR="$want_nghttp2_path"
+    if test -n "$want_nghttp2_pkg_config_path"; then
+      PKG_CONFIG_LIBDIR="$want_nghttp2_pkg_config_path"
       export PKG_CONFIG_LIBDIR
     fi
 
@@ -30604,15 +30899,27 @@ printf "%s\n" "$as_me: -I is $CPP_H2" >&6;}
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_H2" >&5
 printf "%s\n" "$as_me: -L is $LD_H2" >&6;}
 
-    LDFLAGS="$LDFLAGS $LD_H2"
-    CPPFLAGS="$CPPFLAGS $CPP_H2"
-    LIBS="$LIB_H2 $LIBS"
+    DIR_H2=`echo $LD_H2 | $SED -e 's/^-L//'`
+  elif test x"$want_nghttp2_path" != x; then
+    LIB_H2="-lnghttp2"
+    LD_H2=-L${want_nghttp2_path}/lib$libsuff
+    CPP_H2=-I${want_nghttp2_path}/include
+    DIR_H2=${want_nghttp2_path}/lib$libsuff
+  elif test X"$want_nghttp2" != Xdefault; then
+            as_fn_error $? "--with-nghttp2 was specified but could not find libnghttp2 pkg-config file." "$LINENO" 5
+  else
+    LIB_H2="-lnghttp2"
+  fi
+
+  LDFLAGS="$LDFLAGS $LD_H2"
+  CPPFLAGS="$CPPFLAGS $CPP_H2"
+  LIBS="$LIB_H2 $LIBS"
 
-    # use nghttp2_session_set_local_window_size to require nghttp2
-    # >= 1.12.0
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nghttp2_session_set_local_window_size in -lnghttp2" >&5
-printf %s "checking for nghttp2_session_set_local_window_size in -lnghttp2... " >&6; }
-if test ${ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size+y}
+  # use nghttp2_session_get_stream_local_window_size to require nghttp2
+  # >= 1.15.0
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nghttp2_session_get_stream_local_window_size in -lnghttp2" >&5
+printf %s "checking for nghttp2_session_get_stream_local_window_size in -lnghttp2... " >&6; }
+if test ${ac_cv_lib_nghttp2_nghttp2_session_get_stream_local_window_size+y}
 then :
   printf %s "(cached) " >&6
 else $as_nop
@@ -30625,65 +30932,63 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char nghttp2_session_set_local_window_size ();
+char nghttp2_session_get_stream_local_window_size ();
 int main (void)
 {
-return nghttp2_session_set_local_window_size ();
+return nghttp2_session_get_stream_local_window_size ();
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size=yes
+  ac_cv_lib_nghttp2_nghttp2_session_get_stream_local_window_size=yes
 else $as_nop
-  ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size=no
+  ac_cv_lib_nghttp2_nghttp2_session_get_stream_local_window_size=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" >&5
-printf "%s\n" "$ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" >&6; }
-if test "x$ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nghttp2_nghttp2_session_get_stream_local_window_size" >&5
+printf "%s\n" "$ac_cv_lib_nghttp2_nghttp2_session_get_stream_local_window_size" >&6; }
+if test "x$ac_cv_lib_nghttp2_nghttp2_session_get_stream_local_window_size" = xyes
 then :
 
-              for ac_header in nghttp2/nghttp2.h
+            for ac_header in nghttp2/nghttp2.h
 do :
   ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default"
 if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes
 then :
   printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h
  curl_h2_msg="enabled (nghttp2)"
-          NGHTTP2_ENABLED=1
+        NGHTTP2_ENABLED=1
 
 printf "%s\n" "#define USE_NGHTTP2 1" >>confdefs.h
 
-          USE_NGHTTP2=1
+        USE_NGHTTP2=1
 
 
 fi
 
 done
 
+     CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_H2"
+     export CURL_LIBRARY_PATH
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_H2 to CURL_LIBRARY_PATH" >&5
+printf "%s\n" "$as_me: Added $DIR_H2 to CURL_LIBRARY_PATH" >&6;}
+
 else $as_nop
-          LDFLAGS=$CLEANLDFLAGS
-        CPPFLAGS=$CLEANCPPFLAGS
-        LIBS=$CLEANLIBS
+        LDFLAGS=$CLEANLDFLAGS
+      CPPFLAGS=$CLEANCPPFLAGS
+      LIBS=$CLEANLIBS
 
 fi
 
-
-  else
-        if test X"$want_nghttp2" != Xdefault; then
-                  as_fn_error $? "--with-nghttp2 was specified but could not find libnghttp2 pkg-config file." "$LINENO" 5
-    fi
-  fi
-
 fi
 
 
-OPT_TCP2="yes"
+OPT_TCP2="no"
 
 if test "x$disable_http" = "xyes"; then
   # without HTTP, ngtcp2 is no use
     fi
 
     if test "x$PKGCONFIG" != "xno"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2_crypto_openssl options with pkg-config" >&5
-printf %s "checking for libngtcp2_crypto_openssl options with pkg-config... " >&6; }
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2_crypto_quictls options with pkg-config" >&5
+printf %s "checking for libngtcp2_crypto_quictls options with pkg-config... " >&6; }
+            itexists=`
+    if test -n "$want_tcp2_path"; then
+      PKG_CONFIG_LIBDIR="$want_tcp2_path"
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --exists libngtcp2_crypto_quictls >/dev/null 2>&1 && echo 1`
+
+      if test -z "$itexists"; then
+                        PKGCONFIG="no"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
+printf "%s\n" "found" >&6; }
+      fi
+    fi
+
+
+  if test "$PKGCONFIG" != "no" ; then
+    LIB_NGTCP2_CRYPTO_QUICTLS=`
+    if test -n "$want_tcp2_path"; then
+      PKG_CONFIG_LIBDIR="$want_tcp2_path"
+      export PKG_CONFIG_LIBDIR
+    fi
+
+      $PKGCONFIG --libs-only-l libngtcp2_crypto_quictls`
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_NGTCP2_CRYPTO_QUICTLS" >&5
+printf "%s\n" "$as_me: -l is $LIB_NGTCP2_CRYPTO_QUICTLS" >&6;}
+
+    CPP_NGTCP2_CRYPTO_QUICTLS=`
+    if test -n "$want_tcp2_path"; then
+      PKG_CONFIG_LIBDIR="$want_tcp2_path"
+      export PKG_CONFIG_LIBDIR
+    fi
+       $PKGCONFIG --cflags-only-I libngtcp2_crypto_quictls`
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_NGTCP2_CRYPTO_QUICTLS" >&5
+printf "%s\n" "$as_me: -I is $CPP_NGTCP2_CRYPTO_QUICTLS" >&6;}
+
+    LD_NGTCP2_CRYPTO_QUICTLS=`
+    if test -n "$want_tcp2_path"; then
+      PKG_CONFIG_LIBDIR="$want_tcp2_path"
+      export PKG_CONFIG_LIBDIR
+    fi
+
+      $PKGCONFIG --libs-only-L libngtcp2_crypto_quictls`
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_NGTCP2_CRYPTO_QUICTLS" >&5
+printf "%s\n" "$as_me: -L is $LD_NGTCP2_CRYPTO_QUICTLS" >&6;}
+
+    LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_QUICTLS"
+    CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_QUICTLS"
+    LIBS="$LIB_NGTCP2_CRYPTO_QUICTLS $LIBS"
+
+    if test "x$cross_compiling" != "xyes"; then
+      DIR_NGTCP2_CRYPTO_QUICTLS=`echo $LD_NGTCP2_CRYPTO_QUICTLS | $SED -e 's/^-L//'`
+    fi
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_recv_client_initial_cb in -lngtcp2_crypto_quictls" >&5
+printf %s "checking for ngtcp2_crypto_recv_client_initial_cb in -lngtcp2_crypto_quictls... " >&6; }
+if test ${ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_recv_client_initial_cb+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lngtcp2_crypto_quictls  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngtcp2_crypto_recv_client_initial_cb ();
+int main (void)
+{
+return ngtcp2_crypto_recv_client_initial_cb ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_recv_client_initial_cb=yes
+else $as_nop
+  ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_recv_client_initial_cb=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_recv_client_initial_cb" >&5
+printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_recv_client_initial_cb" >&6; }
+if test "x$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_recv_client_initial_cb" = xyes
+then :
+
+              for ac_header in ngtcp2/ngtcp2_crypto.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_h" "$ac_includes_default"
+if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_H 1" >>confdefs.h
+ NGTCP2_ENABLED=1
+
+printf "%s\n" "#define USE_NGTCP2_CRYPTO_QUICTLS 1" >>confdefs.h
+
+          USE_NGTCP2_CRYPTO_QUICTLS=1
+
+          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_QUICTLS"
+          export CURL_LIBRARY_PATH
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_NGTCP2_CRYPTO_QUICTLS to CURL_LIBRARY_PATH" >&5
+printf "%s\n" "$as_me: Added $DIR_NGTCP2_CRYPTO_QUICTLS to CURL_LIBRARY_PATH" >&6;}
+
+fi
+
+done
+
+else $as_nop
+          LDFLAGS=$CLEANLDFLAGS
+        CPPFLAGS=$CLEANCPPFLAGS
+        LIBS=$CLEANLIBS
+
+fi
+
+
+  else
+        if test X"$want_tcp2" != Xdefault; then
+                  as_fn_error $? "--with-ngtcp2 was specified but could not find ngtcp2_crypto_quictls pkg-config file." "$LINENO" 5
+    fi
+  fi
+fi
+
+if test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then
+    CLEANLDFLAGS="$LDFLAGS"
+  CLEANCPPFLAGS="$CPPFLAGS"
+  CLEANLIBS="$LIBS"
+
+
+    if test -n "$PKG_CONFIG"; then
+      PKGCONFIG="$PKG_CONFIG"
+    else
+      if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKGCONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKGCONFIG=$ac_cv_path_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+printf "%s\n" "$PKGCONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $ac_pt_PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
+
+    fi
+
+    if test "x$PKGCONFIG" != "xno"; then
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2_crypto_gnutls options with pkg-config" >&5
+printf %s "checking for libngtcp2_crypto_gnutls options with pkg-config... " >&6; }
             itexists=`
     if test -n "$want_tcp2_path"; then
       PKG_CONFIG_LIBDIR="$want_tcp2_path"
       export PKG_CONFIG_LIBDIR
     fi
-         $PKGCONFIG --exists libngtcp2_crypto_openssl >/dev/null 2>&1 && echo 1`
+         $PKGCONFIG --exists libngtcp2_crypto_gnutls >/dev/null 2>&1 && echo 1`
 
       if test -z "$itexists"; then
                         PKGCONFIG="no"
@@ -31109,50 +31667,50 @@ printf "%s\n" "found" >&6; }
 
 
   if test "$PKGCONFIG" != "no" ; then
-    LIB_NGTCP2_CRYPTO_OPENSSL=`
+    LIB_NGTCP2_CRYPTO_GNUTLS=`
     if test -n "$want_tcp2_path"; then
       PKG_CONFIG_LIBDIR="$want_tcp2_path"
       export PKG_CONFIG_LIBDIR
     fi
 
-      $PKGCONFIG --libs-only-l libngtcp2_crypto_openssl`
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_NGTCP2_CRYPTO_OPENSSL" >&5
-printf "%s\n" "$as_me: -l is $LIB_NGTCP2_CRYPTO_OPENSSL" >&6;}
+      $PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls`
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_NGTCP2_CRYPTO_GNUTLS" >&5
+printf "%s\n" "$as_me: -l is $LIB_NGTCP2_CRYPTO_GNUTLS" >&6;}
 
-    CPP_NGTCP2_CRYPTO_OPENSSL=`
+    CPP_NGTCP2_CRYPTO_GNUTLS=`
     if test -n "$want_tcp2_path"; then
       PKG_CONFIG_LIBDIR="$want_tcp2_path"
       export PKG_CONFIG_LIBDIR
     fi
-       $PKGCONFIG --cflags-only-I libngtcp2_crypto_openssl`
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_NGTCP2_CRYPTO_OPENSSL" >&5
-printf "%s\n" "$as_me: -I is $CPP_NGTCP2_CRYPTO_OPENSSL" >&6;}
+       $PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls`
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_NGTCP2_CRYPTO_GNUTLS" >&5
+printf "%s\n" "$as_me: -I is $CPP_NGTCP2_CRYPTO_GNUTLS" >&6;}
 
-    LD_NGTCP2_CRYPTO_OPENSSL=`
+    LD_NGTCP2_CRYPTO_GNUTLS=`
     if test -n "$want_tcp2_path"; then
       PKG_CONFIG_LIBDIR="$want_tcp2_path"
       export PKG_CONFIG_LIBDIR
     fi
 
-      $PKGCONFIG --libs-only-L libngtcp2_crypto_openssl`
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_NGTCP2_CRYPTO_OPENSSL" >&5
-printf "%s\n" "$as_me: -L is $LD_NGTCP2_CRYPTO_OPENSSL" >&6;}
+      $PKGCONFIG --libs-only-L libngtcp2_crypto_gnutls`
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_NGTCP2_CRYPTO_GNUTLS" >&5
+printf "%s\n" "$as_me: -L is $LD_NGTCP2_CRYPTO_GNUTLS" >&6;}
 
-    LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_OPENSSL"
-    CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_OPENSSL"
-    LIBS="$LIB_NGTCP2_CRYPTO_OPENSSL $LIBS"
+    LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_GNUTLS"
+    CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_GNUTLS"
+    LIBS="$LIB_NGTCP2_CRYPTO_GNUTLS $LIBS"
 
     if test "x$cross_compiling" != "xyes"; then
-      DIR_NGTCP2_CRYPTO_OPENSSL=`echo $LD_NGTCP2_CRYPTO_OPENSSL | $SED -e 's/^-L//'`
+      DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/^-L//'`
     fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_openssl" >&5
-printf %s "checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_openssl... " >&6; }
-if test ${ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial+y}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_recv_client_initial_cb in -lngtcp2_crypto_gnutls" >&5
+printf %s "checking for ngtcp2_crypto_recv_client_initial_cb in -lngtcp2_crypto_gnutls... " >&6; }
+if test ${ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_recv_client_initial_cb+y}
 then :
   printf %s "(cached) " >&6
 else $as_nop
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lngtcp2_crypto_openssl  $LIBS"
+LIBS="-lngtcp2_crypto_gnutls  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31160,27 +31718,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ngtcp2_crypto_ctx_initial ();
+char ngtcp2_crypto_recv_client_initial_cb ();
 int main (void)
 {
-return ngtcp2_crypto_ctx_initial ();
+return ngtcp2_crypto_recv_client_initial_cb ();
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial=yes
+  ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_recv_client_initial_cb=yes
 else $as_nop
-  ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial=no
+  ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_recv_client_initial_cb=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial" >&5
-printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial" >&6; }
-if test "x$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_recv_client_initial_cb" >&5
+printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_recv_client_initial_cb" >&6; }
+if test "x$ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_recv_client_initial_cb" = xyes
 then :
 
               for ac_header in ngtcp2/ngtcp2_crypto.h
@@ -31191,14 +31749,14 @@ then :
   printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_H 1" >>confdefs.h
  NGTCP2_ENABLED=1
 
-printf "%s\n" "#define USE_NGTCP2_CRYPTO_OPENSSL 1" >>confdefs.h
+printf "%s\n" "#define USE_NGTCP2_CRYPTO_GNUTLS 1" >>confdefs.h
 
-          USE_NGTCP2_CRYPTO_OPENSSL=1
+          USE_NGTCP2_CRYPTO_GNUTLS=1
 
-          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_OPENSSL"
+          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS"
           export CURL_LIBRARY_PATH
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_NGTCP2_CRYPTO_OPENSSL to CURL_LIBRARY_PATH" >&5
-printf "%s\n" "$as_me: Added $DIR_NGTCP2_CRYPTO_OPENSSL to CURL_LIBRARY_PATH" >&6;}
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH" >&5
+printf "%s\n" "$as_me: Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH" >&6;}
 
 fi
 
 
   else
         if test X"$want_tcp2" != Xdefault; then
-                  as_fn_error $? "--with-ngtcp2 was specified but could not find ngtcp2_crypto_openssl pkg-config file." "$LINENO" 5
+                  as_fn_error $? "--with-ngtcp2 was specified but could not find ngtcp2_crypto_gnutls pkg-config file." "$LINENO" 5
     fi
   fi
 fi
 
-if test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then
+if test "x$NGTCP2_ENABLED" = "x1" -a "x$WOLFSSL_ENABLED" = "x1"; then
     CLEANLDFLAGS="$LDFLAGS"
   CLEANCPPFLAGS="$CPPFLAGS"
   CLEANLIBS="$LIBS"
     fi
 
     if test "x$PKGCONFIG" != "xno"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2_crypto_gnutls options with pkg-config" >&5
-printf %s "checking for libngtcp2_crypto_gnutls options with pkg-config... " >&6; }
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2_crypto_wolfssl options with pkg-config" >&5
+printf %s "checking for libngtcp2_crypto_wolfssl options with pkg-config... " >&6; }
             itexists=`
     if test -n "$want_tcp2_path"; then
       PKG_CONFIG_LIBDIR="$want_tcp2_path"
       export PKG_CONFIG_LIBDIR
     fi
-         $PKGCONFIG --exists libngtcp2_crypto_gnutls >/dev/null 2>&1 && echo 1`
+         $PKGCONFIG --exists libngtcp2_crypto_wolfssl >/dev/null 2>&1 && echo 1`
 
       if test -z "$itexists"; then
                         PKGCONFIG="no"
@@ -31362,50 +31920,50 @@ printf "%s\n" "found" >&6; }
 
 
   if test "$PKGCONFIG" != "no" ; then
-    LIB_NGTCP2_CRYPTO_GNUTLS=`
+    LIB_NGTCP2_CRYPTO_WOLFSSL=`
     if test -n "$want_tcp2_path"; then
       PKG_CONFIG_LIBDIR="$want_tcp2_path"
       export PKG_CONFIG_LIBDIR
     fi
 
-      $PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls`
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_NGTCP2_CRYPTO_GNUTLS" >&5
-printf "%s\n" "$as_me: -l is $LIB_NGTCP2_CRYPTO_GNUTLS" >&6;}
+      $PKGCONFIG --libs-only-l libngtcp2_crypto_wolfssl`
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_NGTCP2_CRYPTO_WOLFSSL" >&5
+printf "%s\n" "$as_me: -l is $LIB_NGTCP2_CRYPTO_WOLFSSL" >&6;}
 
-    CPP_NGTCP2_CRYPTO_GNUTLS=`
+    CPP_NGTCP2_CRYPTO_WOLFSSL=`
     if test -n "$want_tcp2_path"; then
       PKG_CONFIG_LIBDIR="$want_tcp2_path"
       export PKG_CONFIG_LIBDIR
     fi
-       $PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls`
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_NGTCP2_CRYPTO_GNUTLS" >&5
-printf "%s\n" "$as_me: -I is $CPP_NGTCP2_CRYPTO_GNUTLS" >&6;}
+       $PKGCONFIG --cflags-only-I libngtcp2_crypto_wolfssl`
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_NGTCP2_CRYPTO_WOLFSSL" >&5
+printf "%s\n" "$as_me: -I is $CPP_NGTCP2_CRYPTO_WOLFSSL" >&6;}
 
-    LD_NGTCP2_CRYPTO_GNUTLS=`
+    LD_NGTCP2_CRYPTO_WOLFSSL=`
     if test -n "$want_tcp2_path"; then
       PKG_CONFIG_LIBDIR="$want_tcp2_path"
       export PKG_CONFIG_LIBDIR
     fi
 
-      $PKGCONFIG --libs-only-L libngtcp2_crypto_gnutls`
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_NGTCP2_CRYPTO_GNUTLS" >&5
-printf "%s\n" "$as_me: -L is $LD_NGTCP2_CRYPTO_GNUTLS" >&6;}
+      $PKGCONFIG --libs-only-L libngtcp2_crypto_wolfssl`
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_NGTCP2_CRYPTO_WOLFSSL" >&5
+printf "%s\n" "$as_me: -L is $LD_NGTCP2_CRYPTO_WOLFSSL" >&6;}
 
-    LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_GNUTLS"
-    CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_GNUTLS"
-    LIBS="$LIB_NGTCP2_CRYPTO_GNUTLS $LIBS"
+    LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_WOLFSSL"
+    CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_WOLFSSL"
+    LIBS="$LIB_NGTCP2_CRYPTO_WOLFSSL $LIBS"
 
     if test "x$cross_compiling" != "xyes"; then
-      DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/^-L//'`
+      DIR_NGTCP2_CRYPTO_WOLFSSL=`echo $LD_NGTCP2_CRYPTO_WOLFSSL | $SED -e 's/^-L//'`
     fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_gnutls" >&5
-printf %s "checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_gnutls... " >&6; }
-if test ${ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial+y}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_recv_client_initial_cb in -lngtcp2_crypto_wolfssl" >&5
+printf %s "checking for ngtcp2_crypto_recv_client_initial_cb in -lngtcp2_crypto_wolfssl... " >&6; }
+if test ${ac_cv_lib_ngtcp2_crypto_wolfssl_ngtcp2_crypto_recv_client_initial_cb+y}
 then :
   printf %s "(cached) " >&6
 else $as_nop
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lngtcp2_crypto_gnutls  $LIBS"
+LIBS="-lngtcp2_crypto_wolfssl  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31413,27 +31971,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ngtcp2_crypto_ctx_initial ();
+char ngtcp2_crypto_recv_client_initial_cb ();
 int main (void)
 {
-return ngtcp2_crypto_ctx_initial ();
+return ngtcp2_crypto_recv_client_initial_cb ();
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial=yes
+  ac_cv_lib_ngtcp2_crypto_wolfssl_ngtcp2_crypto_recv_client_initial_cb=yes
 else $as_nop
-  ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial=no
+  ac_cv_lib_ngtcp2_crypto_wolfssl_ngtcp2_crypto_recv_client_initial_cb=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial" >&5
-printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial" >&6; }
-if test "x$ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_wolfssl_ngtcp2_crypto_recv_client_initial_cb" >&5
+printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_wolfssl_ngtcp2_crypto_recv_client_initial_cb" >&6; }
+if test "x$ac_cv_lib_ngtcp2_crypto_wolfssl_ngtcp2_crypto_recv_client_initial_cb" = xyes
 then :
 
               for ac_header in ngtcp2/ngtcp2_crypto.h
@@ -31444,14 +32002,14 @@ then :
   printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_H 1" >>confdefs.h
  NGTCP2_ENABLED=1
 
-printf "%s\n" "#define USE_NGTCP2_CRYPTO_GNUTLS 1" >>confdefs.h
+printf "%s\n" "#define USE_NGTCP2_CRYPTO_WOLFSSL 1" >>confdefs.h
 
-          USE_NGTCP2_CRYPTO_GNUTLS=1
+          USE_NGTCP2_CRYPTO_WOLFSSL=1
 
-          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS"
+          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_WOLFSSL"
           export CURL_LIBRARY_PATH
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH" >&5
-printf "%s\n" "$as_me: Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH" >&6;}
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_NGTCP2_CRYPTO_WOLFSSL to CURL_LIBRARY_PATH" >&5
+printf "%s\n" "$as_me: Added $DIR_NGTCP2_CRYPTO_WOLFSSL to CURL_LIBRARY_PATH" >&6;}
 
 fi
 
@@ -31467,7 +32025,7 @@ fi
 
   else
         if test X"$want_tcp2" != Xdefault; then
-                  as_fn_error $? "--with-ngtcp2 was specified but could not find ngtcp2_crypto_gnutls pkg-config file." "$LINENO" 5
+                  as_fn_error $? "--with-ngtcp2 was specified but could not find ngtcp2_crypto_wolfssl pkg-config file." "$LINENO" 5
     fi
   fi
 fi
@@ -31736,7 +32294,6 @@ printf "%s\n" "#define USE_NGHTTP3 1" >>confdefs.h
           export CURL_LIBRARY_PATH
           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH" >&5
 printf "%s\n" "$as_me: Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH" >&6;}
-          experimental="$experimental HTTP3"
 
 fi
 
@@ -31971,9 +32528,9 @@ printf "%s\n" "$as_me: -L is $LD_QUICHE" >&6;}
     if test "x$cross_compiling" != "xyes"; then
       DIR_QUICHE=`echo $LD_QUICHE | $SED -e 's/^-L//'`
     fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for quiche_connect in -lquiche" >&5
-printf %s "checking for quiche_connect in -lquiche... " >&6; }
-if test ${ac_cv_lib_quiche_quiche_connect+y}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for quiche_conn_send_ack_eliciting in -lquiche" >&5
+printf %s "checking for quiche_conn_send_ack_eliciting in -lquiche... " >&6; }
+if test ${ac_cv_lib_quiche_quiche_conn_send_ack_eliciting+y}
 then :
   printf %s "(cached) " >&6
 else $as_nop
@@ -31986,27 +32543,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char quiche_connect ();
+char quiche_conn_send_ack_eliciting ();
 int main (void)
 {
-return quiche_connect ();
+return quiche_conn_send_ack_eliciting ();
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  ac_cv_lib_quiche_quiche_connect=yes
+  ac_cv_lib_quiche_quiche_conn_send_ack_eliciting=yes
 else $as_nop
-  ac_cv_lib_quiche_quiche_connect=no
+  ac_cv_lib_quiche_quiche_conn_send_ack_eliciting=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_quiche_quiche_connect" >&5
-printf "%s\n" "$ac_cv_lib_quiche_quiche_connect" >&6; }
-if test "x$ac_cv_lib_quiche_quiche_connect" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_quiche_quiche_conn_send_ack_eliciting" >&5
+printf "%s\n" "$ac_cv_lib_quiche_quiche_conn_send_ack_eliciting" >&6; }
+if test "x$ac_cv_lib_quiche_quiche_conn_send_ack_eliciting" = xyes
 then :
 
               for ac_header in quiche.h
 fi
 
 
+OPT_MSH3="no"
+
+if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
+  # without HTTP or with ngtcp2, msh3 is no use
+  OPT_MSH3="no"
+fi
+
+
+# Check whether --with-msh3 was given.
+if test ${with_msh3+y}
+then :
+  withval=$with_msh3; OPT_MSH3=$withval
+fi
+
+case "$OPT_MSH3" in
+  no)
+        want_msh3="no"
+    ;;
+  yes)
+        want_msh3="default"
+    want_msh3_path=""
+    ;;
+  *)
+        want_msh3="yes"
+    want_msh3_path="$withval"
+    ;;
+esac
+
+if test X"$want_msh3" != Xno; then
+
+  if test "$NGHTTP3_ENABLED" = 1; then
+    as_fn_error $? "--with-msh3 and --with-ngtcp2 are mutually exclusive" "$LINENO" 5
+  fi
+
+    CLEANLDFLAGS="$LDFLAGS"
+  CLEANCPPFLAGS="$CPPFLAGS"
+  CLEANLIBS="$LIBS"
+
+  if test -n "$want_msh3_path"; then
+    LD_MSH3="-L$want_msh3_path/lib"
+    CPP_MSH3="-I$want_msh3_path/include"
+    DIR_MSH3="$want_msh3_path/lib"
+    LDFLAGS="$LDFLAGS $LD_MSH3"
+    CPPFLAGS="$CPPFLAGS $CPP_MSH3"
+  fi
+  LIBS="-lmsh3 $LIBS"
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MsH3ApiOpen in -lmsh3" >&5
+printf %s "checking for MsH3ApiOpen in -lmsh3... " >&6; }
+if test ${ac_cv_lib_msh3_MsH3ApiOpen+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmsh3  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char MsH3ApiOpen ();
+int main (void)
+{
+return MsH3ApiOpen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_msh3_MsH3ApiOpen=yes
+else $as_nop
+  ac_cv_lib_msh3_MsH3ApiOpen=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_msh3_MsH3ApiOpen" >&5
+printf "%s\n" "$ac_cv_lib_msh3_MsH3ApiOpen" >&6; }
+if test "x$ac_cv_lib_msh3_MsH3ApiOpen" = xyes
+then :
+
+           for ac_header in msh3.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "msh3.h" "ac_cv_header_msh3_h" "$ac_includes_default"
+if test "x$ac_cv_header_msh3_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_MSH3_H 1" >>confdefs.h
+ curl_h3_msg="enabled (msh3)"
+        MSH3_ENABLED=1
+
+printf "%s\n" "#define USE_MSH3 1" >>confdefs.h
+
+        USE_MSH3=1
+
+        CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_MSH3"
+        export CURL_LIBRARY_PATH
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_MSH3 to CURL_LIBRARY_PATH" >&5
+printf "%s\n" "$as_me: Added $DIR_MSH3 to CURL_LIBRARY_PATH" >&6;}
+else $as_nop
+  experimental="$experimental HTTP3"
+
+fi
+
+done
+
+else $as_nop
+        LDFLAGS=$CLEANLDFLAGS
+      CPPFLAGS=$CLEANCPPFLAGS
+      LIBS=$CLEANLIBS
+
+fi
+
+fi
+
+
 OPT_ZSH_FPATH=default
 
 # Check whether --with-zsh-functions-dir was given.
@@ -32241,181 +32917,6 @@ printf "%s\n" "found" >&6; }
     ;;
 esac
 
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for malloc.h" >&5
-printf %s "checking for malloc.h... " >&6; }
-if test ${curl_cv_header_malloc_h+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#include <malloc.h>
-
-int main (void)
-{
-
-        void *p = malloc(10);
-        void *q = calloc(10,10);
-        free(p);
-        free(q);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      curl_cv_header_malloc_h="yes"
-
-else $as_nop
-
-      curl_cv_header_malloc_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_malloc_h" >&5
-printf "%s\n" "$curl_cv_header_malloc_h" >&6; }
-  if test "$curl_cv_header_malloc_h" = "yes"; then
-
-printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h
-
-    #
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#include <stdlib.h>
-
-int main (void)
-{
-
-        void *p = malloc(10);
-        void *q = calloc(10,10);
-        free(p);
-        free(q);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      curl_cv_need_header_malloc_h="no"
-
-else $as_nop
-
-      curl_cv_need_header_malloc_h="yes"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-    #
-    case "$curl_cv_need_header_malloc_h" in
-      yes)
-
-printf "%s\n" "#define NEED_MALLOC_H 1" >>confdefs.h
-
-        ;;
-    esac
-  fi
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for memory.h" >&5
-printf %s "checking for memory.h... " >&6; }
-if test ${curl_cv_header_memory_h+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#include <memory.h>
-
-int main (void)
-{
-
-        void *p = malloc(10);
-        void *q = calloc(10,10);
-        free(p);
-        free(q);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      curl_cv_header_memory_h="yes"
-
-else $as_nop
-
-      curl_cv_header_memory_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_memory_h" >&5
-printf "%s\n" "$curl_cv_header_memory_h" >&6; }
-  if test "$curl_cv_header_memory_h" = "yes"; then
-
-printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h
-
-    #
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#include <stdlib.h>
-
-int main (void)
-{
-
-        void *p = malloc(10);
-        void *q = calloc(10,10);
-        free(p);
-        free(q);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      curl_cv_need_header_memory_h="no"
-
-else $as_nop
-
-      curl_cv_need_header_memory_h="yes"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-    #
-    case "$curl_cv_need_header_memory_h" in
-      yes)
-
-printf "%s\n" "#define NEED_MEMORY_H 1" >>confdefs.h
-
-        ;;
-    esac
-  fi
-
-
 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -32576,70 +33077,6 @@ then :
   printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#elif defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETINET_IN6_H
-#include <netinet/in6.h>
-#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-
-
-"
-if test "x$ac_cv_header_sys_uio_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
-
-fi
-ac_fn_c_check_header_compile "$LINENO" "assert.h" "ac_cv_header_assert_h" "
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#elif defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETINET_IN6_H
-#include <netinet/in6.h>
-#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-
-
-"
-if test "x$ac_cv_header_assert_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_ASSERT_H 1" >>confdefs.h
-
-fi
 ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -32928,7 +33365,7 @@ then :
   printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "
+ac_fn_c_check_header_compile "$LINENO" "netinet/udp.h" "ac_cv_header_netinet_udp_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -32955,12 +33392,12 @@ ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "
 
 
 "
-if test "x$ac_cv_header_netdb_h" = xyes
+if test "x$ac_cv_header_netinet_udp_h" = xyes
 then :
-  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
+  printf "%s\n" "#define HAVE_NETINET_UDP_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "
+ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -32987,12 +33424,12 @@ ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h
 
 
 "
-if test "x$ac_cv_header_sys_sockio_h" = xyes
+if test "x$ac_cv_header_netdb_h" = xyes
 then :
-  printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h
+  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "
+ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -33019,12 +33456,12 @@ ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "
 
 
 "
-if test "x$ac_cv_header_sys_stat_h" = xyes
+if test "x$ac_cv_header_sys_sockio_h" = xyes
 then :
-  printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
+  printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "
+ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -33051,12 +33488,12 @@ ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h"
 
 
 "
-if test "x$ac_cv_header_sys_param_h" = xyes
+if test "x$ac_cv_header_sys_stat_h" = xyes
 then :
-  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
+  printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "
+ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -33083,12 +33520,12 @@ ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "
 
 
 "
-if test "x$ac_cv_header_termios_h" = xyes
+if test "x$ac_cv_header_sys_param_h" = xyes
 then :
-  printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
+  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "
+ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -33115,12 +33552,12 @@ ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "
 
 
 "
-if test "x$ac_cv_header_termio_h" = xyes
+if test "x$ac_cv_header_termios_h" = xyes
 then :
-  printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
+  printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "
+ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -33147,12 +33584,12 @@ ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "
 
 
 "
-if test "x$ac_cv_header_fcntl_h" = xyes
+if test "x$ac_cv_header_termio_h" = xyes
 then :
-  printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
+  printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "
+ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -33179,9 +33616,9 @@ ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "
 
 
 "
-if test "x$ac_cv_header_alloca_h" = xyes
+if test "x$ac_cv_header_fcntl_h" = xyes
 then :
-  printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
+  printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
 
 fi
 ac_fn_c_check_header_compile "$LINENO" "io.h" "ac_cv_header_io_h" "
@@ -33504,38 +33941,6 @@ then :
   printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#elif defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETINET_IN6_H
-#include <netinet/in6.h>
-#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-
-
-"
-if test "x$ac_cv_header_errno_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
-
-fi
 ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -33568,38 +33973,6 @@ then :
   printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "arpa/tftp.h" "ac_cv_header_arpa_tftp_h" "
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#elif defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETINET_IN6_H
-#include <netinet/in6.h>
-#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-
-
-"
-if test "x$ac_cv_header_arpa_tftp_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_ARPA_TFTP_H 1" >>confdefs.h
-
-fi
 ac_fn_c_check_header_compile "$LINENO" "sys/filio.h" "ac_cv_header_sys_filio_h" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -33781,114 +34154,6 @@ printf "%s\n" "#define const /**/" >>confdefs.h
 
 fi
 
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler support of C99 variadic macro style" >&5
-printf %s "checking for compiler support of C99 variadic macro style... " >&6; }
-if test ${curl_cv_variadic_macros_c99+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define c99_vmacro3(first, ...) fun3(first, __VA_ARGS__)
-#define c99_vmacro2(first, ...) fun2(first, __VA_ARGS__)
-        int fun3(int arg1, int arg2, int arg3);
-        int fun2(int arg1, int arg2);
-        int fun3(int arg1, int arg2, int arg3)
-        { return arg1 + arg2 + arg3; }
-        int fun2(int arg1, int arg2)
-        { return arg1 + arg2; }
-
-int main (void)
-{
-
-        int res3 = c99_vmacro3(1, 2, 3);
-        int res2 = c99_vmacro2(1, 2);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      curl_cv_variadic_macros_c99="yes"
-
-else $as_nop
-
-      curl_cv_variadic_macros_c99="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_variadic_macros_c99" >&5
-printf "%s\n" "$curl_cv_variadic_macros_c99" >&6; }
-  case "$curl_cv_variadic_macros_c99" in
-    yes)
-
-printf "%s\n" "#define HAVE_VARIADIC_MACROS_C99 1" >>confdefs.h
-
-      ;;
-  esac
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler support of old gcc variadic macro style" >&5
-printf %s "checking for compiler support of old gcc variadic macro style... " >&6; }
-if test ${curl_cv_variadic_macros_gcc+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define gcc_vmacro3(first, args...) fun3(first, args)
-#define gcc_vmacro2(first, args...) fun2(first, args)
-        int fun3(int arg1, int arg2, int arg3);
-        int fun2(int arg1, int arg2);
-        int fun3(int arg1, int arg2, int arg3)
-        { return arg1 + arg2 + arg3; }
-        int fun2(int arg1, int arg2)
-        { return arg1 + arg2; }
-
-int main (void)
-{
-
-        int res3 = gcc_vmacro3(1, 2, 3);
-        int res2 = gcc_vmacro2(1, 2);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      curl_cv_variadic_macros_gcc="yes"
-
-else $as_nop
-
-      curl_cv_variadic_macros_gcc="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_variadic_macros_gcc" >&5
-printf "%s\n" "$curl_cv_variadic_macros_gcc" >&6; }
-  case "$curl_cv_variadic_macros_gcc" in
-    yes)
-
-printf "%s\n" "#define HAVE_VARIADIC_MACROS_GCC 1" >>confdefs.h
-
-      ;;
-  esac
-
 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
 if test "x$ac_cv_type_size_t" = xyes
 then :
@@ -33936,10 +34201,10 @@ else $as_nop
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
-#include <windows.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
+#include <windows.h>
 #endif
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -33995,15 +34260,45 @@ printf "%s\n" "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
 printf %s "checking run-time libs availability... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int main()
+{
+  return 0;
+}
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: fine" >&5
+printf "%s\n" "fine" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+    as_fn_error $? "one or more libs available at link-time are not available run-time. Libs used at link-time: $LIBS" "$LINENO" 5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -34033,20 +34328,22 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
 
       fi
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
 printf %s "checking size of size_t... " >&6; }
-if test ${ac_cv_sizeof_size_t+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  r=0
+    for typesize in 8 4 2 16 1; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -34054,38 +34351,48 @@ else $as_nop
 
 int main (void)
 {
-switch (0) case 0: case (sizeof (size_t) == $ac_size):;
+switch(0) {
+       case 0:
+       case (sizeof(size_t) == $typesize):;
+     }
+
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_sizeof_size_t=$ac_size
+
+       r=$typesize
+else $as_nop
+
+       r=0
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  if test x$ac_cv_sizeof_size_t != x ; then break; fi
-done
+        if test $r -gt 0; then
+      break;
+    fi
+  done
+  if test $r -eq 0; then
+    as_fn_error $? "Failed to find size of size_t" "$LINENO" 5
+  fi
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r" >&5
+printf "%s\n" "$r" >&6; }
+    tname=$(echo "ac_cv_sizeof_size_t" | tr A-Z a-z | tr " " "_")
+  eval "$tname=$r"
+
+
+printf "%s\n" "#define SIZEOF_SIZE_T $r" >>confdefs.h
 
-fi
 
-if test x$ac_cv_sizeof_size_t = x ; then
-  as_fn_error $? "cannot determine a size for size_t" "$LINENO" 5
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
-printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
 
-printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
 printf %s "checking size of long... " >&6; }
-if test ${ac_cv_sizeof_long+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  r=0
+    for typesize in 8 4 2 16 1; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -34093,38 +34400,48 @@ else $as_nop
 
 int main (void)
 {
-switch (0) case 0: case (sizeof (long) == $ac_size):;
+switch(0) {
+       case 0:
+       case (sizeof(long) == $typesize):;
+     }
+
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_sizeof_long=$ac_size
+
+       r=$typesize
+else $as_nop
+
+       r=0
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  if test x$ac_cv_sizeof_long != x ; then break; fi
-done
+        if test $r -gt 0; then
+      break;
+    fi
+  done
+  if test $r -eq 0; then
+    as_fn_error $? "Failed to find size of long" "$LINENO" 5
+  fi
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r" >&5
+printf "%s\n" "$r" >&6; }
+    tname=$(echo "ac_cv_sizeof_long" | tr A-Z a-z | tr " " "_")
+  eval "$tname=$r"
 
-fi
 
-if test x$ac_cv_sizeof_long = x ; then
-  as_fn_error $? "cannot determine a size for long" "$LINENO" 5
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-printf "%s\n" "$ac_cv_sizeof_long" >&6; }
+printf "%s\n" "#define SIZEOF_LONG $r" >>confdefs.h
 
-printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
 printf %s "checking size of int... " >&6; }
-if test ${ac_cv_sizeof_int+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  r=0
+    for typesize in 8 4 2 16 1; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -34132,38 +34449,48 @@ else $as_nop
 
 int main (void)
 {
-switch (0) case 0: case (sizeof (int) == $ac_size):;
+switch(0) {
+       case 0:
+       case (sizeof(int) == $typesize):;
+     }
+
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_sizeof_int=$ac_size
+
+       r=$typesize
+else $as_nop
+
+       r=0
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  if test x$ac_cv_sizeof_int != x ; then break; fi
-done
+        if test $r -gt 0; then
+      break;
+    fi
+  done
+  if test $r -eq 0; then
+    as_fn_error $? "Failed to find size of int" "$LINENO" 5
+  fi
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r" >&5
+printf "%s\n" "$r" >&6; }
+    tname=$(echo "ac_cv_sizeof_int" | tr A-Z a-z | tr " " "_")
+  eval "$tname=$r"
 
-fi
 
-if test x$ac_cv_sizeof_int = x ; then
-  as_fn_error $? "cannot determine a size for int" "$LINENO" 5
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-printf "%s\n" "$ac_cv_sizeof_int" >&6; }
+printf "%s\n" "#define SIZEOF_INT $r" >>confdefs.h
 
-printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-printf %s "checking size of short... " >&6; }
-if test ${ac_cv_sizeof_short+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+printf %s "checking size of time_t... " >&6; }
+  r=0
+    for typesize in 8 4 2 16 1; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -34171,38 +34498,48 @@ else $as_nop
 
 int main (void)
 {
-switch (0) case 0: case (sizeof (short) == $ac_size):;
+switch(0) {
+       case 0:
+       case (sizeof(time_t) == $typesize):;
+     }
+
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_sizeof_short=$ac_size
+
+       r=$typesize
+else $as_nop
+
+       r=0
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  if test x$ac_cv_sizeof_short != x ; then break; fi
-done
+        if test $r -gt 0; then
+      break;
+    fi
+  done
+  if test $r -eq 0; then
+    as_fn_error $? "Failed to find size of time_t" "$LINENO" 5
+  fi
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r" >&5
+printf "%s\n" "$r" >&6; }
+    tname=$(echo "ac_cv_sizeof_time_t" | tr A-Z a-z | tr " " "_")
+  eval "$tname=$r"
 
-fi
 
-if test x$ac_cv_sizeof_short = x ; then
-  as_fn_error $? "cannot determine a size for short" "$LINENO" 5
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-printf "%s\n" "$ac_cv_sizeof_short" >&6; }
+printf "%s\n" "#define SIZEOF_TIME_T $r" >>confdefs.h
 
-printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
-printf %s "checking size of time_t... " >&6; }
-if test ${ac_cv_sizeof_time_t+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
+printf %s "checking size of off_t... " >&6; }
+  r=0
+    for typesize in 8 4 2 16 1; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -34210,111 +34547,144 @@ else $as_nop
 
 int main (void)
 {
-switch (0) case 0: case (sizeof (time_t) == $ac_size):;
+switch(0) {
+       case 0:
+       case (sizeof(off_t) == $typesize):;
+     }
+
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_sizeof_time_t=$ac_size
+
+       r=$typesize
+else $as_nop
+
+       r=0
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  if test x$ac_cv_sizeof_time_t != x ; then break; fi
-done
+        if test $r -gt 0; then
+      break;
+    fi
+  done
+  if test $r -eq 0; then
+    as_fn_error $? "Failed to find size of off_t" "$LINENO" 5
+  fi
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r" >&5
+printf "%s\n" "$r" >&6; }
+    tname=$(echo "ac_cv_sizeof_off_t" | tr A-Z a-z | tr " " "_")
+  eval "$tname=$r"
 
-fi
 
-if test x$ac_cv_sizeof_time_t = x ; then
-  as_fn_error $? "cannot determine a size for time_t" "$LINENO" 5
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
-printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
+printf "%s\n" "#define SIZEOF_OFF_T $r" >>confdefs.h
 
-printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
-printf %s "checking size of off_t... " >&6; }
-if test ${ac_cv_sizeof_off_t+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+o=$CPPFLAGS
+CPPFLAGS="-I$srcdir/include $CPPFLAGS"
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of curl_off_t" >&5
+printf %s "checking size of curl_off_t... " >&6; }
+  r=0
+    for typesize in 8 4 2 16 1; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
 
+#include <curl/system.h>
+
 
 int main (void)
 {
-switch (0) case 0: case (sizeof (off_t) == $ac_size):;
+switch(0) {
+       case 0:
+       case (sizeof(curl_off_t) == $typesize):;
+     }
+
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_sizeof_off_t=$ac_size
+
+       r=$typesize
+else $as_nop
+
+       r=0
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  if test x$ac_cv_sizeof_off_t != x ; then break; fi
-done
+        if test $r -gt 0; then
+      break;
+    fi
+  done
+  if test $r -eq 0; then
+    as_fn_error $? "Failed to find size of curl_off_t" "$LINENO" 5
+  fi
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r" >&5
+printf "%s\n" "$r" >&6; }
+    tname=$(echo "ac_cv_sizeof_curl_off_t" | tr A-Z a-z | tr " " "_")
+  eval "$tname=$r"
 
-fi
 
-if test x$ac_cv_sizeof_off_t = x ; then
-  as_fn_error $? "cannot determine a size for off_t" "$LINENO" 5
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
-printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
+printf "%s\n" "#define SIZEOF_CURL_OFF_T $r" >>confdefs.h
 
-printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
 
 
 
-o=$CPPFLAGS
-CPPFLAGS="-I$srcdir/include $CPPFLAGS"
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of curl_off_t" >&5
-printf %s "checking size of curl_off_t... " >&6; }
-if test ${ac_cv_sizeof_curl_off_t+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of curl_socket_t" >&5
+printf %s "checking size of curl_socket_t... " >&6; }
+  r=0
+    for typesize in 8 4 2 16 1; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
 
-#include <curl/system.h>
+#include <curl/curl.h>
 
 
 int main (void)
 {
-switch (0) case 0: case (sizeof (curl_off_t) == $ac_size):;
+switch(0) {
+       case 0:
+       case (sizeof(curl_socket_t) == $typesize):;
+     }
+
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_sizeof_curl_off_t=$ac_size
+
+       r=$typesize
+else $as_nop
+
+       r=0
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  if test x$ac_cv_sizeof_curl_off_t != x ; then break; fi
-done
+        if test $r -gt 0; then
+      break;
+    fi
+  done
+  if test $r -eq 0; then
+    as_fn_error $? "Failed to find size of curl_socket_t" "$LINENO" 5
+  fi
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r" >&5
+printf "%s\n" "$r" >&6; }
+    tname=$(echo "ac_cv_sizeof_curl_socket_t" | tr A-Z a-z | tr " " "_")
+  eval "$tname=$r"
 
-fi
 
-if test x$ac_cv_sizeof_curl_off_t = x ; then
-  as_fn_error $? "cannot determine a size for curl_off_t" "$LINENO" 5
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_curl_off_t" >&5
-printf "%s\n" "$ac_cv_sizeof_curl_off_t" >&6; }
+printf "%s\n" "#define SIZEOF_CURL_SOCKET_T $r" >>confdefs.h
 
-printf "%s\n" "#define SIZEOF_CURL_OFF_T $ac_cv_sizeof_curl_off_t" >>confdefs.h
 
 
 CPPFLAGS=$o
@@ -34330,43 +34700,10 @@ printf "%s\n" "#define HAVE_LONGLONG 1" >>confdefs.h
 fi
 
 
-if test "xyes" = "x$longlong"; then
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if numberLL works" >&5
-printf %s "checking if numberLL works... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-
-int main (void)
-{
-
-      long long val = 1000LL;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-printf "%s\n" "#define HAVE_LL 1" >>confdefs.h
-
-
-else $as_nop
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+if test ${ac_cv_sizeof_curl_off_t} -lt 8; then
+  as_fn_error $? "64 bit curl_off_t is required" "$LINENO" 5
 fi
 
-
 # check for ssize_t
 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
 if test "x$ac_cv_type_ssize_t" = xyes
 printf %s "checking if time_t is unsigned... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+  #include <time.h>
+  #include <limits.h>
+  int main(void) {
+    time_t t = -1;
+    return (t < 0);
+  }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_TIME_T_UNSIGNED 1" >>confdefs.h
+
+
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
@@ -34478,8 +34849,10 @@ else $as_nop
 
   #include <time.h>
   #include <limits.h>
-  time_t t = -1;
-  return (t > 0);
+  int main(void) {
+    time_t t = -1;
+    return (t < 0);
+  }
 
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
@@ -34499,7 +34872,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
 
 
@@ -34593,10 +34969,10 @@ _EOF
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
-#include <windows.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
+#include <windows.h>
 #else
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -34637,10 +35013,10 @@ else $as_nop
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
-#include <windows.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
+#include <windows.h>
 #else
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
-#include <windows.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
+#include <windows.h>
 #else
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -34732,7 +35108,7 @@ fi
 
 
 
-    ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
+      ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
 if test "x$ac_cv_header_sys_select_h" = xyes
 then :
   printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
@@ -34757,10 +35133,10 @@ printf %s "checking for select... " >&6; }
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
-#include <windows.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
+#include <windows.h>
 #endif
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -34778,11 +35154,7 @@ printf %s "checking for select... " >&6; }
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
-#ifdef HAVE_PROTO_BSDSOCKET_H
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
-#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
-#endif
+$curl_includes_bsdsocket
 #endif
 
 int main (void)
@@ -34813,171 +35185,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   #
   if test "$curl_cv_select" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of args and return type for select" >&5
-printf %s "checking types of args and return type for select... " >&6; }
-if test ${curl_cv_func_select_args+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-      curl_cv_func_select_args="unknown"
-      for sel_retv in 'int' 'ssize_t'; do
-        for sel_arg1 in 'int' 'ssize_t' 'size_t' 'unsigned long int' 'unsigned int'; do
-          for sel_arg234 in 'fd_set *' 'int *' 'void *'; do
-            for sel_arg5 in 'struct timeval *' 'const struct timeval *'; do
-              if test "$curl_cv_func_select_args" = "unknown"; then
-                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-#define SELECTCALLCONV PASCAL
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-#ifndef HAVE_WINDOWS_H
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#elif defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_PROTO_BSDSOCKET_H
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
-#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
-#endif
-#define SELECTCALLCONV
-#endif
-#ifndef HAVE_STRUCT_TIMEVAL
-                    struct timeval {
-                      long tv_sec;
-                      long tv_usec;
-                    };
-#endif
-#ifndef HAVE_PROTO_BSDSOCKET_H
-                    extern $sel_retv SELECTCALLCONV
-                               select($sel_arg1,
-                                       $sel_arg234,
-                                       $sel_arg234,
-                                       $sel_arg234,
-                                       $sel_arg5);
-#endif
-
-int main (void)
-{
-
-                    $sel_arg1   nfds=0;
-                    $sel_arg234 rfds=0;
-                    $sel_arg234 wfds=0;
-                    $sel_arg234 efds=0;
-                    $sel_retv res = select(nfds, rfds, wfds, efds, 0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-                  curl_cv_func_select_args="$sel_arg1,$sel_arg234,$sel_arg5,$sel_retv"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-              fi
-            done
-          done
-        done
-      done
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_select_args" >&5
-printf "%s\n" "$curl_cv_func_select_args" >&6; } # AC-CACHE-CHECK
-    if test "$curl_cv_func_select_args" = "unknown"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find proper types to use for select args" >&5
-printf "%s\n" "$as_me: WARNING: Cannot find proper types to use for select args" >&2;}
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_SELECT will not be defined" >&5
-printf "%s\n" "$as_me: WARNING: HAVE_SELECT will not be defined" >&2;}
-    else
-      select_prev_IFS=$IFS; IFS=','
-      set dummy `echo "$curl_cv_func_select_args" | sed 's/\*/\*/g'`
-      IFS=$select_prev_IFS
-      shift
-      #
-      sel_qual_type_arg5=$3
-      #
-
-printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
-
-
-printf "%s\n" "#define SELECT_TYPE_ARG234 $2" >>confdefs.h
-
-
-printf "%s\n" "#define SELECT_TYPE_RETV $4" >>confdefs.h
-
-      #
-      prev_sh_opts=$-
-      #
-      case $prev_sh_opts in
-        *f*)
-          ;;
-        *)
-          set -f
-          ;;
-      esac
-      #
-      case "$sel_qual_type_arg5" in
-        const*)
-          sel_qual_arg5=const
-          sel_type_arg5=`echo $sel_qual_type_arg5 | sed 's/^const //'`
-        ;;
-        *)
-          sel_qual_arg5=
-          sel_type_arg5=$sel_qual_type_arg5
-        ;;
-      esac
-      #
-
-printf "%s\n" "#define SELECT_QUAL_ARG5 $sel_qual_arg5" >>confdefs.h
-
-
-printf "%s\n" "#define SELECT_TYPE_ARG5 $sel_type_arg5" >>confdefs.h
-
-      #
-      case $prev_sh_opts in
-        *f*)
-          ;;
-        *)
-          set +f
-          ;;
-      esac
-      #
 
 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
 
-      curl_cv_func_select="yes"
-    fi
+    curl_cv_func_select="yes"
   fi
 
 
 
-    ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
+      ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
 if test "x$ac_cv_header_sys_types_h" = xyes
 then :
   printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
@@ -35002,15 +35218,12 @@ printf %s "checking for recv... " >&6; }
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
-#include <windows.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
+#include <windows.h>
 #else
-#ifdef HAVE_PROTO_BSDSOCKET_H
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
-#endif
+$curl_includes_bsdsocket
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -35047,118 +35260,16 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   #
   if test "$curl_cv_recv" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of args and return type for recv" >&5
-printf %s "checking types of args and return type for recv... " >&6; }
-if test ${curl_cv_func_recv_args+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-      curl_cv_func_recv_args="unknown"
-      for recv_retv in 'int' 'ssize_t'; do
-        for recv_arg1 in 'int' 'ssize_t' 'SOCKET'; do
-          for recv_arg2 in 'char *' 'void *'; do
-            for recv_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
-              for recv_arg4 in 'int' 'unsigned int'; do
-                if test "$curl_cv_func_recv_args" = "unknown"; then
-                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-#define RECVCALLCONV PASCAL
-#else
-#ifdef HAVE_PROTO_BSDSOCKET_H
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#define RECVCALLCONV
-#endif
-#ifndef HAVE_PROTO_BSDSOCKET_H
-                      extern $recv_retv RECVCALLCONV
-                      recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4);
-#endif
-
-int main (void)
-{
-
-                      $recv_arg1 s=0;
-                      $recv_arg2 buf=0;
-                      $recv_arg3 len=0;
-                      $recv_arg4 flags=0;
-                      $recv_retv res = recv(s, buf, len, flags);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-                    curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-                fi
-              done
-            done
-          done
-        done
-      done
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_recv_args" >&5
-printf "%s\n" "$curl_cv_func_recv_args" >&6; } # AC-CACHE-CHECK
-    if test "$curl_cv_func_recv_args" = "unknown"; then
-      as_fn_error $? "Cannot find proper types to use for recv args" "$LINENO" 5
-    else
-      recv_prev_IFS=$IFS; IFS=','
-      set dummy `echo "$curl_cv_func_recv_args" | sed 's/\*/\*/g'`
-      IFS=$recv_prev_IFS
-      shift
-      #
-
-printf "%s\n" "#define RECV_TYPE_ARG1 $1" >>confdefs.h
-
-
-printf "%s\n" "#define RECV_TYPE_ARG2 $2" >>confdefs.h
-
-
-printf "%s\n" "#define RECV_TYPE_ARG3 $3" >>confdefs.h
-
-
-printf "%s\n" "#define RECV_TYPE_ARG4 $4" >>confdefs.h
-
-
-printf "%s\n" "#define RECV_TYPE_RETV $5" >>confdefs.h
-
-      #
 
 printf "%s\n" "#define HAVE_RECV 1" >>confdefs.h
 
       curl_cv_func_recv="yes"
-    fi
   else
     as_fn_error $? "Unable to link function recv" "$LINENO" 5
   fi
 
 
-    ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
+      ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
 if test "x$ac_cv_header_sys_types_h" = xyes
 then :
   printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
@@ -35183,15 +35294,12 @@ printf %s "checking for send... " >&6; }
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
-#include <windows.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
+#include <windows.h>
 #else
-#ifdef HAVE_PROTO_BSDSOCKET_H
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
-#endif
+$curl_includes_bsdsocket
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -35228,146 +35336,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   #
   if test "$curl_cv_send" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of args and return type for send" >&5
-printf %s "checking types of args and return type for send... " >&6; }
-if test ${curl_cv_func_send_args+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-      curl_cv_func_send_args="unknown"
-      for send_retv in 'int' 'ssize_t'; do
-        for send_arg1 in 'int' 'ssize_t' 'SOCKET'; do
-          for send_arg2 in 'char *' 'void *' 'const char *' 'const void *'; do
-            for send_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
-              for send_arg4 in 'int' 'unsigned int'; do
-                if test "$curl_cv_func_send_args" = "unknown"; then
-                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-#define SENDCALLCONV PASCAL
-#else
-#ifdef HAVE_PROTO_BSDSOCKET_H
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#define SENDCALLCONV
-#endif
-#ifndef HAVE_PROTO_BSDSOCKET_H
-                      extern $send_retv SENDCALLCONV
-                      send($send_arg1, $send_arg2, $send_arg3, $send_arg4);
-#endif
-
-int main (void)
-{
-
-                      $send_arg1 s=0;
-                      $send_arg3 len=0;
-                      $send_arg4 flags=0;
-                      $send_retv res = send(s, 0, len, flags);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-                    curl_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-                fi
-              done
-            done
-          done
-        done
-      done
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_send_args" >&5
-printf "%s\n" "$curl_cv_func_send_args" >&6; } # AC-CACHE-CHECK
-    if test "$curl_cv_func_send_args" = "unknown"; then
-      as_fn_error $? "Cannot find proper types to use for send args" "$LINENO" 5
-    else
-      send_prev_IFS=$IFS; IFS=','
-      set dummy `echo "$curl_cv_func_send_args" | sed 's/\*/\*/g'`
-      IFS=$send_prev_IFS
-      shift
-      #
-      send_qual_type_arg2=$2
-      #
-
-printf "%s\n" "#define SEND_TYPE_ARG1 $1" >>confdefs.h
-
-
-printf "%s\n" "#define SEND_TYPE_ARG3 $3" >>confdefs.h
-
-
-printf "%s\n" "#define SEND_TYPE_ARG4 $4" >>confdefs.h
-
-
-printf "%s\n" "#define SEND_TYPE_RETV $5" >>confdefs.h
-
-      #
-      prev_sh_opts=$-
-      #
-      case $prev_sh_opts in
-        *f*)
-          ;;
-        *)
-          set -f
-          ;;
-      esac
-      #
-      case "$send_qual_type_arg2" in
-        const*)
-          send_qual_arg2=const
-          send_type_arg2=`echo $send_qual_type_arg2 | sed 's/^const //'`
-        ;;
-        *)
-          send_qual_arg2=
-          send_type_arg2=$send_qual_type_arg2
-        ;;
-      esac
-      #
-
-printf "%s\n" "#define SEND_QUAL_ARG2 $send_qual_arg2" >>confdefs.h
-
-
-printf "%s\n" "#define SEND_TYPE_ARG2 $send_type_arg2" >>confdefs.h
-
-      #
-      case $prev_sh_opts in
-        *f*)
-          ;;
-        *)
-          set +f
-          ;;
-      esac
-      #
 
 printf "%s\n" "#define HAVE_SEND 1" >>confdefs.h
 
-      curl_cv_func_send="yes"
-    fi
+    curl_cv_func_send="yes"
   else
     as_fn_error $? "Unable to link function send" "$LINENO" 5
   fi
@@ -35402,15 +35374,11 @@ else $as_nop
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
-#include <windows.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
+#include <windows.h>
 #else
-#ifdef HAVE_PROTO_BSDSOCKET_H
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
-#endif
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -35635,9 +35603,7 @@ curl_includes_string="\
 #ifdef HAVE_SYS_TYPES_H
 #  include <sys/types.h>
 #endif
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif
+#include <string.h>
 #ifdef HAVE_STRINGS_H
 #  include <strings.h>
 #endif
@@ -35649,13 +35615,6 @@ then :
   printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$curl_includes_string
-"
-if test "x$ac_cv_header_string_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
-
-fi
 ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$curl_includes_string
 "
 if test "x$ac_cv_header_strings_h" = xyes
@@ -35885,7 +35844,6 @@ printf %s "checking if closesocket can be linked... " >&6; }
 
 
       $curl_includes_winsock2
-      $curl_includes_bsdsocket
       $curl_includes_socket
 
 int main (void)
@@ -35923,7 +35881,6 @@ printf %s "checking if closesocket is prototyped... " >&6; }
 /* end confdefs.h.  */
 
       $curl_includes_winsock2
-      $curl_includes_bsdsocket
       $curl_includes_socket
 
 _ACEOF
@@ -35954,7 +35911,6 @@ printf %s "checking if closesocket is compilable... " >&6; }
 
 
         $curl_includes_winsock2
-      $curl_includes_bsdsocket
         $curl_includes_socket
 
 int main (void)
@@ -36044,7 +36000,7 @@ fi
 
 
 
-    #
+      #
   tst_links_closesocket_camel="unknown"
   tst_proto_closesocket_camel="unknown"
   tst_compi_closesocket_camel="unknown"
@@ -36056,6 +36012,7 @@ printf %s "checking if CloseSocket can be linked... " >&6; }
 /* end confdefs.h.  */
 
 
+      $curl_includes_bsdsocket
       $curl_includes_sys_socket
 
 int main (void)
@@ -36092,6 +36049,7 @@ printf %s "checking if CloseSocket is prototyped... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+      $curl_includes_bsdsocket
       $curl_includes_sys_socket
 
 _ACEOF
@@ -36121,6 +36079,7 @@ printf %s "checking if CloseSocket is compilable... " >&6; }
 /* end confdefs.h.  */
 
 
+        $curl_includes_bsdsocket
         $curl_includes_sys_socket
 
 int main (void)
@@ -36184,155 +36143,6 @@ printf "%s\n" "no" >&6; }
   fi
 
 
-        #
-  tst_links_connect="unknown"
-  tst_proto_connect="unknown"
-  tst_compi_connect="unknown"
-  tst_allow_connect="unknown"
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if connect can be linked" >&5
-printf %s "checking if connect can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_sys_socket
-      $curl_includes_socket
-
-int main (void)
-{
-
-      if(0 != connect(0, 0, 0))
-        return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-    tst_links_connect="yes"
-
-else $as_nop
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    tst_links_connect="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_connect" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if connect is prototyped" >&5
-printf %s "checking if connect is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_sys_socket
-      $curl_includes_socket
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "connect" >/dev/null 2>&1
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_proto_connect="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_proto_connect="no"
-
-fi
-rm -rf conftest*
-
-  fi
-  #
-  if test "$tst_proto_connect" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if connect is compilable" >&5
-printf %s "checking if connect is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_winsock2
-      $curl_includes_bsdsocket
-        $curl_includes_sys_socket
-        $curl_includes_socket
-
-int main (void)
-{
-
-        if(0 != connect(0, 0, 0))
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_compi_connect="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_compi_connect="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  fi
-  #
-  if test "$tst_compi_connect" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if connect usage allowed" >&5
-printf %s "checking if connect usage allowed... " >&6; }
-    if test "x$curl_disallow_connect" != "xyes"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_allow_connect="yes"
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_allow_connect="no"
-    fi
-  fi
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if connect might be used" >&5
-printf %s "checking if connect might be used... " >&6; }
-  if test "$tst_links_connect" = "yes" &&
-     test "$tst_proto_connect" = "yes" &&
-     test "$tst_compi_connect" = "yes" &&
-     test "$tst_allow_connect" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-printf "%s\n" "#define HAVE_CONNECT 1" >>confdefs.h
-
-    curl_cv_func_connect="yes"
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    curl_cv_func_connect="no"
-  fi
-
-
 curl_includes_fcntl="\
 /* includes start */
 #ifdef HAVE_SYS_TYPES_H
@@ -36518,7 +36328,7 @@ printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
   tst_allow_fcntl_o_nonblock="unknown"
   #
   case $host_os in
-    sunos4* | aix3* | beos*)
+    sunos4* | aix3*)
             curl_disallow_fcntl_o_nonblock="yes"
       ;;
   esac
@@ -36604,13 +36414,13 @@ curl_includes_ws2tcpip="\
 #  ifndef WIN32_LEAN_AND_MEAN
 #    define WIN32_LEAN_AND_MEAN
 #  endif
-#  include <windows.h>
 #  ifdef HAVE_WINSOCK2_H
 #    include <winsock2.h>
 #    ifdef HAVE_WS2TCPIP_H
 #       include <ws2tcpip.h>
 #    endif
 #  endif
+#  include <windows.h>
 #endif
 /* includes end */"
 
@@ -37345,9 +37155,7 @@ curl_includes_stdlib="\
 #ifdef HAVE_SYS_TYPES_H
 #  include <sys/types.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-#endif
+#include <stdlib.h>
 /* includes end */"
   ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_stdlib
 "
@@ -37356,13 +37164,6 @@ then :
   printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$curl_includes_stdlib
-"
-if test "x$ac_cv_header_stdlib_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
-
-fi
 
 
 
@@ -37487,15 +37288,76 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 printf %s "checking if getaddrinfo seems to work... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+        $curl_includes_ws2tcpip
+        $curl_includes_stdlib
+        $curl_includes_string
+        $curl_includes_sys_socket
+        $curl_includes_netdb
+
+int main (void)
+{
+
+        struct addrinfo hints;
+        struct addrinfo *ai = 0;
+        int error;
+
+        #ifdef HAVE_WINSOCK2_H
+        WSADATA wsa;
+        if (WSAStartup(MAKEWORD(2,2), &wsa))
+                exit(2);
+        #endif
+
+        memset(&hints, 0, sizeof(hints));
+        hints.ai_flags = AI_NUMERICHOST;
+        hints.ai_family = AF_UNSPEC;
+        hints.ai_socktype = SOCK_STREAM;
+        error = getaddrinfo("127.0.0.1", 0, &hints, &ai);
+        if(error || !ai)
+          exit(1); /* fail */
+        else
+          exit(0);
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+ ;
+ return 0;
+}
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      tst_works_getaddrinfo="yes"
+
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      tst_works_getaddrinfo="no"
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -37556,7 +37418,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
   fi
   #
@@ -37853,7 +37718,7 @@ printf %s "checking if gethostbyname is compilable... " >&6; }
 
 
         $curl_includes_winsock2
-      $curl_includes_bsdsocket
+        $curl_includes_bsdsocket
         $curl_includes_netdb
 
 int main (void)
@@ -38007,6 +37872,7 @@ printf %s "checking if gethostbyname_r takes 3 args.... " >&6; }
 
 
           $curl_includes_netdb
+          $curl_includes_bsdsocket
 
 int main (void)
 {
@@ -38044,6 +37910,7 @@ printf %s "checking if gethostbyname_r takes 5 args.... " >&6; }
 
 
           $curl_includes_netdb
+          $curl_includes_bsdsocket
 
 int main (void)
 {
@@ -38081,6 +37948,7 @@ printf %s "checking if gethostbyname_r takes 6 args.... " >&6; }
 
 
           $curl_includes_netdb
+          $curl_includes_bsdsocket
 
 int main (void)
 {
@@ -38192,8 +38060,8 @@ printf %s "checking if gethostname can be linked... " >&6; }
 
 
       $curl_includes_winsock2
-      $curl_includes_bsdsocket
       $curl_includes_unistd
+      $curl_includes_bsdsocket
 
 int main (void)
 {
@@ -38230,8 +38098,8 @@ printf %s "checking if gethostname is prototyped... " >&6; }
 /* end confdefs.h.  */
 
       $curl_includes_winsock2
-      $curl_includes_bsdsocket
       $curl_includes_unistd
+      $curl_includes_bsdsocket
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@@ -38261,8 +38129,8 @@ printf %s "checking if gethostname is compilable... " >&6; }
 
 
         $curl_includes_winsock2
-      $curl_includes_bsdsocket
         $curl_includes_unistd
+        $curl_includes_bsdsocket
 
 int main (void)
 {
@@ -38304,8 +38172,8 @@ printf %s "checking for gethostname arg 2 data type... " >&6; }
 
 
               $curl_includes_winsock2
-      $curl_includes_bsdsocket
               $curl_includes_unistd
+              $curl_includes_bsdsocket
               $curl_preprocess_callconv
               extern int FUNCALLCONV gethostname($tst_arg1, $tst_arg2);
 
@@ -38994,15 +38862,62 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 printf %s "checking if getifaddrs seems to work... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+        $curl_includes_stdlib
+        $curl_includes_ifaddrs
+
+int main (void)
+{
+
+        struct ifaddrs *ifa = 0;
+        int error;
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+        error = getifaddrs(&ifa);
+        if(error || !ifa)
+          exit(1); /* fail */
+        else
+          exit(0);
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      tst_works_getifaddrs="yes"
+
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      tst_works_getifaddrs="no"
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -39049,7 +38964,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
   fi
   #
@@ -39239,15 +39157,62 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 printf %s "checking if gmtime_r seems to work... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+        $curl_includes_stdlib
+        $curl_includes_time
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+int main (void)
+{
+
+        time_t local = 1170352587;
+        struct tm *gmt = 0;
+        struct tm result;
+        gmt = gmtime_r(&local, &result);
+        if(gmt)
+          exit(0);
+        else
+          exit(1);
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      tst_works_gmtime_r="yes"
+
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      tst_works_gmtime_r="no"
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -39294,7 +39259,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
   fi
   #
@@ -39507,15 +39475,104 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 printf %s "checking if inet_ntop seems to work... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+        $curl_includes_stdlib
+        $curl_includes_arpa_inet
+        $curl_includes_string
+
+int main (void)
+{
+
+        char ipv6res[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
+        char ipv4res[sizeof "255.255.255.255"];
+        unsigned char ipv6a[26];
+        unsigned char ipv4a[5];
+        char *ipv6ptr = 0;
+        char *ipv4ptr = 0;
+        /* - */
+        ipv4res[0] = '\0';
+        ipv4a[0] = 0xc0;
+        ipv4a[1] = 0xa8;
+        ipv4a[2] = 0x64;
+        ipv4a[3] = 0x01;
+        ipv4a[4] = 0x01;
+        /* - */
+        ipv4ptr = inet_ntop(AF_INET, ipv4a, ipv4res, sizeof(ipv4res));
+        if(!ipv4ptr)
+          exit(1); /* fail */
+        if(ipv4ptr != ipv4res)
+          exit(1); /* fail */
+        if(!ipv4ptr[0])
+          exit(1); /* fail */
+        if(memcmp(ipv4res, "192.168.100.1", 13) != 0)
+          exit(1); /* fail */
+        /* - */
+        ipv6res[0] = '\0';
+        memset(ipv6a, 0, sizeof(ipv6a));
+        ipv6a[0] = 0xfe;
+        ipv6a[1] = 0x80;
+        ipv6a[8] = 0x02;
+        ipv6a[9] = 0x14;
+        ipv6a[10] = 0x4f;
+        ipv6a[11] = 0xff;
+        ipv6a[12] = 0xfe;
+        ipv6a[13] = 0x0b;
+        ipv6a[14] = 0x76;
+        ipv6a[15] = 0xc8;
+        ipv6a[25] = 0x01;
+        /* - */
+        ipv6ptr = inet_ntop(AF_INET6, ipv6a, ipv6res, sizeof(ipv6res));
+        if(!ipv6ptr)
+          exit(1); /* fail */
+        if(ipv6ptr != ipv6res)
+          exit(1); /* fail */
+        if(!ipv6ptr[0])
+          exit(1); /* fail */
+        if(memcmp(ipv6res, "fe80::214:4fff:fe0b:76c8", 24) != 0)
+          exit(1); /* fail */
+        /* - */
+        exit(0);
+
+ ;
+ return 0;
+}
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      tst_works_inet_ntop="yes"
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      tst_works_inet_ntop="no"
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -39604,7 +39661,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
   fi
   #
@@ -39767,15 +39827,97 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 printf %s "checking if inet_pton seems to work... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+        $curl_includes_stdlib
+        $curl_includes_arpa_inet
+        $curl_includes_string
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+int main (void)
+{
+
+        unsigned char ipv6a[16+1];
+        unsigned char ipv4a[4+1];
+        const char *ipv6src = "fe80::214:4fff:fe0b:76c8";
+        const char *ipv4src = "192.168.100.1";
+        /* - */
+        memset(ipv4a, 1, sizeof(ipv4a));
+        if(1 != inet_pton(AF_INET, ipv4src, ipv4a))
+          exit(1); /* fail */
+        /* - */
+        if( (ipv4a[0] != 0xc0) ||
+            (ipv4a[1] != 0xa8) ||
+            (ipv4a[2] != 0x64) ||
+            (ipv4a[3] != 0x01) ||
+            (ipv4a[4] != 0x01) )
+          exit(1); /* fail */
+        /* - */
+        memset(ipv6a, 1, sizeof(ipv6a));
+        if(1 != inet_pton(AF_INET6, ipv6src, ipv6a))
+          exit(1); /* fail */
+        /* - */
+        if( (ipv6a[0]  != 0xfe) ||
+            (ipv6a[1]  != 0x80) ||
+            (ipv6a[8]  != 0x02) ||
+            (ipv6a[9]  != 0x14) ||
+            (ipv6a[10] != 0x4f) ||
+            (ipv6a[11] != 0xff) ||
+            (ipv6a[12] != 0xfe) ||
+            (ipv6a[13] != 0x0b) ||
+            (ipv6a[14] != 0x76) ||
+            (ipv6a[15] != 0xc8) ||
+            (ipv6a[16] != 0x01) )
+          exit(1); /* fail */
+        /* - */
+        if( (ipv6a[2]  != 0x0) ||
+            (ipv6a[3]  != 0x0) ||
+            (ipv6a[4]  != 0x0) ||
+            (ipv6a[5]  != 0x0) ||
+            (ipv6a[6]  != 0x0) ||
+            (ipv6a[7]  != 0x0) )
+          exit(1); /* fail */
+        /* - */
+        exit(0);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      tst_works_inet_pton="yes"
+
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      tst_works_inet_pton="no"
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -39857,7 +39999,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
   fi
   #
@@ -40262,7 +40407,6 @@ printf %s "checking if ioctlsocket can be linked... " >&6; }
 
 
       $curl_includes_winsock2
-      $curl_includes_bsdsocket
 
 int main (void)
 {
@@ -40299,7 +40443,6 @@ printf %s "checking if ioctlsocket is prototyped... " >&6; }
 /* end confdefs.h.  */
 
       $curl_includes_winsock2
-      $curl_includes_bsdsocket
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@@ -40329,7 +40472,6 @@ printf %s "checking if ioctlsocket is compilable... " >&6; }
 
 
         $curl_includes_winsock2
-      $curl_includes_bsdsocket
 
 int main (void)
 {
@@ -40398,7 +40540,6 @@ printf %s "checking if ioctlsocket FIONBIO is compilable... " >&6; }
 
 
         $curl_includes_winsock2
-      $curl_includes_bsdsocket
 
 int main (void)
 {
@@ -40478,24 +40619,13 @@ printf %s "checking if IoctlSocket can be linked... " >&6; }
 /* end confdefs.h.  */
 
 
-#define IoctlSocket innocuous_IoctlSocket
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef IoctlSocket
-#ifdef __cplusplus
-extern "C"
-#endif
-char IoctlSocket ();
-#if defined __stub_IoctlSocket || defined __stub___IoctlSocket
-choke me
-#endif
+      $curl_includes_bsdsocket
 
 int main (void)
 {
-return IoctlSocket ();
+
+      IoctlSocket(0, 0, 0);
+
  ;
  return 0;
 }
@@ -40524,7 +40654,7 @@ printf %s "checking if IoctlSocket is prototyped... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-      $curl_includes_stropts
+      $curl_includes_bsdsocket
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@@ -40553,7 +40683,7 @@ printf %s "checking if IoctlSocket is compilable... " >&6; }
 /* end confdefs.h.  */
 
 
-        $curl_includes_stropts
+        $curl_includes_bsdsocket
 
 int main (void)
 {
@@ -40610,7 +40740,7 @@ printf "%s\n" "#define HAVE_IOCTLSOCKET_CAMEL 1" >>confdefs.h
 
     curl_cv_func_ioctlsocket_camel="yes"
 
-  #
+    #
   tst_compi_ioctlsocket_camel_fionbio="unknown"
   tst_allow_ioctlsocket_camel_fionbio="unknown"
   #
@@ -40621,7 +40751,7 @@ printf %s "checking if IoctlSocket FIONBIO is compilable... " >&6; }
 /* end confdefs.h.  */
 
 
-        $curl_includes_stropts
+        $curl_includes_bsdsocket
 
 int main (void)
 {
@@ -40689,224 +40819,6 @@ printf "%s\n" "no" >&6; }
   fi
 
 
-      #
-  tst_links_localtime_r="unknown"
-  tst_proto_localtime_r="unknown"
-  tst_compi_localtime_r="unknown"
-  tst_works_localtime_r="unknown"
-  tst_allow_localtime_r="unknown"
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r can be linked" >&5
-printf %s "checking if localtime_r can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define localtime_r innocuous_localtime_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef localtime_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char localtime_r ();
-#if defined __stub_localtime_r || defined __stub___localtime_r
-choke me
-#endif
-
-int main (void)
-{
-return localtime_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-    tst_links_localtime_r="yes"
-
-else $as_nop
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    tst_links_localtime_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_localtime_r" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r is prototyped" >&5
-printf %s "checking if localtime_r is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_time
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "localtime_r" >/dev/null 2>&1
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_proto_localtime_r="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_proto_localtime_r="no"
-
-fi
-rm -rf conftest*
-
-  fi
-  #
-  if test "$tst_proto_localtime_r" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r is compilable" >&5
-printf %s "checking if localtime_r is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_time
-
-int main (void)
-{
-
-        if(0 != localtime_r(0, 0))
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_compi_localtime_r="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_compi_localtime_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  fi
-  #
-    if test "x$cross_compiling" != "xyes" &&
-    test "$tst_compi_localtime_r" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r seems to work" >&5
-printf %s "checking if localtime_r seems to work... " >&6; }
-
-   case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
-
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
-
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
-then :
-  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else $as_nop
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_stdlib
-        $curl_includes_time
-
-int main (void)
-{
-
-        time_t clock = 1170352587;
-        struct tm *tmp = 0;
-        struct tm result;
-        tmp = localtime_r(&clock, &result);
-        if(tmp)
-          exit(0);
-        else
-          exit(1);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_works_localtime_r="yes"
-
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_works_localtime_r="no"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-   eval "$library_path_var=\$old" # restore
-
-  fi
-  #
-  if test "$tst_compi_localtime_r" = "yes" &&
-    test "$tst_works_localtime_r" != "no"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r usage allowed" >&5
-printf %s "checking if localtime_r usage allowed... " >&6; }
-    if test "x$curl_disallow_localtime_r" != "xyes"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_allow_localtime_r="yes"
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_allow_localtime_r="no"
-    fi
-  fi
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r might be used" >&5
-printf %s "checking if localtime_r might be used... " >&6; }
-  if test "$tst_links_localtime_r" = "yes" &&
-     test "$tst_proto_localtime_r" = "yes" &&
-     test "$tst_compi_localtime_r" = "yes" &&
-     test "$tst_allow_localtime_r" = "yes" &&
-     test "$tst_works_localtime_r" != "no"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
-
-    curl_cv_func_localtime_r="yes"
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    curl_cv_func_localtime_r="no"
-  fi
-
-
     #
   tst_links_memrchr="unknown"
   tst_macro_memrchr="unknown"
@@ -41218,15 +41130,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 printf %s "checking if poll seems to work... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
-
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
-
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+     darwin*)
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -41285,265 +41190,111 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
-
-  fi
-  #
-  if test "$tst_compi_poll" = "yes" &&
-    test "$tst_works_poll" != "no"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if poll usage allowed" >&5
-printf %s "checking if poll usage allowed... " >&6; }
-    if test "x$curl_disallow_poll" != "xyes"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_allow_poll="yes"
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_allow_poll="no"
-    fi
-  fi
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if poll might be used" >&5
-printf %s "checking if poll might be used... " >&6; }
-  if test "$tst_links_poll" = "yes" &&
-     test "$tst_proto_poll" = "yes" &&
-     test "$tst_compi_poll" = "yes" &&
-     test "$tst_allow_poll" = "yes" &&
-     test "$tst_works_poll" != "no"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
-
-
-printf "%s\n" "#define HAVE_POLL_FINE 1" >>confdefs.h
-
-    curl_cv_func_poll="yes"
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    curl_cv_func_poll="no"
-  fi
-
-
-      #
-  tst_links_setsockopt="unknown"
-  tst_proto_setsockopt="unknown"
-  tst_compi_setsockopt="unknown"
-  tst_allow_setsockopt="unknown"
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt can be linked" >&5
-printf %s "checking if setsockopt can be linked... " >&6; }
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_sys_socket
+        $curl_includes_stdlib
+        $curl_includes_poll
+        $curl_includes_time
 
 int main (void)
 {
 
-      if(0 != setsockopt(0, 0, 0, 0, 0))
-        return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-    tst_links_setsockopt="yes"
-
-else $as_nop
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    tst_links_setsockopt="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_setsockopt" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt is prototyped" >&5
-printf %s "checking if setsockopt is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_sys_socket
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "setsockopt" >/dev/null 2>&1
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_proto_setsockopt="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_proto_setsockopt="no"
-
-fi
-rm -rf conftest*
-
-  fi
-  #
-  if test "$tst_proto_setsockopt" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt is compilable" >&5
-printf %s "checking if setsockopt is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
+        /* detect the original poll() breakage */
+        if(0 != poll(0, 0, 10))
+          exit(1); /* fail */
+        else {
+          /* detect the 10.12 poll() breakage */
+          struct timeval before, after;
+          int rc;
+          size_t us;
 
-        $curl_includes_winsock2
-      $curl_includes_bsdsocket
-        $curl_includes_sys_socket
+          gettimeofday(&before, NULL);
+          rc = poll(NULL, 0, 500);
+          gettimeofday(&after, NULL);
 
-int main (void)
-{
+          us = (after.tv_sec - before.tv_sec) * 1000000 +
+            (after.tv_usec - before.tv_usec);
 
-        if(0 != setsockopt(0, 0, 0, 0, 0))
-          return 1;
+          if(us < 400000)
+            exit(1);
+        }
 
  ;
  return 0;
 }
 
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_run "$LINENO"
 then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
-      tst_compi_setsockopt="yes"
+      tst_works_poll="yes"
 
 else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
-      tst_compi_setsockopt="no"
+      tst_works_poll="no"
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  fi
-  #
-  if test "$tst_compi_setsockopt" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt usage allowed" >&5
-printf %s "checking if setsockopt usage allowed... " >&6; }
-    if test "x$curl_disallow_setsockopt" != "xyes"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_allow_setsockopt="yes"
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_allow_setsockopt="no"
-    fi
-  fi
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt might be used" >&5
-printf %s "checking if setsockopt might be used... " >&6; }
-  if test "$tst_links_setsockopt" = "yes" &&
-     test "$tst_proto_setsockopt" = "yes" &&
-     test "$tst_compi_setsockopt" = "yes" &&
-     test "$tst_allow_setsockopt" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-printf "%s\n" "#define HAVE_SETSOCKOPT 1" >>confdefs.h
-
-    curl_cv_func_setsockopt="yes"
-
-  #
-  tst_compi_setsockopt_so_nonblock="unknown"
-  tst_allow_setsockopt_so_nonblock="unknown"
-  #
-  if test "$curl_cv_func_setsockopt" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK is compilable" >&5
-printf %s "checking if setsockopt SO_NONBLOCK is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_winsock2
-      $curl_includes_bsdsocket
-        $curl_includes_sys_socket
-
-int main (void)
-{
-
-        if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_compi_setsockopt_so_nonblock="yes"
-
-else $as_nop
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_compi_setsockopt_so_nonblock="no"
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   fi
   #
-  if test "$tst_compi_setsockopt_so_nonblock" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK usage allowed" >&5
-printf %s "checking if setsockopt SO_NONBLOCK usage allowed... " >&6; }
-    if test "x$curl_disallow_setsockopt_so_nonblock" != "xyes"; then
+  if test "$tst_compi_poll" = "yes" &&
+    test "$tst_works_poll" != "no"; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if poll usage allowed" >&5
+printf %s "checking if poll usage allowed... " >&6; }
+    if test "x$curl_disallow_poll" != "xyes"; then
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
-      tst_allow_setsockopt_so_nonblock="yes"
+      tst_allow_poll="yes"
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
-      tst_allow_setsockopt_so_nonblock="no"
+      tst_allow_poll="no"
     fi
   fi
   #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK might be used" >&5
-printf %s "checking if setsockopt SO_NONBLOCK might be used... " >&6; }
-  if test "$tst_compi_setsockopt_so_nonblock" = "yes" &&
-     test "$tst_allow_setsockopt_so_nonblock" = "yes"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if poll might be used" >&5
+printf %s "checking if poll might be used... " >&6; }
+  if test "$tst_links_poll" = "yes" &&
+     test "$tst_proto_poll" = "yes" &&
+     test "$tst_compi_poll" = "yes" &&
+     test "$tst_allow_poll" = "yes" &&
+     test "$tst_works_poll" != "no"; then
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
 
-printf "%s\n" "#define HAVE_SETSOCKOPT_SO_NONBLOCK 1" >>confdefs.h
-
-    curl_cv_func_setsockopt_so_nonblock="yes"
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    curl_cv_func_setsockopt_so_nonblock="no"
-  fi
+printf "%s\n" "#define HAVE_POLL_FINE 1" >>confdefs.h
 
+    curl_cv_func_poll="yes"
   else
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
-    curl_cv_func_setsockopt="no"
+    curl_cv_func_poll="no"
   fi
 
 
@@ -41552,9 +41303,7 @@ curl_includes_signal="\
 #ifdef HAVE_SYS_TYPES_H
 #  include <sys/types.h>
 #endif
-#ifdef HAVE_SIGNAL_H
-#  include <signal.h>
-#endif
+#include <signal.h>
 /* includes end */"
   ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_signal
 "
@@ -41563,13 +41312,6 @@ then :
   printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$curl_includes_signal
-"
-if test "x$ac_cv_header_signal_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h
-
-fi
 
 
 
@@ -42028,9 +41770,7 @@ curl_includes_setjmp="\
 #ifdef HAVE_SYS_TYPES_H
 #  include <sys/types.h>
 #endif
-#ifdef HAVE_SETJMP_H
-#  include <setjmp.h>
-#endif
+#include <setjmp.h>
 /* includes end */"
   ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_setjmp
 "
@@ -42039,13 +41779,6 @@ then :
   printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$curl_includes_setjmp
-"
-if test "x$ac_cv_header_setjmp_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
-
-fi
 
 
 
@@ -42325,7 +42058,7 @@ printf %s "checking if socket is compilable... " >&6; }
 
 
         $curl_includes_winsock2
-      $curl_includes_bsdsocket
+        $curl_includes_bsdsocket
         $curl_includes_sys_socket
         $curl_includes_socket
 
@@ -43169,15 +42902,65 @@ printf "%s\n" "yes" >&6; }
 printf %s "checking if strerror_r seems to work... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+        $curl_includes_stdlib
+        $curl_includes_string
+#       include <errno.h>
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+int main (void)
+{
+
+        char buffer[1024];
+        char *string = 0;
+        buffer[0] = '\0';
+        string = strerror_r(EACCES, buffer, sizeof(buffer));
+        if(!string)
+          exit(1); /* fail */
+        if(!string[0])
+          exit(1); /* fail */
+        else
+          exit(0);
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      tst_works_glibc_strerror_r="yes"
+
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      tst_works_glibc_strerror_r="no"
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -43227,7 +43010,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
   fi
   #
@@ -43285,15 +43071,65 @@ printf "%s\n" "yes" >&6; }
 printf %s "checking if strerror_r seems to work... " >&6; }
 
    case $host_os in
-     darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
-     *)       library_path_var=LD_LIBRARY_PATH ;;
-   esac
+     darwin*)
+      if test "$cross_compiling" = yes
+then :
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+        $curl_includes_stdlib
+        $curl_includes_string
+#       include <errno.h>
+
+int main (void)
+{
 
-   eval "old=$$library_path_var"
-   eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old"
+        char buffer[1024];
+        int error = 1;
+        buffer[0] = '\0';
+        error = strerror_r(EACCES, buffer, sizeof(buffer));
+        if(error)
+          exit(1); /* fail */
+        if(buffer[0] == '\0')
+          exit(1); /* fail */
+        else
+          exit(0);
+
+ ;
+ return 0;
+}
 
-   eval "export $library_path_var"
-   if test "$cross_compiling" = yes
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      tst_works_posix_strerror_r="yes"
+
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      tst_works_posix_strerror_r="no"
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     ;;
+     *)
+      oldcc=$CC
+      old=$LD_LIBRARY_PATH
+      CC="sh ./run-compiler"
+      LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+      export LD_LIBRARY_PATH
+      if test "$cross_compiling" = yes
 then :
   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -43343,7 +43179,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-   eval "$library_path_var=\$old" # restore
+      LD_LIBRARY_PATH=$old # restore
+      CC=$oldcc
+     ;;
+   esac
 
   fi
   #
@@ -43392,9 +43231,6 @@ printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
 
 printf "%s\n" "#define HAVE_GLIBC_STRERROR_R 1" >>confdefs.h
 
-
-printf "%s\n" "#define STRERROR_R_TYPE_ARG3 $tst_glibc_strerror_r_type_arg3" >>confdefs.h
-
     fi
     if test "$tst_posix_strerror_r" = "yes"; then
 
@@ -43403,9 +43239,6 @@ printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
 
 printf "%s\n" "#define HAVE_POSIX_STRERROR_R 1" >>confdefs.h
 
-
-printf "%s\n" "#define STRERROR_R_TYPE_ARG3 $tst_posix_strerror_r_type_arg3" >>confdefs.h
-
     fi
     curl_cv_func_strerror_r="yes"
   else
@@ -43573,456 +43406,6 @@ printf "%s\n" "no" >&6; }
 
 
     #
-  tst_links_strncmpi="unknown"
-  tst_proto_strncmpi="unknown"
-  tst_compi_strncmpi="unknown"
-  tst_allow_strncmpi="unknown"
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strncmpi can be linked" >&5
-printf %s "checking if strncmpi can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define strncmpi innocuous_strncmpi
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strncmpi
-#ifdef __cplusplus
-extern "C"
-#endif
-char strncmpi ();
-#if defined __stub_strncmpi || defined __stub___strncmpi
-choke me
-#endif
-
-int main (void)
-{
-return strncmpi ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-    tst_links_strncmpi="yes"
-
-else $as_nop
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    tst_links_strncmpi="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_strncmpi" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strncmpi is prototyped" >&5
-printf %s "checking if strncmpi is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "strncmpi" >/dev/null 2>&1
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_proto_strncmpi="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_proto_strncmpi="no"
-
-fi
-rm -rf conftest*
-
-  fi
-  #
-  if test "$tst_proto_strncmpi" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strncmpi is compilable" >&5
-printf %s "checking if strncmpi is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_string
-
-int main (void)
-{
-
-        if(0 != strncmpi(0, 0))
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_compi_strncmpi="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_compi_strncmpi="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  fi
-  #
-  if test "$tst_compi_strncmpi" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strncmpi usage allowed" >&5
-printf %s "checking if strncmpi usage allowed... " >&6; }
-    if test "x$curl_disallow_strncmpi" != "xyes"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_allow_strncmpi="yes"
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_allow_strncmpi="no"
-    fi
-  fi
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strncmpi might be used" >&5
-printf %s "checking if strncmpi might be used... " >&6; }
-  if test "$tst_links_strncmpi" = "yes" &&
-     test "$tst_proto_strncmpi" = "yes" &&
-     test "$tst_compi_strncmpi" = "yes" &&
-     test "$tst_allow_strncmpi" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-printf "%s\n" "#define HAVE_STRNCMPI 1" >>confdefs.h
-
-    curl_cv_func_strncmpi="yes"
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    curl_cv_func_strncmpi="no"
-  fi
-
-
-    #
-  tst_links_strnicmp="unknown"
-  tst_proto_strnicmp="unknown"
-  tst_compi_strnicmp="unknown"
-  tst_allow_strnicmp="unknown"
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strnicmp can be linked" >&5
-printf %s "checking if strnicmp can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define strnicmp innocuous_strnicmp
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strnicmp
-#ifdef __cplusplus
-extern "C"
-#endif
-char strnicmp ();
-#if defined __stub_strnicmp || defined __stub___strnicmp
-choke me
-#endif
-
-int main (void)
-{
-return strnicmp ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-    tst_links_strnicmp="yes"
-
-else $as_nop
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    tst_links_strnicmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_strnicmp" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strnicmp is prototyped" >&5
-printf %s "checking if strnicmp is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "strnicmp" >/dev/null 2>&1
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_proto_strnicmp="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_proto_strnicmp="no"
-
-fi
-rm -rf conftest*
-
-  fi
-  #
-  if test "$tst_proto_strnicmp" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strnicmp is compilable" >&5
-printf %s "checking if strnicmp is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_string
-
-int main (void)
-{
-
-        if(0 != strnicmp(0, 0))
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_compi_strnicmp="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_compi_strnicmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  fi
-  #
-  if test "$tst_compi_strnicmp" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strnicmp usage allowed" >&5
-printf %s "checking if strnicmp usage allowed... " >&6; }
-    if test "x$curl_disallow_strnicmp" != "xyes"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_allow_strnicmp="yes"
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_allow_strnicmp="no"
-    fi
-  fi
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strnicmp might be used" >&5
-printf %s "checking if strnicmp might be used... " >&6; }
-  if test "$tst_links_strnicmp" = "yes" &&
-     test "$tst_proto_strnicmp" = "yes" &&
-     test "$tst_compi_strnicmp" = "yes" &&
-     test "$tst_allow_strnicmp" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
-
-    curl_cv_func_strnicmp="yes"
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    curl_cv_func_strnicmp="no"
-  fi
-
-
-    #
-  tst_links_strstr="unknown"
-  tst_proto_strstr="unknown"
-  tst_compi_strstr="unknown"
-  tst_allow_strstr="unknown"
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strstr can be linked" >&5
-printf %s "checking if strstr can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define strstr innocuous_strstr
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strstr
-#ifdef __cplusplus
-extern "C"
-#endif
-char strstr ();
-#if defined __stub_strstr || defined __stub___strstr
-choke me
-#endif
-
-int main (void)
-{
-return strstr ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-    tst_links_strstr="yes"
-
-else $as_nop
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    tst_links_strstr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_strstr" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strstr is prototyped" >&5
-printf %s "checking if strstr is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "strstr" >/dev/null 2>&1
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_proto_strstr="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_proto_strstr="no"
-
-fi
-rm -rf conftest*
-
-  fi
-  #
-  if test "$tst_proto_strstr" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strstr is compilable" >&5
-printf %s "checking if strstr is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_string
-
-int main (void)
-{
-
-        if(0 != strstr(0, 0))
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_compi_strstr="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_compi_strstr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  fi
-  #
-  if test "$tst_compi_strstr" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strstr usage allowed" >&5
-printf %s "checking if strstr usage allowed... " >&6; }
-    if test "x$curl_disallow_strstr" != "xyes"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_allow_strstr="yes"
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_allow_strstr="no"
-    fi
-  fi
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strstr might be used" >&5
-printf %s "checking if strstr might be used... " >&6; }
-  if test "$tst_links_strstr" = "yes" &&
-     test "$tst_proto_strstr" = "yes" &&
-     test "$tst_compi_strstr" = "yes" &&
-     test "$tst_allow_strstr" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h
-
-    curl_cv_func_strstr="yes"
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    curl_cv_func_strstr="no"
-  fi
-
-
-    #
   tst_links_strtok_r="unknown"
   tst_proto_strtok_r="unknown"
   tst_compi_strtok_r="unknown"
@@ -44322,182 +43705,6 @@ printf "%s\n" "no" >&6; }
   fi
 
 
-curl_includes_sys_uio="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-#  include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_UIO_H
-#  include <sys/uio.h>
-#endif
-/* includes end */"
-  ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_sys_uio
-"
-if test "x$ac_cv_header_sys_types_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
-
-fi
-ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$curl_includes_sys_uio
-"
-if test "x$ac_cv_header_sys_uio_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
-
-fi
-
-
-
-    #
-  tst_links_writev="unknown"
-  tst_proto_writev="unknown"
-  tst_compi_writev="unknown"
-  tst_allow_writev="unknown"
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if writev can be linked" >&5
-printf %s "checking if writev can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define writev innocuous_writev
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef writev
-#ifdef __cplusplus
-extern "C"
-#endif
-char writev ();
-#if defined __stub_writev || defined __stub___writev
-choke me
-#endif
-
-int main (void)
-{
-return writev ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-    tst_links_writev="yes"
-
-else $as_nop
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    tst_links_writev="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_writev" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if writev is prototyped" >&5
-printf %s "checking if writev is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_sys_uio
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "writev" >/dev/null 2>&1
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_proto_writev="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_proto_writev="no"
-
-fi
-rm -rf conftest*
-
-  fi
-  #
-  if test "$tst_proto_writev" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if writev is compilable" >&5
-printf %s "checking if writev is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_sys_uio
-
-int main (void)
-{
-
-        if(0 != writev(0, 0, 0))
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_compi_writev="yes"
-
-else $as_nop
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_compi_writev="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  fi
-  #
-  if test "$tst_compi_writev" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if writev usage allowed" >&5
-printf %s "checking if writev usage allowed... " >&6; }
-    if test "x$curl_disallow_writev" != "xyes"; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-      tst_allow_writev="yes"
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-      tst_allow_writev="no"
-    fi
-  fi
-  #
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if writev might be used" >&5
-printf %s "checking if writev might be used... " >&6; }
-  if test "$tst_links_writev" = "yes" &&
-     test "$tst_proto_writev" = "yes" &&
-     test "$tst_compi_writev" = "yes" &&
-     test "$tst_allow_writev" = "yes"; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
-
-    curl_cv_func_writev="yes"
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-    curl_cv_func_writev="no"
-  fi
-
-
 case $host in
   *msdosdjgpp)
      ac_cv_func_pipe=no
@@ -44606,8 +43813,7 @@ fi
 
 
 
-
-  for ac_func in fnmatch geteuid getpass_r getppid getpwuid getpwuid_r getrlimit gettimeofday if_nametoindex mach_absolute_time pipe setlocale setmode setrlimit usleep utime utimes
+  for ac_func in _fseeki64 arc4random fnmatch fseeko geteuid getpass_r getppid getpwuid getpwuid_r getrlimit gettimeofday if_nametoindex mach_absolute_time pipe sched_yield sendmsg setlocale setmode setrlimit snprintf utime utimes
 do :
   as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
 
 done
 
+ac_fn_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "#include <stdio.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_fseeko" = xyes
+then :
 
-            #
+printf "%s\n" "#define HAVE_DECL_FSEEKO 1" >>confdefs.h
+
+fi
+
+
+        #
   tst_method="unknown"
 
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to set a socket into non-blocking mode" >&5
 
 
 
-
-
   #
   if test "$want_ares" = "yes"; then
         clean_CPPFLAGS="$CPPFLAGS"
     clean_LDFLAGS="$LDFLAGS"
     clean_LIBS="$LIBS"
-    embedded_ares="unknown"
     configure_runpath=`pwd`
-    embedded_ares_builddir="$configure_runpath/ares"
     if test -n "$want_ares_path"; then
             ARES_PCDIR="$want_ares_path/lib/pkgconfig"
 
@@ -45026,14 +44237,6 @@ printf "%s\n" "$as_me: pkg-config: ares CPPFLAGS: \"$ares_CPPFLAGS\"" >&6;}
         ares_LIBS="-lcares"
       fi
     else
-            if test -d "$srcdir/ares"; then
-                embedded_ares="yes"
-        subdirs="$subdirs ares"
-
-                        ares_CPPFLAGS=""
-        ares_LDFLAGS="-L$embedded_ares_builddir"
-        ares_LIBS="-lcares"
-      else
 
     if test -n "$PKG_CONFIG"; then
       PKGCONFIG="$PKG_CONFIG"
@@ -45170,21 +44373,20 @@ printf "%s\n" "found" >&6; }
       fi
     fi
 
-        if test "$PKGCONFIG" != "no" ; then
-          ares_LIBS=`$PKGCONFIG --libs-only-l libcares`
-          ares_LDFLAGS=`$PKGCONFIG --libs-only-L libcares`
-          ares_CPPFLAGS=`$PKGCONFIG --cflags-only-I libcares`
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares_LIBS: \"$ares_LIBS\"" >&5
+      if test "$PKGCONFIG" != "no" ; then
+        ares_LIBS=`$PKGCONFIG --libs-only-l libcares`
+        ares_LDFLAGS=`$PKGCONFIG --libs-only-L libcares`
+        ares_CPPFLAGS=`$PKGCONFIG --cflags-only-I libcares`
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares_LIBS: \"$ares_LIBS\"" >&5
 printf "%s\n" "$as_me: pkg-config: ares_LIBS: \"$ares_LIBS\"" >&6;}
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares_LDFLAGS: \"$ares_LDFLAGS\"" >&5
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares_LDFLAGS: \"$ares_LDFLAGS\"" >&5
 printf "%s\n" "$as_me: pkg-config: ares_LDFLAGS: \"$ares_LDFLAGS\"" >&6;}
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares_CPPFLAGS: \"$ares_CPPFLAGS\"" >&5
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares_CPPFLAGS: \"$ares_CPPFLAGS\"" >&5
 printf "%s\n" "$as_me: pkg-config: ares_CPPFLAGS: \"$ares_CPPFLAGS\"" >&6;}
-        else
-          ares_CPPFLAGS=""
-          ares_LDFLAGS=""
-          ares_LIBS="-lcares"
-        fi
+      else
+        ares_CPPFLAGS=""
+        ares_LDFLAGS=""
+        ares_LIBS="-lcares"
       fi
     fi
     #
@@ -45192,28 +44394,28 @@ printf "%s\n" "$as_me: pkg-config: ares_CPPFLAGS: \"$ares_CPPFLAGS\"" >&6;}
     LDFLAGS="$clean_LDFLAGS $ares_LDFLAGS"
     LIBS="$ares_LIBS $clean_LIBS"
     #
-    if test "$embedded_ares" != "yes"; then
-                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that c-ares is good and recent enough" >&5
+
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that c-ares is good and recent enough" >&5
 printf %s "checking that c-ares is good and recent enough... " >&6; }
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
 #include <ares.h>
-          /* set of dummy functions in case c-ares was built with debug */
-          void curl_dofree() { }
-          void curl_sclose() { }
-          void curl_domalloc() { }
-          void curl_docalloc() { }
-          void curl_socket() { }
+        /* set of dummy functions in case c-ares was built with debug */
+        void curl_dofree() { }
+        void curl_sclose() { }
+        void curl_domalloc() { }
+        void curl_docalloc() { }
+        void curl_socket() { }
 
 int main (void)
 {
 
-          ares_channel channel;
-          ares_cancel(channel); /* added in 1.2.0 */
-          ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
-          ares_dup(&channel, channel); /* added in 1.6.0 */
+        ares_channel channel;
+        ares_cancel(channel); /* added in 1.2.0 */
+        ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
+        ares_dup(&channel, channel); /* added in 1.6.0 */
 
  ;
  return 0;
@@ -45223,24 +44425,24 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
 
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
 
 else $as_nop
 
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
-        as_fn_error $? "c-ares library defective or too old" "$LINENO" 5
-                CPPFLAGS="$clean_CPPFLAGS"
-        LDFLAGS="$clean_LDFLAGS"
-        LIBS="$clean_LIBS"
-        # prevent usage
-        want_ares="no"
+      as_fn_error $? "c-ares library defective or too old" "$LINENO" 5
+            CPPFLAGS="$clean_CPPFLAGS"
+      LDFLAGS="$clean_LDFLAGS"
+      LIBS="$clean_LIBS"
+      # prevent usage
+      want_ares="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-    fi
+
     if test "$want_ares" = "yes"; then
 
 printf "%s\n" "#define USE_ARES 1" >>confdefs.h
@@ -45251,14 +44453,6 @@ printf "%s\n" "#define USE_ARES 1" >>confdefs.h
     fi
   fi
 
- if test x$embedded_ares = xyes; then
-  USE_EMBEDDED_ARES_TRUE=
-  USE_EMBEDDED_ARES_FALSE='#'
-else
-  USE_EMBEDDED_ARES_TRUE='#'
-  USE_EMBEDDED_ARES_FALSE=
-fi
-
 
 if test "x$curl_cv_native_windows" != "xyes" &&
    test "x$enable_shared" = "xyes"; then
 
             if test "$USE_THREADS_POSIX" != "1"
       then
-        CFLAGS="$CFLAGS -pthread"
         # assign PTHREAD for pkg-config use
         PTHREAD=" -pthread"
+
+        case $host in
+        *-ibm-aix*)
+                      COMPILER_VERSION=`"$CC" -qversion 2>/dev/null`
+           if test x"$COMPILER_VERSION" = "x"; then
+             CFLAGS="$CFLAGS -pthread"
+           else
+             CFLAGS="$CFLAGS -qthreaded"
+           fi
+           ;;
+        powerpc-*amigaos*)
+                      PTHREAD=" -lpthread"
+           ;;
+        *)
+           CFLAGS="$CFLAGS -pthread"
+           ;;
+        esac
         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
 printf %s "checking for pthread_create in -lpthread... " >&6; }
 if test ${ac_cv_lib_pthread_pthread_create+y}
@@ -45559,19 +44769,145 @@ printf "%s\n" "no" >&6; }
 fi
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable cryptographic authentication methods" >&5
-printf %s "checking whether to enable cryptographic authentication methods... " >&6; }
-# Check whether --enable-crypto-auth was given.
-if test ${enable_crypto_auth+y}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable basic authentication method" >&5
+printf %s "checking whether to enable basic authentication method... " >&6; }
+# Check whether --enable-basic-auth was given.
+if test ${enable_basic_auth+y}
+then :
+  enableval=$enable_basic_auth;  case "$enableval" in
+  no)
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define CURL_DISABLE_BASIC_AUTH 1" >>confdefs.h
+
+       CURL_DISABLE_BASIC_AUTH=1
+       ;;
+  *)   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+       ;;
+  esac
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable bearer authentication method" >&5
+printf %s "checking whether to enable bearer authentication method... " >&6; }
+# Check whether --enable-bearer-auth was given.
+if test ${enable_bearer_auth+y}
+then :
+  enableval=$enable_bearer_auth;  case "$enableval" in
+  no)
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define CURL_DISABLE_BEARER_AUTH 1" >>confdefs.h
+
+       CURL_DISABLE_BEARER_AUTH=1
+       ;;
+  *)   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+       ;;
+  esac
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable digest authentication method" >&5
+printf %s "checking whether to enable digest authentication method... " >&6; }
+# Check whether --enable-digest-auth was given.
+if test ${enable_digest_auth+y}
+then :
+  enableval=$enable_digest_auth;  case "$enableval" in
+  no)
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define CURL_DISABLE_DIGEST_AUTH 1" >>confdefs.h
+
+       CURL_DISABLE_DIGEST_AUTH=1
+       ;;
+  *)   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+       ;;
+  esac
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable kerberos authentication method" >&5
+printf %s "checking whether to enable kerberos authentication method... " >&6; }
+# Check whether --enable-kerberos-auth was given.
+if test ${enable_kerberos_auth+y}
+then :
+  enableval=$enable_kerberos_auth;  case "$enableval" in
+  no)
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define CURL_DISABLE_KERBEROS_AUTH 1" >>confdefs.h
+
+       CURL_DISABLE_KERBEROS_AUTH=1
+       ;;
+  *)   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+       ;;
+  esac
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable negotiate authentication method" >&5
+printf %s "checking whether to enable negotiate authentication method... " >&6; }
+# Check whether --enable-negotiate-auth was given.
+if test ${enable_negotiate_auth+y}
 then :
-  enableval=$enable_crypto_auth;  case "$enableval" in
+  enableval=$enable_negotiate_auth;  case "$enableval" in
   no)
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
 
-printf "%s\n" "#define CURL_DISABLE_CRYPTO_AUTH 1" >>confdefs.h
+printf "%s\n" "#define CURL_DISABLE_NEGOTIATE_AUTH 1" >>confdefs.h
 
-       CURL_DISABLE_CRYPTO_AUTH=1
+       CURL_DISABLE_NEGOTIATE_AUTH=1
+       ;;
+  *)   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+       ;;
+  esac
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable aws sig methods" >&5
+printf %s "checking whether to enable aws sig methods... " >&6; }
+# Check whether --enable-aws was given.
+if test ${enable_aws+y}
+then :
+  enableval=$enable_aws;  case "$enableval" in
+  no)
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define CURL_DISABLE_AWS 1" >>confdefs.h
+
+       CURL_DISABLE_AWS=1
        ;;
   *)   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
@@ -45641,6 +44977,8 @@ printf %s "checking whether to enable NTLM delegation to winbind's helper... " >
     test "x$SSL_ENABLED" = "x"; then
     want_ntlm_wb_file=""
     want_ntlm_wb="no"
+  elif test "x$ac_cv_func_fork" != "xyes"; then
+        want_ntlm_wb="no"
   fi
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $want_ntlm_wb" >&5
 printf "%s\n" "$want_ntlm_wb" >&6; }
@@ -45712,8 +45050,15 @@ printf "%s\n" "auto" >&6; }
 fi
 
 if test "x$want_unix_sockets" != "xno"; then
-  ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_path" "ac_cv_member_struct_sockaddr_un_sun_path" "
-    #include <sys/un.h>
+  if test "x$curl_cv_native_windows" = "xyes"; then
+    USE_UNIX_SOCKETS=1
+
+printf "%s\n" "#define USE_UNIX_SOCKETS 1" >>confdefs.h
+
+    curl_unix_sockets_msg="enabled"
+  else
+    ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_path" "ac_cv_member_struct_sockaddr_un_sun_path" "
+      #include <sys/un.h>
 
 "
 if test "x$ac_cv_member_struct_sockaddr_un_sun_path" = xyes
@@ -45722,18 +45067,19 @@ then :
 
 printf "%s\n" "#define USE_UNIX_SOCKETS 1" >>confdefs.h
 
-    USE_UNIX_SOCKETS=1
+      USE_UNIX_SOCKETS=1
 
-    curl_unix_sockets_msg="enabled"
+      curl_unix_sockets_msg="enabled"
 
 else $as_nop
 
-    if test "x$want_unix_sockets" = "xyes"; then
-      as_fn_error $? "--enable-unix-sockets is not available on this platform!" "$LINENO" 5
-    fi
+      if test "x$want_unix_sockets" = "xyes"; then
+        as_fn_error $? "--enable-unix-sockets is not available on this platform!" "$LINENO" 5
+      fi
 
 fi
 
+  fi
 fi
 
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support cookies" >&5
@@ -45856,6 +45202,65 @@ printf "%s\n" "yes" >&6; }
 fi
 
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support binding connections locally" >&5
+printf %s "checking whether to support binding connections locally... " >&6; }
+# Check whether --enable-bindlocal was given.
+if test ${enable_bindlocal+y}
+then :
+  enableval=$enable_bindlocal;  case "$enableval" in
+  no)
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define CURL_DISABLE_BINDLOCAL 1" >>confdefs.h
+
+       ;;
+  *)   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+       ;;
+  esac
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support the form API" >&5
+printf %s "checking whether to support the form API... " >&6; }
+# Check whether --enable-form-api was given.
+if test ${enable_form_api+y}
+then :
+  enableval=$enable_form_api;  case "$enableval" in
+  no)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define CURL_DISABLE_FORM_API 1" >>confdefs.h
+
+       ;;
+  *)   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+       test "$enable_mime" = no &&
+         as_fn_error $? "MIME support needs to be enabled in order to enable form API support" "$LINENO" 5
+       ;;
+  esac
+else $as_nop
+
+  if test "$enable_mime" = no; then
+    enable_form_api=no
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define CURL_DISABLE_FORM_API 1" >>confdefs.h
+
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+  fi
+
+fi
+
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support date parsing" >&5
 printf %s "checking whether to support date parsing... " >&6; }
 # Check whether --enable-dateparse was given.
@@ -45996,14 +45401,38 @@ printf "%s\n" "yes" >&6; }
        ;;
   esac
 else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support headers-api" >&5
+printf %s "checking whether to support headers-api... " >&6; }
+# Check whether --enable-headers-api was given.
+if test ${enable_headers_api+y}
+then :
+  enableval=$enable_headers_api;  case "$enableval" in
+  no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
+       curl_headers_msg="no      (--enable-headers-api)"
+
+printf "%s\n" "#define CURL_DISABLE_HEADERS_API 1" >>confdefs.h
+
+       ;;
+  *)
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+       ;;
+  esac
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
 fi
 
 
 if test -n "$SSL_ENABLED"; then
-
         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support HSTS" >&5
 printf %s "checking whether to support HSTS... " >&6; }
   # Check whether --enable-hsts was given.
@@ -46073,13 +45502,61 @@ printf "%s\n" "$ECH_SUPPORT" >&6; }
   fi
 fi
 
+if test "x$OPENSSL_ENABLED" = "x1"; then
+  ac_fn_c_check_func "$LINENO" "SSL_set0_wbio" "ac_cv_func_SSL_set0_wbio"
+if test "x$ac_cv_func_SSL_set0_wbio" = xyes
+then :
+  printf "%s\n" "#define HAVE_SSL_SET0_WBIO 1" >>confdefs.h
+
+fi
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support WebSockets" >&5
+printf %s "checking whether to support WebSockets... " >&6; }
+# Check whether --enable-websockets was given.
+if test ${enable_websockets+y}
+then :
+  enableval=$enable_websockets;  case "$enableval" in
+  no)
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+     ;;
+  *)
+     if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+         curl_ws_msg="enabled"
+
+printf "%s\n" "#define USE_WEBSOCKETS 1" >>confdefs.h
+
+         SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WS"
+         if test "x$SSL_ENABLED" = "x1"; then
+           SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WSS"
+         fi
+         experimental="$experimental Websockets"
+     else
+                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Websockets disabled due to lack of >32 bit curl_off_t" >&5
+printf "%s\n" "$as_me: WARNING: Websockets disabled due to lack of >32 bit curl_off_t" >&2;}
+     fi
+     ;;
+  esac
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+fi
+
+
+
 
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether hiding of library internal symbols will actually happen" >&5
 printf %s "checking whether hiding of library internal symbols will actually happen... " >&6; }
   CFLAG_CURL_SYMBOL_HIDING=""
   doing_symbol_hiding="no"
-  if test x"$curl_cv_native_windows" != "xyes" &&
-    test "$want_symbol_hiding" = "yes" &&
+  if test "$want_symbol_hiding" = "yes" &&
     test "$supports_symbol_hiding" = "yes"; then
     doing_symbol_hiding="yes"
     CFLAG_CURL_SYMBOL_HIDING="$symbol_hiding_CFLAGS"
@@ -46134,6 +45611,8 @@ else
 fi
 
 
+rm $compilersh
+
 
 if test "x$OPENSSL_ENABLED" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
@@ -46185,22 +45664,21 @@ if test "x$hsts" = "xyes"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES HSTS"
 fi
 
-if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
+if test "x$CURL_DISABLE_NEGOTIATE_AUTH" != "x1" -a \
     \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
   SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
 fi
 
-if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
+if test "x$CURL_DISABLE_KERBEROS_AUTH" != "x1" -a \
     \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
   SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos"
 fi
 
 use_curl_ntlm_core=no
 
-if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
-    "x$CURL_DISABLE_NTLM" != "x1"; then
+if test "x$CURL_DISABLE_NTLM" != "x1"; then
   if test "x$OPENSSL_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
-      -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
+      -o "x$GNUTLS_ENABLED" = "x1" \
       -o "x$SECURETRANSPORT_ENABLED" = "x1" \
       -o "x$USE_WIN32_CRYPTO" = "x1" \
       -o "x$WOLFSSL_NTLM" = "x1"; then
@@ -46222,11 +45700,12 @@ if test "x$USE_TLS_SRP" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
 fi
 
-if test "x$USE_NGHTTP2" = "x1" -o "x$USE_HYPER" = "x1"; then
+if test "x$USE_NGHTTP2" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
 fi
 
-if test "x$USE_NGTCP2" = "x1" -o "x$USE_QUICHE" = "x1"; then
+if test "x$USE_NGTCP2" = "x1" -o "x$USE_QUICHE" = "x1" \
+    -o "x$USE_MSH3" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3"
 fi
 
@@ -46234,11 +45713,36 @@ if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL"
 fi
 
-if test "x$https_proxy" != "xno"; then
-  if test "x$OPENSSL_ENABLED" = "x1" -o "x$GNUTLS_ENABLED" = "x1" \
-      -o "x$NSS_ENABLED" = "x1"; then
-    SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if this build supports HTTPS-proxy" >&5
+printf %s "checking if this build supports HTTPS-proxy... " >&6; }
+if test "x$CURL_DISABLE_HTTP" != "x1"; then
+  if test "x$https_proxy" != "xno"; then
+    if test "x$OPENSSL_ENABLED" = "x1" \
+        -o "x$GNUTLS_ENABLED" = "x1" \
+        -o "x$SECURETRANSPORT_ENABLED" = "x1" \
+        -o "x$RUSTLS_ENABLED" = "x1" \
+        -o "x$BEARSSL_ENABLED" = "x1" \
+        -o "x$SCHANNEL_ENABLED" = "x1" \
+        -o "x$GNUTLS_ENABLED" = "x1" \
+        -o "x$MBEDTLS_ENABLED" = "x1"; then
+      SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+    elif test "x$WOLFSSL_ENABLED" = "x1" -a "x$WOLFSSL_FULL_BIO" = "x1"; then
+      SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+    else
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+    fi
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
   fi
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 if test "x$ECH_ENABLED" = "x1"; then
@@ -46252,6 +45756,39 @@ if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
   fi
 fi
 
+if test "$tst_atomic" = "yes"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
+elif test "x$USE_THREADS_POSIX" = "x1" -a \
+     "x$ac_cv_header_pthread_h" = "xyes"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+      #include <windows.h>
+
+int main (void)
+{
+
+      #if (WINVER < 0x600) && (_WIN32_WINNT < 0x600)
+      #error
+      #endif
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+     SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
 SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '`
 
 
@@ -46534,7 +46071,7 @@ if test "x$want_curldebug_assumed" = "xyes" &&
   ac_configure_args="$ac_configure_args --enable-curldebug"
 fi
 
-ac_config_files="$ac_config_files Makefile docs/Makefile docs/examples/Makefile docs/libcurl/Makefile docs/libcurl/opts/Makefile docs/cmdline-opts/Makefile include/Makefile include/curl/Makefile src/Makefile lib/Makefile scripts/Makefile lib/libcurl.vers tests/Makefile tests/certs/Makefile tests/certs/scripts/Makefile tests/data/Makefile tests/server/Makefile tests/libtest/Makefile tests/unit/Makefile packages/Makefile packages/vms/Makefile curl-config libcurl.pc"
+ac_config_files="$ac_config_files Makefile docs/Makefile docs/examples/Makefile docs/libcurl/Makefile docs/libcurl/opts/Makefile docs/cmdline-opts/Makefile include/Makefile include/curl/Makefile src/Makefile lib/Makefile scripts/Makefile lib/libcurl.vers lib/libcurl.plist tests/Makefile tests/config tests/certs/Makefile tests/certs/scripts/Makefile tests/data/Makefile tests/server/Makefile tests/libtest/Makefile tests/unit/Makefile tests/http/config.ini tests/http/Makefile tests/http/clients/Makefile packages/Makefile packages/vms/Makefile curl-config libcurl.pc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -46705,6 +46242,10 @@ if test -z "${DOING_NATIVE_WINDOWS_TRUE}" && test -z "${DOING_NATIVE_WINDOWS_FAL
   as_fn_error $? "conditional \"DOING_NATIVE_WINDOWS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_WINDRES_TRUE}" && test -z "${HAVE_WINDRES_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_WINDRES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_LIBZ_TRUE}" && test -z "${HAVE_LIBZ_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_LIBZ\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -46729,10 +46270,6 @@ if test -z "${USE_MANUAL_TRUE}" && test -z "${USE_MANUAL_FALSE}"; then
   as_fn_error $? "conditional \"USE_MANUAL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${USE_EMBEDDED_ARES_TRUE}" && test -z "${USE_EMBEDDED_ARES_FALSE}"; then
-  as_fn_error $? "conditional \"USE_EMBEDDED_ARES\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${BUILD_LIBHOSTNAME_TRUE}" && test -z "${BUILD_LIBHOSTNAME_FALSE}"; then
   as_fn_error $? "conditional \"BUILD_LIBHOSTNAME\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -47361,12 +46898,14 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q
 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`'
 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
@@ -47460,6 +46999,48 @@ enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_sub
 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+LD_RC='`$ECHO "$LD_RC" | $SED "$delay_single_quote_subst"`'
+reload_flag_RC='`$ECHO "$reload_flag_RC" | $SED "$delay_single_quote_subst"`'
+reload_cmds_RC='`$ECHO "$reload_cmds_RC" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_RC='`$ECHO "$old_archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
+compiler_RC='`$ECHO "$compiler_RC" | $SED "$delay_single_quote_subst"`'
+GCC_RC='`$ECHO "$GCC_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_RC='`$ECHO "$lt_prog_compiler_no_builtin_flag_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_RC='`$ECHO "$lt_prog_compiler_pic_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_RC='`$ECHO "$lt_prog_compiler_wl_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_RC='`$ECHO "$lt_prog_compiler_static_RC" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_RC='`$ECHO "$lt_cv_prog_compiler_c_o_RC" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_RC='`$ECHO "$archive_cmds_need_lc_RC" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_RC='`$ECHO "$enable_shared_with_static_runtimes_RC" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_RC='`$ECHO "$export_dynamic_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_RC='`$ECHO "$whole_archive_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_RC='`$ECHO "$compiler_needs_object_RC" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_RC='`$ECHO "$old_archive_from_new_cmds_RC" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_RC='`$ECHO "$old_archive_from_expsyms_cmds_RC" | $SED "$delay_single_quote_subst"`'
+archive_cmds_RC='`$ECHO "$archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_RC='`$ECHO "$archive_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
+module_cmds_RC='`$ECHO "$module_cmds_RC" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_RC='`$ECHO "$module_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_RC='`$ECHO "$with_gnu_ld_RC" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_RC='`$ECHO "$allow_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_RC='`$ECHO "$no_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_RC='`$ECHO "$hardcode_libdir_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_RC='`$ECHO "$hardcode_libdir_separator_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_RC='`$ECHO "$hardcode_direct_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_RC='`$ECHO "$hardcode_direct_absolute_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_RC='`$ECHO "$hardcode_minus_L_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_RC='`$ECHO "$hardcode_shlibpath_var_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_RC='`$ECHO "$hardcode_automatic_RC" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_RC='`$ECHO "$inherit_rpath_RC" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_RC='`$ECHO "$link_all_deplibs_RC" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_RC='`$ECHO "$always_export_symbols_RC" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_RC='`$ECHO "$export_symbols_cmds_RC" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_RC='`$ECHO "$exclude_expsyms_RC" | $SED "$delay_single_quote_subst"`'
+include_expsyms_RC='`$ECHO "$include_expsyms_RC" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_RC='`$ECHO "$prelink_cmds_RC" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_RC='`$ECHO "$postlink_cmds_RC" | $SED "$delay_single_quote_subst"`'
+file_list_spec_RC='`$ECHO "$file_list_spec_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_action_RC='`$ECHO "$hardcode_action_RC" | $SED "$delay_single_quote_subst"`'
 
 LTCC='$LTCC'
 LTCFLAGS='$LTCFLAGS'
@@ -47490,13 +47071,13 @@ LN_S \
 lt_SP2NL \
 lt_NL2SP \
 reload_flag \
+FILECMD \
 deplibs_check_method \
 file_magic_cmd \
 file_magic_glob \
 want_nocaseglob \
 sharedlib_from_linklib_cmd \
 AR \
-AR_FLAGS \
 archiver_list_spec \
 STRIP \
 RANLIB \
@@ -47542,7 +47123,26 @@ soname_spec \
 install_override_mode \
 finish_eval \
 old_striplib \
-striplib; do
+striplib \
+LD_RC \
+reload_flag_RC \
+compiler_RC \
+lt_prog_compiler_no_builtin_flag_RC \
+lt_prog_compiler_pic_RC \
+lt_prog_compiler_wl_RC \
+lt_prog_compiler_static_RC \
+lt_cv_prog_compiler_c_o_RC \
+export_dynamic_flag_spec_RC \
+whole_archive_flag_spec_RC \
+compiler_needs_object_RC \
+with_gnu_ld_RC \
+allow_undefined_flag_RC \
+no_undefined_flag_RC \
+hardcode_libdir_flag_spec_RC \
+hardcode_libdir_separator_RC \
+exclude_expsyms_RC \
+include_expsyms_RC \
+file_list_spec_RC; do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
@@ -47573,7 +47173,18 @@ postuninstall_cmds \
 finish_cmds \
 sys_lib_search_path_spec \
 configure_time_dlsearch_path \
-configure_time_lt_sys_library_path; do
+configure_time_lt_sys_library_path \
+reload_cmds_RC \
+old_archive_cmds_RC \
+old_archive_from_new_cmds_RC \
+old_archive_from_expsyms_cmds_RC \
+archive_cmds_RC \
+archive_expsym_cmds_RC \
+module_cmds_RC \
+module_expsym_cmds_RC \
+export_symbols_cmds_RC \
+prelink_cmds_RC \
+postlink_cmds_RC; do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
@@ -47601,6 +47212,8 @@ fi
 
 
 
+
+
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
     "lib/libcurl.vers") CONFIG_FILES="$CONFIG_FILES lib/libcurl.vers" ;;
+    "lib/libcurl.plist") CONFIG_FILES="$CONFIG_FILES lib/libcurl.plist" ;;
     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+    "tests/config") CONFIG_FILES="$CONFIG_FILES tests/config" ;;
     "tests/certs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/certs/Makefile" ;;
     "tests/certs/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES tests/certs/scripts/Makefile" ;;
     "tests/data/Makefile") CONFIG_FILES="$CONFIG_FILES tests/data/Makefile" ;;
     "tests/server/Makefile") CONFIG_FILES="$CONFIG_FILES tests/server/Makefile" ;;
     "tests/libtest/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libtest/Makefile" ;;
     "tests/unit/Makefile") CONFIG_FILES="$CONFIG_FILES tests/unit/Makefile" ;;
+    "tests/http/config.ini") CONFIG_FILES="$CONFIG_FILES tests/http/config.ini" ;;
+    "tests/http/Makefile") CONFIG_FILES="$CONFIG_FILES tests/http/Makefile" ;;
+    "tests/http/clients/Makefile") CONFIG_FILES="$CONFIG_FILES tests/http/clients/Makefile" ;;
     "packages/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Makefile" ;;
     "packages/vms/Makefile") CONFIG_FILES="$CONFIG_FILES packages/vms/Makefile" ;;
     "curl-config") CONFIG_FILES="$CONFIG_FILES curl-config" ;;
@@ -48370,7 +47988,7 @@ See \`config.log' for more details" "$LINENO" 5; }
 
 
 # The names of the tagged configurations supported by this script.
-available_tags=''
+available_tags='RC '
 
 # Configured defaults for sys_lib_dlsearch_path munging.
 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
@@ -48469,6 +48087,9 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd
 # convert \$build files to toolchain format.
 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
 
+# A file(cmd) program that detects file types.
+FILECMD=$lt_FILECMD
+
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
 
@@ -48487,8 +48108,11 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
 # The archiver.
 AR=$lt_AR
 
+# Flags to create an archive (by configure).
+lt_ar_flags=$lt_ar_flags
+
 # Flags to create an archive.
-AR_FLAGS=$lt_AR_FLAGS
+AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
 
 # How to feed a file listing to the archiver.
 archiver_list_spec=$lt_archiver_list_spec
@@ -48864,13 +48488,152 @@ ltmain=$ac_aux_dir/ltmain.sh
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" \
+  $SED '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
    mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 
+
+    cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: RC
+
+# The linker used to build libraries.
+LD=$lt_LD_RC
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_RC
+reload_cmds=$lt_reload_cmds_RC
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_RC
+
+# A language specific compiler.
+CC=$lt_compiler_RC
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_RC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_RC
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_RC
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_RC
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_RC
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_RC
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_RC
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_RC
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_RC
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_RC
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_RC
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_RC
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_RC
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_RC
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_RC
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_RC
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_RC
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_RC
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_RC
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_RC
+
+# ### END LIBTOOL TAG CONFIG: RC
+_LT_EOF
+
  ;;
 
   esac
@@ -48905,149 +48668,6 @@ if test "$no_create" != yes; then
   # would make configure fail if this is the last instruction.
   $ac_cs_success || as_fn_exit 1
 fi
-
-#
-# CONFIG_SUBDIRS section.
-#
-if test "$no_recursion" != yes; then
-
-  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
-  # so they do not pile up.
-  ac_sub_configure_args=
-  ac_prev=
-  eval "set x $ac_configure_args"
-  shift
-  for ac_arg
-  do
-    if test -n "$ac_prev"; then
-      ac_prev=
-      continue
-    fi
-    case $ac_arg in
-    -cache-file | --cache-file | --cache-fil | --cache-fi \
-    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-      ac_prev=cache_file ;;
-    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
-    | --c=*)
-      ;;
-    --config-cache | -C)
-      ;;
-    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-      ac_prev=srcdir ;;
-    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-      ;;
-    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-      ac_prev=prefix ;;
-    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-      ;;
-    --disable-option-checking)
-      ;;
-    *)
-      case $ac_arg in
-      *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-      esac
-      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
-    esac
-  done
-
-  # Always prepend --prefix to ensure using the same prefix
-  # in subdir configurations.
-  ac_arg="--prefix=$prefix"
-  case $ac_arg in
-  *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-  esac
-  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
-
-  # Pass --silent
-  if test "$silent" = yes; then
-    ac_sub_configure_args="--silent $ac_sub_configure_args"
-  fi
-
-  # Always prepend --disable-option-checking to silence warnings, since
-  # different subdirs can have different --enable and --with options.
-  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
-
-  ac_popdir=`pwd`
-  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    test -d "$srcdir/$ac_dir" || continue
-
-    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
-    printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
-    printf "%s\n" "$ac_msg" >&6
-    as_dir="$ac_dir"; as_fn_mkdir_p
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-    cd "$ac_dir"
-
-    # Check for configure.gnu first; this name is used for a wrapper for
-    # Metaconfig's "Configure" on case-insensitive file systems.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      ac_sub_configure=$ac_srcdir/configure.gnu
-    elif test -f "$ac_srcdir/configure"; then
-      ac_sub_configure=$ac_srcdir/configure
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
-printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
-      ac_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$ac_sub_configure"; then
-      # Make the cache file name correct relative to the subdirectory.
-      case $cache_file in
-      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
-      *) # Relative name.
-       ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
-      esac
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
-      # The eval makes quoting arguments work.
-      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
-          --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
-       as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
-    fi
-
-    cd "$ac_popdir"
-  done
-fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
@@ -49086,111 +48706,6 @@ use vars qw(
 _EOF
 
 
-
-## ---------------------------------- ##
-##  Start of distclean amending code  ##
-## ---------------------------------- ##
-
-for xc_subdir in lib src tests/unit tests/server tests/libtest docs/examples
-do
-
-if test ! -f "$xc_subdir/Makefile"; then
-  echo "$xc_msg_err $xc_subdir/Makefile file not found. $xc_msg_abrt" >&2
-  exit 1
-fi
-
-# Fetch dependency tracking file list from Makefile include lines.
-
-xc_inc_lines=`grep '^include .*(DEPDIR)' "$xc_subdir/Makefile" 2>/dev/null`
-xc_cnt_words=`echo "$xc_inc_lines" | wc -w | tr -d "$xc_space$xc_tab"`
-
-# --disable-dependency-tracking might have been used, consequently
-# there is nothing to amend without a dependency tracking file list.
-
-if test $xc_cnt_words -gt 0; then
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: amending $xc_subdir/Makefile" >&5
-printf "%s\n" "$as_me: amending $xc_subdir/Makefile" >&6;}
-
-# Build Makefile specific patch hunk.
-
-xc_p="$xc_subdir/xc_patch.tmp"
-
-xc_rm_depfiles=`echo "$xc_inc_lines" \
-  | $SED 's%include%   -rm -f%' 2>/dev/null`
-
-xc_dep_subdirs=`echo "$xc_inc_lines" \
-  | $SED 's%include[ ][ ]*%%' 2>/dev/null \
-  | $SED 's%(DEPDIR)/.*%(DEPDIR)%' 2>/dev/null \
-  | sort | uniq`
-
-echo "$xc_rm_depfiles" >$xc_p
-
-for xc_dep_dir in $xc_dep_subdirs; do
-  echo "${xc_tab}@xm_dep_cnt=\`ls $xc_dep_dir | wc -l 2>/dev/null\`; \\"            >>$xc_p
-  echo "${xc_tab}if test \$\$xm_dep_cnt -eq 0 && test -d $xc_dep_dir; then \\"      >>$xc_p
-  echo "${xc_tab}  rm -rf $xc_dep_dir; \\"                                          >>$xc_p
-  echo "${xc_tab}fi"                                                                >>$xc_p
-done
-
-# Build Makefile patching sed scripts.
-
-xc_s1="$xc_subdir/xc_script_1.tmp"
-xc_s2="$xc_subdir/xc_script_2.tmp"
-xc_s3="$xc_subdir/xc_script_3.tmp"
-
-cat >$xc_s1 <<\_EOT
-/^distclean[ ]*:/,/^[^ ][^     ]*:/{
-  s/^.*(DEPDIR)/___xc_depdir_line___/
-}
-/^maintainer-clean[ ]*:/,/^[^  ][^     ]*:/{
-  s/^.*(DEPDIR)/___xc_depdir_line___/
-}
-_EOT
-
-cat >$xc_s2 <<\_EOT
-/___xc_depdir_line___$/{
-  N
-  /___xc_depdir_line___$/D
-}
-_EOT
-
-cat >$xc_s3 <<_EOT
-/^___xc_depdir_line___/{
-  r $xc_p
-  d
-}
-_EOT
-
-# Apply patch to Makefile and cleanup.
-
-$SED -f "$xc_s1" "$xc_subdir/Makefile"      >"$xc_subdir/Makefile.tmp1"
-$SED -f "$xc_s2" "$xc_subdir/Makefile.tmp1" >"$xc_subdir/Makefile.tmp2"
-$SED -f "$xc_s3" "$xc_subdir/Makefile.tmp2" >"$xc_subdir/Makefile.tmp3"
-
-if test -f "$xc_subdir/Makefile.tmp3"; then
-  mv -f "$xc_subdir/Makefile.tmp3" "$xc_subdir/Makefile"
-fi
-
-test -f "$xc_subdir/Makefile.tmp1" && rm -f "$xc_subdir/Makefile.tmp1"
-test -f "$xc_subdir/Makefile.tmp2" && rm -f "$xc_subdir/Makefile.tmp2"
-test -f "$xc_subdir/Makefile.tmp3" && rm -f "$xc_subdir/Makefile.tmp3"
-
-test -f "$xc_p"  && rm -f "$xc_p"
-test -f "$xc_s1" && rm -f "$xc_s1"
-test -f "$xc_s2" && rm -f "$xc_s2"
-test -f "$xc_s3" && rm -f "$xc_s3"
-
-fi
-
-done
-
-## -------------------------------- ##
-##  End of distclean amending code  ##
-## -------------------------------- ##
-
-
-
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Configured to build curl/libcurl:
 
   Host setup:       ${host}
@@ -49229,11 +48744,13 @@ done
   RTMP:             ${curl_rtmp_msg}
   PSL:              ${curl_psl_msg}
   Alt-svc:          ${curl_altsvc_msg}
+  Headers API:      ${curl_headers_msg}
   HSTS:             ${curl_hsts_msg}
   HTTP1:            ${curl_h1_msg}
   HTTP2:            ${curl_h2_msg}
   HTTP3:            ${curl_h3_msg}
   ECH:              ${curl_ech_msg}
+  WebSockets:       ${curl_ws_msg}
   Protocols:        ${SUPPORT_PROTOCOLS}
   Features:         ${SUPPORT_FEATURES}
 " >&5
@@ -49275,11 +48792,13 @@ printf "%s\n" "$as_me: Configured to build curl/libcurl:
   RTMP:             ${curl_rtmp_msg}
   PSL:              ${curl_psl_msg}
   Alt-svc:          ${curl_altsvc_msg}
+  Headers API:      ${curl_headers_msg}
   HSTS:             ${curl_hsts_msg}
   HTTP1:            ${curl_h1_msg}
   HTTP2:            ${curl_h2_msg}
   HTTP3:            ${curl_h3_msg}
   ECH:              ${curl_ech_msg}
+  WebSockets:       ${curl_ws_msg}
   Protocols:        ${SUPPORT_PROTOCOLS}
   Features:         ${SUPPORT_FEATURES}
 " >&6;}