]> gitweb.michael.orlitzky.com - apply-default-acl.git/blobdiff - configure.ac
libadacl.c: use O_PATH in safe_open() for added safety.
[apply-default-acl.git] / configure.ac
index 4f4f2da7161199ee4d851a7ee4bcef7bac92b21d..c9abffe2ddf21acb9769e734e58d80ba3bee6a3e 100644 (file)
@@ -1,14 +1,12 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
 AC_PREREQ([2.68])
-AC_INIT([apply-default-acl], [0.0.5], [michael@orlitzky.com])
-AM_INIT_AUTOMAKE
+AC_INIT([apply-default-acl], [0.1.3], [michael@orlitzky.com])
+AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz])
 AC_CONFIG_SRCDIR([src/apply-default-acl.c])
 AC_CONFIG_FILES([Makefile src/Makefile])
 
 # Checks for programs.
 AC_PROG_CC
+AM_PROG_AR
 
 # Predefined header checks.
 AC_HEADER_STAT    # sys/stat.h
@@ -17,7 +15,18 @@ AC_HEADER_STDC    # stdlib.h string.h (implied: errno.h limits.h stdio.h)
 AC_TYPE_MODE_T
 
 # Check for header files not covered by the predefined macros above.
-AC_CHECK_HEADERS([ fcntl.h ftw.h getopt.h libgen.h sys/acl.h sys/libacl.h ])
-AC_CHECK_HEADERS([ sys/types.h unistd.h ])
+AC_CHECK_HEADERS([ fcntl.h ftw.h getopt.h libgen.h limits.h sys/acl.h ])
+AC_CHECK_HEADERS([ sys/libacl.h sys/types.h unistd.h ])
+
+# We need openat() with O_NOFOLLOW from POSIX-2008. Without them, we
+# can't operate securely; I would rather refuse to be built.
+AC_CHECK_FUNC(openat,
+              [],
+             AC_MSG_ERROR(missing required openat function))
+AC_CHECK_DECLS([O_NOFOLLOW],
+               [],
+              [AC_MSG_ERROR(missing required O_NOFOLLOW flag in fcntl.h)],
+              [[#include <fcntl.h>]])
 
+LT_INIT
 AC_OUTPUT