Hi Eric, > > Is m4_defun sufficient for AC_REQUIRE to work? The comments state that it is > > essential that these macros can be AC_REQUIREd. This is needed for > > gl_WARN_ADD (warnings.m4 line 94). > > Yes. Implementation-wise, autoconf has: > > m4_copy([m4_defun], [AC_DEFUN]) > > that is, AC_DEFUN is defined as a copy of the body of m4_defun, > expanding to the same text. Both AC_REQUIRE and m4_require are equally > happy to pull in a macro, regardless of whether it defined via AC_DEFUN > or m4_defun, making them interchangeable for what output is produced. > > Therefore, the difference between the two macros is based solely on the > fact that tracing depends on which macro name is invoked.
Well, then the Autoconf documentation at https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Macro-Definitions.html is wrong. It states that the major difference between AC_DEFUN and m4_defun is "some code that is used to constrain the order in which macros are called, while avoiding redundant output (-> AC_REQUIRE)". Care to update the documentation? Bruno