This check-in fixes two problems:

1) A non-critical off-by-one error in pythonw

2) A problem in the configure script that caused
   builds with '--enable-framework --enable-universalsdk=/'
   to fail on OSX 10.6.
This commit is contained in:
Ronald Oussoren 2010-04-08 08:13:31 +00:00
parent efc2f497fd
commit 7591285fc3
3 changed files with 74 additions and 99 deletions

View File

@ -76,7 +76,7 @@ static char* get_python_path(void)
end --;
}
end++;
if (end[1] == '.') {
if (*end == '.') {
end++;
}
strcpy(end, "Resources/Python.app/Contents/MacOS/" PYTHONFRAMEWORK);
@ -161,7 +161,7 @@ main(int argc, char **argv) {
setup_spawnattr(&spawnattr);
posix_spawn(NULL, exec_path, NULL,
&spawnattr, argv, environ);
err(1, "posix_spawn: %s", argv[0]);
err(1, "posix_spawn: %s", exec_path);
}
#endif
execve(exec_path, argv, environ);

138
configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Revision: 78964 .
# From configure.in Revision: 79652 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 2.7.
#
@ -712,6 +712,7 @@ OTHER_LIBTOOL_OPT
LIBTOOL_CRUFT
SO
LDSHARED
LDCXXSHARED
BLDSHARED
CCSHARED
LINKFORSHARED
@ -3898,7 +3899,7 @@ else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f conftest*
rm -f -r conftest*
@ -4785,40 +4786,7 @@ echo "${ECHO_T}$CC" >&6; }
if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
ARCH_RUN_32BIT=""
LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
# You have to use different flags on various versions of
# OSX to extract PPC code from an universal binary, basically
# '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
# newer.
# Because '-arch pp7400' works on OSX 10.5 or higher this
# test is only present in the '32-bit' branch, all other
# branches require OSX 10.5 to compile.
{ echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
FN="test.$$"
cat >${FN}.c <<-EOF
int main() { return 0; }
EOF
${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
if test $? != 0 ; then
rm ${FN} ${FN}.c
{ echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
else
lipo -extract -output "${FN}.out" -arch ppc7400 "${FN}" 2>/dev/null
if test $? != 0 ; then
LIPO_32BIT_FLAGS="-extract ppc -extract i386"
{ echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
else
{ echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
fi
rm -f ${FN} ${FN}.c ${FN}.out
fi
LIPO_32BIT_FLAGS=""
elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
@ -5502,7 +5470,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
rm -f conftest*
rm -f -r conftest*
fi
@ -5523,7 +5491,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
rm -f conftest*
rm -f -r conftest*
fi
@ -6623,7 +6591,7 @@ _ACEOF
fi
rm -f conftest*
rm -f -r conftest*
{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
echo "${ECHO_T}$was_it_defined" >&6; }
@ -7153,7 +7121,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_type_uid_t=no
fi
rm -f conftest*
rm -f -r conftest*
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
@ -14746,6 +14714,7 @@ esac
# SO is the extension of shared libraries `(including the dot!)
# -- usually .so, .sl on HP-UX, .dll on Cygwin
{ echo "$as_me:$LINENO: checking SO" >&5
@ -14802,36 +14771,47 @@ then
IRIX/5*) LDSHARED="ld -shared";;
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
SunOS/5*)
if test "$GCC" = "yes"
then LDSHARED='$(CC) -shared'
else LDSHARED='$(CC) -G';
if test "$GCC" = "yes" ; then
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared'
else
LDSHARED='$(CC) -G'
LDCXXSHARED='$(CXX) -G'
fi ;;
hp*|HP*)
if test "$GCC" = "yes"
then LDSHARED='$(CC) -shared'
else LDSHARED='ld -b';
if test "$GCC" = "yes" ; then
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared'
else
LDSHARED='ld -b'
fi ;;
OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Darwin/1.3*)
LDSHARED='$(CC) $(LDFLAGS) -bundle'
LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
if test "$enable_framework" ; then
# Link against the framework. All externals should be defined.
BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
else
# No framework. Ignore undefined symbols, assuming they come from Python
LDSHARED="$LDSHARED -undefined suppress"
LDCXXSHARED="$LDCXXSHARED -undefined suppress"
fi ;;
Darwin/1.4*|Darwin/5.*|Darwin/6.*)
LDSHARED='$(CC) $(LDFLAGS) -bundle'
LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
if test "$enable_framework" ; then
# Link against the framework. All externals should be defined.
BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LDCXXSHARED="$LDCXXSHARED "'$(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)'
LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
fi ;;
Darwin/*)
# Use -undefined dynamic_lookup whenever possible (10.3 and later).
@ -14843,26 +14823,35 @@ then
LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
fi
LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
BLDSHARED="$LDSHARED"
else
LDSHARED='$(CC) $(LDFLAGS) -bundle'
LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
if test "$enable_framework" ; then
# Link against the framework. All externals should be defined.
BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LDCXXSHARED="$LDCXXSHARED "'$(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)'
LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
fi
fi
;;
Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
BSD/OS*/4*) LDSHARED="gcc -shared";;
Linux*|GNU*|QNX*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
BSD/OS*/4*)
LDSHARED="gcc -shared"
LDCXXSHARED="g++ -shared";;
FreeBSD*)
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
then
LDSHARED='$(CC) -shared ${LDFLAGS}'
LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
else
LDSHARED="ld -Bshareable ${LDFLAGS}"
fi;;
@ -14870,6 +14859,7 @@ then
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
then
LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
else
case `uname -r` in
[01].* | 2.[0-7] | 2.[0-7].*)
@ -14877,23 +14867,36 @@ then
;;
*)
LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
;;
esac
fi;;
NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
NetBSD*|DragonFly*)
LDSHARED="cc -shared ${LDFLAGS}"
LDCXXSHARED="c++ -shared ${LDFLAGS}";;
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then LDSHARED='$(CC) -shared'
else LDSHARED='$(CC) -G'
if test "$GCC" = "yes" ; then
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared'
else
LDSHARED='$(CC) -G'
LDCXXSHARED='$(CXX) -G'
fi;;
SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
atheos*) LDSHARED="gcc -shared";;
SCO_SV*)
LDSHARED='$(CC) -Wl,-G,-Bexport'
LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
CYGWIN*)
LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
atheos*)
LDSHARED="gcc -shared"
LDCXXSHARED="g++ -shared";;
*) LDSHARED="ld";;
esac
fi
{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
echo "${ECHO_T}$LDSHARED" >&6; }
LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
BLDSHARED=${BLDSHARED-$LDSHARED}
# CCSHARED are the C *flags* used to create objects to go into a shared
# library (module) -- this is only needed for a few systems
@ -15941,7 +15944,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
unistd_defines_pthreads=no
fi
rm -f conftest*
rm -f -r conftest*
{ echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
@ -17555,7 +17558,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "yes" >/dev/null 2>&1; then
ipv6type=$i
fi
rm -f conftest*
rm -f -r conftest*
;;
kame)
@ -17578,7 +17581,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6libdir=/usr/local/v6/lib
ipv6trylibc=yes
fi
rm -f conftest*
rm -f -r conftest*
;;
linux-glibc)
@ -17599,7 +17602,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6type=$i;
ipv6trylibc=yes
fi
rm -f conftest*
rm -f -r conftest*
;;
linux-inet6)
@ -17637,7 +17640,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib
fi
rm -f conftest*
rm -f -r conftest*
;;
v6d)
@ -17660,7 +17663,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6libdir=/usr/local/v6/lib;
BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
fi
rm -f conftest*
rm -f -r conftest*
;;
zeta)
@ -17682,7 +17685,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib
fi
rm -f conftest*
rm -f -r conftest*
;;
esac
@ -26228,7 +26231,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
rm -f conftest*
rm -f -r conftest*
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@ -26247,7 +26250,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
rm -f conftest*
rm -f -r conftest*
fi
@ -26517,7 +26520,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
rm -f conftest*
rm -f -r conftest*
fi
@ -28510,7 +28513,7 @@ OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
SO!$SO$ac_delim
LDSHARED!$LDSHARED$ac_delim
BLDSHARED!$BLDSHARED$ac_delim
LDCXXSHARED!$LDCXXSHARED$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@ -28552,6 +28555,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
BLDSHARED!$BLDSHARED$ac_delim
CCSHARED!$CCSHARED$ac_delim
LINKFORSHARED!$LINKFORSHARED$ac_delim
CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
@ -28581,7 +28585,7 @@ SRCDIRS!$SRCDIRS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View File

@ -1024,36 +1024,7 @@ yes)
if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
ARCH_RUN_32BIT=""
LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
# You have to use different flags on various versions of
# OSX to extract PPC code from an universal binary, basically
# '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
# newer.
# Because '-arch pp7400' works on OSX 10.5 or higher this
# test is only present in the '32-bit' branch, all other
# branches require OSX 10.5 to compile.
AC_MSG_CHECKING(lipo flag for extracting ppc code)
FN="test.$$"
cat >${FN}.c <<-EOF
int main() { return 0; }
EOF
${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
if test $? != 0 ; then
rm ${FN} ${FN}.c
AC_MSG_RESULT([failed, assumee -extract ppc7400])
else
lipo -extract -output "${FN}.out" -arch ppc7400 "${FN}" 2>/dev/null
if test $? != 0 ; then
LIPO_32BIT_FLAGS="-extract ppc -extract i386"
AC_MSG_RESULT("'-extract ppc'")
else
AC_MSG_RESULT("'-extract ppc7400'")
fi
rm -f ${FN} ${FN}.c ${FN}.out
fi
LIPO_32BIT_FLAGS=""
elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"