X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fmkfifo.m4;h=e571c64e2563cea7ab778f56878b9b359a97f548;hb=23eecb48e39afd0d267d64d40ba6bf97aa865e13;hp=cfa2f738bad4cef386118a4cb8f6104e4e37e0f6;hpb=8d60eb692fc98ca8efddc081dd509c9b0eac982b;p=gnulib.git diff --git a/m4/mkfifo.m4 b/m4/mkfifo.m4 index cfa2f738b..e571c64e2 100644 --- a/m4/mkfifo.m4 +++ b/m4/mkfifo.m4 @@ -1,7 +1,7 @@ -# serial 3 +# serial 4 # See if we need to provide mkfifo replacement. -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,6 +11,7 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MKFIFO], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS_ONCE([mkfifo]) if test $ac_cv_func_mkfifo = no; then HAVE_MKFIFO=0 @@ -37,12 +38,21 @@ AC_DEFUN([gl_FUNC_MKFIFO], return result; ]])], [gl_cv_func_mkfifo_works=yes], [gl_cv_func_mkfifo_works=no], - [gl_cv_func_mkfifo_works="guessing no"]) + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_mkfifo_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_mkfifo_works="guessing no" ;; + esac + ]) rm -f conftest.tmp conftest.lnk]) - if test "$gl_cv_func_mkfifo_works" != yes; then - AC_DEFINE([MKFIFO_TRAILING_SLASH_BUG], [1], [Define to 1 if mkfifo - does not reject trailing slash]) - REPLACE_MKFIFO=1 - fi + case "$gl_cv_func_mkfifo_works" in + *yes) ;; + *) + AC_DEFINE([MKFIFO_TRAILING_SLASH_BUG], [1], [Define to 1 if mkfifo + does not reject trailing slash]) + REPLACE_MKFIFO=1 + ;; + esac fi ])