[CVE-2017-9502] url: fix buffer overwrite with file protocol
[platform/upstream/curl.git] / configure
index cb00bd6..b7030ff 100755 (executable)
--- a/configure
+++ b/configure
@@ -930,7 +930,6 @@ USE_GNUTLS
 HAVE_OPENSSL_SRP
 RANDOM_FILE
 SSL_LIBS
-PKGCONFIG
 USE_DARWINSSL
 USE_WINDOWS_SSPI
 USE_SCHANNEL
@@ -939,6 +938,7 @@ ZLIB_LIBS
 HAVE_LIBZ_FALSE
 HAVE_LIBZ_TRUE
 HAVE_LIBZ
+PKGCONFIG
 CURL_DISABLE_GOPHER
 CURL_DISABLE_SMTP
 CURL_DISABLE_SMB
@@ -1168,10 +1168,11 @@ with_libssh2
 with_librtmp
 enable_versioned_symbols
 with_winidn
-with_libidn
+with_libidn2
 with_nghttp2
 with_zsh_functions_dir
 enable_threaded_resolver
+enable_pthreads
 enable_verbose
 enable_sspi
 enable_crypto_auth
@@ -1899,6 +1900,8 @@ Optional Features:
                           Enable threaded resolver
   --disable-threaded-resolver
                           Disable threaded resolver
+  --enable-pthreads       Enable POSIX threads (default for threaded resolver)
+  --disable-pthreads      Disable POSIX threads
   --enable-verbose        Enable verbose strings
   --disable-verbose       Disable verbose strings
   --enable-sspi           Enable SSPI
@@ -1940,8 +1943,8 @@ Optional Packages:
   --with-gssapi=DIR       Where to look for GSS-API
   --with-winssl           enable Windows native SSL/TLS
   --without-winssl        disable Windows native SSL/TLS
-  --with-darwinssl        enable iOS/Mac OS X native SSL/TLS
-  --without-darwinssl     disable iOS/Mac OS X native SSL/TLS
+  --with-darwinssl        enable Apple OS native SSL/TLS
+  --without-darwinssl     disable Apple OS native SSL/TLS
   --with-ssl=PATH         Where to look for OpenSSL, PATH points to the SSL
                           installation (default: /usr/local/ssl); when
                           possible, set the PKG_CONFIG_PATH environment
@@ -1996,8 +1999,8 @@ Optional Packages:
   --without-librtmp       disable LIBRTMP
   --with-winidn=PATH      enable Windows native IDN
   --without-winidn        disable Windows native IDN
-  --with-libidn=PATH      Enable libidn usage
-  --without-libidn        Disable libidn usage
+  --with-libidn2=PATH     Enable libidn2 usage
+  --without-libidn2       Disable libidn2 usage
   --with-nghttp2=PATH     Enable nghttp2 usage
   --without-nghttp2       Disable nghttp2 usage
   --with-zsh-functions-dir=PATH
@@ -5627,7 +5630,7 @@ VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/in
 
 
 PKGADD_PKG="HAXXcurl"
-PKGADD_NAME="cURL - a client that groks URLs"
+PKGADD_NAME="curl - a client that groks URLs"
 PKGADD_VENDOR="curl.haxx.se"
 
 
@@ -5641,7 +5644,7 @@ curl_tls_srp_msg="no      (--enable-tls-srp)"
     curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
    curl_ipv6_msg="no      (--enable-ipv6)"
 curl_unix_sockets_msg="no      (--enable-unix-sockets)"
-    curl_idn_msg="no      (--with-{libidn,winidn})"
+    curl_idn_msg="no      (--with-{libidn2,winidn})"
  curl_manual_msg="no      (--enable-manual)"
 curl_libcurl_msg="enabled (--disable-libcurl-option)"
 curl_verbose_msg="enabled (--disable-verbose)"
@@ -6078,12 +6081,15 @@ $as_echo "$cpp_p" >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: failed to figure out cpp -P alternative" >&5
 $as_echo "$as_me: WARNING: failed to figure out cpp -P alternative" >&2;}
       # without -P
-      CPPPFLAGS=$OLDCPPFLAGS
+      CPPPFLAG=""
     else
       # with -P
-      CPPPFLAGS=$CPPFLAGS
+      CPPPFLAG="-P"
     fi
         CPPFLAGS=$OLDCPPFLAGS
+  else
+    # without -P
+    CPPPFLAG=""
   fi
 
 
@@ -6245,8 +6251,8 @@ if ac_fn_c_try_compile "$LINENO"; then :
       else
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # CPPPFLAG comes from CURL_CPP_P
+  CPPFLAGS="$CPPFLAGS $CPPPFLAG"
   as_ac_HaveDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh`
   as_ac_Def=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh`
   if test -z "$SED"; then
@@ -6363,8 +6369,8 @@ if ac_fn_c_try_compile "$LINENO"; then :
       else
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # CPPPFLAG comes from CURL_CPP_P
+  CPPFLAGS="$CPPFLAGS $CPPPFLAG"
   as_ac_HaveDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh`
   as_ac_Def=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh`
   if test -z "$SED"; then
@@ -16130,8 +16136,8 @@ esac
 $as_echo_n "checking if compiler is DEC/Compaq/HP C... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16174,8 +16180,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
 
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16237,8 +16243,8 @@ $as_echo "no" >&6; }
 $as_echo_n "checking if compiler is HP-UX C... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16299,8 +16305,8 @@ $as_echo "no" >&6; }
 $as_echo_n "checking if compiler is IBM C... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16369,8 +16375,8 @@ $as_echo "no" >&6; }
 $as_echo_n "checking if compiler is Intel C... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16417,8 +16423,8 @@ $as_echo "yes" >&6; }
     compiler_num="$curl_cv_def___INTEL_COMPILER"
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16493,8 +16499,8 @@ $as_echo "no" >&6; }
 $as_echo_n "checking if compiler is clang... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16566,8 +16572,8 @@ $as_echo "no" >&6; }
 $as_echo_n "checking if compiler is GNU C... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16632,8 +16638,8 @@ $as_echo "yes" >&6; }
     flags_opt_off="-O0"
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16684,8 +16690,8 @@ $as_echo "no" >&6; }
 $as_echo_n "checking if compiler is LCC... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16746,8 +16752,8 @@ $as_echo "no" >&6; }
 $as_echo_n "checking if compiler is SGI MIPSpro C... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16790,8 +16796,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
 
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16834,8 +16840,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
 
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16898,8 +16904,8 @@ $as_echo "no" >&6; }
 $as_echo_n "checking if compiler is SGI MIPS C... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -16942,8 +16948,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
 
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -17006,8 +17012,8 @@ $as_echo "no" >&6; }
 $as_echo_n "checking if compiler is SunPro C... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -17068,8 +17074,8 @@ $as_echo "no" >&6; }
 $as_echo_n "checking if compiler is Tiny C... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -17130,8 +17136,8 @@ $as_echo "no" >&6; }
 $as_echo_n "checking if compiler is Watcom C... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -17177,8 +17183,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
 $as_echo "yes" >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -17251,7 +17257,7 @@ $as_echo "no" >&6; }
 ***
 *** Whatever settings are present in CFLAGS will be used for this run.
 ***
-*** If you wish to help the cURL project to better support your compiler
+*** If you wish to help the curl project to better support your compiler
 *** you can report this and the required info on the libcurl development
 *** mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/
 ***
@@ -18485,7 +18491,7 @@ $as_echo_n "checking if compiler supports hiding library internal symbols... " >
       ;;
     GNU_C)
             if test "$compiler_num" -ge "304"; then
-        if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
+        if $CC --help --verbose 2>/dev/null | grep fvisibility= >/dev/null ; then
           tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
           tmp_CFLAGS="-fvisibility=hidden"
           supports_symbol_hiding="yes"
@@ -18702,7 +18708,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
 $as_echo_n "checking for windows.h... " >&6; }
-if ${ac_cv_header_windows_h+:} false; then :
+if ${curl_cv_header_windows_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -18732,19 +18738,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_windows_h="yes"
+      curl_cv_header_windows_h="yes"
 
 else
 
-      ac_cv_header_windows_h="no"
+      curl_cv_header_windows_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_windows_h" >&5
-$as_echo "$ac_cv_header_windows_h" >&6; }
-  case "$ac_cv_header_windows_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_windows_h" >&5
+$as_echo "$curl_cv_header_windows_h" >&6; }
+  case "$curl_cv_header_windows_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -18762,12 +18768,12 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build target is a native Windows one" >&5
 $as_echo_n "checking whether build target is a native Windows one... " >&6; }
-if ${ac_cv_native_windows+:} false; then :
+if ${curl_cv_native_windows+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-    if test "$ac_cv_header_windows_h" = "no"; then
-      ac_cv_native_windows="no"
+    if test "$curl_cv_header_windows_h" = "no"; then
+      curl_cv_native_windows="no"
     else
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -18791,20 +18797,20 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-        ac_cv_native_windows="yes"
+        curl_cv_native_windows="yes"
 
 else
 
-        ac_cv_native_windows="no"
+        curl_cv_native_windows="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_native_windows" >&5
-$as_echo "$ac_cv_native_windows" >&6; }
-   if test "x$ac_cv_native_windows" = xyes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_native_windows" >&5
+$as_echo "$curl_cv_native_windows" >&6; }
+   if test "x$curl_cv_native_windows" = xyes; then
   DOING_NATIVE_WINDOWS_TRUE=
   DOING_NATIVE_WINDOWS_FALSE='#'
 else
@@ -18813,12 +18819,12 @@ else
 fi
 
 
-case X-"$ac_cv_native_windows" in
+case X-"$curl_cv_native_windows" in
   X-yes)
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock.h" >&5
 $as_echo_n "checking for winsock.h... " >&6; }
