unset AM_TESTS_REEXEC BASH_VERSION || :
cwd=`pwd` || fatal_ "cannot get current working directory"
-cp ../defs .
+cp "$am_top_builddir"/defs . || fatal_ "fetching 'defs' from top_builddir"
#
# Search for required bash and non-bash shells.
(foo=abac && test xbxc = ${foo//a/x} && test -n "$BASH_VERSION")
END
-sed -e "s|^testbuilddir=.*|testbuilddir='$cwd'|" \
+sed -e "s|^am_top_builddir=.*|am_top_builddir='$cwd'|" \
-e 's|^SHELL=.*$|SHELL=bash; export SHELL|' \
- < ../defs-static >defs-static
+ < "$am_top_builddir"/defs-static >defs-static
do_reexec ()
{
mkdir sub
cp dummy.sh checkargs.sh defs sub
-sed -e "s|^testbuilddir=.*|testbuilddir='$cwd'|" \
- < ../defs-static > defs-static
-sed -e "s|^testbuilddir=.*|testbuilddir='$cwd/sub'|" \
- < ../defs-static > sub/defs-static
+sed -e "s|^am_top_builddir=.*|am_top_builddir='$cwd'|" \
+ < "$am_top_builddir"/defs-static > defs-static
+sed -e "s|^am_top_builddir=.*|am_top_builddir='$cwd/sub'|" \
+ < "$am_top_builddir"/defs-static > sub/defs-static
check_preserve_args ()
{