summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-08-03 00:53:57 +0100
committerIan Lynagh <igloo@earth.li>2011-08-03 00:53:57 +0100
commit1422ea4e0d9e0e9995e57da7ce00fec8109e6772 (patch)
tree8e1cb31054cc9be1cf5ee633c38ea245a267e515 /aclocal.m4
parent6d934cce1d4ccbcc8abf7985b66d36d4386808db (diff)
downloadhaskell-1422ea4e0d9e0e9995e57da7ce00fec8109e6772.tar.gz
Refactor configure.ac's: Define FIND_GCC() in aclocal.m4
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m418
1 files changed, 18 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index dc9479117a..d798eb5063 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1607,4 +1607,22 @@ AC_DEFUN([XCODE_VERSION],[
fi
])
+# FIND_GCC()
+# --------------------------------
+# Finds where gcc is
+AC_DEFUN([FIND_GCC],[
+ if test "$TargetOS_CPP" = "darwin" &&
+ test "$XCodeVersion1" -ge 4
+ then
+ # From Xcode 4, use 'gcc-4.2' to force the use of the gcc legacy
+ # backend (instead of the LLVM backend)
+ FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc-4.2])
+ else
+ FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
+ fi
+ export CC
+ WhatGccIsCalled="$CC"
+ AC_SUBST(WhatGccIsCalled)
+])
+
# LocalWords: fi