-if ${ac_cv_header_winsock_h+:} false; then :
+if ${curl_cv_header_winsock_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -18849,19 +18855,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_winsock_h="yes"
+      curl_cv_header_winsock_h="yes"
 
 else
 
-      ac_cv_header_winsock_h="no"
+      curl_cv_header_winsock_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winsock_h" >&5
-$as_echo "$ac_cv_header_winsock_h" >&6; }
-  case "$ac_cv_header_winsock_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock_h" >&5
+$as_echo "$curl_cv_header_winsock_h" >&6; }
+  case "$curl_cv_header_winsock_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -18874,7 +18880,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
 $as_echo_n "checking for winsock2.h... " >&6; }
-if ${ac_cv_header_winsock2_h+:} false; then :
+if ${curl_cv_header_winsock2_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -18905,19 +18911,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_winsock2_h="yes"
+      curl_cv_header_winsock2_h="yes"
 
 else
 
-      ac_cv_header_winsock2_h="no"
+      curl_cv_header_winsock2_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winsock2_h" >&5
-$as_echo "$ac_cv_header_winsock2_h" >&6; }
-  case "$ac_cv_header_winsock2_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock2_h" >&5
+$as_echo "$curl_cv_header_winsock2_h" >&6; }
+  case "$curl_cv_header_winsock2_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -18930,7 +18936,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ws2tcpip.h" >&5
 $as_echo_n "checking for ws2tcpip.h... " >&6; }
-if ${ac_cv_header_ws2tcpip_h+:} false; then :
+if ${curl_cv_header_ws2tcpip_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -18962,19 +18968,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_ws2tcpip_h="yes"
+      curl_cv_header_ws2tcpip_h="yes"
 
 else
 
-      ac_cv_header_ws2tcpip_h="no"
+      curl_cv_header_ws2tcpip_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_ws2tcpip_h" >&5
-$as_echo "$ac_cv_header_ws2tcpip_h" >&6; }
-  case "$ac_cv_header_ws2tcpip_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ws2tcpip_h" >&5
+$as_echo "$curl_cv_header_ws2tcpip_h" >&6; }
+  case "$curl_cv_header_ws2tcpip_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -18987,7 +18993,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winldap.h" >&5
 $as_echo_n "checking for winldap.h... " >&6; }
-if ${ac_cv_header_winldap_h+:} false; then :
+if ${curl_cv_header_winldap_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -19021,19 +19027,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_winldap_h="yes"
+      curl_cv_header_winldap_h="yes"
 
 else
 
-      ac_cv_header_winldap_h="no"
+      curl_cv_header_winldap_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winldap_h" >&5
-$as_echo "$ac_cv_header_winldap_h" >&6; }
-  case "$ac_cv_header_winldap_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winldap_h" >&5
+$as_echo "$curl_cv_header_winldap_h" >&6; }
+  case "$curl_cv_header_winldap_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -19046,7 +19052,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winber.h" >&5
 $as_echo_n "checking for winber.h... " >&6; }
-if ${ac_cv_header_winber_h+:} false; then :
+if ${curl_cv_header_winber_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -19082,19 +19088,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_winber_h="yes"
+      curl_cv_header_winber_h="yes"
 
 else
 
-      ac_cv_header_winber_h="no"
+      curl_cv_header_winber_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winber_h" >&5
-$as_echo "$ac_cv_header_winber_h" >&6; }
-  case "$ac_cv_header_winber_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winber_h" >&5
+$as_echo "$curl_cv_header_winber_h" >&6; }
+  case "$curl_cv_header_winber_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -19106,18 +19112,18 @@ _ACEOF
 
     ;;
   *)
-    ac_cv_header_winsock_h="no"
-    ac_cv_header_winsock2_h="no"
-    ac_cv_header_ws2tcpip_h="no"
-    ac_cv_header_winldap_h="no"
-    ac_cv_header_winber_h="no"
+    curl_cv_header_winsock_h="no"
+    curl_cv_header_winsock2_h="no"
+    curl_cv_header_ws2tcpip_h="no"
+    curl_cv_header_winldap_h="no"
+    curl_cv_header_winber_h="no"
     ;;
 esac
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build target supports WIN32 file API" >&5
 $as_echo_n "checking whether build target supports WIN32 file API... " >&6; }
   curl_win32_file_api="no"
-  if test "$ac_cv_header_windows_h" = "yes"; then
+  if test "$curl_cv_header_windows_h" = "yes"; then
     if test x"$enable_largefile" != "xno"; then
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -19201,6 +19207,63 @@ $as_echo "no" >&6; }
   esac
 
 
+
+
+  tst_cflags="no"
+  case $host_os in
+    darwin*)
+      tst_cflags="yes"
+      ;;
+  esac
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good-to-use Mac CFLAGS" >&5
+$as_echo_n "checking for good-to-use Mac CFLAGS... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_cflags" >&5
+$as_echo "$tst_cflags" >&6; };
+
+  if test "$tst_cflags" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for *version-min in CFLAGS" >&5
+$as_echo_n "checking for *version-min in CFLAGS... " >&6; }
+    min=""
+    if test -z "$(echo $CFLAGS | grep m.*os.*-version-min)"; then
+      min="-mmacosx-version-min=10.8"
+      CFLAGS="$CFLAGS $min"
+    fi
+    if test -z "$min"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: set by user" >&5
+$as_echo "set by user" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $min set" >&5
+$as_echo "$min set" >&6; }
+    fi
+
+    old_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror=partial-availability"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Werror=partial-availability" >&5
+$as_echo_n "checking whether $CC accepts -Werror=partial-availability... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      CFLAGS=$old_CFLAGS
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  fi
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support http" >&5
 $as_echo_n "checking whether to support http... " >&6; }
 # Check whether --enable-http was given.
@@ -19901,8 +19964,8 @@ fi
 
 if test "$HAVE_GETHOSTBYNAME" != "1"
 then
-    if test "$ac_cv_header_windows_h" = "yes"; then
-    if test "$ac_cv_header_winsock_h" = "yes"; then
+    if test "$curl_cv_header_windows_h" = "yes"; then
+    if test "$curl_cv_header_winsock_h" = "yes"; then
       case $host in
         *-*-mingw32ce*)
           winsock_LIB="-lwinsock"
@@ -19912,7 +19975,7 @@ then
           ;;
       esac
     fi
-    if test "$ac_cv_header_winsock2_h" = "yes"; then
+    if test "$curl_cv_header_winsock2_h" = "yes"; then
       winsock_LIB="-lws2_32"
     fi
     if test ! -z "$winsock_LIB"; then
@@ -20133,96 +20196,6 @@ if test "$HAVE_GETHOSTBYNAME" != "1"; then
   as_fn_error $? "couldn't find libraries for gethostbyname()" "$LINENO" 5
 fi
 
-ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
-if test "x$ac_cv_func_strcasecmp" = xyes; then :
-
-else
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolve" >&5
-$as_echo_n "checking for strcasecmp in -lresolve... " >&6; }
-if ${ac_cv_lib_resolve_strcasecmp+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolve  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char strcasecmp ();
-int main (void)
-{
-return strcasecmp ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_resolve_strcasecmp=yes
-else
-  ac_cv_lib_resolve_strcasecmp=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolve_strcasecmp" >&5
-$as_echo "$ac_cv_lib_resolve_strcasecmp" >&6; }
-if test "x$ac_cv_lib_resolve_strcasecmp" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLVE 1
-_ACEOF
-
-  LIBS="-lresolve $LIBS"
-
-fi
-
-fi
-
-
-if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolve" >&5
-$as_echo_n "checking for strcasecmp in -lresolve... " >&6; }
-if ${ac_cv_lib_resolve_strcasecmp+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolve -lnsl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char strcasecmp ();
-int main (void)
-{
-return strcasecmp ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_resolve_strcasecmp=yes
-else
-  ac_cv_lib_resolve_strcasecmp=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolve_strcasecmp" >&5
-$as_echo "$ac_cv_lib_resolve_strcasecmp" >&6; }
-if test "x$ac_cv_lib_resolve_strcasecmp" = xyes; then :
-  LIBS="-lresolve $LIBS"
-fi
-
-fi
-ac_cv_func_strcasecmp="no"
-
 
 curl_includes_winsock2="\
 /* includes start */
@@ -20243,7 +20216,7 @@ curl_includes_winsock2="\
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
 $as_echo_n "checking for windows.h... " >&6; }
-if ${ac_cv_header_windows_h+:} false; then :
+if ${curl_cv_header_windows_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -20273,19 +20246,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_windows_h="yes"
+      curl_cv_header_windows_h="yes"
 
 else
 
-      ac_cv_header_windows_h="no"
+      curl_cv_header_windows_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_windows_h" >&5
-$as_echo "$ac_cv_header_windows_h" >&6; }
-  case "$ac_cv_header_windows_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_windows_h" >&5
+$as_echo "$curl_cv_header_windows_h" >&6; }
+  case "$curl_cv_header_windows_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -20303,7 +20276,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock.h" >&5
 $as_echo_n "checking for winsock.h... " >&6; }
-if ${ac_cv_header_winsock_h+:} false; then :
+if ${curl_cv_header_winsock_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -20334,19 +20307,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_winsock_h="yes"
+      curl_cv_header_winsock_h="yes"
 
 else
 
-      ac_cv_header_winsock_h="no"
+      curl_cv_header_winsock_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winsock_h" >&5
-$as_echo "$ac_cv_header_winsock_h" >&6; }
-  case "$ac_cv_header_winsock_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock_h" >&5
+$as_echo "$curl_cv_header_winsock_h" >&6; }
+  case "$curl_cv_header_winsock_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -20359,7 +20332,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
 $as_echo_n "checking for winsock2.h... " >&6; }
