2002-02-18 Paul Eggert <eggert@twinsun.com>
[platform/upstream/automake.git] / tests / depcomp2.test
1 #! /bin/sh
2
3 # Test to make sure that depcomp is not used when it's not installed
4 # From Pavel Roskin.
5
6 . $srcdir/defs || exit 1
7
8 cat > configure.in << 'END'
9 AC_INIT(subdir/foo.c)
10 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
11 AC_PROG_CC
12 AC_OUTPUT(Makefile subdir/Makefile)
13 END
14
15 cat > Makefile.am << 'END'
16 SUBDIRS = subdir
17 END
18
19 rm -f depcomp
20 mkdir subdir
21
22 cat > subdir/Makefile.in << 'END'
23 foo:
24         $(CC) -o foo foo.c
25 END
26
27 : > subdir/foo.c
28
29 # Likewise for gcc.
30 (gcc -v) > /dev/null 2>&1 || exit 77
31
32 # Ignore user CFLAGS.
33 CFLAGS=
34 export CFLAGS
35
36 $ACLOCAL || exit 1
37 $AUTOMAKE --add-missing || exit 1
38 $AUTOCONF || exit 1
39 CC='gcc' ./configure 2>error.log
40 test -z "`cat error.log`"