In GNU libtextstyle I'm seeing this warning: configure.ac:71: warning: AC_REQUIRE: `gl_SNPRINTF_TRUNCATION_C99' was expanded before it was required configure.ac:71: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required gnulib-m4/vasnprintf.m4:15: gl_REPLACE_VASNPRINTF is expanded from... gnulib-m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from... gnulib-m4/gnulib-comp.m4:222: lts_INIT is expanded from... configure.ac:71: the top level
This patch fixes it. 2020-10-11 Bruno Haible <br...@clisp.org> *printf: Avoid "expanded before it was required" warning. * m4/printf.m4 (gl_SNPRINTF_TRUNCATION_C99): Define through AC_DEFUN_ONCE. diff --git a/m4/printf.m4 b/m4/printf.m4 index c6a7ef6..eeb792b 100644 --- a/m4/printf.m4 +++ b/m4/printf.m4 @@ -1,4 +1,4 @@ -# printf.m4 serial 69 +# printf.m4 serial 70 dnl Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -1198,7 +1198,7 @@ dnl Test whether the string produced by the snprintf function is always NUL dnl terminated. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_snprintf_truncation_c99. -AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99], +AC_DEFUN_ONCE([gl_SNPRINTF_TRUNCATION_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles