Paul Eggert wrote:
> Come to think of it, that new use of AC_REQUIRE([AC_CANONICAL_HOST]) at 
> gzip/configure.ac's is problematic.

Yes, I agree.

> I guess it works because Gnulib has 
> already called AC_CANONICAL_HOST by then, but we shouldn't assume that 
> without checking.

Maybe a better way would have been to wrap this code in an AC_DEFUN
and invoke it just immediately afterwards. This way, one can still use
AC_REQUIRE.

> I worked around the issue by instead checking that 
> Gnulib has called AC_CANONICAL_HOST, and by using AS_CASE rather than 
> 'case' while I was in the neighborhood.

Unfortunately, there's a typo here: The output in the configure file
looks like this. Note the "Avoid a crash" line:

   case $DEFS in #(
  *NO_ASM*) :
     ;; #(
  *) : 
    # 'host_os?' ensures Gnulib sets host_os as usual.
      case ${host_os?} in #(       
  *-musl* | midipix*) :
    Avoid a crash in musl libc's startup code,
           # because musl doesn't support TEXTRELs.
           # https://www.openwall.com/lists/musl/2020/09/25/1
           ;; #(
  *) :
    if cp $srcdir/lib/match.c _match.S &&

Here's a fix.

>From 7927b8446cf5cb5a628dc32e045da38d979715e5 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Sun, 19 Apr 2026 09:16:18 +0200
Subject: [PATCH] build: Fix syntax error in configure (regression yesterday)

* configure.ac: Fix typo in yesterday's commit.
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 4f69098..ca3126e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -253,7 +253,7 @@ AC_CACHE_CHECK([for an assembler syntax supported by this package],
      [# 'host_os?' ensures Gnulib sets host_os as usual.
       AS_CASE([${host_os?}],
         [*-musl* | midipix*],
-          [Avoid a crash in musl libc's startup code,
+          [# Avoid a crash in musl libc's startup code,
            # because musl doesn't support TEXTRELs.
            # https://www.openwall.com/lists/musl/2020/09/25/1
           ],
-- 
2.52.0

Reply via email to