diff options
author | Ben Gamari <ben@well-typed.com> | 2023-03-14 17:03:34 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-03-16 12:18:26 -0400 |
commit | 6e3ce9a4ce2509ce779102ec6f8e8ddcb676f94b (patch) | |
tree | 52473b840c2bee4979448fd66872061c9bfaba51 /m4 | |
parent | 5ddbf5edcb64f04b3527efcac727813080380aa6 (diff) | |
download | haskell-6e3ce9a4ce2509ce779102ec6f8e8ddcb676f94b.tar.gz |
configure: Fix FIND_CXX_STD_LIB test on Darwin
Annoyingly, Darwin's <cstddef> includes <version> and APFS is
case-insensitive. Consequently, it will end up #including the
`VERSION` file generated by the `configure` script on the second
and subsequent runs of the `configure` script.
See #23116.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/fp_find_cxx_std_lib.m4 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/m4/fp_find_cxx_std_lib.m4 b/m4/fp_find_cxx_std_lib.m4 index 09f4524d89..65357fe19e 100644 --- a/m4/fp_find_cxx_std_lib.m4 +++ b/m4/fp_find_cxx_std_lib.m4 @@ -4,6 +4,14 @@ # Identify which C++ standard library implementation the C++ toolchain links # against. AC_DEFUN([FP_FIND_CXX_STD_LIB],[ + # Annoyingly, Darwin's <cstddef> includes <version> and APFS is + # case-insensitive. Consequently, it will end up #including the + # VERSION file generated by the configure script on the second + # and subsequent runs of the configure script. + # See #23116. + mkdir -p actest.tmp + cd actest.tmp + # If this is non-empty then assume that the user has specified these # manually. if test -z "$CXX_STD_LIB_LIBS"; then @@ -87,6 +95,9 @@ EOF rm -f actest.cpp actest.o actest fi + cd .. + rm -R actest.tmp + AC_SUBST([CXX_STD_LIB_LIBS]) AC_SUBST([CXX_STD_LIB_LIB_DIRS]) AC_SUBST([CXX_STD_LIB_DYN_LIB_DIRS]) |