]> gitweb.michael.orlitzky.com - apply-default-acl.git/blob - configure.ac
configure.ac: fix header name sys/libacl.h -> acl/libacl.h.
[apply-default-acl.git] / configure.ac
1 AC_PREREQ([2.68])
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])
6
7 # Checks for programs.
8 AC_PROG_CC
9 AM_PROG_AR
10
11 # Predefined header checks.
12 AC_HEADER_DIRENT # dirent.h
13 AC_HEADER_STAT # sys/stat.h
14 AC_HEADER_STDBOOL # stdbool.h
15 AC_HEADER_STDC # stdlib.h string.h (implied: errno.h limits.h stdio.h)
16
17 # Check for header files not covered by the predefined macros above.
18 AC_CHECK_HEADERS([ acl/libacl.h fcntl.h getopt.h libgen.h limits.h ])
19 AC_CHECK_HEADERS([ linux/xattr.h sys/acl.h unistd.h ])
20
21 # We need openat() with O_NOFOLLOW from POSIX-2008. Without them, we
22 # can't operate securely; I would rather refuse to be built.
23 AC_CHECK_FUNC(openat,
24 [],
25 AC_MSG_ERROR(missing required openat function))
26 AC_CHECK_DECLS([O_DIRECTORY],
27 [],
28 [AC_MSG_ERROR(missing required O_DIRECTORY flag in fcntl.h)],
29 [[#include <fcntl.h>]])
30 AC_CHECK_DECLS([O_NOFOLLOW],
31 [],
32 [AC_MSG_ERROR(missing required O_NOFOLLOW flag in fcntl.h)],
33 [[#include <fcntl.h>]])
34 AC_CHECK_DECLS([O_PATH],
35 [],
36 [AC_MSG_ERROR(missing required O_PATH flag in fcntl.h)],
37 [[#define _GNU_SOURCE
38 #include <fcntl.h>]])
39
40 LT_INIT
41 AC_OUTPUT