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 any attempt to use the obsolete de-ANSI-fication support
22 warn_rx
='automatic de-ANSI-fication.*removed'
24 echo AC_PROG_CC
>> configure.ac
26 mv aclocal.
m4 aclocal.sav
27 cp configure.ac configure.sav
29 echo AM_C_PROTOTYPES
>> configure.ac
31 $ACLOCAL -Wnone 2>stderr
&& { cat stderr
>&2; exit 1; }
33 grep "^configure\\.ac:5:.*$warn_rx" stderr
35 cat aclocal.sav
"$am_automake_acdir"/obsolete.
m4 > aclocal.
m4
36 $AUTOCONF -Wnone 2>stderr
&& { cat stderr
>&2; exit 1; }
38 grep "^configure\\.ac:5:.*$warn_rx" stderr
40 for opt
in ansi2knr lib
/ansi2knr
; do
41 # ansi2knr option in Makefile.am
42 cp configure.sav configure.ac
43 echo "AUTOMAKE_OPTIONS = $opt" > Makefile.am
44 rm -rf autom4te
*.cache
46 grep "^Makefile\.am:1:.*$warn_rx" stderr
47 # ansi2knr option in configure.ac
49 sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([$opt])|" configure.sav
>configure.ac
50 cat configure.ac
# For debugging.
51 rm -rf autom4te
*.cache
53 grep "^configure\\.ac:2:.*$warn_rx" stderr