autoconf: Suggested Ordering

1 
1 10.4.2 Suggested Ordering
1 -------------------------
1 
1 Some macros should be run before another macro if both are called, but
1 neither _requires_ that the other be called.  For example, a macro that
1 changes the behavior of the C compiler should be called before any
1 macros that run the C compiler.  Many of these dependencies are noted in
1 the documentation.
1 
1    Autoconf provides the `AC_BEFORE' macro to warn users when macros
1 with this kind of dependency appear out of order in a `configure.ac'
1 file.  The warning occurs when creating `configure' from
1 `configure.ac', not when running `configure'.
1 
1    For example, `AC_PROG_CPP' checks whether the C compiler can run the
1 C preprocessor when given the `-E' option.  It should therefore be
1 called after any macros that change which C compiler is being used,
1 such as `AC_PROG_CC'.  So `AC_PROG_CC' contains:
1 
1      AC_BEFORE([$0], [AC_PROG_CPP])dnl
1 
1 This warns the user if a call to `AC_PROG_CPP' has already occurred
1 when `AC_PROG_CC' is called.
1 
1  -- Macro: AC_BEFORE (THIS-MACRO-NAME, CALLED-MACRO-NAME)
1      Make M4 print a warning message to the standard error output if
1      CALLED-MACRO-NAME has already been called.  THIS-MACRO-NAME should
1      be the name of the macro that is calling `AC_BEFORE'.  The macro
1      CALLED-MACRO-NAME must have been defined using `AC_DEFUN' or else
1      contain a call to `AC_PROVIDE' to indicate that it has been called.
1