1 $NetBSD: patch-al,v 1.9 2011/09/14 17:07:01 hans Exp $
3 - recognize OpenBSD, MirBSD, Interix, Solaris 11
4 - remove special-case library version hack for FreeBSD
6 - other stuff not previously commented (XXX)
8 --- configure.orig 2010-05-25 02:27:03.000000000 +0000
9 +++ configure 2011-09-06 18:58:15.336443123 +0200
10 @@ -2833,7 +2833,7 @@ case $ac_sys_system/$ac_sys_release in
11 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
12 # In addition, Stefan Krah confirms that issue #1244610 exists through
13 # OpenBSD 4.6, but is fixed in 4.7.
14 - OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
15 + OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456] | MirBSD/*)
16 define_xopen_source=no
17 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
18 # also defined. This can be overridden by defining _BSD_SOURCE
19 @@ -2905,10 +2905,10 @@ if test $define_xopen_source = yes
21 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
22 # defined precisely as g++ defines it
23 - # Furthermore, on Solaris 10, XPG6 requires the use of a C99
24 + # Furthermore, on Solaris >=10, XPG6 requires the use of a C99
26 case $ac_sys_system/$ac_sys_release in
27 - SunOS/5.8|SunOS/5.9|SunOS/5.10)
28 + SunOS/5.8|SunOS/5.9|SunOS/5.10|SunOS/5.11)
30 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
32 @@ -2924,10 +2924,10 @@ $as_echo "#define _XOPEN_SOURCE 600" >>c
33 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
34 # several APIs are not declared. Since this is also needed in some
35 # cases for HP-UX, we define it globally.
36 - # except for Solaris 10, where it must not be defined,
37 + # except for Solaris >=10, where it must not be defined,
38 # as it implies XPG4.2
39 case $ac_sys_system/$ac_sys_release in
41 + SunOS/5.10|SunOS/5.11)
45 @@ -4736,15 +4736,10 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
46 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
47 INSTSONAME="$LDLIBRARY".$SOVERSION
49 - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
50 + Linux*|GNU*|NetBSD*|FreeBSD*|Interix*|DragonFly*|OpenBSD*|MirBSD*)
51 LDLIBRARY='libpython$(VERSION).so'
52 BLDLIBRARY='-L. -lpython$(VERSION)'
53 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
54 - case $ac_sys_system in
56 - SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
59 INSTSONAME="$LDLIBRARY".$SOVERSION
62 @@ -7359,8 +7354,8 @@ then
63 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
65 # No framework, use the Python app as bundle-loader
66 - BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
67 - LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
68 + BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)'
69 + LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
72 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
73 @@ -7381,12 +7376,12 @@ then
74 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
76 # No framework, use the Python app as bundle-loader
77 - BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
78 - LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
79 + BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)'
80 + LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
84 - Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
85 + Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared'" ${LDFLAGS}";;
86 BSD/OS*/4*) LDSHARED="gcc -shared";;
88 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
89 @@ -7409,7 +7404,9 @@ then
93 - NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
94 + MirBSD*) LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}';;
95 + NetBSD*|DragonFly*) LDSHARED='$(CC) -shared ${LDFLAGS}';;
96 + Interix*) LDSHARED='$(CC) -shared'" ${LDFLAGS}";; # XXX tv needs image-base hack
98 if test "$GCC" = "yes"
99 then LDSHARED='$(CC) -shared'
100 @@ -7444,7 +7441,8 @@ then
102 Linux*|GNU*) CCSHARED="-fPIC";;
103 BSD/OS*/4*) CCSHARED="-fpic";;
104 - FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
105 + FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*) CCSHARED="-fPIC";;
106 + Interix*) CCSHARED="";;
108 if test "$GCC" = "yes"
109 then CCSHARED="-fPIC"
110 @@ -7497,11 +7495,12 @@ then
111 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
112 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
113 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
114 - FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
115 + FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*)
116 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
118 LINKFORSHARED="-Wl,--export-dynamic"
120 + Interix*) LINKFORSHARED="-Wl,-E";;
121 SunOS/5*) case $CC in
123 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null