(autoconf.info)One-Shot Macros

Prev: Suggested Ordering Up: Dependencies Between Macros

9.4.3 One-Shot Macros

Some macros should be called only once, either because calling them
multiple time is unsafe, or because it is bad style.  For instance
Autoconf ensures that `AC_CANONICAL_BUILD' and cousins (*note
Canonicalizing::) are evaluated only once, because it makes no sense to
run these expensive checks more than once.  Such one-shot macros can be
defined using `AC_DEFUN_ONCE'.

     Declare macro MACRO-NAME like `AC_DEFUN' would (Note: Macro
     Definitions), and emit a warning any time the macro is called
     more than once.

   Obviously it is not sensible to evaluate a macro defined by
`AC_DEFUN_ONCE' in a macro defined by `AC_DEFUN'.  Most of the time you
want to use `AC_REQUIRE' (Note: Prerequisite Macros).

automatically generated by info2www