-AM_GNU_GETTEXT(external, need-ngettext)
-AM_GNU_GETTEXT_VERSION(0.11.5)
-
-# 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)
-
-AC_OUTPUT([Makefile
- config/Makefile
- po/Makefile.in
- data/Makefile
- lib/Makefile src/Makefile doc/Makefile
- m4/Makefile])
+# We've never tested with gettext versions before 0.15, so play it safe.
+AM_GNU_GETTEXT([external], [need-ngettext])
+AM_GNU_GETTEXT_VERSION([0.15])
+BISON_I18N
+
+# Internationalized parsers.
+AC_CONFIG_FILES([runtime-po/Makefile.in])
+# Autoconf macros for packages using internationalized parsers.
+aclocaldir='${datadir}/aclocal'
+AC_SUBST([aclocaldir])
+
+# Create the benchmark script.
+AC_CONFIG_FILES([etc/bench.pl], [chmod +x etc/bench.pl])
+
+# 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])
+AC_SUBST([O0CFLAGS], [`echo $CFLAGS | sed 's/-O[[0-9]] *//'`])
+AC_SUBST([O0CXXFLAGS], [`echo $CXXFLAGS | sed 's/-O[[0-9]] *//'`])
+
+gt_JAVACOMP([1.3])
+gt_JAVAEXEC
+
+AC_CONFIG_FILES([Makefile
+ build-aux/Makefile
+ po/Makefile.in
+ data/Makefile
+ etc/Makefile
+ examples/Makefile
+ examples/calc++/Makefile
+ lib/Makefile src/Makefile
+ doc/Makefile
+ doc/yacc.1])
+AC_OUTPUT