Fix for PR automake/322:
[platform/upstream/automake.git] / tests / seenc.test
1 #! /bin/sh
2
3 # Test to make sure C-but-not-CC error works.
4
5 . $srcdir/defs || exit 1
6
7 cat >> configure.in << 'END'
8 dnl AC_PROG_CC and AC_PROG_CXX missing on purpose
9 AC_LIBOBJ([fsusage])
10 AC_LIBOBJ([mountlist])
11 END
12
13 cat > Makefile.am << 'END'
14 bin_PROGRAMS = foo
15 foo_SOURCES = x.C
16 foo_LDADD = @LIBOBJS@
17 END
18
19 : > fsusage.c
20 : > mountlist.c
21
22 $ACLOCAL || exit 1
23 # Use -Wno-error, because there are many error messages
24 # output for this test, and we just want to make sure some of
25 # them are about CC and CXX being undefined.
26 $AUTOMAKE --Wno-error 2> err && exit 1
27 fgrep CC err || exit 1
28 fgrep CXX err || exit 1