Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / ansi3b.test
blobaa25a219293feeae31e9201b052f113b16dbeb0d
1 #! /bin/sh
2 # Copyright (C) 1998, 1999, 2001, 2002, 2003 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 3, or (at your option)
7 # any later version.
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 # Actual test of ansi2knr functionality. Relies on existence
18 # of working gcc. Same as ansi3.test, but with AUTOMAKE_OPTIONS
19 # defined in configure.in.
21 required=gcc
22 . ./defs || Exit 1
24 set -e
26 cat > configure.in << 'END'
27 AC_INIT([hello], [0.24])
28 AM_INIT_AUTOMAKE([ansi2knr no-dependencies])
29 AC_PROG_CC
30 AM_C_PROTOTYPES
31 AC_CONFIG_FILES([Makefile])
32 AC_OUTPUT
33 END
35 echo 'bin_PROGRAMS = hello' > Makefile.am
37 cat > hello.c << 'END'
38 #include <stdio.h>
39 int
40 main (int argc, char *argv[])
42 printf ("yeah, yeah\n");
43 return 0;
45 END
47 # Ignore user CFLAGS.
48 CFLAGS=
49 export CFLAGS
51 # We use gcc and not gcc -traditional as the latter fails on some
52 # Linux boxes (Red Hat 5.1 in particular).
53 $ACLOCAL
54 $AUTOCONF
55 $AUTOMAKE -a 2>stderr
56 cat stderr
57 grep 'configure.in:2:.*ansi2knr\.1' stderr
58 CC='gcc' ./configure
59 ANSI2KNR=./ansi2knr U=_ $MAKE -e
60 ./hello