23.3.3 Output from macros

back: testing system features at application runtime
forward: naming macros
 
fastback: naming macros
up: guidelines for writing macros
fastforward: implementation specifics
top: autoconf, automake, and libtool
contents: table of contents
index: index
about: about this document

Users who run `configure' expect a certain style of output as tests are performed. As such, you should use the well-defined interface to the existing Autoconf macros for generating output. Your tests should not arbitrarily echo messages to the standard output.

Autoconf provides the following macros to output the messages for you in a consistent way (see section 3. How to run configure and make). They are introduced here with a brief description of their purpose and are documented in more detail in D. Autoconf Macro Reference. Typically, a test starts by invoking AC_MSG_CHECKING to describe to the user what the test is doing and AC_MSG_RESULT is invoked to output the result of the test.

`AC_MSG_CHECKING'
This macro is used to notify the user that a test is commencing. It prints the text `checking' followed by your message and ends with `...' . You should use `AC_MSG_RESULT' after this macro to output the result of the test.
`AC_MSG_RESULT'
This macro notifies the user of a test result. In general, the result should be the word `yes' or `no' for boolean tests, or the actual value of the result, such as a directory or filename.
`AC_MSG_ERROR'
This macro emits a hard error message and aborts `configure' --this should be used for fatal errors.
`AC_MSG_WARN'
This macro emits a warning to the user and proceeds.

This document was generated by Gary V. Vaughan on May, 24 2001 using texi2html


GNU Autoconf, Automake and Libtool
GNU Autoconf, Automake, and Libtool
ISBN: 1578701902
EAN: 2147483647
Year: 2002
Pages: 290

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net