summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-03-07 22:58:23 +0000
committerIan Lynagh <igloo@earth.li>2011-03-07 22:58:23 +0000
commita8013a7e4d29f44379ae118856460a3bf9ae34ce (patch)
treee4ecfb65db68ec8e1ea0c9d6a3b78afcd9eb5006 /configure.ac
parenta630bb5e09ab8769d52d821f72631125f72770e8 (diff)
downloadhaskell-a8013a7e4d29f44379ae118856460a3bf9ae34ce.tar.gz
Improve the XCode version detection
Amongst other improvements, we now handle 3-component versions (like "3.1.4") correctly.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac29
1 files changed, 18 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 67cf25f9fa..f7ec2c6f84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -421,22 +421,29 @@ AC_SUBST([NmCmd])
SplitObjsBroken=NO
if test "$TargetOS_CPP" = "darwin"
then
+ AC_MSG_CHECKING(XCode version)
XCodeVersion=`xcodebuild -version | grep Xcode | sed "s/Xcode //"`
- XCodeVersion1=`echo "$XCodeVersion" | sed 's/\..*//'`
- XCodeVersion2=`echo "$XCodeVersion" | sed 's/.*\.//'`
# Old XCode versions don't actually give the XCode version
if test "$XCodeVersion" = ""
then
+ AC_MSG_RESULT(not found (too old?))
SplitObjsBroken=YES
- fi
- # Split objects is broken (#4013) with XCode < 3.2
- if test "$XCodeVersion1" -lt 3
- then
- SplitObjsBroken=YES
- fi
- if test "$XCodeVersion1" -eq 3 && test "$XCodeVersion2" -lt 2
- then
- SplitObjsBroken=YES
+ else
+ AC_MSG_RESULT($XCodeVersion)
+ XCodeVersion1=`echo "$XCodeVersion" | sed 's/\..*//'`
+changequote(, )dnl
+ XCodeVersion2=`echo "$XCodeVersion" | sed 's/[^.]*\.\([^.]*\).*/\1/'`
+changequote([, ])dnl
+ AC_MSG_NOTICE(XCode version component 1: $XCodeVersion1)
+ AC_MSG_NOTICE(XCode version component 2: $XCodeVersion2)
+ # Split objects is broken (#4013) with XCode < 3.2
+ if test "$XCodeVersion1" -lt 3
+ then
+ SplitObjsBroken=YES
+ elif test "$XCodeVersion1" -eq 3 && test "$XCodeVersion2" -lt 2
+ then
+ SplitObjsBroken=YES
+ fi
fi
fi
AC_SUBST([SplitObjsBroken])