[Macro Index Page] | [Download M4 Source] |
PETI_SILENT_MODE(on)
PETI_SILENT_MODE(off)
Some macros provided by Autoconf do automatically write to the
console, like AC_CHECK_LIB
for example. This may be
undesirable when these routines are called within a complex macro, which
consists of several consecutive tests.
To remedy this, PETI_SILENT_MODE
provides a mechanism to
turn Autoconf's console output off temporarily. All console output within
configure scripts is written to file descriptor 6, which is a copy
of the standard output channel. By setting this file descriptor to
/dev/null (or back to standard output), silent mode can be enabled
or disabled.
PETI_SILENT_MODE(on) dnl be silent AC_PROG_CXX PETI_SILENT_MODE(off) dnl talk to me again AC_PROG_RANLIB
This macro was proposed and inspired by Paolo Bonzini.
1.8 (last modified: 2003-01-15)
AC_DEFUN([PETI_SILENT_MODE], [ case "$1" in on) exec 6>/dev/null ;; off) exec 6>&1 ;; *) AC_MSG_ERROR(Silent mode can only be switched "on" or "off".) ;; esac ])