Colin Watson wrote: > I recently tried to update man-db to current Gnulib, running in a Debian > unstable chroot, and I ran into some Autoconf macro issues that I don't > entirely understand. I've boiled it down as far as this, with current > Gnulib master (4bed390be8) and Autoconf 2.71: > > $ ./gnulib-tool --dir x --create-testdir btowc > [...] > executing autoconf > configure.ac:584: warning: GL_STDLIB_H_MODULE_INDICATOR_DEFAULTS is > m4_require'd but not m4_defun'd > glm4/wchar_h.m4:144: gl_WCHAR_H_REQUIRE_DEFAULTS is expanded from... > glm4/wchar_h.m4:132: gl_WCHAR_MODULE_INDICATOR is expanded from... > configure.ac:35: gl_INIT is expanded from... > configure.ac:584: the top level > > And indeed the resulting configure script contains an unexpanded macro, > resulting in: > > ./configure: line 8730: GL_STDLIB_H_MODULE_INDICATOR_DEFAULTS: command not > found
Thanks for the report and perfectly reproducible test case. The patch below fixes it, and still works with libidn (scenario reported by Simon). 2021-09-18 Bruno Haible <[email protected]> string, wchar: Don't require undefined m4 macros (regr. today). Reported by Colin Watson <[email protected]> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00078.html>. * m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Don't use m4_require directly. Instead, invoke gl_STDLIB_H_REQUIRE_DEFAULTS. * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise. diff --git a/m4/string_h.m4 b/m4/string_h.m4 index 9871dac8b..e88ac9ca8 100644 --- a/m4/string_h.m4 +++ b/m4/string_h.m4 @@ -5,7 +5,7 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 33 +# serial 34 # Written by Paul Eggert. @@ -94,7 +94,7 @@ AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS], ]) m4_require(GL_MODULE_INDICATOR_PREFIX[_STRING_H_MODULE_INDICATOR_DEFAULTS]) dnl Make sure the shell variable for GNULIB_FREE_POSIX is initialized. - m4_require(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS]) + gl_STDLIB_H_REQUIRE_DEFAULTS AC_REQUIRE([gl_STRING_H_DEFAULTS]) ]) diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4 index d69dbe67d..9529cdd05 100644 --- a/m4/wchar_h.m4 +++ b/m4/wchar_h.m4 @@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. -# wchar_h.m4 serial 54 +# wchar_h.m4 serial 55 AC_DEFUN_ONCE([gl_WCHAR_H], [ @@ -190,7 +190,7 @@ AC_DEFUN([gl_WCHAR_H_REQUIRE_DEFAULTS], ]) m4_require(GL_MODULE_INDICATOR_PREFIX[_WCHAR_H_MODULE_INDICATOR_DEFAULTS]) dnl Make sure the shell variable for GNULIB_FREE_POSIX is initialized. - m4_require(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS]) + gl_STDLIB_H_REQUIRE_DEFAULTS AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) ])
