Re: Please test autoreconf from zack/autoreconf-exclude branch

"Zack Weinberg" <[email protected]> Wed, 04 Mar 2026 17:13:50 -0500
Newsgroups dev.linux.lists.distributions
Message-ID <[email protected]>
On Wed, Mar 4, 2026, at 3:19 PM, Ross Burton wrote:
> On 3 Mar 2026, at 17:20, Zack Weinberg <[email protected]> wrote:
>> Please test this branch's 'autoreconf' on your favorite packages.
>> Testing with packages that use Gettext, Intltool, and/or gtk-doc
>> is especially helpful.  If you like, experiment with the new
>> --exclude option.
>
> There=E2=80=99s a regression with the following code in gnutls:
>
> AS_CASE([$ac_prog_cc_stdc],
>   [c11 | c99], [AC_DEFINE([C99_MACROS], 1, [C99 macros are supported])=
],
>   [AC_MSG_WARN([[Compiler does not support C99. It may not be able to=20
> compile the project.]])]
> )
>
> With master, that check now fails and the compilation changes.
>
> I=E2=80=99m not qualified to determine if the check in gnutls is just =
wrong, or=20
> if autoconf is breaking compatibility=E2=80=A6 though my hunch is that=
 the test=20
> is badly coded and it=E2=80=99s not handling the AC_PROG_CC change to=20
> preferring C23?

Indeed, that check is not prepared to handle the AC_PROG_CC change.
$ac_prog_cc_stdc will now get set to 'c23' when the compiler is new
enough to support C23.

A self-contained, low-risk fix would be to flip the condition around:

AS_CASE([$ac_prog_cc_stdc],
    [c89],
    [AC_MSG_WARN([[Compiler does not support C99. It may not be able to
compile the project.]])],
    [AC_DEFINE([C99_MACROS], 1, [C99 macros are supported])])

I'll add something about that to NEWS.

zw