2 # Copyright (C) 2011-2013 Free Software Foundation, Inc.
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)
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.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Check that, on the command line, explicitly-defined warnings take
18 # precedence over implicit strictness-implied warnings.
22 # We want complete control over automake options.
23 AUTOMAKE
=$am_original_AUTOMAKE
34 grep '^Makefile\.am:.*:=.*not portable' stderr
35 test $
(wc -l <stderr
) -eq 1
41 sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \
42 -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|"
48 # Files required in gnu strictness.
49 touch README INSTALL NEWS AUTHORS ChangeLog COPYING
51 cat > Makefile.am
<<END
58 ko
--foreign -Wportability
59 ko
-Wportability --foreign
60 ok
--gnu -Wno-portability
61 ok
-Wno-portability --gnu
63 set_am_opts
'' Makefile.am
65 rm -rf autom4te
*.cache
66 set_am_opts
'foreign -Wportability' configure.ac
68 rm -rf autom4te
*.cache
69 set_am_opts
'-Wportability foreign' configure.ac
71 rm -rf autom4te
*.cache
72 set_am_opts
'gnu -Wno-portability' configure.ac
74 rm -rf autom4te
*.cache
75 set_am_opts
'-Wno-portability gnu' configure.ac
78 rm -rf autom4te
*.cache
79 set_am_opts
'' configure.ac
81 set_am_opts
'foreign -Wportability' Makefile.am
83 set_am_opts
'-Wportability foreign' Makefile.am
85 set_am_opts
'gnu -Wno-portability' Makefile.am
87 set_am_opts
'-Wno-portability gnu' Makefile.am