diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2009-07-12 11:28:57 +0200 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2009-07-12 13:30:25 +0200 |
commit | 991f80650d60a690b6a6016c514b70d444a1e334 (patch) | |
tree | 4efac481d27f9cde437f4307541dea714089a903 /configure.ac | |
parent | 524a5c5152b7c3d5f049a8da869056fcccc80449 (diff) | |
download | autoconf-991f80650d60a690b6a6016c514b70d444a1e334.tar.gz |
Move atlocal code to configure
This test makes atlocal code use configure tests instead. This
is best practice and could make diagnosing autoconf bugs easier.
2009-07-12 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Test for unsupported characters in files and
directories here...
* tests/atlocal.in: ... and not here.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a5fcad0a..d9095289 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,37 @@ fi ]) AC_SUBST([ac_cv_sh_n_works]) +AC_MSG_CHECKING([for characters that cannot appear in file names]) +AC_CACHE_VAL( [ac_cv_unsupported_fs_chars], +[ac_cv_unsupported_fs_chars= +for c in '\\' '"' '<' '>' '*' '?' '|' +do + touch "t${c}t" 2>/dev/null + test -f "t${c}t" && rm -f "t${c}t" && continue + # $c cannot be used in a file name. + ac_cv_unsupported_fs_chars=$ac_cv_unsupported_fs_chars$c +done +]) +if test -n "$ac_cv_unsupported_fs_chars"; then + AC_MSG_RESULT([$ac_cv_unsupported_fs_chars]) +else + AC_MSG_RESULT([none]) +fi + +AC_SUBST([ac_cv_unsupported_fs_chars]) + +AC_CACHE_CHECK([whether directories can have trailing spaces], + [ac_cv_dir_trailing_space], +[rm -rf 'tdir ' && mkdir 'tdir ' && touch 'tdir /tfile' 2>/dev/null +a=$? +rm -rf 'tdir ' +case $a$? in #( + 00) ac_cv_dir_trailing_space=yes ;; #( + *) ac_cv_dir_trailing_space=no ;; +esac +]) +AC_SUBST([ac_cv_dir_trailing_space]) + # Initialize the test suite. AC_CONFIG_TESTDIR([tests]) AC_CONFIG_FILES([tests/Makefile tests/atlocal]) |