5 # Define ST_MTIM_NSEC to be the nanoseconds member of struct stat's st_mtim,
8 AC_DEFUN(AC_STRUCT_ST_MTIM_NSEC,
9 [AC_CACHE_CHECK([for nanoseconds member of struct stat.st_mtim],
10 ac_cv_struct_st_mtim_nsec,
11 [ac_save_CPPFLAGS="$CPPFLAGS"
12 ac_cv_struct_st_mtim_nsec=no
13 # tv_nsec -- the usual case
14 # _tv_nsec -- Solaris 2.6, if
15 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
16 # && !defined __EXTENSIONS__)
17 # st__tim.tv_nsec -- UnixWare 2.1.2
18 for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
19 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
20 AC_TRY_COMPILE([#include <sys/types.h>
21 #include <sys/stat.h>], [struct stat s; s.st_mtim.ST_MTIM_NSEC;],
22 [ac_cv_struct_st_mtim_nsec=$ac_val; break])
24 CPPFLAGS="$ac_save_CPPFLAGS"])
26 if test $ac_cv_struct_st_mtim_nsec != no; then
27 AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec,
28 [Define to be the nanoseconds member of struct stat's st_mtim,