diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 (GMT) |
commit | fe856aa957978504137c1d425815d4ed8a22be40 (patch) | |
tree | a5bb46ce0e64b2056f75700eadbf27aba7c39418 /gl/m4/double-slash-root.m4 | |
parent | 210f39bc84cfbb21cd72dc054e43f13815ee0616 (diff) | |
download | monitoring-plugins-fe856aa957978504137c1d425815d4ed8a22be40.tar.gz |
Sync with gnulib - lots of extraneous code removed in preference to GNU code
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1580 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'gl/m4/double-slash-root.m4')
-rw-r--r-- | gl/m4/double-slash-root.m4 | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4 new file mode 100644 index 0000000..69d60d0 --- /dev/null +++ b/gl/m4/double-slash-root.m4 | |||
@@ -0,0 +1,38 @@ | |||
1 | # double-slash-root.m4 serial 2 -*- 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. | ||
6 | |||
7 | AC_DEFUN([gl_DOUBLE_SLASH_ROOT], | ||
8 | [ | ||
9 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
10 | AC_CACHE_CHECK([whether // is distinct from /], [gl_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 | # Cygwin, and z/OS. If anyone knows of another system for which // has | ||
16 | # special semantics and is distinct from /, please report it to | ||
17 | # <bug-gnulib@gnu.org>. | ||
18 | case $host in | ||
19 | *-cygwin | i370-ibm-openedition) | ||
20 | gl_cv_double_slash_root=yes ;; | ||
21 | *) | ||
22 | # Be optimistic and assume that / and // are the same when we | ||
23 | # don't know. | ||
24 | gl_cv_double_slash_root='unknown, assuming no' ;; | ||
25 | esac | ||
26 | else | ||
27 | set x `ls -di / //` | ||
28 | if test $[2] = $[4] && wc //dev/null >/dev/null 2>&1; then | ||
29 | gl_cv_double_slash_root=no | ||
30 | else | ||
31 | gl_cv_double_slash_root=yes | ||
32 | fi | ||
33 | fi]) | ||
34 | if test "$gl_cv_double_slash_root" = yes; then | ||
35 | AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], 1, | ||
36 | [Define to 1 if // is a file system root distinct from /.]) | ||
37 | fi | ||
38 | ]) | ||