summaryrefslogtreecommitdiff
path: root/data/_python3.7/configure.diff
blob: f8b11e25436f835b480c6a6fafc12659732414b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
diff -ur Python-3.7.3/configure.ac Python-3.7.3+iPhone/configure.ac
--- Python-3.7.3/configure.ac	2019-03-25 20:21:05.000000000 +0000
+++ Python-3.7.3+iPhone/configure.ac	2019-04-11 14:26:49.751953155 +0000
@@ -379,6 +379,9 @@
 	*-*-cygwin*)
 		ac_sys_system=Cygwin
 		;;
+	*-*-darwin*)
+		ac_sys_system=Darwin
+		;;
 	*)
 		# for now, limit cross builds to known configurations
 		MACHDEP="unknown"
@@ -423,6 +426,9 @@
 	*-*-cygwin*)
 		_host_cpu=
 		;;
+	*-*-darwin*)
+			_host_cpu=$host_cpu
+		;;
 	*)
 		# for now, limit cross builds to known configurations
 		MACHDEP="unknown"
@@ -1202,11 +1208,15 @@
 
 AC_CHECK_TOOLS([READELF], [readelf], [:])
 if test "$cross_compiling" = yes; then
-    case "$READELF" in
-	readelf|:)
-	AC_MSG_ERROR([readelf for the host is required for cross builds])
-	;;
-    esac
+    if test "$ac_sys_system" = Darwin; then
+	:
+    else
+	case "$READELF" in
+		readelf|:)
+		AC_MSG_ERROR([readelf for the host is required for cross builds])
+		;;
+	esac
+    fi
 fi
 AC_SUBST(READELF)
 
@@ -2407,63 +2417,63 @@
 
 AC_SUBST(LIBTOOL_CRUFT)
 case $ac_sys_system/$ac_sys_release in
-  Darwin/@<:@01567@:>@\..*)
-    LIBTOOL_CRUFT="-framework System -lcc_dynamic"
-    if test "${enable_universalsdk}"; then
-	    :
-    else
-        LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
-    fi
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
+#  Darwin/@<:@01567@:>@\..*)
+#    LIBTOOL_CRUFT="-framework System -lcc_dynamic"
+#    if test "${enable_universalsdk}"; then
+#	    :
+#    else
+#        LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
+#    fi
+#    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+#    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
   Darwin/*)
-    gcc_version=`gcc -dumpversion`
-    if test ${gcc_version} '<' 4.0
-        then
-            LIBTOOL_CRUFT="-lcc_dynamic"
-        else
+#    gcc_version=`gcc -dumpversion`
+#    if test ${gcc_version} '<' 4.0
+#        then
+#            LIBTOOL_CRUFT="-lcc_dynamic"
+#        else
             LIBTOOL_CRUFT=""
-    fi
-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
-    #include <unistd.h>
-    int main(int argc, char*argv[])
-    {
-      if (sizeof(long) == 4) {
-    	  return 0;
-      } else {
-      	  return 1;
-      }
-    }
-    ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
-
-    if test "${ac_osx_32bit}" = "yes"; then
-    	case `/usr/bin/arch` in
-    	i386)
-    		MACOSX_DEFAULT_ARCH="i386"
-    		;;
-    	ppc)
-    		MACOSX_DEFAULT_ARCH="ppc"
-    		;;
-    	*)
-    		AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
-    		;;
-    	esac
-    else
-    	case `/usr/bin/arch` in
-    	i386)
-    		MACOSX_DEFAULT_ARCH="x86_64"
-    		;;
-    	ppc)
-    		MACOSX_DEFAULT_ARCH="ppc64"
-    		;;
-    	*)
-    		AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
-    		;;
-    	esac
-
-    fi
+#    fi
+#    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#    #include <unistd.h>
+#    int main(int argc, char*argv[])
+#    {
+#      if (sizeof(long) == 4) {
+#    	  return 0;
+#      } else {
+#      	  return 1;
+#      }
+#    }
+#    ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
+
+#    if test "${ac_osx_32bit}" = "yes"; then
+#    	case `/usr/bin/arch` in
+#    	i386)
+#    		MACOSX_DEFAULT_ARCH="i386"
+#    		;;
+#    	ppc)
+#    		MACOSX_DEFAULT_ARCH="ppc"
+#   		;;
+#    	*)
+#    		AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
+#    		;;
+#    	esac
+#    else
+#    	case `/usr/bin/arch` in
+#    	i386)
+#    		MACOSX_DEFAULT_ARCH="x86_64"
+#    		;;
+#    	ppc)
+#    		MACOSX_DEFAULT_ARCH="ppc64"
+#    		;;
+#    	*)
+#    		AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
+#    		;;
+#    	esac
+#
+#    fi
 
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs"
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
 esac
@@ -4052,7 +4062,11 @@
 
 if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
 then
-	if test $ipv6 = yes
+	if test "$cross_compiling" = yes && test "$ac_cv_buggy_getaddrinfo" = yes; then
+		echo 'Warning: Buggy getaddrinfo! Skipping fatal error.'
+		echo '	or you can specify "--disable-ipv6".'
+		AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if you have the getaddrinfo function.])
+	elif test $ipv6 = yes
 	then
 		echo 'Fatal: You must get working getaddrinfo() function.'
 		echo '       or you can specify "--disable-ipv6"'.