automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.3


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.3-899-g934f800
Date: Sun, 28 Oct 2012 10:57:48 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=934f800f9c55b311ebc52c459a07d3e1b7501569

The branch, ng/master has been updated
       via  934f800f9c55b311ebc52c459a07d3e1b7501569 (commit)
       via  c3cf552edcd4f749711e9c4dcaf4a1ff9dc8977c (commit)
       via  0faf1588b9e820c20351c92afa44c9d0e8a3a412 (commit)
       via  bf016cee0efa2dd3594513791f588b47fa5c456f (commit)
       via  57770a2cce19e74b3a90f2bf60db2af5b6fee5d8 (commit)
       via  7f45725b97c8cc2cbb39ff50885dd39356072338 (commit)
       via  1a22cb32d6c2c385e6ab3d838c818b7057b29f6b (commit)
       via  90a874d77ae0143df410f18053b94c0416f6543d (commit)
       via  4b5bbeeb4e204fc99c741a6ed058f4d951c7a0c9 (commit)
       via  b6dba4cf2b4a00c068c934f2f858a97108efefb0 (commit)
       via  0dd85e069d595f169d2e41c98762a6395632c3fb (commit)
       via  9fed1c8186e58ff7b2152e3901d5d62b6d86d9b9 (commit)
       via  50d533cd6f34509f64533b436bf57266d9a743d8 (commit)
       via  55ea5e0f7c8bdff233315f33218351809365a19d (commit)
       via  5ddf10071d94acf2ae0e69e187641f22cce0199a (commit)
       via  cf8b865e19c25d5cb5ccb2def3d5d2d8b8c63d32 (commit)
       via  f897907bee30ec66fdebfe04d3c2d6ad8b8da501 (commit)
       via  9a2796ad854c70c221c9d19956264246d9783430 (commit)
       via  44d202536a5fd0ac670eef7f43326093c8c9bc5b (commit)
       via  7a3e5c7c58d5f3dab27776b5b07e3d4e1b2e5fdd (commit)
       via  d26ddc825605b6b6098fcc4be5dc33ac2a8a48d1 (commit)
      from  681f32756796f6a90c97213452a757843cc001b8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 934f800f9c55b311ebc52c459a07d3e1b7501569
Author: Stefano Lattarini <address@hidden>
Date:   Sat Oct 27 20:56:23 2012 +0200

    tests: fixup one test after botched merge
    
    * t/recurs-user-phony.sh: This one.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c3cf552edcd4f749711e9c4dcaf4a1ff9dc8977c
Merge: 1a22cb3 0faf158
Author: Stefano Lattarini <address@hidden>
Date:   Sat Oct 27 20:26:02 2012 +0200

    Merge branch 'master' into ng/master
    
    * master:
      configure: correctly identify missing GNU compilers as such
      tests: get rid of ./defs, it's no longer used.
      maintcheck: fix the name of a check
      maintcheck: guard against uses of ./defs in tests
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 1a22cb32d6c2c385e6ab3d838c818b7057b29f6b
Author: Stefano Lattarini <address@hidden>
Date:   Sat Oct 27 18:22:58 2012 +0200

    tests: prefer including 'test-init.sh' rather than './defs'
    
    This is a follow-up to today's same-name commit v1.12.4-181-g5ddf100,
    which did the same for the test cases in master.
    
    * All tests: To run the common setup, use the command:
    
        . test-init.sh
    
    instead of the older, "historical" one:
    
        . ./defs || exit 1
    
    Note that the "|| exit 1" wasn't really useful, since the 'errexit'
    shell flag is in effect in both './defs' and 'test-init.sh', and all
    the known shells that are good enough to run the automake testsuite
    do automatically exit with error when a sourced file cannot be found
    (at least, they do so in non-interactive mode, which is the only
    mode that concerns us in the testsuite).
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 90a874d77ae0143df410f18053b94c0416f6543d
Author: Stefano Lattarini <address@hidden>
Date:   Sat Oct 27 18:19:23 2012 +0200

    tests: fix buglets and weaknesses in a test
    
    * t/nostdinc.sh: Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 4b5bbeeb4e204fc99c741a6ed058f4d951c7a0c9
Author: Stefano Lattarini <address@hidden>
Date:   Sat Oct 27 18:16:34 2012 +0200

    tests: fix a spurious grepping failure
    
    * t/per-target-flags.sh: Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 0dd85e069d595f169d2e41c98762a6395632c3fb
Merge: cf8b865 9fed1c8
Author: Stefano Lattarini <address@hidden>
Date:   Sat Oct 27 17:52:35 2012 +0200

    Merge branch 'master' into ng/master
    
    * master:
      tests: remove spurious leftover use of 'Exit'
      tests: remove an obsolete, and probably now wrong, comment
      tests: remove obsolescent references to './defs'
      tests: prefer including 'test-init.sh' rather than './defs'
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit cf8b865e19c25d5cb5ccb2def3d5d2d8b8c63d32
Merge: 681f327 f897907
Author: Stefano Lattarini <address@hidden>
Date:   Sat Oct 27 16:31:35 2012 +0200

    Merge branch 'master' into ng/master
    
    * master:
      tests: merge, tweak and modernize few test scripts
      tests: move coverage about BUILT_SOURCES
      tests: more meaningful names for some test cases
      tests: merge some grepping tests on Yacc support
    
    + Extra non-trivial changes:
    
    * t/per-target-flags.sh: Sync with the back-ported version that
    is in maint and master, that has several bugfixes over the previous
    version in ng/master.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                                       |   42 ++++++++++++--------
 contrib/t/parallel-tests-html-recursive.sh         |    2 +-
 contrib/t/parallel-tests-html.sh                   |    2 +-
 defs                                               |   22 ----------
 gen-testsuite-part                                 |    2 +-
 syntax-checks.mk                                   |   18 ++++++--
 t/acloca10.sh                                      |    2 +-
 t/acloca11.sh                                      |    2 +-
 t/acloca12.sh                                      |    2 +-
 t/acloca13.sh                                      |    2 +-
 t/acloca14.sh                                      |    2 +-
 t/acloca14b.sh                                     |    2 +-
 t/acloca15.sh                                      |    2 +-
 t/acloca16.sh                                      |    2 +-
 t/acloca17.sh                                      |    2 +-
 t/acloca18.sh                                      |    2 +-
 t/acloca19.sh                                      |    2 +-
 t/acloca20.sh                                      |    2 +-
 t/acloca21.sh                                      |    2 +-
 t/acloca22.sh                                      |    2 +-
 t/acloca22b.sh                                     |    2 +-
 t/acloca23.sh                                      |    2 +-
 t/aclocal-acdir.sh                                 |    2 +-
 t/aclocal-amflags.sh                               |    2 +-
 t/aclocal-autoconf-version-check.sh                |    2 +-
 t/aclocal-install-absdir.sh                        |    2 +-
 t/aclocal-install-fail.sh                          |    2 +-
 t/aclocal-install-mkdir.sh                         |    2 +-
 t/aclocal-macrodir.tap                             |    2 +-
 t/aclocal-no-install-no-mkdir.sh                   |    2 +-
 t/aclocal-path-install-serial.sh                   |    2 +-
 t/aclocal-path-install.sh                          |    2 +-
 t/aclocal-path-nonexistent.sh                      |    2 +-
 t/aclocal-path-precedence.sh                       |    2 +-
 t/aclocal-path.sh                                  |    2 +-
 t/aclocal-print-acdir.sh                           |    2 +-
 t/aclocal-verbose-install.sh                       |    2 +-
 t/aclocal.sh                                       |    2 +-
 t/aclocal3.sh                                      |    2 +-
 t/aclocal4.sh                                      |    2 +-
 t/aclocal5.sh                                      |    2 +-
 t/aclocal6.sh                                      |    2 +-
 t/aclocal7.sh                                      |    2 +-
 t/aclocal8.sh                                      |    2 +-
 t/aclocal9.sh                                      |    2 +-
 t/acsilent.sh                                      |    2 +-
 t/acsubst.sh                                       |    2 +-
 t/acsubst2.sh                                      |    2 +-
 t/add-missing.tap                                  |    2 +-
 t/all-prog-libs.sh                                 |    2 +-
 t/all.sh                                           |    2 +-
 t/all2.sh                                          |    2 +-
 t/alloca.sh                                        |    2 +-
 t/alloca2.sh                                       |    2 +-
 t/alpha.sh                                         |    2 +-
 t/alpha2.sh                                        |    2 +-
 t/am-default-source-ext.sh                         |    2 +-
 t/am-dir.sh                                        |    2 +-
 t/am-macro-not-found.sh                            |    2 +-
 t/am-missing-prog.sh                               |    2 +-
 t/am-tests-environment.sh                          |    2 +-
 t/am-xargs-map.sh                                  |    2 +-
 t/amassign.sh                                      |    2 +-
 t/amhello-binpkg.sh                                |    2 +-
 t/amhello-cflags.sh                                |    2 +-
 t/amhello-cross-compile.sh                         |    2 +-
 t/aminit-moreargs-deprecation.sh                   |    2 +-
 t/amopt.sh                                         |    2 +-
 t/amopts-location.sh                               |    2 +-
 t/amopts-variable-expansion.sh                     |    2 +-
 t/amsubst.sh                                       |    2 +-
 t/ar-lib.sh                                        |    2 +-
 t/ar-lib2.sh                                       |    2 +-
 t/ar-lib3.sh                                       |    2 +-
 t/ar-lib4.sh                                       |    2 +-
 t/ar-lib5a.sh                                      |    2 +-
 t/ar-lib5b.sh                                      |    2 +-
 t/ar-lib6a.sh                                      |    2 +-
 t/ar-lib6b.sh                                      |    2 +-
 t/ar-lib7.sh                                       |    2 +-
 t/ar.sh                                            |    2 +-
 t/ar2.sh                                           |    2 +-
 t/ar3.sh                                           |    2 +-
 t/ar4.sh                                           |    2 +-
 t/ar5.sh                                           |    2 +-
 t/asm.sh                                           |    2 +-
 t/asm2.sh                                          |    2 +-
 t/asm3.sh                                          |    2 +-
 t/autodist-aclocal-m4.sh                           |    2 +-
 t/autodist-configure-no-subdir.sh                  |    2 +-
 t/autodist-no-duplicate.sh                         |    2 +-
 t/autodist-stamp-vti.sh                            |    2 +-
 t/autodist-subdir.sh                               |    2 +-
 t/autodist.sh                                      |    2 +-
 t/autohdr-subdir-pr12495.sh                        |    2 +-
 t/autohdr.sh                                       |    2 +-
 t/autohdr3.sh                                      |    2 +-
 t/autohdr4.sh                                      |    2 +-
 t/autohdrdry.sh                                    |    2 +-
 t/automake-cmdline.tap                             |    2 +-
 t/auxdir-autodetect.sh                             |    2 +-
 t/auxdir-computed.tap                              |    2 +-
 t/auxdir-misplaced.sh                              |    2 +-
 t/auxdir-nonexistent.sh                            |    2 +-
 t/auxdir-unportable.tap                            |    2 +-
 t/auxdir.sh                                        |    2 +-
 t/auxdir6.sh                                       |    2 +-
 t/auxdir7.sh                                       |    2 +-
 t/auxdir8.sh                                       |    2 +-
 t/ax/depcomp-shuffle.sh                            |    2 +-
 t/ax/depcomp.sh                                    |    2 +-
 t/ax/tap-setup.sh                                  |    2 +-
 t/ax/tap-summary-aux.sh                            |    2 +-
 t/ax/testsuite-summary-checks.sh                   |    2 +-
 t/backcompat-acout.sh                              |    2 +-
 t/backcompat.sh                                    |    2 +-
 t/backcompat2.sh                                   |    2 +-
 t/backcompat3.sh                                   |    2 +-
 t/backcompat6.sh                                   |    2 +-
 t/backsl.sh                                        |    2 +-
 t/backsl2.sh                                       |    2 +-
 t/backsl4.sh                                       |    2 +-
 t/backslash-tricks.sh                              |    2 +-
 t/badline.sh                                       |    2 +-
 t/badopt.sh                                        |    2 +-
 t/badprog.sh                                       |    2 +-
 t/block.sh                                         |    2 +-
 t/built-sources-check.sh                           |    2 +-
 t/built-sources-cond.sh                            |    2 +-
 t/built-sources-fork-bomb.sh                       |    2 +-
 t/built-sources-install.sh                         |    2 +-
 t/built-sources-subdir.sh                          |    2 +-
 t/built-sources.sh                                 |    2 +-
 t/candist.sh                                       |    2 +-
 t/canon-name.sh                                    |    2 +-
 t/canon.sh                                         |    2 +-
 t/canon2.sh                                        |    2 +-
 t/canon3.sh                                        |    2 +-
 t/canon4.sh                                        |    2 +-
 t/canon5.sh                                        |    2 +-
 t/canon6.sh                                        |    2 +-
 t/canon7.sh                                        |    2 +-
 t/canon8.sh                                        |    2 +-
 t/ccnoco.sh                                        |    5 +-
 t/ccnoco2.sh                                       |    2 +-
 t/ccnoco3.sh                                       |    5 +-
 t/check-concurrency-bug9245.sh                     |    2 +-
 t/check-exported-srcdir.sh                         |    2 +-
 t/check-fd-redirect.sh                             |    2 +-
 t/check-no-test-driver.sh                          |    2 +-
 t/check-subst-prog.sh                              |    2 +-
 t/check-subst.sh                                   |    2 +-
 t/check-tests-in-builddir.sh                       |    2 +-
 t/check10.sh                                       |    2 +-
 t/check11.sh                                       |    2 +-
 t/check12.sh                                       |    2 +-
 t/check2.sh                                        |    2 +-
 t/check4.sh                                        |    2 +-
 t/check5.sh                                        |    2 +-
 t/check6.sh                                        |    2 +-
 t/check7.sh                                        |    2 +-
 t/check8.sh                                        |    2 +-
 t/clean-many.sh                                    |    2 +-
 t/clean-many2.sh                                   |    2 +-
 t/cleanvars.sh                                     |    2 +-
 t/colneq2.sh                                       |    2 +-
 t/colon.sh                                         |    2 +-
 t/colon2.sh                                        |    2 +-
 t/colon3.sh                                        |    2 +-
 t/colon4.sh                                        |    2 +-
 t/colon5.sh                                        |    2 +-
 t/colon6.sh                                        |    2 +-
 t/colon7.sh                                        |    2 +-
 t/color-tests-opt.sh                               |    2 +-
 t/color-tests.sh                                   |    2 +-
 t/color-tests2.sh                                  |    2 +-
 t/comment.sh                                       |    2 +-
 t/comment2.sh                                      |    2 +-
 t/comment4.sh                                      |    2 +-
 t/comment6.sh                                      |    2 +-
 t/comment7.sh                                      |    2 +-
 t/comment8.sh                                      |    2 +-
 t/comment9.sh                                      |    2 +-
 t/comments-in-var-def.sh                           |    2 +-
 t/compile.sh                                       |    2 +-
 t/compile2.sh                                      |    2 +-
 t/compile3.sh                                      |    2 +-
 t/compile4.sh                                      |    2 +-
 t/compile5.sh                                      |    2 +-
 t/compile6.sh                                      |    2 +-
 t/compile_f90_c_cxx.sh                             |    2 +-
 t/compile_f_c_cxx.sh                               |    2 +-
 t/cond-basic.sh                                    |    2 +-
 t/cond.sh                                          |    2 +-
 t/cond10.sh                                        |    2 +-
 t/cond11.sh                                        |    2 +-
 t/cond13.sh                                        |    2 +-
 t/cond14.sh                                        |    2 +-
 t/cond15.sh                                        |    2 +-
 t/cond16.sh                                        |    2 +-
 t/cond17.sh                                        |    2 +-
 t/cond18.sh                                        |    2 +-
 t/cond19.sh                                        |    2 +-
 t/cond20.sh                                        |    2 +-
 t/cond21.sh                                        |    2 +-
 t/cond22.sh                                        |    2 +-
 t/cond23.sh                                        |    2 +-
 t/cond24.sh                                        |    2 +-
 t/cond25.sh                                        |    2 +-
 t/cond26.sh                                        |    2 +-
 t/cond27.sh                                        |    2 +-
 t/cond28.sh                                        |    2 +-
 t/cond3.sh                                         |    2 +-
 t/cond30.sh                                        |    2 +-
 t/cond31.sh                                        |    2 +-
 t/cond32.sh                                        |    2 +-
 t/cond33.sh                                        |    2 +-
 t/cond34.sh                                        |    2 +-
 t/cond35.sh                                        |    2 +-
 t/cond36.sh                                        |    2 +-
 t/cond37.sh                                        |    2 +-
 t/cond38.sh                                        |    2 +-
 t/cond39.sh                                        |    2 +-
 t/cond4.sh                                         |    2 +-
 t/cond40.sh                                        |    2 +-
 t/cond41.sh                                        |    2 +-
 t/cond42.sh                                        |    2 +-
 t/cond43.sh                                        |    2 +-
 t/cond44.sh                                        |    2 +-
 t/cond45.sh                                        |    2 +-
 t/cond46.sh                                        |    2 +-
 t/cond5.sh                                         |    2 +-
 t/cond6.sh                                         |    2 +-
 t/cond7.sh                                         |    2 +-
 t/cond8.sh                                         |    2 +-
 t/cond9.sh                                         |    2 +-
 t/condd.sh                                         |    2 +-
 t/condhook.sh                                      |    2 +-
 t/condhook2.sh                                     |    2 +-
 t/condinc.sh                                       |    2 +-
 t/condinc2.sh                                      |    2 +-
 t/condlib.sh                                       |    2 +-
 t/condman2.sh                                      |    2 +-
 t/condman3.sh                                      |    2 +-
 t/confdeps.sh                                      |    2 +-
 t/conff.sh                                         |    2 +-
 t/conff2.sh                                        |    6 +-
 t/conffile-leading-dot.sh                          |    2 +-
 t/confh-internals.sh                               |    2 +-
 t/confh-subdir-clean.sh                            |    2 +-
 t/confh.sh                                         |    2 +-
 t/confh4.sh                                        |    2 +-
 t/confh5.sh                                        |    2 +-
 t/confh6.sh                                        |    2 +-
 t/confh7.sh                                        |    2 +-
 t/confh8.sh                                        |    2 +-
 t/confincl.sh                                      |    2 +-
 t/conflnk.sh                                       |    2 +-
 t/conflnk2.sh                                      |    2 +-
 t/conflnk3.sh                                      |    2 +-
 t/conflnk4.sh                                      |    2 +-
 t/confsub.sh                                       |    2 +-
 t/confvar.sh                                       |    2 +-
 t/confvar2.sh                                      |    2 +-
 t/copy.sh                                          |    2 +-
 t/cscope.tap                                       |    2 +-
 t/cscope2.sh                                       |    2 +-
 t/cscope3.sh                                       |    2 +-
 t/ctags.sh                                         |    2 +-
 t/cxx-demo.sh                                      |    2 +-
 t/cxx-fortran.sh                                   |    2 +-
 t/cxx-lt-demo.sh                                   |    2 +-
 t/cxx2.sh                                          |    2 +-
 t/cxxcpp.sh                                        |    2 +-
 t/cxxlibobj.sh                                     |    2 +-
 t/cxxlink.sh                                       |    2 +-
 t/cygnus-no-more.sh                                |    2 +-
 t/cygwin32.sh                                      |    2 +-
 t/dash.sh                                          |    2 +-
 t/defun.sh                                         |    2 +-
 t/defun2.sh                                        |    2 +-
 t/dejagnu-absolute-builddir.sh                     |    2 +-
 t/dejagnu-relative-srcdir.sh                       |    2 +-
 t/dejagnu-siteexp-append.sh                        |    2 +-
 t/dejagnu-siteexp-extend.sh                        |    2 +-
 t/dejagnu-siteexp-useredit.sh                      |    2 +-
 t/dejagnu2.sh                                      |    2 +-
 t/dejagnu3.sh                                      |    2 +-
 t/dejagnu4.sh                                      |    2 +-
 t/dejagnu5.sh                                      |    2 +-
 t/dejagnu6.sh                                      |    2 +-
 t/dejagnu7.sh                                      |    2 +-
 t/deleted-am.sh                                    |    2 +-
 t/deleted-m4.sh                                    |    2 +-
 t/depacl2.sh                                       |    2 +-
 t/depcomp-implicit-auxdir.sh                       |    2 +-
 t/depcomp-recover.sh                               |    2 +-
 t/depcomp.sh                                       |    2 +-
 t/depcomp2.sh                                      |    2 +-
 t/depcomp8a.sh                                     |    2 +-
 t/depcomp8b.sh                                     |    2 +-
 t/depdist.sh                                       |    2 +-
 t/depend.sh                                        |    2 +-
 t/depend3.sh                                       |    2 +-
 t/depend4.sh                                       |    2 +-
 t/deprecated-acinit.sh                             |    2 +-
 t/destdir.sh                                       |    2 +-
 t/dirlist-abspath.sh                               |    2 +-
 t/dirlist.sh                                       |    5 +-
 t/dirlist2.sh                                      |    2 +-
 t/discover.sh                                      |    2 +-
 t/dist-auxdir-many-subdirs.sh                      |    2 +-
 t/dist-auxfile-2.sh                                |    2 +-
 t/dist-auxfile.sh                                  |    2 +-
 t/dist-formats.tap                                 |    2 +-
 t/dist-included-parent-dir.sh                      |    2 +-
 t/dist-many.sh                                     |    2 +-
 t/dist-many2.sh                                    |    2 +-
 t/dist-missing-am.sh                               |    2 +-
 t/dist-missing-included-m4.sh                      |    2 +-
 t/dist-missing-m4.sh                               |    2 +-
 t/dist-obsolete-opts.sh                            |    2 +-
 t/dist-pr109765.sh                                 |    2 +-
 t/dist-readonly.sh                                 |    2 +-
 t/dist-repeated.sh                                 |    2 +-
 t/dist-srcdir.sh                                   |    2 +-
 t/dist-srcdir2.sh                                  |    2 +-
 t/distcheck-configure-flags-am.sh                  |    2 +-
 t/distcheck-configure-flags-subpkg.sh              |    2 +-
 t/distcheck-configure-flags.sh                     |    2 +-
 t/distcheck-hook.sh                                |    2 +-
 t/distcheck-hook2.sh                               |    2 +-
 t/distcheck-missing-m4.sh                          |    2 +-
 t/distcheck-outdated-m4.sh                         |    2 +-
 t/distcheck-override-infodir.sh                    |    2 +-
 t/distcheck-pr10470.sh                             |    2 +-
 t/distcheck-pr9579.sh                              |    2 +-
 t/distcheck-writable-srcdir.sh                     |    2 +-
 t/distcleancheck.sh                                |    2 +-
 t/distcom-subdir.sh                                |    2 +-
 t/distcom3.sh                                      |    2 +-
 t/distcom4.sh                                      |    2 +-
 t/distcom5.sh                                      |    2 +-
 t/distdir.sh                                       |    2 +-
 t/disthook.sh                                      |    2 +-
 t/distlinks.sh                                     |    2 +-
 t/distlinksbrk.sh                                  |    2 +-
 t/distname.sh                                      |    2 +-
 t/dmalloc.sh                                       |    2 +-
 t/dollar.sh                                        |    2 +-
 t/double-colon-rules.sh                            |    2 +-
 t/double.sh                                        |    2 +-
 t/dup2.sh                                          |    2 +-
 t/else.sh                                          |    2 +-
 t/empty-data-primary.sh                            |    2 +-
 t/empty-sources-primary.tap                        |    2 +-
 t/ensure-dir-exists.sh                             |    2 +-
 t/etags.sh                                         |    2 +-
 t/exdir.sh                                         |    2 +-
 t/exdir2.sh                                        |    2 +-
 t/exdir3.sh                                        |    2 +-
 t/exeext.sh                                        |    2 +-
 t/exeext2.sh                                       |    2 +-
 t/exeext3.sh                                       |    2 +-
 t/exeext4.sh                                       |    2 +-
 t/exsource.sh                                      |    2 +-
 t/ext.sh                                           |    2 +-
 t/ext2.sh                                          |    2 +-
 t/extra-portability.sh                             |    2 +-
 t/extra-portability2.sh                            |    2 +-
 t/extra-programs-empty.sh                          |    2 +-
 t/extra.sh                                         |    2 +-
 t/extra10.sh                                       |    2 +-
 t/extra11.sh                                       |    2 +-
 t/extra12.sh                                       |    2 +-
 t/extra2.sh                                        |    2 +-
 t/extra3.sh                                        |    2 +-
 t/extra4.sh                                        |    2 +-
 t/extra5.sh                                        |    2 +-
 t/extra6.sh                                        |    2 +-
 t/extra7.sh                                        |    2 +-
 t/extra8.sh                                        |    2 +-
 t/extra9.sh                                        |    2 +-
 t/extradep.sh                                      |    2 +-
 t/extradep2.sh                                     |    2 +-
 t/f90only.sh                                       |    2 +-
 t/flavor.sh                                        |    2 +-
 t/flibs.sh                                         |    2 +-
 t/fn99.sh                                          |    2 +-
 t/fn99subdir.sh                                    |    2 +-
 t/fonly.sh                                         |    2 +-
 t/forcemiss.sh                                     |    2 +-
 t/forcemiss2.sh                                    |    2 +-
 t/fort1.sh                                         |    2 +-
 t/fort2.sh                                         |    2 +-
 t/fort4.sh                                         |    2 +-
 t/fort5.sh                                         |    2 +-
 t/fortdep.sh                                       |    2 +-
 t/gcj.sh                                           |    2 +-
 t/gcj2.sh                                          |    2 +-
 t/gcj3.sh                                          |    2 +-
 t/gcj4.sh                                          |    2 +-
 t/gcj5.sh                                          |    2 +-
 t/gcj6.sh                                          |    2 +-
 t/get-sysconf.sh                                   |    2 +-
 t/gettext-config-rpath.sh                          |    2 +-
 t/gettext-macros.sh                                |    2 +-
 t/gettext-pr381.sh                                 |    2 +-
 t/gettext.sh                                       |    2 +-
 t/gettext2.sh                                      |    2 +-
 t/gettext3.sh                                      |    2 +-
 t/gmake-vars.sh                                    |    2 +-
 t/gnits.sh                                         |    2 +-
 t/gnits2.sh                                        |    2 +-
 t/gnits3.sh                                        |    2 +-
 t/gnumake.sh                                       |    2 +-
 t/gnuwarn.sh                                       |    2 +-
 t/gnuwarn2.sh                                      |    2 +-
 t/hdr-vars-defined-once.sh                         |    2 +-
 t/header.sh                                        |    2 +-
 t/help-depend.sh                                   |    2 +-
 t/help-depend2.sh                                  |    2 +-
 t/help-dmalloc.sh                                  |    2 +-
 t/help-init.sh                                     |    2 +-
 t/help-lispdir.sh                                  |    2 +-
 t/help-python.sh                                   |    2 +-
 t/help-silent.sh                                   |    2 +-
 t/help-upc.sh                                      |    2 +-
 t/help.sh                                          |    2 +-
 t/help2.sh                                         |    2 +-
 t/help3.sh                                         |    2 +-
 t/help4.sh                                         |    2 +-
 t/hfs.sh                                           |    2 +-
 t/implicit.sh                                      |    2 +-
 t/init.sh                                          |    2 +-
 t/init2.sh                                         |    2 +-
 t/insh2.sh                                         |    2 +-
 t/install-info-dir.sh                              |    2 +-
 t/install2.sh                                      |    2 +-
 t/installdir.sh                                    |    2 +-
 t/instdat.sh                                       |    2 +-
 t/instdat2.sh                                      |    2 +-
 t/instdir-cond.sh                                  |    2 +-
 t/instdir-cond2.sh                                 |    2 +-
 t/instdir-java.sh                                  |    2 +-
 t/instdir-lisp.sh                                  |    2 +-
 t/instdir-ltlib.sh                                 |    2 +-
 t/instdir-no-empty.sh                              |    2 +-
 t/instdir-prog.sh                                  |    2 +-
 t/instdir-python.sh                                |    2 +-
 t/instdir-texi.sh                                  |    2 +-
 t/instdir.sh                                       |    2 +-
 t/instdir2.sh                                      |    2 +-
 t/instfail-info.sh                                 |    2 +-
 t/instfail-java.sh                                 |    2 +-
 t/instfail-libtool.sh                              |    2 +-
 t/instfail.sh                                      |    2 +-
 t/insthook.sh                                      |    2 +-
 t/instman.sh                                       |    2 +-
 t/instmany-mans.sh                                 |    2 +-
 t/instmany-python.sh                               |    2 +-
 t/instmany.sh                                      |    2 +-
 t/instsh.sh                                        |    2 +-
 t/instsh2.sh                                       |    2 +-
 t/instsh3.sh                                       |    2 +-
 t/instspc.tap                                      |    2 +-
 t/internals.tap                                    |    2 +-
 t/interp.sh                                        |    2 +-
 t/interp2.sh                                       |    2 +-
 t/interp3.sh                                       |    2 +-
 t/java-check.sh                                    |    2 +-
 t/java-clean.sh                                    |    2 +-
 t/java-compile-install.sh                          |    2 +-
 t/java-compile-run-flat.sh                         |    2 +-
 t/java-compile-run-nested.sh                       |    2 +-
 t/java-empty-classpath.sh                          |    2 +-
 t/java-extra.sh                                    |    2 +-
 t/java-mix.sh                                      |    2 +-
 t/java-no-duplicate.sh                             |    2 +-
 t/java-nobase.sh                                   |    2 +-
 t/java-noinst.sh                                   |    2 +-
 t/java-rebuild.sh                                  |    2 +-
 t/java-sources.sh                                  |    2 +-
 t/java-uninstall.sh                                |    2 +-
 t/java.sh                                          |    2 +-
 t/java2.sh                                         |    2 +-
 t/java3.sh                                         |    2 +-
 t/javadir-undefined.sh                             |    2 +-
 t/javaflags.sh                                     |    2 +-
 t/javaprim.sh                                      |    2 +-
 t/javasubst.sh                                     |    2 +-
 t/ldadd.sh                                         |    2 +-
 t/ldflags.sh                                       |    2 +-
 t/lex-clean-cxx.sh                                 |    2 +-
 t/lex-clean.sh                                     |    2 +-
 t/lex-depend-cxx.sh                                |    2 +-
 t/lex-depend-grep.sh                               |    2 +-
 t/lex-depend.sh                                    |    2 +-
 t/lex-header.sh                                    |    2 +-
 t/lex-lib-external.sh                              |    2 +-
 t/lex-lib.sh                                       |    2 +-
 t/lex-libobj.sh                                    |    2 +-
 t/lex-line.sh                                      |    2 +-
 t/lex-nodist.sh                                    |    2 +-
 t/lex-noyywrap.sh                                  |    2 +-
 t/lex-subobj-nodep.sh                              |    2 +-
 t/lex.sh                                           |    2 +-
 t/lex2.sh                                          |    2 +-
 t/lex3.sh                                          |    2 +-
 t/lex5.sh                                          |    2 +-
 t/lexcpp.sh                                        |    2 +-
 t/lexvpath.sh                                      |    2 +-
 t/lflags.sh                                        |    2 +-
 t/lflags2.sh                                       |    2 +-
 t/libexec.sh                                       |    2 +-
 t/libobj-basic.sh                                  |    2 +-
 t/libobj10.sh                                      |    2 +-
 t/libobj12.sh                                      |    2 +-
 t/libobj13.sh                                      |    2 +-
 t/libobj14.sh                                      |    2 +-
 t/libobj15a.sh                                     |    2 +-
 t/libobj15b.sh                                     |    2 +-
 t/libobj15c.sh                                     |    2 +-
 t/libobj16a.sh                                     |    2 +-
 t/libobj16b.sh                                     |    2 +-
 t/libobj17.sh                                      |    2 +-
 t/libobj18.sh                                      |    2 +-
 t/libobj19.sh                                      |    2 +-
 t/libobj2.sh                                       |    2 +-
 t/libobj20b.sh                                     |    2 +-
 t/libobj20c.sh                                     |    2 +-
 t/libobj3.sh                                       |    2 +-
 t/libobj4.sh                                       |    2 +-
 t/libobj5.sh                                       |    2 +-
 t/libobj7.sh                                       |    2 +-
 t/library.sh                                       |    2 +-
 t/library2.sh                                      |    2 +-
 t/library3.sh                                      |    2 +-
 t/libtoo10.sh                                      |    2 +-
 t/libtoo11.sh                                      |    2 +-
 t/libtool-macros.sh                                |    2 +-
 t/libtool3.sh                                      |    2 +-
 t/libtool4.sh                                      |    2 +-
 t/libtool5.sh                                      |    2 +-
 t/libtool6.sh                                      |    2 +-
 t/libtool7.sh                                      |    2 +-
 t/libtool8.sh                                      |    2 +-
 t/libtool9.sh                                      |    2 +-
 t/license.sh                                       |    2 +-
 t/license2.sh                                      |    2 +-
 t/link_c_cxx.sh                                    |    2 +-
 t/link_cond.sh                                     |    2 +-
 t/link_dist.sh                                     |    2 +-
 t/link_f90_only.sh                                 |    2 +-
 t/link_f_only.sh                                   |    2 +-
 t/link_fc.sh                                       |    2 +-
 t/link_fccxx.sh                                    |    2 +-
 t/link_fcxx.sh                                     |    2 +-
 t/link_override.sh                                 |    2 +-
 t/lisp-flags.sh                                    |    2 +-
 t/lisp-loadpath.sh                                 |    2 +-
 t/lisp-pr11806.sh                                  |    2 +-
 t/lisp-subdir-mix.sh                               |    2 +-
 t/lisp-subdir.sh                                   |    2 +-
 t/lisp-subdir2.sh                                  |    2 +-
 t/lisp2.sh                                         |    2 +-
 t/lisp3.sh                                         |    2 +-
 t/lisp4.sh                                         |    2 +-
 t/lisp5.sh                                         |    2 +-
 t/lisp6.sh                                         |    2 +-
 t/lisp7.sh                                         |    2 +-
 t/lisp8.sh                                         |    2 +-
 t/lispdry.sh                                       |    2 +-
 t/listval.sh                                       |    2 +-
 t/local-targets.sh                                 |    2 +-
 t/location.sh                                      |    2 +-
 t/longlin2.sh                                      |    2 +-
 t/longline.sh                                      |    2 +-
 t/ltcond.sh                                        |    2 +-
 t/ltcond2.sh                                       |    2 +-
 t/ltconv.sh                                        |    2 +-
 t/ltdeps.sh                                        |    2 +-
 t/ltinit.sh                                        |    2 +-
 t/ltinstloc.sh                                     |    2 +-
 t/ltlibobjs.sh                                     |    2 +-
 t/ltorder.sh                                       |    2 +-
 t/m4-inclusion.sh                                  |    2 +-
 t/maintclean-vpath.sh                              |    2 +-
 t/maintclean.sh                                    |    2 +-
 t/make-dryrun.tap                                  |    2 +-
 t/makefile-deps.sh                                 |    2 +-
 t/makej.sh                                         |    2 +-
 t/makej2.sh                                        |    2 +-
 t/maken.sh                                         |    2 +-
 t/maken3.sh                                        |    2 +-
 t/makevars.sh                                      |    2 +-
 t/man.sh                                           |    2 +-
 t/man2.sh                                          |    2 +-
 t/man3.sh                                          |    2 +-
 t/man5.sh                                          |    2 +-
 t/man6.sh                                          |    2 +-
 t/man7.sh                                          |    2 +-
 t/man8.sh                                          |    2 +-
 t/mdate.sh                                         |    2 +-
 t/mdate2.sh                                        |    2 +-
 t/mdate3.sh                                        |    2 +-
 t/mdate5.sh                                        |    2 +-
 t/mdate6.sh                                        |    2 +-
 t/memoize.tap                                      |    2 +-
 t/missing-auxfile-stops-makefiles-creation.sh      |    2 +-
 t/missing-version-mismatch.sh                      |    2 +-
 t/missing3.sh                                      |    2 +-
 t/mkdir_p.sh                                       |    2 +-
 t/mkinst2.sh                                       |    2 +-
 t/mkinst3.sh                                       |    2 +-
 t/no-c.tap                                         |    2 +-
 t/no-extra-makefile-code.sh                        |    2 +-
 t/{bsource.sh => no-spurious-install-recursive.sh} |    2 +-
 t/nobase-libtool.sh                                |    2 +-
 t/nobase-nodist.sh                                 |    2 +-
 t/nobase-python.sh                                 |    2 +-
 t/nobase.sh                                        |    2 +-
 t/nodef.sh                                         |    2 +-
 t/nodef2.sh                                        |    2 +-
 t/nodep2.sh                                        |    2 +-
 t/nodepcomp.sh                                     |    2 +-
 t/nodist.sh                                        |    2 +-
 t/nodist2.sh                                       |    2 +-
 t/nodist3.sh                                       |    2 +-
 t/noinst.sh                                        |    2 +-
 t/noinstdir.sh                                     |    2 +-
 t/nolink.sh                                        |    2 +-
 t/nostdinc.sh                                      |   12 +++---
 t/notrans.sh                                       |    2 +-
 t/number.sh                                        |    2 +-
 t/objc-basic.sh                                    |    2 +-
 t/objc-deps.sh                                     |    2 +-
 t/objc-flags.sh                                    |    2 +-
 t/objc-megademo.sh                                 |    2 +-
 t/objc-minidemo.sh                                 |    2 +-
 t/objcxx-basic.sh                                  |    2 +-
 t/objcxx-deps.sh                                   |    2 +-
 t/objcxx-flags.sh                                  |    2 +-
 t/objcxx-minidemo.sh                               |    2 +-
 t/objdir.sh                                        |    2 +-
 t/objext-pr10128.sh                                |    2 +-
 t/oldvars.sh                                       |    2 +-
 t/option-ng.sh                                     |    2 +-
 t/order.sh                                         |    2 +-
 t/output-order.sh                                  |    2 +-
 t/output.sh                                        |    2 +-
 t/output10.sh                                      |    2 +-
 t/output11.sh                                      |    2 +-
 t/output12.sh                                      |    2 +-
 t/output13.sh                                      |    2 +-
 t/output2.sh                                       |    2 +-
 t/output3.sh                                       |    2 +-
 t/output4.sh                                       |    2 +-
 t/output5.sh                                       |    2 +-
 t/output6.sh                                       |    2 +-
 t/output7.sh                                       |    2 +-
 t/output8.sh                                       |    2 +-
 t/output9.sh                                       |    2 +-
 t/override-conditional-1.sh                        |    2 +-
 t/override-conditional-2.sh                        |    2 +-
 t/override-html.sh                                 |    2 +-
 t/override-suggest-local.sh                        |    2 +-
 t/parallel-tests-basics.sh                         |    2 +-
 t/parallel-tests-concatenated-suffix.sh            |    2 +-
 t/parallel-tests-concurrency-2.sh                  |    2 +-
 t/parallel-tests-concurrency.sh                    |    2 +-
 t/parallel-tests-console-output.sh                 |    2 +-
 t/parallel-tests-driver-install.sh                 |    2 +-
 t/parallel-tests-dry-run-1.sh                      |    2 +-
 t/parallel-tests-dry-run-2.sh                      |    2 +-
 t/parallel-tests-dynamic.sh                        |    2 +-
 t/parallel-tests-empty.sh                          |    2 +-
 t/parallel-tests-exeext.sh                         |    2 +-
 t/parallel-tests-exit-statuses.sh                  |    2 +-
 t/parallel-tests-extra-programs.sh                 |    2 +-
 t/parallel-tests-fd-redirect-exeext.sh             |    2 +-
 t/parallel-tests-fd-redirect.sh                    |    2 +-
 t/parallel-tests-fork-bomb.sh                      |    2 +-
 t/parallel-tests-generated-and-distributed.sh      |    2 +-
 t/parallel-tests-harderror.sh                      |    2 +-
 t/parallel-tests-interrupt.tap                     |    2 +-
 t/parallel-tests-log-compiler-1.sh                 |    2 +-
 t/parallel-tests-log-compiler-2.sh                 |    2 +-
 t/parallel-tests-log-override.sh                   |    2 +-
 t/parallel-tests-logvars-example.sh                |    2 +-
 t/parallel-tests-longest-stem.sh                   |    2 +-
 t/parallel-tests-many.sh                           |    2 +-
 t/parallel-tests-no-color-in-log.sh                |    2 +-
 t/parallel-tests-no-repeat.sh                      |    2 +-
 t/parallel-tests-once.sh                           |    2 +-
 t/parallel-tests-per-suffix-deps.sh                |    2 +-
 t/parallel-tests-recheck-depends-on-all.sh         |    2 +-
 t/parallel-tests-recheck-pr11791.sh                |    2 +-
 t/parallel-tests-recheck.sh                        |    2 +-
 t/parallel-tests-reset-term.sh                     |    2 +-
 t/parallel-tests-srcdir-in-test-name.sh            |    2 +-
 t/parallel-tests-subdir.sh                         |    2 +-
 t/parallel-tests-suffix-prog.sh                    |    2 +-
 t/parallel-tests-suffix.sh                         |    2 +-
 t/parallel-tests-trailing-bslash.sh                |    2 +-
 t/parallel-tests-trailing-whitespace.sh            |    2 +-
 t/parallel-tests-unreadable.sh                     |    2 +-
 t/parse.sh                                         |    2 +-
 t/pattern-rules.sh                                 |    2 +-
 t/pattern-rules2.sh                                |    2 +-
 t/per-target-flags.sh                              |   25 +++++++++---
 t/perf/cond.sh                                     |    2 +-
 t/perf/testsuite-recheck.sh                        |    2 +-
 t/perf/testsuite-summary.sh                        |    2 +-
 t/phony.sh                                         |    2 +-
 t/pluseq.sh                                        |    2 +-
 t/pluseq10.sh                                      |    2 +-
 t/pluseq11.sh                                      |    2 +-
 t/pluseq2.sh                                       |    2 +-
 t/pluseq3.sh                                       |    2 +-
 t/pluseq4.sh                                       |    2 +-
 t/pluseq5.sh                                       |    2 +-
 t/pluseq6.sh                                       |    2 +-
 t/pluseq7.sh                                       |    2 +-
 t/pluseq8.sh                                       |    2 +-
 t/pluseq9.sh                                       |    2 +-
 t/posixsubst-data.sh                               |    2 +-
 t/posixsubst-extradist.sh                          |    2 +-
 t/posixsubst-ldadd.sh                              |    2 +-
 t/posixsubst-libraries.sh                          |    2 +-
 t/posixsubst-ltlibraries.sh                        |    2 +-
 t/posixsubst-programs.sh                           |    2 +-
 t/posixsubst-scripts.sh                            |    2 +-
 t/posixsubst-sources.sh                            |    2 +-
 t/ppf77.sh                                         |    2 +-
 t/pr2.sh                                           |    2 +-
 t/pr211.sh                                         |    2 +-
 t/pr220.sh                                         |    2 +-
 t/pr224.sh                                         |    2 +-
 t/pr229.sh                                         |    2 +-
 t/pr279-2.sh                                       |    2 +-
 t/pr279.sh                                         |    2 +-
 t/pr287.sh                                         |    2 +-
 t/pr300-lib.sh                                     |    2 +-
 t/pr300-ltlib.sh                                   |    2 +-
 t/pr300-prog.sh                                    |    2 +-
 t/pr307.sh                                         |    2 +-
 t/pr401.sh                                         |    2 +-
 t/pr401b.sh                                        |    2 +-
 t/pr401c.sh                                        |    2 +-
 t/pr72.sh                                          |    2 +-
 t/pr87.sh                                          |    2 +-
 t/pr9.sh                                           |    2 +-
 t/prefix.sh                                        |    2 +-
 t/primary-prefix-couples-documented-valid.sh       |    2 +-
 t/primary-prefix-couples-force-valid.sh            |    2 +-
 t/primary-prefix-invalid-couples.tap               |    2 +-
 t/primary-prefix-valid-couples.sh                  |    2 +-
 t/primary.sh                                       |    2 +-
 t/primary2.sh                                      |    2 +-
 t/primary3.sh                                      |    2 +-
 t/print-libdir.sh                                  |    2 +-
 t/proginst.sh                                      |    2 +-
 t/programs-primary-rewritten.sh                    |    2 +-
 t/py-compile-basedir.sh                            |    2 +-
 t/py-compile-basic.sh                              |    2 +-
 t/py-compile-basic2.sh                             |    2 +-
 t/py-compile-destdir.sh                            |    2 +-
 t/py-compile-env.sh                                |    2 +-
 t/py-compile-option-terminate.sh                   |    2 +-
 t/py-compile-usage.sh                              |    2 +-
 t/python-am-path-iftrue.sh                         |    2 +-
 t/python-dist.sh                                   |    2 +-
 t/python-missing.sh                                |    2 +-
 t/python-pr10995.sh                                |    2 +-
 t/python-too-old.sh                                |    2 +-
 t/python-vars.sh                                   |    2 +-
 t/python-virtualenv.sh                             |    2 +-
 t/python.sh                                        |    2 +-
 t/python10.sh                                      |    2 +-
 t/python11.sh                                      |    2 +-
 t/python12.sh                                      |    2 +-
 t/python2.sh                                       |    2 +-
 t/python3.sh                                       |    2 +-
 t/recurs-user-deeply-nested.sh                     |    2 +-
 t/recurs-user-indir.sh                             |    2 +-
 t/recurs-user-keep-going.sh                        |    2 +-
 t/recurs-user-many.sh                              |    2 +-
 t/recurs-user-no-subdirs.sh                        |    2 +-
 t/recurs-user-no-top-level.sh                      |    2 +-
 t/recurs-user-override.sh                          |    2 +-
 t/recurs-user-phony.sh                             |    2 +-
 t/recurs-user-wrap.sh                              |    2 +-
 t/recurs-user.sh                                   |    2 +-
 t/recurs-user2.sh                                  |    2 +-
 t/relativize.tap                                   |    2 +-
 t/remake-aclocal-version-mismatch.sh               |    2 +-
 t/remake-after-acinclude-m4.sh                     |    2 +-
 t/remake-after-aclocal-m4.sh                       |    2 +-
 t/remake-after-configure-ac.sh                     |    2 +-
 t/remake-after-makefile-am.sh                      |    2 +-
 t/remake-all-1.sh                                  |    2 +-
 t/remake-am-pr10111.sh                             |    2 +-
 t/remake-deeply-nested.sh                          |    2 +-
 t/remake-deleted-am-2.sh                           |    2 +-
 t/remake-deleted-am-subdir.sh                      |    2 +-
 t/remake-deleted-am.sh                             |    2 +-
 t/remake-deleted-m4-file.sh                        |    2 +-
 t/remake-fail.sh                                   |    2 +-
 t/remake-gnulib-add-acsubst.sh                     |    2 +-
 t/remake-gnulib-add-header.sh                      |    2 +-
 t/remake-gnulib-remove-header.sh                   |    2 +-
 t/remake-include-aclocal.sh                        |    2 +-
 t/remake-include-configure.sh                      |    2 +-
 t/remake-include-makefile.sh                       |    2 +-
 t/remake-m4-pr10111.sh                             |    2 +-
 t/remake-macrodir.sh                               |    2 +-
 t/remake-makefile-intree.sh                        |    2 +-
 t/remake-makefile-vpath.sh                         |    2 +-
 t/remake-mild-stress.sh                            |    2 +-
 t/remake-moved-m4-file.sh                          |    2 +-
 t/remake-not-after-make-dist.sh                    |    2 +-
 t/remake-recurs-user.sh                            |    2 +-
 t/remake-renamed-am.sh                             |    2 +-
 t/remake-renamed-m4-file.sh                        |    2 +-
 t/remake-renamed-m4-macro-and-file.sh              |    2 +-
 t/remake-renamed-m4-macro.sh                       |    2 +-
 t/remake-subdir-from-subdir.sh                     |    2 +-
 t/remake-subdir-gnu.sh                             |    2 +-
 t/remake-subdir-grepping.sh                        |    2 +-
 t/remake-subdir-long-time.sh                       |    2 +-
 t/remake-subdir-no-makefile.sh                     |    2 +-
 t/remake-subdir-only.sh                            |    2 +-
 t/remake-subdir.sh                                 |    2 +-
 t/remake-subdir3.sh                                |    2 +-
 t/remake-timing-bug-pr8365.sh                      |    2 +-
 t/repeated-options.sh                              |    2 +-
 t/req.sh                                           |    2 +-
 t/reqd.sh                                          |    2 +-
 t/reqd2.sh                                         |    2 +-
 t/rulepat.sh                                       |    2 +-
 t/sanity.sh                                        |    2 +-
 t/seenc.sh                                         |    2 +-
 t/self-check-configure-help.sh                     |    2 +-
 t/self-check-dir.tap                               |   10 ++--
 t/self-check-exit.tap                              |   20 +++++-----
 t/self-check-explicit-skips.sh                     |    4 +-
 t/self-check-is-blocked-signal.tap                 |    2 +-
 t/self-check-is_newest.tap                         |    2 +-
 t/self-check-me.tap                                |   10 ++--
 t/self-check-report.sh                             |    2 +-
 t/self-check-seq.tap                               |    2 +-
 t/self-check-unindent.tap                          |    2 +-
 t/serial-tests.sh                                  |    2 +-
 t/silent-configsite.sh                             |    2 +-
 t/silent-lex.sh                                    |    2 +-
 t/silent-many-gcc.sh                               |    2 +-
 t/silent-many-generic.sh                           |    2 +-
 t/silent-texi.sh                                   |    2 +-
 t/silent-yacc-headers.sh                           |    2 +-
 t/silent-yacc.sh                                   |    2 +-
 t/silent.sh                                        |    2 +-
 t/silent2.sh                                       |    2 +-
 t/silent3.sh                                       |    2 +-
 t/silent4.sh                                       |    2 +-
 t/silent6.sh                                       |    2 +-
 t/silent7.sh                                       |    2 +-
 t/silent9.sh                                       |    2 +-
 t/silentcxx-gcc.sh                                 |    2 +-
 t/silentcxx.sh                                     |    2 +-
 t/silentf77.sh                                     |    2 +-
 t/silentf90.sh                                     |    2 +-
 t/space.sh                                         |    2 +-
 t/specflg-dummy.sh                                 |    2 +-
 t/specflg6.sh                                      |    2 +-
 t/specflg7.sh                                      |    2 +-
 t/specflg8.sh                                      |    2 +-
 t/specflg9.sh                                      |    2 +-
 t/spell.sh                                         |    2 +-
 t/spell2.sh                                        |    2 +-
 t/spell3.sh                                        |    2 +-
 t/spelling.sh                                      |    2 +-
 t/spy-autovars.sh                                  |    2 +-
 t/spy-foreach.sh                                   |    2 +-
 t/spy-pattern-rules.sh                             |    2 +-
 t/spy-phony.sh                                     |    2 +-
 t/spy-rm.tap                                       |    2 +-
 t/spy-trailing-backlash.sh                         |    2 +-
 t/spy-var-append.sh                                |    2 +-
 t/spy-vpath-rewrite.sh                             |    2 +-
 t/spy-wildcard.sh                                  |    2 +-
 t/src-acsubst.sh                                   |    2 +-
 t/stamph2.sh                                       |    2 +-
 t/stdinc-no-repeated.sh                            |    2 +-
 t/stdinc.sh                                        |    2 +-
 t/stdlib.sh                                        |    2 +-
 t/stdlib2.sh                                       |    2 +-
 t/strictness-override.sh                           |    2 +-
 t/strictness-precedence.sh                         |    2 +-
 t/strip.sh                                         |    2 +-
 t/strip2.sh                                        |    2 +-
 t/strip3.sh                                        |    2 +-
 t/subdir-ac-subst.sh                               |    2 +-
 t/subdir-add-pr46.sh                               |    2 +-
 t/subdir-add2-pr46.sh                              |    2 +-
 t/subdir-am-cond.sh                                |    2 +-
 t/subdir-cond-err.sh                               |    2 +-
 t/subdir-cond-gettext.sh                           |    2 +-
 t/subdir-distclean.sh                              |    2 +-
 t/{subdir10.sh => subdir-env-interference.sh}      |    2 +-
 t/subdir-order.sh                                  |    2 +-
 t/subdir-subsub.sh                                 |    2 +-
 t/subdir-with-slash.sh                             |    2 +-
 t/subdir.sh                                        |    2 +-
 t/subobj-c.sh                                      |    2 +-
 t/subobj-clean-lt-pr10697.sh                       |    2 +-
 t/subobj-clean-pr10697.sh                          |    2 +-
 t/subobj-cxx-grep.sh                               |    2 +-
 t/subobj-cxx.sh                                    |    2 +-
 t/subobj-libtool.sh                                |    2 +-
 t/subobj10.sh                                      |    2 +-
 t/subobj11a.sh                                     |    2 +-
 t/subobj5.sh                                       |    2 +-
 t/subobj7.sh                                       |    2 +-
 t/subobj8.sh                                       |    2 +-
 t/subobj9.sh                                       |    2 +-
 t/subobjname.sh                                    |    2 +-
 t/subpkg-yacc.sh                                   |    2 +-
 t/subpkg.sh                                        |    2 +-
 t/subpkg2.sh                                       |    2 +-
 t/subpkg3.sh                                       |    2 +-
 t/subpkg4.sh                                       |    2 +-
 t/subst.sh                                         |    2 +-
 t/subst3.sh                                        |    2 +-
 t/subst4.sh                                        |    2 +-
 t/subst5.sh                                        |    2 +-
 t/substre2.sh                                      |    2 +-
 t/substref.sh                                      |    2 +-
 t/substtarg.sh                                     |    2 +-
 t/suffix-chain.sh                                  |    2 +-
 t/suffix-custom-default-ext.sh                     |    2 +-
 t/suffix-custom-link.sh                            |    2 +-
 ...ix13.sh => suffix-custom-subobj-and-specflg.sh} |    2 +-
 t/suffix-custom-subobj.sh                          |    2 +-
 t/suffix-custom.sh                                 |    2 +-
 t/suffix-hdr.sh                                    |    2 +-
 t/suffix-obj.sh                                    |    2 +-
 t/suffix-rules-old-fashioned.sh                    |    2 +-
 t/suffix.sh                                        |    2 +-
 t/suffix10.sh                                      |    2 +-
 t/suffix2.sh                                       |    2 +-
 t/suffix3.sh                                       |    2 +-
 t/suffix5.sh                                       |    2 +-
 t/suffix8.sh                                       |    2 +-
 t/suffix9.sh                                       |    2 +-
 t/symlink.sh                                       |    2 +-
 t/symlink2.sh                                      |    2 +-
 t/tags-id.sh                                       |    2 +-
 t/tags-pr12372.sh                                  |    2 +-
 t/tap-ambiguous-directive.sh                       |    2 +-
 t/tap-autonumber.sh                                |    2 +-
 t/tap-bad-prog.tap                                 |    2 +-
 t/tap-bailout-and-logging.sh                       |    2 +-
 t/tap-bailout-leading-space.sh                     |    2 +-
 t/tap-bailout-suppress-badexit.sh                  |    2 +-
 t/tap-bailout-suppress-later-diagnostic.sh         |    2 +-
 t/tap-bailout-suppress-later-errors.sh             |    2 +-
 t/tap-bailout.sh                                   |    2 +-
 t/tap-basic.sh                                     |    2 +-
 t/tap-color.sh                                     |    2 +-
 t/tap-common-setup.sh                              |    2 +-
 t/tap-deps.sh                                      |    2 +-
 t/tap-diagnostic-custom.sh                         |    2 +-
 t/tap-diagnostic.sh                                |    2 +-
 t/tap-doc.sh                                       |    2 +-
 t/tap-doc2.sh                                      |    2 +-
 t/tap-driver-stderr.sh                             |    2 +-
 t/tap-empty-diagnostic.sh                          |    2 +-
 t/tap-empty.sh                                     |    2 +-
 t/tap-escape-directive-2.sh                        |    2 +-
 t/tap-escape-directive.sh                          |    2 +-
 t/tap-exit.sh                                      |    2 +-
 t/tap-fancy.sh                                     |    2 +-
 t/tap-fancy2.sh                                    |    2 +-
 t/tap-global-log.sh                                |    2 +-
 t/tap-global-result.sh                             |    2 +-
 t/tap-lazy-check.sh                                |    2 +-
 t/tap-log.sh                                       |    2 +-
 t/tap-merge-stdout-stderr.sh                       |    2 +-
 t/tap-missing-plan-and-bad-exit.sh                 |    2 +-
 t/tap-more.sh                                      |    2 +-
 t/tap-more2.sh                                     |    2 +-
 t/tap-msg0-bailout.sh                              |    2 +-
 t/tap-msg0-directive.sh                            |    2 +-
 t/tap-msg0-misc.sh                                 |    2 +-
 t/tap-msg0-planskip.sh                             |    2 +-
 t/tap-msg0-result.sh                               |    2 +-
 t/tap-negative-numbers.sh                          |    2 +-
 t/tap-no-disable-hard-error.sh                     |    2 +-
 t/tap-no-merge-stdout-stderr.sh                    |    2 +-
 t/tap-no-spurious-numbers.sh                       |    2 +-
 t/tap-no-spurious.sh                               |    2 +-
 t/tap-not-ok-skip.sh                               |    2 +-
 t/tap-number-wordboundary.sh                       |    2 +-
 t/tap-numbers-leading-zero.sh                      |    2 +-
 t/tap-numeric-description.sh                       |    2 +-
 t/tap-out-of-order.sh                              |    2 +-
 t/tap-passthrough-exit.sh                          |    2 +-
 t/tap-passthrough.sh                               |    2 +-
 t/tap-plan-corner.sh                               |    2 +-
 t/tap-plan-errors.sh                               |    2 +-
 t/tap-plan-leading-zero.sh                         |    2 +-
 t/tap-plan-malformed.sh                            |    2 +-
 t/tap-plan-middle.sh                               |    2 +-
 t/tap-plan-whitespace.sh                           |    2 +-
 t/tap-plan.sh                                      |    2 +-
 t/tap-planskip-and-logging.sh                      |    2 +-
 t/tap-planskip-badexit.sh                          |    2 +-
 t/tap-planskip-bailout.sh                          |    2 +-
 t/tap-planskip-case-insensitive.sh                 |    2 +-
 t/tap-planskip-late.sh                             |    2 +-
 t/tap-planskip-later-errors.sh                     |    2 +-
 t/tap-planskip-unplanned-corner.sh                 |    2 +-
 t/tap-planskip-unplanned.sh                        |    2 +-
 t/tap-planskip-whitespace.sh                       |    2 +-
 t/tap-planskip.sh                                  |    2 +-
 t/tap-realtime.sh                                  |    2 +-
 t/tap-recheck.sh                                   |    2 +-
 t/tap-result-comment.sh                            |    2 +-
 t/tap-signal.tap                                   |    2 +-
 t/tap-test-number-0.sh                             |    2 +-
 t/tap-todo-skip-together.sh                        |    2 +-
 t/tap-todo-skip-whitespace.sh                      |    2 +-
 t/tap-todo-skip.sh                                 |    2 +-
 t/tap-unplanned.sh                                 |    2 +-
 t/tap-whitespace-normalization.sh                  |    2 +-
 t/tap-with-and-without-number.sh                   |    2 +-
 t/tap-xfail-tests.sh                               |    2 +-
 t/tar-override.sh                                  |    2 +-
 t/tar.sh                                           |    2 +-
 t/tar2.sh                                          |    2 +-
 t/tar3.sh                                          |    2 +-
 t/target-cflags.sh                                 |    2 +-
 t/targetclash.sh                                   |    2 +-
 t/test-driver-acsubst.sh                           |    2 +-
 t/test-driver-cond.sh                              |    2 +-
 t/test-driver-create-log-dir.sh                    |    2 +-
 t/test-driver-custom-multitest-recheck.sh          |    2 +-
 t/test-driver-custom-multitest-recheck2.sh         |    2 +-
 t/test-driver-custom-multitest.sh                  |    2 +-
 t/test-driver-custom-xfail-tests.sh                |    2 +-
 t/test-driver-custom.sh                            |    2 +-
 t/test-driver-fail.sh                              |    2 +-
 t/test-driver-is-distributed.sh                    |    2 +-
 t/test-driver-strip-vpath.sh                       |    2 +-
 t/test-extensions-cond.sh                          |    2 +-
 t/test-extensions-dynamic.sh                       |    2 +-
 t/test-extensions-funny-chars.sh                   |    2 +-
 t/test-extensions-invalid.sh                       |    2 +-
 t/test-harness-vpath-rewrite.sh                    |    2 +-
 t/test-log.sh                                      |    2 +-
 t/test-logs-repeated.sh                            |    2 +-
 t/test-metadata-global-log.sh                      |    2 +-
 t/test-metadata-global-result.sh                   |    2 +-
 t/test-metadata-recheck.sh                         |    2 +-
 t/test-metadata-results.sh                         |    2 +-
 t/test-missing.sh                                  |    2 +-
 t/test-trs-basic.sh                                |    2 +-
 t/test-trs-recover-parallel.sh                     |    2 +-
 t/test-trs-recover.sh                              |    2 +-
 t/tests-environment-and-log-compiler.sh            |    2 +-
 t/tests-environment-backcompat.sh                  |    2 +-
 t/tests-environment-fd-redirect.sh                 |    2 +-
 t/tests-environment.sh                             |    2 +-
 t/testsuite-summary-count-many.sh                  |    2 +-
 t/testsuite-summary-reference-log.sh               |    2 +-
 t/transform.sh                                     |    2 +-
 t/transform2.sh                                    |    2 +-
 t/transform3.sh                                    |    2 +-
 t/triplet.sh                                       |    2 +-
 t/txinfo-include.sh                                |    2 +-
 t/txinfo-no-clutter.sh                             |    2 +-
 t/txinfo-unrecognized-extension-2.sh               |    2 +-
 t/txinfo-unrecognized-extension.sh                 |    2 +-
 t/txinfo.sh                                        |    2 +-
 t/txinfo13.sh                                      |    2 +-
 t/txinfo16.sh                                      |    2 +-
 t/txinfo17.sh                                      |    2 +-
 t/txinfo2.sh                                       |    2 +-
 t/txinfo20.sh                                      |    2 +-
 t/txinfo21.sh                                      |    2 +-
 t/txinfo21b.sh                                     |    2 +-
 t/txinfo22.sh                                      |    2 +-
 t/txinfo23.sh                                      |    2 +-
 t/txinfo24.sh                                      |    2 +-
 t/txinfo25.sh                                      |    2 +-
 t/txinfo26.sh                                      |    2 +-
 t/txinfo27.sh                                      |    2 +-
 t/txinfo28.sh                                      |    2 +-
 t/txinfo29.sh                                      |    2 +-
 t/txinfo31.sh                                      |    2 +-
 t/txinfo32.sh                                      |    2 +-
 t/txinfo33.sh                                      |    2 +-
 t/txinfo4.sh                                       |    2 +-
 t/txinfo7.sh                                       |    2 +-
 t/txinfo8.sh                                       |    2 +-
 t/uninstall-fail.sh                                |    2 +-
 t/uninstall-pr9578.sh                              |    2 +-
 t/unused.sh                                        |    2 +-
 t/upc.sh                                           |    2 +-
 t/upc2.sh                                          |    2 +-
 t/upc3.sh                                          |    2 +-
 t/vala-headers.sh                                  |    2 +-
 t/vala-libs.sh                                     |    2 +-
 t/vala-mix.sh                                      |    2 +-
 t/vala-mix2.sh                                     |    2 +-
 t/vala-parallel.sh                                 |    2 +-
 t/vala-vapi.sh                                     |    2 +-
 t/vala-vpath.sh                                    |    2 +-
 t/vala.sh                                          |    2 +-
 t/vala2.sh                                         |    2 +-
 t/vala3.sh                                         |    2 +-
 t/vala4.sh                                         |    2 +-
 t/vala5.sh                                         |    2 +-
 t/var-recurs.sh                                    |    2 +-
 t/var-recurs2.sh                                   |    2 +-
 t/var-undef-append.sh                              |    2 +-
 t/vars-assign.sh                                   |    2 +-
 t/vars.sh                                          |    2 +-
 t/vartar.sh                                        |    2 +-
 t/vartypos-deps.sh                                 |    2 +-
 t/vartypos-whitelist.sh                            |    2 +-
 t/vartypos.sh                                      |    2 +-
 t/verbatim.sh                                      |    2 +-
 t/version3.sh                                      |    2 +-
 t/version4.sh                                      |    2 +-
 t/version6.sh                                      |    2 +-
 t/version7.sh                                      |    2 +-
 t/version8.sh                                      |    2 +-
 t/vpath-built-sources.sh                           |    2 +-
 t/vpath-rewrite.sh                                 |    2 +-
 t/vpath.sh                                         |    2 +-
 t/vtexi.sh                                         |    2 +-
 t/vtexi2.sh                                        |    2 +-
 t/vtexi3.sh                                        |    2 +-
 t/vtexi4.sh                                        |    2 +-
 t/warning-groups-win-over-strictness.sh            |    2 +-
 t/warnings-obsolete-default.sh                     |    2 +-
 t/warnings-override.sh                             |    2 +-
 t/warnings-precedence.sh                           |    2 +-
 t/warnings-strictness-interactions.sh              |    2 +-
 t/warnings-unknown.sh                              |    2 +-
 t/warnings-win-over-strictness.sh                  |    2 +-
 t/warnopts.sh                                      |    2 +-
 t/werror.sh                                        |    2 +-
 t/werror2.sh                                       |    2 +-
 t/werror3.sh                                       |    2 +-
 t/werror4.sh                                       |    2 +-
 t/whoami.sh                                        |    2 +-
 t/xsource.sh                                       |    2 +-
 t/yacc-auxdir.sh                                   |    2 +-
 t/yacc-basic.sh                                    |    2 +-
 t/yacc-bison-skeleton-cxx.sh                       |    2 +-
 t/yacc-bison-skeleton.sh                           |    2 +-
 t/yacc-clean-cxx.sh                                |    2 +-
 t/yacc-clean.sh                                    |    2 +-
 t/yacc-cxx.sh                                      |    2 +-
 t/yacc-d-basic.sh                                  |    2 +-
 t/yacc-d-cxx.sh                                    |    2 +-
 t/yacc-d-vpath.sh                                  |    2 +-
 t/yacc-deleted-headers.sh                          |    2 +-
 t/yacc-depend.sh                                   |    2 +-
 t/yacc-depend2.sh                                  |    2 +-
 t/yacc-dist-nobuild-subdir.sh                      |    2 +-
 t/yacc-dist-nobuild.sh                             |    2 +-
 t/{yacc2.sh => yacc-grepping.sh}                   |   18 ++++++--
 t/{yacc5.sh => yacc-grepping2.sh}                  |    2 +-
 t/{yacc7.sh => yacc-headers-and-dist-pr47.sh}      |    2 +-
 t/yacc-lex-cxx-alone.sh                            |    2 +-
 t/yacc-line.sh                                     |    2 +-
 t/yacc-mix-c-cxx.sh                                |    2 +-
 t/yacc-nodist.sh                                   |    2 +-
 t/{yacc8.sh => yacc-subdir.sh}                     |    2 +-
 t/yacc-subobj-nodep.sh                             |    2 +-
 t/yacc-weirdnames.sh                               |    2 +-
 t/yacc.sh                                          |   37 -----------------
 t/yacc4.sh                                         |    2 +-
 t/yaccdry.sh                                       |    2 +-
 t/yaccpp.sh                                        |    2 +-
 t/yaccvpath.sh                                     |    2 +-
 t/yflags-cmdline-override.sh                       |    2 +-
 t/yflags-conditional.sh                            |    2 +-
 t/yflags-d-false-positives.sh                      |    2 +-
 t/yflags-force-conditional.sh                      |    2 +-
 t/yflags-force-override.sh                         |    2 +-
 t/yflags-var-expand.sh                             |    2 +-
 t/yflags.sh                                        |    2 +-
 t/yflags2.sh                                       |    2 +-
 1198 files changed, 1292 insertions(+), 1313 deletions(-)
 delete mode 100644 defs
 rename t/{bsource.sh => no-spurious-install-recursive.sh} (98%)
 rename t/{subdir10.sh => subdir-env-interference.sh} (98%)
 rename t/{suffix13.sh => suffix-custom-subobj-and-specflg.sh} (98%)
 rename t/{yacc2.sh => yacc-grepping.sh} (79%)
 rename t/{yacc5.sh => yacc-grepping2.sh} (98%)
 rename t/{yacc7.sh => yacc-headers-and-dist-pr47.sh} (98%)
 rename t/{yacc8.sh => yacc-subdir.sh} (99%)
 delete mode 100755 t/yacc.sh

diff --git a/configure.ac b/configure.ac
index ab64763..8c19d10 100644
--- a/configure.ac
+++ b/configure.ac
@@ -498,9 +498,11 @@ if test $am_CC_is_GNU = yes; then
 else
   AC_CHECK_TOOLS([GNU_CC], [gcc], [false])
 fi
-AS_IF([AM_RUN_LOG([$GNU_CC --version && $GNU_CC -v])], [],
-      [AC_MSG_WARN([botched installation for GNU C compiler])
-       _AM_SKIP_COMP_TESTS([GNU C])])
+if test "$GNU_CC" != false; then
+  AS_IF([AM_RUN_LOG([$GNU_CC --version && $GNU_CC -v])], [],
+        [AC_MSG_WARN([botched installation for GNU C compiler])
+         _AM_SKIP_COMP_TESTS([GNU C])])
+fi
 
 # GNU C++ compiler.
 AC_ARG_VAR([GNU_CXX],      [GNU C++ compiler])
@@ -512,9 +514,11 @@ if test $am_CXX_is_GNU = yes; then
 else
   AC_CHECK_TOOLS([GNU_CXX], [g++ gpp], [false])
 fi
-AS_IF([AM_RUN_LOG([$GNU_CXX --version && $GNU_CXX -v])], [],
-      [AC_MSG_WARN([botched installation for GNU C++ compiler])
-       _AM_SKIP_COMP_TESTS([GNU C++])])
+if test "$GNU_CXX" != false; then
+  AS_IF([AM_RUN_LOG([$GNU_CXX --version && $GNU_CXX -v])], [],
+        [AC_MSG_WARN([botched installation for GNU C++ compiler])
+         _AM_SKIP_COMP_TESTS([GNU C++])])
+fi
 
 # GNU Fortran compiler.
 AC_ARG_VAR([GNU_FC],      [GNU Fortran compiler])
@@ -526,9 +530,11 @@ if test $am_FC_is_GNU = yes; then
 else
   AC_CHECK_TOOLS([GNU_FC], [gfortran], [false])
 fi
-AS_IF([AM_RUN_LOG([$GNU_FC --version && $GNU_FC -v])], [],
-      [AC_MSG_WARN([botched installation for GNU Fortran compiler])
-       _AM_SKIP_COMP_TESTS([GNU Fortran])])
+if test "$GNU_FC" != false; then
+  AS_IF([AM_RUN_LOG([$GNU_FC --version && $GNU_FC -v])], [],
+        [AC_MSG_WARN([botched installation for GNU Fortran compiler])
+         _AM_SKIP_COMP_TESTS([GNU Fortran])])
+fi
 
 # GNU Fortran 77 compiler.
 AC_ARG_VAR([GNU_F77],    [GNU Fortran 77 compiler])
@@ -540,17 +546,21 @@ if test $am_F77_is_GNU = yes; then
 else
   AC_CHECK_TOOLS([GNU_F77], [g77 gfortran], [false])
 fi
-AS_IF([AM_RUN_LOG([$GNU_F77 --version && $GNU_F77 -v])], [],
-      [AC_MSG_WARN([botched installation for GNU Fortran 77 compiler])
-      _AM_SKIP_COMP_TESTS([GNU Fortran 77])])
+if test "$GNU_F77" != false; then
+  AS_IF([AM_RUN_LOG([$GNU_F77 --version && $GNU_F77 -v])], [],
+        [AC_MSG_WARN([botched installation for GNU Fortran 77 compiler])
+        _AM_SKIP_COMP_TESTS([GNU Fortran 77])])
+fi
 
 # GNU Java compiler.
 AC_ARG_VAR([GNU_GCJ], [GNU Java compiler])
 AC_ARG_VAR([GNU_GCJFLAGS], [GNU Java compiler flags])
 AC_CHECK_TOOLS([GNU_GCJ], [gcj], [false])
-AS_IF([AM_RUN_LOG([$GNU_GCJ --version && $GNU_GCJ -v])], [],
-      [AC_MSG_WARN([botched installation for GNU Java compiler])
-      _AM_SKIP_COMP_TESTS([GNU Java])])
+if test "$GNU_GCJ" != false; then
+  AS_IF([AM_RUN_LOG([$GNU_GCJ --version && $GNU_GCJ -v])], [],
+        [AC_MSG_WARN([botched installation for GNU Java compiler])
+        _AM_SKIP_COMP_TESTS([GNU Java])])
+fi
 
 # If we have been able to find at least a working compiler above, we
 # know what the object and executable extensions for this platform are.
@@ -566,9 +576,7 @@ AC_SUBST([EXEEXT])
 ## ---------------------- ##
 
 AC_CONFIG_FILES([Makefile])
-
 AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
-AC_CONFIG_LINKS([defs:defs])
 
 AC_CONFIG_FILES([t/wrap/aclocal-${APIVERSION}:t/wrap/aclocal.in],
                 [chmod +x t/wrap/aclocal-${APIVERSION}],
diff --git a/contrib/t/parallel-tests-html-recursive.sh 
b/contrib/t/parallel-tests-html-recursive.sh
index e58cca9..bf83576 100755
--- a/contrib/t/parallel-tests-html-recursive.sh
+++ b/contrib/t/parallel-tests-html-recursive.sh
@@ -16,7 +16,7 @@
 
 # Recursive use of 'check-html'.  See Automake bug#11287.
 
-. ./defs || exit 1
+. test-init.sh
 
 # Try the variants that are tried in check-html.am.
 while :; do
diff --git a/contrib/t/parallel-tests-html.sh b/contrib/t/parallel-tests-html.sh
index 6e853ab..cdbf86b 100755
--- a/contrib/t/parallel-tests-html.sh
+++ b/contrib/t/parallel-tests-html.sh
@@ -18,7 +18,7 @@
 #  - check-html
 #  - recheck-html
 
-. ./defs || exit 1
+. test-init.sh
 
 # Try the variants that are tried in check-html.am.
 while :; do
diff --git a/defs b/defs
deleted file mode 100644
index 586181e..0000000
--- a/defs
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- shell-script -*-
-#
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# This file is here for backward-compatibility with the existing
-# tests still unconverted to the use of 'test-init.sh'.  It should
-# eventually be removed, once all the tests have been converted.
-
-. test-init.sh
diff --git a/gen-testsuite-part b/gen-testsuite-part
index f5f5db6..fec499a 100755
--- a/gen-testsuite-part
+++ b/gen-testsuite-part
@@ -378,7 +378,7 @@ foreach my $lt (TRUE, FALSE)
               # Automatically generated test.  DO NOT EDIT BY HAND!
               @vars_init
               required="@required"
-              . ./defs || exit 1
+              . test-init.sh
               plan_ $planned
               . depcomp.sh
               exit \$?
diff --git a/syntax-checks.mk b/syntax-checks.mk
index 7662d6f..c6d5521 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -34,8 +34,7 @@ xtests := $(shell \
 xdefs = \
   $(srcdir)/t/ax/am-test-lib.sh \
   $(srcdir)/t/ax/test-lib.sh \
-  $(srcdir)/t/ax/test-defs.in \
-  $(srcdir)/defs
+  $(srcdir)/t/ax/test-defs.in
 
 ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '?*.am' -a -print)
 pms := $(dist_perllib_DATA)
@@ -73,10 +72,11 @@ sc_tests_no_make_e \
 sc_docs_no_make_e \
 sc_make_simple_include \
 sc_tests_make_simple_include \
+sc_tests_no_source_defs \
 sc_tests_obsolete_variables \
 sc_tests_here_document_format \
 sc_tests_command_subst \
-sc_tests_Exit_not_exit \
+sc_tests_exit_not_Exit \
 sc_tests_automake_fails \
 sc_tests_required_after_defs \
 sc_tests_plain_sleep \
@@ -490,15 +490,23 @@ sc_tests_command_subst:
          exit 1; \
        fi
 
-## Tests should no more call 'Exit', just 'exit'.  That's because we
+## Tests should no longer call 'Exit', just 'exit'.  That's because we
 ## now have in place a better workaround to ensure the exit status is
 ## transported correctly across the exit trap.
-sc_tests_Exit_not_exit:
+sc_tests_exit_not_Exit:
        @if grep 'Exit' $(xtests) $(xdefs) | grep -Ev '^[^:]+: *#' | grep .; 
then \
          echo "Use 'exit', not 'Exit'; it's obsolete now." 1>&2; \
          exit 1; \
        fi
 
+## Guard against obsolescent uses of ./defs in tests.  Now,
+## 'test-init.sh' should be used instead.
+sc_tests_no_source_defs:
+       @if grep -E '\. .*defs($$| )' $(xtests); then \
+         echo "Source 'test-init.sh', not './defs'." 1>&2; \
+         exit 1; \
+       fi
+
 ## Use AUTOMAKE_fails when appropriate
 sc_tests_automake_fails:
        @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*exit'; then \
diff --git a/t/acloca10.sh b/t/acloca10.sh
index d120352..b7d350b 100755
--- a/t/acloca10.sh
+++ b/t/acloca10.sh
@@ -24,7 +24,7 @@
 # TODO: puts third-party macros directly into 'acdir'.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
diff --git a/t/acloca11.sh b/t/acloca11.sh
index 3db8508..f24d4ed 100755
--- a/t/acloca11.sh
+++ b/t/acloca11.sh
@@ -18,7 +18,7 @@
 # directory, the macro from the lexically greatest file is used.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
diff --git a/t/acloca12.sh b/t/acloca12.sh
index 01acb02..d0d4016 100755
--- a/t/acloca12.sh
+++ b/t/acloca12.sh
@@ -19,7 +19,7 @@
 # Same as acloca11.sh, but without calling MACRO2.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/acloca13.sh b/t/acloca13.sh
index bffd4f1..cb4c8f6 100755
--- a/t/acloca13.sh
+++ b/t/acloca13.sh
@@ -16,7 +16,7 @@
 
 # Make sure changes to m4_included files also cause aclocal.m4 to change.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 m4_include([somefile.m4])
diff --git a/t/acloca14.sh b/t/acloca14.sh
index cc65214..c84023d 100755
--- a/t/acloca14.sh
+++ b/t/acloca14.sh
@@ -17,7 +17,7 @@
 # Make sure m4_included files are also scanned for definitions.
 # Report from Phil Edwards.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_MACRO_DIR([defs])
diff --git a/t/acloca14b.sh b/t/acloca14b.sh
index eb9105d..31a0540 100755
--- a/t/acloca14b.sh
+++ b/t/acloca14b.sh
@@ -17,7 +17,7 @@
 # Make sure m4_included files are also scanned for definitions.
 # Report from Phil Edwards.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_LIBTOOL
diff --git a/t/acloca15.sh b/t/acloca15.sh
index 38c6e3e..4ce34ab 100755
--- a/t/acloca15.sh
+++ b/t/acloca15.sh
@@ -18,7 +18,7 @@
 # PR/319.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 # Start macros with AM_ because that causes aclocal to complain if it
 # cannot find them.
diff --git a/t/acloca16.sh b/t/acloca16.sh
index a702f27..8387439 100755
--- a/t/acloca16.sh
+++ b/t/acloca16.sh
@@ -18,7 +18,7 @@
 # evaluated.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_SUBST([POM])
diff --git a/t/acloca17.sh b/t/acloca17.sh
index a15cd57..ed8fc32 100755
--- a/t/acloca17.sh
+++ b/t/acloca17.sh
@@ -17,7 +17,7 @@
 # Make sure aclocal report unused required macros.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
diff --git a/t/acloca18.sh b/t/acloca18.sh
index 8bdbd56..2e1cbb5 100755
--- a/t/acloca18.sh
+++ b/t/acloca18.sh
@@ -17,7 +17,7 @@
 # Test for --install with #serial numbers.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
diff --git a/t/acloca19.sh b/t/acloca19.sh
index c6d2352..502bc69 100755
--- a/t/acloca19.sh
+++ b/t/acloca19.sh
@@ -18,7 +18,7 @@
 # more than just variable definitions.
 # Report from Peter Breitenlohner (PR/450).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >configure.ac <<'END'
 AC_INIT([acloca19], [1.0])
diff --git a/t/acloca20.sh b/t/acloca20.sh
index b5881d6..c381dd7 100755
--- a/t/acloca20.sh
+++ b/t/acloca20.sh
@@ -17,7 +17,7 @@
 # Make sure aclocal does not write into symlinked aclocal.m4.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 echo 'm4_define([FOO], [wrong foo])' > foo.m4
 echo 'm4_define([FOO], [right foo])' > acinclude.m4
diff --git a/t/acloca21.sh b/t/acloca21.sh
index 2aca3f9..812f99b 100755
--- a/t/acloca21.sh
+++ b/t/acloca21.sh
@@ -20,7 +20,7 @@
 # an Autoconf macro.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 dnl m4_include(__some_really_bogus_nonexistent_file__.m4)
diff --git a/t/acloca22.sh b/t/acloca22.sh
index ea76579..1faf212 100755
--- a/t/acloca22.sh
+++ b/t/acloca22.sh
@@ -18,7 +18,7 @@
 # dependencies.  See also related the tests 'remake-deleted-m4-file.sh'
 # and 'remake-renamed-m4-macro-and-file.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_CONFIG_MACRO_DIR([.])
diff --git a/t/acloca22b.sh b/t/acloca22b.sh
index 0317b12..f280699 100755
--- a/t/acloca22b.sh
+++ b/t/acloca22b.sh
@@ -19,7 +19,7 @@
 # NOTE: this test works by using the obsolete 'ACLOCAL_AMFLAGS' make
 # variable; see sister test 'acloca22.test' for a modern equivalent.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 FOO
diff --git a/t/acloca23.sh b/t/acloca23.sh
index 2366fc4..071ddae 100755
--- a/t/acloca23.sh
+++ b/t/acloca23.sh
@@ -17,7 +17,7 @@
 # Ensure we diagnose underquoted AC_DEFUN's.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
diff --git a/t/aclocal-acdir.sh b/t/aclocal-acdir.sh
index ac5de4c..59182bb 100755
--- a/t/aclocal-acdir.sh
+++ b/t/aclocal-acdir.sh
@@ -18,7 +18,7 @@
 # check that stuff in the automake acdir takes precedence over stuff in
 # the system acdir.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir am sys
 
diff --git a/t/aclocal-amflags.sh b/t/aclocal-amflags.sh
index 47bf135..49bcf5f 100755
--- a/t/aclocal-amflags.sh
+++ b/t/aclocal-amflags.sh
@@ -18,7 +18,7 @@
 # Makefile.am still works.  Remove this test once support for this
 # obsolescent idiom is removed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 MACRO_FOO || AS_EXIT([1])
diff --git a/t/aclocal-autoconf-version-check.sh 
b/t/aclocal-autoconf-version-check.sh
index 8e02ae9..f5d8101 100755
--- a/t/aclocal-autoconf-version-check.sh
+++ b/t/aclocal-autoconf-version-check.sh
@@ -17,7 +17,7 @@
 # Make sure autoconf version checks in aclocal.m4 are robust.
 
 am_create_testdirs=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 m4_define([AC_AUTOCONF_VERSION], [9999a])
diff --git a/t/aclocal-install-absdir.sh b/t/aclocal-install-absdir.sh
index ada83c2..450bc74 100755
--- a/t/aclocal-install-absdir.sh
+++ b/t/aclocal-install-absdir.sh
@@ -19,7 +19,7 @@
 # ACLOCAL_PATH variable, it is clear that this is the right thing
 # to do.  See also automake bug#8407.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir loc sys
 
diff --git a/t/aclocal-install-fail.sh b/t/aclocal-install-fail.sh
index 99fa77a..f0cb573 100755
--- a/t/aclocal-install-fail.sh
+++ b/t/aclocal-install-fail.sh
@@ -19,7 +19,7 @@
 
 am_create_testdir=empty
 required=ro-dir
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/aclocal-install-mkdir.sh b/t/aclocal-install-mkdir.sh
index 43eec37..57bfd69 100755
--- a/t/aclocal-install-mkdir.sh
+++ b/t/aclocal-install-mkdir.sh
@@ -19,7 +19,7 @@
 # FIXME: this is a good candidate for a conversion to TAP.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/aclocal-macrodir.tap b/t/aclocal-macrodir.tap
index c35d9e0..3daedad 100755
--- a/t/aclocal-macrodir.tap
+++ b/t/aclocal-macrodir.tap
@@ -18,7 +18,7 @@
 # aclocal.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 plan_ later
 
diff --git a/t/aclocal-no-install-no-mkdir.sh b/t/aclocal-no-install-no-mkdir.sh
index 5b47768..58dafb9 100755
--- a/t/aclocal-no-install-no-mkdir.sh
+++ b/t/aclocal-no-install-no-mkdir.sh
@@ -18,7 +18,7 @@
 # if the '--install' option is not given.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/aclocal-path-install-serial.sh b/t/aclocal-path-install-serial.sh
index 683845c..c3f0c8a 100755
--- a/t/aclocal-path-install-serial.sh
+++ b/t/aclocal-path-install-serial.sh
@@ -18,7 +18,7 @@
 # are involved.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
diff --git a/t/aclocal-path-install.sh b/t/aclocal-path-install.sh
index ccad30b..eb10f99 100755
--- a/t/aclocal-path-install.sh
+++ b/t/aclocal-path-install.sh
@@ -17,7 +17,7 @@
 # ACLOCAL_PATH and '--install' interactions.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
diff --git a/t/aclocal-path-nonexistent.sh b/t/aclocal-path-nonexistent.sh
index ad8d5b7..df1bae1 100755
--- a/t/aclocal-path-nonexistent.sh
+++ b/t/aclocal-path-nonexistent.sh
@@ -17,7 +17,7 @@
 # Non-existent directories in ACLOCAL_PATH are ok.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
diff --git a/t/aclocal-path-precedence.sh b/t/aclocal-path-precedence.sh
index 220533e..0545231 100755
--- a/t/aclocal-path-precedence.sh
+++ b/t/aclocal-path-precedence.sh
@@ -17,7 +17,7 @@
 # Check precedence rules for ACLOCAL_PATH.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([foo], [1.0])
diff --git a/t/aclocal-path.sh b/t/aclocal-path.sh
index c22a7c4..a4ee3ee 100755
--- a/t/aclocal-path.sh
+++ b/t/aclocal-path.sh
@@ -17,7 +17,7 @@
 # Check basic ACLOCAL_PATH support.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
diff --git a/t/aclocal-print-acdir.sh b/t/aclocal-print-acdir.sh
index c5a8eb5..440bb72 100755
--- a/t/aclocal-print-acdir.sh
+++ b/t/aclocal-print-acdir.sh
@@ -17,7 +17,7 @@
 # Test on aclocal's '--print-ac-dir' option.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 $ACLOCAL --print-ac-dir
 test "$($ACLOCAL --print-ac-dir)" = "$am_system_acdir"
diff --git a/t/aclocal-verbose-install.sh b/t/aclocal-verbose-install.sh
index 27fa0c5..b598bb8 100755
--- a/t/aclocal-verbose-install.sh
+++ b/t/aclocal-verbose-install.sh
@@ -17,7 +17,7 @@
 # Check verbose messages by 'aclocal --install'.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/aclocal.sh b/t/aclocal.sh
index d99da5f..3234496 100755
--- a/t/aclocal.sh
+++ b/t/aclocal.sh
@@ -17,7 +17,7 @@
 # Test on some aclocal options.  Report from Alexandre Oliva.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 echo "AC_INIT([$me], [0]) AM_INIT_AUTOMAKE" > configure.ac
 
diff --git a/t/aclocal3.sh b/t/aclocal3.sh
index 03aa42d..ce93251 100755
--- a/t/aclocal3.sh
+++ b/t/aclocal3.sh
@@ -17,7 +17,7 @@
 # Test to make sure include of include detects missing macros
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/aclocal4.sh b/t/aclocal4.sh
index 9bed718..e5dd863 100755
--- a/t/aclocal4.sh
+++ b/t/aclocal4.sh
@@ -18,7 +18,7 @@
 # Report from Jim Meyering.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_CONFIG_MACRO_DIR([m4])
diff --git a/t/aclocal5.sh b/t/aclocal5.sh
index a337986..9473114 100755
--- a/t/aclocal5.sh
+++ b/t/aclocal5.sh
@@ -17,7 +17,7 @@
 # Test to make sure that aclocal.m4's dependencies are honored in
 # sub-directories.  See also related tests 'remake-subdir*.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_MACRO_DIR([m4])
diff --git a/t/aclocal6.sh b/t/aclocal6.sh
index 80c918a..97b7482 100755
--- a/t/aclocal6.sh
+++ b/t/aclocal6.sh
@@ -17,7 +17,7 @@
 # Make sure aclocal.m4 is rebuilt whenever a configure
 # dependency changes.  Test for acinclude.m4 and VPATH too.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 SOME_DEFS
diff --git a/t/aclocal7.sh b/t/aclocal7.sh
index c050b07..9f24614 100755
--- a/t/aclocal7.sh
+++ b/t/aclocal7.sh
@@ -17,7 +17,7 @@
 # Make sure aclocal does not overwrite aclocal.m4 needlessly.
 # Also make sure automake --no-force does not overwrite Makefile.in needlessly.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 SOME_DEFS
diff --git a/t/aclocal8.sh b/t/aclocal8.sh
index a242fca..9f2d1db 100755
--- a/t/aclocal8.sh
+++ b/t/aclocal8.sh
@@ -17,7 +17,7 @@
 # Make sure aclocal does not require unused macros.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
diff --git a/t/aclocal9.sh b/t/aclocal9.sh
index bcdd6f4..bcdecb0 100755
--- a/t/aclocal9.sh
+++ b/t/aclocal9.sh
@@ -17,7 +17,7 @@
 # Make sure aclocal define macros in the same order as -I's.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
diff --git a/t/acsilent.sh b/t/acsilent.sh
index 92c4300..2200d7d 100755
--- a/t/acsilent.sh
+++ b/t/acsilent.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure there are no spurious acinclude warnings.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >configure.ac <<EOF
 AC_INIT([$me], [1.0])
diff --git a/t/acsubst.sh b/t/acsubst.sh
index 19dfbdf..4081f66 100755
--- a/t/acsubst.sh
+++ b/t/acsubst.sh
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/acsubst2.sh b/t/acsubst2.sh
index ea7749c..da858fd 100755
--- a/t/acsubst2.sh
+++ b/t/acsubst2.sh
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/add-missing.tap b/t/add-missing.tap
index ef80f1a..5d711c7 100755
--- a/t/add-missing.tap
+++ b/t/add-missing.tap
@@ -20,7 +20,7 @@
 # default, but copied if the '--copy' option is used.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 plan_ "later"
 
diff --git a/t/all-prog-libs.sh b/t/all-prog-libs.sh
index 8332800..90f8840 100755
--- a/t/all-prog-libs.sh
+++ b/t/all-prog-libs.sh
@@ -19,7 +19,7 @@
 #  - $(am.all-libs).
 #  - $(am.all-ltlibs).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [who-cares])
diff --git a/t/all.sh b/t/all.sh
index 3797acf..0a0216c 100755
--- a/t/all.sh
+++ b/t/all.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure several *-local's in a single rule work.
 
-. ./defs || exit 1
+. test-init.sh
 
 targets='all install-exec install-data uninstall'
 echo "$targets:" | sed -e 's/[ :]/-local&/g' > Makefile.am
diff --git a/t/all2.sh b/t/all2.sh
index 2397d1d..a22246e 100755
--- a/t/all2.sh
+++ b/t/all2.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure all-local and other -local targets work correctly.
 
-. ./defs || exit 1
+. test-init.sh
 
 $ACLOCAL
 
diff --git a/t/alloca.sh b/t/alloca.sh
index e054dd4..aa436ff 100755
--- a/t/alloca.sh
+++ b/t/alloca.sh
@@ -16,7 +16,7 @@
 
 # Make sure we complain if @ALLOCA@ is used without being set in configure.ac
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AM_PROG_AR
diff --git a/t/alloca2.sh b/t/alloca2.sh
index 38d2cf8..6410344 100755
--- a/t/alloca2.sh
+++ b/t/alloca2.sh
@@ -16,7 +16,7 @@
 
 # Make sure we complain if @LTALLOCA@ is used without being set in configure.ac
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/alpha.sh b/t/alpha.sh
index b1315f0..d8dc30a 100755
--- a/t/alpha.sh
+++ b/t/alpha.sh
@@ -16,7 +16,7 @@
 
 # Make sure README-alpha is distributed when appropriate.  Report from
 # Jim Meyering.
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([alpha], [1.0a])
diff --git a/t/alpha2.sh b/t/alpha2.sh
index 86f60b9..318b1c9 100755
--- a/t/alpha2.sh
+++ b/t/alpha2.sh
@@ -17,7 +17,7 @@
 # Another check for README-alpha support.  This time it is requested
 # from configure.ac.  Report from Akim Demaille.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([alpha], [1.0b])
diff --git a/t/am-default-source-ext.sh b/t/am-default-source-ext.sh
index 7aa4662..8272bf5 100755
--- a/t/am-default-source-ext.sh
+++ b/t/am-default-source-ext.sh
@@ -17,7 +17,7 @@
 # AM_DEFAULT_SOURCE_EXT
 
 required='cc c++'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/am-dir.sh b/t/am-dir.sh
index 3a09047..1f5a276 100755
--- a/t/am-dir.sh
+++ b/t/am-dir.sh
@@ -26,7 +26,7 @@
 #  * cleaning rules and "make distcheck" interaction.
 #
 
-. ./defs || exit 1
+. test-init.sh
 
 d=.am
 
diff --git a/t/am-macro-not-found.sh b/t/am-macro-not-found.sh
index 038dabf..37e6959 100755
--- a/t/am-macro-not-found.sh
+++ b/t/am-macro-not-found.sh
@@ -16,7 +16,7 @@
 
 # Test to see if aclocal correctly reports missing AM_ macro.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AM_ZARDOZ >> configure.ac
 
diff --git a/t/am-missing-prog.sh b/t/am-missing-prog.sh
index e16529d..08fc455 100755
--- a/t/am-missing-prog.sh
+++ b/t/am-missing-prog.sh
@@ -16,7 +16,7 @@
 
 # Test AM_MISSING_PROG.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AM_MISSING_PROG([NO_SUCH_COMMAND],    [am-none-none])
diff --git a/t/am-tests-environment.sh b/t/am-tests-environment.sh
index e8fbbe3..eff7850 100755
--- a/t/am-tests-environment.sh
+++ b/t/am-tests-environment.sh
@@ -17,7 +17,7 @@
 # parallel-tests: check AM_TESTS_ENVIRONMENT support, and its
 # interactions with TESTS_ENVIRONMENT.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_MKDIR_P
diff --git a/t/am-xargs-map.sh b/t/am-xargs-map.sh
index 93c4ef4..03aff08 100755
--- a/t/am-xargs-map.sh
+++ b/t/am-xargs-map.sh
@@ -18,7 +18,7 @@
 # scenarios.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 # Filter out Automake comments.
 grep -v '^##' "$am_amdir"/header-vars.mk > defn.mk \
diff --git a/t/amassign.sh b/t/amassign.sh
index 555e3f4..96ec96d 100755
--- a/t/amassign.sh
+++ b/t/amassign.sh
@@ -17,7 +17,7 @@
 # Test to see if AM_ name can be assigned to in configure.ac.
 # Report from Steve Robbins.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CFLAGS=foo
diff --git a/t/amhello-binpkg.sh b/t/amhello-binpkg.sh
index c1d2575..c87717c 100755
--- a/t/amhello-binpkg.sh
+++ b/t/amhello-binpkg.sh
@@ -18,7 +18,7 @@
 # using DESTDIR to build simple, no-frills binary packages.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_docdir"/amhello-1.0.tar.gz . \
   || fatal_ "cannot get amhello tarball"
diff --git a/t/amhello-cflags.sh b/t/amhello-cflags.sh
index a120d81..6013789 100755
--- a/t/amhello-cflags.sh
+++ b/t/amhello-cflags.sh
@@ -20,7 +20,7 @@
 
 am_create_testdir=empty
 required=gcc
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_docdir"/amhello-1.0.tar.gz . \
   || fatal_ "cannot get amhello tarball"
diff --git a/t/amhello-cross-compile.sh b/t/amhello-cross-compile.sh
index d447657..c4992d4 100755
--- a/t/amhello-cross-compile.sh
+++ b/t/amhello-cross-compile.sh
@@ -19,7 +19,7 @@
 
 am_create_testdir=empty
 required=i586-mingw32msvc-gcc
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_docdir"/amhello-1.0.tar.gz . \
   || fatal_ "cannot get amhello tarball"
diff --git a/t/aminit-moreargs-deprecation.sh b/t/aminit-moreargs-deprecation.sh
index a8d4605..99ac969 100755
--- a/t/aminit-moreargs-deprecation.sh
+++ b/t/aminit-moreargs-deprecation.sh
@@ -17,7 +17,7 @@
 # Check that automake warns against old-style usages of AM_INIT_AUTOMAKE
 # (i.e., calls with two or three arguments).
 
-. ./defs || exit 1
+. test-init.sh
 
 warn_rx='AM_INIT_AUTOMAKE.* two-.* three-arguments form.*deprecated'
 
diff --git a/t/amopt.sh b/t/amopt.sh
index 5d6005d..7b4a933 100755
--- a/t/amopt.sh
+++ b/t/amopt.sh
@@ -17,7 +17,7 @@
 # Make Automake diagnose a conditional AUTOMAKE_OPTIONS.
 # Report from Bas Wijnen.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AM_CONDITIONAL([COND], [true])
diff --git a/t/amopts-location.sh b/t/amopts-location.sh
index c0d471a..0f489a4 100755
--- a/t/amopts-location.sh
+++ b/t/amopts-location.sh
@@ -17,7 +17,7 @@
 # Check that errors about AUTOMAKE_OPTIONS refers to correct
 # locations.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 # comment \
diff --git a/t/amopts-variable-expansion.sh b/t/amopts-variable-expansion.sh
index a11f576..4481221 100755
--- a/t/amopts-variable-expansion.sh
+++ b/t/amopts-variable-expansion.sh
@@ -17,7 +17,7 @@
 # Check that AUTOMAKE_OPTIONS support variable expansion.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
diff --git a/t/amsubst.sh b/t/amsubst.sh
index 49d50c1..c229924 100755
--- a/t/amsubst.sh
+++ b/t/amsubst.sh
@@ -16,7 +16,7 @@
 
 # Check for _AM_SUBST_NOTMAKE.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([backslash], "\\")
diff --git a/t/ar-lib.sh b/t/ar-lib.sh
index c6f6a3c..e7ca34c 100755
--- a/t/ar-lib.sh
+++ b/t/ar-lib.sh
@@ -18,7 +18,7 @@
 
 am_create_testdir=empty
 required=xsi-lib-shell
-. ./defs || exit 1
+. test-init.sh
 
 get_shell_script ar-lib
 
diff --git a/t/ar-lib2.sh b/t/ar-lib2.sh
index da2b5ca..df5332d 100755
--- a/t/ar-lib2.sh
+++ b/t/ar-lib2.sh
@@ -16,7 +16,7 @@
 
 # Test if AM_PROG_AR installs ar-lib.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/ar-lib3.sh b/t/ar-lib3.sh
index 513808a..77a8db9 100755
--- a/t/ar-lib3.sh
+++ b/t/ar-lib3.sh
@@ -16,7 +16,7 @@
 
 # Test if lib_LIBRARIES requests AM_PROG_AR.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/ar-lib4.sh b/t/ar-lib4.sh
index 2bd93aa..0bd5149 100755
--- a/t/ar-lib4.sh
+++ b/t/ar-lib4.sh
@@ -17,7 +17,7 @@
 # Test if lib_LTLIBRARIES requests AM_PROG_AR.
 
 required=libtoolize
-. ./defs || exit 1
+. test-init.sh
 
 cp configure.ac X
 
diff --git a/t/ar-lib5a.sh b/t/ar-lib5a.sh
index a11e218..6f800e6 100755
--- a/t/ar-lib5a.sh
+++ b/t/ar-lib5a.sh
@@ -19,7 +19,7 @@
 # Keep this test in sync with sister test 'ar-lib5b.sh'.
 
 required=lib
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/ar-lib5b.sh b/t/ar-lib5b.sh
index a300760..fcf45b9 100755
--- a/t/ar-lib5b.sh
+++ b/t/ar-lib5b.sh
@@ -18,7 +18,7 @@
 # This test does not require Microsoft lib.
 # Keep this test in sync with sister test 'ar-lib5a.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/ar-lib6a.sh b/t/ar-lib6a.sh
index 7ee5257..86b8c99 100755
--- a/t/ar-lib6a.sh
+++ b/t/ar-lib6a.sh
@@ -18,7 +18,7 @@
 # Keep this test in sync with sister test 'ar-lib6b.sh'.
 
 required=libtoolize
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/ar-lib6b.sh b/t/ar-lib6b.sh
index 92709f8..e402b63 100755
--- a/t/ar-lib6b.sh
+++ b/t/ar-lib6b.sh
@@ -18,7 +18,7 @@
 # Keep this test in sync with sister test 'ar-lib6a.sh'.
 
 required=libtoolize
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/ar-lib7.sh b/t/ar-lib7.sh
index c27cabf..dd7d4a7 100755
--- a/t/ar-lib7.sh
+++ b/t/ar-lib7.sh
@@ -16,7 +16,7 @@
 
 # Test if automake warns if ar-lib is missing when AM_PROG_AR is used.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR
diff --git a/t/ar.sh b/t/ar.sh
index da01d75..5aa1681 100755
--- a/t/ar.sh
+++ b/t/ar.sh
@@ -16,7 +16,7 @@
 
 # Make sure that AR, ARFLAGS, and RANLIB can be substituted from configure.ac.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR
diff --git a/t/ar2.sh b/t/ar2.sh
index 88e90ca..bcda001 100755
--- a/t/ar2.sh
+++ b/t/ar2.sh
@@ -17,7 +17,7 @@
 # Make sure AR and ARFLAGS are defined for EXTRA_LIBRARIES.
 # Report from Kevin Ryde.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/ar3.sh b/t/ar3.sh
index f8bf855..3b3ab4e 100755
--- a/t/ar3.sh
+++ b/t/ar3.sh
@@ -17,7 +17,7 @@
 # Make sure that AR, ARFLAGS, etc. works also when the macro AM_PROG_AR
 # is used.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/ar4.sh b/t/ar4.sh
index dc82605..15c5913 100755
--- a/t/ar4.sh
+++ b/t/ar4.sh
@@ -16,7 +16,7 @@
 
 # Test if configure bails out if $AR does not work and AM_PROG_AR is used.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR
diff --git a/t/ar5.sh b/t/ar5.sh
index 50cf2b0..90c4f96 100755
--- a/t/ar5.sh
+++ b/t/ar5.sh
@@ -16,7 +16,7 @@
 
 # Test the optional argument of AM_PROG_AR.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR([
diff --git a/t/asm.sh b/t/asm.sh
index 48df68b..0ce4d07 100755
--- a/t/asm.sh
+++ b/t/asm.sh
@@ -17,7 +17,7 @@
 # Test of basic assembly functionality.
 # Keep this in sync with sister tests 'asm2.sh' and 'asm3.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 mv configure.ac configure.stub
 
diff --git a/t/asm2.sh b/t/asm2.sh
index d62cb60..29ab10b 100755
--- a/t/asm2.sh
+++ b/t/asm2.sh
@@ -17,7 +17,7 @@
 # Test of basic preprocessed assembly functionality.
 # Keep this in sync with sister tests 'asm.sh' and 'asm3.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 mv configure.ac configure.stub
 
diff --git a/t/asm3.sh b/t/asm3.sh
index 67bb876..8044c08 100755
--- a/t/asm3.sh
+++ b/t/asm3.sh
@@ -17,7 +17,7 @@
 # Test of basic preprocessed assembly functionality with extension '.sx'.
 # Keep this in sync with sister tests 'asm.sh' and 'asm2.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 mv configure.ac configure.stub
 
diff --git a/t/autodist-aclocal-m4.sh b/t/autodist-aclocal-m4.sh
index 1c86490..9bee503 100755
--- a/t/autodist-aclocal-m4.sh
+++ b/t/autodist-aclocal-m4.sh
@@ -21,7 +21,7 @@
 # remove this test.
 # Related to automake bug#7819.
 
-. ./defs || exit 1
+. test-init.sh
 
 { echo 'm4_include([defs.m4])'
   cat configure.ac
diff --git a/t/autodist-configure-no-subdir.sh 
b/t/autodist-configure-no-subdir.sh
index dbb62c9..bdecc62 100755
--- a/t/autodist-configure-no-subdir.sh
+++ b/t/autodist-configure-no-subdir.sh
@@ -18,7 +18,7 @@
 # distributed when placed in a subdirectory.
 # Related to automake bug#7819.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/autodist-no-duplicate.sh b/t/autodist-no-duplicate.sh
index 58742ce..20b3caf 100755
--- a/t/autodist-no-duplicate.sh
+++ b/t/autodist-no-duplicate.sh
@@ -17,7 +17,7 @@
 # Check that there are no duplicates in the list of files automatically
 # distributed by automake.
 
-. ./defs || exit 1
+. test-init.sh
 
 re='Files .*automatically distributed.*if found'
 
diff --git a/t/autodist-stamp-vti.sh b/t/autodist-stamp-vti.sh
index 9731010..7e74ae1 100755
--- a/t/autodist-stamp-vti.sh
+++ b/t/autodist-stamp-vti.sh
@@ -19,7 +19,7 @@
 # Related to automake bug#7819.
 
 required=makeinfo
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << END
 AC_OUTPUT
diff --git a/t/autodist-subdir.sh b/t/autodist-subdir.sh
index 3dbda86..6448fb0 100755
--- a/t/autodist-subdir.sh
+++ b/t/autodist-subdir.sh
@@ -24,7 +24,7 @@
 #
 # Keep this test in sync with sister test 'autodist.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/autodist.sh b/t/autodist.sh
index 757c0cb..1efd921 100755
--- a/t/autodist.sh
+++ b/t/autodist.sh
@@ -20,7 +20,7 @@
 # Keep this test in sync with sister test 'autodist-subdir.sh'.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/autohdr-subdir-pr12495.sh b/t/autohdr-subdir-pr12495.sh
index fd5a204..49e343b 100755
--- a/t/autohdr-subdir-pr12495.sh
+++ b/t/autohdr-subdir-pr12495.sh
@@ -18,7 +18,7 @@
 # remake rules for AC_CONFIG_HEADERS arguments after the first one,
 # not even when subdirs are involved.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_HEADERS([a.h b.h sub/c.h])
diff --git a/t/autohdr.sh b/t/autohdr.sh
index 19daabe..4079c7c 100755
--- a/t/autohdr.sh
+++ b/t/autohdr.sh
@@ -16,7 +16,7 @@
 
 # Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_CONFIG_HEADERS([thisfile.h])
diff --git a/t/autohdr3.sh b/t/autohdr3.sh
index 2827c0c..a015760 100755
--- a/t/autohdr3.sh
+++ b/t/autohdr3.sh
@@ -16,7 +16,7 @@
 
 # Check rebuild rules for autoheader.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 m4_include([foo.m4])
diff --git a/t/autohdr4.sh b/t/autohdr4.sh
index fa1f8f0..6f46aaf 100755
--- a/t/autohdr4.sh
+++ b/t/autohdr4.sh
@@ -18,7 +18,7 @@
 # (This should also work without GNU Make.)
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_PROG_CC
diff --git a/t/autohdrdry.sh b/t/autohdrdry.sh
index af6c198..0a9acd3 100755
--- a/t/autohdrdry.sh
+++ b/t/autohdrdry.sh
@@ -17,7 +17,7 @@
 # Removal recovery rules for AC_CONFIG_HEADERS should not remove files
 # with 'make -n'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_CONFIG_HEADERS([config.h])
diff --git a/t/automake-cmdline.tap b/t/automake-cmdline.tap
index dd8b30a..eb8bf78 100755
--- a/t/automake-cmdline.tap
+++ b/t/automake-cmdline.tap
@@ -16,7 +16,7 @@
 
 # Test Automake's command-line options.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 17
 
diff --git a/t/auxdir-autodetect.sh b/t/auxdir-autodetect.sh
index 654a303..580f631 100755
--- a/t/auxdir-autodetect.sh
+++ b/t/auxdir-autodetect.sh
@@ -17,7 +17,7 @@
 # Make sure that, if AC_CONFIG_AUX_DIR is not specified, Automake tries
 # to use '.', '..' and '../..', in precisely that order.
 
-. ./defs || exit 1
+. test-init.sh
 
 nil=__no_such_program
 
diff --git a/t/auxdir-computed.tap b/t/auxdir-computed.tap
index 95d1003..324d825 100755
--- a/t/auxdir-computed.tap
+++ b/t/auxdir-computed.tap
@@ -17,7 +17,7 @@
 # It should be possible to use a computed auxdir.  This might seem
 # bizarre, but it is actually used in multilib builds.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 3
 
diff --git a/t/auxdir-misplaced.sh b/t/auxdir-misplaced.sh
index 87259b2..98e0591 100755
--- a/t/auxdir-misplaced.sh
+++ b/t/auxdir-misplaced.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure we diagnose misplaced AC_CONFIG_AUX_DIR.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_AUX_DIR([.]) dnl this will appear after AM_INIT_AUTOMAKE
diff --git a/t/auxdir-nonexistent.sh b/t/auxdir-nonexistent.sh
index 43eeed2..82c46b0 100755
--- a/t/auxdir-nonexistent.sh
+++ b/t/auxdir-nonexistent.sh
@@ -16,7 +16,7 @@
 
 # Make sure we diagnose non-existent AC_CONFIG_AUX_DIR names.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/auxdir-unportable.tap b/t/auxdir-unportable.tap
index 8f06999..c687406 100755
--- a/t/auxdir-unportable.tap
+++ b/t/auxdir-unportable.tap
@@ -16,7 +16,7 @@
 
 # Make sure we diagnose unportable AC_CONFIG_AUX_DIR names.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 4
 
diff --git a/t/auxdir.sh b/t/auxdir.sh
index 8a6b28e..4133240 100755
--- a/t/auxdir.sh
+++ b/t/auxdir.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure AC_CONFIG_AUX_DIR works correctly.
 
-. ./defs || exit 1
+. test-init.sh
 
 # The "./." is here so we don't have to mess with subdirs.
 cat > configure.ac <<END
diff --git a/t/auxdir6.sh b/t/auxdir6.sh
index 1513606..313ff65 100755
--- a/t/auxdir6.sh
+++ b/t/auxdir6.sh
@@ -20,7 +20,7 @@
 # config auxdir.
 # Keep this in sync with sister tests 'auxdir7.sh' and 'auxdir8.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/auxdir7.sh b/t/auxdir7.sh
index e5a6773..ef8b0d2 100755
--- a/t/auxdir7.sh
+++ b/t/auxdir7.sh
@@ -19,7 +19,7 @@
 # making the top-level directory the config auxdir.
 # Keep this in sync with sister tests 'auxdir6.sh' and 'auxdir8.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/auxdir8.sh b/t/auxdir8.sh
index 8f94275..b4ae231 100755
--- a/t/auxdir8.sh
+++ b/t/auxdir8.sh
@@ -21,7 +21,7 @@
 # directory.
 # Keep this in sync with sister tests 'auxdir6.sh' and 'auxdir7.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
diff --git a/t/ax/depcomp-shuffle.sh b/t/ax/depcomp-shuffle.sh
index d64f963..79480f8 100644
--- a/t/ax/depcomp-shuffle.sh
+++ b/t/ax/depcomp-shuffle.sh
@@ -19,7 +19,7 @@
 # set the variables '$xdir' and '$vpath' appropriately.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 test x${xdir+"set"} = x"set" || fatal_ "\$xdir is unset"
 test x${vpath+"set"} = x"set" || fatal_ "\$vpath is unset"
diff --git a/t/ax/depcomp.sh b/t/ax/depcomp.sh
index 5886691..46a5f17 100644
--- a/t/ax/depcomp.sh
+++ b/t/ax/depcomp.sh
@@ -67,7 +67,7 @@
 
 # -------------------------------------------------------------------------
 
-# This expects ./defs has already been included has already been included..
+# This code expects test-init.sh has already been included in advance.
 
 ocwd=$(pwd) || fatal_ "getting current working directory"
 longpath=this-is/a-path/which-has/quite-a/definitely/truly/long_long_name
diff --git a/t/ax/tap-setup.sh b/t/ax/tap-setup.sh
index 952a49d..bd7efe3 100644
--- a/t/ax/tap-setup.sh
+++ b/t/ax/tap-setup.sh
@@ -22,7 +22,7 @@
 
 # Check that we are running from a proper directory: last thing we want
 # is to overwrite some random user files.
-test -f ../../automake && test -f ../../defs && test -d ../../t \
+test -f ../../automake && test -f ../../runtest && test -d ../../t \
   || fatal_ "running from a wrong directory"
 
 test ! -f Makefile.am || mv Makefile.am Makefile.am~ \
diff --git a/t/ax/tap-summary-aux.sh b/t/ax/tap-summary-aux.sh
index 6148553..6caf6b5 100644
--- a/t/ax/tap-summary-aux.sh
+++ b/t/ax/tap-summary-aux.sh
@@ -16,7 +16,7 @@
 
 # Auxiliary script for tests on TAP support: checking testsuite summary.
 
-. ./defs || exit 1
+. test-init.sh
 
 
br='============================================================================'
 
diff --git a/t/ax/testsuite-summary-checks.sh b/t/ax/testsuite-summary-checks.sh
index 9268079..198c688 100644
--- a/t/ax/testsuite-summary-checks.sh
+++ b/t/ax/testsuite-summary-checks.sh
@@ -20,7 +20,7 @@
 # testsuite output, packages with and without bug-report addresses,
 # testsuites in subdirectories, ...)
 
-. ./defs || exit 1
+. test-init.sh
 
 case $use_colors in
   yes)
diff --git a/t/backcompat-acout.sh b/t/backcompat-acout.sh
index f2e552b..c483be5 100755
--- a/t/backcompat-acout.sh
+++ b/t/backcompat-acout.sh
@@ -16,7 +16,7 @@
 
 # Backward-compatibility: AC_OUTPUT with arguments.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 : > Makefile.am
diff --git a/t/backcompat.sh b/t/backcompat.sh
index 214515d..ee7906e 100755
--- a/t/backcompat.sh
+++ b/t/backcompat.sh
@@ -17,7 +17,7 @@
 # Test usage of AM_INIT_AUTOMAKE with two or three arguments, for
 # backward-compatibility.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 .PHONY: test display
diff --git a/t/backcompat2.sh b/t/backcompat2.sh
index 109483b..fe3bb07 100755
--- a/t/backcompat2.sh
+++ b/t/backcompat2.sh
@@ -19,7 +19,7 @@
 # third argument is empty or non-existent.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 # A trick to make the test run muuuch faster, by avoiding repeated
 # runs of aclocal (one order of magnitude improvement in speed!).
diff --git a/t/backcompat3.sh b/t/backcompat3.sh
index 26ea7d4..b245e36 100755
--- a/t/backcompat3.sh
+++ b/t/backcompat3.sh
@@ -18,7 +18,7 @@
 # AM_INIT_AUTOMAKE are both given two or more arguments.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 empty=''
 
diff --git a/t/backcompat6.sh b/t/backcompat6.sh
index bcfd3dc..b99321a 100755
--- a/t/backcompat6.sh
+++ b/t/backcompat6.sh
@@ -22,7 +22,7 @@
 
 required=cc
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 # Anyone doing something like this in a real-life package probably
 # deserves to be killed.
diff --git a/t/backsl.sh b/t/backsl.sh
index fb34ee1..a781e80 100755
--- a/t/backsl.sh
+++ b/t/backsl.sh
@@ -16,7 +16,7 @@
 
 # Test for "\" problems.  Bug report from Joerg-Martin Schwarz.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/backsl2.sh b/t/backsl2.sh
index 5d9d6d1..10046f9 100755
--- a/t/backsl2.sh
+++ b/t/backsl2.sh
@@ -17,7 +17,7 @@
 # We must skip the backslash, not complain about './\' not existing.
 # Reported by Rick Scott <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 SUBDIRS = \
diff --git a/t/backsl4.sh b/t/backsl4.sh
index 707d358..7ac4c86 100755
--- a/t/backsl4.sh
+++ b/t/backsl4.sh
@@ -17,7 +17,7 @@
 # Make sure we diagnose and fix white spaces following backslash.
 # Report from Peter Muir.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >>configure.ac
 
diff --git a/t/backslash-tricks.sh b/t/backslash-tricks.sh
index d005765..560d9a8 100755
--- a/t/backslash-tricks.sh
+++ b/t/backslash-tricks.sh
@@ -30,7 +30,7 @@
 #   and newline sequence, because GNU make handles that gracefully.
 #
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/badline.sh b/t/badline.sh
index 3d71425..e6eb5c8 100755
--- a/t/badline.sh
+++ b/t/badline.sh
@@ -17,7 +17,7 @@
 # Test to make sure that line number and file name in error message
 # referring to variable is always correct.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/badopt.sh b/t/badopt.sh
index b548a4f..927a10d 100755
--- a/t/badopt.sh
+++ b/t/badopt.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure bad options cause error.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo 'AUTOMAKE_OPTIONS = zardoz' > Makefile.am
 
diff --git a/t/badprog.sh b/t/badprog.sh
index 6134e3e..e8df06a 100755
--- a/t/badprog.sh
+++ b/t/badprog.sh
@@ -17,7 +17,7 @@
 # Test to make sure that programs with bad names are properly
 # transformed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/block.sh b/t/block.sh
index 7cdb5ff..a50b9d3 100755
--- a/t/block.sh
+++ b/t/block.sh
@@ -17,7 +17,7 @@
 # Make sure block comments are not double-spaced.
 # Report from François Pinard.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 #START
diff --git a/t/built-sources-check.sh b/t/built-sources-check.sh
index d4d3c51..3e0204c 100755
--- a/t/built-sources-check.sh
+++ b/t/built-sources-check.sh
@@ -18,7 +18,7 @@
 # PR/359.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([dir/Makefile])
diff --git a/t/built-sources-cond.sh b/t/built-sources-cond.sh
index ac78a97..a09334f 100755
--- a/t/built-sources-cond.sh
+++ b/t/built-sources-cond.sh
@@ -16,7 +16,7 @@
 
 # Interaction of BUILT_SOURCES with conditionals.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AM_CONDITIONAL([COND1], [test $cond1 = yes])
diff --git a/t/built-sources-fork-bomb.sh b/t/built-sources-fork-bomb.sh
index 8279704..ee444d7 100755
--- a/t/built-sources-fork-bomb.sh
+++ b/t/built-sources-fork-bomb.sh
@@ -22,7 +22,7 @@
 # <http://lists.gnu.org/archive/html/help-smalltalk/2012-08/msg00027.html>
 # <http://lists.gnu.org/archive/html/automake-patches/2012-08/msg00052.html>
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/built-sources-install.sh b/t/built-sources-install.sh
index 2f53bb5..e1c0bbc 100755
--- a/t/built-sources-install.sh
+++ b/t/built-sources-install.sh
@@ -17,7 +17,7 @@
 # Make sure 'install:' honors $(BUILT_SOURCES).
 # PR/359.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([dir/Makefile])
diff --git a/t/built-sources-subdir.sh b/t/built-sources-subdir.sh
index cc162bb..b1c7764 100755
--- a/t/built-sources-subdir.sh
+++ b/t/built-sources-subdir.sh
@@ -19,7 +19,7 @@
 # all-recursive-am which depended on BUILT_SOURCES.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 mkdir lib
 
diff --git a/t/built-sources.sh b/t/built-sources.sh
index 9890916..aeebc39 100755
--- a/t/built-sources.sh
+++ b/t/built-sources.sh
@@ -17,7 +17,7 @@
 # Basic test on BUILT_SOURCES.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/candist.sh b/t/candist.sh
index d87836a..4c84164 100755
--- a/t/candist.sh
+++ b/t/candist.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure things that cannot be dist_'ed are diagnosed.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >>configure.ac
 
diff --git a/t/canon-name.sh b/t/canon-name.sh
index 59f8d8d..460fb89 100755
--- a/t/canon-name.sh
+++ b/t/canon-name.sh
@@ -17,7 +17,7 @@
 # PR 511: Make sure we warn about e.g. AC_CONFIG_FILES([./gmakefile]),
 # as not all make implementations treat 'file' and './file' equally.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/canon.sh b/t/canon.sh
index be65bf7..1b531ad 100755
--- a/t/canon.sh
+++ b/t/canon.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure that name canonicalization error works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/canon2.sh b/t/canon2.sh
index d9869e8..f79c2a5 100755
--- a/t/canon2.sh
+++ b/t/canon2.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure name canonicalization happens for texinfo.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = zar-doz.texi
diff --git a/t/canon3.sh b/t/canon3.sh
index 4a95cb5..2efdd4c 100755
--- a/t/canon3.sh
+++ b/t/canon3.sh
@@ -16,7 +16,7 @@
 
 # Yet another canonicalization test.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/canon4.sh b/t/canon4.sh
index c79b151..eea87aa 100755
--- a/t/canon4.sh
+++ b/t/canon4.sh
@@ -17,7 +17,7 @@
 # Test to make sure name canonicalization happens for static libraries.
 # Keep this in sync with sister test 'canon6.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/canon5.sh b/t/canon5.sh
index eba456a..f170303 100755
--- a/t/canon5.sh
+++ b/t/canon5.sh
@@ -17,7 +17,7 @@
 # Test to make sure that we allow variable names starting in
 # non-letters.  Whatever that might mean.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/canon6.sh b/t/canon6.sh
index 9c7fd94..aa1be20 100755
--- a/t/canon6.sh
+++ b/t/canon6.sh
@@ -18,7 +18,7 @@
 # Keep this in sync with sister test 'canon4.sh'.
 
 required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/canon7.sh b/t/canon7.sh
index 8ffeffb..853db0a 100755
--- a/t/canon7.sh
+++ b/t/canon7.sh
@@ -17,7 +17,7 @@
 # Stress test on canonicalization.
 
 required='cc libtool libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/canon8.sh b/t/canon8.sh
index bb5e7f9..4c29f6d 100755
--- a/t/canon8.sh
+++ b/t/canon8.sh
@@ -16,7 +16,7 @@
 
 # Check that canonicalization does not transliterate the '@' charactrer.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/ccnoco.sh b/t/ccnoco.sh
index 2e5bd4f..960860c 100755
--- a/t/ccnoco.sh
+++ b/t/ccnoco.sh
@@ -18,7 +18,7 @@
 # understand '-c -o'.
 
 required=gcc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -53,7 +53,8 @@ case " \$* " in
     ;;
 esac
 
-# Use '$CC', not 'gcc', to honour the compiler chosen by 't/defs'.
+# Use '$CC', not 'gcc', to honour the compiler chosen
+# by the testsuite setup.
 exec $CC "\$@"
 END
 
diff --git a/t/ccnoco2.sh b/t/ccnoco2.sh
index e97558b..72a2e92 100755
--- a/t/ccnoco2.sh
+++ b/t/ccnoco2.sh
@@ -17,7 +17,7 @@
 # Make sure Automake requires AM_PROG_CC_C_O when either per-targets
 # flags or subdir objects are used.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_CONFIG_FILES([src/Makefile])
diff --git a/t/ccnoco3.sh b/t/ccnoco3.sh
index 0361b41..1b1341c 100755
--- a/t/ccnoco3.sh
+++ b/t/ccnoco3.sh
@@ -17,7 +17,7 @@
 # Test to make sure 'compile' doesn't call 'mv SRC SRC'.
 
 required=gcc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -51,7 +51,8 @@ case " \$* " in
     ;;
 esac
 
-# Use '$CC', not 'gcc', to honour the compiler chosen by 't/defs'.
+# Use '$CC', not 'gcc', to honour the compiler chosen
+# by the testsuite setup.
 exec $CC "\$@"
 END
 
diff --git a/t/check-concurrency-bug9245.sh b/t/check-concurrency-bug9245.sh
index 108f142..6872f91 100755
--- a/t/check-concurrency-bug9245.sh
+++ b/t/check-concurrency-bug9245.sh
@@ -20,7 +20,7 @@
 # keep the test anyway, for extra safety.
 # See automake bug#9245.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/check-exported-srcdir.sh b/t/check-exported-srcdir.sh
index ff48a5f..26d481f 100755
--- a/t/check-exported-srcdir.sh
+++ b/t/check-exported-srcdir.sh
@@ -19,7 +19,7 @@
 # environment of the tests.  This is documented in the manual.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 show_info ()
 {
diff --git a/t/check-fd-redirect.sh b/t/check-fd-redirect.sh
index a11d0cd..3eeb52c 100755
--- a/t/check-fd-redirect.sh
+++ b/t/check-fd-redirect.sh
@@ -19,7 +19,7 @@
 # See also related test 'parallel-tests-fd-redirect.sh'.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/check-no-test-driver.sh b/t/check-no-test-driver.sh
index bcb2cc9..9632e8e 100755
--- a/t/check-no-test-driver.sh
+++ b/t/check-no-test-driver.sh
@@ -18,7 +18,7 @@
 # installed or referenced when the 'serial-tests' option is used.
 
 am_serial_tests=yes
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 AUTOMAKE_OPTIONS = serial-tests
diff --git a/t/check-subst-prog.sh b/t/check-subst-prog.sh
index 77538cd..5400220 100755
--- a/t/check-subst-prog.sh
+++ b/t/check-subst-prog.sh
@@ -19,7 +19,7 @@
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/check-subst.sh b/t/check-subst.sh
index 0b1aeda..47d6359 100755
--- a/t/check-subst.sh
+++ b/t/check-subst.sh
@@ -20,7 +20,7 @@
 # See also sister test 'check-subst-prog.sh'.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([script_tests], ['subst-pass-script.sh subst-xfail-script.sh'])
diff --git a/t/check-tests-in-builddir.sh b/t/check-tests-in-builddir.sh
index 6785877..2421b2a 100755
--- a/t/check-tests-in-builddir.sh
+++ b/t/check-tests-in-builddir.sh
@@ -18,7 +18,7 @@
 # well as in builddir, and that is prefers those in the builddir.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/check10.sh b/t/check10.sh
index ce04e3d..615f3dd 100755
--- a/t/check10.sh
+++ b/t/check10.sh
@@ -18,7 +18,7 @@
 
 # This test only makes sense for the older serial testsuite driver.
 am_serial_tests=yes
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/check11.sh b/t/check11.sh
index 1c76487..58a14e6 100755
--- a/t/check11.sh
+++ b/t/check11.sh
@@ -17,7 +17,7 @@
 # Check skip summary.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/check12.sh b/t/check12.sh
index d438dbd..7e777c1 100755
--- a/t/check12.sh
+++ b/t/check12.sh
@@ -19,7 +19,7 @@
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
 required=runtest
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/check2.sh b/t/check2.sh
index 95f479a..8a13211 100755
--- a/t/check2.sh
+++ b/t/check2.sh
@@ -17,7 +17,7 @@
 # Test Automake style tests.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([dir/Makefile])
diff --git a/t/check4.sh b/t/check4.sh
index d7c9fac..b0c2821 100755
--- a/t/check4.sh
+++ b/t/check4.sh
@@ -17,7 +17,7 @@
 # Make sure 'make -k check' processes all directories.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([dir/Makefile])
diff --git a/t/check5.sh b/t/check5.sh
index df5a8af..5aed55f 100755
--- a/t/check5.sh
+++ b/t/check5.sh
@@ -18,7 +18,7 @@
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/check6.sh b/t/check6.sh
index d885713..d0965b1 100755
--- a/t/check6.sh
+++ b/t/check6.sh
@@ -18,7 +18,7 @@
 # Also test that Solaris make VPATH rewriting is honored
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/check7.sh b/t/check7.sh
index d145f8a..d36c50d 100755
--- a/t/check7.sh
+++ b/t/check7.sh
@@ -18,7 +18,7 @@
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/check8.sh b/t/check8.sh
index 24eab72..d48cc02 100755
--- a/t/check8.sh
+++ b/t/check8.sh
@@ -18,7 +18,7 @@
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/clean-many.sh b/t/clean-many.sh
index 81bf837..8afeec8 100755
--- a/t/clean-many.sh
+++ b/t/clean-many.sh
@@ -19,7 +19,7 @@
 # test 'clean-many2.sh', which fakes an artificially low command line
 # length limit for 'rm'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([safe_include], [include])
diff --git a/t/clean-many2.sh b/t/clean-many2.sh
index aab8263..2dee643 100755
--- a/t/clean-many2.sh
+++ b/t/clean-many2.sh
@@ -20,7 +20,7 @@
 # The sister test 'clean-many.sh' try to hit the real command line length
 # limit of the system, by declaring a huge number of files to be cleaned.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/cleanvars.sh b/t/cleanvars.sh
index a5d0506..7333540 100755
--- a/t/cleanvars.sh
+++ b/t/cleanvars.sh
@@ -22,7 +22,7 @@
 # Especially checks that it is possible to extend them also from a
 # "wrapper" makefile never processed nor seen by Automake.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/colneq2.sh b/t/colneq2.sh
index 124b6d2..7d5d121 100755
--- a/t/colneq2.sh
+++ b/t/colneq2.sh
@@ -16,7 +16,7 @@
 
 # Test that := in var substitutions works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/colon.sh b/t/colon.sh
index f3e95a6..33cf35b 100755
--- a/t/colon.sh
+++ b/t/colon.sh
@@ -17,7 +17,7 @@
 # Test for bug reported by Nyul Laszlo.  When using the ":" syntax in
 # AC_OUTPUT, Automake fails to find the correct file.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([foo.h:foo.hin])
diff --git a/t/colon2.sh b/t/colon2.sh
index febf20a..fde3523 100755
--- a/t/colon2.sh
+++ b/t/colon2.sh
@@ -17,7 +17,7 @@
 # Make sure ":" works with files automake generates.
 # See also sister test 'colon3.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/colon3.sh b/t/colon3.sh
index e594d6f..49a6191 100755
--- a/t/colon3.sh
+++ b/t/colon3.sh
@@ -18,7 +18,7 @@
 # This test is for multiple ":"s.
 # See also sister test 'colon2.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/colon4.sh b/t/colon4.sh
index 34f0571..fa4b675 100755
--- a/t/colon4.sh
+++ b/t/colon4.sh
@@ -18,7 +18,7 @@
 # rebuild rules.
 # Test from Maciej W. Rozycki.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_CONFIG_FILES([zardoz:one:two:three])
diff --git a/t/colon5.sh b/t/colon5.sh
index 4fe7b51..9665864 100755
--- a/t/colon5.sh
+++ b/t/colon5.sh
@@ -16,7 +16,7 @@
 
 # Another multi-":" test, this time from Doug Evans.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/colon6.sh b/t/colon6.sh
index 6c4639d..25a37c2 100755
--- a/t/colon6.sh
+++ b/t/colon6.sh
@@ -16,7 +16,7 @@
 
 # Yet another multi-":" test, this time from Ken Pizzini.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/colon7.sh b/t/colon7.sh
index 8dc623f..022c96b 100755
--- a/t/colon7.sh
+++ b/t/colon7.sh
@@ -17,7 +17,7 @@
 # Another test for a failing ":" in AC_OUTPUT.
 # Report from Maciej Stachowiak.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([colon7], [1.0])
diff --git a/t/color-tests-opt.sh b/t/color-tests-opt.sh
index 87d88c9..ac26ab7 100755
--- a/t/color-tests-opt.sh
+++ b/t/color-tests-opt.sh
@@ -17,7 +17,7 @@
 # Check that the 'color-tests' option, now active by default, is
 # nonetheless still silently accepted, for backward compatibility.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/color-tests.sh b/t/color-tests.sh
index e61f26f..9035529 100755
--- a/t/color-tests.sh
+++ b/t/color-tests.sh
@@ -19,7 +19,7 @@
 
 required='grep-nonprint'
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 # Escape '[' for grep, below.
 red="$esc\[0;31m"
diff --git a/t/color-tests2.sh b/t/color-tests2.sh
index d1c8f98..90f589f 100755
--- a/t/color-tests2.sh
+++ b/t/color-tests2.sh
@@ -19,7 +19,7 @@
 
 required='grep-nonprint'
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 # Escape '[' for grep, below.
 red="$esc\[0;31m"
diff --git a/t/comment.sh b/t/comment.sh
index 3508bed..79f6cb6 100755
--- a/t/comment.sh
+++ b/t/comment.sh
@@ -17,7 +17,7 @@
 # Make sure that '#' as start of word in AUTOMAKE_OPTIONS means
 # comment.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = #no such option
diff --git a/t/comment2.sh b/t/comment2.sh
index 124e273..402296d 100755
--- a/t/comment2.sh
+++ b/t/comment2.sh
@@ -17,7 +17,7 @@
 # Make sure comment recognition works in PROGRAMS.  Report from Mark
 # Galassi.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/comment4.sh b/t/comment4.sh
index 3a2407e..d6d5286 100755
--- a/t/comment4.sh
+++ b/t/comment4.sh
@@ -16,7 +16,7 @@
 
 # Make sure commented variables are output near their comments.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_OUTPUT
diff --git a/t/comment6.sh b/t/comment6.sh
index e0c37cf..fd30587 100755
--- a/t/comment6.sh
+++ b/t/comment6.sh
@@ -18,7 +18,7 @@
 # Automake 1.6.1 seems to have a problem parsing comments that use
 # '\' to span multiple lines.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_OUTPUT
diff --git a/t/comment7.sh b/t/comment7.sh
index 7e45853..26520e7 100755
--- a/t/comment7.sh
+++ b/t/comment7.sh
@@ -17,7 +17,7 @@
 # Make sure comment for conditional variables are output near the
 # corresponding conditional definitions.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AM_CONDITIONAL([COND], [true])
diff --git a/t/comment8.sh b/t/comment8.sh
index 1ce6638..43cef61 100755
--- a/t/comment8.sh
+++ b/t/comment8.sh
@@ -17,7 +17,7 @@
 # Make sure += does not append to a comment.
 # Report from Stepan Kasal.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AM_CONDITIONAL([COND1], [true])
diff --git a/t/comment9.sh b/t/comment9.sh
index 49a9f6f..1c2551b 100755
--- a/t/comment9.sh
+++ b/t/comment9.sh
@@ -17,7 +17,7 @@
 # Make sure ##-comments are ignored in variable definitions.
 # Report from Julien Sopena.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 TESTS = \
diff --git a/t/comments-in-var-def.sh b/t/comments-in-var-def.sh
index dbb3b14..dad568d 100755
--- a/t/comments-in-var-def.sh
+++ b/t/comments-in-var-def.sh
@@ -17,7 +17,7 @@
 # Make sure Automake ignores in-line comments when using variables,
 # but preserve them in the output.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/compile.sh b/t/compile.sh
index 1da1cde..4e44206 100755
--- a/t/compile.sh
+++ b/t/compile.sh
@@ -17,7 +17,7 @@
 # Make sure 'compile' preserves spaces in its arguments.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 get_shell_script compile
 
diff --git a/t/compile2.sh b/t/compile2.sh
index 5f38775..8c22ed5 100755
--- a/t/compile2.sh
+++ b/t/compile2.sh
@@ -17,7 +17,7 @@
 # Make sure 'compile' deals correctly with Windows-style paths.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 get_shell_script compile
 
diff --git a/t/compile3.sh b/t/compile3.sh
index e8bf8a4..db715b3 100755
--- a/t/compile3.sh
+++ b/t/compile3.sh
@@ -18,7 +18,7 @@
 
 am_create_testdir=empty
 required=xsi-lib-shell
-. ./defs || exit 1
+. test-init.sh
 
 get_shell_script compile
 
diff --git a/t/compile4.sh b/t/compile4.sh
index e5b5c57..80ce861 100755
--- a/t/compile4.sh
+++ b/t/compile4.sh
@@ -18,7 +18,7 @@
 # with respect to absolute paths.
 
 required='cl'
-. ./defs || exit 1
+. test-init.sh
 
 get_shell_script compile
 
diff --git a/t/compile5.sh b/t/compile5.sh
index 89c5be3..3661fb1 100755
--- a/t/compile5.sh
+++ b/t/compile5.sh
@@ -17,7 +17,7 @@
 # Make sure the file name translation in the 'compile' script works
 # correctly
 
-. ./defs || exit 1
+. test-init.sh
 
 get_shell_script compile
 
diff --git a/t/compile6.sh b/t/compile6.sh
index 529f22c..c4fb22d 100755
--- a/t/compile6.sh
+++ b/t/compile6.sh
@@ -18,7 +18,7 @@
 
 am_create_testdir=empty
 required=xsi-lib-shell
-. ./defs || exit 1
+. test-init.sh
 
 get_shell_script compile
 
diff --git a/t/compile_f90_c_cxx.sh b/t/compile_f90_c_cxx.sh
index 27998dc..0bef8be 100755
--- a/t/compile_f90_c_cxx.sh
+++ b/t/compile_f90_c_cxx.sh
@@ -18,7 +18,7 @@
 # mixed source objects.
 # (copied from compile_f_c_cxx.sh) Mike Nolta <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/compile_f_c_cxx.sh b/t/compile_f_c_cxx.sh
index 419d802..7c1a2a2 100755
--- a/t/compile_f_c_cxx.sh
+++ b/t/compile_f_c_cxx.sh
@@ -18,7 +18,7 @@
 # mixed source objects.
 # Matthew D. Langston <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/cond-basic.sh b/t/cond-basic.sh
index 0b79032..f01c558 100755
--- a/t/cond-basic.sh
+++ b/t/cond-basic.sh
@@ -16,7 +16,7 @@
 
 # Check basic use of conditionals.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TEST], [true])
diff --git a/t/cond.sh b/t/cond.sh
index 04fb9fa..2fd6a66 100755
--- a/t/cond.sh
+++ b/t/cond.sh
@@ -16,7 +16,7 @@
 
 # Check basic use of conditionals.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TEST], [true])
diff --git a/t/cond10.sh b/t/cond10.sh
index a556a99..89f0263 100755
--- a/t/cond10.sh
+++ b/t/cond10.sh
@@ -16,7 +16,7 @@
 
 # Test for bug in conditionals.  From Raja R Harinath.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/cond11.sh b/t/cond11.sh
index 95073d1..c4beffc 100755
--- a/t/cond11.sh
+++ b/t/cond11.sh
@@ -18,7 +18,7 @@
 # This checks that, if LDADD is set from a conditional variable
 # and an AC_SUBST, the _DEPENDENCIES variable is set correctly.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [false])
diff --git a/t/cond13.sh b/t/cond13.sh
index c23df15..c522932 100755
--- a/t/cond13.sh
+++ b/t/cond13.sh
@@ -17,7 +17,7 @@
 # Test for bug in conditionals.
 # Report from Lars J. Aas.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/cond14.sh b/t/cond14.sh
index 345171e..67aa625 100755
--- a/t/cond14.sh
+++ b/t/cond14.sh
@@ -17,7 +17,7 @@
 # Test for bug in conditionals.
 # Report from Robert Boehne.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/cond15.sh b/t/cond15.sh
index 6ce37d7..e21f729 100755
--- a/t/cond15.sh
+++ b/t/cond15.sh
@@ -16,7 +16,7 @@
 
 # Regression test for conditionally defined overriding of automatic rules.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/cond16.sh b/t/cond16.sh
index ded3370..8e771e6 100755
--- a/t/cond16.sh
+++ b/t/cond16.sh
@@ -18,7 +18,7 @@
 # references.
 # Report from Richard Boulton.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND1], [true])
diff --git a/t/cond17.sh b/t/cond17.sh
index 837fa02..6726d2e 100755
--- a/t/cond17.sh
+++ b/t/cond17.sh
@@ -18,7 +18,7 @@
 # according to a conditional.
 # Report from Richard Boulton.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/cond18.sh b/t/cond18.sh
index 22bbfcf..353cad6 100755
--- a/t/cond18.sh
+++ b/t/cond18.sh
@@ -17,7 +17,7 @@
 # Regression test for substitution references to conditional variables.
 # Report from Richard Boulton.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND1], [true])
diff --git a/t/cond19.sh b/t/cond19.sh
index b0dd05c..6187c4c 100755
--- a/t/cond19.sh
+++ b/t/cond19.sh
@@ -17,7 +17,7 @@
 # Regression test for substitution references to conditional variables.
 # Report from Richard Boulton.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [false])
diff --git a/t/cond20.sh b/t/cond20.sh
index 403c609..0a590d5 100755
--- a/t/cond20.sh
+++ b/t/cond20.sh
@@ -17,7 +17,7 @@
 # Regression test for recursion handling in substitution references to
 # conditional variables.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/cond21.sh b/t/cond21.sh
index f5c748c..8df1232 100755
--- a/t/cond21.sh
+++ b/t/cond21.sh
@@ -16,7 +16,7 @@
 
 # Check for use of = and += in different conditions.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND1], [true])
diff --git a/t/cond22.sh b/t/cond22.sh
index 10e1d4d..a28c847 100755
--- a/t/cond22.sh
+++ b/t/cond22.sh
@@ -17,7 +17,7 @@
 # Regression test for bug when sources listed in conditional.
 # Report from Richard Boulton.  PR/326.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 CC=false; AC_SUBST([CC])
diff --git a/t/cond23.sh b/t/cond23.sh
index 522cffa..d7a01eb 100755
--- a/t/cond23.sh
+++ b/t/cond23.sh
@@ -17,7 +17,7 @@
 # Check that conditional redefinitions of AC_SUBST'ed variables are detected.
 # Report from Patrik Weiskircher.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AM_CONDITIONAL([COND], [true])
diff --git a/t/cond24.sh b/t/cond24.sh
index eaaf3d7..3a98a4e 100755
--- a/t/cond24.sh
+++ b/t/cond24.sh
@@ -17,7 +17,7 @@
 # Check that conditional redefinitions of AC_SUBST'ed variables are detected.
 # Report from Patrik Weiskircher.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_SUBST([foo], [bar])
diff --git a/t/cond25.sh b/t/cond25.sh
index 2119a8a..7177faf 100755
--- a/t/cond25.sh
+++ b/t/cond25.sh
@@ -17,7 +17,7 @@
 # Check that conditional primaries can use non-conditional directories.
 # From Pavel Roskin.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac << 'EOF'
 AM_CONDITIONAL([USE_FOO], [true])
diff --git a/t/cond26.sh b/t/cond26.sh
index 74cc7cc..275b32d 100755
--- a/t/cond26.sh
+++ b/t/cond26.sh
@@ -17,7 +17,7 @@
 # Check that non-conditional primaries can use conditional directories.
 # Reported by Juergen Keil.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac << 'EOF'
 AM_CONDITIONAL([USE_FOO], [true])
diff --git a/t/cond27.sh b/t/cond27.sh
index fa4aa94..b1a140a 100755
--- a/t/cond27.sh
+++ b/t/cond27.sh
@@ -17,7 +17,7 @@
 # Check that non-conditional primaries cannot use directories defined
 # in some conditions (but not others).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac << 'EOF'
 AM_CONDITIONAL([USE_FOO], [true])
diff --git a/t/cond28.sh b/t/cond28.sh
index 4df7446..a93e6fd 100755
--- a/t/cond28.sh
+++ b/t/cond28.sh
@@ -17,7 +17,7 @@
 # Check that conditional primaries can use directories defined
 # in the same conditions (but not others).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac << 'EOF'
 AM_CONDITIONAL([USE_FOO], [true])
diff --git a/t/cond3.sh b/t/cond3.sh
index 4a348d1..d31b943 100755
--- a/t/cond3.sh
+++ b/t/cond3.sh
@@ -17,7 +17,7 @@
 # Test sources listed in conditional.
 # Report from Rob Savoye <address@hidden>, and Lars J. Aas.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/cond30.sh b/t/cond30.sh
index da954ed..7512569 100755
--- a/t/cond30.sh
+++ b/t/cond30.sh
@@ -17,7 +17,7 @@
 # For PR/352: make sure we support bin_PROGRAMS, lib_LIBRARIES and
 #             lib_LTLIBRARIES being defined conditionally.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 m4_define([AM_PROG_AR], [:])
diff --git a/t/cond31.sh b/t/cond31.sh
index b849a1a..d66305f 100755
--- a/t/cond31.sh
+++ b/t/cond31.sh
@@ -16,7 +16,7 @@
 
 # Make sure we define conditional _DEPENDENCIES correctly.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_SUBST([CC], [false])
diff --git a/t/cond32.sh b/t/cond32.sh
index 07b7814..842704c 100755
--- a/t/cond32.sh
+++ b/t/cond32.sh
@@ -16,7 +16,7 @@
 
 # Make sure the user can override a conditional _DEPENDENCIES.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([C1], [test -z "$two"])
diff --git a/t/cond33.sh b/t/cond33.sh
index 53225cb..9ea45f1 100755
--- a/t/cond33.sh
+++ b/t/cond33.sh
@@ -18,7 +18,7 @@
 # correctly.
 # Report from Ralf Corsepius.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([INC], [test -z "$two"])
diff --git a/t/cond34.sh b/t/cond34.sh
index 3d37a2b..b4a50bb 100755
--- a/t/cond34.sh
+++ b/t/cond34.sh
@@ -17,7 +17,7 @@
 # Check for _DEPENDENCIES definition with conditional _LDADD.
 # Report from Elena A. Vengerova.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([TWO], [test -n "$two"])
diff --git a/t/cond35.sh b/t/cond35.sh
index ea663ce..fc371f5 100755
--- a/t/cond35.sh
+++ b/t/cond35.sh
@@ -18,7 +18,7 @@
 # Report from Roman Fietze.
 
 required='cc lex yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([CASE_A], [test -z "$case_B"])
diff --git a/t/cond36.sh b/t/cond36.sh
index 2b8e584..a65343f 100755
--- a/t/cond36.sh
+++ b/t/cond36.sh
@@ -16,7 +16,7 @@
 
 # Check rules output for parser defined conditionally.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([CASE_A], [test -z "$case_B"])
diff --git a/t/cond37.sh b/t/cond37.sh
index 31a1f40..12a2ac7 100755
--- a/t/cond37.sh
+++ b/t/cond37.sh
@@ -17,7 +17,7 @@
 # Check conditional local rules.
 # Report from Simon Josefsson.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([CASE_A], [test -n "$case_A"])
diff --git a/t/cond38.sh b/t/cond38.sh
index d90dce5..fa288c1 100755
--- a/t/cond38.sh
+++ b/t/cond38.sh
@@ -17,7 +17,7 @@
 # Check conditional variable ordering.
 # Report from Ed Hartnett.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([CASE_A], :)
diff --git a/t/cond39.sh b/t/cond39.sh
index 4cbda48..0bea420 100755
--- a/t/cond39.sh
+++ b/t/cond39.sh
@@ -17,7 +17,7 @@
 # Build either as CONFIG_FILE or as PROGRAM.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/cond4.sh b/t/cond4.sh
index 72d98c9..cc580c6 100755
--- a/t/cond4.sh
+++ b/t/cond4.sh
@@ -16,7 +16,7 @@
 
 # Another sources-in-conditional test.  Report from Tim Goodwin.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [false])
diff --git a/t/cond40.sh b/t/cond40.sh
index 8725a03..2d7ba0d 100755
--- a/t/cond40.sh
+++ b/t/cond40.sh
@@ -16,7 +16,7 @@
 
 # Test AM_COND_IF.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_DEFUN([FOO],
diff --git a/t/cond41.sh b/t/cond41.sh
index 9f4cc53..3f9c3f4 100755
--- a/t/cond41.sh
+++ b/t/cond41.sh
@@ -16,7 +16,7 @@
 
 # AM_COND_IF with an undefined condition should fail.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_COND_IF([BAD_COND], [AC_CONFIG_FILES([file1])])
diff --git a/t/cond42.sh b/t/cond42.sh
index d7f885e..b3d0305 100755
--- a/t/cond42.sh
+++ b/t/cond42.sh
@@ -18,7 +18,7 @@
 # This shouldn't happen with user input, as _AM_COND_* are not documented,
 # but better to be safe.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([COND], [:])
diff --git a/t/cond43.sh b/t/cond43.sh
index a6c7545..ff33675 100755
--- a/t/cond43.sh
+++ b/t/cond43.sh
@@ -16,7 +16,7 @@
 
 # Ensure an error with underquoted usage of AM_COND_IF in configure.ac.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([COND1], [:])
diff --git a/t/cond44.sh b/t/cond44.sh
index 8d4d7d5..b79892b 100755
--- a/t/cond44.sh
+++ b/t/cond44.sh
@@ -17,7 +17,7 @@
 # Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
 # are not diagnosed.  See 'cond23.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AM_CONDITIONAL([COND], [true])
diff --git a/t/cond45.sh b/t/cond45.sh
index 5e010cf..0db9d8c 100755
--- a/t/cond45.sh
+++ b/t/cond45.sh
@@ -17,7 +17,7 @@
 # Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
 # are not diagnosed.  See 'cond24.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_SUBST([foo], [bar])
diff --git a/t/cond46.sh b/t/cond46.sh
index 59820c4..18d0f9e 100755
--- a/t/cond46.sh
+++ b/t/cond46.sh
@@ -16,7 +16,7 @@
 
 # Ensure the right condition is listed after 'else' and 'endif'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([USE_A], [test x = y])
diff --git a/t/cond5.sh b/t/cond5.sh
index fb5c920..b0f1194 100755
--- a/t/cond5.sh
+++ b/t/cond5.sh
@@ -16,7 +16,7 @@
 
 # Yet another sources-in-conditional test.  Report from Tim Goodwin.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/cond6.sh b/t/cond6.sh
index 640f496..3754d08 100755
--- a/t/cond6.sh
+++ b/t/cond6.sh
@@ -16,7 +16,7 @@
 
 # Test for an odd conditional bug.  Report from Matt Leach.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo 'AM_CONDITIONAL([FOO], [true])' >> configure.ac
 
diff --git a/t/cond7.sh b/t/cond7.sh
index 19cd12e..4f90bde 100755
--- a/t/cond7.sh
+++ b/t/cond7.sh
@@ -16,7 +16,7 @@
 
 # Test for an odd conditional bug.  Report from Pavel Roskin.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 compat=yes
diff --git a/t/cond8.sh b/t/cond8.sh
index 1eab707..f19ede5 100755
--- a/t/cond8.sh
+++ b/t/cond8.sh
@@ -17,7 +17,7 @@
 # Test to make sure _PROGRAMS conditionals can be written in a useful
 # way.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/cond9.sh b/t/cond9.sh
index 9422748..80f13d1 100755
--- a/t/cond9.sh
+++ b/t/cond9.sh
@@ -16,7 +16,7 @@
 
 # Test for bug in conditionals.  From Raja R Harinath.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([WRONG], [test x = y])
diff --git a/t/condd.sh b/t/condd.sh
index 81fd015..cb88994 100755
--- a/t/condd.sh
+++ b/t/condd.sh
@@ -16,7 +16,7 @@
 
 # Test for bug in conditionals.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 dnl Define a macro with the same name as the conditional to exhibit
diff --git a/t/condhook.sh b/t/condhook.sh
index 18ebcb3..8cfc94c 100755
--- a/t/condhook.sh
+++ b/t/condhook.sh
@@ -18,7 +18,7 @@
 # Keep this in sync with sister test 'condhook2.sh'.
 # Report by Nik A. Melchior (PR/428).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TEST], [false])
diff --git a/t/condhook2.sh b/t/condhook2.sh
index a6ec7ff..e41a24d 100755
--- a/t/condhook2.sh
+++ b/t/condhook2.sh
@@ -17,7 +17,7 @@
 # Test install when a conditional install-*-hook is defined.
 # Keep this in sync with sister test 'condhook.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TEST], [true])
diff --git a/t/condinc.sh b/t/condinc.sh
index d826f96..d61766d 100755
--- a/t/condinc.sh
+++ b/t/condinc.sh
@@ -16,7 +16,7 @@
 
 # Make sure a conditional include statement is handled properly.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TOBE], [false])
diff --git a/t/condinc2.sh b/t/condinc2.sh
index 1763a6d..57f92ea 100755
--- a/t/condinc2.sh
+++ b/t/condinc2.sh
@@ -16,7 +16,7 @@
 
 # Another test of conditional include statements.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TOBE], [false])
diff --git a/t/condlib.sh b/t/condlib.sh
index ea8e679..dd7603c 100755
--- a/t/condlib.sh
+++ b/t/condlib.sh
@@ -17,7 +17,7 @@
 # Test for bug with conditional library.
 # From Harlan Stenn.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
diff --git a/t/condman2.sh b/t/condman2.sh
index ad97abc..8f79e0e 100755
--- a/t/condman2.sh
+++ b/t/condman2.sh
@@ -16,7 +16,7 @@
 
 # Make sure appropriate man install targets generated in all cases.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 man_MANS = foo.1 foo.2
diff --git a/t/condman3.sh b/t/condman3.sh
index aa02543..5992499 100755
--- a/t/condman3.sh
+++ b/t/condman3.sh
@@ -16,7 +16,7 @@
 
 # Make sure conditionals work with man pages.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [test x"$FOO" = x"true"])
diff --git a/t/confdeps.sh b/t/confdeps.sh
index 23d9cad..5286e79 100755
--- a/t/confdeps.sh
+++ b/t/confdeps.sh
@@ -16,7 +16,7 @@
 
 # Make sure that config* files are properly regenerated.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo "FOO = foo" > Makefile.am
 
diff --git a/t/conff.sh b/t/conff.sh
index b6f9081..7456207 100755
--- a/t/conff.sh
+++ b/t/conff.sh
@@ -17,7 +17,7 @@
 # Make sure rebuild rules work even when AC_CONFIG_FILES uses colons.
 # Report from Alexander Turbov.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([bar/Makefile:bar/Makefile.in:Makefile.bot])
diff --git a/t/conff2.sh b/t/conff2.sh
index 728d78e..9c51849 100755
--- a/t/conff2.sh
+++ b/t/conff2.sh
@@ -16,10 +16,10 @@
 
 # Make sure empty calls to AC_CONFIG_FILES or AC_CONFIG_HEADERS are diagnosed.
 
-. ./defs || exit 1
+. test-init.sh
 
-# We avoid using configure.ac stub initialized by ./defs, since we need
-# to keep track of line numbers (to grep for error messages).
+# We avoid using configure.ac stub initialized by our testsuite setup, as
+# we need to keep track of line numbers (to grep for error messages).
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
diff --git a/t/conffile-leading-dot.sh b/t/conffile-leading-dot.sh
index 2146183..b55b987 100755
--- a/t/conffile-leading-dot.sh
+++ b/t/conffile-leading-dot.sh
@@ -18,7 +18,7 @@
 # with a dot (like "./Makefile"), since the remake rules might be subtly
 # broken in that case.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/confh-internals.sh b/t/confh-internals.sh
index eca43b7..309f3a7 100755
--- a/t/confh-internals.sh
+++ b/t/confh-internals.sh
@@ -16,7 +16,7 @@
 
 # Check internal make variable populated from AC_CONFIG_HEADERS calls.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_SUBST([BOT], [bot])
diff --git a/t/confh-subdir-clean.sh b/t/confh-subdir-clean.sh
index 75024f6..0572034 100755
--- a/t/confh-subdir-clean.sh
+++ b/t/confh-subdir-clean.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure config headers in subdirectories are cleaned.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_HEADERS([sub/config.h:sub/config.hin])
diff --git a/t/confh.sh b/t/confh.sh
index 03b5a0b..5090705 100755
--- a/t/confh.sh
+++ b/t/confh.sh
@@ -17,7 +17,7 @@
 # Test to make sure config.h works in a subdir.
 # Report from Alexandre Oliva.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_HEADERS([include/config.h])
diff --git a/t/confh4.sh b/t/confh4.sh
index 9331fcb..16dbf2c 100755
--- a/t/confh4.sh
+++ b/t/confh4.sh
@@ -24,7 +24,7 @@
 # Also check that our preprocessing code is smart enough not to pass
 # repeated '-I<DIR>' options on the compiler command line.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([include/Makefile sub/Makefile])
diff --git a/t/confh5.sh b/t/confh5.sh
index 354c88c..c6c3e25 100755
--- a/t/confh5.sh
+++ b/t/confh5.sh
@@ -16,7 +16,7 @@
 
 # Make sure we do not distribute header sources when they are built.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([FOO], [NameToBeGrepped])
diff --git a/t/confh6.sh b/t/confh6.sh
index fa6aab4..4db74b5 100755
--- a/t/confh6.sh
+++ b/t/confh6.sh
@@ -18,7 +18,7 @@
 # idea is that if config.h is in a subdir, and there is no Makefile in
 # that subdir, then we want to build config.h as the top level.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_HEADERS([subdir/config.h])
diff --git a/t/confh7.sh b/t/confh7.sh
index dc80ae0..4d3bbbb 100755
--- a/t/confh7.sh
+++ b/t/confh7.sh
@@ -17,7 +17,7 @@
 # Test to make sure several config headers are allowed.
 # See also sister "semantic" test 'confh8.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_HEADERS([config.h two.h])
diff --git a/t/confh8.sh b/t/confh8.sh
index 16479cf..af5543a 100755
--- a/t/confh8.sh
+++ b/t/confh8.sh
@@ -17,7 +17,7 @@
 # Test to make sure several config headers are allowed.
 # See also sister "minimalistic" test 'confh7.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_HEADERS([one.h two.h])
diff --git a/t/confincl.sh b/t/confincl.sh
index 4527a14..c106d6b 100755
--- a/t/confincl.sh
+++ b/t/confincl.sh
@@ -18,7 +18,7 @@
 # If config.h is not used, @CONFIG_INCLUDE_SPEC@ should not appear
 # in Makefile.in.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/conflnk.sh b/t/conflnk.sh
index 8446ac8..7b316a7 100755
--- a/t/conflnk.sh
+++ b/t/conflnk.sh
@@ -17,7 +17,7 @@
 # Test to make sure links created by AC_CONFIG_LINKS get removed with
 # 'make distclean'
 
-. ./defs || exit 1
+. test-init.sh
 
 echo 'SUBDIRS = sdir' > Makefile.am
 : > src
diff --git a/t/conflnk2.sh b/t/conflnk2.sh
index e9d00e0..8271f38 100755
--- a/t/conflnk2.sh
+++ b/t/conflnk2.sh
@@ -17,7 +17,7 @@
 # Test to make sure that sources for links created by AC_CONFIG_LINKS
 # are distributed.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo SUBDIRS = sdir > Makefile.am
 
diff --git a/t/conflnk3.sh b/t/conflnk3.sh
index a0b8842..1f844fd 100755
--- a/t/conflnk3.sh
+++ b/t/conflnk3.sh
@@ -17,7 +17,7 @@
 # Test to make sure that AC_CONFIG_LINKS using a variable source
 # is not broken.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 SUBDIRS = sdir
diff --git a/t/conflnk4.sh b/t/conflnk4.sh
index 090f809..d879fbf 100755
--- a/t/conflnk4.sh
+++ b/t/conflnk4.sh
@@ -17,7 +17,7 @@
 # Test to make sure links to _identical files_ created by AC_CONFIG_LINKS get
 # removed with 'make distclean' only if doing a VPATH build.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir nonmk-subdir sdir sdir/mk-subdir
 : > src
diff --git a/t/confsub.sh b/t/confsub.sh
index de21d51..6ab6a2f 100755
--- a/t/confsub.sh
+++ b/t/confsub.sh
@@ -17,7 +17,7 @@
 # Test to make sure config.h can be in subdir.
 # Also, make sure config.h is properly rebuilt.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
diff --git a/t/confvar.sh b/t/confvar.sh
index 39739d9..28e9e06 100755
--- a/t/confvar.sh
+++ b/t/confvar.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure configure_vars stuff works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([QBERT])
diff --git a/t/confvar2.sh b/t/confvar2.sh
index fc78f6e..cada470 100755
--- a/t/confvar2.sh
+++ b/t/confvar2.sh
@@ -16,7 +16,7 @@
 
 # Test for bug reported by Jim Meyering.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([OTHER_SCRIPTS])
diff --git a/t/copy.sh b/t/copy.sh
index 64a829d..04cb94c 100755
--- a/t/copy.sh
+++ b/t/copy.sh
@@ -17,7 +17,7 @@
 # Test to make sure '-c' works.  Report from Andris Pavenis.
 # See also the much more in-depth test 'add-missing'.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We'll have to cater to systems like MSYS/MinGW where there are no
 # true symlinks ('ln -s' behaves like 'cp -p'); see automake bug#10441.
diff --git a/t/cscope.tap b/t/cscope.tap
index 31e8268..78db791 100755
--- a/t/cscope.tap
+++ b/t/cscope.tap
@@ -16,7 +16,7 @@
 
 # Test cscope functionality.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 18
 
diff --git a/t/cscope2.sh b/t/cscope2.sh
index 631642f..16419a7 100755
--- a/t/cscope2.sh
+++ b/t/cscope2.sh
@@ -17,7 +17,7 @@
 # The 'cscope' target should not fail if there are no sources.
 
 required=
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/cscope3.sh b/t/cscope3.sh
index 30e8c0c..a7468f8 100755
--- a/t/cscope3.sh
+++ b/t/cscope3.sh
@@ -19,7 +19,7 @@
 # is empty.
 
 required=cscope
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/ctags.sh b/t/ctags.sh
index 77c59cc..82905c2 100755
--- a/t/ctags.sh
+++ b/t/ctags.sh
@@ -17,7 +17,7 @@
 # Test vi-style tags.
 
 required=${CTAGS:=ctags}
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [false])
diff --git a/t/cxx-demo.sh b/t/cxx-demo.sh
index 77f7c83..6caae27 100755
--- a/t/cxx-demo.sh
+++ b/t/cxx-demo.sh
@@ -18,7 +18,7 @@
 
 required=c++
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([GNU C++ Demo], [1.3], address@hidden)
diff --git a/t/cxx-fortran.sh b/t/cxx-fortran.sh
index 7b7e9cb..ca6b9b1 100755
--- a/t/cxx-fortran.sh
+++ b/t/cxx-fortran.sh
@@ -18,7 +18,7 @@
 
 # For now, require the GNU compilers, to avoid possible spurious failure.
 required='gfortran g++'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/cxx-lt-demo.sh b/t/cxx-lt-demo.sh
index 8dbbe18..41ce2fc 100755
--- a/t/cxx-lt-demo.sh
+++ b/t/cxx-lt-demo.sh
@@ -18,7 +18,7 @@
 
 required='libtoolize c++'
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([GNU C++/Libtool Demo], [0.73], address@hidden)
diff --git a/t/cxx2.sh b/t/cxx2.sh
index 7ffba4e..4abcefc 100755
--- a/t/cxx2.sh
+++ b/t/cxx2.sh
@@ -16,7 +16,7 @@
 
 # Test that Automake suggests using AC_PROG_CXX if C++ sources are used.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_PROG_CC >>configure.ac
 
diff --git a/t/cxxcpp.sh b/t/cxxcpp.sh
index cd5d392..dca17c7 100755
--- a/t/cxxcpp.sh
+++ b/t/cxxcpp.sh
@@ -16,7 +16,7 @@
 
 # Make sure automake sees AC_PROG_CXXCPP.  From Garth Corral.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXXCPP
diff --git a/t/cxxlibobj.sh b/t/cxxlibobj.sh
index b6d0231..7c95a4f 100755
--- a/t/cxxlibobj.sh
+++ b/t/cxxlibobj.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure LIBOBJS and C++ sources work right.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/cxxlink.sh b/t/cxxlink.sh
index ff271c3..734dc75 100755
--- a/t/cxxlink.sh
+++ b/t/cxxlink.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure C++ linker is used when appropriate.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/cygnus-no-more.sh b/t/cygnus-no-more.sh
index 66ef57d..33803b1 100755
--- a/t/cygnus-no-more.sh
+++ b/t/cygnus-no-more.sh
@@ -18,7 +18,7 @@
 # That feature will be removed in the next major Automake release.
 # See automake bug#11034.
 
-. ./defs || exit 1
+. test-init.sh
 
 warn_rx='support for Cygnus.*trees.*removed'
 
diff --git a/t/cygwin32.sh b/t/cygwin32.sh
index 95b442e..7163884 100755
--- a/t/cygwin32.sh
+++ b/t/cygwin32.sh
@@ -16,7 +16,7 @@
 
 # Test basic Cygwin32 functionality.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/dash.sh b/t/dash.sh
index 6c9c9e0..4cf34f3 100755
--- a/t/dash.sh
+++ b/t/dash.sh
@@ -17,7 +17,7 @@
 # Test to make sure '-' can be used in path.
 # Report from Matthew D. Langston.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 include Make-lang
diff --git a/t/defun.sh b/t/defun.sh
index 5a4530c..0f6bd0a 100755
--- a/t/defun.sh
+++ b/t/defun.sh
@@ -16,7 +16,7 @@
 
 # Make sure aclocal picks up on all macro definitions.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > acinclude.m4 << 'END'
 AC_DEFUN([AM_FUNC_THREE])
diff --git a/t/defun2.sh b/t/defun2.sh
index 2c74cc4..cb1cee7 100755
--- a/t/defun2.sh
+++ b/t/defun2.sh
@@ -17,7 +17,7 @@
 # Make sure we don't mistake a macro definition for an invocation.
 # From Jim Meyering.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 dnl if buggy this will require getloadavg.c
diff --git a/t/dejagnu-absolute-builddir.sh b/t/dejagnu-absolute-builddir.sh
index 22f7cc5..6b873d0 100755
--- a/t/dejagnu-absolute-builddir.sh
+++ b/t/dejagnu-absolute-builddir.sh
@@ -18,7 +18,7 @@
 # to an absolute path.
 
 required=runtest
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/dejagnu-relative-srcdir.sh b/t/dejagnu-relative-srcdir.sh
index 9fdf179..141f56e 100755
--- a/t/dejagnu-relative-srcdir.sh
+++ b/t/dejagnu-relative-srcdir.sh
@@ -18,7 +18,7 @@
 # (both as TCL variable and as environment variable).
 
 required=runtest
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/dejagnu-siteexp-append.sh b/t/dejagnu-siteexp-append.sh
index c980c85..07254ca 100755
--- a/t/dejagnu-siteexp-append.sh
+++ b/t/dejagnu-siteexp-append.sh
@@ -17,7 +17,7 @@
 # Check that the files in $(EXTRA_DEJAGNU_SITE_CONFIG) get appended to
 # site.exp in the same order in which they're listed in that variable.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/dejagnu-siteexp-extend.sh b/t/dejagnu-siteexp-extend.sh
index 45d8a22..8c16c54 100755
--- a/t/dejagnu-siteexp-extend.sh
+++ b/t/dejagnu-siteexp-extend.sh
@@ -18,7 +18,7 @@
 # automake-generated Makefile.
 
 required=runtest
-. ./defs || exit 1
+. test-init.sh
 
 write_check_for ()
 {
diff --git a/t/dejagnu-siteexp-useredit.sh b/t/dejagnu-siteexp-useredit.sh
index 42f4d44..207d8a1 100755
--- a/t/dejagnu-siteexp-useredit.sh
+++ b/t/dejagnu-siteexp-useredit.sh
@@ -17,7 +17,7 @@
 # Check that the user can edit the Makefile-generated site.exp, and
 # have its edits survive to the remaking of that file.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/dejagnu2.sh b/t/dejagnu2.sh
index 51f23fb..cc04212 100755
--- a/t/dejagnu2.sh
+++ b/t/dejagnu2.sh
@@ -16,7 +16,7 @@
 
 # Make sure we don't override the user's site.exp rule.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/dejagnu3.sh b/t/dejagnu3.sh
index 42345be..4b25805 100755
--- a/t/dejagnu3.sh
+++ b/t/dejagnu3.sh
@@ -17,7 +17,7 @@
 # Check that the DejaGnu rules work for a simple program and test case.
 
 required=runtest
-. ./defs || exit 1
+. test-init.sh
 
 cat > hammer << 'END'
 #! /bin/sh
diff --git a/t/dejagnu4.sh b/t/dejagnu4.sh
index 655218b..18119b0 100755
--- a/t/dejagnu4.sh
+++ b/t/dejagnu4.sh
@@ -24,7 +24,7 @@
 #   previous tools, but at first glance "make check" has passed.
 
 required=runtest
-. ./defs || exit 1
+. test-init.sh
 
 cat > hammer << 'END'
 #! /bin/sh
diff --git a/t/dejagnu5.sh b/t/dejagnu5.sh
index d64a7f2..816a652 100755
--- a/t/dejagnu5.sh
+++ b/t/dejagnu5.sh
@@ -18,7 +18,7 @@
 # the package by default.
 
 required=runtest
-. ./defs || exit 1
+. test-init.sh
 
 package=$me
 
diff --git a/t/dejagnu6.sh b/t/dejagnu6.sh
index 80ff027..71998cc 100755
--- a/t/dejagnu6.sh
+++ b/t/dejagnu6.sh
@@ -17,7 +17,7 @@
 # Check that "make check" fails, when a DejaGnu test fails.
 
 required=runtest
-. ./defs || exit 1
+. test-init.sh
 
 cat > faildeja << 'END'
 #! /bin/sh
diff --git a/t/dejagnu7.sh b/t/dejagnu7.sh
index d34931b..17e5a18 100755
--- a/t/dejagnu7.sh
+++ b/t/dejagnu7.sh
@@ -18,7 +18,7 @@
 # (to detect TCL errors) on a file with TCL errors.
 
 required=runtest
-. ./defs || exit 1
+. test-init.sh
 
 runtest --help | grep '.*--status' \
   || skip_ "dejagnu lacks support for '--status'"
diff --git a/t/deleted-am.sh b/t/deleted-am.sh
index d3d2616..33e02e6 100755
--- a/t/deleted-am.sh
+++ b/t/deleted-am.sh
@@ -19,7 +19,7 @@
 # erroring out when a still-required file is missing.
 # See also discussion about automake bug#9768.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/deleted-m4.sh b/t/deleted-m4.sh
index a5fb0e8..b9f096f 100755
--- a/t/deleted-m4.sh
+++ b/t/deleted-m4.sh
@@ -19,7 +19,7 @@
 # erroring out when a still-required file is missing.
 # See also discussion about automake bug#9768.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 m4_include([foobar.m4])
diff --git a/t/depacl2.sh b/t/depacl2.sh
index 897a5a2..c7fd85e 100755
--- a/t/depacl2.sh
+++ b/t/depacl2.sh
@@ -17,7 +17,7 @@
 # Test to make sure dependencies work when required macro is part of
 # autoconf.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo 'AM_FOO' >> configure.ac
 echo 'AC_DEFUN([AM_FOO], [AC_REQUIRE([AC_HEADER_STDC])])' > AM_FOO.m4
diff --git a/t/depcomp-implicit-auxdir.sh b/t/depcomp-implicit-auxdir.sh
index fed6d95..919f09c 100755
--- a/t/depcomp-implicit-auxdir.sh
+++ b/t/depcomp-implicit-auxdir.sh
@@ -17,7 +17,7 @@
 # Make sure a top-level depcomp file is found when
 # AC_CONFIG_AUX_DIR is not specified.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir lib src
 
diff --git a/t/depcomp-recover.sh b/t/depcomp-recover.sh
index 77775f6..441e76d 100755
--- a/t/depcomp-recover.sh
+++ b/t/depcomp-recover.sh
@@ -20,7 +20,7 @@
 #    removed.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/depcomp.sh b/t/depcomp.sh
index 63c702f..33c293d 100755
--- a/t/depcomp.sh
+++ b/t/depcomp.sh
@@ -17,7 +17,7 @@
 # Test to make sure depcomp is installed and found properly
 # when required for multiple directories.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/depcomp2.sh b/t/depcomp2.sh
index c29d9cd..a00236f 100755
--- a/t/depcomp2.sh
+++ b/t/depcomp2.sh
@@ -18,7 +18,7 @@
 # From Pavel Roskin.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
diff --git a/t/depcomp8a.sh b/t/depcomp8a.sh
index a9a6aa0..bbb8e75 100755
--- a/t/depcomp8a.sh
+++ b/t/depcomp8a.sh
@@ -20,7 +20,7 @@
 # same thing for libtool objects.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/depcomp8b.sh b/t/depcomp8b.sh
index 1d796b1..32aa81b 100755
--- a/t/depcomp8b.sh
+++ b/t/depcomp8b.sh
@@ -20,7 +20,7 @@
 # same thing for non-libtool objects.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/depdist.sh b/t/depdist.sh
index e8baf26..a712f25 100755
--- a/t/depdist.sh
+++ b/t/depdist.sh
@@ -18,7 +18,7 @@
 # From Eric Magnien.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 rm -f configure.ac
 
diff --git a/t/depend.sh b/t/depend.sh
index 83add10..7c88a16 100755
--- a/t/depend.sh
+++ b/t/depend.sh
@@ -18,7 +18,7 @@
 # In some cases the auto-dependency can get confused and try
 # to '-include' a directory (if a backslash-newline appears in _SOURCES).
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
diff --git a/t/depend3.sh b/t/depend3.sh
index 65f83ce..fddc968 100755
--- a/t/depend3.sh
+++ b/t/depend3.sh
@@ -16,7 +16,7 @@
 
 # Test _DEPENDENCIES variable.  From Lee Iverson.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/depend4.sh b/t/depend4.sh
index c9f4a79..142f06d 100755
--- a/t/depend4.sh
+++ b/t/depend4.sh
@@ -16,7 +16,7 @@
 
 # Check that dependencies are included when there are many header files.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
diff --git a/t/deprecated-acinit.sh b/t/deprecated-acinit.sh
index 516b139..60b3e5a 100755
--- a/t/deprecated-acinit.sh
+++ b/t/deprecated-acinit.sh
@@ -17,7 +17,7 @@
 # Check that automake and autoconf complain about an old-style AC_INIT
 # call used with a new-style AM_AUTOMAKE_INIT call.
 
-. ./defs || exit 1
+. test-init.sh
 
 : > Makefile.am
 
diff --git a/t/destdir.sh b/t/destdir.sh
index f10480b..6b27984 100755
--- a/t/destdir.sh
+++ b/t/destdir.sh
@@ -21,7 +21,7 @@
 # It will only work for non-root users.
 required='ro-dir'
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_OUTPUT
diff --git a/t/dirlist-abspath.sh b/t/dirlist-abspath.sh
index 3c25fba..d90c1dc 100755
--- a/t/dirlist-abspath.sh
+++ b/t/dirlist-abspath.sh
@@ -17,7 +17,7 @@
 # Check use of absolute paths in dirlist.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 mkdir acdir-more sub sub/acdir
 echo "$(pwd)/acdir-more" > sub/acdir/dirlist
diff --git a/t/dirlist.sh b/t/dirlist.sh
index 319726c..2dc9038 100755
--- a/t/dirlist.sh
+++ b/t/dirlist.sh
@@ -16,7 +16,7 @@
 
 # Check dirlist support.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<EOF
 AC_INIT([$me], [1.0])
@@ -50,8 +50,7 @@ grep m4_include aclocal.m4 && exit 1
 grep 'GUILE-VERSION' configure
 
 # This bug can occur only when we do a VPATH build of Automake
-# (because of the '-I' passed to aclocal in tests/defs/aclocal.in) but
-# it's OK because VPATH builds are done by 'make distcheck'.
+# but it's OK because VPATH builds are done by 'make distcheck'.
 grep 'I should not be included' configure && exit 1
 
 :
diff --git a/t/dirlist2.sh b/t/dirlist2.sh
index 26320f6..a678252 100755
--- a/t/dirlist2.sh
+++ b/t/dirlist2.sh
@@ -16,7 +16,7 @@
 
 # Check dirlist globbing support.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<EOF
 AC_INIT([$me], [1.0])
diff --git a/t/discover.sh b/t/discover.sh
index 4ecf2ef..df11ca3 100755
--- a/t/discover.sh
+++ b/t/discover.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure LIBOBJS file cannot be mentioned explicitly.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
diff --git a/t/dist-auxdir-many-subdirs.sh b/t/dist-auxdir-many-subdirs.sh
index 4937a14..334e3bd 100755
--- a/t/dist-auxdir-many-subdirs.sh
+++ b/t/dist-auxdir-many-subdirs.sh
@@ -19,7 +19,7 @@
 
 am_create_testdir=empty
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 count=0
 ocwd=$(pwd) || fatal_ "cannot get current working directory"
diff --git a/t/dist-auxfile-2.sh b/t/dist-auxfile-2.sh
index 06e5f8a..07dc60e 100755
--- a/t/dist-auxfile-2.sh
+++ b/t/dist-auxfile-2.sh
@@ -20,7 +20,7 @@
 # Related to automake bug#9651.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/dist-auxfile.sh b/t/dist-auxfile.sh
index 763b14e..c4fd750 100755
--- a/t/dist-auxfile.sh
+++ b/t/dist-auxfile.sh
@@ -20,7 +20,7 @@
 # directory was set to '.' by AC_CONFIG_AUX_DIR.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 i=0
 for auxdir in build-aux ''; do
diff --git a/t/dist-formats.tap b/t/dist-formats.tap
index 5737227..50b0e43 100755
--- a/t/dist-formats.tap
+++ b/t/dist-formats.tap
@@ -17,7 +17,7 @@
 # Check support for different compression formats used by distribution
 # archives.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 18
 
diff --git a/t/dist-included-parent-dir.sh b/t/dist-included-parent-dir.sh
index aed1051..6c225a9 100755
--- a/t/dist-included-parent-dir.sh
+++ b/t/dist-included-parent-dir.sh
@@ -16,7 +16,7 @@
 
 # Make sure included files in parent directory are distributed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/dist-many.sh b/t/dist-many.sh
index 580d79a..a019250 100755
--- a/t/dist-many.sh
+++ b/t/dist-many.sh
@@ -19,7 +19,7 @@
 # sister test 'dist-many2.sh', which fakes an artificially low
 # command line length limit for 'mkdir' and the shell.
 
-. ./defs || exit 1
+. test-init.sh
 
 expensive_
 
diff --git a/t/dist-many2.sh b/t/dist-many2.sh
index 90c527b..8ff839c 100755
--- a/t/dist-many2.sh
+++ b/t/dist-many2.sh
@@ -21,7 +21,7 @@
 # The sister test 'dist-many.sh' try to hit the real command line length
 # limit of the system, by declaring a huge number of files to be cleaned.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir bin
 
diff --git a/t/dist-missing-am.sh b/t/dist-missing-am.sh
index df5801a..c841bcb 100755
--- a/t/dist-missing-am.sh
+++ b/t/dist-missing-am.sh
@@ -19,7 +19,7 @@
 # required '.am' file from a distribution tarball.
 # See discussion about automake bug#9768.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/dist-missing-included-m4.sh b/t/dist-missing-included-m4.sh
index 57de724..e6afd47 100755
--- a/t/dist-missing-included-m4.sh
+++ b/t/dist-missing-included-m4.sh
@@ -20,7 +20,7 @@
 # See discussion about automake bug#9768.
 # See also sister test 'dist-missing-m4.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 m4_include([foobar.m4])
diff --git a/t/dist-missing-m4.sh b/t/dist-missing-m4.sh
index 609f941..367c11a 100755
--- a/t/dist-missing-m4.sh
+++ b/t/dist-missing-m4.sh
@@ -20,7 +20,7 @@
 # See discussion about automake bug#9768.
 # See also sister test 'dist-missing-included-m4.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 m4_pattern_forbid([^MY_])
diff --git a/t/dist-obsolete-opts.sh b/t/dist-obsolete-opts.sh
index 06bea8d..8e5e846 100755
--- a/t/dist-obsolete-opts.sh
+++ b/t/dist-obsolete-opts.sh
@@ -16,7 +16,7 @@
 
 # Obsolete 'dist-*' and 'no-dist-gzip' options.
 
-. ./defs || exit 1
+. test-init.sh
 
 $ACLOCAL
 
diff --git a/t/dist-pr109765.sh b/t/dist-pr109765.sh
index 50085a6..5c47669 100755
--- a/t/dist-pr109765.sh
+++ b/t/dist-pr109765.sh
@@ -19,7 +19,7 @@
 # so that the latter ones fail.
 
 required=bzip2
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 : > Makefile.am
diff --git a/t/dist-readonly.sh b/t/dist-readonly.sh
index b7b0e0e..ab000ee 100755
--- a/t/dist-readonly.sh
+++ b/t/dist-readonly.sh
@@ -20,7 +20,7 @@
 # This test expect the user to be unable to write on files lacking
 # write permissions -- so it won't work if the user is 'root'.
 required='non-root cc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/dist-repeated.sh b/t/dist-repeated.sh
index db5cf4f..303d1cf 100755
--- a/t/dist-repeated.sh
+++ b/t/dist-repeated.sh
@@ -18,7 +18,7 @@
 # The distdir target should take care of not copying it more than one
 # time anyway.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/dist-srcdir.sh b/t/dist-srcdir.sh
index 64cdcd8..28e55b6 100755
--- a/t/dist-srcdir.sh
+++ b/t/dist-srcdir.sh
@@ -17,7 +17,7 @@
 # We use EXTRA_DIST to distribute stuff *explicitly* from the srcdir.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 ocwd=$(pwd) || fatal_ "cannot get current working directory"
 
diff --git a/t/dist-srcdir2.sh b/t/dist-srcdir2.sh
index 52146cd..7dfd984 100755
--- a/t/dist-srcdir2.sh
+++ b/t/dist-srcdir2.sh
@@ -21,7 +21,7 @@
 # limitation should be explained in depth in comments in file
 # 'lib/am/distdir.am').
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/distcheck-configure-flags-am.sh 
b/t/distcheck-configure-flags-am.sh
index f01a9b2..c7cd595 100755
--- a/t/distcheck-configure-flags-am.sh
+++ b/t/distcheck-configure-flags-am.sh
@@ -17,7 +17,7 @@
 # Check support for AM_DISTCHECK_CONFIGURE_FLAGS at "make distcheck"
 # time, and its interactions with DISTCHECK_CONFIGURE_FLAGS.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
diff --git a/t/distcheck-configure-flags-subpkg.sh 
b/t/distcheck-configure-flags-subpkg.sh
index 567dd58..c08db58 100755
--- a/t/distcheck-configure-flags-subpkg.sh
+++ b/t/distcheck-configure-flags-subpkg.sh
@@ -20,7 +20,7 @@
 # passed down to the configure script of the subpackage.  This is
 # explicitly documented in the manual.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SUBDIRS([subpkg])
diff --git a/t/distcheck-configure-flags.sh b/t/distcheck-configure-flags.sh
index 998c43d..aecb8b2 100755
--- a/t/distcheck-configure-flags.sh
+++ b/t/distcheck-configure-flags.sh
@@ -16,7 +16,7 @@
 
 # Check support for DISTCHECK_CONFIGURE_FLAGS at "make distcheck" time.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
diff --git a/t/distcheck-hook.sh b/t/distcheck-hook.sh
index f806e4b..2e40236 100755
--- a/t/distcheck-hook.sh
+++ b/t/distcheck-hook.sh
@@ -16,7 +16,7 @@
 
 # Check basic support for distcheck-hook.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/distcheck-hook2.sh b/t/distcheck-hook2.sh
index de4c155..cb0d416 100755
--- a/t/distcheck-hook2.sh
+++ b/t/distcheck-hook2.sh
@@ -18,7 +18,7 @@
 # Automake, and that a used-defined 'distcheck-hook' is *not* honored
 # in a subpackage Makefile.am.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SUBDIRS([subpkg])
diff --git a/t/distcheck-missing-m4.sh b/t/distcheck-missing-m4.sh
index b266918..0eb69f0 100755
--- a/t/distcheck-missing-m4.sh
+++ b/t/distcheck-missing-m4.sh
@@ -18,7 +18,7 @@
 # missing from the dist tarball (interaction with '--install').
 # See automake bug#9037.
 
-. ./defs || exit 1
+. test-init.sh
 
 cwd=$(pwd) || fatal_ "cannot get current working directory"
 
diff --git a/t/distcheck-outdated-m4.sh b/t/distcheck-outdated-m4.sh
index 3c3336c..2d2a6b0 100755
--- a/t/distcheck-outdated-m4.sh
+++ b/t/distcheck-outdated-m4.sh
@@ -18,7 +18,7 @@
 # files in a dist tarball (interaction with '--install').
 # See automake bug#9037.
 
-. ./defs || exit 1
+. test-init.sh
 
 cwd=$(pwd) || fatal_ "cannot get current working directory"
 
diff --git a/t/distcheck-override-infodir.sh b/t/distcheck-override-infodir.sh
index 01ddad6..fa933c6 100755
--- a/t/distcheck-override-infodir.sh
+++ b/t/distcheck-override-infodir.sh
@@ -18,7 +18,7 @@
 # working.  Related to automake bug#9579.
 
 required='makeinfo tex texi2dvi install-info'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/distcheck-pr10470.sh b/t/distcheck-pr10470.sh
index a030f90..eaf3a5f 100755
--- a/t/distcheck-pr10470.sh
+++ b/t/distcheck-pr10470.sh
@@ -19,7 +19,7 @@
 # by a process (e.g., that is its "current working directory").
 # See automake bug#10470.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir foo.d
 sh -c "cd foo.d && sleep '4'" &
diff --git a/t/distcheck-pr9579.sh b/t/distcheck-pr9579.sh
index 58c9b6e..a2a0b15 100755
--- a/t/distcheck-pr9579.sh
+++ b/t/distcheck-pr9579.sh
@@ -17,7 +17,7 @@
 # Check against automake bug#9579: distcheck does not always detect
 # incomplete uninstall as advertised.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/distcheck-writable-srcdir.sh b/t/distcheck-writable-srcdir.sh
index 034dc1e..4dfd21f 100755
--- a/t/distcheck-writable-srcdir.sh
+++ b/t/distcheck-writable-srcdir.sh
@@ -21,7 +21,7 @@
 # case too (since it doesn't cost us anything but this test).
 # See automake bug#10878.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/distcleancheck.sh b/t/distcleancheck.sh
index 5cdd6f1..213ee4e 100755
--- a/t/distcleancheck.sh
+++ b/t/distcleancheck.sh
@@ -18,7 +18,7 @@
 # The example Makefile.am we use is from the FAQ entry 'distcleancheck'.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/distcom-subdir.sh b/t/distcom-subdir.sh
index 3774a75..9b2f7f4 100755
--- a/t/distcom-subdir.sh
+++ b/t/distcom-subdir.sh
@@ -18,7 +18,7 @@
 # by a subdir Makefile.am, it is distributed by that Makefile.am.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
diff --git a/t/distcom3.sh b/t/distcom3.sh
index b1fcd8b..ead374f 100755
--- a/t/distcom3.sh
+++ b/t/distcom3.sh
@@ -17,7 +17,7 @@
 # Test to make sure that non-existing common files are distributed
 # if they are buildable.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/distcom4.sh b/t/distcom4.sh
index 6c1cfb2..e2c917c 100755
--- a/t/distcom4.sh
+++ b/t/distcom4.sh
@@ -19,7 +19,7 @@
 # Makefile in that directory.  'distcom5.sh' performs the same
 # test with a Makefile in the directory.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
    AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
diff --git a/t/distcom5.sh b/t/distcom5.sh
index 23b48e8..43753bc 100755
--- a/t/distcom5.sh
+++ b/t/distcom5.sh
@@ -19,7 +19,7 @@
 # a Makefile in that directory.  'distcom4.sh' performs the same
 # test without Makefile in the directory.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
    AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
diff --git a/t/distdir.sh b/t/distdir.sh
index 0f46625..f586f1d 100755
--- a/t/distdir.sh
+++ b/t/distdir.sh
@@ -19,7 +19,7 @@
 # Also test the situation where the list of distributed files contains
 # a directory and a file in it, and repeated directories.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/disthook.sh b/t/disthook.sh
index 6fefacb..68e6f10 100755
--- a/t/disthook.sh
+++ b/t/disthook.sh
@@ -16,7 +16,7 @@
 
 # Check that 'dist-hook' works.  See automake bug#10878.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/distlinks.sh b/t/distlinks.sh
index 7d05b6e..35b8f3f 100755
--- a/t/distlinks.sh
+++ b/t/distlinks.sh
@@ -17,7 +17,7 @@
 # Check that distributed symlinks in the source tree will be expanded
 # as regular files in $(distdir).
 
-. ./defs || exit 1
+. test-init.sh
 
 echo text > file
 
diff --git a/t/distlinksbrk.sh b/t/distlinksbrk.sh
index c863ec8..a4411e8 100755
--- a/t/distlinksbrk.sh
+++ b/t/distlinksbrk.sh
@@ -17,7 +17,7 @@
 # Check that distributed broken symlinks cause 'make dist' to fail, and
 # to do so with (mostly) meaningful diagnostic.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We need, for our broken symlinks, names that make it hard to get false
 # positives when grepping make output to look for them.
diff --git a/t/distname.sh b/t/distname.sh
index 19806ce..0b1b541 100755
--- a/t/distname.sh
+++ b/t/distname.sh
@@ -18,7 +18,7 @@
 # From Rainer Orth.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SRCDIR([a.c])
diff --git a/t/dmalloc.sh b/t/dmalloc.sh
index 3f37eb5..ff2d05e 100755
--- a/t/dmalloc.sh
+++ b/t/dmalloc.sh
@@ -16,7 +16,7 @@
 
 # Simple checks on the 'AM_WITH_DMALLOC' macro.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_HEADERS([config.h])
diff --git a/t/dollar.sh b/t/dollar.sh
index 214345b..430537b 100755
--- a/t/dollar.sh
+++ b/t/dollar.sh
@@ -18,7 +18,7 @@
 # Java people need this.
 # PR/317, reported by Eric Siegerman and Philip Fong.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/double-colon-rules.sh b/t/double-colon-rules.sh
index b6803cc..cb31bc5 100755
--- a/t/double-colon-rules.sh
+++ b/t/double-colon-rules.sh
@@ -19,7 +19,7 @@
 # seen in input Makefile.am, but also that GNU make support of double-colon
 # rules is as reliable and well-working as we expect and need.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/double.sh b/t/double.sh
index 6e1b96f..403e863 100755
--- a/t/double.sh
+++ b/t/double.sh
@@ -17,7 +17,7 @@
 # Test to make sure listing a program twice is ok.
 # Report from Manu Rouat.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
diff --git a/t/dup2.sh b/t/dup2.sh
index 82d341c..12419b9 100755
--- a/t/dup2.sh
+++ b/t/dup2.sh
@@ -16,7 +16,7 @@
 
 # Make sure aclocal only warns about definitions overridden by acinclude.m4.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_FUNC_STRTOD
diff --git a/t/else.sh b/t/else.sh
index 4bf82f6..072a40b 100755
--- a/t/else.sh
+++ b/t/else.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure line numbers are correct in some error reports.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo 'AM_CONDITIONAL(FOO, true)' >> configure.ac
 
diff --git a/t/empty-data-primary.sh b/t/empty-data-primary.sh
index a8e1b16..dd285f0 100755
--- a/t/empty-data-primary.sh
+++ b/t/empty-data-primary.sh
@@ -17,7 +17,7 @@
 # Test for bug where if the list of installables is empty, invalid sh
 # code is generated.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >>configure.ac
 echo 'data_DATA =' >Makefile.am
diff --git a/t/empty-sources-primary.tap b/t/empty-sources-primary.tap
index 3e5b3f4..5f09e6f 100755
--- a/t/empty-sources-primary.tap
+++ b/t/empty-sources-primary.tap
@@ -17,7 +17,7 @@
 # A test for missing _SOURCES variable.  Also test to make sure empty
 # _SOURCES suppresses assumption about default name.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 5
 
diff --git a/t/ensure-dir-exists.sh b/t/ensure-dir-exists.sh
index 9d35470..4c2731a 100755
--- a/t/ensure-dir-exists.sh
+++ b/t/ensure-dir-exists.sh
@@ -17,7 +17,7 @@
 # Test Automake-provided internal macro 'am.cmd.ensure-dir-exists'.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 # Filter out Automake comments.
 grep -v '^##' "$am_amdir"/header-vars.mk > defn.mk \
diff --git a/t/etags.sh b/t/etags.sh
index aa2f0e0..6a3aee1 100755
--- a/t/etags.sh
+++ b/t/etags.sh
@@ -18,7 +18,7 @@
 # François Pinard, and later by Akim Demaille.
 
 required=${ETAGS:=etags}
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [false])
diff --git a/t/exdir.sh b/t/exdir.sh
index 0c249e4..7ebe056 100755
--- a/t/exdir.sh
+++ b/t/exdir.sh
@@ -16,7 +16,7 @@
 
 # Check to make sure new extended directory mechanism works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 htmldir = $(prefix)/html
diff --git a/t/exdir2.sh b/t/exdir2.sh
index cf17f58..ac427da 100755
--- a/t/exdir2.sh
+++ b/t/exdir2.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure undefined directories are invalid.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 quuz_DATA = zot.html
diff --git a/t/exdir3.sh b/t/exdir3.sh
index 6d602cb..e4ed095 100755
--- a/t/exdir3.sh
+++ b/t/exdir3.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure pkgdatadir can be overridden via AC_SUBST.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_SUBST([pkgdatadir], ["FOO"])
diff --git a/t/exeext.sh b/t/exeext.sh
index 409ac75..70398f9 100755
--- a/t/exeext.sh
+++ b/t/exeext.sh
@@ -22,7 +22,7 @@
 # aren't left around.  Report from Jim Meyering.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/exeext2.sh b/t/exeext2.sh
index 956acff..606d81a 100755
--- a/t/exeext2.sh
+++ b/t/exeext2.sh
@@ -16,7 +16,7 @@
 
 # Make sure no-exeext option works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/exeext3.sh b/t/exeext3.sh
index e12462a..6d99904 100755
--- a/t/exeext3.sh
+++ b/t/exeext3.sh
@@ -16,7 +16,7 @@
 
 # Make sure we can override a program rule.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/exeext4.sh b/t/exeext4.sh
index acb16cc..600655b 100755
--- a/t/exeext4.sh
+++ b/t/exeext4.sh
@@ -18,7 +18,7 @@
 # programs, but not to @address@hidden
 
 am_serial_tests=yes
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [test -n "$cond"])
diff --git a/t/exsource.sh b/t/exsource.sh
index d573321..17875a0 100755
--- a/t/exsource.sh
+++ b/t/exsource.sh
@@ -17,7 +17,7 @@
 # Test to make sure EXTRA_..._SOURCES actually works.
 # Bug report from Henrik Frystyk Nielsen.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
diff --git a/t/ext.sh b/t/ext.sh
index 1a198c1..7e5fbc2 100755
--- a/t/ext.sh
+++ b/t/ext.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure extensions are set correctly for various languages.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
diff --git a/t/ext2.sh b/t/ext2.sh
index a6fcf82..d1c5049 100755
--- a/t/ext2.sh
+++ b/t/ext2.sh
@@ -18,7 +18,7 @@
 # Using different extensions for the same language should not
 # output the build rules several times.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CXX
diff --git a/t/extra-portability.sh b/t/extra-portability.sh
index fffd6d3..0303ba3 100755
--- a/t/extra-portability.sh
+++ b/t/extra-portability.sh
@@ -20,7 +20,7 @@
 #   2. '-Wno-portability' must imply '-Wno-extra-portability'.
 #   3. '-Wall' must imply '-Wextra-portability'.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
diff --git a/t/extra-portability2.sh b/t/extra-portability2.sh
index e87dde0..a82fa47 100755
--- a/t/extra-portability2.sh
+++ b/t/extra-portability2.sh
@@ -17,7 +17,7 @@
 # Make sure that extra-portability warnings are not enabled by --gnits,
 # --gnu and --foreign.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
diff --git a/t/extra-programs-empty.sh b/t/extra-programs-empty.sh
index 189fac4..2975d7d 100755
--- a/t/extra-programs-empty.sh
+++ b/t/extra-programs-empty.sh
@@ -18,7 +18,7 @@
 # This check has been introduced in commit 'Release-1-9-254-g9d0eaef'
 # into the former test 'subst2.test'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([Makefile2 Makefile3])
diff --git a/t/extra.sh b/t/extra.sh
index 0993706..2442faf 100755
--- a/t/extra.sh
+++ b/t/extra.sh
@@ -19,7 +19,7 @@
 # targets should always be generated.  However, they should not be
 # built by default.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/extra10.sh b/t/extra10.sh
index f12b076..2932414 100755
--- a/t/extra10.sh
+++ b/t/extra10.sh
@@ -19,7 +19,7 @@
 # See also sister test 'extra11.sh', that checks a similar usage
 # with the involvement of the $(wildcard) GNU make builtin.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/extra11.sh b/t/extra11.sh
index 3f97e6b..3cea106 100755
--- a/t/extra11.sh
+++ b/t/extra11.sh
@@ -17,7 +17,7 @@
 # Check for more complex usage of wildcards in EXTRA_DIST.
 # Suggested by observations from Braden McDaniel.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/extra12.sh b/t/extra12.sh
index 67fa1fe..21278fd 100755
--- a/t/extra12.sh
+++ b/t/extra12.sh
@@ -18,7 +18,7 @@
 # $srcdir != $builddir, if properly declared.
 # Suggested by observations from Braden McDaniel.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/extra2.sh b/t/extra2.sh
index e5576a5..e3eb5a2 100755
--- a/t/extra2.sh
+++ b/t/extra2.sh
@@ -16,7 +16,7 @@
 
 # Check to make sure EXTRA_foo_SOURCES not defined unnecessarily.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/extra3.sh b/t/extra3.sh
index 02ac789..1dd94b5 100755
--- a/t/extra3.sh
+++ b/t/extra3.sh
@@ -16,7 +16,7 @@
 
 # Check to make sure EXTRA_DATA not required.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo 'AC_SUBST(CODICIL)' >> configure.ac
 
diff --git a/t/extra4.sh b/t/extra4.sh
index 286540a..248a25b 100755
--- a/t/extra4.sh
+++ b/t/extra4.sh
@@ -16,7 +16,7 @@
 
 # Check to make sure EXTRA_DATA can be specified.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo 'AC_SUBST(CODICIL)' >> configure.ac
 
diff --git a/t/extra5.sh b/t/extra5.sh
index abe8e13..51bbb50 100755
--- a/t/extra5.sh
+++ b/t/extra5.sh
@@ -17,7 +17,7 @@
 # Check to make sure EXTRA_DIST can contain a directory from $buildir.
 # From Dean Povey.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/extra6.sh b/t/extra6.sh
index b5308af..e3f0a3d 100755
--- a/t/extra6.sh
+++ b/t/extra6.sh
@@ -17,7 +17,7 @@
 # Check to make sure EXTRA_DIST can contain a directory or
 # a subdirectory, in $(builddir) or $(srcdir).
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/extra7.sh b/t/extra7.sh
index b75a0a7..1cd5f6f 100755
--- a/t/extra7.sh
+++ b/t/extra7.sh
@@ -19,7 +19,7 @@
 # $(srcdir)/X and ./X, with the files from the later overriding the
 # files from the former.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/extra8.sh b/t/extra8.sh
index 0a4f818..38234a9 100755
--- a/t/extra8.sh
+++ b/t/extra8.sh
@@ -18,7 +18,7 @@
 # and that referring to the same program with inconsistent addition
 # of $(EXEEXT) works, too.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/extra9.sh b/t/extra9.sh
index c0bb0f3..96c3122 100755
--- a/t/extra9.sh
+++ b/t/extra9.sh
@@ -18,7 +18,7 @@
 # are missing; but only if the former is not AC_SUBSTed itself
 # (lib_LIBRARIES is in the same boat here).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/extradep.sh b/t/extradep.sh
index 75daf2e..18879f3 100755
--- a/t/extradep.sh
+++ b/t/extradep.sh
@@ -17,7 +17,7 @@
 # Test EXTRA_*_DEPENDENCIES.  See extradep2 for libtool variant.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/extradep2.sh b/t/extradep2.sh
index eecf74f..72217e7 100755
--- a/t/extradep2.sh
+++ b/t/extradep2.sh
@@ -17,7 +17,7 @@
 # Test EXTRA_*_DEPENDENCIES, libtool version; see 'extradep.sh'.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/f90only.sh b/t/f90only.sh
index 3d23628..7f938af 100755
--- a/t/f90only.sh
+++ b/t/f90only.sh
@@ -17,7 +17,7 @@
 # Make sure programs with only Fortran 90 source are handled properly.
 # (copied from 'fonly.sh') Mike Nolta <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_FC
diff --git a/t/flavor.sh b/t/flavor.sh
index 058e55f..0085e99 100755
--- a/t/flavor.sh
+++ b/t/flavor.sh
@@ -18,7 +18,7 @@
 # options like '--ignore-deps' and '--silent-rules' are preserved across
 # automake reruns.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/flibs.sh b/t/flibs.sh
index d51849f..10b8e8e 100755
--- a/t/flibs.sh
+++ b/t/flibs.sh
@@ -17,7 +17,7 @@
 # Make sure 'AC_F77_LIBRARY_LDFLAGS' works properly.
 # Matthew D. Langston <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
diff --git a/t/fn99.sh b/t/fn99.sh
index f1351bb..80f9b05 100755
--- a/t/fn99.sh
+++ b/t/fn99.sh
@@ -16,7 +16,7 @@
 
 # Check the filename-length-max=99 option.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/fn99subdir.sh b/t/fn99subdir.sh
index eb289b4..0e73263 100755
--- a/t/fn99subdir.sh
+++ b/t/fn99subdir.sh
@@ -17,7 +17,7 @@
 # PR 507: Check the filename-length-max=99 option
 # in conjunction with AC_CONFIG_SUBDIRS.
 
-. ./defs || exit 1
+. test-init.sh
 
 # The name is so that 99 is exactly hit (including final \0).
 subdirname='cnfsubdir'
diff --git a/t/fonly.sh b/t/fonly.sh
index 9854187..796a093 100755
--- a/t/fonly.sh
+++ b/t/fonly.sh
@@ -17,7 +17,7 @@
 # Make sure programs with only Fortran 77 source are handled properly.
 # Matthew D. Langston <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
diff --git a/t/forcemiss.sh b/t/forcemiss.sh
index 74da2d7..4e00684 100755
--- a/t/forcemiss.sh
+++ b/t/forcemiss.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure that 'automake --force-missing' works.
 
-. ./defs || exit 1
+. test-init.sh
 
 rm -f install-sh
 
diff --git a/t/forcemiss2.sh b/t/forcemiss2.sh
index 8c6369a..17aa06d 100755
--- a/t/forcemiss2.sh
+++ b/t/forcemiss2.sh
@@ -17,7 +17,7 @@
 # Test to make sure that 'automake --force-missing' works, even with
 # symlinked files.
 
-. ./defs || exit 1
+. test-init.sh
 
 rm -f install-sh
 
diff --git a/t/fort1.sh b/t/fort1.sh
index d118e9f..10753e6 100755
--- a/t/fort1.sh
+++ b/t/fort1.sh
@@ -17,7 +17,7 @@
 # Test that Automake suggests using AC_PROG_F77/FC if Fortran sources
 # are used.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >Makefile.am <<END
 bin_PROGRAMS = hello
diff --git a/t/fort2.sh b/t/fort2.sh
index 6afa503..68ae86a 100755
--- a/t/fort2.sh
+++ b/t/fort2.sh
@@ -20,7 +20,7 @@
 # Cf. 'fort1.sh' and 'link_f90_only.sh'.
 
 required=gfortran # Required only in order to run ./configure.
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/fort4.sh b/t/fort4.sh
index 06091e4..99ce16d 100755
--- a/t/fort4.sh
+++ b/t/fort4.sh
@@ -19,7 +19,7 @@
 # For now, require the GNU compilers (to avoid some Libtool/Autoconf
 # issues).
 required='g77 gfortran'
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/fort5.sh b/t/fort5.sh
index 517fb23..e693bec 100755
--- a/t/fort5.sh
+++ b/t/fort5.sh
@@ -19,7 +19,7 @@
 # For now, require the GNU compilers (to avoid some Libtool/Autoconf
 # issues).
 required='libtoolize g77 gfortran'
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/fortdep.sh b/t/fortdep.sh
index 8eff4e9..99ebb03 100755
--- a/t/fortdep.sh
+++ b/t/fortdep.sh
@@ -17,7 +17,7 @@
 # Test to make sure dependency tracking doesn't interfere with Fortran.
 # For PR 75.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SRCDIR([foo.f])
diff --git a/t/gcj.sh b/t/gcj.sh
index 8493024..885db3c 100755
--- a/t/gcj.sh
+++ b/t/gcj.sh
@@ -17,7 +17,7 @@
 # Test of compiled java.
 
 required='gcc gcj'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 # FIXME: AM_PROG_GCJ should cause OBJEXT and EXEEXT to be set, but
diff --git a/t/gcj2.sh b/t/gcj2.sh
index 8da82a1..3aab7a3 100755
--- a/t/gcj2.sh
+++ b/t/gcj2.sh
@@ -16,7 +16,7 @@
 
 # Make sure '..' invalid in subdir .o's.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 _AM_DEPENDENCIES(GCJ)
diff --git a/t/gcj3.sh b/t/gcj3.sh
index c4b4574..96d0d14 100755
--- a/t/gcj3.sh
+++ b/t/gcj3.sh
@@ -16,7 +16,7 @@
 
 # Make sure dependency tracking works for java.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 _AM_DEPENDENCIES([GCJ])
diff --git a/t/gcj4.sh b/t/gcj4.sh
index 299e1c1..680e59b 100755
--- a/t/gcj4.sh
+++ b/t/gcj4.sh
@@ -17,7 +17,7 @@
 # Make sure dependency tracking works for Java.
 
 required=gcj
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_GCJ
diff --git a/t/gcj5.sh b/t/gcj5.sh
index 4df1059..9409ee8 100755
--- a/t/gcj5.sh
+++ b/t/gcj5.sh
@@ -16,7 +16,7 @@
 
 # Make sure Automake suggests AM_PROG_GCJ when GCJ is needed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 _AM_DEPENDENCIES(GCJ)
diff --git a/t/gcj6.sh b/t/gcj6.sh
index 60023c2..fc9fbe6 100755
--- a/t/gcj6.sh
+++ b/t/gcj6.sh
@@ -17,7 +17,7 @@
 # AM_PROG_GCJ should cause OBJEXT and EXEEXT to be set.
 
 required='gcj'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_GCJ
diff --git a/t/get-sysconf.sh b/t/get-sysconf.sh
index 60f62cd..f802665 100755
--- a/t/get-sysconf.sh
+++ b/t/get-sysconf.sh
@@ -20,7 +20,7 @@
 # we won't have to ask him for more information to start analyzing the
 # failure (that had happened too many times in the past!).
 
-. ./defs || exit 1
+. test-init.sh
 
 st=0
 if test -d "$am_top_srcdir"/.git; then
diff --git a/t/gettext-config-rpath.sh b/t/gettext-config-rpath.sh
index 613ee82..987c02f 100755
--- a/t/gettext-config-rpath.sh
+++ b/t/gettext-config-rpath.sh
@@ -17,7 +17,7 @@
 # Check the config.rpath requirement.
 
 required='gettext'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_GNU_GETTEXT
diff --git a/t/gettext-macros.sh b/t/gettext-macros.sh
index fad34a9..9c64e8b 100755
--- a/t/gettext-macros.sh
+++ b/t/gettext-macros.sh
@@ -18,7 +18,7 @@
 # to the test cases requiring them.
 # See also automake bug#9807.
 
-. ./defs || exit 1
+. test-init.sh
 
 extract_program_version ()
 {
diff --git a/t/gettext-pr381.sh b/t/gettext-pr381.sh
index 1bb6320..75e2ba8 100755
--- a/t/gettext-pr381.sh
+++ b/t/gettext-pr381.sh
@@ -18,7 +18,7 @@
 # 'SUBDIRS = po intl' must not be required if 'po/' doesn't exist.
 
 required='gettext'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_GNU_GETTEXT
diff --git a/t/gettext.sh b/t/gettext.sh
index 5f89b61..8749843 100755
--- a/t/gettext.sh
+++ b/t/gettext.sh
@@ -17,7 +17,7 @@
 # Check gettext support.
 
 required='gettext'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_GNU_GETTEXT
diff --git a/t/gettext2.sh b/t/gettext2.sh
index 960ef36..9ccc617 100755
--- a/t/gettext2.sh
+++ b/t/gettext2.sh
@@ -18,7 +18,7 @@
 # PR/338, reported by Charles Wilson.
 
 required='gettext'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AM_GNU_GETTEXT([external])
diff --git a/t/gettext3.sh b/t/gettext3.sh
index bfeb922..fe2fcdc 100755
--- a/t/gettext3.sh
+++ b/t/gettext3.sh
@@ -17,7 +17,7 @@
 # Check gettext 'AM_GNU_GETTEXT_INTL_SUBDIR' support.
 
 required='gettext'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AM_GNU_GETTEXT([external])
diff --git a/t/gmake-vars.sh b/t/gmake-vars.sh
index 0691ae0..73b7ad3 100755
--- a/t/gmake-vars.sh
+++ b/t/gmake-vars.sh
@@ -17,7 +17,7 @@
 # Check that Automake does not warns about nested variables expansion,
 # variables with non-POSIX names, or GNU make function calls.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 define get-libname
diff --git a/t/gnits.sh b/t/gnits.sh
index f3de3b6..db067b8 100755
--- a/t/gnits.sh
+++ b/t/gnits.sh
@@ -16,7 +16,7 @@
 
 # Test to ensure --gnits version checking is correct.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [3.5.3.2])
diff --git a/t/gnits2.sh b/t/gnits2.sh
index 34c5211..f16c999 100755
--- a/t/gnits2.sh
+++ b/t/gnits2.sh
@@ -17,7 +17,7 @@
 # Test to ensure std-options checking is correct.
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/gnits3.sh b/t/gnits3.sh
index b3a885e..37779b2 100755
--- a/t/gnits3.sh
+++ b/t/gnits3.sh
@@ -17,7 +17,7 @@
 # Check that AM_INSTALLCHECK_STD_OPTIONS_EXEMPT works.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/gnumake.sh b/t/gnumake.sh
index 7b1fbfe..c8433ba 100755
--- a/t/gnumake.sh
+++ b/t/gnumake.sh
@@ -17,7 +17,7 @@
 # Automake should not assume that make files are called Makefile.
 # Report from Braden McDaniel.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/GNUmakefile])
diff --git a/t/gnuwarn.sh b/t/gnuwarn.sh
index 1e468a0..4a1c03b 100755
--- a/t/gnuwarn.sh
+++ b/t/gnuwarn.sh
@@ -16,7 +16,7 @@
 
 # Check that Automake warns about user variables being overridden.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We need (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
diff --git a/t/gnuwarn2.sh b/t/gnuwarn2.sh
index 0cdc710..5667e27 100755
--- a/t/gnuwarn2.sh
+++ b/t/gnuwarn2.sh
@@ -16,7 +16,7 @@
 
 # Check diagnostics about no-installman being disallowed in 'gnu'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([gnuwarn2], [1.0])
diff --git a/t/hdr-vars-defined-once.sh b/t/hdr-vars-defined-once.sh
index 54e2cb9..59841b5 100755
--- a/t/hdr-vars-defined-once.sh
+++ b/t/hdr-vars-defined-once.sh
@@ -17,7 +17,7 @@
 # Test to make sure header vars defined only once when including.
 # Report from Marcus G. Daniels.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
diff --git a/t/header.sh b/t/header.sh
index 60d8ed1..a4550f9 100755
--- a/t/header.sh
+++ b/t/header.sh
@@ -23,7 +23,7 @@
 #  in the HEADERS variable for *all* generated Makefile.ins in the
 #  project.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([MY_HEADERS])
diff --git a/t/help-depend.sh b/t/help-depend.sh
index 9a27d0b..12e89bb 100755
--- a/t/help-depend.sh
+++ b/t/help-depend.sh
@@ -18,7 +18,7 @@
 # the configure help screen.
 # Keep this in sync with sister test 'help-depend2.sh'
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/help-depend2.sh b/t/help-depend2.sh
index 5cf1273..838e961 100755
--- a/t/help-depend2.sh
+++ b/t/help-depend2.sh
@@ -18,7 +18,7 @@
 # dependency tracking, it adds proper text to the configure help screen.
 # Keep this in sync with sister test 'help-depend.sh'
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/help-dmalloc.sh b/t/help-dmalloc.sh
index 7d2f10c..30f3602 100755
--- a/t/help-dmalloc.sh
+++ b/t/help-dmalloc.sh
@@ -17,7 +17,7 @@
 # Make sure that our macro 'AM_WITH_DMALLOC' adds proper text to
 # the configure help screen.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/help-init.sh b/t/help-init.sh
index 0ae47dd..3398c21 100755
--- a/t/help-init.sh
+++ b/t/help-init.sh
@@ -17,7 +17,7 @@
 # Make sure that our grand macro 'AM_INIT_AUTOMAKE' add proper text
 # to the configure help screen.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/help-lispdir.sh b/t/help-lispdir.sh
index 2dd9df3..23ad0bd 100755
--- a/t/help-lispdir.sh
+++ b/t/help-lispdir.sh
@@ -17,7 +17,7 @@
 # Make sure that our macro 'AM_PATH_LISPDIR' adds proper text to
 # the configure help screen.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/help-python.sh b/t/help-python.sh
index dcbcfe8..1c3e5a9 100755
--- a/t/help-python.sh
+++ b/t/help-python.sh
@@ -17,7 +17,7 @@
 # Make sure that macro 'AM_PATH_PYTHON' adds proper text to the
 # configure help screen.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/help-silent.sh b/t/help-silent.sh
index 601666c..76cae9b 100755
--- a/t/help-silent.sh
+++ b/t/help-silent.sh
@@ -17,7 +17,7 @@
 # Make sure configure options relative to automake silent rules are
 # added to the configure help screen.
 
-. ./defs || exit 1
+. test-init.sh
 
 : > Makefile.am
 $ACLOCAL
diff --git a/t/help-upc.sh b/t/help-upc.sh
index 822eadf..6ccd962 100755
--- a/t/help-upc.sh
+++ b/t/help-upc.sh
@@ -17,7 +17,7 @@
 # Make sure that our macro 'AM_PROG_UPC' adds proper text to
 # the configure help screen.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/help.sh b/t/help.sh
index 2c8175c..961fcea 100755
--- a/t/help.sh
+++ b/t/help.sh
@@ -17,7 +17,7 @@
 # Make sure --help and --version work, even when no configure.ac nor
 # configure.in is in the current directory.
 
-. ./defs || exit 1
+. test-init.sh
 
 # Ensure we run in an empty directory.
 mkdir emptydir
diff --git a/t/help2.sh b/t/help2.sh
index fad2b29..e4a8dff 100755
--- a/t/help2.sh
+++ b/t/help2.sh
@@ -16,7 +16,7 @@
 
 # Make sure --help and --version work, even when the current directory
 # contains a broken configure.ac and a broken acinclude.m4.
-. ./defs || exit 1
+. test-init.sh
 
 # Ensure we run in a new, clean directory.
 mkdir cleandir
diff --git a/t/help3.sh b/t/help3.sh
index 368c456..14d5f8e 100755
--- a/t/help3.sh
+++ b/t/help3.sh
@@ -16,7 +16,7 @@
 
 # Make sure --help and --version takes precedence over other options.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We must have full control over the content of the current directory.
 mkdir cleandir
diff --git a/t/help4.sh b/t/help4.sh
index 775a3ab..98c8f9a 100755
--- a/t/help4.sh
+++ b/t/help4.sh
@@ -17,7 +17,7 @@
 # Check that the first among --help and --version to be specified on
 # the command line takes precedence over the following one.
 
-. ./defs || exit 1
+. test-init.sh
 
 # Ensure we run in an empty directory.
 mkdir emptydir
diff --git a/t/hfs.sh b/t/hfs.sh
index fae069f..f794f5c 100755
--- a/t/hfs.sh
+++ b/t/hfs.sh
@@ -20,7 +20,7 @@
 # Darwin).
 # Report from Peter O'Gorman.
 
-. ./defs || exit 1
+. test-init.sh
 echo AC_OUTPUT >>configure.ac
 
 : >CHANGELOG
diff --git a/t/implicit.sh b/t/implicit.sh
index 86d6032..1d53fac 100755
--- a/t/implicit.sh
+++ b/t/implicit.sh
@@ -17,7 +17,7 @@
 # Test to make sure implicit .o's are listed as appropriate.  Report
 # from Henrik Frystyk Nielsen.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/init.sh b/t/init.sh
index 94cdd64..0d047bd 100755
--- a/t/init.sh
+++ b/t/init.sh
@@ -17,7 +17,7 @@
 # Make sure we give a sensible error message when AC_INIT and
 # AM_INIT_AUTOMAKE are both given less than two arguments.
 
-. ./defs || exit 1
+. test-init.sh
 
 for ac_init_args in '' '([x])'; do
   for am_init_args in '' '([1.10])'; do
diff --git a/t/init2.sh b/t/init2.sh
index fa2a065..94af06f 100755
--- a/t/init2.sh
+++ b/t/init2.sh
@@ -17,7 +17,7 @@
 # Make sure we give a sensible error message when AM_INIT_AUTOMAKE
 # contains junk.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >configure.ac <<END
 AC_INIT([init2], [1.0])
diff --git a/t/insh2.sh b/t/insh2.sh
index cc964cf..85b5ef2 100755
--- a/t/insh2.sh
+++ b/t/insh2.sh
@@ -16,7 +16,7 @@
 
 # Test for bug where install-sh not included in distribution.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/install-info-dir.sh b/t/install-info-dir.sh
index abf16e3..c348b5e 100755
--- a/t/install-info-dir.sh
+++ b/t/install-info-dir.sh
@@ -22,7 +22,7 @@
 # FIXME: and could be merged with 'txinfo27.sh'.
 
 required=makeinfo
-. ./defs || exit 1
+. test-init.sh
 
 cwd=$(pwd) || fatal_ "cannot get current working directory"
 
diff --git a/t/install2.sh b/t/install2.sh
index 96d1c56..3aae3c0 100755
--- a/t/install2.sh
+++ b/t/install2.sh
@@ -18,7 +18,7 @@
 # From Pavel Roskin.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/installdir.sh b/t/installdir.sh
index 5f74b32..7380172 100755
--- a/t/installdir.sh
+++ b/t/installdir.sh
@@ -22,7 +22,7 @@
 # installdirs is missing this.  Ideally this would be an automatic
 # feature of any exported target.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/instdat.sh b/t/instdat.sh
index b6fad9d..afee3cb 100755
--- a/t/instdat.sh
+++ b/t/instdat.sh
@@ -17,7 +17,7 @@
 # Test to see if defining INSTALL_DATA causes problems.  From EGCS
 # list.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_SUBST([INSTALL_DATA])
diff --git a/t/instdat2.sh b/t/instdat2.sh
index 54d26a9..5379e82 100755
--- a/t/instdat2.sh
+++ b/t/instdat2.sh
@@ -17,7 +17,7 @@
 # Test that installing under $exec_prefix is handled by install-exec.
 # Testing with headers for instance.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >Makefile.am << 'EOF'
 # User directories.
diff --git a/t/instdir-cond.sh b/t/instdir-cond.sh
index d0be1a3..f646215 100755
--- a/t/instdir-cond.sh
+++ b/t/instdir-cond.sh
@@ -17,7 +17,7 @@
 # Check against automake bug#10997: directories holding only
 # conditionally-installed files should not be created unconditionally.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([ENABLE_FOO], [false])
diff --git a/t/instdir-cond2.sh b/t/instdir-cond2.sh
index 559a7fe..a5fff9b 100755
--- a/t/instdir-cond2.sh
+++ b/t/instdir-cond2.sh
@@ -21,7 +21,7 @@
 # FIXME: So this test is still xfailing.
 # See sister test 'instdir-cond.sh' for the succeeding part.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([ENABLE_FOO], [false])
diff --git a/t/instdir-java.sh b/t/instdir-java.sh
index 4a68b74..baa3e39 100755
--- a/t/instdir-java.sh
+++ b/t/instdir-java.sh
@@ -17,7 +17,7 @@
 # If $(javadir) is the empty string, then nothing should be installed there.
 
 required=javac
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/instdir-lisp.sh b/t/instdir-lisp.sh
index bbdcdb4..91434af 100755
--- a/t/instdir-lisp.sh
+++ b/t/instdir-lisp.sh
@@ -17,7 +17,7 @@
 # If $(lispdir) is the empty string, then nothing should be installed there.
 
 required=emacs
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_PATH_LISPDIR
diff --git a/t/instdir-ltlib.sh b/t/instdir-ltlib.sh
index 136374b..78a7b2d 100755
--- a/t/instdir-ltlib.sh
+++ b/t/instdir-ltlib.sh
@@ -19,7 +19,7 @@
 # This test exercises the libtool code paths.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/instdir-no-empty.sh b/t/instdir-no-empty.sh
index 5223cd5..4c1ada2 100755
--- a/t/instdir-no-empty.sh
+++ b/t/instdir-no-empty.sh
@@ -17,7 +17,7 @@
 # An empty "foo_PRIMARY" declaration should *not* cause "make install"
 # to create directory $(foodir).  See automake bug#10997 and bug#11030.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_SUBST([CC], [whatever])
diff --git a/t/instdir-prog.sh b/t/instdir-prog.sh
index 957f6ef..e5a8f9f 100755
--- a/t/instdir-prog.sh
+++ b/t/instdir-prog.sh
@@ -19,7 +19,7 @@
 # This test exercises the prog and libs code paths.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/instdir-python.sh b/t/instdir-python.sh
index 384b3b0..34dc8dc 100755
--- a/t/instdir-python.sh
+++ b/t/instdir-python.sh
@@ -17,7 +17,7 @@
 # If $(pythondir) is the empty string, then nothing should be installed there.
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_PATH_PYTHON
diff --git a/t/instdir-texi.sh b/t/instdir-texi.sh
index 1defda4..efef923 100755
--- a/t/instdir-texi.sh
+++ b/t/instdir-texi.sh
@@ -18,7 +18,7 @@
 # Likewise for the other install-* targets used for texinfo files.
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 dvips --help \
   || skip_ "dvips is missing"
diff --git a/t/instdir.sh b/t/instdir.sh
index ccff4e4..5a4ebc3 100755
--- a/t/instdir.sh
+++ b/t/instdir.sh
@@ -18,7 +18,7 @@
 # This test only ensures this if $(foo_PRIMARY) is also empty, see
 # 'instdir2.sh' and siblings 'instdir-*.sh' for nonempty contents.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_SUBST([foodir], ['${datadir}'/foo])
diff --git a/t/instdir2.sh b/t/instdir2.sh
index a961473..5f0af17 100755
--- a/t/instdir2.sh
+++ b/t/instdir2.sh
@@ -18,7 +18,7 @@
 # This test ensures this also if $(foo_PRIMARY) is nonempty, see
 # 'instdir.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_SUBST([foodir], ['${datadir}'/foo])
diff --git a/t/instfail-info.sh b/t/instfail-info.sh
index fea2f5b..59fb1eb 100755
--- a/t/instfail-info.sh
+++ b/t/instfail-info.sh
@@ -20,7 +20,7 @@
 # This test has a few sister tests, for java, info, libtool.
 
 required='makeinfo'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AC_OUTPUT
diff --git a/t/instfail-java.sh b/t/instfail-java.sh
index 7211efa..ab4c2b4 100755
--- a/t/instfail-java.sh
+++ b/t/instfail-java.sh
@@ -20,7 +20,7 @@
 # This is the java sister test of 'instfail.sh'.
 
 required=javac
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/instfail-libtool.sh b/t/instfail-libtool.sh
index 042f077..d5613b1 100755
--- a/t/instfail-libtool.sh
+++ b/t/instfail-libtool.sh
@@ -20,7 +20,7 @@
 # This is the libtool sister test of 'instfail.sh'.
 
 required='cc libtool libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AM_PROG_AR
diff --git a/t/instfail.sh b/t/instfail.sh
index 123e082..98b7a7a 100755
--- a/t/instfail.sh
+++ b/t/instfail.sh
@@ -20,7 +20,7 @@
 # This test has a few sister tests, for java, info, libtool.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AC_PROG_CC
diff --git a/t/insthook.sh b/t/insthook.sh
index 117255e..89d7d6f 100755
--- a/t/insthook.sh
+++ b/t/insthook.sh
@@ -16,7 +16,7 @@
 
 # Make sure the install-exec-hook example we give in the manual works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_PROG_LN_S
diff --git a/t/instman.sh b/t/instman.sh
index 612f9a8..0616684 100755
--- a/t/instman.sh
+++ b/t/instman.sh
@@ -17,7 +17,7 @@
 # Make sure the MKDIR_P invocation is correct in install-man
 # target.  Bug reported by Gordon Irlam <address@hidden>.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/instmany-mans.sh b/t/instmany-mans.sh
index de7392e..65dee84 100755
--- a/t/instmany-mans.sh
+++ b/t/instmany-mans.sh
@@ -18,7 +18,7 @@
 
 # This is the mans sister test of 'instmany.sh', see there for details.
 
-. ./defs || exit 1
+. test-init.sh
 
 # In order to have a useful test on modern systems (which have a high
 # limit, if any), use a fake install program that errors out for more
diff --git a/t/instmany-python.sh b/t/instmany-python.sh
index d1189f8..6c5e257 100755
--- a/t/instmany-python.sh
+++ b/t/instmany-python.sh
@@ -19,7 +19,7 @@
 # This is the python sister test of 'instmany.sh', see there for details.
 
 required='python'
-. ./defs || exit 1
+. test-init.sh
 
 limit=2500
 subdir=long_subdir_name_with_many_characters
diff --git a/t/instmany.sh b/t/instmany.sh
index f91a5f1..4709514 100755
--- a/t/instmany.sh
+++ b/t/instmany.sh
@@ -26,7 +26,7 @@
 # For texinfos, we expand names using $(srcdir) in the first place.
 # Let's hope nobody uses many texinfos.
 
-. ./defs || exit 1
+. test-init.sh
 
 # In order to have a useful test on modern systems (which have a high
 # limit, if any), use a fake install program that errors out for more
diff --git a/t/instsh.sh b/t/instsh.sh
index e7924b2..4a452ba 100755
--- a/t/instsh.sh
+++ b/t/instsh.sh
@@ -18,7 +18,7 @@
 # automake: Makefile.am: required file "../../install-sh" not found; installing
 # This also makes sure that install-sh is created in the correct directory.
 
-. ./defs || exit 1
+. test-init.sh
 
 : > Makefile.am
 rm -f install-sh
diff --git a/t/instsh2.sh b/t/instsh2.sh
index 9e6182c..506eee9 100755
--- a/t/instsh2.sh
+++ b/t/instsh2.sh
@@ -17,7 +17,7 @@
 # Various install-sh checks.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 get_shell_script install-sh
 
diff --git a/t/instsh3.sh b/t/instsh3.sh
index f823893..23334bb 100755
--- a/t/instsh3.sh
+++ b/t/instsh3.sh
@@ -18,7 +18,7 @@
 
 am_create_testdir=empty
 required=non-root
-. ./defs || exit 1
+. test-init.sh
 
 # Solaris /usr/ucb/touch does not accept -t.
 touch -t $old_timestamp foo \
diff --git a/t/instspc.tap b/t/instspc.tap
index b91c696..5cad83f 100755
--- a/t/instspc.tap
+++ b/t/instspc.tap
@@ -19,7 +19,7 @@
 # Original report from James Amundson about file names with spaces.
 # Other characters added by Paul Eggert.
 
-. ./defs || exit 99
+. test-init.sh
 
 # Usage: is_in_list ITEM [LIST...]
 is_in_list ()
diff --git a/t/internals.tap b/t/internals.tap
index f4c8a18..9f679a8 100755
--- a/t/internals.tap
+++ b/t/internals.tap
@@ -17,7 +17,7 @@
 # Test some generic Automake-provided internal macros and make functions.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 13
 
diff --git a/t/interp.sh b/t/interp.sh
index 766e878..18d06c1 100755
--- a/t/interp.sh
+++ b/t/interp.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure variable interpolation works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/interp2.sh b/t/interp2.sh
index 5da8a61..32a357d 100755
--- a/t/interp2.sh
+++ b/t/interp2.sh
@@ -17,7 +17,7 @@
 # Test to make sure variable interpolation doesn't break other
 # features.  Report from Joel N. Weber, II.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/interp3.sh b/t/interp3.sh
index b0ed1c7..0e5670d 100755
--- a/t/interp3.sh
+++ b/t/interp3.sh
@@ -21,7 +21,7 @@
 # test case).
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/java-check.sh b/t/java-check.sh
index c9ae66c..d4b4f0e 100755
--- a/t/java-check.sh
+++ b/t/java-check.sh
@@ -19,7 +19,7 @@
 # See automake bug#8234.
 
 required=javac
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/java-clean.sh b/t/java-clean.sh
index 5457f19..a6b465f 100755
--- a/t/java-clean.sh
+++ b/t/java-clean.sh
@@ -17,7 +17,7 @@
 # Test cleaning of Java class files and timestamps.
 
 required=javac
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/java-compile-install.sh b/t/java-compile-install.sh
index 70d3e5a..196eddf 100755
--- a/t/java-compile-install.sh
+++ b/t/java-compile-install.sh
@@ -17,7 +17,7 @@
 # Test on compilation and installation of Java class files.
 
 required=javac
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_OUTPUT
diff --git a/t/java-compile-run-flat.sh b/t/java-compile-run-flat.sh
index f3108d1..de45a60 100755
--- a/t/java-compile-run-flat.sh
+++ b/t/java-compile-run-flat.sh
@@ -25,7 +25,7 @@
 
 required='java javac'
 am_serial_tests=yes
-. ./defs || exit 1
+. test-init.sh
 
 echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.ac
 
diff --git a/t/java-compile-run-nested.sh b/t/java-compile-run-nested.sh
index eeb876b..026e85f 100755
--- a/t/java-compile-run-nested.sh
+++ b/t/java-compile-run-nested.sh
@@ -25,7 +25,7 @@
 # forcing the use of the older 'serial-tests' driver.
 
 required='java javac'
-. ./defs || exit 1
+. test-init.sh
 
 echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.ac
 
diff --git a/t/java-empty-classpath.sh b/t/java-empty-classpath.sh
index c54da0b..a610240 100755
--- a/t/java-empty-classpath.sh
+++ b/t/java-empty-classpath.sh
@@ -18,7 +18,7 @@
 # compilation time.  See automake bug#9306.
 
 required=javac
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_SRCDIR([org/gnu/bug/Library.java])
diff --git a/t/java-extra.sh b/t/java-extra.sh
index 7b3a759..4ab8de0 100755
--- a/t/java-extra.sh
+++ b/t/java-extra.sh
@@ -20,7 +20,7 @@
 # conditionals).
 
 required=javac
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
diff --git a/t/java-mix.sh b/t/java-mix.sh
index 25e8511..65ffd68 100755
--- a/t/java-mix.sh
+++ b/t/java-mix.sh
@@ -19,7 +19,7 @@
 # modifiers.  Also check that '.java' files are not distributed by
 # default.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/java-no-duplicate.sh b/t/java-no-duplicate.sh
index b5ad9fc..ec7467e 100755
--- a/t/java-no-duplicate.sh
+++ b/t/java-no-duplicate.sh
@@ -17,7 +17,7 @@
 # Test that some Java-related variables and rules are not repeatedly
 # defined.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 javadir = $(datadir)/java
diff --git a/t/java-nobase.sh b/t/java-nobase.sh
index 12eeaaa..8447b5f 100755
--- a/t/java-nobase.sh
+++ b/t/java-nobase.sh
@@ -17,7 +17,7 @@
 # Test support of 'nobase_' with the 'JAVA' primary.
 
 required=javac
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/java-noinst.sh b/t/java-noinst.sh
index 8bb3832..558a8aa 100755
--- a/t/java-noinst.sh
+++ b/t/java-noinst.sh
@@ -18,7 +18,7 @@
 # be installed.
 
 required=javac
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/java-rebuild.sh b/t/java-rebuild.sh
index 5b5f296..3b15c58 100755
--- a/t/java-rebuild.sh
+++ b/t/java-rebuild.sh
@@ -17,7 +17,7 @@
 # Test rebuild rules for Java class files.
 
 required='javac'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/java-sources.sh b/t/java-sources.sh
index 532cb1f..b0d51ba 100755
--- a/t/java-sources.sh
+++ b/t/java-sources.sh
@@ -17,7 +17,7 @@
 # Test definition of automake-generated private Makefile variable
 # '$(am__java_sources)'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/java-uninstall.sh b/t/java-uninstall.sh
index a128406..175b9c6 100755
--- a/t/java-uninstall.sh
+++ b/t/java-uninstall.sh
@@ -17,7 +17,7 @@
 # Check uninstallation of Java class files.
 
 required=javac
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/java.sh b/t/java.sh
index 631f98b..9f6f5a3 100755
--- a/t/java.sh
+++ b/t/java.sh
@@ -17,7 +17,7 @@
 # Minimal test of Java functionality.
 
 required=javac
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_OUTPUT
diff --git a/t/java2.sh b/t/java2.sh
index 286fdd6..c9064ac 100755
--- a/t/java2.sh
+++ b/t/java2.sh
@@ -18,7 +18,7 @@
 # no classes to compile.
 # Report from Braden McDaniel.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL(WITH_JDK, false)
diff --git a/t/java3.sh b/t/java3.sh
index eab7203..f7fdf65 100755
--- a/t/java3.sh
+++ b/t/java3.sh
@@ -18,7 +18,7 @@
 # *.java files when there are none.
 # Report from Johannes Nicolai (PR/441).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([WHO_CARES], [false])
diff --git a/t/javadir-undefined.sh b/t/javadir-undefined.sh
index fb0872e..e0764bd 100755
--- a/t/javadir-undefined.sh
+++ b/t/javadir-undefined.sh
@@ -20,7 +20,7 @@
 # the *.class files).
 # See automake bug#8461.
 
-. ./defs || exit 1
+. test-init.sh
 
 $ACLOCAL
 
diff --git a/t/javaflags.sh b/t/javaflags.sh
index bbd8334..0e56bb7 100755
--- a/t/javaflags.sh
+++ b/t/javaflags.sh
@@ -16,7 +16,7 @@
 
 # Check support for $(JAVACFLAGS) and $(AM_JAVACFLAGS).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > fake-javac <<'END'
 #!/bin/sh
diff --git a/t/javaprim.sh b/t/javaprim.sh
index a5c4a62..6d039c2 100755
--- a/t/javaprim.sh
+++ b/t/javaprim.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure JAVA variable can be defined by AC_SUBST.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([JAVA])
diff --git a/t/javasubst.sh b/t/javasubst.sh
index b6929b8..e0e8aca 100755
--- a/t/javasubst.sh
+++ b/t/javasubst.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure redefining JAVAC with AC_SUBST works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([JAVAC])
diff --git a/t/ldadd.sh b/t/ldadd.sh
index 9487459..9fbaf2c 100755
--- a/t/ldadd.sh
+++ b/t/ldadd.sh
@@ -17,7 +17,7 @@
 # Check to make sure incorrect LDADD usage is diagnosed.
 
 required=libtool
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/ldflags.sh b/t/ldflags.sh
index 7eb9be3..d25231d 100755
--- a/t/ldflags.sh
+++ b/t/ldflags.sh
@@ -18,7 +18,7 @@
 # PR 77.
 
 required=libtool
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex-clean-cxx.sh b/t/lex-clean-cxx.sh
index 38a129c..52becb7 100755
--- a/t/lex-clean-cxx.sh
+++ b/t/lex-clean-cxx.sh
@@ -20,7 +20,7 @@
 # See also sister test 'lex-clean.sh'.
 
 required='c++ lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/lex-clean.sh b/t/lex-clean.sh
index 3bc52d3..7fb7a2e 100755
--- a/t/lex-clean.sh
+++ b/t/lex-clean.sh
@@ -20,7 +20,7 @@
 # See also sister test 'lex-clean-cxx.sh'.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex-depend-cxx.sh b/t/lex-depend-cxx.sh
index ad2b0a6..9a47876 100755
--- a/t/lex-depend-cxx.sh
+++ b/t/lex-depend-cxx.sh
@@ -18,7 +18,7 @@
 # Test synthesized from PR automake/6.
 
 required='c++ lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/lex-depend-grep.sh b/t/lex-depend-grep.sh
index e7c9538..7828088 100755
--- a/t/lex-depend-grep.sh
+++ b/t/lex-depend-grep.sh
@@ -18,7 +18,7 @@
 # in obvious ways.  See PR automake/6, and related semantic tests
 # 'lex-depend.sh' and 'lex-depend-cxx.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex-depend.sh b/t/lex-depend.sh
index 9d4f960..24beaf1 100755
--- a/t/lex-depend.sh
+++ b/t/lex-depend.sh
@@ -18,7 +18,7 @@
 # Test suggested by PR automake/6.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex-header.sh b/t/lex-header.sh
index a0a57df..a684889 100755
--- a/t/lex-header.sh
+++ b/t/lex-header.sh
@@ -18,7 +18,7 @@
 # bugs #8844 and #9933).
 
 required='cc flex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex-lib-external.sh b/t/lex-lib-external.sh
index 28f254b..90b39fe 100755
--- a/t/lex-lib-external.sh
+++ b/t/lex-lib-external.sh
@@ -18,7 +18,7 @@
 # library, if that's available.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex-lib.sh b/t/lex-lib.sh
index 11767d8..e0b05f5 100755
--- a/t/lex-lib.sh
+++ b/t/lex-lib.sh
@@ -19,7 +19,7 @@
 # See also test 'lex-lib-external.sh'.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex-libobj.sh b/t/lex-libobj.sh
index 17bfc5d..0ec09bc 100755
--- a/t/lex-libobj.sh
+++ b/t/lex-libobj.sh
@@ -18,7 +18,7 @@
 # LIBOBJ machinery.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex-line.sh b/t/lex-line.sh
index fbc05a5..299996c 100755
--- a/t/lex-line.sh
+++ b/t/lex-line.sh
@@ -20,7 +20,7 @@
 # See also sister test 'yacc-line.sh'.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex-nodist.sh b/t/lex-nodist.sh
index 19e5968..8114c24 100755
--- a/t/lex-nodist.sh
+++ b/t/lex-nodist.sh
@@ -19,7 +19,7 @@
 # .c and .h files.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex-noyywrap.sh b/t/lex-noyywrap.sh
index 335ed00..e1f777f 100755
--- a/t/lex-noyywrap.sh
+++ b/t/lex-noyywrap.sh
@@ -17,7 +17,7 @@
 # Check Lex support with flex using the '%noyywrap' option.
 
 required='cc flex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex-subobj-nodep.sh b/t/lex-subobj-nodep.sh
index 526e01b..d80be79 100755
--- a/t/lex-subobj-nodep.sh
+++ b/t/lex-subobj-nodep.sh
@@ -18,7 +18,7 @@
 # tracking is disabled.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<\END
 AC_PROG_CC
diff --git a/t/lex.sh b/t/lex.sh
index 34a1493..754031d 100755
--- a/t/lex.sh
+++ b/t/lex.sh
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex2.sh b/t/lex2.sh
index bfdde02..c959db7 100755
--- a/t/lex2.sh
+++ b/t/lex2.sh
@@ -16,7 +16,7 @@
 
 # Make sure that Automake suggest using AM_PROG_LEX when a lexer is used.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex3.sh b/t/lex3.sh
index b8a0c36..9122ffc 100755
--- a/t/lex3.sh
+++ b/t/lex3.sh
@@ -19,7 +19,7 @@
 # From Matthew D. Langston.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lex5.sh b/t/lex5.sh
index fda26dd..804db33 100755
--- a/t/lex5.sh
+++ b/t/lex5.sh
@@ -17,7 +17,7 @@
 # Test for subdir lexers.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lexcpp.sh b/t/lexcpp.sh
index d46c82d..90f2dc0 100755
--- a/t/lexcpp.sh
+++ b/t/lexcpp.sh
@@ -17,7 +17,7 @@
 # Test to make sure Lex + C++ is supported.
 # Please keep this is sync with sister test 'yaccpp.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/lexvpath.sh b/t/lexvpath.sh
index 569048e..04098bb 100755
--- a/t/lexvpath.sh
+++ b/t/lexvpath.sh
@@ -23,7 +23,7 @@
 # Please keep this in sync with sister test 'yaccvapth.sh'.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat > lexoutroot.in << 'END'
 LEX_OUTPUT_ROOT='@LEX_OUTPUT_ROOT@'
diff --git a/t/lflags.sh b/t/lflags.sh
index 655fd13..fb482f9 100755
--- a/t/lflags.sh
+++ b/t/lflags.sh
@@ -20,7 +20,7 @@
 # and yflags2.sh.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >fake-lex <<'END'
 #!/bin/sh
diff --git a/t/lflags2.sh b/t/lflags2.sh
index a82ad56..fb2c1aa 100755
--- a/t/lflags2.sh
+++ b/t/lflags2.sh
@@ -19,7 +19,7 @@
 # Please keep this in sync with the sister tests lflags.sh, yflags.sh
 # and yflags2.sh.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >fake-lex <<'END'
 #!/bin/sh
diff --git a/t/libexec.sh b/t/libexec.sh
index e4255e0..14c6739 100755
--- a/t/libexec.sh
+++ b/t/libexec.sh
@@ -16,7 +16,7 @@
 
 # PROGRAMS and LIBRARIES can be installed in (pkg)libexecdir.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 libexec_PROGRAMS = foo
diff --git a/t/libobj-basic.sh b/t/libobj-basic.sh
index c730c52..c9e16da 100755
--- a/t/libobj-basic.sh
+++ b/t/libobj-basic.sh
@@ -17,7 +17,7 @@
 # Make sure AC_LIBSOURCE and AC_LIBSOURCES work.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 mv configure.ac configure.proto
 cat >> configure.proto << 'END'
diff --git a/t/libobj10.sh b/t/libobj10.sh
index 1c0736b..d8e8d58 100755
--- a/t/libobj10.sh
+++ b/t/libobj10.sh
@@ -18,7 +18,7 @@
 # it's in BUILT_SOURCES.  Reported by Erez Zadok.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/libobj12.sh b/t/libobj12.sh
index 6c917e2..910dd79 100755
--- a/t/libobj12.sh
+++ b/t/libobj12.sh
@@ -17,7 +17,7 @@
 # Test if a file can be mentioned in LIBOBJS and explicitly.
 # (See libobj13.sh for the LTLIBRARIES check.)
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/libobj13.sh b/t/libobj13.sh
index 3a9ee71..f872ec7 100755
--- a/t/libobj13.sh
+++ b/t/libobj13.sh
@@ -18,7 +18,7 @@
 # (Like libobj12.sh, but for Libtool libraries.)
 
 required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/libobj14.sh b/t/libobj14.sh
index 266aaad..17ba986 100755
--- a/t/libobj14.sh
+++ b/t/libobj14.sh
@@ -19,7 +19,7 @@
 # that uses it.
 # Report from Bill Davidson.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_PROG_CC
diff --git a/t/libobj15a.sh b/t/libobj15a.sh
index c7c30e8..b60154d 100755
--- a/t/libobj15a.sh
+++ b/t/libobj15a.sh
@@ -16,7 +16,7 @@
 
 # Nonexistent sources for AC_LIBOBJ should cause an Automake failure.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/libobj15b.sh b/t/libobj15b.sh
index 71ace12..004c539 100755
--- a/t/libobj15b.sh
+++ b/t/libobj15b.sh
@@ -16,7 +16,7 @@
 
 # Nonexistent source for AC_LIBSOURCE should cause Automake to fail.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/libobj15c.sh b/t/libobj15c.sh
index ccaa6bd..6db5f43 100755
--- a/t/libobj15c.sh
+++ b/t/libobj15c.sh
@@ -16,7 +16,7 @@
 
 # Nonexistent sources for AC_LIBSOURCES should cause Automake to fail.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/libobj16a.sh b/t/libobj16a.sh
index 9bf602a..f2b32ac 100755
--- a/t/libobj16a.sh
+++ b/t/libobj16a.sh
@@ -18,7 +18,7 @@
 # Please keep this in sync with sister test 'libobj16b.sh'.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 mv configure.ac configure.proto
 cat >> configure.proto << 'END'
diff --git a/t/libobj16b.sh b/t/libobj16b.sh
index 6005725..abc6a66 100755
--- a/t/libobj16b.sh
+++ b/t/libobj16b.sh
@@ -18,7 +18,7 @@
 # Please keep this in sync with sister test 'libobj16a.sh'.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 mv configure.ac configure.proto
 cat >> configure.proto << 'END'
diff --git a/t/libobj17.sh b/t/libobj17.sh
index e4277f9..bc743b2 100755
--- a/t/libobj17.sh
+++ b/t/libobj17.sh
@@ -17,7 +17,7 @@
 # Make sure AC_LIBOBJ accept non-literal arguments.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/libobj18.sh b/t/libobj18.sh
index 77d7d54..209cab1 100755
--- a/t/libobj18.sh
+++ b/t/libobj18.sh
@@ -16,7 +16,7 @@
 
 # Make sure AC_LIBSOURCE and AC_LIBSOURCES use arguments literally.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/libobj19.sh b/t/libobj19.sh
index 0209168..d247bb4 100755
--- a/t/libobj19.sh
+++ b/t/libobj19.sh
@@ -17,7 +17,7 @@
 # Test support for AC_CONFIG_LIBOBJ_DIR.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_LIBOBJ_DIR([libobj-dir])
diff --git a/t/libobj2.sh b/t/libobj2.sh
index 778dbd3..cce0627 100755
--- a/t/libobj2.sh
+++ b/t/libobj2.sh
@@ -18,7 +18,7 @@
 # Bug from Josh MacDonald.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
diff --git a/t/libobj20b.sh b/t/libobj20b.sh
index fce4ab3..8175a08 100755
--- a/t/libobj20b.sh
+++ b/t/libobj20b.sh
@@ -17,7 +17,7 @@
 # Test error reporting for AC_CONFIG_LIBOBJ_DIR.
 # See also sister test 'libobj20c.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_LIBOBJ_DIR([libobj-dir])
diff --git a/t/libobj20c.sh b/t/libobj20c.sh
index 533f195..e2e7c2b 100755
--- a/t/libobj20c.sh
+++ b/t/libobj20c.sh
@@ -17,7 +17,7 @@
 # Test error reporting for AC_CONFIG_LIBOBJ_DIR.
 # See also sister test 'libobj20b.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_LIBOBJ_DIR([libobj-dir])
diff --git a/t/libobj3.sh b/t/libobj3.sh
index 1c78cba..c423591 100755
--- a/t/libobj3.sh
+++ b/t/libobj3.sh
@@ -17,7 +17,7 @@
 # Make sure we complain if @LIBOBJS@ is used without being set in
 # configure.ac.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
diff --git a/t/libobj4.sh b/t/libobj4.sh
index c7a199e..f2ab0cf 100755
--- a/t/libobj4.sh
+++ b/t/libobj4.sh
@@ -17,7 +17,7 @@
 # Test to make sure LIBOBJS error only occurs if LIBOBJS seen.  Report
 # from Jim Meyering.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
diff --git a/t/libobj5.sh b/t/libobj5.sh
index d8b7e2d..7d1d510 100755
--- a/t/libobj5.sh
+++ b/t/libobj5.sh
@@ -17,7 +17,7 @@
 # Test to make sure AC_REPLACE_FUNCS works across lines.  Report from
 # Jim Meyering.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = joe
diff --git a/t/libobj7.sh b/t/libobj7.sh
index d3874c5..9e13088 100755
--- a/t/libobj7.sh
+++ b/t/libobj7.sh
@@ -17,7 +17,7 @@
 # Test for multiple replacement functions.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/library.sh b/t/library.sh
index e95fecb..8675f28 100755
--- a/t/library.sh
+++ b/t/library.sh
@@ -16,7 +16,7 @@
 
 # Test for _DEPENDENCIES with libraries.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
diff --git a/t/library2.sh b/t/library2.sh
index ede4dce..7c783cc 100755
--- a/t/library2.sh
+++ b/t/library2.sh
@@ -16,7 +16,7 @@
 
 # Make sure Automake suggest using AC_PROG_RANLIB when *_LIBRARIES is used.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/library3.sh b/t/library3.sh
index 308e748..642c3c9 100755
--- a/t/library3.sh
+++ b/t/library3.sh
@@ -16,7 +16,7 @@
 
 # Make sure Automake simplify conditions in diagnostics.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CC
diff --git a/t/libtoo10.sh b/t/libtoo10.sh
index 3fd8444..f56c807 100755
--- a/t/libtoo10.sh
+++ b/t/libtoo10.sh
@@ -22,7 +22,7 @@
 # *.lo files are removed when they should.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR
diff --git a/t/libtoo11.sh b/t/libtoo11.sh
index 1f91f19..5ebcf42 100755
--- a/t/libtoo11.sh
+++ b/t/libtoo11.sh
@@ -18,7 +18,7 @@
 # Report by Charles Wilson.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_LIBTOOL
diff --git a/t/libtool-macros.sh b/t/libtool-macros.sh
index 17fea06..c50777b 100755
--- a/t/libtool-macros.sh
+++ b/t/libtool-macros.sh
@@ -18,7 +18,7 @@
 # to the test cases requiring them.
 # See also automake bug#9807.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo "# Automatically generated by $me." > get.sh
 echo : >> get.sh
diff --git a/t/libtool3.sh b/t/libtool3.sh
index 4c801e3..2e5cd7c 100755
--- a/t/libtool3.sh
+++ b/t/libtool3.sh
@@ -18,7 +18,7 @@
 # Also make sure we do not bloat the Makefile with unneeded rules.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/libtool4.sh b/t/libtool4.sh
index e8704b7..84fa95d 100755
--- a/t/libtool4.sh
+++ b/t/libtool4.sh
@@ -16,7 +16,7 @@
 
 # Make sure Automake suggests AC_PROG_LIBTOOL when *_LTLIBRARIES is used.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/libtool5.sh b/t/libtool5.sh
index 7605098..9f7e995 100755
--- a/t/libtool5.sh
+++ b/t/libtool5.sh
@@ -19,7 +19,7 @@
 # Report from Harlan Stenn.
 
 required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([COND1], [true])
diff --git a/t/libtool6.sh b/t/libtool6.sh
index 19f30e7..34c8dc8 100755
--- a/t/libtool6.sh
+++ b/t/libtool6.sh
@@ -18,7 +18,7 @@
 # in different directories.  PR/285.
 
 required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([COND1], [true])
diff --git a/t/libtool7.sh b/t/libtool7.sh
index e6b1025..b6af4f7 100755
--- a/t/libtool7.sh
+++ b/t/libtool7.sh
@@ -18,7 +18,7 @@
 # Also check basic support for AM_LIBTOOLFLAGS/LIBTOOLFLAGS
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/libtool8.sh b/t/libtool8.sh
index 8cfb8e3..edf432d 100755
--- a/t/libtool8.sh
+++ b/t/libtool8.sh
@@ -17,7 +17,7 @@
 # Make sure Automake diagnoses conflicting installations.
 
 required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([COND1], [true])
diff --git a/t/libtool9.sh b/t/libtool9.sh
index fae1f36..7524089 100755
--- a/t/libtool9.sh
+++ b/t/libtool9.sh
@@ -20,7 +20,7 @@
 # xxx_LDFLAGS.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/license.sh b/t/license.sh
index cad4307..bda8b86 100755
--- a/t/license.sh
+++ b/t/license.sh
@@ -16,7 +16,7 @@
 
 # Make sure COPYING is not overwritten, even with -a -f.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >>configure.ac
 
diff --git a/t/license2.sh b/t/license2.sh
index 736e96f..ed1fd3c 100755
--- a/t/license2.sh
+++ b/t/license2.sh
@@ -16,7 +16,7 @@
 
 # Check that installing 'COPYING' outputs a warning.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = gnu
diff --git a/t/link_c_cxx.sh b/t/link_c_cxx.sh
index 27dcb24..14710e8 100755
--- a/t/link_c_cxx.sh
+++ b/t/link_c_cxx.sh
@@ -17,7 +17,7 @@
 # Test to make sure the C++ linker is used when appropriate.
 # Matthew D. Langston <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/link_cond.sh b/t/link_cond.sh
index 459453c..19ff2ab 100755
--- a/t/link_cond.sh
+++ b/t/link_cond.sh
@@ -21,7 +21,7 @@
 # See automake bug#11089.
 
 required='cc c++'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/link_dist.sh b/t/link_dist.sh
index 9ad4319..e9011e1 100755
--- a/t/link_dist.sh
+++ b/t/link_dist.sh
@@ -18,7 +18,7 @@
 # *_SOURCES
 # Richard Boulton <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/link_f90_only.sh b/t/link_f90_only.sh
index f9c7c18..90348d7 100755
--- a/t/link_f90_only.sh
+++ b/t/link_f90_only.sh
@@ -17,7 +17,7 @@
 # Test to make sure the Fortran 90 linker is used when appropriate.
 # (copied from 'link_f_only.sh') Mike Nolta <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_FC
diff --git a/t/link_f_only.sh b/t/link_f_only.sh
index 5d27025..a176902 100755
--- a/t/link_f_only.sh
+++ b/t/link_f_only.sh
@@ -17,7 +17,7 @@
 # Test to make sure the Fortran 77 linker is used when appropriate.
 # Matthew D. Langston <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
diff --git a/t/link_fc.sh b/t/link_fc.sh
index f334ad8..76b9053 100755
--- a/t/link_fc.sh
+++ b/t/link_fc.sh
@@ -17,7 +17,7 @@
 # Test to make sure the Fortran 77 linker is used when appropriate.
 # Matthew D. Langston <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/link_fccxx.sh b/t/link_fccxx.sh
index 03b71f5..059f155 100755
--- a/t/link_fccxx.sh
+++ b/t/link_fccxx.sh
@@ -17,7 +17,7 @@
 # Test to make sure the C++ linker is used when appropriate.
 # Matthew D. Langston <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/link_fcxx.sh b/t/link_fcxx.sh
index 29893d8..723cddc 100755
--- a/t/link_fcxx.sh
+++ b/t/link_fcxx.sh
@@ -17,7 +17,7 @@
 # Test to make sure the C++ linker is used when appropriate.
 # Matthew D. Langston <address@hidden>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/link_override.sh b/t/link_override.sh
index 1bf1085..682225f 100755
--- a/t/link_override.sh
+++ b/t/link_override.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure _LINK variables are detected and used as documented.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/lisp-flags.sh b/t/lisp-flags.sh
index 64cb3c9..2dfa580 100755
--- a/t/lisp-flags.sh
+++ b/t/lisp-flags.sh
@@ -16,7 +16,7 @@
 
 # Elisp byte-compilation honours AM_ELCFLAFS and ELCFLAGS.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 lisp_LISP = foo.el
diff --git a/t/lisp-loadpath.sh b/t/lisp-loadpath.sh
index e0f21ce..43e2d09 100755
--- a/t/lisp-loadpath.sh
+++ b/t/lisp-loadpath.sh
@@ -18,7 +18,7 @@
 # required by other files.  Related to automake bug#11806.
 
 required=emacs
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PATH_LISPDIR
diff --git a/t/lisp-pr11806.sh b/t/lisp-pr11806.sh
index c372ea5..edcf9ba 100755
--- a/t/lisp-pr11806.sh
+++ b/t/lisp-pr11806.sh
@@ -18,7 +18,7 @@
 # See automake bug#11806.
 
 required=emacs
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PATH_LISPDIR
diff --git a/t/lisp-subdir-mix.sh b/t/lisp-subdir-mix.sh
index 20073ec..9688eec 100755
--- a/t/lisp-subdir-mix.sh
+++ b/t/lisp-subdir-mix.sh
@@ -20,7 +20,7 @@
 # judicious use of $(AM_ELCFLAGS).
 
 required=emacs
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PATH_LISPDIR
diff --git a/t/lisp-subdir.sh b/t/lisp-subdir.sh
index 5c67c53..9836400 100755
--- a/t/lisp-subdir.sh
+++ b/t/lisp-subdir.sh
@@ -17,7 +17,7 @@
 # Emacs lisp files in subdirectories.
 
 required=emacs
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PATH_LISPDIR
diff --git a/t/lisp-subdir2.sh b/t/lisp-subdir2.sh
index d7517ad..0ea3e9f 100755
--- a/t/lisp-subdir2.sh
+++ b/t/lisp-subdir2.sh
@@ -17,7 +17,7 @@
 # Compiling elisp files in different subdirectories.
 
 required=emacs
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PATH_LISPDIR
diff --git a/t/lisp2.sh b/t/lisp2.sh
index 4f07911..dfd6800 100755
--- a/t/lisp2.sh
+++ b/t/lisp2.sh
@@ -16,7 +16,7 @@
 
 # Make sure that Automake suggest using AM_PATH_LISPDIR to define lispdir.
 
-. ./defs || exit 1
+. test-init.sh
 
 
 : TRY 1 -- We lack both EMACS and lispdir.
diff --git a/t/lisp3.sh b/t/lisp3.sh
index a752151..7717c1c 100755
--- a/t/lisp3.sh
+++ b/t/lisp3.sh
@@ -17,7 +17,7 @@
 # Test that compiling interdependent elisp files works.
 
 required=emacs
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 lisp_LISP = am-one.el am-two.el am-three.el
diff --git a/t/lisp4.sh b/t/lisp4.sh
index 41dc873..1b2809c 100755
--- a/t/lisp4.sh
+++ b/t/lisp4.sh
@@ -18,7 +18,7 @@
 # Report from Simon Josefsson.
 
 required=emacs
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 lisp_LISP = am-one.el am-two.el am-three.el
diff --git a/t/lisp5.sh b/t/lisp5.sh
index 28d7a62..de9c118 100755
--- a/t/lisp5.sh
+++ b/t/lisp5.sh
@@ -18,7 +18,7 @@
 # non-bytecompiled *.el files.
 
 required=emacs
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 lisp_DATA = am-one.el am-two.el am-three.el
diff --git a/t/lisp6.sh b/t/lisp6.sh
index c84917c..ae81a1c 100755
--- a/t/lisp6.sh
+++ b/t/lisp6.sh
@@ -17,7 +17,7 @@
 # Test for conditional _LISP.
 
 required=emacs
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 dist_lisp_LISP = am-one.el
diff --git a/t/lisp7.sh b/t/lisp7.sh
index 7efa27f..4c4676e 100755
--- a/t/lisp7.sh
+++ b/t/lisp7.sh
@@ -16,7 +16,7 @@
 
 # Make sure that lisp_LISP also works when emacs is not installed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 dist_lisp_LISP = am-one.el am-two.el am-three.el
diff --git a/t/lisp8.sh b/t/lisp8.sh
index cc8a315..e64b769 100755
--- a/t/lisp8.sh
+++ b/t/lisp8.sh
@@ -17,7 +17,7 @@
 # Check the recover rule of lisp_LISP with parallel make.
 
 required=emacs
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 dist_lisp_LISP = am-one.el am-two.el am-three.el
diff --git a/t/lispdry.sh b/t/lispdry.sh
index 765942d..f57e6dc 100755
--- a/t/lispdry.sh
+++ b/t/lispdry.sh
@@ -17,7 +17,7 @@
 # Check that 'make -n' works with the lisp_LISP recover rule.
 
 required='emacs non-root'
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 dist_lisp_LISP = am-one.el am-two.el am-three.el
diff --git a/t/listval.sh b/t/listval.sh
index 8bd6b79..2aa4d06 100755
--- a/t/listval.sh
+++ b/t/listval.sh
@@ -18,7 +18,7 @@
 # From Adam J. Richter.
 
 required=libtool
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([LTLIBOBJS])
diff --git a/t/local-targets.sh b/t/local-targets.sh
index d7db7d4..253c730 100755
--- a/t/local-targets.sh
+++ b/t/local-targets.sh
@@ -19,7 +19,7 @@
 # sees, as well as through GNU make constructs that Automake does not
 # parse.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([SafeInclude], [include])
diff --git a/t/location.sh b/t/location.sh
index d8921c8..bf2399a 100755
--- a/t/location.sh
+++ b/t/location.sh
@@ -16,7 +16,7 @@
 
 # Test for locations in error messages.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND2], [true])
diff --git a/t/longlin2.sh b/t/longlin2.sh
index 1174a14..1fcc54e 100755
--- a/t/longlin2.sh
+++ b/t/longlin2.sh
@@ -17,7 +17,7 @@
 # Long lines should be wrapped.
 # Report from Albert Chin.
 
-. ./defs || exit 1
+. test-init.sh
 
 n=1 files= match=
 while test $n -le 100
diff --git a/t/longline.sh b/t/longline.sh
index 25acc67..5b2a4ea 100755
--- a/t/longline.sh
+++ b/t/longline.sh
@@ -17,7 +17,7 @@
 # Long lines of = and += should be wrapped.
 # Report from Simon Josefsson.
 
-. ./defs || exit 1
+. test-init.sh
 
 i=0
 while test $i -lt 30; do
diff --git a/t/ltcond.sh b/t/ltcond.sh
index ae5415c..02e8bad 100755
--- a/t/ltcond.sh
+++ b/t/ltcond.sh
@@ -18,7 +18,7 @@
 # This combines two examples from the manual.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([WANT_LIBFOO], [true])
diff --git a/t/ltcond2.sh b/t/ltcond2.sh
index 49b14d8..a16a7cf 100755
--- a/t/ltcond2.sh
+++ b/t/ltcond2.sh
@@ -17,7 +17,7 @@
 # Test for bug in conditionals.
 
 required='cc native libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/ltconv.sh b/t/ltconv.sh
index cf06271..580ee6d 100755
--- a/t/ltconv.sh
+++ b/t/ltconv.sh
@@ -18,7 +18,7 @@
 # This example is taken from the manual.
 
 required='cc native libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/ltdeps.sh b/t/ltdeps.sh
index a13ae03..950bc42 100755
--- a/t/ltdeps.sh
+++ b/t/ltdeps.sh
@@ -17,7 +17,7 @@
 # Test to make sure libtool library dependencies are correct.
 # Report from Lars J. Aas.
 required=libtool
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR
diff --git a/t/ltinit.sh b/t/ltinit.sh
index 69e8d55..a98cffa 100755
--- a/t/ltinit.sh
+++ b/t/ltinit.sh
@@ -19,7 +19,7 @@
 # present since libtool 1.9b, circa 2004).
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/ltinstloc.sh b/t/ltinstloc.sh
index f12da77..e476c98 100755
--- a/t/ltinstloc.sh
+++ b/t/ltinstloc.sh
@@ -18,7 +18,7 @@
 
 
 required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/ltlibobjs.sh b/t/ltlibobjs.sh
index ed0d2ed..1e8ea24 100755
--- a/t/ltlibobjs.sh
+++ b/t/ltlibobjs.sh
@@ -17,7 +17,7 @@
 # Test to make sure LTLIBOBJS alone works ok.
 # Report from Vadim Zeitlin.
 required=libtool
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([LTLIBOBJS])
diff --git a/t/ltorder.sh b/t/ltorder.sh
index c8f60ed..32d0816 100755
--- a/t/ltorder.sh
+++ b/t/ltorder.sh
@@ -17,7 +17,7 @@
 # Test for correct installation order of nobase libtool libraries.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/m4-inclusion.sh b/t/m4-inclusion.sh
index 3da20ee..c845617 100755
--- a/t/m4-inclusion.sh
+++ b/t/m4-inclusion.sh
@@ -16,7 +16,7 @@
 
 # Test to see if 'm4_sinclude' and 'm4_include' works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 sinclude([doesntexist.m4])
diff --git a/t/maintclean-vpath.sh b/t/maintclean-vpath.sh
index b5c6ffe..0732fab 100755
--- a/t/maintclean-vpath.sh
+++ b/t/maintclean-vpath.sh
@@ -18,7 +18,7 @@
 # This test is for VPATH builds; see sister test 'maintclean.sh'
 # for in-tree builds.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([bar sub/Makefile])
diff --git a/t/maintclean.sh b/t/maintclean.sh
index 757cf85..b7fd1b2 100755
--- a/t/maintclean.sh
+++ b/t/maintclean.sh
@@ -18,7 +18,7 @@
 # This test is for in-tree builds; see sister test 'maintclean-vpath.sh'
 # for VPATH builds.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([bar sub/Makefile])
diff --git a/t/make-dryrun.tap b/t/make-dryrun.tap
index 487681b..0993298 100755
--- a/t/make-dryrun.tap
+++ b/t/make-dryrun.tap
@@ -16,7 +16,7 @@
 
 # Check that $(am.make.dry-run) works as expected.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 14
 
diff --git a/t/makefile-deps.sh b/t/makefile-deps.sh
index 192e56b..b4c5bd7 100755
--- a/t/makefile-deps.sh
+++ b/t/makefile-deps.sh
@@ -17,7 +17,7 @@
 # Make sure we don't emit a rule with empty target if list of
 # automatically-computed dependencies for Makefile.in is empty.
 
-. ./defs || exit 1
+. test-init.sh
 
 : > Makefile.am
 
diff --git a/t/makej.sh b/t/makej.sh
index 3b236bf..29c6a22 100755
--- a/t/makej.sh
+++ b/t/makej.sh
@@ -21,7 +21,7 @@
 # depend on the time at which autoconf and automake update the cache
 # via autom4te.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >configure.ac <<END
 m4_include([version.m4])
diff --git a/t/makej2.sh b/t/makej2.sh
index b7ec43a..c6dafc1 100755
--- a/t/makej2.sh
+++ b/t/makej2.sh
@@ -20,7 +20,7 @@
 # Problems like this shouldn't happen with GNU make, but we keep the
 # test anyway for the moment, for extra safety.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/maken.sh b/t/maken.sh
index e4254e5..4057508 100755
--- a/t/maken.sh
+++ b/t/maken.sh
@@ -19,7 +19,7 @@
 # Also, ensure that "make -n dist" and "make -n distcheck" show what
 # would happen.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/maken3.sh b/t/maken3.sh
index 5dbe7d2..683f3d4 100755
--- a/t/maken3.sh
+++ b/t/maken3.sh
@@ -23,7 +23,7 @@
 # as well as tags.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub sub2
 
diff --git a/t/makevars.sh b/t/makevars.sh
index 3654196..4614cd7 100755
--- a/t/makevars.sh
+++ b/t/makevars.sh
@@ -17,7 +17,7 @@
 # Test to make sure that automake includes the needed variables,
 # but not too many.
 
-. ./defs || exit 1
+. test-init.sh
 
 # Find the macros wanted by Automake.
 $ACLOCAL
diff --git a/t/man.sh b/t/man.sh
index 3feb3fa..d5c9ece 100755
--- a/t/man.sh
+++ b/t/man.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure 'dist' prefix works with man pages.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 dist_man_MANS = foo.1
diff --git a/t/man2.sh b/t/man2.sh
index a7b7646..31c4af5 100755
--- a/t/man2.sh
+++ b/t/man2.sh
@@ -17,7 +17,7 @@
 # Make sure that man pages listed in man_MANS are installed and
 # renamed as documented.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/man3.sh b/t/man3.sh
index 9c2b68a..1042205 100755
--- a/t/man3.sh
+++ b/t/man3.sh
@@ -16,7 +16,7 @@
 
 # PR 516: Prefer generated manpages to distributed ones.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 dist_man_MANS = foo.1
diff --git a/t/man5.sh b/t/man5.sh
index d3c2270..a04ccfe 100755
--- a/t/man5.sh
+++ b/t/man5.sh
@@ -16,7 +16,7 @@
 
 # Make sure to extract the correct mansection from files in man_MANS.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/man6.sh b/t/man6.sh
index c2f21a9..9d96dcd 100755
--- a/t/man6.sh
+++ b/t/man6.sh
@@ -18,7 +18,7 @@
 # even if the 'missing' script is involved.
 
 required=help2man
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 dist_man_MANS = $(srcdir)/foobar.1 bazquux.1 zardoz.1
diff --git a/t/man7.sh b/t/man7.sh
index 5791b72..3ce410e 100755
--- a/t/man7.sh
+++ b/t/man7.sh
@@ -16,7 +16,7 @@
 
 # Check for a bug in maintainer-clean w.r.t. generated manpages.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 dist_man_MANS = $(srcdir)/foo.1 bar.1
diff --git a/t/man8.sh b/t/man8.sh
index 597093f..f6ad408 100755
--- a/t/man8.sh
+++ b/t/man8.sh
@@ -16,7 +16,7 @@
 
 # Check for a bug in distcheck w.r.t. generated manpages.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 dist_man_MANS = foo.1
diff --git a/t/mdate.sh b/t/mdate.sh
index e44144a..009c753 100755
--- a/t/mdate.sh
+++ b/t/mdate.sh
@@ -16,7 +16,7 @@
 
 # Test that mdate-sh is required when Texinfo used and version.texi needed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
diff --git a/t/mdate2.sh b/t/mdate2.sh
index f984959..c5bba4e 100755
--- a/t/mdate2.sh
+++ b/t/mdate2.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure mdate-sh is included in distribution.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
diff --git a/t/mdate3.sh b/t/mdate3.sh
index aa2755e..409abb7 100755
--- a/t/mdate3.sh
+++ b/t/mdate3.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure mdate-sh run correctly.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/mdate5.sh b/t/mdate5.sh
index 0cbc198..6603667 100755
--- a/t/mdate5.sh
+++ b/t/mdate5.sh
@@ -17,7 +17,7 @@
 # Test to make sure mdate-sh works correctly.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 get_shell_script mdate-sh
 
diff --git a/t/mdate6.sh b/t/mdate6.sh
index 110bb2d..fbb8557 100755
--- a/t/mdate6.sh
+++ b/t/mdate6.sh
@@ -17,7 +17,7 @@
 # mdate-sh can work with weird file names, doesn't eval too much.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 a=
 file='file  name $a'
diff --git a/t/memoize.tap b/t/memoize.tap
index 36f98a2..2bbfa3b 100755
--- a/t/memoize.tap
+++ b/t/memoize.tap
@@ -17,7 +17,7 @@
 # Test Automake-provided memoization for make variables.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 17
 
diff --git a/t/missing-auxfile-stops-makefiles-creation.sh 
b/t/missing-auxfile-stops-makefiles-creation.sh
index d1c0cd4..f8e91f9 100755
--- a/t/missing-auxfile-stops-makefiles-creation.sh
+++ b/t/missing-auxfile-stops-makefiles-creation.sh
@@ -17,7 +17,7 @@
 # Automake should stop the creation of Makefile.in files at the first
 # encountered error due to a required auxiliary file not found.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AM_PATH_PYTHON
diff --git a/t/missing-version-mismatch.sh b/t/missing-version-mismatch.sh
index e4a1033..43ebf20 100755
--- a/t/missing-version-mismatch.sh
+++ b/t/missing-version-mismatch.sh
@@ -17,7 +17,7 @@
 # Test missing with version mismatches.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 get_shell_script missing
 
diff --git a/t/missing3.sh b/t/missing3.sh
index b2cacf9..3cd6333 100755
--- a/t/missing3.sh
+++ b/t/missing3.sh
@@ -17,7 +17,7 @@
 # Test missing when running a tool's --version.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 get_shell_script missing
 
diff --git a/t/mkdir_p.sh b/t/mkdir_p.sh
index 2cc68a3..bbd8c93 100755
--- a/t/mkdir_p.sh
+++ b/t/mkdir_p.sh
@@ -17,7 +17,7 @@
 # AM_INIT_AUTOMAKE should still define $(mkdir_p), for backward
 # compatibility.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/mkinst2.sh b/t/mkinst2.sh
index daf8760..5ac297a 100755
--- a/t/mkinst2.sh
+++ b/t/mkinst2.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure no-installman suppresses man dir creation.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/mkinst3.sh b/t/mkinst3.sh
index 880d417..f34afd3 100755
--- a/t/mkinst3.sh
+++ b/t/mkinst3.sh
@@ -17,7 +17,7 @@
 # Test "install-sh -d" with spaces in directory names.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cwd=$(pwd) || fatal_ "getting current working directory"
 
diff --git a/t/no-c.tap b/t/no-c.tap
index 90a767e..632b8de 100755
--- a/t/no-c.tap
+++ b/t/no-c.tap
@@ -17,7 +17,7 @@
 # Projects using only Fortran or C++ shouldn't need C-related stuff.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 6
 
diff --git a/t/no-extra-makefile-code.sh b/t/no-extra-makefile-code.sh
index cfe1249..f931ea5 100755
--- a/t/no-extra-makefile-code.sh
+++ b/t/no-extra-makefile-code.sh
@@ -19,7 +19,7 @@
 # by a regression caused by removal of automatic de-ANSI-fication support:
 # <http://lists.gnu.org/archive/html/automake-patches/2011-08/msg00200.html>
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/bsource.sh b/t/no-spurious-install-recursive.sh
similarity index 98%
rename from t/bsource.sh
rename to t/no-spurious-install-recursive.sh
index e3e481d..a2330d4 100755
--- a/t/bsource.sh
+++ b/t/no-spurious-install-recursive.sh
@@ -17,7 +17,7 @@
 # Regression test for install-recursive appearing in a non recursive Makefile.
 # Report from Bruno Haible.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 noinst_SCRIPTS = hostname
diff --git a/t/nobase-libtool.sh b/t/nobase-libtool.sh
index 4a66601..af47c01 100755
--- a/t/nobase-libtool.sh
+++ b/t/nobase-libtool.sh
@@ -19,7 +19,7 @@
 # greater exposure of that test.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_PROG_CC
diff --git a/t/nobase-nodist.sh b/t/nobase-nodist.sh
index 1ec466f..ef5dfce 100755
--- a/t/nobase-nodist.sh
+++ b/t/nobase-nodist.sh
@@ -16,7 +16,7 @@
 
 # Interaction of 'nobase_' and 'nodist_' prefixes.
 
-. ./defs || exit 1
+. test-init.sh
 
 # Simulate no emacs and no python (it shouldn't be needed in this test).
 EMACS="no" PYTHON=":"; export EMCAS PYTHON
diff --git a/t/nobase-python.sh b/t/nobase-python.sh
index 33114df..d38c695 100755
--- a/t/nobase-python.sh
+++ b/t/nobase-python.sh
@@ -17,7 +17,7 @@
 # Make sure nobase_* works for python files.
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AM_PATH_PYTHON
diff --git a/t/nobase.sh b/t/nobase.sh
index 1432d8d..249eb29 100755
--- a/t/nobase.sh
+++ b/t/nobase.sh
@@ -17,7 +17,7 @@
 # Make sure nobase_* works.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_PROG_CC
diff --git a/t/nodef.sh b/t/nodef.sh
index 979b906..8197f44 100755
--- a/t/nodef.sh
+++ b/t/nodef.sh
@@ -16,7 +16,7 @@
 
 # Make sure that PACKAGE and VERSION are AC_DEFINEd when requested.
 
-. ./defs || exit 1
+. test-init.sh
 
 # -------------------------------------------------------------------
 # Do not upgrade this file to use the modern AC_INIT/AM_INIT_AUTOMAKE
diff --git a/t/nodef2.sh b/t/nodef2.sh
index 2f7bb77..0a6a5ce 100755
--- a/t/nodef2.sh
+++ b/t/nodef2.sh
@@ -16,7 +16,7 @@
 
 # Make sure that PACKAGE and VERSION are AC_DEFINEd when requested.
 
-. ./defs || exit 1
+. test-init.sh
 
 # First, check that PACKAGE and VERSION are output by default.
 
diff --git a/t/nodep2.sh b/t/nodep2.sh
index 13d1174..5ad04a0 100755
--- a/t/nodep2.sh
+++ b/t/nodep2.sh
@@ -16,7 +16,7 @@
 
 # Another test to make sure no-dependencies option does the right thing.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
diff --git a/t/nodepcomp.sh b/t/nodepcomp.sh
index 25c66b5..9e96dc1 100755
--- a/t/nodepcomp.sh
+++ b/t/nodepcomp.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure depcomp isn't always required.
 
-. ./defs || exit 1
+. test-init.sh
 
 rm -f depcomp
 
diff --git a/t/nodist.sh b/t/nodist.sh
index cb79f61..fd92ea7 100755
--- a/t/nodist.sh
+++ b/t/nodist.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure dist_*_SOURCES and nodist_*_SOURCES work.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/nodist2.sh b/t/nodist2.sh
index 9db9dce..36b6691 100755
--- a/t/nodist2.sh
+++ b/t/nodist2.sh
@@ -17,7 +17,7 @@
 # Test to make sure nodist_noinst_HEADERS work.
 # For PR 249.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_OUTPUT
diff --git a/t/nodist3.sh b/t/nodist3.sh
index f80445a..438f0d8 100755
--- a/t/nodist3.sh
+++ b/t/nodist3.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure no-dist option works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/noinst.sh b/t/noinst.sh
index de8d3d2..a02054b 100755
--- a/t/noinst.sh
+++ b/t/noinst.sh
@@ -17,7 +17,7 @@
 # Check to make sure "make install" will build all in directory with
 # nothing to install.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 all-local:
diff --git a/t/noinstdir.sh b/t/noinstdir.sh
index 24854cf..e2a7a84 100755
--- a/t/noinstdir.sh
+++ b/t/noinstdir.sh
@@ -18,7 +18,7 @@
 # From Pavel Roskin.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 noinst_SCRIPTS = foo.sh
diff --git a/t/nolink.sh b/t/nolink.sh
index 34219b2..cd0495c 100755
--- a/t/nolink.sh
+++ b/t/nolink.sh
@@ -16,7 +16,7 @@
 
 # Make sure Automake does not emit a link rule for unknown languages.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = no-exeext
diff --git a/t/nostdinc.sh b/t/nostdinc.sh
index 2ec2b82..3f98fb3 100755
--- a/t/nostdinc.sh
+++ b/t/nostdinc.sh
@@ -17,7 +17,7 @@
 # Test to make sure nostdinc option works correctly.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -51,8 +51,8 @@ $AUTOMAKE --add-missing
 mkdir build
 cd build
 ../configure
-$MAKE V=1 > output || { cat output; exit 1; }
-cat output
+$MAKE V=1 > stdout || { cat stdout; exit 1; }
+cat stdout
 grep '.*-I *\.' stdout && exit 1
 $MAKE clean
 # Shouldn't be picked up from builddir either.
@@ -62,8 +62,8 @@ cd ..
 
 # Test with $builddir = $srcdir
 ./configure
-$MAKE V=1 > output || { cat output; exit 1; }
-cat output
-grep '.*-I *\.' output && exit 1
+$MAKE V=1 > stdout || { cat stdout; exit 1; }
+cat stdout
+grep '.*-I *\.' stdout && exit 1
 
 :
diff --git a/t/notrans.sh b/t/notrans.sh
index d997e97..4b2c803 100755
--- a/t/notrans.sh
+++ b/t/notrans.sh
@@ -17,7 +17,7 @@
 # Check all notrans_, dist_, nodist_ prefix combinations for MANS
 # primary and install-man dependencies.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/number.sh b/t/number.sh
index e0ccd24..673805e 100755
--- a/t/number.sh
+++ b/t/number.sh
@@ -17,7 +17,7 @@
 # Test to make sure _OBJECTS is only generated once.  Bug reported by
 # Joerg-Martin Schwarz.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/objc-basic.sh b/t/objc-basic.sh
index 5268bd5..ef07203 100755
--- a/t/objc-basic.sh
+++ b/t/objc-basic.sh
@@ -15,7 +15,7 @@
 # require an Objective-C compiler.
 # See also sister test 'objcxx-basic.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 bin_PROGRAMS = hello
diff --git a/t/objc-deps.sh b/t/objc-deps.sh
index 31bc30d..2ac4ad0 100755
--- a/t/objc-deps.sh
+++ b/t/objc-deps.sh
@@ -17,7 +17,7 @@
 # Automatic dependency tracking for Objective C.
 # See also sister test 'objcxx-deps.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_OBJC
diff --git a/t/objc-flags.sh b/t/objc-flags.sh
index 2f65d46..91b0043 100755
--- a/t/objc-flags.sh
+++ b/t/objc-flags.sh
@@ -16,7 +16,7 @@
 
 # Test Objective C compilation flags.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_OBJC
diff --git a/t/objc-megademo.sh b/t/objc-megademo.sh
index 4329029..a94f5f7 100755
--- a/t/objc-megademo.sh
+++ b/t/objc-megademo.sh
@@ -18,7 +18,7 @@
 
 required=libtoolize
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 ## Autotools Input Files.
 
diff --git a/t/objc-minidemo.sh b/t/objc-minidemo.sh
index e20a036..8b8d6e7 100755
--- a/t/objc-minidemo.sh
+++ b/t/objc-minidemo.sh
@@ -18,7 +18,7 @@
 # See also sister test 'objcxx-minidemo.sh'.
 
 required=native
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_OBJC
diff --git a/t/objcxx-basic.sh b/t/objcxx-basic.sh
index 3f8c211..bf5edbe 100755
--- a/t/objcxx-basic.sh
+++ b/t/objcxx-basic.sh
@@ -15,7 +15,7 @@
 # require an Objective-C++ compiler.
 # See also sister test 'objc-basic.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 bin_PROGRAMS = hello
diff --git a/t/objcxx-deps.sh b/t/objcxx-deps.sh
index 950663b..5f35080 100755
--- a/t/objcxx-deps.sh
+++ b/t/objcxx-deps.sh
@@ -17,7 +17,7 @@
 # Automatic dependency tracking for Objective C++.
 # See also sister test 'objc-deps.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_OBJCXX
diff --git a/t/objcxx-flags.sh b/t/objcxx-flags.sh
index 6e79fc5..2dde42b 100755
--- a/t/objcxx-flags.sh
+++ b/t/objcxx-flags.sh
@@ -17,7 +17,7 @@
 # Test Objective C++ compilation flags.
 # See also sister test 'objc-flags.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_OBJCXX
diff --git a/t/objcxx-minidemo.sh b/t/objcxx-minidemo.sh
index cf62e31..52d692d 100755
--- a/t/objcxx-minidemo.sh
+++ b/t/objcxx-minidemo.sh
@@ -18,7 +18,7 @@
 # See also sister test 'objc-minidemo.sh'.
 
 required=native
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_OBJCXX
diff --git a/t/objdir.sh b/t/objdir.sh
index 5d2a599..12aff49 100755
--- a/t/objdir.sh
+++ b/t/objdir.sh
@@ -20,7 +20,7 @@
 #  - such a directory truly causes no problems with GNU make.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/objext-pr10128.sh b/t/objext-pr10128.sh
index e773b72..da77c41 100755
--- a/t/objext-pr10128.sh
+++ b/t/objext-pr10128.sh
@@ -17,7 +17,7 @@
 # Test for automake bug#10128: $(OBJEXT) redefinition causes
 # $(foo_OBJECTS) to be defined as empty.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/oldvars.sh b/t/oldvars.sh
index 26f6001..5f42229 100755
--- a/t/oldvars.sh
+++ b/t/oldvars.sh
@@ -17,7 +17,7 @@
 # Use of these variables is deprecated:
 # LISP, HEADERS, DATA, SCRIPTS, LTLIBRARIES, LIBRARIES, PROGRAMS, MANS.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >Makefile.am <<\EOF
 DATA =
diff --git a/t/option-ng.sh b/t/option-ng.sh
index 1104427..12e2e7f 100755
--- a/t/option-ng.sh
+++ b/t/option-ng.sh
@@ -16,7 +16,7 @@
 
 # Automake-NG should recognize the (no-op) 'ng' option.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/order.sh b/t/order.sh
index cd0beac..6f5dd17 100755
--- a/t/order.sh
+++ b/t/order.sh
@@ -17,7 +17,7 @@
 # Make sure AC_DEFUN is handled correctly.  This test isn't named very
 # well.  Report from Jim Meyering.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 jm_TEST
diff --git a/t/output-order.sh b/t/output-order.sh
index 02b26df..569be90 100755
--- a/t/output-order.sh
+++ b/t/output-order.sh
@@ -17,7 +17,7 @@
 # Test that 'automake -a' output order is stable.
 # From report by Bruno Haible.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/output.sh b/t/output.sh
index a21fe89..1a7cd1f 100755
--- a/t/output.sh
+++ b/t/output.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure files listed in AC_OUTPUT are found.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/output10.sh b/t/output10.sh
index c6130f9..1702872 100755
--- a/t/output10.sh
+++ b/t/output10.sh
@@ -18,7 +18,7 @@
 # This is comparable to 'output9.sh', but testing Makefile rules.
 # PR/411
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << END
 AC_SUBST([FOO], [top])
diff --git a/t/output11.sh b/t/output11.sh
index b2da86b..81db1ff 100755
--- a/t/output11.sh
+++ b/t/output11.sh
@@ -16,7 +16,7 @@
 
 # Make sure an AC_CONFIG_FILES ignore filenames with shell variables.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << \END
 AC_SUBST([FOO], [foo])
diff --git a/t/output12.sh b/t/output12.sh
index 80e0f20..8462b48 100755
--- a/t/output12.sh
+++ b/t/output12.sh
@@ -16,7 +16,7 @@
 
 # Make sure an AC_CONFIG_FILES process filenames with AC_SUBST variables.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << \END
 AC_SUBST([FOO], [foo])
diff --git a/t/output13.sh b/t/output13.sh
index 16bc0f9..e96552a 100755
--- a/t/output13.sh
+++ b/t/output13.sh
@@ -17,7 +17,7 @@
 # Make sure an AC_CONFIG_FILES, AC_CONFIG_LINKS, and AC_CONFIG_COMMANDS
 # are not prerequisites of 'all'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << \END
 AC_SUBST([FOO], [foo])
diff --git a/t/output2.sh b/t/output2.sh
index 615f6cf..a69b979 100755
--- a/t/output2.sh
+++ b/t/output2.sh
@@ -16,7 +16,7 @@
 
 # Another AC_OUTPUT test.  From report by Ulrich Drepper.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/output3.sh b/t/output3.sh
index 2e4f38a..171c9fb 100755
--- a/t/output3.sh
+++ b/t/output3.sh
@@ -16,7 +16,7 @@
 
 # Yet another AC_OUTPUT test.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/output4.sh b/t/output4.sh
index 54d49e2..f5d3535 100755
--- a/t/output4.sh
+++ b/t/output4.sh
@@ -16,7 +16,7 @@
 
 # It's hard to believe there are so many AC_OUTPUT-related bugs.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/output5.sh b/t/output5.sh
index 8222ea7..f1453c6 100755
--- a/t/output5.sh
+++ b/t/output5.sh
@@ -16,7 +16,7 @@
 
 # Make sure Automake complains when there is no Makefile specified.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([foo], [bar], [baz])
diff --git a/t/output6.sh b/t/output6.sh
index dcec358..7a2a57c 100755
--- a/t/output6.sh
+++ b/t/output6.sh
@@ -16,7 +16,7 @@
 
 # Check for support for colon-separated input files in AC_CONFIG_FILES.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/output7.sh b/t/output7.sh
index d5aca29..22d41f9 100755
--- a/t/output7.sh
+++ b/t/output7.sh
@@ -17,7 +17,7 @@
 # Check for support for colon separated input files in AC_CONFIG_FILES,
 # with sources in sub directories.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/output8.sh b/t/output8.sh
index 62cade5..d9f8344 100755
--- a/t/output8.sh
+++ b/t/output8.sh
@@ -17,7 +17,7 @@
 # Check AC_CONFIG_FILES support for files starting with '../'.
 # Report from Bruno Haible.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir testdir
 cd testdir
diff --git a/t/output9.sh b/t/output9.sh
index 54dc8c1..e5b55fe 100755
--- a/t/output9.sh
+++ b/t/output9.sh
@@ -16,7 +16,7 @@
 
 # Make sure an AC_CONFIG_FILES can have an AC_CONFIG_FILES output as input.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << END
 AC_CONFIG_FILES([a/mid.in:a/input.in.in])
diff --git a/t/override-conditional-1.sh b/t/override-conditional-1.sh
index 26f0a28..ff754d3 100755
--- a/t/override-conditional-1.sh
+++ b/t/override-conditional-1.sh
@@ -16,7 +16,7 @@
 
 # Test for conditionally-defined overrides.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
diff --git a/t/override-conditional-2.sh b/t/override-conditional-2.sh
index 58ab1fd..00fa63d 100755
--- a/t/override-conditional-2.sh
+++ b/t/override-conditional-2.sh
@@ -18,7 +18,7 @@
 # This test is still xfailing; see the FIXME in Automake::Rule::define.
 # Once that is fixed, the test should succeed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [:])
diff --git a/t/override-html.sh b/t/override-html.sh
index 777d946..c5fbebb 100755
--- a/t/override-html.sh
+++ b/t/override-html.sh
@@ -17,7 +17,7 @@
 # Test that overriding 'html' target causes only one "html:" rule to
 # be output.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 html:
diff --git a/t/override-suggest-local.sh b/t/override-suggest-local.sh
index 11b7fb9..671683f 100755
--- a/t/override-suggest-local.sh
+++ b/t/override-suggest-local.sh
@@ -17,7 +17,7 @@
 # Make sure automake -Woverride suggests using TARGET-local instead
 # of TARGET when possible.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 install:
diff --git a/t/parallel-tests-basics.sh b/t/parallel-tests-basics.sh
index 42940c3..326d673 100755
--- a/t/parallel-tests-basics.sh
+++ b/t/parallel-tests-basics.sh
@@ -22,7 +22,7 @@
 #  - TESTS redefinition at runtime (with and without test suffixes)
 #  - AM_LAZY_CHECK
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-concatenated-suffix.sh 
b/t/parallel-tests-concatenated-suffix.sh
index 0c87cfa..4e787d5 100755
--- a/t/parallel-tests-concatenated-suffix.sh
+++ b/t/parallel-tests-concatenated-suffix.sh
@@ -17,7 +17,7 @@
 # The parallel-tests driver should be able to cope with test scripts
 # whose names end with several concatenated suffixes.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-concurrency-2.sh 
b/t/parallel-tests-concurrency-2.sh
index f7aac36..2d15393 100755
--- a/t/parallel-tests-concurrency-2.sh
+++ b/t/parallel-tests-concurrency-2.sh
@@ -21,7 +21,7 @@
 # It merely serves as demonstration.  :-)
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/parallel-tests-concurrency.sh b/t/parallel-tests-concurrency.sh
index 0bde3af..9ee87fd 100755
--- a/t/parallel-tests-concurrency.sh
+++ b/t/parallel-tests-concurrency.sh
@@ -17,7 +17,7 @@
 # Check parallel-tests features:
 # - concurrent parallel execution
 
-. ./defs || exit 1
+. test-init.sh
 
 case $MAKE in
   *\ -j*) skip_ "\$MAKE contains '-j'";;
diff --git a/t/parallel-tests-console-output.sh 
b/t/parallel-tests-console-output.sh
index 2265008..409047e 100755
--- a/t/parallel-tests-console-output.sh
+++ b/t/parallel-tests-console-output.sh
@@ -17,7 +17,7 @@
 # parallel-tests: some checks on console output about testsuite
 # progress.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-driver-install.sh 
b/t/parallel-tests-driver-install.sh
index e1a2248..803762b 100755
--- a/t/parallel-tests-driver-install.sh
+++ b/t/parallel-tests-driver-install.sh
@@ -18,7 +18,7 @@
 # in the correct directory.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/parallel-tests-dry-run-1.sh b/t/parallel-tests-dry-run-1.sh
index 96764c3..5809dba 100755
--- a/t/parallel-tests-dry-run-1.sh
+++ b/t/parallel-tests-dry-run-1.sh
@@ -17,7 +17,7 @@
 # Check interactions between the parallel test harness and "make -n".
 # See also sister test 'parallel-tests-dry-run-2.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/parallel-tests-dry-run-2.sh b/t/parallel-tests-dry-run-2.sh
index 0d324d8..d47a76a 100755
--- a/t/parallel-tests-dry-run-2.sh
+++ b/t/parallel-tests-dry-run-2.sh
@@ -17,7 +17,7 @@
 # Check interactions between the parallel test harness and "make -n".
 # See also sister test 'parallel-tests-dry-run-1.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-dynamic.sh b/t/parallel-tests-dynamic.sh
index 9d561a3..71a6b27 100755
--- a/t/parallel-tests-dynamic.sh
+++ b/t/parallel-tests-dynamic.sh
@@ -17,7 +17,7 @@
 # Check that dynamic content for $(TESTS) is supported, both when set from
 # inside the Makefile.am and when overridden from the command line.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/parallel-tests-empty.sh b/t/parallel-tests-empty.sh
index bbcbf87..1a8ec02 100755
--- a/t/parallel-tests-empty.sh
+++ b/t/parallel-tests-empty.sh
@@ -16,7 +16,7 @@
 
 # Check parallel-tests features: empty TESTS
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
diff --git a/t/parallel-tests-exeext.sh b/t/parallel-tests-exeext.sh
index f902587..4d09f0c 100755
--- a/t/parallel-tests-exeext.sh
+++ b/t/parallel-tests-exeext.sh
@@ -17,7 +17,7 @@
 # parallel-tests:
 #   - check2.am and interaction with $(EXEEXT)
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 dnl We need to fool the init.m4 internals a little.
diff --git a/t/parallel-tests-exit-statuses.sh 
b/t/parallel-tests-exit-statuses.sh
index dd899ea..95e2a1a 100755
--- a/t/parallel-tests-exit-statuses.sh
+++ b/t/parallel-tests-exit-statuses.sh
@@ -17,7 +17,7 @@
 # Check parallel-tests features: normal and special exit statuses
 # in the test scripts.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-extra-programs.sh 
b/t/parallel-tests-extra-programs.sh
index 46b5d4b..8cf5470 100755
--- a/t/parallel-tests-extra-programs.sh
+++ b/t/parallel-tests-extra-programs.sh
@@ -18,7 +18,7 @@
 # (or even be) $(EXTRA_PROGRAMS).
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/parallel-tests-fd-redirect-exeext.sh 
b/t/parallel-tests-fd-redirect-exeext.sh
index 3f008c2..9af0e13 100755
--- a/t/parallel-tests-fd-redirect-exeext.sh
+++ b/t/parallel-tests-fd-redirect-exeext.sh
@@ -22,7 +22,7 @@
 # sister test 'parallel-tests-fd-redirect.sh'.
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/parallel-tests-fd-redirect.sh b/t/parallel-tests-fd-redirect.sh
index 70d3f55..ece27a5 100755
--- a/t/parallel-tests-fd-redirect.sh
+++ b/t/parallel-tests-fd-redirect.sh
@@ -20,7 +20,7 @@
 # check for tests that are binary executables.
 # See also the more generic test 'check-fd-redirect.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-fork-bomb.sh b/t/parallel-tests-fork-bomb.sh
index 8cb248e..98ee572 100755
--- a/t/parallel-tests-fork-bomb.sh
+++ b/t/parallel-tests-fork-bomb.sh
@@ -18,7 +18,7 @@
 #  - If $(TEST_SUITE_LOG) is in $(TEST_LOGS), we get a diagnosed
 #    error, not a make hang or a system freeze.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We don't want localized error messages from make, since we'll have
 # to grep them.  See automake bug#11452.
diff --git a/t/parallel-tests-generated-and-distributed.sh 
b/t/parallel-tests-generated-and-distributed.sh
index 71d844e..3f4d482 100755
--- a/t/parallel-tests-generated-and-distributed.sh
+++ b/t/parallel-tests-generated-and-distributed.sh
@@ -16,7 +16,7 @@
 
 # Check parallel-tests features: generated distributed tests.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-harderror.sh b/t/parallel-tests-harderror.sh
index 4ac1f61..4edfa60 100755
--- a/t/parallel-tests-harderror.sh
+++ b/t/parallel-tests-harderror.sh
@@ -16,7 +16,7 @@
 
 # Check parallel-tests features: DISABLE_HARD_ERRORS
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/parallel-tests-interrupt.tap b/t/parallel-tests-interrupt.tap
index 76e89f2..406bd7a 100755
--- a/t/parallel-tests-interrupt.tap
+++ b/t/parallel-tests-interrupt.tap
@@ -19,7 +19,7 @@
 # but we couldn't find a better way to deal with inter-processes
 # signals and the whole process-synchronization mess.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 16
 
diff --git a/t/parallel-tests-log-compiler-1.sh 
b/t/parallel-tests-log-compiler-1.sh
index 40ca64d..9fa78f7 100755
--- a/t/parallel-tests-log-compiler-1.sh
+++ b/t/parallel-tests-log-compiler-1.sh
@@ -19,7 +19,7 @@
 #   and xxx_LOG_FLAGS), also with AC_SUBST'd stuff.
 # See also related test 'parallel-tests-log-compiler-2.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([acsubst_compiler], [t-compiler])
diff --git a/t/parallel-tests-log-compiler-2.sh 
b/t/parallel-tests-log-compiler-2.sh
index 775a4d1..2790dcb 100755
--- a/t/parallel-tests-log-compiler-2.sh
+++ b/t/parallel-tests-log-compiler-2.sh
@@ -20,7 +20,7 @@
 # See also related test 'parallel-tests-log-compiler-1.sh'.
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/parallel-tests-log-override.sh b/t/parallel-tests-log-override.sh
index 940823f..ad4b78f 100755
--- a/t/parallel-tests-log-override.sh
+++ b/t/parallel-tests-log-override.sh
@@ -16,7 +16,7 @@
 
 # Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-logvars-example.sh 
b/t/parallel-tests-logvars-example.sh
index 50bdba2..6b159a7 100755
--- a/t/parallel-tests-logvars-example.sh
+++ b/t/parallel-tests-logvars-example.sh
@@ -18,7 +18,7 @@
 # LOG_COMPILER, LOG_FLAGS and LOG_DEPENDNECIES given in the manual.
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_SUBST([PERL], ['$PERL'])
diff --git a/t/parallel-tests-longest-stem.sh b/t/parallel-tests-longest-stem.sh
index 181014b..f54cb38 100755
--- a/t/parallel-tests-longest-stem.sh
+++ b/t/parallel-tests-longest-stem.sh
@@ -18,7 +18,7 @@
 # extension-less tests.  This is required to allow the user to have
 # a, say, 'all.test' test case even in the face of the 'all' target.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/parallel-tests-many.sh b/t/parallel-tests-many.sh
index 70d9d23..ce31f46 100755
--- a/t/parallel-tests-many.sh
+++ b/t/parallel-tests-many.sh
@@ -18,7 +18,7 @@
 # to an exceeded command line length when there are many tests.
 # For automake bug#7868.
 
-. ./defs || exit 1
+. test-init.sh
 
 expensive_
 
diff --git a/t/parallel-tests-no-color-in-log.sh 
b/t/parallel-tests-no-color-in-log.sh
index acfc16f..62b9c6a 100755
--- a/t/parallel-tests-no-color-in-log.sh
+++ b/t/parallel-tests-no-color-in-log.sh
@@ -17,7 +17,7 @@
 # Colorized output from the testsuite report shouldn't end up in log files.
 
 required='grep-nonprint'
-. ./defs || exit 1
+. test-init.sh
 
 TERM=ansi; export TERM
 
diff --git a/t/parallel-tests-no-repeat.sh b/t/parallel-tests-no-repeat.sh
index dae8b60..b28cf80 100755
--- a/t/parallel-tests-no-repeat.sh
+++ b/t/parallel-tests-no-repeat.sh
@@ -17,7 +17,7 @@
 # The parallel-tests harness do not cause the same test to be
 # uselessly run multiple times.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 echo TESTS = foo.test > Makefile.am
diff --git a/t/parallel-tests-once.sh b/t/parallel-tests-once.sh
index 67fcbab..d27224a 100755
--- a/t/parallel-tests-once.sh
+++ b/t/parallel-tests-once.sh
@@ -18,7 +18,7 @@
 # clean directory.  An early implementation of the '.trs' intermediate
 # files incurred a similar problem.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-per-suffix-deps.sh 
b/t/parallel-tests-per-suffix-deps.sh
index 7bf0017..65b2385 100755
--- a/t/parallel-tests-per-suffix-deps.sh
+++ b/t/parallel-tests-per-suffix-deps.sh
@@ -19,7 +19,7 @@
 # We do so with the help of "${prefix}LOG_DEPENDENCIES" variables.
 # See the last wishlist in automake bug#11287.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_SUBST([EXEEXT], [.bin])
diff --git a/t/parallel-tests-recheck-depends-on-all.sh 
b/t/parallel-tests-recheck-depends-on-all.sh
index af53061..14783fd 100755
--- a/t/parallel-tests-recheck-depends-on-all.sh
+++ b/t/parallel-tests-recheck-depends-on-all.sh
@@ -18,7 +18,7 @@
 # See automake bug#11252.
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/parallel-tests-recheck-pr11791.sh 
b/t/parallel-tests-recheck-pr11791.sh
index 105d51e..6138cc8 100755
--- a/t/parallel-tests-recheck-pr11791.sh
+++ b/t/parallel-tests-recheck-pr11791.sh
@@ -18,7 +18,7 @@
 # failures for the test cases.  See automake bug#11791.
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/parallel-tests-recheck.sh b/t/parallel-tests-recheck.sh
index d9f9479..6e53a28 100755
--- a/t/parallel-tests-recheck.sh
+++ b/t/parallel-tests-recheck.sh
@@ -17,7 +17,7 @@
 # Check parallel-tests features:
 # - recheck
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-reset-term.sh b/t/parallel-tests-reset-term.sh
index 61cbad5..3555fcb 100755
--- a/t/parallel-tests-reset-term.sh
+++ b/t/parallel-tests-reset-term.sh
@@ -18,7 +18,7 @@
 # TERM variable by either TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT.
 
 required='grep-nonprint'
-. ./defs || exit 1
+. test-init.sh
 
 TERM=ansi; export TERM
 
diff --git a/t/parallel-tests-srcdir-in-test-name.sh 
b/t/parallel-tests-srcdir-in-test-name.sh
index 72dc491..b9e9126 100755
--- a/t/parallel-tests-srcdir-in-test-name.sh
+++ b/t/parallel-tests-srcdir-in-test-name.sh
@@ -16,7 +16,7 @@
 
 # Check parallel-tests features: listing $(srcdir)/ in TESTS works.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/parallel-tests-subdir.sh b/t/parallel-tests-subdir.sh
index b7bb481..de62f7f 100755
--- a/t/parallel-tests-subdir.sh
+++ b/t/parallel-tests-subdir.sh
@@ -17,7 +17,7 @@
 # Check that the parallel test harness creates parent directories for
 # the log files when needed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-suffix-prog.sh b/t/parallel-tests-suffix-prog.sh
index 3182102..3681c41 100755
--- a/t/parallel-tests-suffix-prog.sh
+++ b/t/parallel-tests-suffix-prog.sh
@@ -19,7 +19,7 @@
 # See also sister test 'parallel-tests-suffix.sh'.
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/parallel-tests-suffix.sh b/t/parallel-tests-suffix.sh
index 93c7ea0..d0d1733 100755
--- a/t/parallel-tests-suffix.sh
+++ b/t/parallel-tests-suffix.sh
@@ -18,7 +18,7 @@
 # - suffix rules
 # See also sister test 'parallel-tests-suffix-prog.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-trailing-bslash.sh 
b/t/parallel-tests-trailing-bslash.sh
index dadc874..6770b27 100755
--- a/t/parallel-tests-trailing-bslash.sh
+++ b/t/parallel-tests-trailing-bslash.sh
@@ -19,7 +19,7 @@
 # older bash versions (e.g., bash 2.05b).
 # See automake bug#10436.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/parallel-tests-trailing-whitespace.sh 
b/t/parallel-tests-trailing-whitespace.sh
index e8e4203..3d729c8 100755
--- a/t/parallel-tests-trailing-whitespace.sh
+++ b/t/parallel-tests-trailing-whitespace.sh
@@ -18,7 +18,7 @@
 # - trailing whitespace in TESTS
 # GNU make 3.80 may expand trailing white space to '.log'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-unreadable.sh b/t/parallel-tests-unreadable.sh
index 39e3519..2a3311e 100755
--- a/t/parallel-tests-unreadable.sh
+++ b/t/parallel-tests-unreadable.sh
@@ -17,7 +17,7 @@
 # Check that the testsuite driver copes well with unreadable '.log'
 # and '.trs' files.
 
-. ./defs || exit 1
+. test-init.sh
 
 : > t
 chmod a-r t && test ! -r t || skip_ "you can still read unreadable files"
diff --git a/t/parse.sh b/t/parse.sh
index ec5bcbb..44a697b 100755
--- a/t/parse.sh
+++ b/t/parse.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure backslash-newline is treated as whitespace.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/pattern-rules.sh b/t/pattern-rules.sh
index 8e96d59..da9bdbe 100755
--- a/t/pattern-rules.sh
+++ b/t/pattern-rules.sh
@@ -16,7 +16,7 @@
 
 # Automake do not complain about nor messes up pattern rules.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/pattern-rules2.sh b/t/pattern-rules2.sh
index 4ce6a53..a00ca48 100755
--- a/t/pattern-rules2.sh
+++ b/t/pattern-rules2.sh
@@ -19,7 +19,7 @@
 # '${ARCH}/%.$(OBJEXT):'.
 # Report from Ralf Corsepius.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>Makefile.am << 'EOF'
 ${ARCH}/%.$(OBJEXT): %.S
diff --git a/t/per-target-flags.sh b/t/per-target-flags.sh
index f8b8636..f5ca614 100755
--- a/t/per-target-flags.sh
+++ b/t/per-target-flags.sh
@@ -17,12 +17,14 @@
 # Test executable-specific and library-specific flags, both with
 # and without dependency tracking.
 
-. ./defs || exit 1
+. test-init.sh
+
+makefiles='Makefile libMakefile Makefile2 libMakefile2'
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([-Wno-extra-portability])
-AC_CONFIG_FILES([Makefile libMakefile Makefile2 libMakefile2])
+AC_CONFIG_FILES([$makefiles])
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_CXX
@@ -32,8 +34,6 @@ END
 
 $ACLOCAL
 
-makefiles='Makefile libMakefile Makefile2 libMakefile2'
-
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
 foo_SOURCES = foo.c
@@ -61,9 +61,14 @@ for m in $makefiles; do
   $EGREP " required file.* '(compile|\./compile)'" stderr
 done
 
+makefiles=$(for mkf in $makefiles; do echo $mkf.in; done)
+
 : > compile
 $AUTOMAKE
 
+# Sanity check.
+for mkf in $makefiles; do test -f $mkf || exit 99; done
+
 # Regression test for missing space.
 $FGREP ')-c' $makefiles && exit 1
 
@@ -78,8 +83,16 @@ $EGREP '[^-](foo|bar)\.[o$]' $makefiles && exit 1
 
 # All our programs and libraries have per-target flags, so all
 # the compilers invocations must use an explicit '-c' option.
-grep 'COMPILE. [^-]' $makefiles && exit 1
-grep 'COMPILE. .[^c]' $makefiles && exit 1
+# We must be careful to take line continuations into account.
+grep . $makefiles | $PERL -ne '
+  use warnings FATAL => "all";
+  /\$.COMPILE/ or next;
+  $_ .= <STDIN> while (/\\$/);
+  s/\n/[cont]/g;
+  print;
+' > output
+cat output # For debugging.
+grep -v ' -c' output && exit 1
 
 $FGREP 'foo-foo.$(OBJEXT)' Makefile.in
 $FGREP 'foo-foo.$(OBJEXT)' Makefile2.in
diff --git a/t/perf/cond.sh b/t/perf/cond.sh
index cf9c760..cce2906 100755
--- a/t/perf/cond.sh
+++ b/t/perf/cond.sh
@@ -17,7 +17,7 @@
 # Check that many conditions do not lead to combinatorial explosion.
 # (This is related to PR/352.)
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_PROG_CC >>configure.ac
 
diff --git a/t/perf/testsuite-recheck.sh b/t/perf/testsuite-recheck.sh
index e3383be..5400dc4 100755
--- a/t/perf/testsuite-recheck.sh
+++ b/t/perf/testsuite-recheck.sh
@@ -19,7 +19,7 @@
 # FIXME: performance is too low, and FAIL accordingly; it just offers an
 # FIXME: easy way to verify how effective a performance optimization is.
 
-. ./defs || exit 1
+. test-init.sh
 
 count=5000
 
diff --git a/t/perf/testsuite-summary.sh b/t/perf/testsuite-summary.sh
index 296a621..3c02481 100755
--- a/t/perf/testsuite-summary.sh
+++ b/t/perf/testsuite-summary.sh
@@ -20,7 +20,7 @@
 # FIXME: performance is too low, and FAIL accordingly; it just offers
 # FIXME: an easy way verify how effective a performance optimization is.
 
-. ./defs || exit 1
+. test-init.sh
 
 count=10000
 
diff --git a/t/phony.sh b/t/phony.sh
index 14d6e24..a0af06d 100755
--- a/t/phony.sh
+++ b/t/phony.sh
@@ -17,7 +17,7 @@
 # Make sure .PHONY can be given dependencies several times.
 # From Ralf Corsepius.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >Makefile.am << 'EOF'
 .PHONY: foo
diff --git a/t/pluseq.sh b/t/pluseq.sh
index 74dea56..a6dfb92 100755
--- a/t/pluseq.sh
+++ b/t/pluseq.sh
@@ -16,7 +16,7 @@
 
 # Test '+=' functionality.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 data_DATA = zar
diff --git a/t/pluseq10.sh b/t/pluseq10.sh
index 20516c3..f0be6cf 100755
--- a/t/pluseq10.sh
+++ b/t/pluseq10.sh
@@ -17,7 +17,7 @@
 # Test for += and backslashes.
 # Reported by Ralf Corsepius.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac << 'END'
 AM_CONDITIONAL([A], [true])
diff --git a/t/pluseq11.sh b/t/pluseq11.sh
index 67dfd33..f00e743 100755
--- a/t/pluseq11.sh
+++ b/t/pluseq11.sh
@@ -18,7 +18,7 @@
 # is erroneously retained in the final value.
 # See also sister test 'pluseq11b.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/pluseq2.sh b/t/pluseq2.sh
index 2069444..d2f7ee7 100755
--- a/t/pluseq2.sh
+++ b/t/pluseq2.sh
@@ -16,7 +16,7 @@
 
 # Test '+=' with conditionals.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([CHECK], [true])
diff --git a/t/pluseq3.sh b/t/pluseq3.sh
index c80a116..5f3424a 100755
--- a/t/pluseq3.sh
+++ b/t/pluseq3.sh
@@ -16,7 +16,7 @@
 
 # Another '+=' test with conditionals.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([CHECK], [true])
diff --git a/t/pluseq4.sh b/t/pluseq4.sh
index 32c64ea..3292dc5 100755
--- a/t/pluseq4.sh
+++ b/t/pluseq4.sh
@@ -16,7 +16,7 @@
 
 # Yet another '+=' test.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/pluseq5.sh b/t/pluseq5.sh
index bd2cd9a..64c5a6c 100755
--- a/t/pluseq5.sh
+++ b/t/pluseq5.sh
@@ -16,7 +16,7 @@
 
 # Test for another '+=' problem.  Report from Brian Jones.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([CHECK], [true])
diff --git a/t/pluseq6.sh b/t/pluseq6.sh
index 2db9c6f..0d4fcbe 100755
--- a/t/pluseq6.sh
+++ b/t/pluseq6.sh
@@ -16,7 +16,7 @@
 
 # Test that '+=' works with standard header-vars.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([ZZZ])
diff --git a/t/pluseq7.sh b/t/pluseq7.sh
index c7ea2ad..f9a667f 100755
--- a/t/pluseq7.sh
+++ b/t/pluseq7.sh
@@ -16,7 +16,7 @@
 
 # Test that '+=' fails when required.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/pluseq8.sh b/t/pluseq8.sh
index da0ad89..83fa50a 100755
--- a/t/pluseq8.sh
+++ b/t/pluseq8.sh
@@ -16,7 +16,7 @@
 
 # Another '+=' test.  From Paul Berrevoets.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 VAR = \
diff --git a/t/pluseq9.sh b/t/pluseq9.sh
index 4bbb78a..ab97c08 100755
--- a/t/pluseq9.sh
+++ b/t/pluseq9.sh
@@ -16,7 +16,7 @@
 
 # Test the += diagnostics.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac << 'END'
 AM_CONDITIONAL([COND1], [true])
diff --git a/t/posixsubst-data.sh b/t/posixsubst-data.sh
index 51b791e..9fd5340 100755
--- a/t/posixsubst-data.sh
+++ b/t/posixsubst-data.sh
@@ -17,7 +17,7 @@
 # Test that POSIX variable expansion '$(var:str=rpl)' works
 # in when used with the DATA primary.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/posixsubst-extradist.sh b/t/posixsubst-extradist.sh
index b8e69d7..d8ba0d9 100755
--- a/t/posixsubst-extradist.sh
+++ b/t/posixsubst-extradist.sh
@@ -17,7 +17,7 @@
 # Test that POSIX variable expansion '$(var:str=rpl)' works when used
 # in EXTRA_DIST.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/posixsubst-ldadd.sh b/t/posixsubst-ldadd.sh
index 4d95994..f539818 100755
--- a/t/posixsubst-ldadd.sh
+++ b/t/posixsubst-ldadd.sh
@@ -18,7 +18,7 @@
 # when used in LDADD.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/posixsubst-libraries.sh b/t/posixsubst-libraries.sh
index e7b5fe9..b5497fa 100755
--- a/t/posixsubst-libraries.sh
+++ b/t/posixsubst-libraries.sh
@@ -19,7 +19,7 @@
 # Keep this in sync with sister test 'posixsubst-ltlibraries.sh'.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/posixsubst-ltlibraries.sh b/t/posixsubst-ltlibraries.sh
index 07b902f..7ebef56 100755
--- a/t/posixsubst-ltlibraries.sh
+++ b/t/posixsubst-ltlibraries.sh
@@ -19,7 +19,7 @@
 # Keep this in sync with sister test 'posixsubst-libraries.sh'.
 
 required='cc libtool libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/posixsubst-programs.sh b/t/posixsubst-programs.sh
index 6e8e56b..edcd4dd 100755
--- a/t/posixsubst-programs.sh
+++ b/t/posixsubst-programs.sh
@@ -18,7 +18,7 @@
 # with the PROGRAMS primary.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/posixsubst-scripts.sh b/t/posixsubst-scripts.sh
index c9083cb..7b758f3 100755
--- a/t/posixsubst-scripts.sh
+++ b/t/posixsubst-scripts.sh
@@ -17,7 +17,7 @@
 # Test that POSIX variable expansion '$(var:str=rpl)' works when used
 # with the SCRIPTS primary.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/posixsubst-sources.sh b/t/posixsubst-sources.sh
index ed545d2..774facb 100755
--- a/t/posixsubst-sources.sh
+++ b/t/posixsubst-sources.sh
@@ -18,7 +18,7 @@
 # with the SOURCES primary.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/ppf77.sh b/t/ppf77.sh
index 73a32cb..f1c67e4 100755
--- a/t/ppf77.sh
+++ b/t/ppf77.sh
@@ -17,7 +17,7 @@
 # Test to make sure preprocessed F77 works.
 # Report from Jochen Kuepper.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
diff --git a/t/pr2.sh b/t/pr2.sh
index 70e17ee..5a3ac96 100755
--- a/t/pr2.sh
+++ b/t/pr2.sh
@@ -27,7 +27,7 @@
 # to the distribution directory before it creates a templ
 # subdirectory in the distribution directory.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT([README.foo:templ/README.foo.in])
diff --git a/t/pr211.sh b/t/pr211.sh
index a7dcee8..3d19a06 100755
--- a/t/pr211.sh
+++ b/t/pr211.sh
@@ -28,7 +28,7 @@
 # rename one of the 'foo.o' files.
 
 required=libtoolize
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/pr220.sh b/t/pr220.sh
index 2054fb3..fc67cf8 100755
--- a/t/pr220.sh
+++ b/t/pr220.sh
@@ -22,7 +22,7 @@
 # to debug the problem.
 # Note that this should be also in the documentation.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 if NEVER_TRUE
diff --git a/t/pr224.sh b/t/pr224.sh
index b72f42c..2964245 100755
--- a/t/pr224.sh
+++ b/t/pr224.sh
@@ -24,7 +24,7 @@
 # should be '$(top_builddir)/bar/.deps'.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 mkdir foo
 
diff --git a/t/pr229.sh b/t/pr229.sh
index cb3b223..b0ed4c4 100755
--- a/t/pr229.sh
+++ b/t/pr229.sh
@@ -18,7 +18,7 @@
 # Make sure AC_CYGWIN requires config.{sub,guess}.
 # Reported by James Youngman.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<EOF
 AC_CYGWIN
diff --git a/t/pr279-2.sh b/t/pr279-2.sh
index fbd06ac..7f29251 100755
--- a/t/pr279-2.sh
+++ b/t/pr279-2.sh
@@ -24,7 +24,7 @@
 # fail with messages like:
 #       foo_DEPENDENCIES was already defined in condition TRUE, ...
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/pr279.sh b/t/pr279.sh
index 7f5f7b5..24b7fb7 100755
--- a/t/pr279.sh
+++ b/t/pr279.sh
@@ -24,7 +24,7 @@
 # fail with messages like:
 #       foo_DEPENDENCIES was already defined in condition TRUE, ...
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/pr287.sh b/t/pr287.sh
index 62eb739..bbbfe48 100755
--- a/t/pr287.sh
+++ b/t/pr287.sh
@@ -16,7 +16,7 @@
 
 # Test for PR 287: empty SUBDIRS.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/pr300-lib.sh b/t/pr300-lib.sh
index d9a5dd1..ca73523 100755
--- a/t/pr300-lib.sh
+++ b/t/pr300-lib.sh
@@ -18,7 +18,7 @@
 # PR/300
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
diff --git a/t/pr300-ltlib.sh b/t/pr300-ltlib.sh
index 4926834..62c5b55 100755
--- a/t/pr300-ltlib.sh
+++ b/t/pr300-ltlib.sh
@@ -18,7 +18,7 @@
 # PR/300
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/pr300-prog.sh b/t/pr300-prog.sh
index b9aa97d..d7ada2d 100755
--- a/t/pr300-prog.sh
+++ b/t/pr300-prog.sh
@@ -18,7 +18,7 @@
 # PR/300
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/pr307.sh b/t/pr307.sh
index 04b4ee9..1204c77 100755
--- a/t/pr307.sh
+++ b/t/pr307.sh
@@ -33,7 +33,7 @@
 #  compilation.
 
 required='libtoolize gcc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/pr401.sh b/t/pr401.sh
index 53ede6d..be67a53 100755
--- a/t/pr401.sh
+++ b/t/pr401.sh
@@ -18,7 +18,7 @@
 # (pr401b.sh and pr401c.sh do the same for LTLIBOBJS and ALLOCA)
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 mkdir lib src
 
diff --git a/t/pr401b.sh b/t/pr401b.sh
index 68f3ad3..cde9920 100755
--- a/t/pr401b.sh
+++ b/t/pr401b.sh
@@ -18,7 +18,7 @@
 # (pr401.sh and pr401c.sh do the same for LIBOBJS and ALLOCA)
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 mkdir lib src
 
diff --git a/t/pr401c.sh b/t/pr401c.sh
index 71201dc..34c4450 100755
--- a/t/pr401c.sh
+++ b/t/pr401c.sh
@@ -18,7 +18,7 @@
 # (pr401.sh and pr401b.sh do the same for LIBOBJS and LTLIBOBJS)
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 mkdir lib src
 
diff --git a/t/pr72.sh b/t/pr72.sh
index 3c2c914..9eb55b7 100755
--- a/t/pr72.sh
+++ b/t/pr72.sh
@@ -18,7 +18,7 @@
 # Empty _SOURCES results in $(LINK) undefined.
 
 required=libtool
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/pr87.sh b/t/pr87.sh
index 8be6038..f9bcf43 100755
--- a/t/pr87.sh
+++ b/t/pr87.sh
@@ -18,7 +18,7 @@
 # "make distcheck" fails when two source dirs exist.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 subdirs="foo bar"
 
diff --git a/t/pr9.sh b/t/pr9.sh
index 15e8b4b..5db775f 100755
--- a/t/pr9.sh
+++ b/t/pr9.sh
@@ -23,7 +23,7 @@
 # ltconfig, ltmain.sh, mdate-sh, and missing.  In fact, the entire
 # 'support/' directory is omitted.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/prefix.sh b/t/prefix.sh
index 907cd78..bc10771 100755
--- a/t/prefix.sh
+++ b/t/prefix.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure range of prefixes can be extended
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/primary-prefix-couples-documented-valid.sh 
b/t/primary-prefix-couples-documented-valid.sh
index 5b43157..89e7880 100755
--- a/t/primary-prefix-couples-documented-valid.sh
+++ b/t/primary-prefix-couples-documented-valid.sh
@@ -18,7 +18,7 @@
 # examples in the Automake manual do not cause obvious errors.
 # Please keep this test in sync with the automake manual.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/primary-prefix-couples-force-valid.sh 
b/t/primary-prefix-couples-force-valid.sh
index e81864b..b194220 100755
--- a/t/primary-prefix-couples-force-valid.sh
+++ b/t/primary-prefix-couples-force-valid.sh
@@ -24,7 +24,7 @@
 # should work.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/primary-prefix-invalid-couples.tap 
b/t/primary-prefix-invalid-couples.tap
index 86d7665..2152d18 100755
--- a/t/primary-prefix-invalid-couples.tap
+++ b/t/primary-prefix-invalid-couples.tap
@@ -20,7 +20,7 @@
 # cover more cases.
 # See also test 'primary-prefix-valid-couples.test'.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ "later"
 
diff --git a/t/primary-prefix-valid-couples.sh 
b/t/primary-prefix-valid-couples.sh
index bb3212c..e620a2a 100755
--- a/t/primary-prefix-valid-couples.sh
+++ b/t/primary-prefix-valid-couples.sh
@@ -17,7 +17,7 @@
 # Test for valid prefix/primary combinations.
 # See also test 'primary-prefix-invalid-couples.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/primary.sh b/t/primary.sh
index b107f4d..e11eb0e 100755
--- a/t/primary.sh
+++ b/t/primary.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure errors in am_install_var work.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = @programs@
diff --git a/t/primary2.sh b/t/primary2.sh
index f355da0..c7437fe 100755
--- a/t/primary2.sh
+++ b/t/primary2.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure errors in am_install_var work.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
diff --git a/t/primary3.sh b/t/primary3.sh
index 9905a8c..0a80a54 100755
--- a/t/primary3.sh
+++ b/t/primary3.sh
@@ -17,7 +17,7 @@
 # Make sure we can build programs ending in '.la'
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CC
diff --git a/t/print-libdir.sh b/t/print-libdir.sh
index 9a33ac7..f9d596a 100755
--- a/t/print-libdir.sh
+++ b/t/print-libdir.sh
@@ -17,7 +17,7 @@
 # Test on automake options '--print-data-dir' and '--print-script-dir'.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 libdir=$($AUTOMAKE --print-libdir) || exit 1
 case $libdir in /*);; *) exit 1;; esac
diff --git a/t/proginst.sh b/t/proginst.sh
index afb7300..c0f13a6 100755
--- a/t/proginst.sh
+++ b/t/proginst.sh
@@ -17,7 +17,7 @@
 # Test for bug where when multiple scripts are installed,
 # the check for AC_PROG_INSTALL fails.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_SCRIPTS = zardoz qbert brownie
diff --git a/t/programs-primary-rewritten.sh b/t/programs-primary-rewritten.sh
index 89b8025..40caf20 100755
--- a/t/programs-primary-rewritten.sh
+++ b/t/programs-primary-rewritten.sh
@@ -18,7 +18,7 @@
 # checks have been introduced in commit 'Release-1-9-254-g9d0eaef' into
 # the former test 'subst2.test'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([FOO], [c])
diff --git a/t/py-compile-basedir.sh b/t/py-compile-basedir.sh
index f2cef30..8abad87 100755
--- a/t/py-compile-basedir.sh
+++ b/t/py-compile-basedir.sh
@@ -17,7 +17,7 @@
 # Test the '--basedir' option of the 'py-compile' script,
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 # We'll need to create files in '..', so we need one more subdirectory
 # level in order not to clutter up the top-level tests directory.
diff --git a/t/py-compile-basic.sh b/t/py-compile-basic.sh
index 73597c3..d80ef89 100755
--- a/t/py-compile-basic.sh
+++ b/t/py-compile-basic.sh
@@ -19,7 +19,7 @@
 # 'py-compile-basic2.sh'.
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_scriptdir/py-compile" . \
   || fatal_ "failed to fetch auxiliary script py-compile"
diff --git a/t/py-compile-basic2.sh b/t/py-compile-basic2.sh
index 19fdf72..8100e98 100755
--- a/t/py-compile-basic2.sh
+++ b/t/py-compile-basic2.sh
@@ -19,7 +19,7 @@
 # related test 'py-compile-basic.sh'.
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 ocwd=$(pwd) || fatal_ "getting current working directory"
 
diff --git a/t/py-compile-destdir.sh b/t/py-compile-destdir.sh
index 4d303d5..71f3f7a 100755
--- a/t/py-compile-destdir.sh
+++ b/t/py-compile-destdir.sh
@@ -17,7 +17,7 @@
 # Test the '--destdir' option of the 'py-compile' script,
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_scriptdir/py-compile" . \
   || fatal_ "failed to fetch auxiliary script py-compile"
diff --git a/t/py-compile-env.sh b/t/py-compile-env.sh
index 89d4ffc..a0d055d 100755
--- a/t/py-compile-env.sh
+++ b/t/py-compile-env.sh
@@ -16,7 +16,7 @@
 
 # Make sure 'py-compile' honours the PYTHON environment variable.
 
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_scriptdir/py-compile" . \
   || fatal_ "failed to fetch auxiliary script py-compile"
diff --git a/t/py-compile-option-terminate.sh b/t/py-compile-option-terminate.sh
index 5c2b56f..9af5e13 100755
--- a/t/py-compile-option-terminate.sh
+++ b/t/py-compile-option-terminate.sh
@@ -18,7 +18,7 @@
 # explicitly terminate the option list for 'py-compile'.
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_scriptdir/py-compile" . \
   || fatal_ "failed to fetch auxiliary script py-compile"
diff --git a/t/py-compile-usage.sh b/t/py-compile-usage.sh
index 13ddc8e..ee5177d 100755
--- a/t/py-compile-usage.sh
+++ b/t/py-compile-usage.sh
@@ -17,7 +17,7 @@
 # Test 'py-compile --help', 'py-compile --version', and that 'py-compile'
 # correctly complains on wrong usage.
 
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_scriptdir/py-compile" . \
   || fatal_ "failed to fetch auxiliary script py-compile"
diff --git a/t/python-am-path-iftrue.sh b/t/python-am-path-iftrue.sh
index d7ba436..9c2335a 100755
--- a/t/python-am-path-iftrue.sh
+++ b/t/python-am-path-iftrue.sh
@@ -18,7 +18,7 @@
 
 am_create_testdir=empty
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/python-dist.sh b/t/python-dist.sh
index 0b6a4b0..070950c 100755
--- a/t/python-dist.sh
+++ b/t/python-dist.sh
@@ -17,7 +17,7 @@
 # Test distribution of *_PYTHON files.
 
 # This test does not require python.
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PATH_PYTHON([], [:], [:])
diff --git a/t/python-missing.sh b/t/python-missing.sh
index b0912d3..9a3ccfb 100755
--- a/t/python-missing.sh
+++ b/t/python-missing.sh
@@ -20,7 +20,7 @@
 
 am_create_testdir=empty
 # An actual python is *not* required in this test.
-. ./defs || exit 1
+. test-init.sh
 
 PYTHON=; unset PYTHON
 
diff --git a/t/python-pr10995.sh b/t/python-pr10995.sh
index c530a13..4075a37 100755
--- a/t/python-pr10995.sh
+++ b/t/python-pr10995.sh
@@ -19,7 +19,7 @@
 # declaration.
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AM_PATH_PYTHON
diff --git a/t/python-too-old.sh b/t/python-too-old.sh
index e4185fc..24ee584 100755
--- a/t/python-too-old.sh
+++ b/t/python-too-old.sh
@@ -19,7 +19,7 @@
 
 am_create_testdir=empty
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 py_too_old ()
 {
diff --git a/t/python-vars.sh b/t/python-vars.sh
index 5bac280..eec07ae 100755
--- a/t/python-vars.sh
+++ b/t/python-vars.sh
@@ -18,7 +18,7 @@
 # advertised in the manual.
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 # In case the user's config.site defines pythondir or pyexecdir.
 CONFIG_SITE=/dev/null; export CONFIG_SITE
diff --git a/t/python-virtualenv.sh b/t/python-virtualenv.sh
index cc5ace0..e16ee2b 100755
--- a/t/python-virtualenv.sh
+++ b/t/python-virtualenv.sh
@@ -18,7 +18,7 @@
 # This test also works as a mild stress-test on the python support.
 
 required='cc python virtualenv'
-. ./defs || exit 1
+. test-init.sh
 
 # In case the user's config.site defines pythondir or pyexecdir.
 CONFIG_SITE=/dev/null; export CONFIG_SITE
diff --git a/t/python.sh b/t/python.sh
index a3add40..3f79ca3 100755
--- a/t/python.sh
+++ b/t/python.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure py_compile and am__py_compile are correctly defined.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo 'AM_PATH_PYTHON' >> configure.ac
 
diff --git a/t/python10.sh b/t/python10.sh
index 5465810..c4a0ab4 100755
--- a/t/python10.sh
+++ b/t/python10.sh
@@ -17,7 +17,7 @@
 # Test _PYTHON with conditionals.
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_PATH_PYTHON
diff --git a/t/python11.sh b/t/python11.sh
index e86d30e..e3e29e5 100755
--- a/t/python11.sh
+++ b/t/python11.sh
@@ -17,7 +17,7 @@
 # Test missing python.
 
 # Python is not required for this test.
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 m4_define([_AM_PYTHON_INTERPRETER_LIST], [IShouldNotExist1 IShouldNotExist2])
diff --git a/t/python12.sh b/t/python12.sh
index 898c673..3fd4030 100755
--- a/t/python12.sh
+++ b/t/python12.sh
@@ -17,7 +17,7 @@
 # Ensure DESTDIR is not included in byte-compiled files.
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_PATH_PYTHON
diff --git a/t/python2.sh b/t/python2.sh
index 71ba25f..0ecf79d 100755
--- a/t/python2.sh
+++ b/t/python2.sh
@@ -16,7 +16,7 @@
 
 # Make sure that Automake suggests using AM_PATH_PYTHON.
 
-. ./defs || exit 1
+. test-init.sh
 
 $ACLOCAL
 
diff --git a/t/python3.sh b/t/python3.sh
index 8667cf9..f749f9f 100755
--- a/t/python3.sh
+++ b/t/python3.sh
@@ -17,7 +17,7 @@
 # Make sure we install built python files.
 
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AM_PATH_PYTHON
diff --git a/t/recurs-user-deeply-nested.sh b/t/recurs-user-deeply-nested.sh
index c9e5c1f..27a51ad 100755
--- a/t/recurs-user-deeply-nested.sh
+++ b/t/recurs-user-deeply-nested.sh
@@ -17,7 +17,7 @@
 # Check that recursion on user-defined targets can be made to work
 # with "deeply" nested uses of $(SUBDIRS).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([
diff --git a/t/recurs-user-indir.sh b/t/recurs-user-indir.sh
index 01d98a7..5e85d34 100755
--- a/t/recurs-user-indir.sh
+++ b/t/recurs-user-indir.sh
@@ -19,7 +19,7 @@
 # AC_SUBST'd strings, automake-time file inclusions, automake
 # conditionals...
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([
diff --git a/t/recurs-user-keep-going.sh b/t/recurs-user-keep-going.sh
index 3be5eb4..eb09cb7 100755
--- a/t/recurs-user-keep-going.sh
+++ b/t/recurs-user-keep-going.sh
@@ -16,7 +16,7 @@
 
 # Check that user recursion works with "make -k".
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AM_EXTRA_RECURSIVE_TARGETS([foo])
diff --git a/t/recurs-user-many.sh b/t/recurs-user-many.sh
index c1e4757..b40dd79 100755
--- a/t/recurs-user-many.sh
+++ b/t/recurs-user-many.sh
@@ -18,7 +18,7 @@
 # at once, and that calls to 'AM_EXTRA_RECURSIVE_TARGETS' are
 # cumulative.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/recurs-user-no-subdirs.sh b/t/recurs-user-no-subdirs.sh
index ed56d07..76da433 100755
--- a/t/recurs-user-no-subdirs.sh
+++ b/t/recurs-user-no-subdirs.sh
@@ -17,7 +17,7 @@
 # Check that user recursion can be made to work even when $(SUBDIRS)
 # is empty or undefined.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AM_EXTRA_RECURSIVE_TARGETS([foo])
diff --git a/t/recurs-user-no-top-level.sh b/t/recurs-user-no-top-level.sh
index f80010a..1546f1c 100755
--- a/t/recurs-user-no-top-level.sh
+++ b/t/recurs-user-no-top-level.sh
@@ -17,7 +17,7 @@
 # Check that user recursion works even for targets that don't exist
 # in the top-level Makefile.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/recurs-user-override.sh b/t/recurs-user-override.sh
index 64ef2ee..02dd333 100755
--- a/t/recurs-user-override.sh
+++ b/t/recurs-user-override.sh
@@ -17,7 +17,7 @@
 # Check that override of user-defined recursive targets work as
 # expected.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/recurs-user-phony.sh b/t/recurs-user-phony.sh
index 93ee973..2a5a290 100755
--- a/t/recurs-user-phony.sh
+++ b/t/recurs-user-phony.sh
@@ -17,7 +17,7 @@
 # Check that user-defined recursive targets and their associate
 # '-local', '-am' and '-recursive' targets are declared as phony.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/recurs-user-wrap.sh b/t/recurs-user-wrap.sh
index c2e70b4..59042a6 100755
--- a/t/recurs-user-wrap.sh
+++ b/t/recurs-user-wrap.sh
@@ -17,7 +17,7 @@
 # Check that rules generated by user recursion are apt to be wrapped
 # by other makefiles.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_EXTRA_RECURSIVE_TARGETS([extra])
diff --git a/t/recurs-user.sh b/t/recurs-user.sh
index 34a3fd2..198483f 100755
--- a/t/recurs-user.sh
+++ b/t/recurs-user.sh
@@ -18,7 +18,7 @@
 # Check that user recursion respect $(SUBDIRS) order,
 # and proceeds in a depth-first fashion.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AM_EXTRA_RECURSIVE_TARGETS([foo])
diff --git a/t/recurs-user2.sh b/t/recurs-user2.sh
index 0e4cba5..4664efd 100755
--- a/t/recurs-user2.sh
+++ b/t/recurs-user2.sh
@@ -19,7 +19,7 @@
 #    SUBDIRS = src external/lib external/tests
 # with no Makefile in 'external'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES(
diff --git a/t/relativize.tap b/t/relativize.tap
index a9644af..50cc98b 100755
--- a/t/relativize.tap
+++ b/t/relativize.tap
@@ -17,7 +17,7 @@
 # Test Automake-provided internal make macro $(am.dist.relativize-path).
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 plan_ later
 
diff --git a/t/remake-aclocal-version-mismatch.sh 
b/t/remake-aclocal-version-mismatch.sh
index 22d31d0..b844fc1 100755
--- a/t/remake-aclocal-version-mismatch.sh
+++ b/t/remake-aclocal-version-mismatch.sh
@@ -17,7 +17,7 @@
 # See how well the rebuild rule handles an aclocal.m4 that was
 # generated for another version of autoconf.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >>configure.ac
 
diff --git a/t/remake-after-acinclude-m4.sh b/t/remake-after-acinclude-m4.sh
index 7a12391..9eb3bd7 100755
--- a/t/remake-after-acinclude-m4.sh
+++ b/t/remake-after-acinclude-m4.sh
@@ -17,7 +17,7 @@
 # Test remake rules when acinclude.m4 or its prerequisites change.
 # Keep in sync with the other sister tests 'remake-after-*.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
diff --git a/t/remake-after-aclocal-m4.sh b/t/remake-after-aclocal-m4.sh
index 9657d7f..86d9f28 100755
--- a/t/remake-after-aclocal-m4.sh
+++ b/t/remake-after-aclocal-m4.sh
@@ -17,7 +17,7 @@
 # Test remake rules when aclocal.m4 or its prerequisites change.
 # Keep in sync with the other sister tests 'remake-after-*.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
diff --git a/t/remake-after-configure-ac.sh b/t/remake-after-configure-ac.sh
index a2faedf..157a501 100755
--- a/t/remake-after-configure-ac.sh
+++ b/t/remake-after-configure-ac.sh
@@ -17,7 +17,7 @@
 # Test remake rules when configure.ac or its prerequisites change.
 # Keep in sync with the other sister tests 'remake-after-*.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
diff --git a/t/remake-after-makefile-am.sh b/t/remake-after-makefile-am.sh
index e304b6e..885cacb 100755
--- a/t/remake-after-makefile-am.sh
+++ b/t/remake-after-makefile-am.sh
@@ -17,7 +17,7 @@
 # Test remake rules when Makefile.am or its prerequisites change.
 # Keep in sync with the other sister tests 'remake-after-*.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
diff --git a/t/remake-all-1.sh b/t/remake-all-1.sh
index a6ec8e2..3f21dd9 100755
--- a/t/remake-all-1.sh
+++ b/t/remake-all-1.sh
@@ -16,7 +16,7 @@
 
 # Check that the "all" target triggers rebuilt of outdated Makefiles.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkfile=Makefile
 
diff --git a/t/remake-am-pr10111.sh b/t/remake-am-pr10111.sh
index b3b7c6c..787e71b 100755
--- a/t/remake-am-pr10111.sh
+++ b/t/remake-am-pr10111.sh
@@ -22,7 +22,7 @@
 # big deal in practice (in fact, this test *currently fails*).  Still,
 # keeping the limitation exposed is a good idea anyway.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/remake-deeply-nested.sh b/t/remake-deeply-nested.sh
index 8f29499..4949b52 100755
--- a/t/remake-deeply-nested.sh
+++ b/t/remake-deeply-nested.sh
@@ -19,7 +19,7 @@
 # rules don't break in obvious ways in a slightly "heavier than usual"
 # setup.
 
-. ./defs || exit 1
+. test-init.sh
 
 ocwd=$(pwd) || fatal_ "getting current working directory"
 
diff --git a/t/remake-deleted-am-2.sh b/t/remake-deleted-am-2.sh
index 0b55062..dde1615 100755
--- a/t/remake-deleted-am-2.sh
+++ b/t/remake-deleted-am-2.sh
@@ -18,7 +18,7 @@
 # of the "deleted header problem".  This test checks deeper inclusion
 # stacks, and use VPATH builds.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/remake-deleted-am-subdir.sh b/t/remake-deleted-am-subdir.sh
index 868d36e..f784593 100755
--- a/t/remake-deleted-am-subdir.sh
+++ b/t/remake-deleted-am-subdir.sh
@@ -18,7 +18,7 @@
 # of the "deleted header problem".  This test does the check when the
 # SUBDIRS variable is involved.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
diff --git a/t/remake-deleted-am.sh b/t/remake-deleted-am.sh
index f754a37..485f37f 100755
--- a/t/remake-deleted-am.sh
+++ b/t/remake-deleted-am.sh
@@ -17,7 +17,7 @@
 # Check that inclusion of '.am' fragments by automake does not suffer
 # of the "deleted header problem".  Basic checks are done here.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/remake-deleted-m4-file.sh b/t/remake-deleted-m4-file.sh
index 7fc9d2f..6eac545 100755
--- a/t/remake-deleted-m4-file.sh
+++ b/t/remake-deleted-m4-file.sh
@@ -20,7 +20,7 @@
 # header file" issue w.r.t. aclocal.m4 dependencies.  See also related
 # test 'acloca22.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 FOO_MACRO
diff --git a/t/remake-fail.sh b/t/remake-fail.sh
index 9ccf5d1..99a5b00 100755
--- a/t/remake-fail.sh
+++ b/t/remake-fail.sh
@@ -16,7 +16,7 @@
 
 # Make sure remaking rules fail when they should.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/remake-gnulib-add-acsubst.sh b/t/remake-gnulib-add-acsubst.sh
index 99b5366..6464b55 100755
--- a/t/remake-gnulib-add-acsubst.sh
+++ b/t/remake-gnulib-add-acsubst.sh
@@ -22,7 +22,7 @@
 # for more info).
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/remake-gnulib-add-header.sh b/t/remake-gnulib-add-header.sh
index 0f6feef..609e5ea 100755
--- a/t/remake-gnulib-add-header.sh
+++ b/t/remake-gnulib-add-header.sh
@@ -22,7 +22,7 @@
 # for more info).
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_HEADERS([config.h])
diff --git a/t/remake-gnulib-remove-header.sh b/t/remake-gnulib-remove-header.sh
index 5cbe96f..2dbe66a 100755
--- a/t/remake-gnulib-remove-header.sh
+++ b/t/remake-gnulib-remove-header.sh
@@ -23,7 +23,7 @@
 # for more info).
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_HEADERS([config.h])
diff --git a/t/remake-include-aclocal.sh b/t/remake-include-aclocal.sh
index 630f70a..3e7ee32 100755
--- a/t/remake-include-aclocal.sh
+++ b/t/remake-include-aclocal.sh
@@ -19,7 +19,7 @@
 #   - remake-include-configure.sh
 #   - remake-include-makefile.sh
 
-. ./defs || exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
diff --git a/t/remake-include-configure.sh b/t/remake-include-configure.sh
index 00347a7..01e2a69 100755
--- a/t/remake-include-configure.sh
+++ b/t/remake-include-configure.sh
@@ -19,7 +19,7 @@
 #   - remake-include-aclocal.sh
 #   - remake-include-makefile.sh
 
-. ./defs || exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
diff --git a/t/remake-include-makefile.sh b/t/remake-include-makefile.sh
index 722a316..dd6a7e7 100755
--- a/t/remake-include-makefile.sh
+++ b/t/remake-include-makefile.sh
@@ -20,7 +20,7 @@
 #   - remake-include-configure.sh
 
 
-. ./defs || exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
diff --git a/t/remake-m4-pr10111.sh b/t/remake-m4-pr10111.sh
index 8a28925..9df34b6 100755
--- a/t/remake-m4-pr10111.sh
+++ b/t/remake-m4-pr10111.sh
@@ -22,7 +22,7 @@
 # big deal in practice (in fact, this test *currently fails*).  Still,
 # keeping the limitation exposed is a good idea anyway.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 m4_include([foobar.m4])
diff --git a/t/remake-macrodir.sh b/t/remake-macrodir.sh
index 61ac197..bdd3f02 100755
--- a/t/remake-macrodir.sh
+++ b/t/remake-macrodir.sh
@@ -17,7 +17,7 @@
 # Check that the aclocal honouring of AC_CONFIG_MACRO_DIR interacts
 # nicely with automatic rebuild rules.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_MACRO_DIR([macro-dir])
diff --git a/t/remake-makefile-intree.sh b/t/remake-makefile-intree.sh
index 5062272..ceac05d 100755
--- a/t/remake-makefile-intree.sh
+++ b/t/remake-makefile-intree.sh
@@ -21,7 +21,7 @@
 # Keep this in sync with sister test 'remake-makefile-vpath.sh', which
 # performs the same checks for a VPATH build.
 
-. ./defs || exit 1
+. test-init.sh
 
 mv -f configure.ac configure.stub
 
diff --git a/t/remake-makefile-vpath.sh b/t/remake-makefile-vpath.sh
index 2bcfe00..357b366 100755
--- a/t/remake-makefile-vpath.sh
+++ b/t/remake-makefile-vpath.sh
@@ -21,7 +21,7 @@
 # Keep this in sync with sister test 'remake-makefile-instree.sh', which
 # performs the same checks for a in-tree build.
 
-. ./defs || exit 1
+. test-init.sh
 
 mv -f configure.ac configure.stub
 
diff --git a/t/remake-mild-stress.sh b/t/remake-mild-stress.sh
index 15a56ce..ca93d6d 100755
--- a/t/remake-mild-stress.sh
+++ b/t/remake-mild-stress.sh
@@ -17,7 +17,7 @@
 # Test basic remake rules for Makefiles with non-default names
 # and/or with multiple sources.
 
-. ./defs || exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
diff --git a/t/remake-moved-m4-file.sh b/t/remake-moved-m4-file.sh
index c5cf42a..0a20b5e 100755
--- a/t/remake-moved-m4-file.sh
+++ b/t/remake-moved-m4-file.sh
@@ -17,7 +17,7 @@
 # Test remake rules when m4 files get moved among different "include
 # dirs" (i.e. those passed to aclocal with '-I' option).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 MY_MACRO
diff --git a/t/remake-not-after-make-dist.sh b/t/remake-not-after-make-dist.sh
index 955d5dc..4f860fd 100755
--- a/t/remake-not-after-make-dist.sh
+++ b/t/remake-not-after-make-dist.sh
@@ -27,7 +27,7 @@
 #
 # Report from Akim Demaille.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 # Rebuild rule are ok until make dist, but not afterwards.
diff --git a/t/remake-recurs-user.sh b/t/remake-recurs-user.sh
index 027fbb7..d455832 100755
--- a/t/remake-recurs-user.sh
+++ b/t/remake-recurs-user.sh
@@ -16,7 +16,7 @@
 
 # Remake rules and user-defined recursive rules.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 m4_include([extra-targets.m4])
diff --git a/t/remake-renamed-am.sh b/t/remake-renamed-am.sh
index 8ebe563..1e679b4 100755
--- a/t/remake-renamed-am.sh
+++ b/t/remake-renamed-am.sh
@@ -18,7 +18,7 @@
 # of the "deleted header problem".  This test checks that we can rename
 # an included .am file without confusing the remake rules.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/remake-renamed-m4-file.sh b/t/remake-renamed-m4-file.sh
index 666cf4c..fc1f4fc 100755
--- a/t/remake-renamed-m4-file.sh
+++ b/t/remake-renamed-m4-file.sh
@@ -16,7 +16,7 @@
 
 # Test remake rules when m4 files get renamed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 MY_MACRO
diff --git a/t/remake-renamed-m4-macro-and-file.sh 
b/t/remake-renamed-m4-macro-and-file.sh
index 94e704a..7d6ad44 100755
--- a/t/remake-renamed-m4-macro-and-file.sh
+++ b/t/remake-renamed-m4-macro-and-file.sh
@@ -18,7 +18,7 @@
 # an m4 macro in it gets renamed.  Kudos to Bruno Haible for thinking
 # about this situation.  See also related test 'acloca22.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 MY_MACRO
diff --git a/t/remake-renamed-m4-macro.sh b/t/remake-renamed-m4-macro.sh
index 96cd730..4acee06 100755
--- a/t/remake-renamed-m4-macro.sh
+++ b/t/remake-renamed-m4-macro.sh
@@ -17,7 +17,7 @@
 # Test remake rules when the name of an m4 macro change.  Try both with
 # and without indirection.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 MY_MACRO
diff --git a/t/remake-subdir-from-subdir.sh b/t/remake-subdir-from-subdir.sh
index 7439f9b..ba51903 100755
--- a/t/remake-subdir-from-subdir.sh
+++ b/t/remake-subdir-from-subdir.sh
@@ -19,7 +19,7 @@
 # See also the other similar tests 'remake-subdir*.sh', and the
 # related test 'aclocal5.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 m4_include([subdirs.m4])
diff --git a/t/remake-subdir-gnu.sh b/t/remake-subdir-gnu.sh
index b216b0e..eb2c4ad 100755
--- a/t/remake-subdir-gnu.sh
+++ b/t/remake-subdir-gnu.sh
@@ -20,7 +20,7 @@
 # See also the other similar tests 'remake-subdir*.sh', and the
 # related test 'aclocal5.sh'
 
-. ./defs || exit 1
+. test-init.sh
 
 magic1='::MagicString::One::'
 magic2='__MagicString__Two__'
diff --git a/t/remake-subdir-grepping.sh b/t/remake-subdir-grepping.sh
index c7b199e..417bade 100755
--- a/t/remake-subdir-grepping.sh
+++ b/t/remake-subdir-grepping.sh
@@ -18,7 +18,7 @@
 # are correctly generated.
 # See also sister functional test 'remake-subdir-only.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/remake-subdir-long-time.sh b/t/remake-subdir-long-time.sh
index 92f61aa..647ab0f 100755
--- a/t/remake-subdir-long-time.sh
+++ b/t/remake-subdir-long-time.sh
@@ -21,7 +21,7 @@
 # an explicit delay in the build process.
 # Suggestion by Ralf Wildenhues.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/remake-subdir-no-makefile.sh b/t/remake-subdir-no-makefile.sh
index 5291ddd..56a1317 100755
--- a/t/remake-subdir-no-makefile.sh
+++ b/t/remake-subdir-no-makefile.sh
@@ -17,7 +17,7 @@
 # Ensure that remake rules work for files in a subdirectory even when
 # there is no Makefile for that subdirectory.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/foo])
diff --git a/t/remake-subdir-only.sh b/t/remake-subdir-only.sh
index 12d1ca5..b1023dd 100755
--- a/t/remake-subdir-only.sh
+++ b/t/remake-subdir-only.sh
@@ -17,7 +17,7 @@
 # Make sure remaking rules in subdir are correctly generated.
 # See also sister "grepping" test 'remake-subdir-grepping.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 fingerprint='=/FiNgErPrInT/='
 
diff --git a/t/remake-subdir.sh b/t/remake-subdir.sh
index 9c7e0f4..9e90fcb 100755
--- a/t/remake-subdir.sh
+++ b/t/remake-subdir.sh
@@ -19,7 +19,7 @@
 # See also the other similar tests 'remake-subdir*.sh', and the
 # related test 'aclocal5.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 magic1='::MagicString::One::'
 magic2='__MagicString__Two__'
diff --git a/t/remake-subdir3.sh b/t/remake-subdir3.sh
index 2146b38..9362a69 100755
--- a/t/remake-subdir3.sh
+++ b/t/remake-subdir3.sh
@@ -16,7 +16,7 @@
 
 # Make sure remaking rules work when subdir Makefile.in has been removed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/remake-timing-bug-pr8365.sh b/t/remake-timing-bug-pr8365.sh
index 8dbb11a..9c9184c 100755
--- a/t/remake-timing-bug-pr8365.sh
+++ b/t/remake-timing-bug-pr8365.sh
@@ -22,7 +22,7 @@
 # make by hand.  Thus, fixing it would not be worth the hassle, but
 # we prefer to keep it exposed anyway.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We'll use calls to stat to get debugging information.
 if stat /dev/null; then stat=stat; else stat=:; fi
diff --git a/t/repeated-options.sh b/t/repeated-options.sh
index 489c313..6da754a 100755
--- a/t/repeated-options.sh
+++ b/t/repeated-options.sh
@@ -17,7 +17,7 @@
 # Check that automake does not complain on repeated options, nor
 # generate broken or incorrect makefiles.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/req.sh b/t/req.sh
index 27b0ab1..e68db0c 100755
--- a/t/req.sh
+++ b/t/req.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure macro used in m4 file is included.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<EOF
 AC_INIT([$me], [1.0])
diff --git a/t/reqd.sh b/t/reqd.sh
index 1af4c23..4b5d122 100755
--- a/t/reqd.sh
+++ b/t/reqd.sh
@@ -17,7 +17,7 @@
 # Make sure Automake will install several copies of required files if needed.
 # Reported by Marius Vollmer.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<EOF
 AC_CONFIG_FILES([one/Makefile two/Makefile])
diff --git a/t/reqd2.sh b/t/reqd2.sh
index 5734fd1..c6a3256 100755
--- a/t/reqd2.sh
+++ b/t/reqd2.sh
@@ -19,7 +19,7 @@
 # to fix the Makefiles.)
 
 required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([req2], [1.0])
diff --git a/t/rulepat.sh b/t/rulepat.sh
index a7cbb97..2d0e537 100755
--- a/t/rulepat.sh
+++ b/t/rulepat.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure RULE_PATTERN catches strange targets.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 $(srcdir)/Makefile.am:
diff --git a/t/sanity.sh b/t/sanity.sh
index 09b1272..1f20b11 100755
--- a/t/sanity.sh
+++ b/t/sanity.sh
@@ -16,7 +16,7 @@
 
 # Unsafe absolute directory names should be diagnosed.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir 'unsafe$'
 cd 'unsafe$'
diff --git a/t/seenc.sh b/t/seenc.sh
index 9f0ae11..9a1ae2b 100755
--- a/t/seenc.sh
+++ b/t/seenc.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure C-but-not-CC error works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 dnl AC_PROG_CC and AC_PROG_CXX missing on purpose
diff --git a/t/self-check-configure-help.sh b/t/self-check-configure-help.sh
index cbe0aa5..2460025 100755
--- a/t/self-check-configure-help.sh
+++ b/t/self-check-configure-help.sh
@@ -17,7 +17,7 @@
 # Sanity check on the function used by the automake testsuite to
 # analyze output of "configure --help".
 
-. ./defs || exit 1
+. test-init.sh
 
 # FIXME: this test is a good candidate for a conversion to TAP.
 
diff --git a/t/self-check-dir.tap b/t/self-check-dir.tap
index 48dbc0e..60d9216 100755
--- a/t/self-check-dir.tap
+++ b/t/self-check-dir.tap
@@ -15,12 +15,12 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Sanity check for the automake testsuite.
-# Check that tests using './defs' create a proper temporary directory,
-# and run in it.  Also check that we can prevent the pre-population
-# and the creation of such directory if we want.
+# Check that tests using 'test-init.sh' create a proper temporary
+# directory, and run in it.  Also check that we can prevent the
+# pre-population and the creation of such directory if we want.
 
 am_create_testdir=no
-. ./defs || exit 99
+. test-init.sh
 
 plan_ 5
 
@@ -37,7 +37,7 @@ do_check ()
   rm -rf _self.dir || framework_failure_ "cleaning up _self.dir"
   command_ok_ "$1 [$2]" $AM_TEST_RUNNER_SHELL -c "
     $2
-    . ./defs || exit 99
+   . test-init.sh
     # Don't fail if 'ls -l' fails; avoids possible racy spurious failures.
     pwd; ls -l || : # For debugging.
     $3
diff --git a/t/self-check-exit.tap b/t/self-check-exit.tap
index 19cf27a..14d9e8b 100755
--- a/t/self-check-exit.tap
+++ b/t/self-check-exit.tap
@@ -16,11 +16,11 @@
 
 # Sanity check for the automake testsuite.
 # Check that, in case of failing commands, the correct exit status is
-# passed to the exit trap installed by the './defs' script.
+# passed to the exit trap installed by the 'test-init.sh' script.
 # Also check that the 'errexit' shell flag is active.
 
 am_create_testdir=no
-. ./defs || exit 99
+. test-init.sh
 
 plan_ 32
 
@@ -30,14 +30,14 @@ plan_ 32
 set +e
 
 # It's especially important that the 'unset' is done before sourcing
-# ./defs, i.e., when 'set -e' is not active yet, for the benefit of shells
-# (like Bash 2.05 and Solaris 10 /bin/ksh) that returns a non-zero status
-# when unsetting an already-unset variable.
-# Add an extra newline at the end so that the aliases defined by 'defs'
-# can take effect.  Yes, this is truly required.
-init="stderr_fileno_=2; unset am_explicit_skips; . ./defs${nl}"
+# test-init.sh, i.e., when 'set -e' is not active yet, for the benefit
+# of shells (like Bash 2.05 and Solaris 10 /bin/ksh) that returns a
+# non-zero status when unsetting an already-unset variable.
+# Add an extra newline at the end so that the aliases defined by
+# test-init.sh can take effect.  Yes, this is truly required.
+init="stderr_fileno_=2; unset am_explicit_skips;. test-init.sh${nl}"
 
-# Required so that the code in defs doesn't go crazy trying to creating a
+# Required so that the code in test-init.sh doesn't go crazy trying to 
creating a
 # temporary directory in the absolute dir of $AM_TEST_RUNNER_SHELL.
 dummy_test_script=t/$me.sh
 
diff --git a/t/self-check-explicit-skips.sh b/t/self-check-explicit-skips.sh
index 97f5288..aa92504 100755
--- a/t/self-check-explicit-skips.sh
+++ b/t/self-check-explicit-skips.sh
@@ -19,7 +19,7 @@
 # an early exit due to some command exiting unexpectedly with status 77.
 
 am_create_testdir=no
-. ./defs || exit 1
+. test-init.sh
 
 set +e
 
@@ -31,7 +31,7 @@ run_dummy_test ()
 {
   env $2 $AM_TEST_RUNNER_SHELL -c "
     am_create_testdir=no
-    . ./defs
+   . test-init.sh
     $1
   " dummy.sh
 }
diff --git a/t/self-check-is-blocked-signal.tap 
b/t/self-check-is-blocked-signal.tap
index 9077ca8..cd23b29 100755
--- a/t/self-check-is-blocked-signal.tap
+++ b/t/self-check-is-blocked-signal.tap
@@ -18,7 +18,7 @@
 # shell function.
 
 am_create_testdir=no
-. ./defs || exit 99
+. test-init.sh
 
 plan_ 2
 
diff --git a/t/self-check-is_newest.tap b/t/self-check-is_newest.tap
index a5f84b3..a236798 100755
--- a/t/self-check-is_newest.tap
+++ b/t/self-check-is_newest.tap
@@ -16,7 +16,7 @@
 
 # Sanity check for the automake testsuite: the 'is_newest' subroutine.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 21
 
diff --git a/t/self-check-me.tap b/t/self-check-me.tap
index 9c3125e..6d008b6 100755
--- a/t/self-check-me.tap
+++ b/t/self-check-me.tap
@@ -15,10 +15,10 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Sanity check for the automake testsuite.
-# Make sure that $me gets automatically defined by './defs'.
+# Make sure that $me gets automatically defined by 'test-init.sh'.
 
 am_create_testdir=no
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 12
 
@@ -31,7 +31,7 @@ do_check ()
 {
   $AM_TEST_RUNNER_SHELL -c '
     am_create_testdir=no # Do not pollute the top-level directory.
-    . ./defs
+   . test-init.sh
     echo me=$me
   ' "$1" | grep "^me=$2$"
   command_ok_ "me=$1" test $? -eq 0
@@ -52,10 +52,10 @@ do_check abc. 'abc\.'
 s=$(me=bad $AM_TEST_RUNNER_SHELL -c '
   # Do not pollute the top-level directory.
   am_create_testdir=no
-  . ./defs
+ . test-init.sh
   echo me=$me
 ' foo.sh)
-command_ok_ "override of \$me before ./defs causes no error" \
+command_ok_ "override of \$me before test-init.sh causes no error" \
             test $? -eq 0
 
 r='ok'
diff --git a/t/self-check-report.sh b/t/self-check-report.sh
index 11211ec..74ec75c 100755
--- a/t/self-check-report.sh
+++ b/t/self-check-report.sh
@@ -21,7 +21,7 @@
 unset stderr_fileno_ || :
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 set +e
 
diff --git a/t/self-check-seq.tap b/t/self-check-seq.tap
index ead4eed..4db0050 100755
--- a/t/self-check-seq.tap
+++ b/t/self-check-seq.tap
@@ -17,7 +17,7 @@
 # Sanity check for the automake testsuite.
 # Check the 'seq_' subroutine.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 14
 
diff --git a/t/self-check-unindent.tap b/t/self-check-unindent.tap
index 2bd3bc2..c8dc5a8 100755
--- a/t/self-check-unindent.tap
+++ b/t/self-check-unindent.tap
@@ -17,7 +17,7 @@
 # Sanity check for the automake testsuite.
 # Check the 'unindent' subroutine.
 
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 22
 
diff --git a/t/serial-tests.sh b/t/serial-tests.sh
index 8bf43aa..0641da8 100755
--- a/t/serial-tests.sh
+++ b/t/serial-tests.sh
@@ -16,7 +16,7 @@
 
 # Option 'serial-tests'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = serial-tests
diff --git a/t/silent-configsite.sh b/t/silent-configsite.sh
index 02b608a..6b8a215 100755
--- a/t/silent-configsite.sh
+++ b/t/silent-configsite.sh
@@ -18,7 +18,7 @@
 # from config.site, and that this default can be overridden from
 # either the ./configure or make command line.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 # This line will be edited later to force silent-rules default.
diff --git a/t/silent-lex.sh b/t/silent-lex.sh
index 5b98a1b..4c0b094 100755
--- a/t/silent-lex.sh
+++ b/t/silent-lex.sh
@@ -17,7 +17,7 @@
 # Check silent-rules mode for Lex.
 
 required='cc lex'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_PROG_CC_C_O
diff --git a/t/silent-many-gcc.sh b/t/silent-many-gcc.sh
index 8a55085..bd59879 100755
--- a/t/silent-many-gcc.sh
+++ b/t/silent-many-gcc.sh
@@ -22,7 +22,7 @@
 # 'silent-many-generic.sh', which should work with generic compilers.
 
 required='gcc g++ gfortran lex yacc'
-. ./defs || exit 1
+. test-init.sh
 
 # Avoids too much code duplication.
 do_and_check_silent_build ()
diff --git a/t/silent-many-generic.sh b/t/silent-many-generic.sh
index a5fc33d..592bc73 100755
--- a/t/silent-many-generic.sh
+++ b/t/silent-many-generic.sh
@@ -23,7 +23,7 @@
 # and forces the use of gcc depmode.
 
 required='cc c++ fortran fortran77 lex yacc'
-. ./defs || exit 1
+. test-init.sh
 
 # Avoids too much code duplication.
 do_and_check_silent_build ()
diff --git a/t/silent-texi.sh b/t/silent-texi.sh
index 1640e0e..dec417a 100755
--- a/t/silent-texi.sh
+++ b/t/silent-texi.sh
@@ -17,7 +17,7 @@
 # Check texinfo rules in silent-rules mode.
 
 required='makeinfo tex texi2dvi dvips'
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/silent-yacc-headers.sh b/t/silent-yacc-headers.sh
index 6324047..e9ef9a0 100755
--- a/t/silent-yacc-headers.sh
+++ b/t/silent-yacc-headers.sh
@@ -18,7 +18,7 @@
 # involved (i.e., the '-d' option is in *YFLAGS).
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/silent-yacc.sh b/t/silent-yacc.sh
index 6330fc7..4d7eb83 100755
--- a/t/silent-yacc.sh
+++ b/t/silent-yacc.sh
@@ -18,7 +18,7 @@
 # Keep this in sync with sister test 'silent-yacc-gcc.sh'.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_PROG_CC_C_O
diff --git a/t/silent.sh b/t/silent.sh
index 97fcc7d..f2b3e4d 100755
--- a/t/silent.sh
+++ b/t/silent.sh
@@ -19,7 +19,7 @@
 # Please keep this file in sync with 'silent2.sh'.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/silent2.sh b/t/silent2.sh
index 5cb2b5c..aa01ac9 100755
--- a/t/silent2.sh
+++ b/t/silent2.sh
@@ -20,7 +20,7 @@
 # Please keep this file in sync with 'silent.sh'.
 
 required=gcc
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/silent3.sh b/t/silent3.sh
index aae10f2..b79f7f9 100755
--- a/t/silent3.sh
+++ b/t/silent3.sh
@@ -19,7 +19,7 @@
 # Please keep this file in sync with 'silent4.sh' and 'silent9.sh'.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/silent4.sh b/t/silent4.sh
index ae5573a..69ee7cf 100755
--- a/t/silent4.sh
+++ b/t/silent4.sh
@@ -20,7 +20,7 @@
 # Please keep this file in sync with 'silent3.sh' and 'silent9.sh'.
 
 required="libtoolize gcc"
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/silent6.sh b/t/silent6.sh
index a531db9..6c4c487 100755
--- a/t/silent6.sh
+++ b/t/silent6.sh
@@ -16,7 +16,7 @@
 
 # Check user extensibility of silent-rules mode.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/silent7.sh b/t/silent7.sh
index d34e8d1..ee56ce3 100755
--- a/t/silent7.sh
+++ b/t/silent7.sh
@@ -17,7 +17,7 @@
 # Check user extensibility of silent-rules mode.
 # Also check that silent rules are disabled by default.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/silent9.sh b/t/silent9.sh
index 58b03da..9fee3d6 100755
--- a/t/silent9.sh
+++ b/t/silent9.sh
@@ -19,7 +19,7 @@
 # Please keep this file in sync with 'silent3.sh' and 'silent4.sh'.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/silentcxx-gcc.sh b/t/silentcxx-gcc.sh
index aadff1c..9d3d43d 100755
--- a/t/silentcxx-gcc.sh
+++ b/t/silentcxx-gcc.sh
@@ -19,7 +19,7 @@
 # test 'silentcxx.sh', which should work with generic compilers.
 
 required=g++
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/silentcxx.sh b/t/silentcxx.sh
index 20dbd2b..474c4cc 100755
--- a/t/silentcxx.sh
+++ b/t/silentcxx.sh
@@ -19,7 +19,7 @@
 # and forces the use of gcc depmode.
 
 required=c++
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/silentf77.sh b/t/silentf77.sh
index b495991..816e4fa 100755
--- a/t/silentf77.sh
+++ b/t/silentf77.sh
@@ -18,7 +18,7 @@
 # Keep this ins sync with the sister test 'silentf90.sh'.
 
 required=fortran77
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/silentf90.sh b/t/silentf90.sh
index 494e1a5..2624390 100755
--- a/t/silentf90.sh
+++ b/t/silentf90.sh
@@ -18,7 +18,7 @@
 # Keep this ins sync with the sister test 'silentf77.sh'.
 
 required=fortran
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/space.sh b/t/space.sh
index 96bf9ba..21cffd2 100755
--- a/t/space.sh
+++ b/t/space.sh
@@ -16,7 +16,7 @@
 
 # Test leading space on macro assignment.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
diff --git a/t/specflg-dummy.sh b/t/specflg-dummy.sh
index 5cd0791..c3cff41 100755
--- a/t/specflg-dummy.sh
+++ b/t/specflg-dummy.sh
@@ -20,7 +20,7 @@
 # even if AM_CFLAGS is undefined. Similarly for other *FLAGS variables
 # (CXXFLAGS, YFLAGS, LDFLAGS, ...)
 
-. ./defs || exit 1
+. test-init.sh
 
 # Disable shell globbing if possible.
 (set +f) >/dev/null 2>&1 && set +f
diff --git a/t/specflg6.sh b/t/specflg6.sh
index 1d6ed8b..fd5150b 100755
--- a/t/specflg6.sh
+++ b/t/specflg6.sh
@@ -18,7 +18,7 @@
 # conditionals are present.
 # From Richard Boulton.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/specflg7.sh b/t/specflg7.sh
index 7261d18..0572040 100755
--- a/t/specflg7.sh
+++ b/t/specflg7.sh
@@ -17,7 +17,7 @@
 # The true/false example from the manual, plus a check for _SHORTNAME.
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/specflg8.sh b/t/specflg8.sh
index 598970a..be7cf45 100755
--- a/t/specflg8.sh
+++ b/t/specflg8.sh
@@ -19,7 +19,7 @@
 # use of _CPPFLAGS (PR/337).
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/specflg9.sh b/t/specflg9.sh
index c8cde9e..4292629 100755
--- a/t/specflg9.sh
+++ b/t/specflg9.sh
@@ -16,7 +16,7 @@
 
 # Another check for per-target flag substitutions.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/spell.sh b/t/spell.sh
index 58202af..23b0b33 100755
--- a/t/spell.sh
+++ b/t/spell.sh
@@ -17,7 +17,7 @@
 # Test to make sure misspellings in _SOURCES variables cause failure.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/spell2.sh b/t/spell2.sh
index 839e363..f21f0c6 100755
--- a/t/spell2.sh
+++ b/t/spell2.sh
@@ -17,7 +17,7 @@
 # Test to make sure misspellings in _LDADD variable cause failure.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/spell3.sh b/t/spell3.sh
index c12703b..4d20930 100755
--- a/t/spell3.sh
+++ b/t/spell3.sh
@@ -17,7 +17,7 @@
 # Test to make sure some internal _DEPENDENCIES variables don't cause
 # errors.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TAGS_DEPENDENCIES = joe
diff --git a/t/spelling.sh b/t/spelling.sh
index f6f99eb..94cce09 100755
--- a/t/spelling.sh
+++ b/t/spelling.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure that misspelled prefixes actually cause error.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 bni_PROGRAMS = zot
diff --git a/t/spy-autovars.sh b/t/spy-autovars.sh
index 99f506e..16d7315 100755
--- a/t/spy-autovars.sh
+++ b/t/spy-autovars.sh
@@ -21,7 +21,7 @@
 # automatic variables of GNU make.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile <<'END'
 foo:
diff --git a/t/spy-foreach.sh b/t/spy-foreach.sh
index e71bd81..05141b0 100755
--- a/t/spy-foreach.sh
+++ b/t/spy-foreach.sh
@@ -19,7 +19,7 @@
 # set.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile <<'END'
 $(foreach x,1 2,$(warning foo-$(x))$(eval y:=$$(x)))
diff --git a/t/spy-pattern-rules.sh b/t/spy-pattern-rules.sh
index f95d8f5..2aa8332 100755
--- a/t/spy-pattern-rules.sh
+++ b/t/spy-pattern-rules.sh
@@ -26,7 +26,7 @@
 # support.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile <<'END'
 default:
diff --git a/t/spy-phony.sh b/t/spy-phony.sh
index 105a44a..1bd3c10 100755
--- a/t/spy-phony.sh
+++ b/t/spy-phony.sh
@@ -17,7 +17,7 @@
 # Check that the '.PHONY' semantics we expect truly hold.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile <<'END'
 .PHONY: pdir pfile
diff --git a/t/spy-rm.tap b/t/spy-rm.tap
index f279745..0a2e512 100755
--- a/t/spy-rm.tap
+++ b/t/spy-rm.tap
@@ -25,7 +25,7 @@
 #  <http://austingroupbugs.net/view.php?id=542>
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 10
 
diff --git a/t/spy-trailing-backlash.sh b/t/spy-trailing-backlash.sh
index 07e6767..f5894ee 100755
--- a/t/spy-trailing-backlash.sh
+++ b/t/spy-trailing-backlash.sh
@@ -18,7 +18,7 @@
 # semantic we expect.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile << 'END'
 default:
diff --git a/t/spy-var-append.sh b/t/spy-var-append.sh
index ac8cc52..9da0ea9 100755
--- a/t/spy-var-append.sh
+++ b/t/spy-var-append.sh
@@ -19,7 +19,7 @@
 # any '+=' appending to it gets overridden as well.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile << 'END'
 var0 += foo
diff --git a/t/spy-vpath-rewrite.sh b/t/spy-vpath-rewrite.sh
index df345c4..24492bb 100755
--- a/t/spy-vpath-rewrite.sh
+++ b/t/spy-vpath-rewrite.sh
@@ -18,7 +18,7 @@
 # We use that assumption in some of our rules, so it better explicitly
 # check that it truly holds.
 
-. ./defs || exit 1
+. test-init.sh
 
 ocwd=$(pwd) || fatal_ "couldn't get current working directory"
 
diff --git a/t/spy-wildcard.sh b/t/spy-wildcard.sh
index 9a8e47d..612fde4 100755
--- a/t/spy-wildcard.sh
+++ b/t/spy-wildcard.sh
@@ -17,7 +17,7 @@
 # Check that the behaviour of the $(wildcard) builtin in corner cases
 # matches the assumptions done in our recipes.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir dir
 echo dummy > file
diff --git a/t/src-acsubst.sh b/t/src-acsubst.sh
index 13531ac..5772cb2 100755
--- a/t/src-acsubst.sh
+++ b/t/src-acsubst.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure config substitution in _SOURCES fails.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
diff --git a/t/stamph2.sh b/t/stamph2.sh
index 10c7d98..7860e72 100755
--- a/t/stamph2.sh
+++ b/t/stamph2.sh
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure stamp-h* files are created where we expect
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << END
 AC_CONFIG_HEADERS([1.h
diff --git a/t/stdinc-no-repeated.sh b/t/stdinc-no-repeated.sh
index afeb1fd..6fe775b 100755
--- a/t/stdinc-no-repeated.sh
+++ b/t/stdinc-no-repeated.sh
@@ -18,7 +18,7 @@
 # compiler invocation.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/stdinc.sh b/t/stdinc.sh
index d030e64..21c66b8 100755
--- a/t/stdinc.sh
+++ b/t/stdinc.sh
@@ -18,7 +18,7 @@
 # Report by Kent Boortz.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/stdlib.sh b/t/stdlib.sh
index b3f458a..59177fc 100755
--- a/t/stdlib.sh
+++ b/t/stdlib.sh
@@ -16,7 +16,7 @@
 
 # Test "not a standard library" error.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/stdlib2.sh b/t/stdlib2.sh
index 6cce916..f79353c 100755
--- a/t/stdlib2.sh
+++ b/t/stdlib2.sh
@@ -17,7 +17,7 @@
 # Check for AM_LDFLAGS = -module
 # Report from Kevin P. Fleming.
 required=libtool
-. ./defs || exit 1
+. test-init.sh
 
 : > README
 : > NEWS
diff --git a/t/strictness-override.sh b/t/strictness-override.sh
index 27e44dd..f3028db 100755
--- a/t/strictness-override.sh
+++ b/t/strictness-override.sh
@@ -21,7 +21,7 @@
 # been in place for quite a long time); see also Automake bug #7673.
 # Update this test if the semantics are changed.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
diff --git a/t/strictness-precedence.sh b/t/strictness-precedence.sh
index ab70ee3..d56cf5f 100755
--- a/t/strictness-precedence.sh
+++ b/t/strictness-precedence.sh
@@ -18,7 +18,7 @@
 # strictness specified later should take precedence over strictness
 # specified earlier.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
diff --git a/t/strip.sh b/t/strip.sh
index 6170627..338d5bb 100755
--- a/t/strip.sh
+++ b/t/strip.sh
@@ -17,7 +17,7 @@
 # Test for install-strip.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/strip2.sh b/t/strip2.sh
index 2397545..c18b517 100755
--- a/t/strip2.sh
+++ b/t/strip2.sh
@@ -18,7 +18,7 @@
 # This test needs GNU binutils strip.  See sister test 'strip3.sh'.
 
 required='cc strip'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/strip3.sh b/t/strip3.sh
index 543449d..5c3121f 100755
--- a/t/strip3.sh
+++ b/t/strip3.sh
@@ -19,7 +19,7 @@
 # test 'strip2.sh'.
 
 required='cc libtoolize strip'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/subdir-ac-subst.sh b/t/subdir-ac-subst.sh
index a8deb17..37f5899 100755
--- a/t/subdir-ac-subst.sh
+++ b/t/subdir-ac-subst.sh
@@ -18,7 +18,7 @@
 # SUBDIRS + AC_SUBST setup from the manual.
 # Lots of lines here are duplicated in 'subcond-am-cond.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 if test "$want_opt" = yes; then
diff --git a/t/subdir-add-pr46.sh b/t/subdir-add-pr46.sh
index 66ecfda..750ae80 100755
--- a/t/subdir-add-pr46.sh
+++ b/t/subdir-add-pr46.sh
@@ -19,7 +19,7 @@
 # test 'subdir-add2-pr46.sh' do it from a subdirectory.
 # PR automake/46
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/subdir-add2-pr46.sh b/t/subdir-add2-pr46.sh
index a402052..bfe7e9c 100755
--- a/t/subdir-add2-pr46.sh
+++ b/t/subdir-add2-pr46.sh
@@ -19,7 +19,7 @@
 # it works when make is run from the top-level directory.
 # PR automake/46
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_MACRO_DIR([m4])
diff --git a/t/subdir-am-cond.sh b/t/subdir-am-cond.sh
index cb55ffb..28868bf 100755
--- a/t/subdir-am-cond.sh
+++ b/t/subdir-am-cond.sh
@@ -18,7 +18,7 @@
 # SUBDIRS + AM_CONDITIONAL setup from the manual.
 # Lots of lines here are duplicated in 'subdir-ac-subst.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
diff --git a/t/subdir-cond-err.sh b/t/subdir-cond-err.sh
index 4eba4f8..da0ab56 100755
--- a/t/subdir-cond-err.sh
+++ b/t/subdir-cond-err.sh
@@ -16,7 +16,7 @@
 
 # Check SUBDIRS set based on conditionals.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TEST], [true])
diff --git a/t/subdir-cond-gettext.sh b/t/subdir-cond-gettext.sh
index f933f77..4cc48e5 100755
--- a/t/subdir-cond-gettext.sh
+++ b/t/subdir-cond-gettext.sh
@@ -17,7 +17,7 @@
 # It is ok to have a conditional SUBDIRS when using gettext.
 
 required=gettext
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_GNU_GETTEXT
diff --git a/t/subdir-distclean.sh b/t/subdir-distclean.sh
index 25274fd..4b005e8 100755
--- a/t/subdir-distclean.sh
+++ b/t/subdir-distclean.sh
@@ -17,7 +17,7 @@
 # Check that "./configure && make && make distclean" is actually a
 # no-op, even when conditional SUBDIRS are involved.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile sub1/subsub/Makefile])
diff --git a/t/subdir10.sh b/t/subdir-env-interference.sh
similarity index 98%
rename from t/subdir10.sh
rename to t/subdir-env-interference.sh
index 396aecc..8c3dc58 100755
--- a/t/subdir10.sh
+++ b/t/subdir-env-interference.sh
@@ -16,7 +16,7 @@
 
 # SUDBIRS with $fail set in the environment.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/subdir-order.sh b/t/subdir-order.sh
index 5ea7b79..0a89e73 100755
--- a/t/subdir-order.sh
+++ b/t/subdir-order.sh
@@ -16,7 +16,7 @@
 
 # The $(SUDBIRS) entries are processed in the order they are specified.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([
diff --git a/t/subdir-subsub.sh b/t/subdir-subsub.sh
index b8389dd..6925ea7 100755
--- a/t/subdir-subsub.sh
+++ b/t/subdir-subsub.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure sub-sub-dirs work correctly.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir one
 mkdir one/two
diff --git a/t/subdir-with-slash.sh b/t/subdir-with-slash.sh
index 0a3330b..1063589 100755
--- a/t/subdir-with-slash.sh
+++ b/t/subdir-with-slash.sh
@@ -16,7 +16,7 @@
 
 # Test SUDBIRS with '/' in them.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([src/subdir/Makefile src/subdir2/Makefile])
diff --git a/t/subdir.sh b/t/subdir.sh
index fb1e246..c33de21 100755
--- a/t/subdir.sh
+++ b/t/subdir.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure install-sh is correctly found in subdirs.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir zot
 
diff --git a/t/subobj-c.sh b/t/subobj-c.sh
index eafecaf..03964a3 100755
--- a/t/subobj-c.sh
+++ b/t/subobj-c.sh
@@ -18,7 +18,7 @@
 # Keep in sync with sister test 'subobj-cxx.sh'.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/subobj-clean-lt-pr10697.sh b/t/subobj-clean-lt-pr10697.sh
index 25bbace..aee7b4d 100755
--- a/t/subobj-clean-lt-pr10697.sh
+++ b/t/subobj-clean-lt-pr10697.sh
@@ -22,7 +22,7 @@
 # 'subobj-clean-pr10697.sh', which deals with the non-libtool case.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR
diff --git a/t/subobj-clean-pr10697.sh b/t/subobj-clean-pr10697.sh
index 3a3adef..6af209a 100755
--- a/t/subobj-clean-pr10697.sh
+++ b/t/subobj-clean-pr10697.sh
@@ -22,7 +22,7 @@
 # 'subobj-clean-lt-pr10697.sh', which deals with the libtool case.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/subobj-cxx-grep.sh b/t/subobj-cxx-grep.sh
index b1f6980..ac18bc2 100755
--- a/t/subobj-cxx-grep.sh
+++ b/t/subobj-cxx-grep.sh
@@ -17,7 +17,7 @@
 # Grepping checks on the use of subdir objects with C++.
 # See relate test 't/subobj-cxx-grep.sh' for semantic checks.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_PROG_CXX >> configure.ac
 
diff --git a/t/subobj-cxx.sh b/t/subobj-cxx.sh
index e72a4e7..2cfea7e 100755
--- a/t/subobj-cxx.sh
+++ b/t/subobj-cxx.sh
@@ -18,7 +18,7 @@
 # Keep in sync with sister test 'subobj-c.sh'.
 
 required=c++
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/subobj-libtool.sh b/t/subobj-libtool.sh
index 940e872..b088626 100755
--- a/t/subobj-libtool.sh
+++ b/t/subobj-libtool.sh
@@ -17,7 +17,7 @@
 # Test of subdir objects with libtool.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/subobj10.sh b/t/subobj10.sh
index 55776a7..880b659 100755
--- a/t/subobj10.sh
+++ b/t/subobj10.sh
@@ -17,7 +17,7 @@
 # PR 492: Test asm subdir objects.
 
 required=gcc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AS
diff --git a/t/subobj11a.sh b/t/subobj11a.sh
index 615ed63..106d8eb 100755
--- a/t/subobj11a.sh
+++ b/t/subobj11a.sh
@@ -31,7 +31,7 @@
 # the problematic setup anyway -- better safe than sorry.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/subobj5.sh b/t/subobj5.sh
index 61f8f7f..4ef47f5 100755
--- a/t/subobj5.sh
+++ b/t/subobj5.sh
@@ -18,7 +18,7 @@
 # From Robert Collins.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([generic/Makefile])
diff --git a/t/subobj7.sh b/t/subobj7.sh
index 1ce58ae..4e95b4c 100755
--- a/t/subobj7.sh
+++ b/t/subobj7.sh
@@ -17,7 +17,7 @@
 # Test to make sure AM_CFLAGS appears in subdir compilation rule.
 # Report from Steve M. Robbins.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/subobj8.sh b/t/subobj8.sh
index cd25f66..ef0f0d6 100755
--- a/t/subobj8.sh
+++ b/t/subobj8.sh
@@ -17,7 +17,7 @@
 # Make sure 'compile' is included when subdir objects are used in a
 # subdir.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/subobj9.sh b/t/subobj9.sh
index 4b3c4d5..e568c20 100755
--- a/t/subobj9.sh
+++ b/t/subobj9.sh
@@ -23,7 +23,7 @@
 # forgets '.../<file>.o'.
 
 required='c++ libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << END
 AC_PROG_CXX
diff --git a/t/subobjname.sh b/t/subobjname.sh
index 7601664..36cb4d6 100755
--- a/t/subobjname.sh
+++ b/t/subobjname.sh
@@ -18,7 +18,7 @@
 # combinational explosion.  (This test is named after the &subobjname
 # sub in Automake).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/subpkg-yacc.sh b/t/subpkg-yacc.sh
index fe170ef..6cb2485 100755
--- a/t/subpkg-yacc.sh
+++ b/t/subpkg-yacc.sh
@@ -18,7 +18,7 @@
 # properly, when a subpackage is involved.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<'END'
 AC_INIT([suya], [0.5a], address@hidden)
diff --git a/t/subpkg.sh b/t/subpkg.sh
index d3bbb44..81aeb46 100755
--- a/t/subpkg.sh
+++ b/t/subpkg.sh
@@ -17,7 +17,7 @@
 # Check subpackage handling.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 mkdir m4
 
diff --git a/t/subpkg2.sh b/t/subpkg2.sh
index ea95d5f..2914fdc 100755
--- a/t/subpkg2.sh
+++ b/t/subpkg2.sh
@@ -17,7 +17,7 @@
 # Try a DIST_SUBDIRS subpackage with no SUBDIRS.
 # Report from Gary V. Vaughan.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir m4
 
diff --git a/t/subpkg3.sh b/t/subpkg3.sh
index 6ebc4bd..5f89b91 100755
--- a/t/subpkg3.sh
+++ b/t/subpkg3.sh
@@ -16,7 +16,7 @@
 
 # Make sure different subpackages may share files and directories.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >Makefile.am <<'END'
 SUBDIRS = subpkg
diff --git a/t/subpkg4.sh b/t/subpkg4.sh
index 97f452c..d4ac46d 100755
--- a/t/subpkg4.sh
+++ b/t/subpkg4.sh
@@ -17,7 +17,7 @@
 # Test to ensure 'distdir' fixes the mode of files and directories
 # copied into '$(distdir)', even with sub-packages.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >Makefile.am <<'END'
 SUBDIRS = subpkg
diff --git a/t/subst.sh b/t/subst.sh
index db83d73..a6010e4 100755
--- a/t/subst.sh
+++ b/t/subst.sh
@@ -17,7 +17,7 @@
 # Test that AC_SUBST($1) does something sensible.  From Ulrich
 # Drepper.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 dnl This test used to have the following lines, which cannot have
diff --git a/t/subst3.sh b/t/subst3.sh
index 18c17e2..475027b 100755
--- a/t/subst3.sh
+++ b/t/subst3.sh
@@ -18,7 +18,7 @@
 # 'nobase.sh'.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_PROG_CC
diff --git a/t/subst4.sh b/t/subst4.sh
index 739b368..91066e8 100755
--- a/t/subst4.sh
+++ b/t/subst4.sh
@@ -16,7 +16,7 @@
 
 # Test AM_SUBST_NOTMAKE.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 myrule="\
diff --git a/t/subst5.sh b/t/subst5.sh
index f44b851..636d188 100755
--- a/t/subst5.sh
+++ b/t/subst5.sh
@@ -19,7 +19,7 @@
 # Thus, we allow substitutions in bin_PROGRAMS, but then EXTRA_PROGRAMS
 # needs to list possible values of that substitution, literally.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/substre2.sh b/t/substre2.sh
index 06fcdf1..dd23e00 100755
--- a/t/substre2.sh
+++ b/t/substre2.sh
@@ -17,7 +17,7 @@
 # Test for bug in variable substitution references, where
 # undefined variables break later substitutions.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [whocares])
diff --git a/t/substref.sh b/t/substref.sh
index 827f45c..427072a 100755
--- a/t/substref.sh
+++ b/t/substref.sh
@@ -18,7 +18,7 @@
 # pattern is null.
 # Report from Richard Boulton.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [whocares])
diff --git a/t/substtarg.sh b/t/substtarg.sh
index 757885c..75e19fb 100755
--- a/t/substtarg.sh
+++ b/t/substtarg.sh
@@ -17,7 +17,7 @@
 # Test that substitutions in variables work.
 # From Lars J. Aas.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SOURCE([fakelib.c])
diff --git a/t/suffix-chain.sh b/t/suffix-chain.sh
index 7ac4997..91aaea6 100755
--- a/t/suffix-chain.sh
+++ b/t/suffix-chain.sh
@@ -19,7 +19,7 @@
 # See automake bug#7824 and bug#7670.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/suffix-custom-default-ext.sh b/t/suffix-custom-default-ext.sh
index 1736921..bada8d7 100755
--- a/t/suffix-custom-default-ext.sh
+++ b/t/suffix-custom-default-ext.sh
@@ -18,7 +18,7 @@
 # and the use of AM_DEFAULT_SOURCE_EXT.
 
 required=c++
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CXX
diff --git a/t/suffix-custom-link.sh b/t/suffix-custom-link.sh
index 8b1e505..eadc5df 100755
--- a/t/suffix-custom-link.sh
+++ b/t/suffix-custom-link.sh
@@ -19,7 +19,7 @@
 # the Automake default (C linker) would be inappropriate.
 
 required=c++
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CXX
diff --git a/t/suffix13.sh b/t/suffix-custom-subobj-and-specflg.sh
similarity index 98%
rename from t/suffix13.sh
rename to t/suffix-custom-subobj-and-specflg.sh
index 83e677d..0d3684b 100755
--- a/t/suffix13.sh
+++ b/t/suffix-custom-subobj-and-specflg.sh
@@ -18,7 +18,7 @@
 # renamed objects and subdir objects.  Reported by Florian Briegel.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CC
diff --git a/t/suffix-custom-subobj.sh b/t/suffix-custom-subobj.sh
index 070be74..7e70aaa 100755
--- a/t/suffix-custom-subobj.sh
+++ b/t/suffix-custom-subobj.sh
@@ -18,7 +18,7 @@
 # Originally reported by John Ratliff against suffix rules.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CC
diff --git a/t/suffix-custom.sh b/t/suffix-custom.sh
index 010e55f..a57d649 100755
--- a/t/suffix-custom.sh
+++ b/t/suffix-custom.sh
@@ -19,7 +19,7 @@
 # extension in object files.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_HEADERS([config.h])
diff --git a/t/suffix-hdr.sh b/t/suffix-hdr.sh
index c3bc522..12d92e4 100755
--- a/t/suffix-hdr.sh
+++ b/t/suffix-hdr.sh
@@ -17,7 +17,7 @@
 # Use of "custom" headers (with custom suffix).
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/suffix-obj.sh b/t/suffix-obj.sh
index 38bf38f..67ec597 100755
--- a/t/suffix-obj.sh
+++ b/t/suffix-obj.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure that '.o' and '.obj' are handled like '.$(OBJEXT)'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 # $(LINK) is not defined automatically by Automake, since the *_SOURCES
diff --git a/t/suffix-rules-old-fashioned.sh b/t/suffix-rules-old-fashioned.sh
index c0dd3d5..891f301 100755
--- a/t/suffix-rules-old-fashioned.sh
+++ b/t/suffix-rules-old-fashioned.sh
@@ -16,7 +16,7 @@
 
 # Automake-NG still accepts old-fashioned suffix rules.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/suffix.sh b/t/suffix.sh
index 1d4ca48..29ca114 100755
--- a/t/suffix.sh
+++ b/t/suffix.sh
@@ -18,7 +18,7 @@
 # only once.
 # See also related test 'suffix2.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/suffix10.sh b/t/suffix10.sh
index 6f95391..7e316ae 100755
--- a/t/suffix10.sh
+++ b/t/suffix10.sh
@@ -19,7 +19,7 @@
 # (related to PR/37)
 
 required='cc libtoolize yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CC
diff --git a/t/suffix2.sh b/t/suffix2.sh
index 8027754..d343cef 100755
--- a/t/suffix2.sh
+++ b/t/suffix2.sh
@@ -18,7 +18,7 @@
 # and only once, even for libtool libraries.
 # See also related test 'suffix.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/suffix3.sh b/t/suffix3.sh
index 4688e53..e8b4124 100755
--- a/t/suffix3.sh
+++ b/t/suffix3.sh
@@ -17,7 +17,7 @@
 # Test to make sure that suffix rules chain.
 
 required=c++
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/suffix5.sh b/t/suffix5.sh
index fe8b95b..dc1a303 100755
--- a/t/suffix5.sh
+++ b/t/suffix5.sh
@@ -19,7 +19,7 @@
 # Based on a report from Arkadiusz Miskiewicz <address@hidden>.
 
 required='cc libtool'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([LINK], [:])
diff --git a/t/suffix8.sh b/t/suffix8.sh
index 30bb6e4..2cd07c6 100755
--- a/t/suffix8.sh
+++ b/t/suffix8.sh
@@ -19,7 +19,7 @@
 # From PR/37.
 
 required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_PROG_AR
diff --git a/t/suffix9.sh b/t/suffix9.sh
index 18b10f3..c8d53d0 100755
--- a/t/suffix9.sh
+++ b/t/suffix9.sh
@@ -17,7 +17,7 @@
 # Make sure that Automake choose the shorter route between suffixes
 # (related to PR/37)
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/symlink.sh b/t/symlink.sh
index ad7de70..a4c7449 100755
--- a/t/symlink.sh
+++ b/t/symlink.sh
@@ -18,7 +18,7 @@
 # Reported by Joerg-Martin Schwarz.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 : > Makefile.am
 
diff --git a/t/symlink2.sh b/t/symlink2.sh
index f1f9dc5..fe7d2fa 100755
--- a/t/symlink2.sh
+++ b/t/symlink2.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure that 'automake -a' redirects dangling symlinks.
 
-. ./defs || exit 1
+. test-init.sh
 
 rm -f install-sh
 ln -s Zardoz install-sh || skip_ "cannot create broken symlinks"
diff --git a/t/tags-id.sh b/t/tags-id.sh
index 9032125..22d9b61 100755
--- a/t/tags-id.sh
+++ b/t/tags-id.sh
@@ -18,7 +18,7 @@
 # when there are only headers in a directory.
 
 required=mkid
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/tags-pr12372.sh b/t/tags-pr12372.sh
index caba463..b1dc9e5 100755
--- a/t/tags-pr12372.sh
+++ b/t/tags-pr12372.sh
@@ -18,7 +18,7 @@
 # extensions.  See automake bug#12372.
 
 required='cc etags'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/tap-ambiguous-directive.sh b/t/tap-ambiguous-directive.sh
index 63544e3..9c8b03f 100755
--- a/t/tap-ambiguous-directive.sh
+++ b/t/tap-ambiguous-directive.sh
@@ -18,7 +18,7 @@
 #  - handling of "ambiguous" TODO and SKIP directives
 # See also related test 'tap-todo-skip-together.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-autonumber.sh b/t/tap-autonumber.sh
index 3fab0aa..2ee9a73 100755
--- a/t/tap-autonumber.sh
+++ b/t/tap-autonumber.sh
@@ -20,7 +20,7 @@
 #  - test results without number get automatically numbered in the
 #    console progress output
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-bad-prog.tap b/t/tap-bad-prog.tap
index 46153df..6f5b5b1 100755
--- a/t/tap-bad-prog.tap
+++ b/t/tap-bad-prog.tap
@@ -18,7 +18,7 @@
 #  - missing, unreadable, or not-executable test scripts cause proper
 #    error reports
 
-. ./defs || exit 1
+. test-init.sh
 
 fetch_tap_driver
 
diff --git a/t/tap-bailout-and-logging.sh b/t/tap-bailout-and-logging.sh
index f87ccb3..33fab0d 100755
--- a/t/tap-bailout-and-logging.sh
+++ b/t/tap-bailout-and-logging.sh
@@ -18,7 +18,7 @@
 #  - even after a "Bail out!" directive, all input is still copied in
 #    the log file
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-bailout-leading-space.sh b/t/tap-bailout-leading-space.sh
index 0addf0e..afea993 100755
--- a/t/tap-bailout-leading-space.sh
+++ b/t/tap-bailout-leading-space.sh
@@ -21,7 +21,7 @@
 # "more modern" behaviour in our awk TAP driver.
 
 am_tap_implementation=shell
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-bailout-suppress-badexit.sh 
b/t/tap-bailout-suppress-badexit.sh
index 7cd5458..e9bf2a1 100755
--- a/t/tap-bailout-suppress-badexit.sh
+++ b/t/tap-bailout-suppress-badexit.sh
@@ -18,7 +18,7 @@
 #  - A "Bail out!" directive causes the driver to ignore the exit
 #    status of the test script.
 
-. ./defs || exit 1
+. test-init.sh
 
 tests='exit.test exit127.test sighup.test sigterm.test'
 
diff --git a/t/tap-bailout-suppress-later-diagnostic.sh 
b/t/tap-bailout-suppress-later-diagnostic.sh
index 54e21fd..72a0512 100755
--- a/t/tap-bailout-suppress-later-diagnostic.sh
+++ b/t/tap-bailout-suppress-later-diagnostic.sh
@@ -18,7 +18,7 @@
 #  - A "Bail out!" directive causes the driver to ignore any TAP
 #    diagnostic message in the rest of the following TAP stream.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-bailout-suppress-later-errors.sh 
b/t/tap-bailout-suppress-later-errors.sh
index 44e28ca..ed4ade0 100755
--- a/t/tap-bailout-suppress-later-errors.sh
+++ b/t/tap-bailout-suppress-later-errors.sh
@@ -18,7 +18,7 @@
 #  - A "Bail out!" directive causes the driver to ignore any TAP
 #    result or error in the rest of the following TAP stream.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-bailout.sh b/t/tap-bailout.sh
index cb051a8..0523381 100755
--- a/t/tap-bailout.sh
+++ b/t/tap-bailout.sh
@@ -17,7 +17,7 @@
 # Basic TAP test protocol support:
 #  - "Bail out!" magic
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-basic.sh b/t/tap-basic.sh
index d107ef3..05b862e 100755
--- a/t/tap-basic.sh
+++ b/t/tap-basic.sh
@@ -24,7 +24,7 @@
 # Note that some of the features checked here are checked in other
 # test cases too, usually in a more thorough and detailed way.
 
-. ./defs || exit 1
+. test-init.sh
 
 fetch_tap_driver
 
diff --git a/t/tap-color.sh b/t/tap-color.sh
index 6b79f39..8cfe6d5 100755
--- a/t/tap-color.sh
+++ b/t/tap-color.sh
@@ -18,7 +18,7 @@
 #  - colorization of TAP results and diagnostic messages
 
 required='grep-nonprint'
-. ./defs || exit 1
+. test-init.sh
 
 # Escape '[' for grep, below.
 red="$esc\[0;31m"
diff --git a/t/tap-common-setup.sh b/t/tap-common-setup.sh
index 32a474a..b6e7228 100755
--- a/t/tap-common-setup.sh
+++ b/t/tap-common-setup.sh
@@ -16,7 +16,7 @@
 
 # Auxiliary test to set up common data used by many tests on TAP support.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/tap-deps.sh b/t/tap-deps.sh
index 472ae3d..ad76127 100755
--- a/t/tap-deps.sh
+++ b/t/tap-deps.sh
@@ -17,7 +17,7 @@
 # Basic TAP test protocol support:
 #  - dependencies between test scripts
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 # The tests are *deliberately* listed in inverted order here.
diff --git a/t/tap-diagnostic-custom.sh b/t/tap-diagnostic-custom.sh
index d035105..18e234f 100755
--- a/t/tap-diagnostic-custom.sh
+++ b/t/tap-diagnostic-custom.sh
@@ -18,7 +18,7 @@
 #  - option '--diagnostic-string' to customize the string introducing
 #    TAP diagnostics
 
-. ./defs || exit 1
+. test-init.sh
 
 fetch_tap_driver
 
diff --git a/t/tap-diagnostic.sh b/t/tap-diagnostic.sh
index a45b044..0744e44 100755
--- a/t/tap-diagnostic.sh
+++ b/t/tap-diagnostic.sh
@@ -18,7 +18,7 @@
 #  - diagnostic messages (TAP lines with leading "#")
 #  - flags '--comments' and '--no-comments' of the TAP test driver
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-doc.sh b/t/tap-doc.sh
index 5055f85..1e4dd07 100755
--- a/t/tap-doc.sh
+++ b/t/tap-doc.sh
@@ -17,7 +17,7 @@
 # Check that an example given in the documentation really works.
 # See section "Simple Tests" subsection "Script-based Testsuites".
 
-. ./defs || exit 1
+. test-init.sh
 
 fetch_tap_driver
 
diff --git a/t/tap-doc2.sh b/t/tap-doc2.sh
index 9ce91c6..b0f6d2c 100755
--- a/t/tap-doc2.sh
+++ b/t/tap-doc2.sh
@@ -19,7 +19,7 @@
 # with the Automake test harness".
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
diff --git a/t/tap-driver-stderr.sh b/t/tap-driver-stderr.sh
index b1d9227..909769a 100755
--- a/t/tap-driver-stderr.sh
+++ b/t/tap-driver-stderr.sh
@@ -19,7 +19,7 @@
 
 required=non-root
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 fetch_tap_driver
 
diff --git a/t/tap-empty-diagnostic.sh b/t/tap-empty-diagnostic.sh
index ae0deef..e0e5967 100755
--- a/t/tap-empty-diagnostic.sh
+++ b/t/tap-empty-diagnostic.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - empty diagnostic messages are discarder
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-empty.sh b/t/tap-empty.sh
index e3d400c..a4c8e73 100755
--- a/t/tap-empty.sh
+++ b/t/tap-empty.sh
@@ -18,7 +18,7 @@
 #  - empty TAP input
 #  - blank TAP input
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-escape-directive-2.sh b/t/tap-escape-directive-2.sh
index 49c6398..4e476fa 100755
--- a/t/tap-escape-directive-2.sh
+++ b/t/tap-escape-directive-2.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - "escape" TODO and SKIP directives (by escaping the "#" character)
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-escape-directive.sh b/t/tap-escape-directive.sh
index 9b59c3d..b635814 100755
--- a/t/tap-escape-directive.sh
+++ b/t/tap-escape-directive.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - "escape" TODO and SKIP directives (by escaping the "#" character)
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-exit.sh b/t/tap-exit.sh
index c9a9823..3c51cc3 100755
--- a/t/tap-exit.sh
+++ b/t/tap-exit.sh
@@ -19,7 +19,7 @@
 #  - the '--ignore-exit' option causes the TAP test driver to ignore
 #    exit statuses of the test scripts.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo TESTS = > Makefile.am
 for st in 1 2 77 99; do
diff --git a/t/tap-fancy.sh b/t/tap-fancy.sh
index c59d0c1..587b0ae 100755
--- a/t/tap-fancy.sh
+++ b/t/tap-fancy.sh
@@ -17,7 +17,7 @@
 # TAP support: some unusual forms for valid TAP input.
 # See also related test 'tap-fancy2.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-fancy2.sh b/t/tap-fancy2.sh
index 1a3ab02..aaa4fbc 100755
--- a/t/tap-fancy2.sh
+++ b/t/tap-fancy2.sh
@@ -17,7 +17,7 @@
 # TAP support: more unusual forms for valid TAP input.
 # See also related test 'tap-fancy.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-global-log.sh b/t/tap-global-log.sh
index ee3f1b5..7c86fc5 100755
--- a/t/tap-global-log.sh
+++ b/t/tap-global-log.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - which log files get copied in the global log?
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-global-result.sh b/t/tap-global-result.sh
index 6a91880..6d5edaf 100755
--- a/t/tap-global-result.sh
+++ b/t/tap-global-result.sh
@@ -18,7 +18,7 @@
 #  - which global test result derives from different test results
 #    mixed in a single script?
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-lazy-check.sh b/t/tap-lazy-check.sh
index 7d3e93a..c165679 100755
--- a/t/tap-lazy-check.sh
+++ b/t/tap-lazy-check.sh
@@ -16,7 +16,7 @@
 
 # TAP support: AM_LAZY_CHECK
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TEST_LOG_COMPILER = cat
diff --git a/t/tap-log.sh b/t/tap-log.sh
index b61a8f5..eda0255 100755
--- a/t/tap-log.sh
+++ b/t/tap-log.sh
@@ -22,7 +22,7 @@
 #  - VERBOSE environment variable support
 # Keep in sync with 'test-log.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TESTS = pass.test skip.test xfail.test fail.test xpass.test error.test
diff --git a/t/tap-merge-stdout-stderr.sh b/t/tap-merge-stdout-stderr.sh
index 6d029c8..f5269ff 100755
--- a/t/tap-merge-stdout-stderr.sh
+++ b/t/tap-merge-stdout-stderr.sh
@@ -18,7 +18,7 @@
 #  - The Automake TAP driver has an option that instruct it to read TAP
 #    input also from the stderr of the test command, not only its stdout.
 
-. ./defs || exit 1
+. test-init.sh
 
 fetch_tap_driver
 
diff --git a/t/tap-missing-plan-and-bad-exit.sh 
b/t/tap-missing-plan-and-bad-exit.sh
index 06a6f88..c49852a 100755
--- a/t/tap-missing-plan-and-bad-exit.sh
+++ b/t/tap-missing-plan-and-bad-exit.sh
@@ -19,7 +19,7 @@
 #    plan, then the driver reports both "missing plan" and "exited with
 #    non-zero status" errors.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > foo.test <<END
 #!/bin/sh
diff --git a/t/tap-more.sh b/t/tap-more.sh
index 6b45d20..ed4c95f 100755
--- a/t/tap-more.sh
+++ b/t/tap-more.sh
@@ -24,7 +24,7 @@
 #    correct test script(s)
 #  - "make distcheck" works
 
-. ./defs || exit 1
+. test-init.sh
 
 fetch_tap_driver
 
diff --git a/t/tap-more2.sh b/t/tap-more2.sh
index d1355ed..5ca72b9 100755
--- a/t/tap-more2.sh
+++ b/t/tap-more2.sh
@@ -20,7 +20,7 @@
 #  - interactions with 'check_*' variables
 
 required='cc native'
-. ./defs || exit 1
+. test-init.sh
 
 fetch_tap_driver
 
diff --git a/t/tap-msg0-bailout.sh b/t/tap-msg0-bailout.sh
index e54debd..3d423a2 100755
--- a/t/tap-msg0-bailout.sh
+++ b/t/tap-msg0-bailout.sh
@@ -19,7 +19,7 @@
 #    of a "plan with skip" TAP plan
 # generally true!
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-msg0-directive.sh b/t/tap-msg0-directive.sh
index 9be3816..dd97359 100755
--- a/t/tap-msg0-directive.sh
+++ b/t/tap-msg0-directive.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - literal string "0" as a TODO or SKIP message
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-msg0-misc.sh b/t/tap-msg0-misc.sh
index d7751d7..1d5c568 100755
--- a/t/tap-msg0-misc.sh
+++ b/t/tap-msg0-misc.sh
@@ -18,7 +18,7 @@
 #  - literal "0" and "0.0" in a test description and a TODO/SKIP message
 #    at the same time
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-msg0-planskip.sh b/t/tap-msg0-planskip.sh
index cb905b6..fa05d45 100755
--- a/t/tap-msg0-planskip.sh
+++ b/t/tap-msg0-planskip.sh
@@ -18,7 +18,7 @@
 #  - literal strings "0" and "0.0" as the reason of the skip in a "TAP
 #    plan with skip" (i.e., "1..0 # SKIP ...").
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-msg0-result.sh b/t/tap-msg0-result.sh
index f55b055..23bcdfb 100755
--- a/t/tap-msg0-result.sh
+++ b/t/tap-msg0-result.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - the string "0" as a test description
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-negative-numbers.sh b/t/tap-negative-numbers.sh
index fbf54be..b7b2d72 100755
--- a/t/tap-negative-numbers.sh
+++ b/t/tap-negative-numbers.sh
@@ -18,7 +18,7 @@
 #  - don't spuriously recognize negative TAP result numbers, but correctly
 #    interpret them as test descriptions instead
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-no-disable-hard-error.sh b/t/tap-no-disable-hard-error.sh
index dc4cad3..2dc881e 100755
--- a/t/tap-no-disable-hard-error.sh
+++ b/t/tap-no-disable-hard-error.sh
@@ -18,7 +18,7 @@
 #  - "Bail out!" magic and TAP parse errors are not disabled nor turned
 #    into simple failures by the definition DISABLE_HARD_ERRORS.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 DISABLE_HARD_ERRORS = yes
diff --git a/t/tap-no-merge-stdout-stderr.sh b/t/tap-no-merge-stdout-stderr.sh
index f101315..6be67a7 100755
--- a/t/tap-no-merge-stdout-stderr.sh
+++ b/t/tap-no-merge-stdout-stderr.sh
@@ -18,7 +18,7 @@
 #  - By default, TAP input is only from the stdout (and not the stderr)
 #    of the test command.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TEST_LOG_DRIVER_FLAGS = --comments
diff --git a/t/tap-no-spurious-numbers.sh b/t/tap-no-spurious-numbers.sh
index 81104af..1f5e1b7 100755
--- a/t/tap-no-spurious-numbers.sh
+++ b/t/tap-no-spurious-numbers.sh
@@ -18,7 +18,7 @@
 #  - we shouldn't spuriously recognize as TAP result numbers what it
 #    not, even if it seems pretty close
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-no-spurious.sh b/t/tap-no-spurious.sh
index d8bf5ee..d40dd41 100755
--- a/t/tap-no-spurious.sh
+++ b/t/tap-no-spurious.sh
@@ -18,7 +18,7 @@
 #  - don't spuriously recognize lines that are "almost" TAP lines as
 #    real TAP lines
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-not-ok-skip.sh b/t/tap-not-ok-skip.sh
index bbb9a03..4fb0511 100755
--- a/t/tap-not-ok-skip.sh
+++ b/t/tap-not-ok-skip.sh
@@ -18,7 +18,7 @@
 #  - a "not ok # SKIP" line should count as a failure, for consistency
 #    with the prove(1) utility.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-number-wordboundary.sh b/t/tap-number-wordboundary.sh
index 2d15121..5cc3fa4 100755
--- a/t/tap-number-wordboundary.sh
+++ b/t/tap-number-wordboundary.sh
@@ -18,7 +18,7 @@
 #  - TAP result numbers terminated by a non-whitespace "word boundary"
 #    character are recognized
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-numbers-leading-zero.sh b/t/tap-numbers-leading-zero.sh
index 620addf..af30688 100755
--- a/t/tap-numbers-leading-zero.sh
+++ b/t/tap-numbers-leading-zero.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - how does TAP result numbers with leading zero fares?
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-numeric-description.sh b/t/tap-numeric-description.sh
index 61bc252..080aae9 100755
--- a/t/tap-numeric-description.sh
+++ b/t/tap-numeric-description.sh
@@ -16,7 +16,7 @@
 
 # TAP result lines whose description is a number.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-out-of-order.sh b/t/tap-out-of-order.sh
index edcf006..2a7c77e 100755
--- a/t/tap-out-of-order.sh
+++ b/t/tap-out-of-order.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - out-of-order test results
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-passthrough-exit.sh b/t/tap-passthrough-exit.sh
index 1618646..13311ea 100755
--- a/t/tap-passthrough-exit.sh
+++ b/t/tap-passthrough-exit.sh
@@ -19,7 +19,7 @@
 #    log file
 # See also related test 'tap-passthrough.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TEST_LOG_COMPILER = $(SHELL)
diff --git a/t/tap-passthrough.sh b/t/tap-passthrough.sh
index cdf1660..0c4fa26 100755
--- a/t/tap-passthrough.sh
+++ b/t/tap-passthrough.sh
@@ -20,7 +20,7 @@
 #  - TAP errors are reported in the log file too
 # See also related test 'tap-passthrough-exit.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 weirdchars=\''"address@hidden&()[]<>#;,:.^?*/'
 
diff --git a/t/tap-plan-corner.sh b/t/tap-plan-corner.sh
index 9b060ad..3793e0d 100755
--- a/t/tap-plan-corner.sh
+++ b/t/tap-plan-corner.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - some corner cases for TAP plan
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-plan-errors.sh b/t/tap-plan-errors.sh
index dd37aff..bbe580e 100755
--- a/t/tap-plan-errors.sh
+++ b/t/tap-plan-errors.sh
@@ -23,7 +23,7 @@
 # and 'tap-skip-whole-badcount.sh'.  More checks about corner-cases
 # in TAP plans are performed in 'tap-plan-corner.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-plan-leading-zero.sh b/t/tap-plan-leading-zero.sh
index b6bb507..aad92a6 100755
--- a/t/tap-plan-leading-zero.sh
+++ b/t/tap-plan-leading-zero.sh
@@ -19,7 +19,7 @@
 #  - TAP "SKIP" plans with multiple zeroes, as in "1..00 # SKIP"
 # This is consistent with the behaviour of the 'prove' utility.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-plan-malformed.sh b/t/tap-plan-malformed.sh
index 551ccd4..de61f47 100755
--- a/t/tap-plan-malformed.sh
+++ b/t/tap-plan-malformed.sh
@@ -17,7 +17,7 @@
 # TAP support: a malformed TAP plan is not recognized.  The checks in
 # here should be consistent with the behaviour of the 'prove' utility.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-plan-middle.sh b/t/tap-plan-middle.sh
index 63f31c5..7e4b0d5 100755
--- a/t/tap-plan-middle.sh
+++ b/t/tap-plan-middle.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - test plan preceding and/or following non-result TAP lines
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-plan-whitespace.sh b/t/tap-plan-whitespace.sh
index e0fdf3e..092889a 100755
--- a/t/tap-plan-whitespace.sh
+++ b/t/tap-plan-whitespace.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - plan line with trailing whitespace is recognized and handled correctly
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-plan.sh b/t/tap-plan.sh
index d80dd51..3efab6f 100755
--- a/t/tap-plan.sh
+++ b/t/tap-plan.sh
@@ -18,7 +18,7 @@
 #  - test scripts with the test plan at the beginning
 #  - test scripts with the test plan at the end
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-planskip-and-logging.sh b/t/tap-planskip-and-logging.sh
index 8cd3d50..5edbc0d 100755
--- a/t/tap-planskip-and-logging.sh
+++ b/t/tap-planskip-and-logging.sh
@@ -18,7 +18,7 @@
 #  - interactions between "TAP plan with SKIP" and logging of earlier or
 #    later TAP or non-TAP text
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-planskip-badexit.sh b/t/tap-planskip-badexit.sh
index 0bcc7e3..cf39060 100755
--- a/t/tap-planskip-badexit.sh
+++ b/t/tap-planskip-badexit.sh
@@ -18,7 +18,7 @@
 #  - an exit status != 0 of a test script causes an hard error, even if
 #    the last line of output is a "SKIP plan" (e.g., "1..0 # SKIP").
 
-. ./defs || exit 1
+. test-init.sh
 
 echo TESTS = one.test two.test > Makefile.am
 
diff --git a/t/tap-planskip-bailout.sh b/t/tap-planskip-bailout.sh
index 6558a69..2bf683f 100755
--- a/t/tap-planskip-bailout.sh
+++ b/t/tap-planskip-bailout.sh
@@ -18,7 +18,7 @@
 #  - a "Bail out!" directive causes an hard error, even if coming after
 #    a "SKIP plan" (e.g., "1..0 # SKIP").
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-planskip-case-insensitive.sh 
b/t/tap-planskip-case-insensitive.sh
index f086a68..9d61ed9 100755
--- a/t/tap-planskip-case-insensitive.sh
+++ b/t/tap-planskip-case-insensitive.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - "SKIP" keyword in a TAP plan is case-insensitive
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-planskip-late.sh b/t/tap-planskip-late.sh
index 942d0b6..b43d120 100755
--- a/t/tap-planskip-late.sh
+++ b/t/tap-planskip-late.sh
@@ -18,7 +18,7 @@
 #  - the special "plan with SKIP" can also be used "late" in the TAP
 #    stream, i.e., preceded by non-TAP output or TAP diagnostic.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-planskip-later-errors.sh b/t/tap-planskip-later-errors.sh
index c840044..ecb5496 100755
--- a/t/tap-planskip-later-errors.sh
+++ b/t/tap-planskip-later-errors.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - TAP errors following a "TAP plan with SKIP" are still diagnosed.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-planskip-unplanned-corner.sh 
b/t/tap-planskip-unplanned-corner.sh
index 9db7d22..e508964 100755
--- a/t/tap-planskip-unplanned-corner.sh
+++ b/t/tap-planskip-unplanned-corner.sh
@@ -18,7 +18,7 @@
 #  - test results seen in a TAP stream that has a "plan with SKIP" are
 #    flagged as errors, even if all of them are "SKIP" results.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-planskip-unplanned.sh b/t/tap-planskip-unplanned.sh
index 5fa8ca5..6ea3f05 100755
--- a/t/tap-planskip-unplanned.sh
+++ b/t/tap-planskip-unplanned.sh
@@ -19,7 +19,7 @@
 #    been seen is an error
 #  - any test result following a "plan with skip" is an error.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-planskip-whitespace.sh b/t/tap-planskip-whitespace.sh
index 5a1fccf..c020dbd 100755
--- a/t/tap-planskip-whitespace.sh
+++ b/t/tap-planskip-whitespace.sh
@@ -18,7 +18,7 @@
 #  - normalization of whitespace in console testsuite progress associated
 #    with a SKIP directive in the TAP plan
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-planskip.sh b/t/tap-planskip.sh
index 361dc5d..3709ab2 100755
--- a/t/tap-planskip.sh
+++ b/t/tap-planskip.sh
@@ -17,7 +17,7 @@
 # Basic TAP test protocol support:
 #  - special plan format to skip all the tests in a script
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-realtime.sh b/t/tap-realtime.sh
index 0655e0f..4e0b07e 100755
--- a/t/tap-realtime.sh
+++ b/t/tap-realtime.sh
@@ -22,7 +22,7 @@
 # children, and is pretty hacky and complex; is there a better way to
 # accomplish the checks done here?
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >expect-check <<'END'
 eval spawn $env(SHELL) -c ":"
diff --git a/t/tap-recheck.sh b/t/tap-recheck.sh
index 02b13f8..f285ee1 100755
--- a/t/tap-recheck.sh
+++ b/t/tap-recheck.sh
@@ -17,7 +17,7 @@
 # Test the 'recheck' target for TAP test protocol.
 # Keep in sync with 'test-driver-custom-multitest-recheck.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 fetch_tap_driver
 
diff --git a/t/tap-result-comment.sh b/t/tap-result-comment.sh
index 714f328..b7880ab 100755
--- a/t/tap-result-comment.sh
+++ b/t/tap-result-comment.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - non-directive comments in TAP results are kept verbatim
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-signal.tap b/t/tap-signal.tap
index c969d10..8a2c6f0 100755
--- a/t/tap-signal.tap
+++ b/t/tap-signal.tap
@@ -17,7 +17,7 @@
 # TAP support:
 #  - a test script terminated by a signal causes an hard error
 
-. ./defs || exit 1
+. test-init.sh
 
 fetch_tap_driver
 
diff --git a/t/tap-test-number-0.sh b/t/tap-test-number-0.sh
index 8412f12..8aefbc9 100755
--- a/t/tap-test-number-0.sh
+++ b/t/tap-test-number-0.sh
@@ -18,7 +18,7 @@
 #  - a test result numbered as 0 is to be considered out-of-order
 # This is consistent with the behaviour of the 'prove' utility.
 
-. ./defs || exit 1
+. test-init.sh
 
 if test $am_tap_implementation = perl; then
   $PERL -MTAP::Parser -e 1 \
diff --git a/t/tap-todo-skip-together.sh b/t/tap-todo-skip-together.sh
index ee40058..212ad87 100755
--- a/t/tap-todo-skip-together.sh
+++ b/t/tap-todo-skip-together.sh
@@ -18,7 +18,7 @@
 #  - TODO and SKIP directives on the same line: the first one wins
 # See also related test 'tap-ambiguous-directive.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-todo-skip-whitespace.sh b/t/tap-todo-skip-whitespace.sh
index b979c8b..7839e37 100755
--- a/t/tap-todo-skip-whitespace.sh
+++ b/t/tap-todo-skip-whitespace.sh
@@ -18,7 +18,7 @@
 #  - normalization of whitespace in console testsuite progress associated
 #    with TODO and SKIP directives
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-todo-skip.sh b/t/tap-todo-skip.sh
index ffe2aac..5b590d9 100755
--- a/t/tap-todo-skip.sh
+++ b/t/tap-todo-skip.sh
@@ -23,7 +23,7 @@
 #  - the reasons for TODO and SKIP, if present, are nicely printed in
 #    the testsuite progress output
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-unplanned.sh b/t/tap-unplanned.sh
index bfd0d31..675fc25 100755
--- a/t/tap-unplanned.sh
+++ b/t/tap-unplanned.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - unplanned tests are properly reported as errors
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-whitespace-normalization.sh 
b/t/tap-whitespace-normalization.sh
index c907d11..cb5b759 100755
--- a/t/tap-whitespace-normalization.sh
+++ b/t/tap-whitespace-normalization.sh
@@ -20,7 +20,7 @@
 # force us to tweak dozens of other tests (hopefully).
 # See also related test 'tap-todo-skip-whitespace.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TEST_LOG_COMPILER = cat
diff --git a/t/tap-with-and-without-number.sh b/t/tap-with-and-without-number.sh
index 6d69eb6..8e34d80 100755
--- a/t/tap-with-and-without-number.sh
+++ b/t/tap-with-and-without-number.sh
@@ -19,7 +19,7 @@
 #  - tests without explicit number get automatically numbered in the
 #    testsuite progress output on console
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tap-xfail-tests.sh b/t/tap-xfail-tests.sh
index 94ae1c9..7458942 100755
--- a/t/tap-xfail-tests.sh
+++ b/t/tap-xfail-tests.sh
@@ -17,7 +17,7 @@
 # TAP and $(XFAIL_TESTS): test results without directives are turned from
 # PASS to XPASS and from FAIL to XFAIL; other results are unchanged.
 
-. ./defs || exit 1
+. test-init.sh
 
 . tap-setup.sh
 
diff --git a/t/tar-override.sh b/t/tar-override.sh
index c35234e..ce8529d 100755
--- a/t/tar-override.sh
+++ b/t/tar-override.sh
@@ -19,7 +19,7 @@
 # FIXME: currently this works only when the tar format used is 'v7'
 # FIXME: (which is the default one).
 
-. ./defs || exit 1
+. test-init.sh
 
 cwd=$(pwd) || fatal_ "getting current working directory"
 
diff --git a/t/tar.sh b/t/tar.sh
index db3e489..76256b8 100755
--- a/t/tar.sh
+++ b/t/tar.sh
@@ -16,7 +16,7 @@
 
 # Check the tar-ustar option.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([tar], [1.0])
diff --git a/t/tar2.sh b/t/tar2.sh
index 5d49cc3..3ae53fc 100755
--- a/t/tar2.sh
+++ b/t/tar2.sh
@@ -16,7 +16,7 @@
 
 # Check the tar-pax option.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([tar2], [1.0])
diff --git a/t/tar3.sh b/t/tar3.sh
index c09aa6f..bc7c353 100755
--- a/t/tar3.sh
+++ b/t/tar3.sh
@@ -16,7 +16,7 @@
 
 # Check the tar options diagnostics.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([tar2], [1.0])
diff --git a/t/target-cflags.sh b/t/target-cflags.sh
index 9b975d5..f005838 100755
--- a/t/target-cflags.sh
+++ b/t/target-cflags.sh
@@ -18,7 +18,7 @@
 # Assar Westerlund <address@hidden>
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/targetclash.sh b/t/targetclash.sh
index fccb29d..99ef05e 100755
--- a/t/targetclash.sh
+++ b/t/targetclash.sh
@@ -16,7 +16,7 @@
 
 # Check that target clashes are diagnosed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/test-driver-acsubst.sh b/t/test-driver-acsubst.sh
index 01ee259..b36329f 100755
--- a/t/test-driver-acsubst.sh
+++ b/t/test-driver-acsubst.sh
@@ -17,7 +17,7 @@
 # parallel-tests:
 #  - LOG_DRIVER variables can be AC_SUBST'd
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir test-drivers
 
diff --git a/t/test-driver-cond.sh b/t/test-driver-cond.sh
index cd90337..4d76eb3 100755
--- a/t/test-driver-cond.sh
+++ b/t/test-driver-cond.sh
@@ -18,7 +18,7 @@
 #   - Automake can correctly handle conditionals contents for the
 #     LOG_DRIVER variables.
 
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_testauxdir"/trivial-test-driver . \
   || fatal_ "failed to fetch auxiliary script trivial-test-driver"
diff --git a/t/test-driver-create-log-dir.sh b/t/test-driver-create-log-dir.sh
index 049a364..cd8b692 100755
--- a/t/test-driver-create-log-dir.sh
+++ b/t/test-driver-create-log-dir.sh
@@ -18,7 +18,7 @@
 # e.g., 'sub/foo.log'), the Automake test harness must ensure that
 # directory exists before calling any custom test driver.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/test-driver-custom-multitest-recheck.sh 
b/t/test-driver-custom-multitest-recheck.sh
index e00ed7b..d62405b 100755
--- a/t/test-driver-custom-multitest-recheck.sh
+++ b/t/test-driver-custom-multitest-recheck.sh
@@ -22,7 +22,7 @@
 # and 'parallel-tests-recheck-override.sh'.
 # Keep in sync with 'tap-recheck.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_testauxdir"/trivial-test-driver . \
   || fatal_ "failed to fetch auxiliary script trivial-test-driver"
diff --git a/t/test-driver-custom-multitest-recheck2.sh 
b/t/test-driver-custom-multitest-recheck2.sh
index d8de857..6d60cc4 100755
--- a/t/test-driver-custom-multitest-recheck2.sh
+++ b/t/test-driver-custom-multitest-recheck2.sh
@@ -19,7 +19,7 @@
 # check that this still works when we override $(TESTS) at make runtime.
 # See also related tests 'test-driver-custom-multitest-recheck.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_testauxdir"/trivial-test-driver . \
   || fatal_ "failed to fetch auxiliary script trivial-test-driver"
diff --git a/t/test-driver-custom-multitest.sh 
b/t/test-driver-custom-multitest.sh
index 8d5c31a..c3b4f54 100755
--- a/t/test-driver-custom-multitest.sh
+++ b/t/test-driver-custom-multitest.sh
@@ -19,7 +19,7 @@
 # only checks implementation details in Automake's custom test drivers
 # support, but also serves as a "usability test" for our APIs.
 
-. ./defs || exit 1
+. test-init.sh
 
 cp "$am_testauxdir"/trivial-test-driver . \
   || fatal_ "failed to fetch auxiliary script trivial-test-driver"
diff --git a/t/test-driver-custom-xfail-tests.sh 
b/t/test-driver-custom-xfail-tests.sh
index 1da717f..5259aae 100755
--- a/t/test-driver-custom-xfail-tests.sh
+++ b/t/test-driver-custom-xfail-tests.sh
@@ -16,7 +16,7 @@
 
 # Custom test drivers: "abstract" XFAIL_TESTS support.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_SUBST([nihil], [])
diff --git a/t/test-driver-custom.sh b/t/test-driver-custom.sh
index 15561a1..83fc296 100755
--- a/t/test-driver-custom.sh
+++ b/t/test-driver-custom.sh
@@ -16,7 +16,7 @@
 
 # Custom test drivers: per-extension test drivers.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/test-driver-fail.sh b/t/test-driver-fail.sh
index 5294a43..9490716 100755
--- a/t/test-driver-fail.sh
+++ b/t/test-driver-fail.sh
@@ -22,7 +22,7 @@
 # (like our dummy one in this test) might leave around a test log even
 # in case of internal failures.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/test-driver-is-distributed.sh b/t/test-driver-is-distributed.sh
index 7675330..2d82e5e 100755
--- a/t/test-driver-is-distributed.sh
+++ b/t/test-driver-is-distributed.sh
@@ -19,7 +19,7 @@
 #    defined in a subdir Makefile
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 ocwd=$(pwd) || fatal_ "getting current working directory"
 
diff --git a/t/test-driver-strip-vpath.sh b/t/test-driver-strip-vpath.sh
index ddd04d2..570d334 100755
--- a/t/test-driver-strip-vpath.sh
+++ b/t/test-driver-strip-vpath.sh
@@ -17,7 +17,7 @@
 # Custom test drivers: check that the test name passed to the test
 # driver has any VPATH prefix stripped.
 
-. ./defs || exit 1
+. test-init.sh
 
 ocwd=$(pwd) || fatal_ "cannot get current working directory"
 
diff --git a/t/test-extensions-cond.sh b/t/test-extensions-cond.sh
index 73f617b..fdfbb97 100755
--- a/t/test-extensions-cond.sh
+++ b/t/test-extensions-cond.sh
@@ -16,7 +16,7 @@
 
 # Conditional definition of TEST_EXTENSIONS is supported.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/test-extensions-dynamic.sh b/t/test-extensions-dynamic.sh
index 091ca03..315de84 100755
--- a/t/test-extensions-dynamic.sh
+++ b/t/test-extensions-dynamic.sh
@@ -16,7 +16,7 @@
 
 # TEST_EXTENSIONS with contents dynamically determined at make time
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([suf], [.tap])
diff --git a/t/test-extensions-funny-chars.sh b/t/test-extensions-funny-chars.sh
index 5abc31d..60bac3e 100755
--- a/t/test-extensions-funny-chars.sh
+++ b/t/test-extensions-funny-chars.sh
@@ -17,7 +17,7 @@
 # Make sure that Automake can handle "funny chars" in TEST_EXTENSIONS,
 # as long as they can be used in GNU make variable names.
 
-. ./defs || exit 1
+. test-init.sh
 
 fetch_tap_driver
 
diff --git a/t/test-extensions-invalid.sh b/t/test-extensions-invalid.sh
index ebc3c75..0145899 100755
--- a/t/test-extensions-invalid.sh
+++ b/t/test-extensions-invalid.sh
@@ -17,7 +17,7 @@
 # Make sure that invalid entries in TEST_EXTENSIONS are diagnosed at
 # make runtime.  See automake bug#9400.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/test-harness-vpath-rewrite.sh b/t/test-harness-vpath-rewrite.sh
index 85e4bbb..ce904ce 100755
--- a/t/test-harness-vpath-rewrite.sh
+++ b/t/test-harness-vpath-rewrite.sh
@@ -17,7 +17,7 @@
 # Check that our concurrent test harness is not subject to spurious VPATH
 # rewrites.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/test-log.sh b/t/test-log.sh
index 4bfbe7e..8de1574 100755
--- a/t/test-log.sh
+++ b/t/test-log.sh
@@ -22,7 +22,7 @@
 #  - VERBOSE environment variable support
 # Keep in sync with 'tap-log.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
diff --git a/t/test-logs-repeated.sh b/t/test-logs-repeated.sh
index 881f67f..f4dd066 100755
--- a/t/test-logs-repeated.sh
+++ b/t/test-logs-repeated.sh
@@ -20,7 +20,7 @@
 # different test scripts don't end up sharing the same log file.
 # (Automake itself is such a project, BTW ;-)
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
diff --git a/t/test-metadata-global-log.sh b/t/test-metadata-global-log.sh
index 2fd00ad..41af752 100755
--- a/t/test-metadata-global-log.sh
+++ b/t/test-metadata-global-log.sh
@@ -20,7 +20,7 @@
 # with the use of the reStructuredText field ':copy-in-global-log:' in
 # the associated '.trs' files.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/test-metadata-global-result.sh b/t/test-metadata-global-result.sh
index c93c2c8..eb92232 100755
--- a/t/test-metadata-global-result.sh
+++ b/t/test-metadata-global-result.sh
@@ -18,7 +18,7 @@
 # "global test result" in '*.trs' files, as documented in the automake
 # manual.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/test-metadata-recheck.sh b/t/test-metadata-recheck.sh
index 0fe67d4..a884350 100755
--- a/t/test-metadata-recheck.sh
+++ b/t/test-metadata-recheck.sh
@@ -17,7 +17,7 @@
 # Test the "make recheck" semantics for custom test drivers, as documented
 # in the Automake manual.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/test-metadata-results.sh b/t/test-metadata-results.sh
index 4435658..f73de7e 100755
--- a/t/test-metadata-results.sh
+++ b/t/test-metadata-results.sh
@@ -17,7 +17,7 @@
 # Parallel testsuite harness: check APIs for the registering of test
 # results in '*.trs' files, as documented in the automake manual.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/test-missing.sh b/t/test-missing.sh
index fb7974c..9d86e19 100755
--- a/t/test-missing.sh
+++ b/t/test-missing.sh
@@ -16,7 +16,7 @@
 
 # parallel-tests: non-existent scripts listed in TESTS get diagnosed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/test-trs-basic.sh b/t/test-trs-basic.sh
index edb2313..5ccc76a 100755
--- a/t/test-trs-basic.sh
+++ b/t/test-trs-basic.sh
@@ -18,7 +18,7 @@
 #  - creation and removal of '.trs' auxiliary files
 #  - check some internals regarding the use of '.trs' files.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
diff --git a/t/test-trs-recover-parallel.sh b/t/test-trs-recover-parallel.sh
index bc8b51d..24e2bd1 100755
--- a/t/test-trs-recover-parallel.sh
+++ b/t/test-trs-recover-parallel.sh
@@ -17,7 +17,7 @@
 # Check parallel harness features:
 #  - recovery from deleted '.log' and '.trs' files, with parallel make
 
-. ./defs || exit 1
+. test-init.sh
 
 all= log= trs=
 for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
diff --git a/t/test-trs-recover.sh b/t/test-trs-recover.sh
index c782b91..80c1d94 100755
--- a/t/test-trs-recover.sh
+++ b/t/test-trs-recover.sh
@@ -19,7 +19,7 @@
 # This test is complex and tricky, but that's acceptable since we are
 # testing semantics that are potentially complex and tricky.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
diff --git a/t/tests-environment-and-log-compiler.sh 
b/t/tests-environment-and-log-compiler.sh
index 9184a5e..3fd1b28 100755
--- a/t/tests-environment-and-log-compiler.sh
+++ b/t/tests-environment-and-log-compiler.sh
@@ -18,7 +18,7 @@
 # by TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT in LOG_COMPILER and
 # LOG_FLAGS (for tests both with and without registered extensions).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/tests-environment-backcompat.sh 
b/t/tests-environment-backcompat.sh
index a82f297..bd79456 100755
--- a/t/tests-environment-backcompat.sh
+++ b/t/tests-environment-backcompat.sh
@@ -20,7 +20,7 @@
 # for this).  The behaviour tested here is also documented in the manual.
 
 am_serial_tests=yes
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_SUBST([PERL], ['$PERL'])
diff --git a/t/tests-environment-fd-redirect.sh 
b/t/tests-environment-fd-redirect.sh
index 5780e57..1a512ba 100755
--- a/t/tests-environment-fd-redirect.sh
+++ b/t/tests-environment-fd-redirect.sh
@@ -26,7 +26,7 @@
 # and the following CC:ed thread on bug-autoconf list:
 #   <http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00002.html>
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/tests-environment.sh b/t/tests-environment.sh
index d6f219d..519aa92 100755
--- a/t/tests-environment.sh
+++ b/t/tests-environment.sh
@@ -17,7 +17,7 @@
 # "Simple Tests" testsuite driver: check TESTS_ENVIRONMENT support.
 
 am_serial_tests=yes
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/testsuite-summary-count-many.sh 
b/t/testsuite-summary-count-many.sh
index 55b2eb4..1519c28 100755
--- a/t/testsuite-summary-count-many.sh
+++ b/t/testsuite-summary-count-many.sh
@@ -19,7 +19,7 @@
 # Incidentally, this test also checks that the testsuite summary doesn't
 # give any bug-report address if it's not defined.
 
-. ./defs || exit 1
+. test-init.sh
 
 expensive_
 
diff --git a/t/testsuite-summary-reference-log.sh 
b/t/testsuite-summary-reference-log.sh
index 5b84c17..c698087 100755
--- a/t/testsuite-summary-reference-log.sh
+++ b/t/testsuite-summary-reference-log.sh
@@ -17,7 +17,7 @@
 # Check that the global testsuite log file referenced in the testsuite
 # summary and in the global testsuite log itself is correct.
 
-. ./defs || exit 1
+. test-init.sh
 
 mv configure.ac configure.stub
 
diff --git a/t/transform.sh b/t/transform.sh
index aa07970..dfea36f 100755
--- a/t/transform.sh
+++ b/t/transform.sh
@@ -17,7 +17,7 @@
 # Make sure that --program-transform works.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/transform2.sh b/t/transform2.sh
index cab5f1a..72c5359 100755
--- a/t/transform2.sh
+++ b/t/transform2.sh
@@ -18,7 +18,7 @@
 # collapsed.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/transform3.sh b/t/transform3.sh
index 156e46d..4930759 100755
--- a/t/transform3.sh
+++ b/t/transform3.sh
@@ -18,7 +18,7 @@
 # stuff (in particular, pgklibdir, pkgdatadir and pkglibexecdir).
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<'END'
 AC_INIT([foo], [1.0])
diff --git a/t/triplet.sh b/t/triplet.sh
index f2796c3..83f9fd5 100755
--- a/t/triplet.sh
+++ b/t/triplet.sh
@@ -17,7 +17,7 @@
 # The $(host), $(build), $(target) variables, and their '*_alias'
 # and 'am.conf.*-triplet' counterparts.
 
-. ./defs || exit 1
+. test-init.sh
 
 : > config.guess
 : > config.sub
diff --git a/t/txinfo-include.sh b/t/txinfo-include.sh
index 9b609bd..7539d7d 100755
--- a/t/txinfo-include.sh
+++ b/t/txinfo-include.sh
@@ -18,7 +18,7 @@
 # and VPATH builds, and both top-level and subdir input.
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/txinfo-no-clutter.sh b/t/txinfo-no-clutter.sh
index 558f8e1..0325e68 100755
--- a/t/txinfo-no-clutter.sh
+++ b/t/txinfo-no-clutter.sh
@@ -18,7 +18,7 @@
 # build directory.  Related to automake bug#11146.
 
 required='makeinfo tex texi2dvi dvips'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/txinfo-unrecognized-extension-2.sh 
b/t/txinfo-unrecognized-extension-2.sh
index ac52e4a..abede4a 100755
--- a/t/txinfo-unrecognized-extension-2.sh
+++ b/t/txinfo-unrecognized-extension-2.sh
@@ -17,7 +17,7 @@
 # Test that automake complains properly when texinfo input files
 # specify output info files with an invalid extension.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = foo.texi bar.texi baz.texi
diff --git a/t/txinfo-unrecognized-extension.sh 
b/t/txinfo-unrecognized-extension.sh
index 96b5f91..bb2b83d 100755
--- a/t/txinfo-unrecognized-extension.sh
+++ b/t/txinfo-unrecognized-extension.sh
@@ -17,7 +17,7 @@
 # Test that automake complains properly when the files with unrecognized
 # extensions are passed to the TEXINFOS primary.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = foobar.foo bazquux.tex zardoz.c
diff --git a/t/txinfo.sh b/t/txinfo.sh
index ff75bdd..5d04cd5 100755
--- a/t/txinfo.sh
+++ b/t/txinfo.sh
@@ -18,7 +18,7 @@
 # Jim Meyering.
 
 required=makeinfo
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/txinfo13.sh b/t/txinfo13.sh
index a98254c..374c44a 100755
--- a/t/txinfo13.sh
+++ b/t/txinfo13.sh
@@ -19,7 +19,7 @@
 # from Vincent Lefevre).
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/txinfo16.sh b/t/txinfo16.sh
index f4c1cee..11f7dea 100755
--- a/t/txinfo16.sh
+++ b/t/txinfo16.sh
@@ -18,7 +18,7 @@
 # not in $(builddir).
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/txinfo17.sh b/t/txinfo17.sh
index 20c7ecc..0d12b05 100755
--- a/t/txinfo17.sh
+++ b/t/txinfo17.sh
@@ -17,7 +17,7 @@
 # Make sure Automake uses the _first_ @setfilname it sees.
 # Report from Karl Berry.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = texinfo.texi
diff --git a/t/txinfo2.sh b/t/txinfo2.sh
index d52231a..f566488 100755
--- a/t/txinfo2.sh
+++ b/t/txinfo2.sh
@@ -17,7 +17,7 @@
 # Test to ensure that a ".info~" file doesn't end up in the
 # distribution.  Bug report from Greg McGary.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/txinfo20.sh b/t/txinfo20.sh
index 0de50ea..a71fcf9 100755
--- a/t/txinfo20.sh
+++ b/t/txinfo20.sh
@@ -17,7 +17,7 @@
 # Make sure info files survive makeinfo errors.
 
 required=makeinfo
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/txinfo21.sh b/t/txinfo21.sh
index b892f68..00ceeb1 100755
--- a/t/txinfo21.sh
+++ b/t/txinfo21.sh
@@ -18,7 +18,7 @@
 # install-DOC flavors.
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<\EOF
 AC_CONFIG_FILES([rec/Makefile])
diff --git a/t/txinfo21b.sh b/t/txinfo21b.sh
index 8f6d3f5..b187af9 100755
--- a/t/txinfo21b.sh
+++ b/t/txinfo21b.sh
@@ -22,7 +22,7 @@
 # FIXME: TAP, and merge them.
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<\EOF
 AC_CONFIG_FILES([rec/Makefile])
diff --git a/t/txinfo22.sh b/t/txinfo22.sh
index efde953..d337d6e 100755
--- a/t/txinfo22.sh
+++ b/t/txinfo22.sh
@@ -19,7 +19,7 @@
 # Report from Tom Tromey.
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/txinfo23.sh b/t/txinfo23.sh
index c2d582a..6b90f18 100755
--- a/t/txinfo23.sh
+++ b/t/txinfo23.sh
@@ -20,7 +20,7 @@
 # (See also txinfo24.sh and txinfo25.sh).
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/txinfo24.sh b/t/txinfo24.sh
index 6979215..5a89c6b 100755
--- a/t/txinfo24.sh
+++ b/t/txinfo24.sh
@@ -19,7 +19,7 @@
 # (See also txinfo23.sh and txinfo25.sh).
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/txinfo25.sh b/t/txinfo25.sh
index e23f537..45ea428 100755
--- a/t/txinfo25.sh
+++ b/t/txinfo25.sh
@@ -21,7 +21,7 @@
 # (See also txinfo23.sh and txinfo24.sh).
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/txinfo26.sh b/t/txinfo26.sh
index 5401fc9..268f818 100755
--- a/t/txinfo26.sh
+++ b/t/txinfo26.sh
@@ -18,7 +18,7 @@
 # PR/408
 
 required='makeinfo'
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/txinfo27.sh b/t/txinfo27.sh
index bfc075a..f1e8791 100755
--- a/t/txinfo27.sh
+++ b/t/txinfo27.sh
@@ -17,7 +17,7 @@
 # Make sure install-info works even if no-installinfo is given.
 
 required='makeinfo'
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/txinfo28.sh b/t/txinfo28.sh
index f3517b6..069a515 100755
--- a/t/txinfo28.sh
+++ b/t/txinfo28.sh
@@ -20,7 +20,7 @@
 # Report from Ralf Corsepius.
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 # This setting, when honored by GNU ls, used to cause an infinite loop
 # in mdate-sh.
diff --git a/t/txinfo29.sh b/t/txinfo29.sh
index 3e27362..b219678 100755
--- a/t/txinfo29.sh
+++ b/t/txinfo29.sh
@@ -17,7 +17,7 @@
 # Make sure that INFO_DEPS can be overridden.
 # Report from Bruce Korb.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 INFO_DEPS = foo.info
diff --git a/t/txinfo31.sh b/t/txinfo31.sh
index e8186e5..567e28f 100755
--- a/t/txinfo31.sh
+++ b/t/txinfo31.sh
@@ -17,7 +17,7 @@
 # Make sure file extensions are matched correctly.
 # Report from Eric Dorland.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo info_TEXINFOS = bar.texi >Makefile.am
 cat >bar.texi <<EOF
diff --git a/t/txinfo32.sh b/t/txinfo32.sh
index 9f2134a..c9d7d83 100755
--- a/t/txinfo32.sh
+++ b/t/txinfo32.sh
@@ -17,7 +17,7 @@
 # Make sure the documentation targets work as required with BSD make,
 # even in the presence of subdirs (requires presence of default *-am rules).
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 cat >>configure.ac <<'END'
diff --git a/t/txinfo33.sh b/t/txinfo33.sh
index a55b5ed..47f4038 100755
--- a/t/txinfo33.sh
+++ b/t/txinfo33.sh
@@ -18,7 +18,7 @@
 # Similar to txinfo25.sh.
 
 required='makeinfo tex texi2dvi dvips'
-. ./defs || exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/txinfo4.sh b/t/txinfo4.sh
index e6c67b9..6784d03 100755
--- a/t/txinfo4.sh
+++ b/t/txinfo4.sh
@@ -16,7 +16,7 @@
 
 # Make sure non-empty, non-info suffixes are diagnosed.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
diff --git a/t/txinfo7.sh b/t/txinfo7.sh
index 93d199c..8d72054 100755
--- a/t/txinfo7.sh
+++ b/t/txinfo7.sh
@@ -17,7 +17,7 @@
 # Test to make sure texinfo.tex correctly installed by -a.  Bug report
 # by Per Cederqvist.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
diff --git a/t/txinfo8.sh b/t/txinfo8.sh
index 45c3c09..4df6661 100755
--- a/t/txinfo8.sh
+++ b/t/txinfo8.sh
@@ -18,7 +18,7 @@
 # -a when we're using AC_CONFIG_AUX_DIR.  Bug report by by Per
 # Cederqvist.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
diff --git a/t/uninstall-fail.sh b/t/uninstall-fail.sh
index d3bea1b..f144bd6 100755
--- a/t/uninstall-fail.sh
+++ b/t/uninstall-fail.sh
@@ -20,7 +20,7 @@
 # tests for other primaries too?  E.g., SCRIPTS, PROGRAMS, LISP, PYTHON,
 # etc...
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir d
 : > d/f
diff --git a/t/uninstall-pr9578.sh b/t/uninstall-pr9578.sh
index cb870b3..e5f9acb 100755
--- a/t/uninstall-pr9578.sh
+++ b/t/uninstall-pr9578.sh
@@ -22,7 +22,7 @@
 # need sister tests for other primaries too?  E.g., PROGRAMS, LISP,
 # PYTHON, etc...
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/unused.sh b/t/unused.sh
index 79c7b41..11c43c1 100755
--- a/t/unused.sh
+++ b/t/unused.sh
@@ -16,7 +16,7 @@
 
 # Test for failing check for unused macros.  From Johan Danielsson.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 MACRO_1
diff --git a/t/upc.sh b/t/upc.sh
index 4128ea0..3800a06 100755
--- a/t/upc.sh
+++ b/t/upc.sh
@@ -16,7 +16,7 @@
 
 # A simple Hello World for UPC.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_UPC
diff --git a/t/upc2.sh b/t/upc2.sh
index be6461f..5abd0df 100755
--- a/t/upc2.sh
+++ b/t/upc2.sh
@@ -17,7 +17,7 @@
 # Test that Automake suggests using AM_PROG_UPC if Unified Parallel C
 # sources are used.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_PROG_CC >>configure.ac
 
diff --git a/t/upc3.sh b/t/upc3.sh
index 7da65d5..e031252 100755
--- a/t/upc3.sh
+++ b/t/upc3.sh
@@ -16,7 +16,7 @@
 
 # Test that C and Unified Parallel C link safely.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/vala-headers.sh b/t/vala-headers.sh
index 1c23cf8..11c0d10 100755
--- a/t/vala-headers.sh
+++ b/t/vala-headers.sh
@@ -17,7 +17,7 @@
 # Test to make sure compiling Vala code really works with recursive make.
 
 required="pkg-config valac gcc"
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/vala-libs.sh b/t/vala-libs.sh
index 0eab4fe..4469eb8 100755
--- a/t/vala-libs.sh
+++ b/t/vala-libs.sh
@@ -18,7 +18,7 @@
 # And use of vapi files to call C code from Vala.
 
 required="valac cc pkg-config libtoolize"
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/vala-mix.sh b/t/vala-mix.sh
index e16c02c..274d506 100755
--- a/t/vala-mix.sh
+++ b/t/vala-mix.sh
@@ -17,7 +17,7 @@
 # Vala sources and C sources in the same program.  Functional test.
 
 required='valac cc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/vala-mix2.sh b/t/vala-mix2.sh
index 7a2d324..753a5d1 100755
--- a/t/vala-mix2.sh
+++ b/t/vala-mix2.sh
@@ -18,7 +18,7 @@
 # program.  Functional test.  See automake bug#10894.
 
 required='valac cc c++'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/vala-parallel.sh b/t/vala-parallel.sh
index 3479135..19b5570 100755
--- a/t/vala-parallel.sh
+++ b/t/vala-parallel.sh
@@ -17,7 +17,7 @@
 # Vala support with parallel make.
 
 required='valac cc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/vala-vapi.sh b/t/vala-vapi.sh
index eea6160..66d033e 100755
--- a/t/vala-vapi.sh
+++ b/t/vala-vapi.sh
@@ -17,7 +17,7 @@
 # Test and that vapi files are correctly handled by Vala support.
 
 required='valac cc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/vala-vpath.sh b/t/vala-vpath.sh
index 53b1358..ad5acf6 100755
--- a/t/vala-vpath.sh
+++ b/t/vala-vpath.sh
@@ -18,7 +18,7 @@
 # See automake bug#8753.
 
 required="cc valac"
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SRCDIR([hello.vala])
diff --git a/t/vala.sh b/t/vala.sh
index 9e48549..4869a61 100755
--- a/t/vala.sh
+++ b/t/vala.sh
@@ -16,7 +16,7 @@
 
 # Basic "grepping" test on vala support.
 
-. ./defs || exit 1
+. test-init.sh
 
 # So that we won't require libtool macros.
 cat > acinclude.m4 <<'END'
diff --git a/t/vala2.sh b/t/vala2.sh
index a392a7a..9103a3f 100755
--- a/t/vala2.sh
+++ b/t/vala2.sh
@@ -17,7 +17,7 @@
 # Test to make sure compiling Vala code really works with recursive make.
 
 required="pkg-config valac gcc"
-. ./defs || exit 1
+. test-init.sh
 
 mkdir src
 
diff --git a/t/vala3.sh b/t/vala3.sh
index ccce705..b3712e9 100755
--- a/t/vala3.sh
+++ b/t/vala3.sh
@@ -17,7 +17,7 @@
 # Test to make sure compiling Vala code really works with non-recursive make.
 
 required="pkg-config valac gcc"
-. ./defs || exit 1
+. test-init.sh
 
 mkdir src
 
diff --git a/t/vala4.sh b/t/vala4.sh
index a727ec5..aad5837 100755
--- a/t/vala4.sh
+++ b/t/vala4.sh
@@ -16,7 +16,7 @@
 
 # Test AM_PROG_VALAC.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/vala5.sh b/t/vala5.sh
index 7f5fba2..94ae7aa 100755
--- a/t/vala5.sh
+++ b/t/vala5.sh
@@ -17,7 +17,7 @@
 # Test per-target flags.
 
 required="pkg-config valac gcc"
-. ./defs || exit 1
+. test-init.sh
 
 mkdir src
 
diff --git a/t/var-recurs.sh b/t/var-recurs.sh
index 6071e66..7a61584 100755
--- a/t/var-recurs.sh
+++ b/t/var-recurs.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure recursive variable definitions die.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/var-recurs2.sh b/t/var-recurs2.sh
index 0acdc2a..edf5d7b 100755
--- a/t/var-recurs2.sh
+++ b/t/var-recurs2.sh
@@ -17,7 +17,7 @@
 # Test to make sure recursive variable definitions die.
 # From Jim Meyering.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 man_MANS = chgrp.1
diff --git a/t/var-undef-append.sh b/t/var-undef-append.sh
index 28ca299..d4827df 100755
--- a/t/var-undef-append.sh
+++ b/t/var-undef-append.sh
@@ -20,7 +20,7 @@
 # to it should get overridden as well.
 # See also "spy" test 'spy-var-append.sh'.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND_NO], [false])
diff --git a/t/vars-assign.sh b/t/vars-assign.sh
index 36d3dc7..7006400 100755
--- a/t/vars-assign.sh
+++ b/t/vars-assign.sh
@@ -17,7 +17,7 @@
 # Automake do not complain about nor messes up GNU make specific
 # variable assignments (":=" and "?=").
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/vars.sh b/t/vars.sh
index cf45cb9..14c62d8 100755
--- a/t/vars.sh
+++ b/t/vars.sh
@@ -17,7 +17,7 @@
 # Test various variable definitions that include an '=' sign.
 # From Raja R Harinath.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 MY_FLAGS_1=-DABC=345
diff --git a/t/vartar.sh b/t/vartar.sh
index 91d8fb9..590c9d9 100755
--- a/t/vartar.sh
+++ b/t/vartar.sh
@@ -16,7 +16,7 @@
 
 # Targets and macros are two different name spaces.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 xinstall = xinstall
diff --git a/t/vartypos-deps.sh b/t/vartypos-deps.sh
index 8ba3792..7ef49d3 100755
--- a/t/vartypos-deps.sh
+++ b/t/vartypos-deps.sh
@@ -18,7 +18,7 @@
 # *_DEPENDENCIES when we should, and do not warn about them
 # when we should not.
 
-. ./defs || exit 1
+. test-init.sh
 
 subdirs='ok1 ok2 ko1 ko2'
 mkdir $subdirs
diff --git a/t/vartypos-whitelist.sh b/t/vartypos-whitelist.sh
index dba624c..569affe 100755
--- a/t/vartypos-whitelist.sh
+++ b/t/vartypos-whitelist.sh
@@ -19,7 +19,7 @@
 # build system.
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 edit ()
 {
diff --git a/t/vartypos.sh b/t/vartypos.sh
index 7927163..68f18db 100755
--- a/t/vartypos.sh
+++ b/t/vartypos.sh
@@ -16,7 +16,7 @@
 
 # Make sure we warn about possible variable typos when we should.
 
-. ./defs || exit 1
+. test-init.sh
 
 : > ltmain.sh
 
diff --git a/t/verbatim.sh b/t/verbatim.sh
index 761b301..675fb66 100755
--- a/t/verbatim.sh
+++ b/t/verbatim.sh
@@ -19,7 +19,7 @@
 # too.  Yes, this test is hacky ... as is the behaviour it tests
 # after all ;-)
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/version3.sh b/t/version3.sh
index 2b5294d..6299c61 100755
--- a/t/version3.sh
+++ b/t/version3.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure version in AUTOMAKE_OPTIONS works.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = 9.9x
diff --git a/t/version4.sh b/t/version4.sh
index f04305e..53285fe 100755
--- a/t/version4.sh
+++ b/t/version4.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure we are compatible with the 1.4-p1 series.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = 1.4-p3
diff --git a/t/version6.sh b/t/version6.sh
index 74fa088..659394e 100755
--- a/t/version6.sh
+++ b/t/version6.sh
@@ -16,7 +16,7 @@
 
 # Make sure the current version can be required.
 
-. ./defs || exit 1
+. test-init.sh
 
 amver=$($AUTOMAKE --version | sed -e 's/.* //;1q')
 
diff --git a/t/version7.sh b/t/version7.sh
index 69e7cd1..cccd3f7 100755
--- a/t/version7.sh
+++ b/t/version7.sh
@@ -20,7 +20,7 @@
 # changes -- we don't support this feature on non-GNU Makes).
 
 required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
 
 cat >configure.ac <<END
 m4_include([version.m4])
diff --git a/t/version8.sh b/t/version8.sh
index 28f7548..cff0f02 100755
--- a/t/version8.sh
+++ b/t/version8.sh
@@ -16,7 +16,7 @@
 
 # Calling AM_AUTOMAKE_VERSION by hand is a bug.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo 'AM_AUTOMAKE_VERSION([1.9])' >>configure.ac
 $ACLOCAL 2>stderr && { cat stderr >&2; exit 0; }
diff --git a/t/vpath-built-sources.sh b/t/vpath-built-sources.sh
index ae58511..9055720 100755
--- a/t/vpath-built-sources.sh
+++ b/t/vpath-built-sources.sh
@@ -18,7 +18,7 @@
 # build a source with the same name but without the $(srcdir).
 
 required=cc
-. ./defs || exit 1
+. test-init.sh
 
 ocwd=$(pwd) || fatal_ "couldn't get current working directory"
 
diff --git a/t/vpath-rewrite.sh b/t/vpath-rewrite.sh
index e856d4b..d3f6597 100755
--- a/t/vpath-rewrite.sh
+++ b/t/vpath-rewrite.sh
@@ -16,7 +16,7 @@
 
 # Test Automake-provided internal make macros to deal with VPATH rewrites.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/vpath.sh b/t/vpath.sh
index 2090810..33f6f0a 100755
--- a/t/vpath.sh
+++ b/t/vpath.sh
@@ -17,7 +17,7 @@
 # Test to make sure VPATH can be overridden.
 # Report from Anthony Green.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/vtexi.sh b/t/vtexi.sh
index 9127013..6b7ab54 100755
--- a/t/vtexi.sh
+++ b/t/vtexi.sh
@@ -17,7 +17,7 @@
 # Basic checks and some regressions testing on 'version.texi'
 # support for texinfo files.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
diff --git a/t/vtexi2.sh b/t/vtexi2.sh
index 198941f..14b3e4d 100755
--- a/t/vtexi2.sh
+++ b/t/vtexi2.sh
@@ -19,7 +19,7 @@
 #   version.texi gets listed as a dependency for the .info file but
 #   not the .dvi file.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = zardoz.texi
diff --git a/t/vtexi3.sh b/t/vtexi3.sh
index aa85f77..0b000a3 100755
--- a/t/vtexi3.sh
+++ b/t/vtexi3.sh
@@ -20,7 +20,7 @@
 # See also the related test 'vtexi4.sh', which does similar checks, but
 # for version.texi only, and requires makeinfo, tex and texi2dvi.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We are going to override package version in AC_INIT, so we need
 # to redefine the name of the distdir as well.
diff --git a/t/vtexi4.sh b/t/vtexi4.sh
index 58115fd..8f64b43 100755
--- a/t/vtexi4.sh
+++ b/t/vtexi4.sh
@@ -22,7 +22,7 @@
 # texi2dvi.
 
 required='makeinfo tex texi2dvi grep-nonprint'
-. ./defs || exit 1
+. test-init.sh
 
 test $(LC_ALL=C date '+%u') -gt 0 && test $(LC_ALL=C date '+%u') -lt 8 \
   && day=$(LC_ALL=C date '+%d')   && test -n "$day" \
diff --git a/t/warning-groups-win-over-strictness.sh 
b/t/warning-groups-win-over-strictness.sh
index 387bd9b..99b04bb 100755
--- a/t/warning-groups-win-over-strictness.sh
+++ b/t/warning-groups-win-over-strictness.sh
@@ -19,7 +19,7 @@
 # levels are "catch-all warnings" (such as '-Wall' and '-Wnone').
 # Since we are at it, also throw in *.am and *.m4 file inclusions.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
diff --git a/t/warnings-obsolete-default.sh b/t/warnings-obsolete-default.sh
index 6f4680d..7b16106 100755
--- a/t/warnings-obsolete-default.sh
+++ b/t/warnings-obsolete-default.sh
@@ -17,7 +17,7 @@
 # Check that automake warnings in the 'obsolete' category are enabled
 # by default.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
diff --git a/t/warnings-override.sh b/t/warnings-override.sh
index 31ae4aa..6a807ee 100755
--- a/t/warnings-override.sh
+++ b/t/warnings-override.sh
@@ -21,7 +21,7 @@
 # been in place for quite a long time); see also Automake bug #7673.
 # Update this test if the semantics are changed.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
diff --git a/t/warnings-precedence.sh b/t/warnings-precedence.sh
index 43e569c..69342cd 100755
--- a/t/warnings-precedence.sh
+++ b/t/warnings-precedence.sh
@@ -18,7 +18,7 @@
 # warnings specified later should take precedence over those specified
 # earlier.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
diff --git a/t/warnings-strictness-interactions.sh 
b/t/warnings-strictness-interactions.sh
index c8f28c2..48a6dd6 100755
--- a/t/warnings-strictness-interactions.sh
+++ b/t/warnings-strictness-interactions.sh
@@ -18,7 +18,7 @@
 # in AUTOMAKE_OPTIONS take precedence over explicit warnings given in
 # AM_INIT_AUTOMAKE.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
diff --git a/t/warnings-unknown.sh b/t/warnings-unknown.sh
index d1b2b8c..2677d08 100755
--- a/t/warnings-unknown.sh
+++ b/t/warnings-unknown.sh
@@ -16,7 +16,7 @@
 
 # Check that automake complains about unknown warnings.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
diff --git a/t/warnings-win-over-strictness.sh 
b/t/warnings-win-over-strictness.sh
index 974bd9a..725663c 100755
--- a/t/warnings-win-over-strictness.sh
+++ b/t/warnings-win-over-strictness.sh
@@ -17,7 +17,7 @@
 # Check that, on the command line, explicitly-defined warnings take
 # precedence over implicit strictness-implied warnings.
 
-. ./defs || exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
diff --git a/t/warnopts.sh b/t/warnopts.sh
index c3be617..a368f23 100755
--- a/t/warnopts.sh
+++ b/t/warnopts.sh
@@ -16,7 +16,7 @@
 
 # Make sure that we can enable or disable warnings on a per-file basis.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/werror.sh b/t/werror.sh
index d6c6587..1475e44 100755
--- a/t/werror.sh
+++ b/t/werror.sh
@@ -17,7 +17,7 @@
 # Test to make sure -Werror and --add-missing work together.
 
 am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/werror2.sh b/t/werror2.sh
index 8b42833..b56448d 100755
--- a/t/werror2.sh
+++ b/t/werror2.sh
@@ -19,7 +19,7 @@
 # succeed if make is run a second time immediately afterwards.
 # Report from Harlan Stenn.
 
-. ./defs || exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
diff --git a/t/werror3.sh b/t/werror3.sh
index 29f6a14..d787c12 100755
--- a/t/werror3.sh
+++ b/t/werror3.sh
@@ -17,7 +17,7 @@
 # Make sure a per-Makefile.am -Werror setting is not carried over
 # to another Makefile.am.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<\END
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/werror4.sh b/t/werror4.sh
index 1b930d5..7908d1d 100755
--- a/t/werror4.sh
+++ b/t/werror4.sh
@@ -16,7 +16,7 @@
 
 # -Werror and local -Werror settings should be flagged for the user.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >>configure.ac <<\END
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/whoami.sh b/t/whoami.sh
index 4a4c2e9..6d0b13c 100755
--- a/t/whoami.sh
+++ b/t/whoami.sh
@@ -18,7 +18,7 @@
 # from Johan Danielsson (and a very nice bug report, too, I might
 # add).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 WHO_AM_I=17
diff --git a/t/xsource.sh b/t/xsource.sh
index 2a65f40..2ea2bb1 100755
--- a/t/xsource.sh
+++ b/t/xsource.sh
@@ -17,7 +17,7 @@
 # Test to make sure multiple source files with the same object
 # file causes error.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz
diff --git a/t/yacc-auxdir.sh b/t/yacc-auxdir.sh
index 7e5db72..3f19bba 100755
--- a/t/yacc-auxdir.sh
+++ b/t/yacc-auxdir.sh
@@ -17,7 +17,7 @@
 # Test to make sure ylwrap is put in right location.
 # Report from Tim Van Holder.
 
-. ./defs || exit 1
+. test-init.sh
 
 mkdir aux1 sub
 
diff --git a/t/yacc-basic.sh b/t/yacc-basic.sh
index 1921425..e36124d 100755
--- a/t/yacc-basic.sh
+++ b/t/yacc-basic.sh
@@ -18,7 +18,7 @@
 # Keep in sync with sister test 'yacc-cxx.sh'.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-bison-skeleton-cxx.sh b/t/yacc-bison-skeleton-cxx.sh
index efe9465..1a9c053 100755
--- a/t/yacc-bison-skeleton-cxx.sh
+++ b/t/yacc-bison-skeleton-cxx.sh
@@ -18,7 +18,7 @@
 # For Automake bug#7648 and PR automake/491.
 
 required='c++ bison'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/yacc-bison-skeleton.sh b/t/yacc-bison-skeleton.sh
index 64fbce8..c550cda 100755
--- a/t/yacc-bison-skeleton.sh
+++ b/t/yacc-bison-skeleton.sh
@@ -18,7 +18,7 @@
 # For Automake bug#7648 and PR automake/491.
 
 required='cc bison'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-clean-cxx.sh b/t/yacc-clean-cxx.sh
index f30ce1b..7bc009d 100755
--- a/t/yacc-clean-cxx.sh
+++ b/t/yacc-clean-cxx.sh
@@ -21,7 +21,7 @@
 # See also sister test 'yacc-clean.sh'.
 
 required='c++ yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/yacc-clean.sh b/t/yacc-clean.sh
index dce70a2..1f6664c 100755
--- a/t/yacc-clean.sh
+++ b/t/yacc-clean.sh
@@ -20,7 +20,7 @@
 # See also sister test 'yacc-cxx-clean.sh'.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-cxx.sh b/t/yacc-cxx.sh
index a7664c3..e6505d8 100755
--- a/t/yacc-cxx.sh
+++ b/t/yacc-cxx.sh
@@ -19,7 +19,7 @@
 # Keep in sync with sister test 'yacc-basic.sh'.
 
 required='c++ yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/yacc-d-basic.sh b/t/yacc-d-basic.sh
index 6cbae1f..5cb2a8e 100755
--- a/t/yacc-d-basic.sh
+++ b/t/yacc-d-basic.sh
@@ -19,7 +19,7 @@
 # Keep in sync with sister test 'yacc-d-cxx.sh'.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-d-cxx.sh b/t/yacc-d-cxx.sh
index 2211403..710e9c4 100755
--- a/t/yacc-d-cxx.sh
+++ b/t/yacc-d-cxx.sh
@@ -19,7 +19,7 @@
 # Keep in sync with sister test 'yacc-d-basic.sh'.
 
 required='c++ yacc'
-. ./defs || exit 1
+. test-init.sh
 
 write_parse ()
 {
diff --git a/t/yacc-d-vpath.sh b/t/yacc-d-vpath.sh
index 05019fb..483330e 100755
--- a/t/yacc-d-vpath.sh
+++ b/t/yacc-d-vpath.sh
@@ -23,7 +23,7 @@
 # Please keep this in sync with sister test 'yaccvpath.sh'.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-deleted-headers.sh b/t/yacc-deleted-headers.sh
index 72965b4..6431c55 100755
--- a/t/yacc-deleted-headers.sh
+++ b/t/yacc-deleted-headers.sh
@@ -17,7 +17,7 @@
 # Tests that we can recover from deleted headers generated by 'yacc -d'.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-depend.sh b/t/yacc-depend.sh
index f7254a2..3730abb 100755
--- a/t/yacc-depend.sh
+++ b/t/yacc-depend.sh
@@ -18,7 +18,7 @@
 # Report from Paolo Bonzini.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-depend2.sh b/t/yacc-depend2.sh
index 281dcd2..af5196a 100755
--- a/t/yacc-depend2.sh
+++ b/t/yacc-depend2.sh
@@ -18,7 +18,7 @@
 # for yacc rules.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-dist-nobuild-subdir.sh b/t/yacc-dist-nobuild-subdir.sh
index 94919aa..3b34065 100755
--- a/t/yacc-dist-nobuild-subdir.sh
+++ b/t/yacc-dist-nobuild-subdir.sh
@@ -18,7 +18,7 @@
 # using yacc sources in a subdir option.  Exposes automake bug#8485.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-dist-nobuild.sh b/t/yacc-dist-nobuild.sh
index 45cb109..a18e880 100755
--- a/t/yacc-dist-nobuild.sh
+++ b/t/yacc-dist-nobuild.sh
@@ -19,7 +19,7 @@
 # See automake bug#7884.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc2.sh b/t/yacc-grepping.sh
similarity index 79%
rename from t/yacc2.sh
rename to t/yacc-grepping.sh
index 64e5421..546f4ad 100755
--- a/t/yacc2.sh
+++ b/t/yacc-grepping.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,11 +14,16 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to make sure intermediate .h file is not generated nor removed
-# if (AM_)?YFLAGS do not contain -d.  Requested by Jim Meyering.
-# See also the related semantic test 'yacc-d-basic.sh'.
+# Some grep-based checks on yacc support:
+#
+#  - Make sure intermediate .c file is built from yacc source.
+#    Report from Thomas Morgan.
+#
+#  - Make sure intermediate .h file is not generated nor removed
+#    if (AM_)?YFLAGS do not contain '-d'.
+#    Requested by Jim Meyering.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -38,18 +43,21 @@ END
 cp Makefile.am Makefile.src
 
 $AUTOMAKE -a
+$FGREP 'zardoz.c' Makefile.in
 # If zardoz.h IS mentioned, fail.
 $FGREP 'zardoz.h' Makefile.in && exit 1
 
 cp Makefile.src Makefile.am
 echo 'AM_YFLAGS = -d' >> Makefile.am
 $AUTOMAKE
+$FGREP 'zardoz.c' Makefile.in
 # If zardoz.h is NOT mentioned, fail.
 $FGREP 'zardoz.h' Makefile.in
 
 cp Makefile.src Makefile.am
 echo 'AM_YFLAGS = ' >> Makefile.am
 $AUTOMAKE
+$FGREP 'zardoz.c' Makefile.in
 # If zardoz.h IS mentioned, fail.
 $FGREP 'zardoz.h' Makefile.in && exit 1
 
diff --git a/t/yacc5.sh b/t/yacc-grepping2.sh
similarity index 98%
rename from t/yacc5.sh
rename to t/yacc-grepping2.sh
index 9a8d8da..6891ce8 100755
--- a/t/yacc5.sh
+++ b/t/yacc-grepping2.sh
@@ -17,7 +17,7 @@
 # Test of yacc functionality, derived from GNU binutils
 # by Tim Van Holder.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc7.sh b/t/yacc-headers-and-dist-pr47.sh
similarity index 98%
rename from t/yacc7.sh
rename to t/yacc-headers-and-dist-pr47.sh
index 5d7be75..49458bc 100755
--- a/t/yacc7.sh
+++ b/t/yacc-headers-and-dist-pr47.sh
@@ -21,7 +21,7 @@
 # PR/47.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-lex-cxx-alone.sh b/t/yacc-lex-cxx-alone.sh
index 46e81ad..1ce5158 100755
--- a/t/yacc-lex-cxx-alone.sh
+++ b/t/yacc-lex-cxx-alone.sh
@@ -18,7 +18,7 @@
 # Lex + C++ support for a program built only from lex sources.
 
 required='c++ yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/yacc-line.sh b/t/yacc-line.sh
index f7626b0..7f01d76 100755
--- a/t/yacc-line.sh
+++ b/t/yacc-line.sh
@@ -19,7 +19,7 @@
 # See also sister test 'lex-line.sh'.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-mix-c-cxx.sh b/t/yacc-mix-c-cxx.sh
index eb4b305..273d43f 100755
--- a/t/yacc-mix-c-cxx.sh
+++ b/t/yacc-mix-c-cxx.sh
@@ -18,7 +18,7 @@
 # in the same directory.
 
 required='cc c++ yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-nodist.sh b/t/yacc-nodist.sh
index 1be007c..8ccf7b8 100755
--- a/t/yacc-nodist.sh
+++ b/t/yacc-nodist.sh
@@ -18,7 +18,7 @@
 # The test 'lex-sh.test' does similar checks for lex-generated '.c'
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc8.sh b/t/yacc-subdir.sh
similarity index 99%
rename from t/yacc8.sh
rename to t/yacc-subdir.sh
index 901066a..d536759 100755
--- a/t/yacc8.sh
+++ b/t/yacc-subdir.sh
@@ -18,7 +18,7 @@
 
 required='cc yacc'
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc-subobj-nodep.sh b/t/yacc-subobj-nodep.sh
index 81c11aa..bc16865 100755
--- a/t/yacc-subobj-nodep.sh
+++ b/t/yacc-subobj-nodep.sh
@@ -18,7 +18,7 @@
 # are used, even when dependency tracking is disabled.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/yacc-weirdnames.sh b/t/yacc-weirdnames.sh
index ab43af3..028d9fa 100755
--- a/t/yacc-weirdnames.sh
+++ b/t/yacc-weirdnames.sh
@@ -17,7 +17,7 @@
 # Check that yacc sources with many dots in their name are handled
 # correctly.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yacc.sh b/t/yacc.sh
deleted file mode 100755
index 0a838a9..0000000
--- a/t/yacc.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure intermediate .c file is built from yacc source.
-# Bug from Thomas Morgan.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AC_PROG_YACC
-END
-
-cat > Makefile.am <<'END'
-bin_PROGRAMS = zardoz
-zardoz_SOURCES = zardoz.y
-END
-
-$ACLOCAL
-$AUTOMAKE -a
-
-$FGREP 'zardoz.c' Makefile.in
-
-:
diff --git a/t/yacc4.sh b/t/yacc4.sh
index a0e121f..a4802d5 100755
--- a/t/yacc4.sh
+++ b/t/yacc4.sh
@@ -17,7 +17,7 @@
 # Some simple tests of ylwrap functionality.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yaccdry.sh b/t/yaccdry.sh
index 8e5af56..bbfda87 100755
--- a/t/yaccdry.sh
+++ b/t/yaccdry.sh
@@ -17,7 +17,7 @@
 # Removal recovery rules for headers should not remove files with 'make -n'.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yaccpp.sh b/t/yaccpp.sh
index 30ad7bc..1bcf379 100755
--- a/t/yaccpp.sh
+++ b/t/yaccpp.sh
@@ -19,7 +19,7 @@
 # which does much more in-depth checks (but requires an actual
 # Yacc program and a working C++ compiler).
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
diff --git a/t/yaccvpath.sh b/t/yaccvpath.sh
index e56ca8e..c881f07 100755
--- a/t/yaccvpath.sh
+++ b/t/yaccvpath.sh
@@ -23,7 +23,7 @@
 # Please keep this in sync with sister test 'yacc-d-vpath.sh'.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/yflags-cmdline-override.sh b/t/yflags-cmdline-override.sh
index 6139e4f..dfaceeb 100755
--- a/t/yflags-cmdline-override.sh
+++ b/t/yflags-cmdline-override.sh
@@ -18,7 +18,7 @@
 # at configure time and/or at make time.
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 unset YFLAGS || :
 
diff --git a/t/yflags-conditional.sh b/t/yflags-conditional.sh
index 6765613..d7fc7e0 100755
--- a/t/yflags-conditional.sh
+++ b/t/yflags-conditional.sh
@@ -17,7 +17,7 @@
 # Check that automake complains about *_YFLAGS variables which have
 # conditional content.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/yflags-d-false-positives.sh b/t/yflags-d-false-positives.sh
index 5b120dd..0cae14f 100755
--- a/t/yflags-d-false-positives.sh
+++ b/t/yflags-d-false-positives.sh
@@ -16,7 +16,7 @@
 
 # Check for false positives in automake recognition of '-d' in YFLAGS.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/yflags-force-conditional.sh b/t/yflags-force-conditional.sh
index a8404b7..96455bb 100755
--- a/t/yflags-force-conditional.sh
+++ b/t/yflags-force-conditional.sh
@@ -17,7 +17,7 @@
 # Check that the user can force automake to use *_YFLAGS variables
 # which have conditional content.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_SUBST([CC], [false])
diff --git a/t/yflags-force-override.sh b/t/yflags-force-override.sh
index 8682637..d7ed7a1 100755
--- a/t/yflags-force-override.sh
+++ b/t/yflags-force-override.sh
@@ -19,7 +19,7 @@
 # variable is user-reserved).
 
 required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/yflags-var-expand.sh b/t/yflags-var-expand.sh
index 789cc2c..23aea14 100755
--- a/t/yflags-var-expand.sh
+++ b/t/yflags-var-expand.sh
@@ -19,7 +19,7 @@
 #  foo_flags = -d
 #  AM_YFLAGS = $(foo_flags)
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
diff --git a/t/yflags.sh b/t/yflags.sh
index fcb87cf..4450980 100755
--- a/t/yflags.sh
+++ b/t/yflags.sh
@@ -19,7 +19,7 @@
 # Please keep this in sync with the sister tests yflags2.sh, lflags.sh
 # and lflags2.sh.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >fake-yacc <<'END'
 #!/bin/sh
diff --git a/t/yflags2.sh b/t/yflags2.sh
index 28c1265..e96fa06 100755
--- a/t/yflags2.sh
+++ b/t/yflags2.sh
@@ -19,7 +19,7 @@
 # Please keep this in sync with the sister tests yflags.sh, lflags.sh
 # and lflags2.sh.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >fake-yacc <<'END'
 #!/bin/sh


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]