1 # Configure a replacement for <sys/file.h>.
3 # Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
8 # Written by Richard W.M. Jones.
12 AC_DEFUN([gl_HEADER_SYS_FILE_H],
14 AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS])
16 dnl Only flock is defined in a working <sys/file.h>. If that
17 dnl function is already there, we don't want to do any substitution.
18 AC_CHECK_FUNCS_ONCE([flock])
20 gl_CHECK_NEXT_HEADERS([sys/file.h])
22 AC_CHECK_HEADERS_ONCE([sys/file.h])
23 if test $ac_cv_header_sys_file_h = yes; then
28 AC_SUBST([HAVE_SYS_FILE_H])
31 AC_DEFUN([gl_HEADER_SYS_FILE_MODULE_INDICATOR],
33 AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS])
34 GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
37 AC_DEFUN([gl_HEADER_SYS_FILE_H_DEFAULTS],
39 GNULIB_FLOCK=0; AC_SUBST([GNULIB_FLOCK])
40 HAVE_FLOCK=1; AC_SUBST([HAVE_FLOCK])