2 dnl Copyright (C) 2017-2020 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
11 AC_REQUIRE([AC_CANONICAL_HOST])
12 AC_REQUIRE([gl_UTIME_H_DEFAULTS])
13 m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])
14 AC_CHECK_HEADERS_ONCE([utime.h])
15 gl_CHECK_NEXT_HEADERS([utime.h])
17 if test $ac_cv_header_utime_h = yes; then
22 AC_SUBST([HAVE_UTIME_H])
24 dnl Check for declarations of anything we want to poison if the
25 dnl corresponding gnulib module is not in use.
26 gl_WARN_ON_USE_PREPARE([[#include <utime.h>
31 AC_DEFUN([gl_UTIME_MODULE_INDICATOR],
33 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
34 AC_REQUIRE([gl_UTIME_H_DEFAULTS])
35 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
36 dnl Define it also as a C macro, for the benefit of the unit tests.
37 gl_MODULE_INDICATOR_FOR_TESTS([$1])
40 AC_DEFUN([gl_UTIME_H_DEFAULTS],
42 GNULIB_UTIME=0; AC_SUBST([GNULIB_UTIME])
43 dnl Assume POSIX behavior unless another module says otherwise.
44 HAVE_UTIME=1; AC_SUBST([HAVE_UTIME])
45 REPLACE_UTIME=0; AC_SUBST([REPLACE_UTIME])