annotate m4/double-slash-root.m4 @ 40203:30d91797009f

autoupdate
author Karl Berry <karl@freefriends.org>
date Fri, 01 Mar 2019 08:42:42 -0800
parents b06060465f09
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9873
diff changeset
1 # double-slash-root.m4 serial 4 -*- Autoconf -*-
40057
b06060465f09 maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents: 19484
diff changeset
2 dnl Copyright (C) 2006, 2008-2019 Free Software Foundation, Inc.
6912
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
6
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
7 AC_DEFUN([gl_DOUBLE_SLASH_ROOT],
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
8 [
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
9 AC_REQUIRE([AC_CANONICAL_HOST])
7727
9711a2d74170 * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
Paul Eggert <eggert@cs.ucla.edu>
parents: 6912
diff changeset
10 AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root],
6912
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
11 [ if test x"$cross_compiling" = xyes ; then
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
12 # When cross-compiling, there is no way to tell whether // is special
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
13 # short of a list of hosts. However, the only known hosts to date
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
14 # that have a distinct // are Apollo DomainOS (too old to port to),
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
15 # Cygwin, and z/OS. If anyone knows of another system for which // has
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
16 # special semantics and is distinct from /, please report it to
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
17 # <bug-gnulib@gnu.org>.
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
18 case $host in
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
19 *-cygwin | i370-ibm-openedition)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
20 gl_cv_double_slash_root=yes ;;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
21 *)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
22 # Be optimistic and assume that / and // are the same when we
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
23 # don't know.
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
24 gl_cv_double_slash_root='unknown, assuming no' ;;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
25 esac
6912
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
26 else
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
27 set x `ls -di / // 2>/dev/null`
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
28 if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
29 gl_cv_double_slash_root=no
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
30 else
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
31 gl_cv_double_slash_root=yes
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
32 fi
6912
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
33 fi])
7727
9711a2d74170 * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
Paul Eggert <eggert@cs.ucla.edu>
parents: 6912
diff changeset
34 if test "$gl_cv_double_slash_root" = yes; then
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9873
diff changeset
35 AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1],
7727
9711a2d74170 * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
Paul Eggert <eggert@cs.ucla.edu>
parents: 6912
diff changeset
36 [Define to 1 if // is a file system root distinct from /.])
6912
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
37 fi
314715e0260d Merge from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
38 ])