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

138
configure vendored
View File

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