From: Steve M. <svn...@pl...> - 2010-03-25 21:55:52
|
Author: smcmahon Date: Thu Mar 25 21:55:44 2010 New Revision: 35553 Modified: Installers/UnifiedInstaller/trunk/install.sh Log: protect CFLAGS better Modified: Installers/UnifiedInstaller/trunk/install.sh ============================================================================== --- Installers/UnifiedInstaller/trunk/install.sh (original) +++ Installers/UnifiedInstaller/trunk/install.sh Thu Mar 25 21:55:44 2010 @@ -336,16 +336,18 @@ echo -# set up the common build environment -export CFLAGS='-fPIC' -# special cases: -if [ `uname` = 'Darwin' ]; then - if [ "x$UNIVERSALSDK" != "x" ]; then - CFLAGS="-fPIC -isysroot $UNIVERSALSDK -arch ppc -arch i386 -Wl,-syslibroot,$UNIVERSALSDK" - export MACOSX_DEPLOYMENT_TARGET=10.4 - elif uname -r | grep -q '^10\.'; then - # we're on Snow Leopard - export MACOSX_DEPLOYMENT_TARGET=10.6 +# set up the common build environment unless already existing +if [ "x$CFLAGS" = 'x' ]; then + export CFLAGS='-fPIC' + # special cases: + if [ `uname` = 'Darwin' ]; then + if [ "x$UNIVERSALSDK" != "x" ]; then + export CFLAGS="-fPIC -isysroot $UNIVERSALSDK -arch ppc -arch i386 -Wl,-syslibroot,$UNIVERSALSDK" + export MACOSX_DEPLOYMENT_TARGET=10.4 + elif uname -r | grep -q '^10\.'; then + # we're on Snow Leopard + export MACOSX_DEPLOYMENT_TARGET=10.6 + fi fi fi @@ -661,6 +663,12 @@ fi +# in some environments, having cflags present after python's +# built will foul the modules built via setuptools +export CFLAGS= +export LDFLAGS= + + "$PY" -c "import setuptools" 2> /dev/null if [ $? -gt 0 ]; then echo "Installing distribute..." |