summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-05-12 10:59:15 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-23 12:46:35 -0500
commitb5c714545abc5f75a1ffdcc39b4bfdc7cd5e64b4 (patch)
tree46721c2ca167a8295fb70600b102ccc26aac7b02 /m4
parente153851650bbba631f3a6926ba42422f9f1fa0cd (diff)
downloadhaskell-b5c714545abc5f75a1ffdcc39b4bfdc7cd5e64b4.tar.gz
Don't let configure perform trivial substitutions (#21846)
Hadrian now performs substitutions, especially to generate .cabal files from .cabal.in files. Two benefits: 1. We won't have to re-configure when we modify thing.cabal.in. Hadrian will take care of this for us. 2. It paves the way to allow the same package to be configured differently by Hadrian in the same session. This will be useful to fix #19174: we want to build a stage2 cross-compiler for the host platform and a stage1 compiler for the cross target platform in the same Hadrian session.
Diffstat (limited to 'm4')
-rw-r--r--m4/fp_bfd_support.m45
-rw-r--r--m4/fp_cc_supports__atomics.m44
-rw-r--r--m4/fp_check_pthreads.m46
3 files changed, 8 insertions, 7 deletions
diff --git a/m4/fp_bfd_support.m4 b/m4/fp_bfd_support.m4
index 89c051253f..2f357820f7 100644
--- a/m4/fp_bfd_support.m4
+++ b/m4/fp_bfd_support.m4
@@ -2,7 +2,7 @@
# ----------------------
# whether to use libbfd for debugging RTS
AC_DEFUN([FP_BFD_SUPPORT], [
- AC_SUBST([CabalHaveLibbfd], [False])
+ HaveLibbfd=NO
AC_ARG_ENABLE(bfd-debug,
[AS_HELP_STRING([--enable-bfd-debug],
[Enable symbol resolution for -debug rts ('+RTS -Di') via binutils' libbfd [default=no]])],
@@ -40,9 +40,10 @@ AC_DEFUN([FP_BFD_SUPPORT], [
bfd_get_symbol_info(abfd,symbol_table[0],&info);
}
]])],
- [AC_SUBST([CabalHaveLibbfd], [True])],dnl bfd seems to work
+ HaveLibbfd=YES,dnl bfd seems to work
[AC_MSG_ERROR([can't use 'bfd' library])])
LIBS="$save_LIBS"
]
)
+ AC_SUBST([UseLibbfd],[$HaveLibbfd])
])
diff --git a/m4/fp_cc_supports__atomics.m4 b/m4/fp_cc_supports__atomics.m4
index f4a2eaff7c..bd3750e972 100644
--- a/m4/fp_cc_supports__atomics.m4
+++ b/m4/fp_cc_supports__atomics.m4
@@ -63,9 +63,9 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS],
])
AC_DEFINE([HAVE_C11_ATOMICS], [1], [Does C compiler support __atomic primitives?])
if test "$need_latomic" = 1; then
- AC_SUBST([CabalNeedLibatomic],[True])
+ AC_SUBST([NeedLibatomic],[YES])
else
- AC_SUBST([CabalNeedLibatomic],[False])
+ AC_SUBST([NeedLibatomic],[NO])
fi
AC_DEFINE_UNQUOTED([NEED_ATOMIC_LIB], [$need_latomic],
[Define to 1 if we need -latomic.])
diff --git a/m4/fp_check_pthreads.m4 b/m4/fp_check_pthreads.m4
index ee5b364e93..5713e7c743 100644
--- a/m4/fp_check_pthreads.m4
+++ b/m4/fp_check_pthreads.m4
@@ -12,18 +12,18 @@ AC_DEFUN([FP_CHECK_PTHREADS],
AC_CHECK_FUNC(pthread_create,
[
AC_MSG_RESULT(no)
- AC_SUBST([CabalNeedLibpthread],[False])
+ AC_SUBST([UseLibpthread],[NO])
need_lpthread=0
],
[
AC_CHECK_LIB(pthread, pthread_create,
[
AC_MSG_RESULT(yes)
- AC_SUBST([CabalNeedLibpthread],[True])
+ AC_SUBST([UseLibpthread],[YES])
need_lpthread=1
],
[
- AC_SUBST([CabalNeedLibpthread],[False])
+ AC_SUBST([UseLibpthread],[NO])
AC_MSG_RESULT([no pthreads support found.])
need_lpthread=0
])