2 AC_INIT([apply-default-acl], [0.3.0], [michael@orlitzky.com])
3 AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz])
4 AC_CONFIG_SRCDIR([src/apply-default-acl.c])
5 AC_CONFIG_FILES([Makefile src/Makefile])
11 # Predefined header checks.
12 AC_HEADER_STAT # sys/stat.h
13 AC_HEADER_STDBOOL # stdbool.h
14 AC_HEADER_STDC # stdlib.h string.h (implied: errno.h limits.h stdio.h)
16 # Check for header files not covered by the predefined macros above.
17 AC_CHECK_HEADERS([ fcntl.h getopt.h libgen.h limits.h linux/xattr.h ])
18 AC_CHECK_HEADERS([ sys/acl.h sys/libacl.h sys/types.h unistd.h ])
20 # We need openat() with O_NOFOLLOW from POSIX-2008. Without them, we
21 # can't operate securely; I would rather refuse to be built.
24 AC_MSG_ERROR(missing required openat function))
25 AC_CHECK_DECLS([O_DIRECTORY],
27 [AC_MSG_ERROR(missing required O_DIRECTORY flag in fcntl.h)],
28 [[#include <fcntl.h>]])
29 AC_CHECK_DECLS([O_NOFOLLOW],
31 [AC_MSG_ERROR(missing required O_NOFOLLOW flag in fcntl.h)],
32 [[#include <fcntl.h>]])
33 AC_CHECK_DECLS([O_PATH],
35 [AC_MSG_ERROR(missing required O_PATH flag in fcntl.h)],