summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-11-22 11:26:28 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-11-22 11:26:28 +0000
commitd681f8700ad2c034d5b9dacf4e681b8e7279f6ee (patch)
treec808d7d5e623679e13b67d8e82d46ebbb0130005 /aclocal.m4
parenta5762b71d1aaf9037d14fc706bb04976a231bf22 (diff)
parent6247b59e5d31de58ee51273916bc44ac2118240a (diff)
downloadhaskell-d681f8700ad2c034d5b9dacf4e681b8e7279f6ee.tar.gz
merge
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index f76c082388..590a1250d5 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1028,6 +1028,22 @@ AC_SUBST(GccLT34)
AC_SUBST(GccLT46)
])# FP_GCC_VERSION
+dnl Check to see if the C compiler uses an LLVM back end
+dnl
+AC_DEFUN([FP_CC_LLVM_BACKEND],
+[AC_REQUIRE([AC_PROG_CC])
+AC_MSG_CHECKING([whether C compiler has an LLVM back end])
+$CC -x c /dev/null -dM -E > conftest.txt 2>&1
+if grep "__llvm__" conftest.txt >/dev/null 2>&1; then
+ AC_SUBST([CC_LLVM_BACKEND], [1])
+ AC_MSG_RESULT([yes])
+else
+ AC_SUBST([CC_LLVM_BACKEND], [0])
+ AC_MSG_RESULT([no])
+fi
+rm -f conftest.txt
+])
+
dnl Small feature test for perl version. Assumes PerlCmd
dnl contains path to perl binary.
dnl