summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-10-27 03:01:37 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-02 01:37:08 -0400
commit37a37139160f628a0ce3b27d8269fcf86d226f71 (patch)
tree1a82616b41c105cb8dfe4ece11f8fb9caf0b77d3 /configure.ac
parentf1a782dd29480c4570465ea0aa06008bbf444e13 (diff)
downloadhaskell-37a37139160f628a0ce3b27d8269fcf86d226f71.tar.gz
Separate some AC_SUBST / AC_DEFINE
Eventually, the RTS configure alone will need the vast majority of AC_DEFINE, and the top-level configure will need the most AC_SUBST. By removing the "side effects" of the macros like this we make them more reusable so they can be shared between the two configures without doing too much.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7c0f80cf68..634210b151 100644
--- a/configure.ac
+++ b/configure.ac
@@ -799,6 +799,9 @@ FP_GCC_EXTRA_FLAGS
dnl ** look to see if we have a C compiler using an llvm back end.
dnl
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])])
+AC_SUBST(CcLlvmBackend)
FPTOOLS_SET_C_LD_FLAGS([target],[CFLAGS],[LDFLAGS],[IGNORE_LINKER_LD_FLAGS],[CPPFLAGS])
FPTOOLS_SET_C_LD_FLAGS([build],[CONF_CC_OPTS_STAGE0],[CONF_GCC_LINKER_OPTS_STAGE0],[CONF_LD_LINKER_OPTS_STAGE0],[CONF_CPP_OPTS_STAGE0])
@@ -1183,6 +1186,13 @@ FPTOOLS_FLOAT_WORD_ORDER_BIGENDIAN
dnl ** check for leading underscores in symbol names
FP_LEADING_UNDERSCORE
+AC_SUBST([LeadingUnderscore], [`echo $fptools_cv_leading_underscore | sed 'y/yesno/YESNO/'`])
+if test x"$fptools_cv_leading_underscore" = xyes; then
+ AC_SUBST([CabalLeadingUnderscore],[True])
+ AC_DEFINE([LEADING_UNDERSCORE], [1], [Define to 1 if C symbols have a leading underscore added by the compiler.])
+else
+ AC_SUBST([CabalLeadingUnderscore],[False])
+fi
FP_VISIBILITY_HIDDEN