-if ${ac_cv_header_winsock2_h+:} false; then :
+if ${curl_cv_header_winsock2_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -20390,19 +20363,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_winsock2_h="yes"
+      curl_cv_header_winsock2_h="yes"
 
 else
 
-      ac_cv_header_winsock2_h="no"
+      curl_cv_header_winsock2_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winsock2_h" >&5
-$as_echo "$ac_cv_header_winsock2_h" >&6; }
-  case "$ac_cv_header_winsock2_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock2_h" >&5
+$as_echo "$curl_cv_header_winsock2_h" >&6; }
+  case "$curl_cv_header_winsock2_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -20523,7 +20496,7 @@ done
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for monotonic clock_gettime" >&5
 $as_echo_n "checking for monotonic clock_gettime... " >&6; }
   #
-  if test "x$dontwant_rt" == "xno" ; then
+  if test "x$dontwant_rt" = "xno" ; then
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -20557,13 +20530,13 @@ if ac_fn_c_try_compile "$LINENO"; then :
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-      ac_cv_func_clock_gettime="yes"
+      curl_func_clock_gettime="yes"
 
 else
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-      ac_cv_func_clock_gettime="no"
+      curl_func_clock_gettime="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -20571,7 +20544,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
     #
-  if test "$ac_cv_func_clock_gettime" = "yes"; then
+  if test "$curl_func_clock_gettime" = "yes"; then
     #
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in libraries" >&5
 $as_echo_n "checking for clock_gettime in libraries... " >&6; }
@@ -20633,12 +20606,12 @@ rm -f core conftest.err conftest.$ac_objext \
 $as_echo "cannot find clock_gettime" >&6; }
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&5
 $as_echo "$as_me: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&2;}
-        ac_cv_func_clock_gettime="no"
+        curl_func_clock_gettime="no"
         ;;
       X-)
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no additional lib required" >&5
 $as_echo "no additional lib required" >&6; }
-        ac_cv_func_clock_gettime="yes"
+        curl_func_clock_gettime="yes"
         ;;
       *)
         if test -z "$curl_cv_save_LIBS"; then
@@ -20648,12 +20621,12 @@ $as_echo "no additional lib required" >&6; }
         fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_gclk_LIBS" >&5
 $as_echo "$curl_cv_gclk_LIBS" >&6; }
-        ac_cv_func_clock_gettime="yes"
+        curl_func_clock_gettime="yes"
         ;;
     esac
     #
         if test "x$cross_compiling" != "xyes" &&
-      test "$ac_cv_func_clock_gettime" = "yes"; then
+      test "$curl_func_clock_gettime" = "yes"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if monotonic clock_gettime works" >&5
 $as_echo_n "checking if monotonic clock_gettime works... " >&6; }
       if test "$cross_compiling" = yes; then :
@@ -20708,7 +20681,7 @@ else
 $as_echo "no" >&6; }
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&5
 $as_echo "$as_me: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&2;}
-        ac_cv_func_clock_gettime="no"
+        curl_func_clock_gettime="no"
         LIBS="$curl_cv_save_LIBS"
 
 fi
@@ -20718,7 +20691,7 @@ fi
 
     fi
     #
-    case "$ac_cv_func_clock_gettime" in
+    case "$curl_func_clock_gettime" in
       yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -20755,9 +20728,147 @@ else
     OPT_ZLIB=""
   fi
 
+
+    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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$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
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib options with pkg-config" >&5
+$as_echo_n "checking for zlib options with pkg-config... " >&6; }
+            itexists=`
+    if test -n ""; then
+      PKG_CONFIG_LIBDIR=""
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --exists zlib >/dev/null 2>&1 && echo 1`
+
+      if test -z "$itexists"; then
+                        PKGCONFIG="no"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+      fi
+    fi
+
+
+  if test "$PKGCONFIG" != "no" ; then
+    LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS"
+    LDFLAGS="`$PKGCONFIG --libs-only-L zlib` $LDFLAGS"
+    CPPFLAGS="`$PKGCONFIG --cflags-only-I zlib` $CPPFLAGS"
+    OPT_ZLIB=""
+    HAVE_LIBZ="1"
+  fi
+
   if test -z "$OPT_ZLIB" ; then
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5
+    if test -z "$HAVE_LIBZ"; then
+
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5
 $as_echo_n "checking for inflateEnd in -lz... " >&6; }
 if ${ac_cv_lib_z_inflateEnd+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -20797,7 +20908,7 @@ else
                      OPT_ZLIB="/usr/local"
 fi
 
-
+    fi
   fi
 
     if test -n "$OPT_ZLIB"; then
@@ -20931,7 +21042,7 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lber.h" >&5
 $as_echo_n "checking for lber.h... " >&6; }
-if ${ac_cv_header_lber_h+:} false; then :
+if ${curl_cv_header_lber_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -20969,19 +21080,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_lber_h="yes"
+      curl_cv_header_lber_h="yes"
 
 else
 
-      ac_cv_header_lber_h="no"
+      curl_cv_header_lber_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_lber_h" >&5
-$as_echo "$ac_cv_header_lber_h" >&6; }
-  if test "$ac_cv_header_lber_h" = "yes"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_lber_h" >&5
+$as_echo "$curl_cv_header_lber_h" >&6; }
+  if test "$curl_cv_header_lber_h" = "yes"; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_LBER_H 1
@@ -21048,7 +21159,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap.h" >&5
 $as_echo_n "checking for ldap.h... " >&6; }
-if ${ac_cv_header_ldap_h+:} false; then :
+if ${curl_cv_header_ldap_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -21088,19 +21199,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_ldap_h="yes"
+      curl_cv_header_ldap_h="yes"
 
 else
 
-      ac_cv_header_ldap_h="no"
+      curl_cv_header_ldap_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_ldap_h" >&5
-$as_echo "$ac_cv_header_ldap_h" >&6; }
-  case "$ac_cv_header_ldap_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ldap_h" >&5
+$as_echo "$curl_cv_header_ldap_h" >&6; }
+  case "$curl_cv_header_ldap_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -21113,7 +21224,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl.h" >&5
 $as_echo_n "checking for ldapssl.h... " >&6; }
-if ${ac_cv_header_ldapssl_h+:} false; then :
+if ${curl_cv_header_ldapssl_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -21159,19 +21270,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_ldapssl_h="yes"
+      curl_cv_header_ldapssl_h="yes"
 
 else
 
-      ac_cv_header_ldapssl_h="no"
+      curl_cv_header_ldapssl_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_ldapssl_h" >&5
-$as_echo "$ac_cv_header_ldapssl_h" >&6; }
-  case "$ac_cv_header_ldapssl_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ldapssl_h" >&5
+$as_echo "$curl_cv_header_ldapssl_h" >&6; }
+  case "$curl_cv_header_ldapssl_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -21184,7 +21295,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_ssl.h" >&5
 $as_echo_n "checking for ldap_ssl.h... " >&6; }
-if ${ac_cv_header_ldap_ssl_h+:} false; then :
+if ${curl_cv_header_ldap_ssl_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -21226,19 +21337,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_ldap_ssl_h="yes"
+      curl_cv_header_ldap_ssl_h="yes"
 
 else
 
-      ac_cv_header_ldap_ssl_h="no"
+      curl_cv_header_ldap_ssl_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_ldap_ssl_h" >&5
-$as_echo "$ac_cv_header_ldap_ssl_h" >&6; }
-  case "$ac_cv_header_ldap_ssl_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ldap_ssl_h" >&5
+$as_echo "$curl_cv_header_ldap_ssl_h" >&6; }
+  case "$curl_cv_header_ldap_ssl_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -21250,7 +21361,7 @@ _ACEOF
 
 
   if test -z "$LDAPLIBNAME" ; then
-    if test "$ac_cv_native_windows" = "yes"; then
+    if test "$curl_cv_native_windows" = "yes"; then
             LDAPLIBNAME="wldap32"
       LBERLIBNAME="no"
     fi
@@ -21929,7 +22040,7 @@ fi
 $as_echo_n "checking whether to enable Windows native SSL/TLS (Windows native builds only)... " >&6; }
 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
   if test "x$OPT_WINSSL" != "xno"  &&
-     test "x$ac_cv_native_windows" = "xyes"; then
+     test "x$curl_cv_native_windows" = "xyes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
@@ -21946,6 +22057,7 @@ $as_echo "#define USE_WINDOWS_SSPI 1" >>confdefs.h
     USE_WINDOWS_SSPI=1
 
     curl_sspi_msg="enabled"
+    LIBS="-lcrypt32 $LIBS"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -21963,8 +22075,8 @@ if test "${with_darwinssl+set}" = set; then :
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable iOS/Mac OS X native SSL/TLS" >&5
-$as_echo_n "checking whether to enable iOS/Mac OS X native SSL/TLS... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Apple OS native SSL/TLS" >&5
+$as_echo_n "checking whether to enable Apple OS native SSL/TLS... " >&6; }
 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
   if test "x$OPT_DARWINSSL" != "xno" &&
      test -d "/System/Library/Frameworks/Security.framework"; then
@@ -21975,7 +22087,7 @@ $as_echo "#define USE_DARWINSSL 1" >>confdefs.h
 
     USE_DARWINSSL=1
 
-    curl_ssl_msg="enabled (iOS/Mac OS X-native)"
+    curl_ssl_msg="enabled (Apple OS-native)"
     DARWINSSL_ENABLED=1
     LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
   else
 
 
 
-    for ac_func in RAND_status \
-                    RAND_screen \
-                    RAND_egd \
+    for ac_func in RAND_egd \
                     ENGINE_cleanup \
-                    CRYPTO_cleanup_all_ex_data \
                     SSL_get_shutdown \
                     SSLv2_client_method
 do :
@@ -22714,8 +22823,8 @@ $as_echo "$as_me: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&6;}
 $as_echo_n "checking for OpenSSL headers version... " >&6; }
 
     OLDCPPFLAGS=$CPPFLAGS
