* configure.in: Upped to version 1.4k.
[automake.git] / tests / cond5.test
blob02e2be86267e78b0456c2f55a64727f794c676c8
1 #! /bin/sh
3 # Yet another sources-in-conditional test. Report from Tim Goodwin.
5 . $srcdir/defs || exit 1
7 cat > configure.in << 'END'
8 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
9 AC_PROG_CC
10 AM_CONDITIONAL(ONE, true)
11 AM_CONDITIONAL(TWO, false)
12 AC_OUTPUT(Makefile)
13 END
15 cat > Makefile.am << 'END'
16 bin_PROGRAMS = targ
18 if ONE
19 OPT_SRC = one.c
20 endif
22 if TWO
23 OPT_SRC = $(OPT_SRC) two.c
24 endif
26 targ_SOURCES = main.c $(OPT_SRC)
27 END
29 # The bug is that automake hangs. So we give it a few seconds and
30 # then kill it.
31 $ACLOCAL || exit 1
32 $AUTOMAKE &
33 pid=$!
35 sleep 15
36 kill -0 $pid && {
37 kill $pid
38 exit 1
40 exit 0