* configure.in: Updated to 1.4d and released.
[automake.git] / tests / cond5.test
blob926f2f0c92c27e2991443e1f2e8c23d6b4e3656b
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 $AUTOMAKE &
32 pid=$!
34 sleep 15
35 kill -0 $pid && {
36 kill $pid
37 exit 1
39 exit 0