-  # CPPPFLAGS comes from CURL_CPP_P
-  CPPFLAGS="$CPPPFLAGS"
+  # 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
@@ -23698,12 +23807,13 @@ $as_echo "$as_me: detected GnuTLS version $version" >&6;}
 $as_echo "$as_me: Added $gtlslib to LD_LIBRARY_PATH" >&6;}
           fi
         fi
-        for ac_func in gnutls_certificate_set_x509_key_file2
+        for ac_func in gnutls_certificate_set_x509_key_file2 gnutls_alpn_set_protocols gnutls_ocsp_req_init
 do :
-  ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_x509_key_file2" "ac_cv_func_gnutls_certificate_set_x509_key_file2"
-if test "x$ac_cv_func_gnutls_certificate_set_x509_key_file2" = xyes; then :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_GNUTLS_CERTIFICATE_SET_X509_KEY_FILE2 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -24527,7 +24637,9 @@ done
 
       if test "x$cyassllibname" = "xwolfssl"; then
                         for ac_func in wolfSSLv3_client_method \
-                       wolfSSL_get_peer_certificate
+                       wolfSSL_CTX_UseSupportedCurve \
+                       wolfSSL_get_peer_certificate \
+                       wolfSSL_UseALPN
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
 done
 
       else
-                for ac_func in CyaSSL_get_peer_certificate
+                for ac_func in CyaSSL_CTX_UseSupportedCurve \
+                       CyaSSL_get_peer_certificate
 do :
-  ac_fn_c_check_func "$LINENO" "CyaSSL_get_peer_certificate" "ac_cv_func_CyaSSL_get_peer_certificate"
-if test "x$ac_cv_func_CyaSSL_get_peer_certificate" = xyes; then :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_CYASSL_GET_PEER_CERTIFICATE 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -25161,7 +25275,7 @@ fi
         for a in /etc/ssl/certs/ca-certificates.crt \
                  /etc/pki/tls/certs/ca-bundle.crt \
                  /usr/share/ssl/certs/ca-bundle.crt \
-                 /usr/local/share/certs/ca-root.crt \
+                 /usr/local/share/certs/ca-root-nss.crt \
                  /etc/ssl/cert.pem \
                  "$cac"; do
           if test -f "$a"; then
@@ -25880,7 +25994,7 @@ $as_echo "found" >&6; }
     DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
   fi
 
-  LDFLAGS="$LDFLAGS $LD_SSH2"
+  LDFLAGS="$LD_SSH2 $LDFLAGS"
   CPPFLAGS="$CPPFLAGS $CPP_SSH2"
   LIBS="$LIB_SSH2 $LIBS"
 
@@ -26390,13 +26504,13 @@ $as_echo "$as_me: WARNING: Cannot find libraries for IDN support: IDN disabled"
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with libidn" >&5
-$as_echo_n "checking whether to build with libidn... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with libidn2" >&5
+$as_echo_n "checking whether to build with libidn2... " >&6; }
 OPT_IDN="default"
 
-# Check whether --with-libidn was given.
-if test "${with_libidn+set}" = set; then :
-  withval=$with_libidn; OPT_IDN=$withval
+# Check whether --with-libidn2 was given.
+if test "${with_libidn2+set}" = set; then :
+  withval=$with_libidn2; OPT_IDN=$withval
 fi
 
 case "$OPT_IDN" in
     fi
 
     if test "x$PKGCONFIG" != "xno"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libidn options with pkg-config" >&5
-$as_echo_n "checking for libidn options with pkg-config... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libidn2 options with pkg-config" >&5
+$as_echo_n "checking for libidn2 options with pkg-config... " >&6; }
             itexists=`
     if test -n "$IDN_PCDIR"; then
       PKG_CONFIG_LIBDIR="$IDN_PCDIR"
       export PKG_CONFIG_LIBDIR
     fi
-         $PKGCONFIG --exists libidn >/dev/null 2>&1 && echo 1`
+         $PKGCONFIG --exists libidn2 >/dev/null 2>&1 && echo 1`
 
       if test -z "$itexists"; then
                         PKGCONFIG="no"
@@ -26565,22 +26679,22 @@ $as_echo "found" >&6; }
       PKG_CONFIG_LIBDIR="$IDN_PCDIR"
       export PKG_CONFIG_LIBDIR
     fi
-         $PKGCONFIG --libs-only-l libidn 2>/dev/null`
+         $PKGCONFIG --libs-only-l libidn2 2>/dev/null`
       IDN_LDFLAGS=`
     if test -n "$IDN_PCDIR"; then
       PKG_CONFIG_LIBDIR="$IDN_PCDIR"
       export PKG_CONFIG_LIBDIR
     fi
-         $PKGCONFIG --libs-only-L libidn 2>/dev/null`
+         $PKGCONFIG --libs-only-L libidn2 2>/dev/null`
       IDN_CPPFLAGS=`
     if test -n "$IDN_PCDIR"; then
       PKG_CONFIG_LIBDIR="$IDN_PCDIR"
       export PKG_CONFIG_LIBDIR
     fi
-         $PKGCONFIG --cflags-only-I libidn 2>/dev/null`
+         $PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
       IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
     else
-            IDN_LIBS="-lidn"
+            IDN_LIBS="-lidn2"
       IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
       IDN_CPPFLAGS="-I$want_idn_path/include"
       IDN_DIR="$want_idn_path/lib$libsuff"
     fi
 
     if test "x$PKGCONFIG" != "xno"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libidn options with pkg-config" >&5
-$as_echo_n "checking for libidn options with pkg-config... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libidn2 options with pkg-config" >&5
+$as_echo_n "checking for libidn2 options with pkg-config... " >&6; }
             itexists=`
     if test -n ""; then
       PKG_CONFIG_LIBDIR=""
       export PKG_CONFIG_LIBDIR
     fi
-         $PKGCONFIG --exists libidn >/dev/null 2>&1 && echo 1`
+         $PKGCONFIG --exists libidn2 >/dev/null 2>&1 && echo 1`
 
       if test -z "$itexists"; then
                         PKGCONFIG="no"
@@ -26713,12 +26827,12 @@ $as_echo "found" >&6; }
     fi
 
     if test "$PKGCONFIG" != "no"; then
-      IDN_LIBS=`$PKGCONFIG --libs-only-l libidn 2>/dev/null`
-      IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn 2>/dev/null`
-      IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn 2>/dev/null`
+      IDN_LIBS=`$PKGCONFIG --libs-only-l libidn2 2>/dev/null`
+      IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn2 2>/dev/null`
+      IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
       IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
     else
-            IDN_LIBS="-lidn"
+            IDN_LIBS="-lidn2"
     fi
   fi
   #
@@ -26746,30 +26860,30 @@ $as_echo "$as_me: IDN_DIR: \"$IDN_DIR\"" >&6;}
   LDFLAGS="$IDN_LDFLAGS $LDFLAGS"
   LIBS="$IDN_LIBS $LIBS"
   #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if idna_to_ascii_4i can be linked" >&5
-$as_echo_n "checking if idna_to_ascii_4i can be linked... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if idn2_lookup_ul can be linked" >&5
+$as_echo_n "checking if idn2_lookup_ul can be linked... " >&6; }
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define idna_to_ascii_4i innocuous_idna_to_ascii_4i
+#define idn2_lookup_ul innocuous_idn2_lookup_ul
 #ifdef __STDC__
 # include <limits.h>
 #else
 # include <assert.h>
 #endif
-#undef idna_to_ascii_4i
+#undef idn2_lookup_ul
 #ifdef __cplusplus
 extern "C"
 #endif
-char idna_to_ascii_4i ();
-#if defined __stub_idna_to_ascii_4i || defined __stub___idna_to_ascii_4i
+char idn2_lookup_ul ();
+#if defined __stub_idn2_lookup_ul || defined __stub___idn2_lookup_ul
 choke me
 #endif
 
 int main (void)
 {
-return idna_to_ascii_4i ();
+return idn2_lookup_ul ();
  ;
  return 0;
 }
@@ -26790,70 +26904,8 @@ $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-  if test "$tst_links_libidn" = "no"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if idna_to_ascii_lz can be linked" >&5
-$as_echo_n "checking if idna_to_ascii_lz can be linked... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define idna_to_ascii_lz innocuous_idna_to_ascii_lz
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef idna_to_ascii_lz
-#ifdef __cplusplus
-extern "C"
-#endif
-char idna_to_ascii_lz ();
-#if defined __stub_idna_to_ascii_lz || defined __stub___idna_to_ascii_lz
-choke me
-#endif
-
-int main (void)
-{
-return idna_to_ascii_lz ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_links_libidn="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_links_libidn="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  fi
   #
-  if test "$tst_links_libidn" = "yes"; then
-
-$as_echo "#define HAVE_LIBIDN 1" >>confdefs.h
-
-        for ac_func in idn_free idna_strerror tld_strerror
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-    for ac_header in idn-free.h tld.h
+  for ac_header in idn2.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 
 done
 
-    if test "x$ac_cv_header_tld_h" = "xyes"; then
-      IDN_ENABLED=1
 
-      curl_idn_msg="enabled"
-      if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$IDN_DIR"
-        export LD_LIBRARY_PATH
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Added $IDN_DIR to LD_LIBRARY_PATH" >&5
+  if test "$tst_links_libidn" = "yes"; then
+
+$as_echo "#define HAVE_LIBIDN2 1" >>confdefs.h
+
+
+    IDN_ENABLED=1
+
+    curl_idn_msg="enabled (libidn2)"
+    if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
+      LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$IDN_DIR"
+      export LD_LIBRARY_PATH
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Added $IDN_DIR to LD_LIBRARY_PATH" >&5
 $as_echo "$as_me: Added $IDN_DIR to LD_LIBRARY_PATH" >&6;}
