Ignore tests that require read-only directories under root.
[autoconf.git] / tests / atlocal.in
blobbc7a914b002097baa7c249221ef18659f65665c4
1 # -*- shell-script -*-
2 # @configure_input@
3 # Configurable variable values for Autoconf test suite.
5 # Copyright (C) 2000, 2001, 2005 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 3 of the License, or
10 # (at your option) 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, see <http://www.gnu.org/licenses/>.
20 PERL='@PERL@'
21 GREP='@GREP@'
22 EGREP='@EGREP@'
23 SED='@SED@'
25 # We need to know if sh -n is ok.
26 ac_cv_sh_n_works='@ac_cv_sh_n_works@'
28 # Check whether the underlying system can manage some unusual
29 # symbols in file names.
30 unsupported_fs_chars=
31 for c in '\\' '"' '<' '>' '*' '?' '|'
33   touch "t$c" 2>/dev/null
34   test -f "t$c" && rm -f "t$c" && continue
35   # $c cannot be used in a file name.
36   unsupported_fs_chars=$unsupported_fs_chars$c
37 done
38 if test -z "$unsupported_fs_chars"; then
39   func_sanitize_file_name () { echo "$@"; }
40 else
41   func_sanitize_file_name () { echo "$@" | tr -d "$unsupported_fs_chars"; }
44 # Can we create directories with trailing whitespaces in their name?
45 rm -rf 'tdir /'
46 mkdir 'tdir ' && touch 'tdir /tfile' 2>/dev/null
47 if test -f 'tdir /tfile'; then
48   func_sanitize_dir_name () { echo "$@"; }
49   rm -rf 'tdir /'
50 else
51   func_sanitize_dir_name () { echo "$@" | sed 's/  *$//'; }