autoconf: Printing Messages
1
1 7.5 Printing Messages
1 =====================
1
1 `configure' scripts need to give users running them several kinds of
1 information. The following macros print messages in ways appropriate
1 for each kind. The arguments to all of them get enclosed in shell
1 double quotes, so the shell performs variable and back-quote
1 substitution on them.
1
1 These macros are all wrappers around the `echo' shell command. They
11 direct output to the appropriate file descriptor (⇒File Descriptor
Macros). `configure' scripts should rarely need to run `echo'
1 directly to print messages for the user. Using these macros makes it
1 easy to change how and when each kind of message is printed; such
1 changes need only be made to the macro definitions and all the callers
1 change automatically.
1
11 To diagnose static issues, i.e., when `autoconf' is run, see ⇒
Diagnostic Macros.
1
1 -- Macro: AC_MSG_CHECKING (FEATURE-DESCRIPTION)
1 Notify the user that `configure' is checking for a particular
1 feature. This macro prints a message that starts with `checking '
1 and ends with `...' and no newline. It must be followed by a call
1 to `AC_MSG_RESULT' to print the result of the check and the
1 newline. The FEATURE-DESCRIPTION should be something like
1 `whether the Fortran compiler accepts C++ comments' or `for c89'.
1
1 This macro prints nothing if `configure' is run with the `--quiet'
1 or `--silent' option.
1
1 -- Macro: AC_MSG_RESULT (RESULT-DESCRIPTION)
1 Notify the user of the results of a check. RESULT-DESCRIPTION is
1 almost always the value of the cache variable for the check,
1 typically `yes', `no', or a file name. This macro should follow a
1 call to `AC_MSG_CHECKING', and the RESULT-DESCRIPTION should be
1 the completion of the message printed by the call to
1 `AC_MSG_CHECKING'.
1
1 This macro prints nothing if `configure' is run with the `--quiet'
1 or `--silent' option.
1
1 -- Macro: AC_MSG_NOTICE (MESSAGE)
1 Deliver the MESSAGE to the user. It is useful mainly to print a
1 general description of the overall purpose of a group of feature
1 checks, e.g.,
1
1 AC_MSG_NOTICE([checking if stack overflow is detectable])
1
1 This macro prints nothing if `configure' is run with the `--quiet'
1 or `--silent' option.
1
1 -- Macro: AC_MSG_ERROR (ERROR-DESCRIPTION, [EXIT-STATUS = `$?/1'])
1 Notify the user of an error that prevents `configure' from
1 completing. This macro prints an error message to the standard
1 error output and exits `configure' with EXIT-STATUS (`$?' by
1 default, except that `0' is converted to `1'). ERROR-DESCRIPTION
1 should be something like `invalid value $HOME for \$HOME'.
1
1 The ERROR-DESCRIPTION should start with a lower-case letter, and
1 "cannot" is preferred to "can't".
1
1 -- Macro: AC_MSG_FAILURE (ERROR-DESCRIPTION, [EXIT-STATUS])
1 This `AC_MSG_ERROR' wrapper notifies the user of an error that
1 prevents `configure' from completing _and_ that additional details
1 are provided in `config.log'. This is typically used when
1 abnormal results are found during a compilation.
1
1 -- Macro: AC_MSG_WARN (PROBLEM-DESCRIPTION)
1 Notify the `configure' user of a possible problem. This macro
1 prints the message to the standard error output; `configure'
1 continues running afterward, so macros that call `AC_MSG_WARN'
1 should provide a default (back-up) behavior for the situations
1 they warn about. PROBLEM-DESCRIPTION should be something like `ln
1 -s seems to make hard links'.
1