From 14ae959bb4280a8232734284fcd9acc1d57ea510 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 16 Jul 2008 02:20:15 +0000 Subject: [PATCH] update configure --- configure | 96 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 85 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 3ec382c4c08..0aa9de657b7 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 64085 . +# From configure.in Revision: 64990 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 3.0. # @@ -701,6 +701,7 @@ INSTALL_DATA LN OPT BASECFLAGS +UNIVERSAL_ARCH_FLAGS OTHER_LIBTOOL_OPT LIBTOOL_CRUFT SO @@ -1322,6 +1323,9 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-universal-archs=ARCH + select architectures for universal build ("32-bit", + "64-bit" or "all") --with-framework-name=FRAMEWORK specify an alternate name of the framework built with --enable-framework @@ -1845,6 +1849,16 @@ cat >>confdefs.h <<\_ACEOF _ACEOF +# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables +# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable +# them. + +cat >>confdefs.h <<\_ACEOF +#define _DARWIN_C_SOURCE 1 +_ACEOF + + + define_xopen_source=yes # Arguments passed to configure. @@ -1878,6 +1892,27 @@ 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; } + +# Check whether --with-universal-archs was given. +if test "${with_universal_archs+set}" = set; then + withval=$with_universal_archs; + { echo "$as_me:$LINENO: result: $withval" >&5 +echo "${ECHO_T}$withval" >&6; } + UNIVERSAL_ARCHS="$withval" + +else + + { echo "$as_me:$LINENO: result: 32-bit" >&5 +echo "${ECHO_T}32-bit" >&6; } + +fi + + + + # Check whether --with-framework-name was given. if test "${with_framework_name+set}" = set; then @@ -1922,9 +1957,14 @@ if test "${enable_framework+set}" = set; then PYTHONFRAMEWORKPREFIX=$enableval PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR FRAMEWORKINSTALLFIRST="frameworkinstallstructure" - FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools" - FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall" - FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools" + FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall" + if test "$UNIVERSAL_ARCHS" = "all" + then + FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way" + else + FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools" + fi + if test "x${prefix}" = "xNONE" ; then FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}" else @@ -1961,6 +2001,12 @@ else fi enable_framework= + if test "$UNIVERSAL_ARCHS" = "all" + then + FRAMEWORKINSTALLLAST=update4wayuniversal + FRAMEWORKALTINSTALLLAST=update4wayuniversal + fi + fi @@ -4454,6 +4500,11 @@ then fi + +# The -arch flags for universal builds on OSX +UNIVERSAL_ARCH_FLAGS= + + # tweak BASECFLAGS based on compiler and platform case $GCC in yes) @@ -4534,7 +4585,25 @@ echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; } # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd # used to be here, but non-Apple gcc doesn't accept them. if test "${enable_universalsdk}"; then - BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}" + UNIVERSAL_ARCH_FLAGS="" + if test "$UNIVERSAL_ARCHS" = "32-bit" ; then + UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386" + + elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then + UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + + elif test "$UNIVERSAL_ARCHS" = "all" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" + + else + { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5 +echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;} + { (exit 1); exit 1; }; } + + fi + + + BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}" fi ;; @@ -12869,6 +12938,12 @@ then if test ${cur_target} '>' 10.2; then cur_target=10.3 fi + if test "${UNIVERSAL_ARCHS}" = "all"; then + # Ensure that the default platform for a 4-way + # universal build is OSX 10.5, that's the first + # OS release where 4-way builds make sense. + cur_target='10.5' + fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the @@ -12879,10 +12954,10 @@ then export MACOSX_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET='' - if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2 + if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2 then if test "${enable_universalsdk}"; then - LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}" + LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}" fi LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup' BLDSHARED="$LDSHARED" @@ -22345,8 +22420,6 @@ presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} esac - - # Check whether right shifting a negative integer extends the sign bit # or fills with zeros (like the Cray J90, according to Tim Peters). { echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5 @@ -24901,6 +24974,7 @@ INSTALL_DATA!$INSTALL_DATA$ac_delim LN!$LN$ac_delim OPT!$OPT$ac_delim BASECFLAGS!$BASECFLAGS$ac_delim +UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim SO!$SO$ac_delim @@ -24912,7 +24986,6 @@ CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim SHLIBS!$SHLIBS$ac_delim USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim -USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -24954,6 +25027,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim LDLAST!$LDLAST$ac_delim THREADOBJ!$THREADOBJ$ac_delim DLINCLDIR!$DLINCLDIR$ac_delim @@ -24973,7 +25047,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` = 17; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 18; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5