Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
6d934cce
Commit
6d934cce
authored
Aug 03, 2011
by
Ian Lynagh
Browse files
Refactor configure.ac's: Put XCODE_VERSION() in aclocal.m4
parent
a01e1954
Changes
3
Hide whitespace changes
Inline
Side-by-side
aclocal.m4
View file @
6d934cce
...
...
@@ -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
configure.ac
View file @
6d934cce
...
...
@@ -403,26 +403,7 @@ then
fi
fi
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
XCODE_VERSION()
SplitObjsBroken=NO
if test "$TargetOS_CPP" = "darwin"
...
...
distrib/configure.ac.in
View file @
6d934cce
...
...
@@ -47,27 +47,7 @@ dnl ** Find the path to sed **
#
AC_PATH_PROG(SedCmd,gsed sed,sed)
#
dnl ** How to invoke gcc/cpp **
#
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?))
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
XCODE_VERSION()
dnl ** Which gcc to use?
dnl --------------------------------------------------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment