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
|
$NetBSD: patch-al,v 1.5 2005/01/24 21:46:33 tv Exp $
--- configure.orig 2004-11-06 20:24:12.000000000 -0500
+++ configure
@@ -1479,6 +1479,8 @@ case $ac_sys_system/$ac_sys_release in
# Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
OpenBSD/2.* | OpenBSD/3.[0123456])
define_xopen_source=no;;
+ NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
+ define_xopen_source=no;;
# On Solaris 2.6, sys/wait.h is inconsistent in the usage
# of union __?sigval. Reported by Stuart Bishop.
SunOS/5.6)
@@ -3392,7 +3394,7 @@ _ACEOF
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
INSTSONAME="$LDLIBRARY".$SOVERSION
;;
- Linux*|GNU*|NetBSD*|FreeBSD*)
+ Linux*|GNU*|NetBSD*|FreeBSD*|Interix*)
LDLIBRARY='libpython$(VERSION).so'
BLDLIBRARY='-L. -lpython$(VERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
@@ -3418,6 +3420,14 @@ _ACEOF
BLDLIBRARY='-L. -lpython$(VERSION)'
RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
;;
+ Darwin*)
+ if test -z "$enable_framework"; then
+ LDLIBRARY='libpython$(VERSION).dylib'
+ BLDLIBRARY='-L. -lpython$(VERSION)'
+ RUNSHARED=DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}
+ fi
+ ;;
+
esac
else # shared is disabled
case $ac_sys_system in
@@ -3816,7 +3826,12 @@ echo "${ECHO_T}$ac_cv_no_strict_aliasing
;;
# is there any other compiler on Darwin besides gcc?
Darwin*)
- BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
+ if [[ `/usr/bin/arch` = 'ppc' ]]
+ then
+ BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common"
+ else
+ BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -fno-common"
+ fi
;;
esac
;;
@@ -10165,7 +10180,10 @@ fi
case "$enable_toolbox_glue" in
yes)
extra_machdep_objs="Python/mactoolboxglue.o"
- extra_undefs="-u _PyMac_Error"
+ case $ac_sys_release in
+ 7*) extra_undefs=;;
+ *) extra_undefs="-u _PyMac_Error";;
+ esac
cat >>confdefs.h <<\_ACEOF
#define USE_TOOLBOX_OBJECT_GLUE 1
@@ -10295,7 +10313,7 @@ then
LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
else
# No framework. Ignore undefined symbols, assuming they come from Python
- LDSHARED="$LDSHARED -undefined suppress"
+ LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
fi ;;
Darwin/1.4*|Darwin/5.*|Darwin/6.*)
LDSHARED='$(CC) $(LDFLAGS) -bundle'
@@ -10305,8 +10323,8 @@ then
LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
else
# No framework, use the Python app as bundle-loader
- BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
- LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
+ BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)'
+ LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
fi ;;
Darwin/*)
# Use -undefined dynamic_lookup whenever possible (10.3 and later).
@@ -10324,12 +10342,12 @@ then
LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
else
# No framework, use the Python app as bundle-loader
- BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
- LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
+ BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)'
+ LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
fi
fi
;;
- Linux*|GNU*) LDSHARED='$(CC) -shared';;
+ Linux*|GNU*) LDSHARED='$(CC) -shared ${LDFLAGS}';;
BSD/OS*/4*) LDSHARED="gcc -shared";;
OpenBSD*|FreeBSD*)
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
@@ -10338,7 +10356,8 @@ then
else
LDSHARED="ld -Bshareable ${LDFLAGS}"
fi;;
- NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
+ NetBSD*) LDSHARED='$(CC) -shared ${LDFLAGS}';;
+ Interix*) LDSHARED='$(CC) -shared ${LDFLAGS}';; # XXX tv needs image-base hack
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then LDSHARED='$(CC) -shared'
@@ -10370,7 +10389,9 @@ then
fi;;
Linux*|GNU*) CCSHARED="-fPIC";;
BSD/OS*/4*) CCSHARED="-fpic";;
+ Darwin/7*) CCSHARED="-fPIC -fno-common";;
FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
+ Interix*) CCSHARED="";;
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then CCSHARED="-fPIC"
@@ -10428,6 +10449,7 @@ then
then
LINKFORSHARED="-Wl,--export-dynamic"
fi;;
+ Interix*) LINKFORSHARED="-Wl,-E";;
SunOS/5*) case $CC in
*gcc*)
if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
@@ -14297,6 +14319,7 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include "confdefs.h"
+#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
|