From f0c21f86cdc9341b7dda2b4b2bca085954a79ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rvig?= Date: Mon, 30 Mar 2009 14:42:48 +0200 Subject: Mac: check for valid -arch arguments in configure. Allow x86 x86_64 ppc ppc64, exit with an error message if something else is passed? Reviewed-by: nrc --- configure | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure b/configure index 269d88c..f0b7f90 100755 --- a/configure +++ b/configure @@ -2692,6 +2692,18 @@ if [ "$QT_CROSS_COMPILE" = "yes" ]; then fi fi +# check -arch arguments for validity. +if [ "$PLATFORM_MAC" = "yes" ]; then + ALLOWED="x86 ppc x86_64 ppc64" + for i in $CFG_MAC_ARCHS + do + if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then + echo "Unknown architecture: \"$i\". Supported architechtures: x86 ppc x86_64 ppc64"; + exit 2; + fi + done +fi + # find the default framework value if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then if [ "$CFG_FRAMEWORK" = "auto" ]; then -- cgit v0.12