3 dnl Shamelessly cloned from acspecific.m4's AC_FUNC_UTIME_NULL,
4 dnl then do case-insensitive s/utime/utimes/.
6 AC_DEFUN(jm_FUNC_UTIMES_NULL,
7 [AC_CACHE_CHECK(whether utimes accepts a null argument, ac_cv_func_utimes_null,
8 [rm -f conftest.data; > conftest.data
10 /* In case stat has been defined to rpl_stat, undef it here. */
12 #include <sys/types.h>
16 exit(!(stat ("conftest.data", &s) == 0
17 && utimes("conftest.data", (long *)0) == 0
18 && stat("conftest.data", &t) == 0
19 && t.st_mtime >= s.st_mtime
20 && t.st_mtime - s.st_mtime < 120));
22 ac_cv_func_utimes_null=yes,
23 ac_cv_func_utimes_null=no,
24 ac_cv_func_utimes_null=no)
25 rm -f core core.* *.core])
27 if test $ac_cv_func_utimes_null = yes; then
28 AC_DEFINE_UNQUOTED(HAVE_UTIMES_NULL, 1,
29 [Define if utimes accepts a null argument])