my $autoconf = "'$autom4te' --language=autoconf ";
$autoconf .= join (' --include=', '', map { shell_quote ($_) } @include);
$autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
-$autoconf .= join (' --warnings=', '', map { shell_quote ($_) } @warnings);
$autoconf .= ' --debug' if $debug;
$autoconf .= ' --force' if $force;
$autoconf .= ' --verbose' if $verbose;
# Source what the traces are trying to tell us.
verb "$me: running $autoconf to trace from $ARGV[0]";
my $quoted_tmp = shell_quote ($tmp);
-xsystem ("$autoconf"
- # If you change this list, update the
- # 'Autoheader-preselections' section of autom4te.in.
- . ' --trace AC_CONFIG_HEADERS:\'$$config_h ||= \'"\'"\'$1\'"\'"\';\''
- . ' --trace AH_OUTPUT:\'$$verbatim{\'"\'"\'$1\'"\'"\'} = \'"\'"\'$2\'"\'"\';\''
- . ' --trace AC_DEFINE_TRACE_LITERAL:\'$$symbol{\'"\'"\'$1\'"\'"\'} = 1;\''
- . " " . shell_quote ($ARGV[0]) . " >$quoted_tmp/traces.pl");
+{
+ # Suppress all warnings from the subsidiary autoconf invocation.
+ local $ENV{WARNINGS} = 'none';
+ xsystem ("$autoconf"
+ # If you change this list, update the
+ # 'Autoheader-preselections' section of autom4te.in.
+ . ' --trace AC_CONFIG_HEADERS:\'$$config_h ||= \'"\'"\'$1\'"\'"\';\''
+ . ' --trace AH_OUTPUT:\'$$verbatim{\'"\'"\'$1\'"\'"\'} = \'"\'"\'$2\'"\'"\';\''
+ . ' --trace AC_DEFINE_TRACE_LITERAL:\'$$symbol{\'"\'"\'$1\'"\'"\'} = 1;\''
+ . " " . shell_quote ($ARGV[0]) . " >$quoted_tmp/traces.pl");
+}
local (%verbatim, %symbol);
debug "$me: 'do'ing $tmp/traces.pl:\n" . `sed 's/^/| /' $quoted_tmp/traces.pl`;
join (' --trace=', '',
uniq (sort (map { s/\(.*//; $_ } keys %needed_macros)));
- verb "running: $autoconf $trace_option $configure_ac";
+ # Suppress all warnings from the subsidiary autoconf invocation.
+ local $ENV{WARNINGS} = 'none';
+
+ verb "running: WARNINGS=none $autoconf $trace_option $configure_ac";
my $traces =
new Autom4te::XFile "$autoconf $trace_option $configure_ac |";
begin-language: "M4sugar"
args: --prepend-include '@pkgdatadir@'
args: m4sugar/m4sugar.m4f
-args: --warnings syntax
end-language: "M4sugar"
HAVE_FOPEN
HAVE_FPRINTF
HAVE_PRINTF
-], [], [],
-[[configure.ac:9: warning: AC_REPLACE_FUNCS($funcs): you should use literals
-functions.m4: AC_REPLACE_FUNCS is expanded from...
-configure.ac:9: the top level
-]])
+])
AT_CHECK_CONFIGURE
AT_CHECK_ENV
AT_CHECK_DEFINES(
HAVE_FN_FOO
HAVE_FN_NOCOMMENT
HAVE_FN_QUUX
-], [], [],
-[configure.ac:8: warning: $1($fns): you should use literals
-functions.m4: $1 is expanded from...
-configure.ac:8: the top level
])
AT_CHECK_CONFIGURE
AT_CLEANUP
HAVE_SYS_TYPES_H
HAVE_UNISTD_H
STDC_HEADERS
-], [], [],
-[configure.ac:8: warning: $1($hs): you should use literals
-headers.m4: $1 is expanded from...
-configure.ac:8: the top level
])
AT_CHECK_CONFIGURE
AT_CLEANUP
[[warning: AC_DEFINE: `one
two' is not a valid preprocessor define value
]])
-AT_CHECK_AUTOHEADER([], [foo], [], [], [stderr])
-AT_CHECK([[sed 's/^configure\.ac:[45]: //' stderr]], [],
-[[warning: AC_DEFINE: `one
-two' is not a valid preprocessor define value
-]])
+AT_CHECK_AUTOHEADER([], [foo])
AT_CHECK_CONFIGURE
AT_CHECK_DEFINES([[#define foo one
]])
[[warning: AC_DEFINE_UNQUOTED: `one
two' is not a valid preprocessor define value
]])
-AT_CHECK_AUTOHEADER([], [foo], [], [], [stderr])
-AT_CHECK([[sed 's/^configure\.ac:[45]: //' stderr]], [],
-[[warning: AC_DEFINE_UNQUOTED: `one
-two' is not a valid preprocessor define value
-]])
+AT_CHECK_AUTOHEADER([], [foo])
AT_CHECK_CONFIGURE
AT_CHECK_DEFINES([[#define foo one
]])