Use an all-permissive copyright notice, recommended by RMS.
[gnulib.git] / m4 / st_mtim.m4
1 #serial 7
2
3 # Copyright (C) 1998, 1999, 2001, 2003 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
8 dnl From Paul Eggert.
9
10 # Define ST_MTIM_NSEC to be the nanoseconds member of struct stat's st_mtim,
11 # if it exists.
12
13 AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC],
14  [AC_CACHE_CHECK([for nanoseconds member of struct stat.st_mtim],
15    ac_cv_struct_st_mtim_nsec,
16    [ac_save_CPPFLAGS="$CPPFLAGS"
17     ac_cv_struct_st_mtim_nsec=no
18     # tv_nsec -- the usual case
19     # _tv_nsec -- Solaris 2.6, if
20     #   (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
21     #    && !defined __EXTENSIONS__)
22     # st__tim.tv_nsec -- UnixWare 2.1.2
23     for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
24       CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
25       AC_TRY_COMPILE([#include <sys/types.h>
26 #include <sys/stat.h>], [struct stat s; s.st_mtim.ST_MTIM_NSEC;],
27         [ac_cv_struct_st_mtim_nsec=$ac_val; break])
28     done
29     CPPFLAGS="$ac_save_CPPFLAGS"])
30
31   if test $ac_cv_struct_st_mtim_nsec != no; then
32     AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec,
33       [Define to be the nanoseconds member of struct stat's st_mtim,
34        if it exists.])
35   fi
36  ]
37 )