Back to the Main Page. | peti_silent_mode |
Download the M4 Source. |
PETI_SILENT_MODE(on/off)
1.2 (2003/04/16) 0.5.55 : Miscellaneous
Peter Simons <simons@computer.org>
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
AC_PROG_CXX
PETI_SILENT_MODE(off) dnl talk to me again
AC_PROG_RANLIB
This macro was proposed and inspired by Paolo Bonzini <bonzini@gnu.org>.
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 ])