GNU Info

Info Node: (autoconf.info)Suggested Ordering

(autoconf.info)Suggested Ordering


Next: Obsolete Macros Prev: Prerequisite Macros Up: Dependencies Between Macros
Enter node , (file) or (file)node

Suggested Ordering
------------------

   Some macros should be run before another macro if both are called,
but neither _requires_ that the other be called.  For example, a macro
that changes the behavior of the C compiler should be called before any
macros that run the C compiler.  Many of these dependencies are noted in
the documentation.

   Autoconf provides the `AC_BEFORE' macro to warn users when macros
with this kind of dependency appear out of order in a `configure.in'
file.  The warning occurs when creating `configure' from
`configure.in', not when running `configure'.  For example,
`AC_PROG_CPP' checks whether the C compiler can run the C preprocessor
when given the `-E' option.  It should therefore be called after any
macros that change which C compiler is being used, such as
`AC_PROG_CC'.  So `AC_PROG_CC' contains:

     AC_BEFORE([$0], [AC_PROG_CPP])dnl

This warns the user if a call to `AC_PROG_CPP' has already occurred
when `AC_PROG_CC' is called.

 - Macro: AC_BEFORE (THIS-MACRO-NAME, CALLED-MACRO-NAME)
     Make `m4' print a warning message on the standard error output if
     CALLED-MACRO-NAME has already been called.  THIS-MACRO-NAME should
     be the name of the macro that is calling `AC_BEFORE'.  The macro
     CALLED-MACRO-NAME must have been defined using `AC_DEFUN' or else
     contain a call to `AC_PROVIDE' to indicate that it has been called.


automatically generated by info2www version 1.2.2.9