Fix off-by-one bug in _m4_shiftn.
[autoconf.git] / tests / atlocal.in
blobad72c374f9db367114581a673a92596ea4704d00
1 # -*- shell-script -*-
2 # @configure_input@
3 # Configurable variable values for Autoconf test suite.
5 # Copyright (C) 2000, 2001, 2005, 2008 Free Software Foundation, Inc.
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 # 02110-1301, USA.
22 PERL='@PERL@'
23 GREP='@GREP@'
24 EGREP='@EGREP@'
25 SED='@SED@'
27 # We need to know if sh -n is ok.
28 ac_cv_sh_n_works='@ac_cv_sh_n_works@'
30 # Check whether the underlying system can manage some unusual
31 # symbols in file names.
32 unsupported_fs_chars=
33 for c in '\\' '"' '<' '>' '*' '?' '|'
35   touch "t${c}t" 2>/dev/null
36   test -f "t${c}t" && rm -f "t${c}t" && continue
37   # $c cannot be used in a file name.
38   unsupported_fs_chars=$unsupported_fs_chars$c
39 done
40 if test -z "$unsupported_fs_chars"; then
41   func_sanitize_file_name () { echo "$@"; }
42 else
43   func_sanitize_file_name () { echo "$@" | tr -d "$unsupported_fs_chars"; }
46 # Can we create directories with trailing whitespaces in their name?
47 rm -rf 'tdir ' && mkdir 'tdir ' && touch 'tdir /tfile' 2>/dev/null
48 a=$?
49 rm -rf 'tdir '
50 case $a$? in #(
51 00)
52   func_sanitize_dir_name () { echo "$@"; } ;; #(
54   func_sanitize_dir_name () { echo "$@" | sed 's/  *$//'; } ;;
55 esac