Use Gnulib's `stat-time' module; update Gnulib.
[bpt/guile.git] / m4 / sys_file_h.m4
CommitLineData
f240aacb 1# Configure a replacement for <sys/file.h>.
a927b6c1 2# serial 5
f240aacb 3
f4c79b3c 4# Copyright (C) 2008-2010 Free Software Foundation, Inc.
f240aacb
LC
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# Written by Richard W.M. Jones.
10
11AC_DEFUN([gl_HEADER_SYS_FILE_H],
12[
13 AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS])
14
f4c79b3c 15 dnl <sys/file.h> is always overridden, because of GNULIB_POSIXCHECK.
f240aacb 16 gl_CHECK_NEXT_HEADERS([sys/file.h])
f240aacb
LC
17
18 AC_CHECK_HEADERS_ONCE([sys/file.h])
19 if test $ac_cv_header_sys_file_h = yes; then
20 HAVE_SYS_FILE_H=1
21 else
22 HAVE_SYS_FILE_H=0
23 fi
24 AC_SUBST([HAVE_SYS_FILE_H])
61cd9dc9
LC
25
26 dnl Check for declarations of anything we want to poison if the
27 dnl corresponding gnulib module is not in use.
28 gl_WARN_ON_USE_PREPARE([[#include <sys/file.h>
29 ]], [flock])
f240aacb
LC
30])
31
32AC_DEFUN([gl_HEADER_SYS_FILE_MODULE_INDICATOR],
33[
34 AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS])
a927b6c1 35 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
f240aacb
LC
36])
37
38AC_DEFUN([gl_HEADER_SYS_FILE_H_DEFAULTS],
39[
40 GNULIB_FLOCK=0; AC_SUBST([GNULIB_FLOCK])
41 HAVE_FLOCK=1; AC_SUBST([HAVE_FLOCK])
42])