-      fi
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libraries for IDN support too old: IDN disabled" >&5
-$as_echo "$as_me: WARNING: Libraries for IDN support too old: IDN disabled" >&2;}
-      CPPFLAGS="$clean_CPPFLAGS"
-      LDFLAGS="$clean_LDFLAGS"
-      LIBS="$clean_LIBS"
     fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for IDN support: IDN disabled" >&5
@@ -27294,7 +27344,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc.h" >&5
 $as_echo_n "checking for malloc.h... " >&6; }
-if ${ac_cv_header_malloc_h+:} false; then :
+if ${curl_cv_header_malloc_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -27319,19 +27369,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_malloc_h="yes"
+      curl_cv_header_malloc_h="yes"
 
 else
 
-      ac_cv_header_malloc_h="no"
+      curl_cv_header_malloc_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_malloc_h" >&5
-$as_echo "$ac_cv_header_malloc_h" >&6; }
-  if test "$ac_cv_header_malloc_h" = "yes"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_malloc_h" >&5
+$as_echo "$curl_cv_header_malloc_h" >&6; }
+  if test "$curl_cv_header_malloc_h" = "yes"; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_MALLOC_H 1
@@ -27382,7 +27432,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory.h" >&5
 $as_echo_n "checking for memory.h... " >&6; }
-if ${ac_cv_header_memory_h+:} false; then :
+if ${curl_cv_header_memory_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -27407,19 +27457,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_memory_h="yes"
+      curl_cv_header_memory_h="yes"
 
 else
 
-      ac_cv_header_memory_h="no"
+      curl_cv_header_memory_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_memory_h" >&5
-$as_echo "$ac_cv_header_memory_h" >&6; }
-  if test "$ac_cv_header_memory_h" = "yes"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_memory_h" >&5
+$as_echo "$curl_cv_header_memory_h" >&6; }
+  if test "$curl_cv_header_memory_h" = "yes"; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_MEMORY_H 1
@@ -27792,7 +27842,7 @@ done
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
 $as_echo_n "checking for struct timeval... " >&6; }
-if ${ac_cv_struct_timeval+:} false; then :
+if ${curl_cv_struct_timeval+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -27845,19 +27895,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_struct_timeval="yes"
+      curl_cv_struct_timeval="yes"
 
 else
 
-      ac_cv_struct_timeval="no"
+      curl_cv_struct_timeval="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_timeval" >&5
-$as_echo "$ac_cv_struct_timeval" >&6; }
-  case "$ac_cv_struct_timeval" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_struct_timeval" >&5
+$as_echo "$curl_cv_struct_timeval" >&6; }
+  case "$curl_cv_struct_timeval" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -28116,7 +28166,7 @@ _ACEOF
 
 
 soname_bump=no
-if test x"$ac_cv_native_windows" != "xyes" &&
+if test x"$curl_cv_native_windows" != "xyes" &&
    test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This libcurl built is probably not ABI compatible with previous" >&5
 $as_echo "$as_me: WARNING: This libcurl built is probably not ABI compatible with previous" >&2;}
@@ -28221,7 +28271,7 @@ curl_includes_ws2tcpip="\
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
 $as_echo_n "checking for windows.h... " >&6; }
-if ${ac_cv_header_windows_h+:} false; then :
+if ${curl_cv_header_windows_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -28251,19 +28301,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_windows_h="yes"
+      curl_cv_header_windows_h="yes"
 
 else
 
-      ac_cv_header_windows_h="no"
+      curl_cv_header_windows_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_windows_h" >&5
-$as_echo "$ac_cv_header_windows_h" >&6; }
-  case "$ac_cv_header_windows_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_windows_h" >&5
+$as_echo "$curl_cv_header_windows_h" >&6; }
+  case "$curl_cv_header_windows_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -28281,7 +28331,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
 $as_echo_n "checking for winsock2.h... " >&6; }
-if ${ac_cv_header_winsock2_h+:} false; then :
+if ${curl_cv_header_winsock2_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -28312,19 +28362,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_winsock2_h="yes"
+      curl_cv_header_winsock2_h="yes"
 
 else
 
-      ac_cv_header_winsock2_h="no"
+      curl_cv_header_winsock2_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winsock2_h" >&5
-$as_echo "$ac_cv_header_winsock2_h" >&6; }
-  case "$ac_cv_header_winsock2_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock2_h" >&5
+$as_echo "$curl_cv_header_winsock2_h" >&6; }
+  case "$curl_cv_header_winsock2_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -28337,7 +28387,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ws2tcpip.h" >&5
 $as_echo_n "checking for ws2tcpip.h... " >&6; }
-if ${ac_cv_header_ws2tcpip_h+:} false; then :
+if ${curl_cv_header_ws2tcpip_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -28369,19 +28419,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_header_ws2tcpip_h="yes"
+      curl_cv_header_ws2tcpip_h="yes"
 
 else
 
-      ac_cv_header_ws2tcpip_h="no"
+      curl_cv_header_ws2tcpip_h="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_ws2tcpip_h" >&5
-$as_echo "$ac_cv_header_ws2tcpip_h" >&6; }
-  case "$ac_cv_header_ws2tcpip_h" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ws2tcpip_h" >&5
+$as_echo "$curl_cv_header_ws2tcpip_h" >&6; }
+  case "$curl_cv_header_ws2tcpip_h" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -28506,7 +28556,7 @@ $as_echo "$curl_typeof_curl_socklen_t" >&6; }
 $as_echo_n "checking size of curl_socklen_t... " >&6; }
   curl_sizeof_curl_socklen_t="unknown"
   curl_pull_headers_socklen_t="unknown"
-  if test "$ac_cv_header_ws2tcpip_h" = "yes"; then
+  if test "$curl_cv_header_ws2tcpip_h" = "yes"; then
     tst_pull_header_checks='none ws2tcpip'
     tst_size_checks='4'
   else
@@ -28884,19 +28934,19 @@ if ac_fn_c_try_link "$LINENO"; then :
 
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-        ac_cv_sig_atomic_t_volatile="no"
+        curl_cv_sig_atomic_t_volatile="no"
 
 else
 
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-        ac_cv_sig_atomic_t_volatile="yes"
+        curl_cv_sig_atomic_t_volatile="yes"
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
       #
-      if test "$ac_cv_sig_atomic_t_volatile" = "yes"; then
+      if test "$curl_cv_sig_atomic_t_volatile" = "yes"; then
 
 $as_echo "#define HAVE_SIG_ATOMIC_T_VOLATILE 1" >>confdefs.h
 
@@ -29190,7 +29240,7 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_SELECT 1
 _ACEOF
 
-      ac_cv_func_select="yes"
+      curl_cv_func_select="yes"
     fi
   fi
 
@@ -29377,7 +29427,7 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_RECV 1
 _ACEOF
 
-      ac_cv_func_recv="yes"
+      curl_cv_func_recv="yes"
     fi
   else
     as_fn_error $? "Unable to link function recv" "$LINENO" 5
@@ -29601,7 +29651,7 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_SEND 1
 _ACEOF
 
-      ac_cv_func_send="yes"
+      curl_cv_func_send="yes"
     fi
   else
     as_fn_error $? "Unable to link function send" "$LINENO" 5
@@ -29623,7 +29673,7 @@ done
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_NOSIGNAL" >&5
 $as_echo_n "checking for MSG_NOSIGNAL... " >&6; }
-if ${ac_cv_msg_nosignal+:} false; then :
+if ${curl_cv_msg_nosignal+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -29665,19 +29715,19 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-      ac_cv_msg_nosignal="yes"
+      curl_cv_msg_nosignal="yes"
 
 else
 
-      ac_cv_msg_nosignal="no"
+      curl_cv_msg_nosignal="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_msg_nosignal" >&5
-$as_echo "$ac_cv_msg_nosignal" >&6; }
-  case "$ac_cv_msg_nosignal" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_msg_nosignal" >&5
+$as_echo "$curl_cv_msg_nosignal" >&6; }
+  case "$curl_cv_msg_nosignal" in
     yes)
 
 cat >>confdefs.h <<_ACEOF
@@ -29855,11 +29905,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_ALARM 1
 _ACEOF
 
-    ac_cv_func_alarm="yes"
+    curl_cv_func_alarm="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_alarm="no"
+    curl_cv_func_alarm="no"
   fi
 
 
@@ -30061,11 +30111,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_BASENAME 1
 _ACEOF
 
-    ac_cv_func_basename="yes"
+    curl_cv_func_basename="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_basename="no"
+    curl_cv_func_basename="no"
   fi
 
 
@@ -30228,11 +30278,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_CLOSESOCKET 1
 _ACEOF
 
-    ac_cv_func_closesocket="yes"
+    curl_cv_func_closesocket="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_closesocket="no"
+    curl_cv_func_closesocket="no"
   fi
 
 
@@ -30367,11 +30417,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_CLOSESOCKET_CAMEL 1
 _ACEOF
 
-    ac_cv_func_closesocket_camel="yes"
+    curl_cv_func_closesocket_camel="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_closesocket_camel="no"
+    curl_cv_func_closesocket_camel="no"
   fi
 
 
@@ -30512,11 +30562,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_CONNECT 1
 _ACEOF
 
-    ac_cv_func_connect="yes"
+    curl_cv_func_connect="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_connect="no"
+    curl_cv_func_connect="no"
   fi
 
 
@@ -30689,7 +30739,7 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_FCNTL 1
 _ACEOF
 
-    ac_cv_func_fcntl="yes"
+    curl_cv_func_fcntl="yes"
 
   #
   tst_compi_fcntl_o_nonblock="unknown"
@@ -30701,7 +30751,7 @@ _ACEOF
       ;;
   esac
   #
