1 #serial 1 -*- autoconf -*-
2 dnl Copyright (C) 2006 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_DOUBLE_SLASH_ROOT],
9 AC_REQUIRE([AC_CANONICAL_HOST])
10 AC_CACHE_CHECK([whether // is distinct from /], [ac_cv_double_slash_root],
11 [ if test x"$cross_compiling" = xyes ; then
12 # When cross-compiling, there is no way to tell whether // is special
13 # short of a list of hosts. However, the only known hosts to date
14 # that have a distinct // are Apollo DomainOS (too old to port to)
15 # and Cygwin. If anyone knows of another system for which // has
16 # special semantics and is distinct from /, please report it to
17 # <bug-coreutils@gnu.org>.
20 ac_cv_double_slash_root=yes ;;
22 # Be optimistic and assume that / and // are the same when we
24 ac_cv_double_slash_root='unknown, assuming no' ;;
28 if test $[2] = $[4]; then
29 ac_cv_double_slash_root=no
31 ac_cv_double_slash_root=yes
34 if test x"$ac_cv_double_slash_root" = xyes; then
35 ac_double_slash_root=1
37 ac_double_slash_root=0
40 AC_DEFINE_UNQUOTED([DOUBLE_SLASH_IS_DISTINCT_ROOT],
41 $ac_double_slash_root,
42 [Define to 1 if // is a file system root distinct from /.])