2 # Copyright (C) 2009-2024 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
10 # Enable less verbose build rules support.
11 AC_DEFUN([_AM_SILENT_RULES],
12 [AM_DEFAULT_VERBOSITY=1
13 AC_ARG_ENABLE([silent-rules], [dnl
15 [--enable-silent-rules],
16 [less verbose build output (undo: "make V=1")])
18 [--disable-silent-rules],
19 [verbose build output (undo: "make V=0")])dnl
22 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
23 dnl do not support nested variable expansions.
24 dnl See automake bug#9928 and bug#10237.
26 AC_CACHE_CHECK([whether $am_make supports nested variables],
27 [am_cv_make_support_nested_variables],
28 [if AS_ECHO([['TRUE=$(BAR$(V))
34 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
35 am_cv_make_support_nested_variables=yes
37 am_cv_make_support_nested_variables=no
40 AM_SUBST_NOTMAKE([AM_V])dnl
41 AC_SUBST([AM_DEFAULT_V])dnl
42 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
43 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
45 AC_SUBST([AM_BACKSLASH])dnl
46 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
47 dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls
48 dnl to AM_SILENT_RULES to change the default value.
49 AC_CONFIG_COMMANDS_PRE([dnl
50 case $enable_silent_rules in @%:@ (((
51 yes) AM_DEFAULT_VERBOSITY=0;;
52 no) AM_DEFAULT_VERBOSITY=1;;
54 if test $am_cv_make_support_nested_variables = yes; then
55 dnl Using '$V' instead of '$(V)' breaks IRIX make.
57 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
59 AM_V=$AM_DEFAULT_VERBOSITY
60 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
65 # AM_SILENT_RULES([DEFAULT])
66 # --------------------------
67 # Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or
68 # empty being verbose).
69 AC_DEFUN([AM_SILENT_RULES],
70 [AC_REQUIRE([_AM_SILENT_RULES])
71 AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])])