1#! /bin/sh 2# Copyright (C) 2011-2021 Free Software Foundation, Inc. 3# 4# This program is free software; you can redistribute it and/or modify 5# it under the terms of the GNU General Public License as published by 6# the Free Software Foundation; either version 2, or (at your option) 7# any later version. 8# 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12# GNU General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License 15# along with this program. If not, see <https://www.gnu.org/licenses/>. 16 17# Check that explicitly-defined warning levels take precedence over 18# implicit strictness-implied warnings, even when these explicit warning 19# levels are "catch-all warnings" (such as '-Wall' and '-Wnone'). 20# Since we are at it, also throw in *.am and *.m4 file inclusions. 21 22. test-init.sh 23 24# We want complete control over automake options. 25AUTOMAKE=$am_original_AUTOMAKE 26 27# Files required in gnu and/or gnits strictness. 28touch README INSTALL NEWS AUTHORS ChangeLog COPYING THANKS 29 30cat > configure.ac << END 31AC_INIT([$me], [1.0]) 32m4_include([am-init-automake.m4]) 33AC_PROG_CC 34AC_CONFIG_FILES([Makefile]) 35# Other similar tests do not use AC_OUTPUT, so we use it here, 36# for completeness and for better coverage. 37AC_OUTPUT 38END 39 40cat > Makefile.am <<END 41include automake-options.am 42FOO := bar 43END 44 45rm -rf autom4te*.cache 46: > automake-options.am 47echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4 48$ACLOCAL 49AUTOMAKE_fails -Werror -Wall --foreign 50grep '^Makefile\.am:.*:=.*not portable' stderr 51 52rm -rf autom4te*.cache 53: > automake-options.am 54echo 'AM_INIT_AUTOMAKE([-Werror -Wnone gnu])' > am-init-automake.m4 55$ACLOCAL 56$AUTOMAKE 57 58rm -rf autom4te*.cache 59echo 'AUTOMAKE_OPTIONS = -Werror -Wnone gnits' > automake-options.am 60echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4 61$ACLOCAL 62$AUTOMAKE 63 64: 65