#! /bin/sh # Regression test for substitution references to conditional variables. # Report from Richard Boulton . $srcdir/defs || exit 1 cat > configure.in << 'END' AC_INIT(Makefile.am) AM_INIT_AUTOMAKE(hello,0.23) AC_PROG_CC AM_CONDITIONAL(COND1, true) AM_CONDITIONAL(COND2, true) AC_OUTPUT(Makefile) END cat > Makefile.am << 'END' var1 = dlmain if COND1 var2 = $(var1:=.c) foo.cc else var2 = $(var1:=.c) endif if COND2 var3 = $(var2:.cc=.c) else var3 = $(var2:.cc=.c) endif helldl_SOURCES = $(var3) echorule: @echo $(helldl_SOURCES) $(helldl_OBJECTS) bin_PROGRAMS = helldl END $needs_autoconf (gcc -v) > /dev/null 2>&1 || exit 77 # Ignore user CFLAGS. CFLAGS= export CFLAGS $needs_gnu_make set -e $ACLOCAL $AUTOCONF $AUTOMAKE -a CC='gcc' ./configure val=`$MAKE --no-print-directory echorule`; echo $val test "x$val" = "xdlmain.c foo.c dlmain.o foo.o"