-  if test "$ac_cv_func_fcntl" = "yes"; then
+  if test "$curl_cv_func_fcntl" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl O_NONBLOCK is compilable" >&5
 $as_echo_n "checking if fcntl O_NONBLOCK is compilable... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -30763,17 +30813,17 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_FCNTL_O_NONBLOCK 1
 _ACEOF
 
-    ac_cv_func_fcntl_o_nonblock="yes"
+    curl_cv_func_fcntl_o_nonblock="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_fcntl_o_nonblock="no"
+    curl_cv_func_fcntl_o_nonblock="no"
   fi
 
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_fcntl="no"
+    curl_cv_func_fcntl="no"
   fi
 
 
@@ -30943,11 +30993,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_FDOPEN 1
 _ACEOF
 
-    ac_cv_func_fdopen="yes"
+    curl_cv_func_fdopen="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_fdopen="no"
+    curl_cv_func_fdopen="no"
   fi
 
 
@@ -31111,11 +31161,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_FREEADDRINFO 1
 _ACEOF
 
-    ac_cv_func_freeaddrinfo="yes"
+    curl_cv_func_freeaddrinfo="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_freeaddrinfo="no"
+    curl_cv_func_freeaddrinfo="no"
   fi
 
 
@@ -31290,11 +31340,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_FREEIFADDRS 1
 _ACEOF
 
-    ac_cv_func_freeifaddrs="yes"
+    curl_cv_func_freeifaddrs="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_freeifaddrs="no"
+    curl_cv_func_freeifaddrs="no"
   fi
 
 
@@ -31524,11 +31574,11 @@ $as_echo "#define HAVE_FSETXATTR_6 1" >>confdefs.h
 
     fi
     #
-    ac_cv_func_fsetxattr="yes"
+    curl_cv_func_fsetxattr="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_fsetxattr="no"
+    curl_cv_func_fsetxattr="no"
   fi
 
 
@@ -31673,11 +31723,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_FTRUNCATE 1
 _ACEOF
 
-    ac_cv_func_ftruncate="yes"
+    curl_cv_func_ftruncate="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_ftruncate="no"
+    curl_cv_func_ftruncate="no"
   fi
 
 
@@ -31914,15 +31964,15 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_GETADDRINFO 1
 _ACEOF
 
-    ac_cv_func_getaddrinfo="yes"
+    curl_cv_func_getaddrinfo="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_getaddrinfo="no"
-    ac_cv_func_getaddrinfo_threadsafe="no"
+    curl_cv_func_getaddrinfo="no"
+    curl_cv_func_getaddrinfo_threadsafe="no"
   fi
   #
-  if test "$ac_cv_func_getaddrinfo" = "yes"; then
+  if test "$curl_cv_func_getaddrinfo" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo is threadsafe" >&5
 $as_echo_n "checking if getaddrinfo is threadsafe... " >&6; }
     case $host_os in
@@ -31964,7 +32014,7 @@ $as_echo_n "checking if getaddrinfo is threadsafe... " >&6; }
         ;;
     esac
     if test "$tst_tsafe_getaddrinfo" = "unknown" &&
-       test "$ac_cv_native_windows" = "yes"; then
+       test "$curl_cv_native_windows" = "yes"; then
       tst_tsafe_getaddrinfo="yes"
     fi
     if test "$tst_tsafe_getaddrinfo" = "unknown"; then
@@ -32087,9 +32137,9 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_GETADDRINFO_THREADSAFE 1
 _ACEOF
 
-      ac_cv_func_getaddrinfo_threadsafe="yes"
+      curl_cv_func_getaddrinfo_threadsafe="yes"
     else
-      ac_cv_func_getaddrinfo_threadsafe="no"
+      curl_cv_func_getaddrinfo_threadsafe="no"
     fi
   fi
 
@@ -32228,11 +32278,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_GAI_STRERROR 1
 _ACEOF
 
-    ac_cv_func_gai_strerror="yes"
+    curl_cv_func_gai_strerror="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_gai_strerror="no"
+    curl_cv_func_gai_strerror="no"
   fi
 
 
@@ -32370,11 +32420,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_GETHOSTBYADDR 1
 _ACEOF
 
-    ac_cv_func_gethostbyaddr="yes"
+    curl_cv_func_gethostbyaddr="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_gethostbyaddr="no"
+    curl_cv_func_gethostbyaddr="no"
   fi
 
 
@@ -32619,11 +32669,11 @@ $as_echo "#define HAVE_GETHOSTBYADDR_R_8 1" >>confdefs.h
 
     fi
     #
-    ac_cv_func_gethostbyaddr_r="yes"
+    curl_cv_func_gethostbyaddr_r="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_gethostbyaddr_r="no"
+    curl_cv_func_gethostbyaddr_r="no"
   fi
 
 
@@ -32761,11 +32811,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_GETHOSTBYNAME 1
 _ACEOF
 
-    ac_cv_func_gethostbyname="yes"
+    curl_cv_func_gethostbyname="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_gethostbyname="no"
+    curl_cv_func_gethostbyname="no"
   fi
 
 
@@ -33010,11 +33060,11 @@ $as_echo "#define HAVE_GETHOSTBYNAME_R_6 1" >>confdefs.h
 
     fi
     #
-    ac_cv_func_gethostbyname_r="yes"
+    curl_cv_func_gethostbyname_r="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_gethostbyname_r="no"
+    curl_cv_func_gethostbyname_r="no"
   fi
 
 
@@ -33199,11 +33249,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_GETHOSTNAME 1
 _ACEOF
 
-    ac_cv_func_gethostname="yes"
+    curl_cv_func_gethostname="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_gethostname="no"
+    curl_cv_func_gethostname="no"
   fi
 
 
@@ -33404,11 +33454,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_GETIFADDRS 1
 _ACEOF
 
-    ac_cv_func_getifaddrs="yes"
+    curl_cv_func_getifaddrs="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_getifaddrs="no"
+    curl_cv_func_getifaddrs="no"
   fi
 
 
@@ -33652,11 +33702,11 @@ $as_echo "#define GETSERVBYPORT_R_BUFSIZE sizeof(struct servent_data)" >>confdef
 $as_echo "#define GETSERVBYPORT_R_BUFSIZE 4096" >>confdefs.h
 
     fi
-    ac_cv_func_getservbyport_r="yes"
+    curl_cv_func_getservbyport_r="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_getservbyport_r="no"
+    curl_cv_func_getservbyport_r="no"
   fi
 
 
@@ -33889,11 +33939,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_GMTIME_R 1
 _ACEOF
 
-    ac_cv_func_gmtime_r="yes"
+    curl_cv_func_gmtime_r="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_gmtime_r="no"
+    curl_cv_func_gmtime_r="no"
   fi
 
 
@@ -34135,11 +34185,11 @@ $as_echo "#define HAVE_INET_NTOA_R_3 1" >>confdefs.h
 
     fi
     #
-    ac_cv_func_inet_ntoa_r="yes"
+    curl_cv_func_inet_ntoa_r="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_inet_ntoa_r="no"
+    curl_cv_func_inet_ntoa_r="no"
   fi
 
 
@@ -34382,11 +34432,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_INET_NTOP 1
 _ACEOF
 
-    ac_cv_func_inet_ntop="yes"
+    curl_cv_func_inet_ntop="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_inet_ntop="no"
+    curl_cv_func_inet_ntop="no"
   fi
 
 
@@ -34622,11 +34672,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_INET_PTON 1
 _ACEOF
 
-    ac_cv_func_inet_pton="yes"
+    curl_cv_func_inet_pton="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_inet_pton="no"
+    curl_cv_func_inet_pton="no"
   fi
 
 
@@ -34805,13 +34855,13 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_IOCTL 1
 _ACEOF
 
-    ac_cv_func_ioctl="yes"
+    curl_cv_func_ioctl="yes"
 
   #
   tst_compi_ioctl_fionbio="unknown"
   tst_allow_ioctl_fionbio="unknown"
   #
-  if test "$ac_cv_func_ioctl" = "yes"; then
+  if test "$curl_cv_func_ioctl" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl FIONBIO is compilable" >&5
 $as_echo_n "checking if ioctl FIONBIO is compilable... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -34873,11 +34923,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_IOCTL_FIONBIO 1
 _ACEOF
 
-    ac_cv_func_ioctl_fionbio="yes"
+    curl_cv_func_ioctl_fionbio="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_ioctl_fionbio="no"
+    curl_cv_func_ioctl_fionbio="no"
   fi
 
 
@@ -34885,7 +34935,7 @@ $as_echo "no" >&6; }
   tst_compi_ioctl_siocgifaddr="unknown"
   tst_allow_ioctl_siocgifaddr="unknown"
   #
-  if test "$ac_cv_func_ioctl" = "yes"; then
+  if test "$curl_cv_func_ioctl" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl SIOCGIFADDR is compilable" >&5
 $as_echo_n "checking if ioctl SIOCGIFADDR is compilable... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -34948,17 +34998,17 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_IOCTL_SIOCGIFADDR 1
 _ACEOF
 
-    ac_cv_func_ioctl_siocgifaddr="yes"
+    curl_cv_func_ioctl_siocgifaddr="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_ioctl_siocgifaddr="no"
+    curl_cv_func_ioctl_siocgifaddr="no"
   fi
 
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_ioctl="no"
+    curl_cv_func_ioctl="no"
   fi
 
 
@@ -35093,13 +35143,13 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_IOCTLSOCKET 1
 _ACEOF
 
-    ac_cv_func_ioctlsocket="yes"
+    curl_cv_func_ioctlsocket="yes"
 
   #
   tst_compi_ioctlsocket_fionbio="unknown"
   tst_allow_ioctlsocket_fionbio="unknown"
   #
-  if test "$ac_cv_func_ioctlsocket" = "yes"; then
+  if test "$curl_cv_func_ioctlsocket" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket FIONBIO is compilable" >&5
 $as_echo_n "checking if ioctlsocket FIONBIO is compilable... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -35161,17 +35211,17 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_IOCTLSOCKET_FIONBIO 1
 _ACEOF
 
