mirror of
git://git.sv.gnu.org/autoconf
synced 2025-02-11 13:51:04 +08:00
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.
49 lines
1.6 KiB
Bash
49 lines
1.6 KiB
Bash
# -*- shell-script -*-
|
|
# @configure_input@
|
|
# Configurable variable values for Autoconf test suite.
|
|
|
|
# Copyright (C) 2000-2001, 2005, 2008-2017, 2020 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 3 of the License, 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 <https://www.gnu.org/licenses/>.
|
|
|
|
PERL='@PERL@'
|
|
GREP='@GREP@'
|
|
EGREP='@EGREP@'
|
|
SED='@SED@'
|
|
|
|
# We need to know if sh -n is ok.
|
|
SHELL_N='@SHELL_N@'
|
|
|
|
# Check whether the underlying system can manage some unusual
|
|
# symbols in file names.
|
|
if test -z '@ac_cv_unsupported_fs_chars@'; then
|
|
func_sanitize_file_name () { echo "$@"; }
|
|
else
|
|
func_sanitize_file_name () { echo "$@" | tr -d '@ac_cv_unsupported_fs_chars@'; }
|
|
fi
|
|
|
|
# Can we create directories with trailing whitespace in their names?
|
|
ac_cv_dir_trailing_space='@ac_cv_dir_trailing_space@'
|
|
if test "$ac_cv_dir_trailing_space" = yes; then
|
|
func_sanitize_dir_name () { echo "$@"; }
|
|
else
|
|
func_sanitize_dir_name () { echo "$@" | sed 's/ *$//'; }
|
|
fi
|
|
|
|
# AUTOM4TE might be set in the environment. Override it here so that
|
|
# direct aclocal invocations also use it.
|
|
AUTOM4TE=autom4te
|
|
export AUTOM4TE
|