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
|
$NetBSD: patch-al,v 1.10 2012/12/16 23:32:46 dholland Exp $
- recognize OpenBSD, MirBSD, Interix, Solaris 11
- remove special-case library version hack for FreeBSD
- use -Werror=format when testing HAVE_ATTRIBUTE_FORMAT_PARSETUPLE,
so injecting -Wno-error does not break the test
- honor pkgsrc LDFLAGS
- other stuff not previously commented (XXX)
--- configure.orig 2012-04-10 15:32:11.000000000 +0000
+++ configure
@@ -2833,7 +2833,7 @@ case $ac_sys_system/$ac_sys_release in
# Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
# In addition, Stefan Krah confirms that issue #1244610 exists through
# OpenBSD 4.6, but is fixed in 4.7.
- OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
+ OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456] | MirBSD/*)
define_xopen_source=no
# OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
# also defined. This can be overridden by defining _BSD_SOURCE
@@ -2905,10 +2905,10 @@ if test $define_xopen_source = yes
then
# On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
# defined precisely as g++ defines it
- # Furthermore, on Solaris 10, XPG6 requires the use of a C99
+ # Furthermore, on Solaris >=10, XPG6 requires the use of a C99
# compiler
case $ac_sys_system/$ac_sys_release in
- SunOS/5.8|SunOS/5.9|SunOS/5.10)
+ SunOS/5.8|SunOS/5.9|SunOS/5.10|SunOS/5.11)
$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
@@ -2924,10 +2924,10 @@ $as_echo "#define _XOPEN_SOURCE 600" >>c
# definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
# several APIs are not declared. Since this is also needed in some
# cases for HP-UX, we define it globally.
- # except for Solaris 10, where it must not be defined,
+ # except for Solaris >=10, where it must not be defined,
# as it implies XPG4.2
case $ac_sys_system/$ac_sys_release in
- SunOS/5.10)
+ SunOS/5.10|SunOS/5.11)
;;
*)
@@ -4736,15 +4736,10 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
INSTSONAME="$LDLIBRARY".$SOVERSION
;;
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
+ Linux*|GNU*|NetBSD*|FreeBSD*|Interix*|DragonFly*|OpenBSD*|MirBSD*)
LDLIBRARY='libpython$(VERSION).so'
BLDLIBRARY='-L. -lpython$(VERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
- case $ac_sys_system in
- FreeBSD*)
- SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
- ;;
- esac
INSTSONAME="$LDLIBRARY".$SOVERSION
;;
hp*|HP*)
@@ -5470,7 +5465,7 @@ then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -Werror"
+ CFLAGS="$CFLAGS -Werror=format"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7359,8 +7354,8 @@ then
LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(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).
@@ -7381,12 +7376,12 @@ then
LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(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*|QNX*) LDSHARED='$(CC) -shared';;
+ Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared'" ${LDFLAGS}";;
BSD/OS*/4*) LDSHARED="gcc -shared";;
FreeBSD*)
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
@@ -7409,7 +7404,9 @@ then
;;
esac
fi;;
- NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
+ MirBSD*) LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}';;
+ NetBSD*|DragonFly*) 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'
@@ -7444,7 +7441,8 @@ then
fi;;
Linux*|GNU*) CCSHARED="-fPIC";;
BSD/OS*/4*) CCSHARED="-fpic";;
- FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
+ FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*) CCSHARED="-fPIC";;
+ Interix*) CCSHARED="";;
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then CCSHARED="-fPIC"
@@ -7497,11 +7495,12 @@ then
OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
- FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
+ FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*)
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
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
|