summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-05-27 21:04:41 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-05-27 21:04:41 (GMT)
commitfcfdccc03b6dd26a82e87a6b6a0ca48d67f78cf6 (patch)
tree2cdd417bc0be39b12674f33052462d19d9e38ef9 /configure
parent7b1f8c542bc9f41408f0a54b853d75d0c09a2775 (diff)
parentd0bc0a26f8ac4c2f02819c262b8aa7c3dd1cad3b (diff)
downloadQt-fcfdccc03b6dd26a82e87a6b6a0ca48d67f78cf6.zip
Qt-fcfdccc03b6dd26a82e87a6b6a0ca48d67f78cf6.tar.gz
Qt-fcfdccc03b6dd26a82e87a6b6a0ca48d67f78cf6.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts: tests/auto/qtreeview/tst_qtreeview.cpp
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure29
1 files changed, 15 insertions, 14 deletions
diff --git a/configure b/configure
index b57e8cb..85ce3da 100755
--- a/configure
+++ b/configure
@@ -2704,23 +2704,24 @@ fi
if [ "$PLATFORM_MAC" = "yes" ]; then
# check -arch arguments for validity.
ALLOWED="x86 ppc x86_64 ppc64 i386"
- for i in $CFG_MAC_ARCHS
+ # Save the list so we can re-write it using only valid values
+ CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
+ CFG_MAC_ARCHS=
+ for i in $CFG_MAC_ARCHS_IN
do
if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
exit 2;
fi
- done
-
-# replace "i386" with "x86" to support configuring with -arch i386 as an alias for x86.
- CFG_MAC_ARCHS="${CFG_MAC_ARCHS/i386/x86}"
-
-# Build commmand line arguments we can pass to the compiler during configure tests
-# by prefixing each arch with "-arch".
- CFG_MAC_ARCHS_GCC_FORMAT="${CFG_MAC_ARCHS/x86/i386}"
- CFG_MAC_ARCHS_GCC_FORMAT="${CFG_MAC_ARCHS_GCC_FORMAT/i386_64/x86_64}"
- for ARCH in $CFG_MAC_ARCHS_GCC_FORMAT; do
- MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $ARCH"
+ if [ "$i" = "i386" -o "$i" = "x86" ]; then
+ # These are synonymous values
+ # CFG_MAC_ARCHS requires x86 while GCC requires i386
+ CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
+ MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch i386"
+ else
+ CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
+ MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $i"
+ fi
done
fi
@@ -4130,14 +4131,14 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
- if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then
+ if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
X86_CFLAGS="-arch i386"
X86_LFLAGS="-arch i386"
EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
fi
- if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then
+ if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
PPC_CFLAGS="-arch ppc"
PPC_LFLAGS="-arch ppc"
EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"