sys_file_h.m4 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Configure a replacement for <sys/file.h>.
  2. # serial 6
  3. # Copyright (C) 2008-2017 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.
  7. # Written by Richard W.M. Jones.
  8. AC_DEFUN([gl_HEADER_SYS_FILE_H],
  9. [
  10. AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS])
  11. dnl <sys/file.h> is always overridden, because of GNULIB_POSIXCHECK.
  12. gl_CHECK_NEXT_HEADERS([sys/file.h])
  13. if test $ac_cv_header_sys_file_h = yes; then
  14. HAVE_SYS_FILE_H=1
  15. else
  16. HAVE_SYS_FILE_H=0
  17. fi
  18. AC_SUBST([HAVE_SYS_FILE_H])
  19. dnl Check for declarations of anything we want to poison if the
  20. dnl corresponding gnulib module is not in use.
  21. gl_WARN_ON_USE_PREPARE([[#include <sys/file.h>
  22. ]], [flock])
  23. ])
  24. AC_DEFUN([gl_HEADER_SYS_FILE_MODULE_INDICATOR],
  25. [
  26. AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS])
  27. gl_MODULE_INDICATOR_SET_VARIABLE([$1])
  28. ])
  29. AC_DEFUN([gl_HEADER_SYS_FILE_H_DEFAULTS],
  30. [
  31. GNULIB_FLOCK=0; AC_SUBST([GNULIB_FLOCK])
  32. HAVE_FLOCK=1; AC_SUBST([HAVE_FLOCK])
  33. ])