summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-01-24 11:07:51 -0700
committerEric Blake <eblake@redhat.com>2012-03-20 13:33:04 -0600
commit89bf03c9a1b11b75d7c9e44593493017bf8a3b99 (patch)
tree80fd75ebc78d1dc5ffe15e9f80f020e9a4902b40
parent56673dbe8af479419f4df56fc8b883fb08012604 (diff)
downloadcoreutils-89bf03c9a1b11b75d7c9e44593493017bf8a3b99.tar.gz
build: speed up configure for releases
Since most users won't be building with GNULIB_POSIXCHECK defined in CFLAGS, and since we can make ./configure 10% (several seconds!) faster by omitting the framework for a posix check, this patch makes it so that the framework is omitted by default, while still giving instructions for maintainers to re-enable it. It's been a while since we've used GNULIB_POSIXCHECK; see this email: https://lists.gnu.org/archive/html/coreutils/2012-03/msg00126.html Some of those failures are because we are intentionally avoiding specific gnulib modules (that is, we have chosen not to use things like fprintf-posix), but until we work with gnulib to avoid particular warnings, wiring up an automatic GNULIB_POSIXCHECK to happen during 'make my-distcheck' is not feasible. * configure.ac (gl_ASSERT_NO_GNULIB_POSIXCHECK): Conditionally define, according to whether $GNULIB_POSIXCHECK is in environment.
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 07597e68b..5a4860e7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,20 @@ AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
AM_INIT_AUTOMAKE([1.11.1 no-dist-gzip dist-xz color-tests parallel-tests])
AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
+dnl POSIXCHECK is worthwhile for maintainers, but adds several seconds
+dnl (more than 10% execution time) to ./configure, with no benefit for
+dnl most users. Using it to look for bugs requires:
+dnl GNULIB_POSIXCHECK=1 autoreconf -f
+dnl ./configure
+dnl make
+dnl make -C src clean
+dnl make CFLAGS=-DGNULIB_POSIXCHECK=1
+dnl FIXME: Once we figure out how to avoid false positives, we should
+dnl have 'make my-distcheck' in dist-check.mk exercise this.
+m4_syscmd([test "${GNULIB_POSIXCHECK+set}" = set])
+m4_if(m4_sysval, [0], [], [dnl
+gl_ASSERT_NO_GNULIB_POSIXCHECK])
+
AC_PROG_CC_STDC
AM_PROG_CC_C_O
AC_PROG_CPP