Hi Eric,

I think it is worth applying this patch before you release m4. Without
it the tarball will likely fail to build due to linker errors on
platforms other than GNU/Linux.

Also, while there, updating @INTL_MACOSX_LIBS@, per Bruno's
recommendations [1]. With the fix so 'make syntax-check' works.

Collin

[1] https://lists.gnu.org/archive/html/bug-gnulib/2025-03/msg00001.html

>From 1654f0320be34ff40e7ca595e52a602dd36ec5bf Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Wed, 9 Apr 2025 19:14:11 -0700
Subject: [PATCH] maint: Update library names used by Gnulib.

* src/Makefile.am (LDADD): Update library names according to Gnulib NEWS
2023-01-07. Use @INTL_MACOSX_LIBS@.
* cfg.mk (_makefile_at_at_check_exceptions): Avoid warnings for
@INTL_MACOSX_LIBS@.
---
 cfg.mk          | 3 +++
 src/Makefile.am | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 9261bb86..93158925 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -53,3 +53,6 @@ exclude_file_name_regexp--sc_codespell = ^THANKS$$
 
 # Codespell exemptions:
 codespell_ignore_words_list = ois,WIDTHn
+
+# See discussion here: <https://lists.gnu.org/archive/html/bug-gnulib/2025-03/msg00001.html>.
+_makefile_at_at_check_exceptions = ' && !/INTL_MACOSX_LIBS/'
diff --git a/src/Makefile.am b/src/Makefile.am
index 9461d44d..69d2bc79 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,7 +29,7 @@ noinst_HEADERS = m4.h
 m4_SOURCES = m4.c builtin.c debug.c eval.c format.c freeze.c input.c \
 macro.c output.c path.c symtab.c
 LDADD = ../lib/libm4.a $(LIBM4_LIBDEPS) \
-  $(LIB_CLOCK_GETTIME) $(LIB_GETRANDOM) $(LIB_HARD_LOCALE) \
-  $(LIB_MBRTOWC) $(LIB_POSIX_SPAWN) $(LIB_SETLOCALE) $(LIB_SETLOCALE_NULL) \
+  $(CLOCK_TIME_LIB) $(GETRANDOM_LIB) $(HARD_LOCALE_LIB) \
+  $(MBRTOWC_LIB) $(POSIX_SPAWN_LIB) $(SETLOCALE_LIB) $(SETLOCALE_NULL_LIB) \
   $(LIBCSTACK) $(LIBICONV) $(LIBINTL) $(LIBTHREAD) $(LIBUNISTRING) \
-  $(INTL_MACOSX_LIBS)
+  $(GETLOCALENAME_L_LIB) @INTL_MACOSX_LIBS@
-- 
2.49.0

Reply via email to