X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fdouble-slash-root.m4;h=69d60d011e48e43a9858839e7161b3a9cb084c43;hb=97f93a774721a888aa56466930c662c41784f526;hp=f8cbd54f30d921beed8a3dd425741cdeeb34a040;hpb=79c0a43808d9ca85acd04600149fc1a9b75bd1b9;p=gnulib.git diff --git a/m4/double-slash-root.m4 b/m4/double-slash-root.m4 index f8cbd54f3..69d60d011 100644 --- a/m4/double-slash-root.m4 +++ b/m4/double-slash-root.m4 @@ -1,4 +1,4 @@ -#serial 1 -*- autoconf -*- +# double-slash-root.m4 serial 2 -*- 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, @@ -7,37 +7,32 @@ 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], + AC_CACHE_CHECK([whether // is distinct from /], [gl_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 + # that have a distinct // are Apollo DomainOS (too old to port to), + # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to - # . + # . case $host in - *-cygwin) - ac_cv_double_slash_root=yes ;; + *-cygwin | i370-ibm-openedition) + gl_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' ;; + gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / //` - if test $[2] = $[4]; then - ac_cv_double_slash_root=no + if test $[2] = $[4] && wc //dev/null >/dev/null 2>&1; then + gl_cv_double_slash_root=no else - ac_cv_double_slash_root=yes + gl_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 + if test "$gl_cv_double_slash_root" = yes; then + AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], 1, + [Define to 1 if // is a file system root distinct from /.]) fi - - AC_DEFINE_UNQUOTED([DOUBLE_SLASH_IS_DISTINCT_ROOT], - $ac_double_slash_root, - [Define to 1 if // is a file system root distinct from /.]) ])