Building some testdir, I see this Autoconf warning: executing autoconf configure.ac:785: warning: AC_REQUIRE: `gt_LOCALE_FR_UTF8' was expanded before it was required configure.ac:785: https://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required configure.ac:34: gl_INIT is expanded from... configure.ac:785: the top level
The cause is that the *-tests modules invoke gt_LOCALE_FR_UTF8, whereas elsewhere in some places it AC_REQUIREd. This patch fixes it. 2023-04-22 Bruno Haible <br...@clisp.org> Avoid some Autoconf "was expanded before it was required" warnings. * m4/locale-ar.m4 (gt_LOCALE_AR): Define through AC_DEFUN_ONCE. * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise. * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise. * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise. * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise. diff --git a/m4/locale-ar.m4 b/m4/locale-ar.m4 index 7b696f480f..3c3342db08 100644 --- a/m4/locale-ar.m4 +++ b/m4/locale-ar.m4 @@ -1,4 +1,4 @@ -# locale-ar.m4 serial 9 +# locale-ar.m4 serial 10 dnl Copyright (C) 2003, 2005-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, @@ -7,7 +7,7 @@ dnl From Ben Pfaff, based on locale-fr.m4 by Bruno Haible. dnl Determine the name of an Arabic locale with traditional encoding. -AC_DEFUN([gt_LOCALE_AR], +AC_DEFUN_ONCE([gt_LOCALE_AR], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) diff --git a/m4/locale-fr.m4 b/m4/locale-fr.m4 index 8c41fadfe8..5e13f3945d 100644 --- a/m4/locale-fr.m4 +++ b/m4/locale-fr.m4 @@ -1,4 +1,4 @@ -# locale-fr.m4 serial 20 +# locale-fr.m4 serial 21 dnl Copyright (C) 2003, 2005-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, @@ -7,7 +7,7 @@ dnl From Bruno Haible. dnl Determine the name of a french locale with traditional encoding. -AC_DEFUN([gt_LOCALE_FR], +AC_DEFUN_ONCE([gt_LOCALE_FR], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) @@ -137,7 +137,7 @@ AC_DEFUN([gt_LOCALE_FR] ]) dnl Determine the name of a french locale with UTF-8 encoding. -AC_DEFUN([gt_LOCALE_FR_UTF8], +AC_DEFUN_ONCE([gt_LOCALE_FR_UTF8], [ AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [ diff --git a/m4/locale-ja.m4 b/m4/locale-ja.m4 index 2590173052..f6ca327b94 100644 --- a/m4/locale-ja.m4 +++ b/m4/locale-ja.m4 @@ -1,4 +1,4 @@ -# locale-ja.m4 serial 15 +# locale-ja.m4 serial 16 dnl Copyright (C) 2003, 2005-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, @@ -7,7 +7,7 @@ dnl From Bruno Haible. dnl Determine the name of a japanese locale with EUC-JP encoding. -AC_DEFUN([gt_LOCALE_JA], +AC_DEFUN_ONCE([gt_LOCALE_JA], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) diff --git a/m4/locale-tr.m4 b/m4/locale-tr.m4 index 847fb0da7c..d34df057d1 100644 --- a/m4/locale-tr.m4 +++ b/m4/locale-tr.m4 @@ -1,4 +1,4 @@ -# locale-tr.m4 serial 13 +# locale-tr.m4 serial 14 dnl Copyright (C) 2003, 2005-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, @@ -7,7 +7,7 @@ dnl From Bruno Haible. dnl Determine the name of a turkish locale with UTF-8 encoding. -AC_DEFUN([gt_LOCALE_TR_UTF8], +AC_DEFUN_ONCE([gt_LOCALE_TR_UTF8], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4 index b9f9eef724..94c545906f 100644 --- a/m4/locale-zh.m4 +++ b/m4/locale-zh.m4 @@ -1,4 +1,4 @@ -# locale-zh.m4 serial 15 +# locale-zh.m4 serial 16 dnl Copyright (C) 2003, 2005-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, @@ -7,7 +7,7 @@ dnl From Bruno Haible. dnl Determine the name of a chinese locale with GB18030 encoding. -AC_DEFUN([gt_LOCALE_ZH_CN], +AC_DEFUN_ONCE([gt_LOCALE_ZH_CN], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET])