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

23.3.3 Output from macros

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 February, 8 2006 using texi2html