|Back to the Main Page.||
|Download the M4 Source.|
188.8.131.52 (2001/07/26) Miscellaneous @ ac-archive-0.5.39
Peter Simons <firstname.lastname@example.org>
Some macros provided by autoconf do automatically issue screen output when called, for example AC_CHECK_LIB. This may be undesirable at times, for example when these routines are called within a more complex macro consisting of several tests in a row.
Hence this macro provides a mechanism to switch screen output by autoconf generally off. All screen i/o within configure scripts takes place on file descriptor "6", which is in fact a copy of the standard output. By setting this file descriptor to "/dev/null" or to standard output again, silent mode can be enabled or disabled.
PETI_SILENT_MODE(on) dnl be silent
PETI_SILENT_MODE(off) dnl talk to me again
This macro was proposed and inspired by Paolo Bonzini <email@example.com>.
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 ])