DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(autocf21.info.gz) Prerequisite Macros

Info Catalog (autocf21.info.gz) Dependencies Between Macros (autocf21.info.gz) Dependencies Between Macros (autocf21.info.gz) Suggested Ordering
 
 7.4.1 Prerequisite Macros
 -------------------------
 
 A macro that you write might need to use values that have previously
 been computed by other macros.  For example, `AC_DECL_YYTEXT' examines
 the output of `flex' or `lex', so it depends on `AC_PROG_LEX' having
 been called first to set the shell variable `LEX'.
 
    Rather than forcing the user of the macros to keep track of the
 dependencies between them, you can use the `AC_REQUIRE' macro to do it
 automatically.  `AC_REQUIRE' can ensure that a macro is only called if
 it is needed, and only called once.
 
  -- Macro: AC_REQUIRE (MACRO-NAME)
      If the `m4' macro MACRO-NAME has not already been called, call it
      (without any arguments).  Make sure to quote MACRO-NAME with
      square brackets.  MACRO-NAME must have been defined using
      `AC_DEFUN' or else contain a call to `AC_PROVIDE' to indicate that
      it has been called.
 
    An alternative to using `AC_DEFUN' is to use `define' and call
 `AC_PROVIDE'.  Because this technique does not prevent nested messages,
 it is considered obsolete.
 
  -- Macro: AC_PROVIDE (THIS-MACRO-NAME)
      Record the fact that THIS-MACRO-NAME has been called.
      THIS-MACRO-NAME should be the name of the macro that is calling
      `AC_PROVIDE'.  An easy way to get it is from the `m4' builtin
      variable `$0', like this:
 
           AC_PROVIDE([$0])
 
Info Catalog (autocf21.info.gz) Dependencies Between Macros (autocf21.info.gz) Dependencies Between Macros (autocf21.info.gz) Suggested Ordering
automatically generated byinfo2html