exit $1
}
+ # Print warnings (e.g., about skipped and failed tests) to this file
+ # number. Override by putting, say:
+ # stderr_fileno_=9; export stderr_fileno_; exec 9>&2;
+ # in the definition of AM_TESTS_ENVIRONMENT.
+ # This is useful when using automake's parallel tests mode, to print the
+ # reason for skip/failure to console, rather than to the *.log files.
+ : ${stderr_fileno_=2}
+
+ # Copied from Gnulib's `tests/init.sh'.
+ warn_ () { echo "$@" 1>&$stderr_fileno_; }
+ fail_ () { warn_ "$me: failed test: $@"; Exit 1; }
+ skip_ () { warn_ "$me: skipped test: $@"; Exit 77; }
+ framework_failure_ () { warn_ "$me: set-up failure: $@"; Exit 99; }
+
+# is_newest FILE FILES
+# --------------------
+# Return false if any file in FILES is newer than FILE.
+# Resolve ties in favor of FILE.
+is_newest ()
+{
+ is_newest_files=`find "$@" -newer "$1"`
+ test -z "$is_newest_files"
+}
+
+# AUTOMAKE_run status [options...]
+# --------------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_run ()
+{
+ expected_exitcode=$1
+ shift
+ exitcode=0
+ $AUTOMAKE ${1+"$@"} >stdout 2>stderr || exitcode=$?
+ cat stderr >&2
+ cat stdout
+ test $exitcode = $expected_exitcode || Exit 1
+}
+
+# AUTOMAKE_fails [options...]
+# ---------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_fails ()
+{
+ AUTOMAKE_run 1 ${1+"$@"}
+}
+
+# using_gmake
+# -----------
+# Return success if $MAKE is GNU make, return failure otherwise.
+# Caches the result for speed reasons.
+using_gmake ()
+{
+ case $am__using_gmake in
+ yes)
+ return 0;;
+ no)
+ return 1;;
+ '')
+ # Use --version AND -v, because SGI Make doesn't fail on --version.
+ # Also grep for GNU because newer versions of FreeBSD make do
+ # not complain about `--version' (they seem to silently ignore it).
+ if $MAKE --version -v | grep GNU; then
+ am__using_gmake=yes
+ return 0
+ else
+ am__using_gmake=no
+ return 1
+ fi;;
+ *)
+ echo "invalid value for \$am__using_gmake: '$am__using_gmake'" >&2
+ Exit 99;;
+ esac
+}
+
+commented_sed_unindent_prog='
+ /^$/b # Nothing to do for empty lines.
+ x # Get x<indent> into pattern space.
+ /^$/{ # No prior x<indent>, go prepare it.
+ g # Copy this 1st non-blank line into pattern space.
+ s/^\(['"$tab"' ]*\).*/x\1/ # Prepare x<indent> in pattern space.
+ } # Now: x<indent> in pattern and <line> in hold.
+ G # Build x<indent>\n<line> in pattern space, and
+ h # duplicate it into hold space.
+ s/\n.*$// # Restore x<indent> in pattern space, and
+ x # exchange with the above duplicate in hold space.
+ s/^x\(.*\)\n\1// # Remove leading <indent> from <line>.
+ s/^x.*\n// # Restore <line> when there is no leading <indent>.
+'
+
+# unindent [input files...]
+# -------------------------
+# Remove the "proper" amount of leading whitespace from the given files,
+# and output the result on stdout. That amount is determined by looking
+# at the leading whitespace of the first non-blank line in the input
+# files. If no input file is specified, standard input is implied.
+unindent ()
+{
+ if test x"$sed_unindent_prog" = x; then
+ sed_unindent_prog=`printf '%s\n' "$commented_sed_unindent_prog" | sed -e "s/ *# .*//"`
+ fi
+ sed "$sed_unindent_prog" ${1+"$@"}
+}
+sed_unindent_prog="" # Avoid interferences from the environment.
+
+
+## ----------------------------------------------------------- ##
+## Checks for required tools, and additional setups (if any) ##
+## required by them. ##
+## ----------------------------------------------------------- ##
+
+# Print it here, so that the user will see it also if the test
+# will be skipped due to some tool missing in $PATH itself.
+echo "$PATH"
+
+# Look for (and maybe set up) required tools and/or system features; skip
+# the current test if they are not found.
for tool in : $required
do
# Check that each required tool is present.