-    ac_cv_func_ioctlsocket_fionbio="yes"
+    curl_cv_func_ioctlsocket_fionbio="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_ioctlsocket_fionbio="no"
+    curl_cv_func_ioctlsocket_fionbio="no"
   fi
 
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_ioctlsocket="no"
+    curl_cv_func_ioctlsocket="no"
   fi
 
 
@@ -35316,13 +35366,13 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_IOCTLSOCKET_CAMEL 1
 _ACEOF
 
-    ac_cv_func_ioctlsocket_camel="yes"
+    curl_cv_func_ioctlsocket_camel="yes"
 
   #
   tst_compi_ioctlsocket_camel_fionbio="unknown"
   tst_allow_ioctlsocket_camel_fionbio="unknown"
   #
-  if test "$ac_cv_func_ioctlsocket_camel" = "yes"; then
+  if test "$curl_cv_func_ioctlsocket_camel" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket FIONBIO is compilable" >&5
 $as_echo_n "checking if IoctlSocket FIONBIO is compilable... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -35384,17 +35434,17 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1
 _ACEOF
 
-    ac_cv_func_ioctlsocket_camel_fionbio="yes"
+    curl_cv_func_ioctlsocket_camel_fionbio="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_ioctlsocket_camel_fionbio="no"
+    curl_cv_func_ioctlsocket_camel_fionbio="no"
   fi
 
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_ioctlsocket_camel="no"
+    curl_cv_func_ioctlsocket_camel="no"
   fi
 
 
@@ -35595,11 +35645,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_LOCALTIME_R 1
 _ACEOF
 
-    ac_cv_func_localtime_r="yes"
+    curl_cv_func_localtime_r="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_localtime_r="no"
+    curl_cv_func_localtime_r="no"
   fi
 
 
@@ -35783,11 +35833,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_MEMRCHR 1
 _ACEOF
 
-    ac_cv_func_memrchr="yes"
+    curl_cv_func_memrchr="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_memrchr="no"
+    curl_cv_func_memrchr="no"
   fi
 
 
@@ -35799,8 +35849,9 @@ $as_echo "no" >&6; }
   tst_allow_poll="unknown"
   #
   case $host_os in
-    darwin[123456789].*|darwin10.*|darwin11.*|darwin12.*|interix*)
-                              curl_disallow_poll="yes"
+    darwin*|interix*)
+                                          curl_disallow_poll="yes"
+      tst_compi_poll="no"
       ;;
   esac
   #
@@ -35918,14 +35969,30 @@ else
 
         $curl_includes_stdlib
         $curl_includes_poll
+        $curl_includes_time
 
 int main (void)
 {
 
+        /* detect the original poll() breakage */
         if(0 != poll(0, 0, 10))
           exit(1); /* fail */
-        else
-          exit(0);
+        else {
+          /* detect the 10.12 poll() breakage */
+          struct timeval before, after;
+          int rc;
+          size_t us;
+
+          gettimeofday(&before, NULL);
+          rc = poll(NULL, 0, 500);
+          gettimeofday(&after, NULL);
+
+          us = (after.tv_sec - before.tv_sec) * 1000000 +
+            (after.tv_usec - before.tv_usec);
+
+          if(us < 400000)
+            exit(1);
+        }
 
  ;
  return 0;
@@ -35985,11 +36052,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_POLL_FINE 1
 _ACEOF
 
-    ac_cv_func_poll="yes"
+    curl_cv_func_poll="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_poll="no"
+    curl_cv_func_poll="no"
   fi
 
 
@@ -36127,13 +36194,13 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_SETSOCKOPT 1
 _ACEOF
 
-    ac_cv_func_setsockopt="yes"
+    curl_cv_func_setsockopt="yes"
 
   #
   tst_compi_setsockopt_so_nonblock="unknown"
   tst_allow_setsockopt_so_nonblock="unknown"
   #
-  if test "$ac_cv_func_setsockopt" = "yes"; then
+  if test "$curl_cv_func_setsockopt" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK is compilable" >&5
 $as_echo_n "checking if setsockopt SO_NONBLOCK is compilable... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -36195,17 +36262,17 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_SETSOCKOPT_SO_NONBLOCK 1
 _ACEOF
 
-    ac_cv_func_setsockopt_so_nonblock="yes"
+    curl_cv_func_setsockopt_so_nonblock="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_setsockopt_so_nonblock="no"
+    curl_cv_func_setsockopt_so_nonblock="no"
   fi
 
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_setsockopt="no"
+    curl_cv_func_setsockopt="no"
   fi
 
 
@@ -36375,11 +36442,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_SIGACTION 1
 _ACEOF
 
-    ac_cv_func_sigaction="yes"
+    curl_cv_func_sigaction="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_sigaction="no"
+    curl_cv_func_sigaction="no"
   fi
 
 
@@ -36524,11 +36591,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_SIGINTERRUPT 1
 _ACEOF
 
-    ac_cv_func_siginterrupt="yes"
+    curl_cv_func_siginterrupt="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_siginterrupt="no"
+    curl_cv_func_siginterrupt="no"
   fi
 
 
@@ -36673,11 +36740,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_SIGNAL 1
 _ACEOF
 
-    ac_cv_func_signal="yes"
+    curl_cv_func_signal="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_signal="no"
+    curl_cv_func_signal="no"
   fi
 
 
@@ -36888,11 +36955,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_SIGSETJMP 1
 _ACEOF
 
-    ac_cv_func_sigsetjmp="yes"
+    curl_cv_func_sigsetjmp="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_sigsetjmp="no"
+    curl_cv_func_sigsetjmp="no"
   fi
 
 
@@ -37033,11 +37100,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_SOCKET 1
 _ACEOF
 
-    ac_cv_func_socket="yes"
+    curl_cv_func_socket="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_socket="no"
+    curl_cv_func_socket="no"
   fi
 
 
@@ -37185,11 +37252,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_SOCKETPAIR 1
 _ACEOF
 
-    ac_cv_func_socketpair="yes"
+    curl_cv_func_socketpair="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_socketpair="no"
+    curl_cv_func_socketpair="no"
   fi
 
 
@@ -37334,11 +37401,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_STRCASECMP 1
 _ACEOF
 
-    ac_cv_func_strcasecmp="yes"
+    curl_cv_func_strcasecmp="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strcasecmp="no"
+    curl_cv_func_strcasecmp="no"
   fi
 
 
@@ -37483,11 +37550,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_STRCMPI 1
 _ACEOF
 
-    ac_cv_func_strcmpi="yes"
+    curl_cv_func_strcmpi="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strcmpi="no"
+    curl_cv_func_strcmpi="no"
   fi
 
 
@@ -37632,11 +37699,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_STRDUP 1
 _ACEOF
 
-    ac_cv_func_strdup="yes"
+    curl_cv_func_strdup="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strdup="no"
+    curl_cv_func_strdup="no"
   fi
 
 
@@ -38037,11 +38104,11 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
     fi
-    ac_cv_func_strerror_r="yes"
+    curl_cv_func_strerror_r="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strerror_r="no"
+    curl_cv_func_strerror_r="no"
   fi
   #
   if test "$tst_compi_strerror_r" = "yes" &&
@@ -38193,11 +38260,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_STRICMP 1
 _ACEOF
 
-    ac_cv_func_stricmp="yes"
+    curl_cv_func_stricmp="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_stricmp="no"
+    curl_cv_func_stricmp="no"
   fi
 
 
@@ -38342,11 +38409,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_STRNCASECMP 1
 _ACEOF
 
-    ac_cv_func_strncasecmp="yes"
+    curl_cv_func_strncasecmp="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strncasecmp="no"
+    curl_cv_func_strncasecmp="no"
   fi
 
 
@@ -38491,11 +38558,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_STRNCMPI 1
 _ACEOF
 
-    ac_cv_func_strncmpi="yes"
+    curl_cv_func_strncmpi="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strncmpi="no"
+    curl_cv_func_strncmpi="no"
   fi
 
 
@@ -38640,11 +38707,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_STRNICMP 1
 _ACEOF
 
-    ac_cv_func_strnicmp="yes"
+    curl_cv_func_strnicmp="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strnicmp="no"
+    curl_cv_func_strnicmp="no"
   fi
 
 
@@ -38789,11 +38856,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_STRSTR 1
 _ACEOF
 
-    ac_cv_func_strstr="yes"
+    curl_cv_func_strstr="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strstr="no"
+    curl_cv_func_strstr="no"
   fi
 
 
@@ -38938,11 +39005,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_STRTOK_R 1
 _ACEOF
 
-    ac_cv_func_strtok_r="yes"
+    curl_cv_func_strtok_r="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strtok_r="no"
+    curl_cv_func_strtok_r="no"
   fi
 
 
@@ -39087,11 +39154,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_STRTOLL 1
 _ACEOF
 
-    ac_cv_func_strtoll="yes"
+    curl_cv_func_strtoll="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strtoll="no"
+    curl_cv_func_strtoll="no"
   fi
 
 
@@ -39261,11 +39328,11 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_WRITEV 1
 _ACEOF
 
-    ac_cv_func_writev="yes"
+    curl_cv_func_writev="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_writev="no"
+    curl_cv_func_writev="no"
   fi
 
 
@@ -39660,13 +39727,13 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_GETNAMEINFO 1
 _ACEOF
 
-      ac_cv_func_getnameinfo="yes"
+      curl_cv_func_getnameinfo="yes"
     fi
   fi
 
 
 if test "$ipv6" = "yes"; then
-  if test "$ac_cv_func_getaddrinfo" = "yes"; then
+  if test "$curl_cv_func_getaddrinfo" = "yes"; then
 
 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
 
@@ -39691,7 +39758,7 @@ done
   #
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working NI_WITHSCOPEID" >&5
 $as_echo_n "checking for working NI_WITHSCOPEID... " >&6; }
