diff options
author | Claudio Fontana <sick_soul@users.sourceforge.net> | 2006-07-21 23:40:02 +0000 |
---|---|---|
committer | Claudio Fontana <sick_soul@users.sourceforge.net> | 2006-07-21 23:40:02 +0000 |
commit | 9a72ecd6dc36eab0497dc428d10a6ad1dd87a19a (patch) | |
tree | a528fd617cda36f619bc076429b0995bcda12e2c /m4/double-slash-root.m4 | |
parent | ee29ecd605b329c38ab4c6c6c89d6288693495de (diff) | |
download | idutils-9a72ecd6dc36eab0497dc428d10a6ad1dd87a19a.tar.gz idutils-9a72ecd6dc36eab0497dc428d10a6ad1dd87a19a.tar.bz2 idutils-9a72ecd6dc36eab0497dc428d10a6ad1dd87a19a.zip |
* upgraded gnulib
Diffstat (limited to 'm4/double-slash-root.m4')
-rw-r--r-- | m4/double-slash-root.m4 | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/m4/double-slash-root.m4 b/m4/double-slash-root.m4 new file mode 100644 index 0000000..f8cbd54 --- /dev/null +++ b/m4/double-slash-root.m4 @@ -0,0 +1,43 @@ +#serial 1 -*- autoconf -*- +dnl Copyright (C) 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_DOUBLE_SLASH_ROOT], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CACHE_CHECK([whether // is distinct from /], [ac_cv_double_slash_root], + [ if test x"$cross_compiling" = xyes ; then + # When cross-compiling, there is no way to tell whether // is special + # short of a list of hosts. However, the only known hosts to date + # that have a distinct // are Apollo DomainOS (too old to port to) + # and Cygwin. If anyone knows of another system for which // has + # special semantics and is distinct from /, please report it to + # <bug-coreutils@gnu.org>. + case $host in + *-cygwin) + ac_cv_double_slash_root=yes ;; + *) + # Be optimistic and assume that / and // are the same when we + # don't know. + ac_cv_double_slash_root='unknown, assuming no' ;; + esac + else + set x `ls -di / //` + if test $[2] = $[4]; then + ac_cv_double_slash_root=no + else + ac_cv_double_slash_root=yes + fi + fi]) + if test x"$ac_cv_double_slash_root" = xyes; then + ac_double_slash_root=1 + else + ac_double_slash_root=0 + fi + + AC_DEFINE_UNQUOTED([DOUBLE_SLASH_IS_DISTINCT_ROOT], + $ac_double_slash_root, + [Define to 1 if // is a file system root distinct from /.]) +]) |