···1+On darwin, providing SystemConfiguration to curl currently results in a
2+reference loop, so we have to disable the check for it and the feature
3+which requires it (NAT64).
4+5+Patching actual configure script here as we also don't want to require
6+autoconf in the bootstrap loop just to regenerate a patched configure.ac.
7+8+--- a/configure 2021-10-16 00:51:59.000000000 +0100
9++++ b/configure 2021-10-16 01:06:46.000000000 +0100
10+@@ -20810,7 +20810,7 @@
11+ if test "x$build_for_macos" != xno; then
12+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13+ printf "%s\n" "yes" >&6; }
14+- LDFLAGS="$LDFLAGS -framework CoreFoundation -framework SystemConfiguration"
15++ LDFLAGS="$LDFLAGS -framework CoreFoundation"
16+ else
17+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18+ printf "%s\n" "no" >&6; }
19+@@ -22211,9 +22211,6 @@
20+ fi
21+22+23+-if test "$HAVE_GETHOSTBYNAME" != "1"; then
24+- as_fn_error $? "couldn't find libraries for gethostbyname()" "$LINENO" 5
25+-fi
26+27+28+ curl_includes_winsock2="\
29+diff --git a/lib/curl_setup.h b/lib/curl_setup.h
30+index 99048c489..19abfbbac 100644
31+--- a/lib/curl_setup.h
32++++ b/lib/curl_setup.h
33+@@ -247,19 +247,6 @@
34+ # include "setup-win32.h"
35+ #endif
36+37+-/*
38+- * Use getaddrinfo to resolve the IPv4 address literal. If the current network
39+- * interface doesn't support IPv4, but supports IPv6, NAT64, and DNS64,
40+- * performing this task will result in a synthesized IPv6 address.
41+- */
42+-#if defined(__APPLE__) && !defined(USE_ARES)
43+-#include <TargetConditionals.h>
44+-#define USE_RESOLVE_ON_IPS 1
45+-# if defined(TARGET_OS_OSX) && TARGET_OS_OSX
46+-# define CURL_OSX_CALL_COPYPROXIES 1
47+-# endif
48+-#endif
49+-
50+ #ifdef USE_LWIPSOCK
51+ # include <lwip/init.h>
52+ # include <lwip/sockets.h>