]> gitweb.michael.orlitzky.com - apply-default-acl.git/blobdiff - configure.ac
configure.ac: "autoupdate" to autoconf-2.71.
[apply-default-acl.git] / configure.ac
index 2bc57ebbee36858c8dba44dbd098ca18733334ed..5704fdd4b7c168b87f0a409deb38648c0c1e8711 100644 (file)
@@ -1,22 +1,37 @@
-AC_PREREQ([2.68])
-AC_INIT([apply-default-acl], [0.2.0], [michael@orlitzky.com])
-AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz])
+AC_PREREQ([2.71])
+AC_INIT([apply-default-acl],[0.4.4],[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 src/libadacl.pc])
 AC_CONFIG_SRCDIR([src/apply-default-acl.c])
-AC_CONFIG_FILES([Makefile src/Makefile])
+AC_CONFIG_MACRO_DIRS([m4])
+
+# Not used, but keeps the build log clean.
+AC_CONFIG_HEADERS([config.h])
+
+# Adds --with-pkgconfigdir to the ./configure script and defines
+# the @pkgconfigdir@ variable to be used elsewhere.
+PKG_INSTALLDIR
 
 # 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_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 limits.h linux/xattr.h ])
-AC_CHECK_HEADERS([ sys/acl.h sys/libacl.h sys/types.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.
@@ -37,5 +52,11 @@ AC_CHECK_DECLS([O_PATH],
                [[#define _GNU_SOURCE
                 #include <fcntl.h>]])
 
-LT_INIT
+# 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([disable-static])
 AC_OUTPUT