X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=m4%2Fmkfifo.m4;h=7d67a2977e2206a7ce7ee3e688575caea7e11b05;hb=3bfdc14c713fb2b9c9ad0c9e9e87e32dee5fd165;hp=4475e2effd011449061cee1561dcc888f9cd69b6;hpb=f3797c1231154dc0bbade50aceaa8639ffd9e3cf;p=debian%2Ftar diff --git a/m4/mkfifo.m4 b/m4/mkfifo.m4 index 4475e2ef..7d67a297 100644 --- a/m4/mkfifo.m4 +++ b/m4/mkfifo.m4 @@ -1,7 +1,7 @@ -# serial 2 +# serial 4 # See if we need to provide mkfifo replacement. -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2015 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,10 +11,10 @@ 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 - AC_LIBOBJ([mkfifo]) else dnl Check for Solaris 9 and FreeBSD bug with trailing slash. AC_CHECK_FUNCS_ONCE([lstat]) @@ -38,13 +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 - AC_LIBOBJ([mkfifo]) - 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 ])