--- origsrc/automake-1.8.5/tests/subst.test	2003-11-14 16:26:01.000000000 -0500
+++ src/automake-1.8.5/tests/subst.test	2008-10-26 22:19:04.909673600 -0400
@@ -24,8 +24,14 @@
 . ./defs || exit 1
 
 cat >> configure.in << 'END'
-AC_SUBST($1)
-AC_SUBST([$]$1)  dnl this is the actual invocation that was used
+dnl This test used to have the following lines, which cannot have
+dnl worked sensibly with Autoconf for years, however:
+dnl AC_SUBST($1)
+dnl AC_SUBST([$]$1)  dnl this is the actual invocation that was used
+dnl
+AC_DEFUN([FOO],
+[AC_SUBST([$1])])
+FOO([BAR])
 END
 
 : > Makefile.am
--- origsrc/automake-1.8.5/tests/yacc6.test	2004-05-13 13:44:17.000000000 -0400
+++ src/automake-1.8.5/tests/yacc6.test	2008-10-26 22:19:04.909673600 -0400
@@ -29,7 +29,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AC_CONFIG_AUX_DIR([aux])
+AC_CONFIG_AUX_DIR([auxdir])
 AC_PROG_CC
 AC_PROG_YACC
 AC_CONFIG_FILES([sub/Makefile])
@@ -45,7 +45,7 @@
 	test `ls -1t sub/main.$(OBJEXT) z | sed 1q` = sub/main.$(OBJEXT)
 END
 
-mkdir aux sub
+mkdir auxdir sub
 
 cat > sub/Makefile.am << 'END'
 bin_PROGRAMS = foo bar
@@ -84,10 +84,10 @@
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
-test -f aux/ylwrap
+test -f auxdir/ylwrap
 test ! -f ylwrap
 test ! -f sub/ylwrap
-$FGREP '(top_srcdir)/aux/ylwrap' sub/Makefile.in
+$FGREP '(top_srcdir)/auxdir/ylwrap' sub/Makefile.in
 ./configure
 $MAKE
 grep '#.*line.*foo.y' sub/foo.c
