... anyway, to get back to the main point of this thread: The Autoconf developers were pretty responsive to my bug reports, and after some back-and-forth we determined that:
1. The minimum GNU m4 version for modern autoconf is 1.4.8; this is directly traceable to intentional behavioral changes in that version, so it's a pretty hard requirement. They've updated their own configure script to enforce that minimum. 2. The macOS-specific problems I saw with the STDBOOL tests are resolved by the attached patch, which should also appear in 2.72. Since AC_HEADER_STDBOOL appears to work correctly in our usage anyway, this is only important if you're the kind of person who likes to see 100% pass from a tool's own self-tests before you install it. So as far as autoconf itself is concerned, we could probably move forward, perhaps after waiting for 2.72. The difficulty here is the prospect that some people might find themselves having to install a newer GNU m4, because GNU m4 is a hot mess. Many post-1.4.8 versions flat out don't compile on $your-favorite-platform [1], and many others contain a showstopper bug (that's rejected by a runtime test in autoconf's configure, independently of the min-version test) [2]. If you don't have a pretty recent m4 available from a package manager, you might be in for a lot of hair-pulling. The flip side of that is that probably nobody really needs to update the configure script on non-mainstream platforms, so maybe this wouldn't matter to us too much in practice. On the whole though, my feeling is that autoconf 2.71 doesn't offer enough to us to justify possibly causing substantial pain for a few developers. I recommend setting this project aside for now. We can always reconsider if the situation changes. regards, tom lane [1] https://lists.gnu.org/archive/html/bug-autoconf/2022-07/msg00004.html [2] https://lists.gnu.org/archive/html/bug-autoconf/2022-07/msg00006.html
diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index 8944da41..5cd1f4d5 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -633,8 +633,10 @@ AC_DEFUN([AC_CHECK_HEADER_STDBOOL], bool *pp = &p; /* C 1999 specifies that bool, true, and false are to be - macros, but C++ 2011 and later overrule this. */ - #if __cplusplus < 201103 + macros, but C++ 2011 overrules this. The C++ committee + was codifying existing practice, so we allow them to + not be macros whenever __cplusplus is defined. */ + #ifndef __cplusplus #ifndef bool #error "bool is not defined" #endif diff --git a/tests/local.at b/tests/local.at index 3f348929..f79f57ff 100644 --- a/tests/local.at +++ b/tests/local.at @@ -593,9 +593,9 @@ AT_CMP([at_defines-$1], [at_defines-$2])[]dnl m4_define([_AT_DEFINES_CMP_PRUNE], [m4_bmatch([$1], [^vary:], -[ /@%:@define ]m4_bpatsubsts([$1], [\<vary:], [])dnl +[ /@%:@define ]m4_bpatsubsts([$1], [\<vary:], [])[]dnl [@<:@ @{:@@:>@/ d ;@%:@@:}@ - /@%:@undef ]m4_bpatsubsts([$1], [\<vary:], [])dnl + /@%:@undef ]m4_bpatsubsts([$1], [\<vary:], [])[]dnl [@<:@ @{:@@:>@/ d ;@%:@@:}@ ], [m4_fatal([unrecognized AT_DEFINES_CMP variance token: "$1"])])])