-if ${ac_cv_working_ni_withscopeid+:} false; then :
+if ${curl_cv_working_ni_withscopeid+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -39719,11 +39786,11 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-        ac_cv_working_ni_withscopeid="yes"
+        curl_cv_working_ni_withscopeid="yes"
 
 else
 
-        ac_cv_working_ni_withscopeid="no"
+        curl_cv_working_ni_withscopeid="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # AC-COMPILE-IFELSE
@@ -39797,12 +39864,12 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
 
       # Exit code == 0. Program worked.
-      ac_cv_working_ni_withscopeid="yes"
+      curl_cv_working_ni_withscopeid="yes"
 
 else
 
       # Exit code != 0. Program failed.
-      ac_cv_working_ni_withscopeid="no"
+      curl_cv_working_ni_withscopeid="no"
 
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -39811,9 +39878,9 @@ fi
  # AC-RUN-IFELSE
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_ni_withscopeid" >&5
-$as_echo "$ac_cv_working_ni_withscopeid" >&6; } # AC-CACHE-CHECK
-  case "$ac_cv_working_ni_withscopeid" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_working_ni_withscopeid" >&5
+$as_echo "$curl_cv_working_ni_withscopeid" >&6; } # AC-CACHE-CHECK
+  case "$curl_cv_working_ni_withscopeid" in
     yes)
 
 $as_echo "#define HAVE_NI_WITHSCOPEID 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to set a socket into non-blocking mode" >&5
 $as_echo_n "checking how to set a socket into non-blocking mode... " >&6; }
-  if test "x$ac_cv_func_fcntl_o_nonblock" = "xyes"; then
+  if test "x$curl_cv_func_fcntl_o_nonblock" = "xyes"; then
     tst_method="fcntl O_NONBLOCK"
-  elif test "x$ac_cv_func_ioctl_fionbio" = "xyes"; then
+  elif test "x$curl_cv_func_ioctl_fionbio" = "xyes"; then
     tst_method="ioctl FIONBIO"
-  elif test "x$ac_cv_func_ioctlsocket_fionbio" = "xyes"; then
+  elif test "x$curl_cv_func_ioctlsocket_fionbio" = "xyes"; then
     tst_method="ioctlsocket FIONBIO"
-  elif test "x$ac_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
+  elif test "x$curl_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
     tst_method="IoctlSocket FIONBIO"
-  elif test "x$ac_cv_func_setsockopt_so_nonblock" = "xyes"; then
+  elif test "x$curl_cv_func_setsockopt_so_nonblock" = "xyes"; then
     tst_method="setsockopt SO_NONBLOCK"
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_method" >&5
@@ -40091,7 +40158,7 @@ else
 fi
 
 
-if test "x$ac_cv_native_windows" != "xyes" &&
+if test "x$curl_cv_native_windows" != "xyes" &&
    test "x$enable_shared" = "xyes"; then
   build_libhostname=yes
 else
@@ -40131,7 +40198,31 @@ if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then
   as_fn_error $? "Options --enable-threaded-resolver and --enable-ares are mutually exclusive" "$LINENO" 5
 fi
 
-if test "$want_thres" = "yes" && test "$dontwant_rt" = "no"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use POSIX threads for threaded resolver" >&5
+$as_echo_n "checking whether to use POSIX threads for threaded resolver... " >&6; }
+# Check whether --enable-pthreads was given.
+if test "${enable_pthreads+set}" = set; then :
+  enableval=$enable_pthreads;  case "$enableval" in
+  no)  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       want_pthreads=no
+       ;;
+  *)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       want_pthreads=yes
+       ;;
+  esac
+else
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto" >&5
+$as_echo "auto" >&6; }
+       want_pthreads=auto
+
+
+fi
+
+if test "$want_thres" = "yes" && test "$dontwant_rt" = "no" && \
+   test "$want_pthreads" != "no"; then
   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
 if test "x$ac_cv_header_pthread_h" = xyes; then :
 
@@ -40197,13 +40288,28 @@ $as_echo "#define USE_THREADS_POSIX 1" >>confdefs.h
         curl_res_msg="POSIX threaded"
       fi
 
+fi
 
 
 fi
+if test "x$USE_THREADS_POSIX" != "x1"; then
+  if test "$want_pthreads" = "yes"; then
+    as_fn_error $? "--enable-pthreads but pthreads was not found" "$LINENO" 5
+  fi
+  if test "$want_thres" = "yes"; then
+        if test "$curl_cv_native_windows" = "yes"; then
+      USE_THREADS_WIN32=1
 
+$as_echo "#define USE_THREADS_WIN32 1" >>confdefs.h
 
+      curl_res_msg="Win32 threaded"
+    else
+      as_fn_error $? "Threaded resolver enabled but no thread library found" "$LINENO" 5
+    fi
+  fi
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable verbose strings" >&5
 $as_echo_n "checking whether to enable verbose strings... " >&6; }
 # Check whether --enable-verbose was given.
@@ -40234,7 +40340,7 @@ $as_echo_n "checking whether to enable SSPI support (Windows native builds only)
 if test "${enable_sspi+set}" = set; then :
   enableval=$enable_sspi;  case "$enableval" in
   yes)
-       if test "$ac_cv_native_windows" = "yes"; then
+       if test "$curl_cv_native_windows" = "yes"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
@@ -40325,7 +40431,7 @@ fi
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable NTLM delegation to winbind's helper" >&5
 $as_echo_n "checking whether to enable NTLM delegation to winbind's helper... " >&6; }
-  if test "$ac_cv_native_windows" = "yes" ||
+  if test "$curl_cv_native_windows" = "yes" ||
     test "x$SSL_ENABLED" = "x"; then
     want_ntlm_wb_file=""
     want_ntlm_wb="no"
@@ -40454,7 +40560,7 @@ fi
 $as_echo_n "checking whether hiding of library internal symbols will actually happen... " >&6; }
   CFLAG_CURL_SYMBOL_HIDING=""
   doing_symbol_hiding="no"
-  if test x"$ac_cv_native_windows" != "xyes" &&
+  if test x"$curl_cv_native_windows" != "xyes" &&
     test "$want_symbol_hiding" = "yes" &&
     test "$supports_symbol_hiding" = "yes"; then
     doing_symbol_hiding="yes"
@@ -40551,7 +40657,8 @@ fi
 if test "x$HAVE_LIBZ" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
 fi
-if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1"; then
+if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \
+                            -o "x$USE_THREADS_WIN32" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
 fi
 if test "x$IDN_ENABLED" = "x1"; then
@@ -40581,8 +40688,8 @@ fi
 
 if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then
   if test "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
-      -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
-      -o "x$DARWINSSL_ENABLED" = "x1"; then
+      -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
+      -o "x$NSS_ENABLED" = "x1" -o "x$DARWINSSL_ENABLED" = "x1"; then
     SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
 
     if test "x$CURL_DISABLE_HTTP" != "x1" -a \
@@ -40600,6 +40707,11 @@ if test "x$USE_NGHTTP2" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
 fi
 
+if test "x$OPENSSL_ENABLED" = "x1" -o "x$GNUTLS_ENABLED" = "x1" \
+    -o "x$NSS_ENABLED" = "x1"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
+fi
+
 
 
 if test "x$CURL_DISABLE_HTTP" != "x1"; then
@@ -40653,8 +40765,8 @@ fi
 if test "x$CURL_DISABLE_SMB" != "x1" \
     -a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \
     -a \( "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
-      -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
-      -o "x$DARWINSSL_ENABLED" = "x1" \); then
+      -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
+      -o "x$NSS_ENABLED" = "x1" -o "x$DARWINSSL_ENABLED" = "x1" \); then
   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB"
   if test "x$SSL_ENABLED" = "x1"; then
     SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS"
@@ -40868,7 +40980,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 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/Win32/Makefile packages/Win32/cygwin/Makefile packages/Linux/Makefile packages/Linux/RPM/Makefile packages/Linux/RPM/curl.spec packages/Linux/RPM/curl-ssl.spec packages/Solaris/Makefile packages/EPM/curl.list packages/EPM/Makefile packages/vms/Makefile packages/AIX/Makefile packages/AIX/RPM/Makefile packages/AIX/RPM/curl.spec 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 tests/Makefile tests/certs/Makefile tests/certs/scripts/Makefile tests/data/Makefile tests/server/Makefile tests/libtest/Makefile tests/unit/Makefile packages/Makefile packages/Win32/Makefile packages/Win32/cygwin/Makefile packages/Linux/Makefile packages/Linux/RPM/Makefile packages/Linux/RPM/curl.spec packages/Linux/RPM/curl-ssl.spec packages/Solaris/Makefile packages/EPM/curl.list packages/EPM/Makefile packages/vms/Makefile packages/AIX/Makefile packages/AIX/RPM/Makefile packages/AIX/RPM/curl.spec curl-config libcurl.pc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -41953,6 +42065,7 @@ do
     "docs/examples/Makefile") CONFIG_FILES="$CONFIG_FILES docs/examples/Makefile" ;;
     "docs/libcurl/Makefile") CONFIG_FILES="$CONFIG_FILES docs/libcurl/Makefile" ;;
     "docs/libcurl/opts/Makefile") CONFIG_FILES="$CONFIG_FILES docs/libcurl/opts/Makefile" ;;
+    "docs/cmdline-opts/Makefile") CONFIG_FILES="$CONFIG_FILES docs/cmdline-opts/Makefile" ;;
     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
     "include/curl/Makefile") CONFIG_FILES="$CONFIG_FILES include/curl/Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
@@ -42685,7 +42798,6 @@ $as_echo X"$file" |
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
 # Generated automatically by $as_me ($PACKAGE) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
 # Provide generalized library-building support services.