-# This is necessary so that .o files in LIBOBJS are also built via
-# the ANSI2KNR-filtering rules.
-LIB@&t@OBJS=`echo $LIB@&t@OBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
-AC_SUBST(LIB@&t@OBJS)
+# Initialize the test suite.
+AC_CONFIG_TESTDIR(tests)
+AC_CONFIG_FILES([tests/Makefile tests/atlocal])
+AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
+AC_CHECK_PROGS([VALGRIND], [valgrind])
+AC_PROG_CXX
+BISON_TEST_FOR_WORKING_CXX_COMPILER
+AM_MISSING_PROG([AUTOM4TE], [autom4te])
+# Needed by tests/atlocal.in.
+AC_SUBST([GCC])
+O0CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]] *//'`
+AC_SUBST([O0CFLAGS])
+O0CXXFLAGS=`echo $CXXFLAGS | sed 's/-O[[0-9]] *//'`
+AC_SUBST([O0CXXFLAGS])