diff options
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | m4/fp_cc_llvm_backend.m4 | 2 | ||||
-rw-r--r-- | m4/fp_leading_underscore.m4 | 7 |
3 files changed, 10 insertions, 9 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 diff --git a/m4/fp_cc_llvm_backend.m4 b/m4/fp_cc_llvm_backend.m4 index 75cdf759bf..521c5b8cba 100644 --- a/m4/fp_cc_llvm_backend.m4 +++ b/m4/fp_cc_llvm_backend.m4 @@ -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 ]) diff --git a/m4/fp_leading_underscore.m4 b/m4/fp_leading_underscore.m4 index 5fac9f9624..fde57c7625 100644 --- a/m4/fp_leading_underscore.m4 +++ b/m4/fp_leading_underscore.m4 @@ -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 |