diff options
author | Zack Weinberg <zackw@panix.com> | 2020-06-29 18:40:48 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-06-29 23:17:15 -0700 |
commit | 25014b40e0a9d194f87e6047c394e9a45b5ae938 (patch) | |
tree | d37cc0d3d6b9aa4cd9f1fbe6dd001e973579b484 /tests/tools.at | |
parent | 834b866d39860f34fffda92ff8087133fcb3d0e9 (diff) | |
download | autoconf-25014b40e0a9d194f87e6047c394e9a45b5ae938.tar.gz |
Look harder for a shell whose -n is known to work.
The test suite was insisting on using /bin/sh -n for syntax checking,
which meant that if /bin/sh wasn’t one of the short list of shells
whose -n is known to work, we would skip all of the syntax-check
tests, even if some other shell was available that would work.
Instead do like _AS_DETECT_BETTER_SHELL, and loop over possible
shells, starting with $SHELL and going on to a hardwired list of
known-good possibilities. The result is written to the substitution
variable @SHELL_N@ and the testsuite uses that.
(Should we invoke AC_PATH_PROG on the result of the search if it’s not
already absolute?)
* configure.ac: Search for a shell whose -n mode is known to
work, instead of just checking /bin/sh. Set @SHELL_N@ to
what we find.
* tests/atlocal.in: Propagate @SHELL_N@ to testsuite.
* tests/local.at (AT_CHECK_SHELL_SYNTAX): Use $SHELL_N instead
of hardcoding /bin/sh. Update test for usable shell -n.
(AT_CHECK_AUTOCONF): Update test for usable shell -n.
* tests/tools.at: Update test for usable shell -n.
Diffstat (limited to 'tests/tools.at')
-rw-r--r-- | tests/tools.at | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/tools.at b/tests/tools.at index b95bdcf5..9d3c7183 100644 --- a/tests/tools.at +++ b/tests/tools.at @@ -45,7 +45,7 @@ AT_BANNER([Executables (autoheader, autoupdate...).]) AT_SETUP([Syntax of the shell scripts]) -AT_CHECK([test "$ac_cv_sh_n_works" = yes || exit 77]) +AT_CHECK([test "$SHELL_N" != none || exit 77]) # Specify the absolute name of the tool, as some shells don't honor PATH when # running `sh PROG'. |