2 AC_INIT([pjdfstest],[0.1],)
5 AC_CONFIG_HEADERS([config.h])
14 # For _GNU_SOURCE on Linux, etc.
15 AC_USE_SYSTEM_EXTENSIONS
23 AC_CHECK_FUNC([bindat],
24 [AC_DEFINE([HAVE_BINDAT], [1], [Define if bindat exists])])
25 AC_CHECK_FUNC([chflags],
26 [AC_DEFINE([HAVE_CHFLAGS], [1], [Define if chflags exists])])
27 AC_CHECK_FUNC([chflagsat],
28 [AC_DEFINE([HAVE_CHFLAGSAT], [1], [Define if chflagsat exists])])
29 AC_CHECK_FUNC([connectat],
30 [AC_DEFINE([HAVE_CONNECTAT], [1], [Define if connectat exists])])
31 AC_CHECK_FUNC([faccessat],
32 [AC_DEFINE([HAVE_FACCESSAT], [1], [Define if faccessat exists])])
33 AC_CHECK_FUNC([fchflags],
34 [AC_DEFINE([HAVE_FCHFLAGS], [1], [Define if fchflags exists])])
35 AC_CHECK_FUNC([fchmodat],
36 [AC_DEFINE([HAVE_FCHMODAT], [1], [Define if fchmodat exists])])
37 AC_CHECK_FUNC([fchownat],
38 [AC_DEFINE([HAVE_FCHOWNAT], [1], [Define if fchownat exists])])
39 AC_CHECK_FUNC([fstatat],
40 [AC_DEFINE([HAVE_FSTATAT], [1], [Define if fstatat exists])])
41 AC_CHECK_FUNC([lchflags],
42 [AC_DEFINE([HAVE_LCHFLAGS], [1], [Define if lchflags exists])])
43 AC_CHECK_FUNC([lchmod],
44 [AC_DEFINE([HAVE_LCHMOD], [1], [Define if lchmod exists])])
45 AC_CHECK_FUNC([linkat],
46 [AC_DEFINE([HAVE_LINKAT], [1], [Define if linkat exists])])
47 AC_CHECK_FUNC([lpathconf],
48 [AC_DEFINE([HAVE_LPATHCONF], [1], [Define if lpathconf exists])])
49 AC_CHECK_FUNC([mkdirat],
50 [AC_DEFINE([HAVE_MKDIRAT], [1], [Define if mkdirat exists])])
51 AC_CHECK_FUNC([mkfifoat],
52 [AC_DEFINE([HAVE_MKFIFOAT], [1], [Define if mkfifoat exists])])
53 AC_CHECK_FUNC([mknodat],
54 [AC_DEFINE([HAVE_MKNODAT], [1], [Define if mknodat exists])])
55 AC_CHECK_FUNC([openat],
56 [AC_DEFINE([HAVE_OPENAT], [1], [Define if openat exists])])
57 AC_CHECK_FUNC([posix_fallocate],
58 [AC_DEFINE([HAVE_POSIX_FALLOCATE], [1], [Define if posix_fallocate exists])])
59 AC_CHECK_FUNC([readlinkat],
60 [AC_DEFINE([HAVE_READLINKAT], [1], [Define if readlinkat exists])])
61 AC_CHECK_FUNC([renameat],
62 [AC_DEFINE([HAVE_RENAMEAT], [1], [Define if renameat exists])])
63 AC_CHECK_FUNC([symlinkat],
64 [AC_DEFINE([HAVE_SYMLINKAT], [1], [Define if symlinkat exists])])
65 AC_CHECK_FUNC([utimensat],
66 [AC_DEFINE([HAVE_UTIMENSAT], [1], [Define if utimensat exists])])
69 AC_CHECK_HEADER([sys/acl.h], [has_sys_acl_h=yes], [has_sys_acl_h=no])
71 if test x$has_sys_acl_h = xyes; then
72 AC_DEFINE([HAVE_SYS_ACL_H], [1],
73 [Define to 1 if sys/acl.h is available])
74 AC_CHECK_FUNCS([acl_create_entry_np acl_from_text acl_get_entry acl_get_file acl_set_file],
75 [has_acl_funcs=yes],[])
77 if test x$has_acl_funcs = xyes; then
78 # Check for NFSv4 ACL support.
79 AC_CHECK_DECL([ACL_TYPE_NFS4],
80 [has_nfsv4_acl_support=yes], [has_nfsv4_acl_support=no],[[#include <sys/acl.h>]])
81 if test x$has_nfsv4_acl_support = xyes; then
82 AC_DEFINE([HAS_NFSV4_ACL_SUPPORT], [1],
83 [Define to 1 if NFSv4 ACL support is available])
87 AC_CHECK_MEMBERS([struct stat.st_atim, struct stat.st_atimespec], [], [], [[
88 #include <sys/types.h>
92 AC_CHECK_MEMBERS([struct stat.st_birthtim, struct stat.st_birthtime, struct stat.st_birthtimespec], [], [], [[
93 #include <sys/types.h>
97 AC_CHECK_MEMBERS([struct stat.st_ctim, struct stat.st_ctimespec], [], [], [[
98 #include <sys/types.h>
102 AC_CHECK_MEMBERS([struct stat.st_mtim, struct stat.st_mtimespec], [], [], [[
103 #include <sys/types.h>
104 #include <sys/stat.h>