aclocal: avoid spurious warnings from autom4te with AC_CONFIG_MACRO_DIRS
commit256659b06280ab4be5103c760b777e26980863c3
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 3 Nov 2012 10:30:04 +0000 (3 11:30 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 10 Nov 2012 09:55:44 +0000 (10 10:55 +0100)
tree550525cb014f9229c88d78af00b3baf1d9c3306d
parentbd337b9b203aa92fc524d24d325329b099d8cbc2
aclocal: avoid spurious warnings from autom4te with AC_CONFIG_MACRO_DIRS

When some macro expanded in configure.ac calls AC_REQUIRE on another
macro that is defined in one of the local m4 macro dirs specified
with AC_CONFIG_MACRO_DIRS, aclocal prints spurious warnings like:

    configure.ac:4: warning: MY_BAR is m4_require'd but not m4_defun'd
    configure.ac:3: MY_FOO is expanded from...

Such warnings come from autom4te, and are due to the fact that the
*first* autom4te invocation issued by aclocal is not yet able to
"see" the m4 macro definitions in the local m4 dirs (because they
can be looked for only after the AC_CONFIG_MACRO_DIRS call has been
traced, and tracing it requires running autom4te).

To allow us to work around this issue, autom4te has introduced a new
"witness" macro 'm4_require_silent_probe', that, when defined, allows
us to silence that particular kind of warnings (and only it).

Reported by Nick Bowler; see point (4) of:
<http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00000.html>

* aclocal.in (trace_used_macros): Pre-define the special macro
'm4_require_silent_probe' when invoking autom4te.
* t/aclocal-macrodirs.tap ("AC_CONFIG_MACRO_DIR interaction with
AC_REQUIRE"): This test passes now: remove the "TODO" directive.
* t/aclocal-macrodir.tap ("AC_CONFIG_MACRO_DIRS interaction with
AC_REQUIRE"): Likewise.
* t/acloca17.sh: Remove.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
aclocal.in
t/acloca17.sh [deleted file]
t/aclocal-macrodir.tap
t/aclocal-macrodirs.tap
t/list-of-tests.mk