In GNU gettext, autoconf produces this warning: configure.ac:71: warning: AC_REQUIRE: `gl_PRINTF_POSITIONS' was expanded before it was required configure.ac:71: https://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required gnulib-m4/snprintf-posix.m4:19: gl_FUNC_SNPRINTF_IS_POSIX is expanded from... gnulib-m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from... gnulib-m4/gnulib-comp.m4:232: lts_INIT is expanded from...
This patch fixes it. 2023-03-30 Bruno Haible <br...@clisp.org> snprintf: Avoid autoconf warning regarding gl_PRINTF_POSITIONS. * m4/printf.m4 (gl_PRINTF_POSITIONS): Define through AC_DEFUN_ONCE. diff --git a/m4/printf.m4 b/m4/printf.m4 index 7178533a88..cf4e225cfe 100644 --- a/m4/printf.m4 +++ b/m4/printf.m4 @@ -1,4 +1,4 @@ -# printf.m4 serial 79 +# printf.m4 serial 80 dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -1076,7 +1076,7 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_LC] dnl strings with positions. (POSIX:2001) dnl Result is gl_cv_func_printf_positions. -AC_DEFUN([gl_PRINTF_POSITIONS], +AC_DEFUN_ONCE([gl_PRINTF_POSITIONS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles