From 47fd706a7540e7ae3d19c625d90c28b88a8a640c Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 6 Sep 2012 08:20:17 -0600 Subject: [PATCH] build: default to --enable-gcc-warnings for git tree Anyone developing on coreutils can be assumed to have a new enough environment, such that enabling gcc warnings by default will be useful. Tarballs still default to no warnings, and the defaults can still be overridden with --disable-gcc-warnings. * configure.ac (gl_gcc_warnings): Set default based on environment. Suggested by Bernhard Voelker. --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d087c33b50..e1aa6caf1c 100644 --- a/configure.ac +++ b/configure.ac @@ -75,7 +75,11 @@ AC_ARG_ENABLE([gcc-warnings], *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;; esac gl_gcc_warnings=$enableval], - [gl_gcc_warnings=no] + [if test -d "$srcdir"/.git; then + gl_gcc_warnings=yes + else + gl_gcc_warnings=no + fi] ) # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found]) -- 2.47.2