2 # Copyright (C) 2011-2012 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 interactions between the 'portability-recursive' and
18 # 'extra-portability' warning categories.
22 # We want (almost) complete control over automake options.
23 AUTOMAKE
="$am_original_AUTOMAKE --foreign -Werror"
25 cat >>configure.ac
<<END
33 cat >Makefile.am
<<'END'
35 lib_LIBRARIES = libfoo.a
36 libfoo_a_SOURCES = foo.c
39 # 'extra-portability' implies 'portability-recursive'.
40 AUTOMAKE_fails
-Wextra-portability
41 grep 'requires.*AM_PROG_AR' stderr
42 grep 'recursive variable expansion' stderr
44 # We can disable 'extra-portability' while leaving
45 # 'portability-recursive' intact.
46 AUTOMAKE_fails
-Wportability-recursive -Wno-extra-portability
47 grep 'requires.*AM_PROG_AR' stderr
&& exit 1
48 grep 'recursive variable expansion' stderr
50 # We can disable 'portability-recursive' while leaving
51 # 'extra-portability' intact.
52 AUTOMAKE_fails
-Wextra-portability -Wno-portability-recursive
53 grep 'requires.*AM_PROG_AR' stderr
54 grep 'recursive variable expansion' stderr
&& exit 1
56 # Disabling 'portability' disables 'portability-recursive' and
57 # 'extra-portability'.
58 $AUTOMAKE -Wextra-portability -Wno-portability