1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #!/bin/sh
- . test-init.sh
- cat >>configure.ac <<'EOF'
- AC_SUBST([CC], [false])
- AC_SUBST([OBJEXT], [o])
- AM_CONDITIONAL([C1], [test -z "$two"])
- AM_CONDITIONAL([C2], [test -n "$two"])
- AC_OUTPUT
- EOF
- cat > Makefile.am <<'EOF'
- bin_PROGRAMS = a
- a_LDADD = c0.o -L/some/where
- if C1
- a_LDADD += c1.o -llibfoo.a
- endif
- if C2
- a_LDADD += c2.o -dlopen c3.la
- endif
- .PHONY: test1 test2
- test1:
- is $(a_DEPENDENCIES) == c0.o c1.o
- test2:
- is $(a_DEPENDENCIES) == c0.o c2.o c3.la
- EOF
- $ACLOCAL
- $AUTOCONF
- $AUTOMAKE --ignore-deps
- ./configure
- $MAKE test1
- ./configure two=yes
- $MAKE test2
- :
|