2N/A# double-slash-root.m4 serial 4 -*- Autoconf -*-
2N/Adnl Copyright (C) 2006, 2008-2010 Free Software Foundation, Inc.
2N/Adnl This file is free software; the Free Software Foundation
2N/Adnl gives unlimited permission to copy and/or distribute it,
2N/Adnl with or without modifications, as long as this notice is preserved.
2N/A
2N/AAC_DEFUN([gl_DOUBLE_SLASH_ROOT],
2N/A[
2N/A AC_REQUIRE([AC_CANONICAL_HOST])
2N/A AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root],
2N/A [ if test x"$cross_compiling" = xyes ; then
2N/A # When cross-compiling, there is no way to tell whether // is special
2N/A # short of a list of hosts. However, the only known hosts to date
2N/A # that have a distinct // are Apollo DomainOS (too old to port to),
2N/A # Cygwin, and z/OS. If anyone knows of another system for which // has
2N/A # special semantics and is distinct from /, please report it to
2N/A # <bug-gnulib@gnu.org>.
2N/A case $host in
2N/A *-cygwin | i370-ibm-openedition)
2N/A gl_cv_double_slash_root=yes ;;
2N/A *)
2N/A # Be optimistic and assume that / and // are the same when we
2N/A # don't know.
2N/A gl_cv_double_slash_root='unknown, assuming no' ;;
2N/A esac
2N/A else
2N/A set x `ls -di / // 2>/dev/null`
2N/A if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then
2N/A gl_cv_double_slash_root=no
2N/A else
2N/A gl_cv_double_slash_root=yes
2N/A fi
2N/A fi])
2N/A if test "$gl_cv_double_slash_root" = yes; then
2N/A AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1],
2N/A [Define to 1 if // is a file system root distinct from /.])
2N/A fi
2N/A])