X-Git-Url: https://gitweb.michael.orlitzky.com/?p=apply-default-acl.git;a=blobdiff_plain;f=configure.ac;h=6de8a998cdcbe589016ed84ad265ab0b8ab696cf;hp=cf5ccce074bc7d9936388ed0457c4a06a6b1669a;hb=74c97a249290c9e33e6f06a27f5c99fb5bce36d4;hpb=b1f9447809f7c7b35f6f8f24b33b1cd2be2e30fc diff --git a/configure.ac b/configure.ac index cf5ccce..6de8a99 100644 --- a/configure.ac +++ b/configure.ac @@ -1,21 +1,31 @@ AC_PREREQ([2.68]) -AC_INIT([apply-default-acl], [0.3.0], [michael@orlitzky.com]) -AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz]) -AC_CONFIG_SRCDIR([src/apply-default-acl.c]) +AC_INIT([apply-default-acl], [0.4.2], [michael@orlitzky.com]) +# Store build artifacts in this directory to keep the house clean. +AC_CONFIG_AUX_DIR([build-aux]) +AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz tar-ustar]) AC_CONFIG_FILES([Makefile src/Makefile]) +AC_CONFIG_SRCDIR([src/apply-default-acl.c]) +AC_CONFIG_MACRO_DIRS([m4]) # Checks for programs. AC_PROG_CC AM_PROG_AR # Predefined header checks. +AC_HEADER_DIRENT # dirent.h AC_HEADER_STAT # sys/stat.h AC_HEADER_STDBOOL # stdbool.h -AC_HEADER_STDC # stdlib.h string.h (implied: errno.h limits.h stdio.h) +AC_HEADER_STDC # stdlib.h string.h (implied: errno.h stdio.h) # Check for header files not covered by the predefined macros above. -AC_CHECK_HEADERS([ fcntl.h getopt.h libgen.h limits.h linux/xattr.h ]) -AC_CHECK_HEADERS([ sys/acl.h sys/libacl.h unistd.h ]) +AC_HEADER_REQUIRE(acl/libacl.h) +AC_HEADER_REQUIRE(fcntl.h) +AC_HEADER_REQUIRE(getopt.h) +AC_HEADER_REQUIRE(libgen.h) +AC_HEADER_REQUIRE(limits.h) +AC_HEADER_REQUIRE(linux/xattr.h) +AC_HEADER_REQUIRE(sys/acl.h) +AC_HEADER_REQUIRE(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. @@ -36,5 +46,11 @@ AC_CHECK_DECLS([O_PATH], [[#define _GNU_SOURCE #include ]]) +# And check for the GNU/BSD extension asprintf(), which lets us avoid +# praying to the PATH_MAX gods while constructing long paths. +AC_CHECK_FUNC(asprintf, + [], + AC_MSG_ERROR(missing required asprintf function)) + LT_INIT AC_OUTPUT