diff options
author | Ian Lynagh <igloo@earth.li> | 2011-08-03 00:49:10 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-08-03 00:49:10 +0100 |
commit | 6d934cce1d4ccbcc8abf7985b66d36d4386808db (patch) | |
tree | 4f73a7b53fd478f70f2bad0fbe7ea712d24c9bdf /aclocal.m4 | |
parent | a01e195400b0495d8971f0ebe1c246286b764aac (diff) | |
download | haskell-6d934cce1d4ccbcc8abf7985b66d36d4386808db.tar.gz |
Refactor configure.ac's: Put XCODE_VERSION() in aclocal.m4
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 680e0a8efe..dc9479117a 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1581,4 +1581,30 @@ LIBRARY_[]translit([$1], [-], [_])[]_VERSION=`grep -i "^version:" libraries/${di AC_SUBST(LIBRARY_[]translit([$1], [-], [_])[]_VERSION) ]) +# XCODE_VERSION() +# -------------------------------- +# Gets the version number of XCode, if on a Mac +AC_DEFUN([XCODE_VERSION],[ + if test "$TargetOS_CPP" = "darwin" + then + AC_MSG_CHECKING(XCode version) + XCodeVersion=`xcodebuild -version | grep Xcode | sed "s/Xcode //"` + # Old XCode versions don't actually give the XCode version + if test "$XCodeVersion" = "" + then + AC_MSG_RESULT(not found (too old?)) + XCodeVersion1=0 + XCodeVersion2=0 + 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) + fi + fi +]) + # LocalWords: fi |