2 # Copyright (C) 2011 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 AUTOMAKE_OPTIONS support variable expansion.
21 # We want complete control over automake options.
22 AUTOMAKE=$original_AUTOMAKE
24 cat > configure.in <<END
26 AM_INIT_AUTOMAKE([-Wall -Werror gnu])
27 AC_CONFIG_FILES([Makefile])
30 cat > Makefile.am <<'END'
31 # The following should expand to `-Wnone -Wno-error foreign -Wportability'.
32 AUTOMAKE_OPTIONS = $(foo) foreign
33 AUTOMAKE_OPTIONS += ${bar}
40 ## This will give a warning with `-Wportability'
42 ## This would give a warning with `-Woverride'.
48 grep '^Makefile\.am:.*:=.*not portable' stderr
49 grep README stderr && Exit 1
50 $EGREP '(install|override)' stderr && Exit 1