Fix for issue #8175: ensure that configure --with-universal-archs=all

works on osx 10.5
This commit is contained in:
Ronald Oussoren 2010-04-18 19:14:06 +00:00
parent e3eaf3153f
commit a23bccee07
4 changed files with 12 additions and 28 deletions

View File

@ -150,12 +150,14 @@ pythonw: $(srcdir)/Tools/pythonw.c Makefile
-DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"'
pythonw-32: $(srcdir)/Tools/pythonw.c Makefile
$(CC) $(subst -arch x86_64,,$(subst -arch ppc64,,$(LDFLAGS))) -o $@ @UNIVERSAL_ARCH32_FLAGS@ $(srcdir)/Tools/pythonw.c \
-DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32"'
$(CC) $(LDFLAGS) -o pythonw-tmp.o $(srcdir)/Tools/pythonw.c \
-DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32"' ;\
lipo @LIPO_32BIT_FLAGS@ -output $@ pythonw-tmp.o ; rm pythonw-tmp.o
pythonw-64: $(srcdir)/Tools/pythonw.c Makefile
$(CC) $(subst -arch i386,,$(subst -arch ppc,,$(LDFLAGS))) -o $@ @UNIVERSAL_ARCH64_FLAGS@ $(srcdir)/Tools/pythonw.c \
-DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64"'
$(CC) $(LDFLAGS) -o pythonw-tmp.o $(srcdir)/Tools/pythonw.c \
-DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64"' ;\
lipo @LIPO_64BIT_FLAGS@ -output $@ pythonw-tmp.o ; rm pythonw-tmp.o
install_PythonLauncher:
cd PythonLauncher && make install DESTDIR=$(DESTDIR)

View File

@ -79,6 +79,8 @@ Library
Build
-----
- Issue #8175: --with-universal-archs=all works correctly on OSX 10.5
- Issue #6716: Quote -x arguments of compileall in MSI installer.
- Issue #1628484: The Makefile doesn't ignore the CFLAGS environment

20
configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Revision: 79353 .
# From configure.in Revision: 80188 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 2.6.
#
@ -660,8 +660,6 @@ UNIVERSALSDK
ARCH_RUN_32BIT
LIPO_32BIT_FLAGS
LIPO_64BIT_FLAGS
UNIVERSAL_ARCH32_FLAGS
UNIVERSAL_ARCH64_FLAGS
PYTHONFRAMEWORK
PYTHONFRAMEWORKIDENTIFIER
PYTHONFRAMEWORKDIR
@ -1928,8 +1926,6 @@ fi
UNIVERSAL_ARCHS="32-bit"
{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
@ -4741,24 +4737,18 @@ echo "${ECHO_T}$CC" >&6; }
elif test "$UNIVERSAL_ARCHS" = "all" ; then
ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
UNIVERSAL_ARCH32_FLAGS="-arch i386 -arch ppc"
UNIVERSAL_ARCH64_FLAGS="-arch x86_64 -arch ppc64"
LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
LIPO_64BIT_FLAGS="-extract x86_64 -extract ppc64"
elif test "$UNIVERSAL_ARCHS" = "intel" ; then
ARCH_RUN_32BIT="/usr/bin/arch -i386"
UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
UNIVERSAL_ARCH32_FLAGS="-arch i386"
UNIVERSAL_ARCH64_FLAGS="-arch x86_64"
LIPO_32BIT_FLAGS="-extract i386"
LIPO_64BIT_FLAGS="-extract x86_64"
elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
UNIVERSAL_ARCH32_FLAGS="-arch i386 -arch ppc"
UNIVERSAL_ARCH64_FLAGS="-arch x86_64"
LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
LIPO_64BIT_FLAGS="-extract x86_64"
@ -25891,8 +25881,6 @@ UNIVERSALSDK!$UNIVERSALSDK$ac_delim
ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
LIPO_64BIT_FLAGS!$LIPO_64BIT_FLAGS$ac_delim
UNIVERSAL_ARCH32_FLAGS!$UNIVERSAL_ARCH32_FLAGS$ac_delim
UNIVERSAL_ARCH64_FLAGS!$UNIVERSAL_ARCH64_FLAGS$ac_delim
PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
@ -25944,6 +25932,8 @@ 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
CCSHARED!$CCSHARED$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@ -25985,8 +25975,6 @@ _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
SHLIBS!$SHLIBS$ac_delim
@ -26013,7 +26001,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` = 26; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View File

@ -113,8 +113,6 @@ AC_SUBST(ARCH_RUN_32BIT)
UNIVERSAL_ARCHS="32-bit"
AC_SUBST(LIPO_32BIT_FLAGS)
AC_SUBST(LIPO_64BIT_FLAGS)
AC_SUBST(UNIVERSAL_ARCH32_FLAGS)
AC_SUBST(UNIVERSAL_ARCH64_FLAGS)
AC_MSG_CHECKING(for --with-universal-archs)
AC_ARG_WITH(universal-archs,
AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit", "3-way", "intel" or "all")),
@ -982,24 +980,18 @@ yes)
elif test "$UNIVERSAL_ARCHS" = "all" ; then
ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
UNIVERSAL_ARCH32_FLAGS="-arch i386 -arch ppc"
UNIVERSAL_ARCH64_FLAGS="-arch x86_64 -arch ppc64"
LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
LIPO_64BIT_FLAGS="-extract x86_64 -extract ppc64"
elif test "$UNIVERSAL_ARCHS" = "intel" ; then
ARCH_RUN_32BIT="/usr/bin/arch -i386"
UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
UNIVERSAL_ARCH32_FLAGS="-arch i386"
UNIVERSAL_ARCH64_FLAGS="-arch x86_64"
LIPO_32BIT_FLAGS="-extract i386"
LIPO_64BIT_FLAGS="-extract x86_64"
elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
UNIVERSAL_ARCH32_FLAGS="-arch i386 -arch ppc"
UNIVERSAL_ARCH64_FLAGS="-arch x86_64"
LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
LIPO_64BIT_FLAGS="-extract x86_64"