Skip to content
Snippets Groups Projects
Commit 37a37139 authored by John Ericson's avatar John Ericson Committed by Marge Bot
Browse files

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.
parent f1a782dd
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -5,14 +5,12 @@ AC_DEFUN([FP_CC_LLVM_BACKEND],
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_DEFINE([CC_LLVM_BACKEND], [1], [Define (to 1) if C compiler has an LLVM back end])
CcLlvmBackend=YES
AC_MSG_RESULT([yes])
else
CcLlvmBackend=NO
AC_MSG_RESULT([no])
fi
AC_SUBST(CcLlvmBackend)
rm -f conftest.txt
])
......@@ -46,11 +46,4 @@ char **argv;
}]])],[fptools_cv_leading_underscore=yes],[fptools_cv_leading_underscore=no],[fptools_cv_leading_underscore=no])
;;
esac]);
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_LEADING_UNDERSCORE
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment