public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: PSA: Autoconf has risen from the dead
Date: Sat, 16 Jul 2022 11:26:46 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+TgmoZ9EKB3VcJK8tjpmBa2T1bYHnhR1hUkpJXfHgKQTUBF0A@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CA+TgmoaH=LUU=fXbRRPT4OOJRgiDe_xiv=jyZ7hqTaqtWaG3Gw@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CA+TgmoY6j0Bi2DwYEpxua+DgEBEdSDK8voWYc7cw2Yd=uLeOtQ@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CA+TgmoZ9EKB3VcJK8tjpmBa2T1bYHnhR1hUkpJXfHgKQTUBF0A@mail.gmail.com>

... 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



Attachments:

  [text/x-diff] autoconf-bool.patch (1.3K, ../[email protected]/2-autoconf-bool.patch)
  download | inline diff:
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"])])])


view thread (25+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: PSA: Autoconf has risen from the dead
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox