* automake.texi (Macros): Document AM_PROG_AS.
[automake.git] / tests / cond11.test
blob98c6e5c57c22f5e6bdb5181edef20ca11340c38b
1 #! /bin/sh
3 # Test for bug in conditionals. From Richard Boulton.
4 # This checks that, if LDADD is set from a conditional variable
5 # and an AC_SUBST, the _DEPENDENCIES variable is set correctly.
7 . $srcdir/defs || exit 1
9 cat > configure.in << 'END'
10 AC_INIT(Makefile.am)
11 AM_INIT_AUTOMAKE(foo,0.0)
12 AC_PROG_CC
13 AM_CONDITIONAL(USE_A,[test x = x])
14 AC_OUTPUT(Makefile)
15 AC_SUBST(SUBSTVAR)
16 END
18 cat > Makefile.am << 'END'
20 if USE_A
21 foolibs=faz.la
22 else
23 foolibs=
24 endif
26 noinst_PROGRAMS = foo
27 foo_SOURCES = foo.c
28 LDADD = $(SUBSTVAR) $(foolibs)
29 END
31 : > config.guess
32 : > config.sub
33 : > compile
35 $ACLOCAL || exit 1
36 $AUTOMAKE || exit 1
38 #Should be two dependency setting lines
39 count=`grep 'foo_DEPENDENCIES =' Makefile.in | wc -l|sed 's/ //g'`
40 test "x$count" = "x2" &&
41 grep '^.USE_A_TRUE.foo_DEPENDENCIES =' Makefile.in