summaryrefslogtreecommitdiff
path: root/rts/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'rts/configure.ac')
-rw-r--r--rts/configure.ac25
1 files changed, 24 insertions, 1 deletions
diff --git a/rts/configure.ac b/rts/configure.ac
index 21e6f57602..be8ecb7cb3 100644
--- a/rts/configure.ac
+++ b/rts/configure.ac
@@ -22,6 +22,8 @@ dnl #define SIZEOF_CHAR 0
dnl recently.
AC_PREREQ([2.69])
+AC_CONFIG_FILES([ghcplatform.h.top])
+
AC_CONFIG_HEADERS([ghcautoconf.h.autoconf])
AC_ARG_ENABLE(asserts-all-ways,
@@ -85,6 +87,10 @@ FP_CC_LLVM_BACKEND
AS_IF([test x"$CcLlvmBackend" = x"YES"],
[AC_DEFINE([CC_LLVM_BACKEND], [1], [Define (to 1) if C compiler has an LLVM back end])])
+GHC_CONVERT_PLATFORM_PARTS([build], [Build])
+FPTOOLS_SET_PLATFORM_VARS([build],[Build])
+FPTOOLS_SET_HASKELL_PLATFORM_VARS([Build])
+
GHC_CONVERT_PLATFORM_PARTS([host], [Host])
FPTOOLS_SET_PLATFORM_VARS([host], [Host])
FPTOOLS_SET_HASKELL_PLATFORM_VARS([Host])
@@ -357,11 +363,28 @@ dnl --------------------------------------------------------------
AC_OUTPUT
dnl ######################################################################
-dnl Generate ghcautoconf.h
+dnl Generate ghcplatform.h
dnl ######################################################################
[
mkdir -p include
+
+touch include/ghcplatform.h
+> include/ghcplatform.h
+
+cat ghcplatform.h.top >> include/ghcplatform.h
+]
+AS_IF([test x"${Unregisterised}" = x"YES"],
+ [echo "#define UnregisterisedCompiler 1" >> include/ghcplatform.h])
+[
+cat $srcdir/ghcplatform.h.bottom >> include/ghcplatform.h
+]
+
+dnl ######################################################################
+dnl Generate ghcautoconf.h
+dnl ######################################################################
+
+[
touch include/ghcautoconf.h
> include/ghcautoconf.h