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.