5 dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
6 dnl usually in <utime.h>.
7 dnl Some systems have utime.h but don't declare the struct anywhere.
9 AC_DEFUN(jm_STRUCT_UTIMBUF,
11 AC_CHECK_HEADERS(utime.h)
12 AC_REQUIRE([AC_HEADER_TIME])
13 AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
16 #ifdef TIME_WITH_SYS_TIME
17 # include <sys/time.h>
20 # ifdef HAVE_SYS_TIME_H
21 # include <sys/time.h>
30 [static struct utimbuf x; x.actime = x.modtime;],
31 fu_cv_sys_struct_utimbuf=yes,
32 fu_cv_sys_struct_utimbuf=no)
35 if test $fu_cv_sys_struct_utimbuf = yes; then
37 # This code is deliberately never run via ./configure.
38 # FIXME: this is a hack to make autoheader put the corresponding
39 # HAVE_* undef for this symbol in config.h.in. This saves me the
40 # trouble of having to maintain the #undef in acconfig.h manually.
41 AC_CHECK_FUNCS(STRUCT_UTIMBUF)
43 # Defining it this way (rather than via AC_DEFINE) short-circuits the
44 # autoheader check -- autoheader doesn't know it's already been taken
45 # care of by the hack above.
46 ac_kludge=HAVE_STRUCT_UTIMBUF
47 AC_DEFINE_UNQUOTED($ac_kludge)