any package using @command{gettext}. When the library is installed, it
installs this macro so that @command{aclocal} will find it.
-A file of macros should be a series of @code{AC_DEFUN}'s. The
-@code{aclocal} programs also understands @code{AC_REQUIRE}, so it is
-safe to put each macro in a separate file. @xref{Prerequisite Macros, ,
-, autoconf, The Autoconf Manual}, and @ref{Macro Definitions, , ,
-autoconf, The Autoconf Manual}.
-
A macro file's name should end in @file{.m4}. Such files should be
installed in @file{$(datadir)/aclocal}. This is as simple as writing:
aclocal_DATA = mymacro.m4 myothermacro.m4
@end example
+A file of macros should be a series of properly quoted
+@code{AC_DEFUN}'s (@pxref{Macro Definitions, , , autoconf, The
+Autoconf Manual}). The @command{aclocal} programs also understands
+@code{AC_REQUIRE} (@pxref{Prerequisite Macros, , , autoconf, The
+Autoconf Manual}), so it is safe to put each macro in a separate file.
+Each file should have no side effects but macro definitions.
+Especially, any call to @code{AC_PREREQ} should be done inside the
+defined macro, not at the beginning of the file.
+
+@cindex underquoted AC_DEFUN
+@cvindex AC_DEFUN
+@cvindex AC_PREREQ
+
+Starting with Automake 1.8, @command{aclocal} will warn about all
+underquoted calls to @code{AC_DEFUN}. We realize this will annoy a
+lot of people, because @command{aclocal} was not so strict in the past
+and many third party macros are underquoted; and we have to apologize
+for this temporary inconvenience. The reason we have to be stricter
+is that a future implementation of @command{aclocal} (@pxref{Future of
+aclocal}) will have to temporary include all these third party
+@file{.m4} files, maybe several times, even those which are not
+actually needed. Doing so should alleviate many problem of the
+current implementation, however it requires a stricter style from the
+macro authors. Hopefully it is easy to revise the existing macros.
+For instance
+@example
+# bad style
+AC_PREREQ(2.57)
+AC_DEFUN(AX_FOOBAR,
+[AC_REQUIRE([AX_SOMETHING])dnl
+AX_FOO
+AX_BAR
+])
+@end example
+@noindent
+should be rewritten as
+@example
+AC_DEFUN([AX_FOOBAR],
+[AC_PREREQ(2.57)dnl
+AC_REQUIRE([AX_SOMETHING])dnl
+AX_FOO
+AX_BAR
+])
+@end example
+
+Wrapping the @code{AC_PREREQ} call inside the macro ensures that
+Autoconf 2.57 will not be required if @code{AX_FOOBAR} is not actually
+used. Most importantly, quoting the first argument of @code{AC_DEFUN}
+allows the macro to be redefined or included twice (otherwise this
+first argument would be expansed during the second definition).
+
+If you have been directed here by the @command{aclocal} diagnostic but
+are not the maintainer of the implicated macro, you will want to
+contact the maintainer of that macro. Please make sure you have the
+last version of the macro and that the problem already hasn't been
+reported before doing so: people tend to work faster when they aren't
+flooded by mails.
+
Another situation where @command{aclocal} is commonly used is to
manage macros which are used locally by the package, @ref{Local
Macros}.
@c LocalWords: DSOMEFLAG DVERSION automake Lutz insertcopying versioning FAQ
@c LocalWords: LTLIBOBJ Libtool's libtool's libltdl dlopening itutions libbar
@c LocalWords: WANTEDLIBS libhello sublibraries libtop libsub dlopened Ratfor
-@c LocalWords: mymodule timestamps timestamp
+@c LocalWords: mymodule timestamps timestamp underquoted