(autoconf.info)Reporting Messages


Next: Dependencies Between Macros Prev: Macro Names Up: Writing Autoconf Macros

9.3 Reporting Messages
======================

When macros statically diagnose abnormal situations, benign or fatal, it
is possible to make `autoconf' detect the problem, and refuse to create
`configure' in the case of an error.  The macros in this section are
considered obsolescent, and new code should use M4sugar macros for this
purpose, see Note: Diagnostic Macros.

   On the other hand, it is possible to want to detect errors when
`configure' is run, which are dependent on the environment of the user
rather than the maintainer.  For dynamic diagnostics, see *Note
Printing Messages::.

 -- Macro: AC_DIAGNOSE (CATEGORY, MESSAGE)
     Report MESSAGE as a warning (or as an error if requested by the
     user) if warnings of the CATEGORY are turned on.  This macro is
     obsolescent; you are encouraged to use:
          m4_warn([CATEGORY], [MESSAGE])
     instead.  Note: m4_warn, for more details, including valid
     CATEGORY names.

 -- Macro: AC_WARNING (MESSAGE)
     Report MESSAGE as a syntax warning.  This macro is obsolescent;
     you are encouraged to use:
          m4_warn([syntax], [MESSAGE])
     instead.  Note: m4_warn, for more details, as well as better
     finer-grained categories of warnings (not all problems have to do
     with syntax).

 -- Macro: AC_FATAL (MESSAGE)
     Report a severe error MESSAGE, and have `autoconf' die.  This
     macro is obsolescent; you are encouraged to use:
          m4_fatal([MESSAGE])
     instead.  Note: m4_fatal, for more details.

   When the user runs `autoconf -W error', warnings from `m4_warn'
(including those issued through `AC_DIAGNOSE' and `AC_WARNING') are
reported as errors, see Note: autoconf Invocation.


automatically generated by info2www