]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: default to --enable-gcc-warnings for git tree
authorEric Blake <eblake@redhat.com>
Thu, 6 Sep 2012 14:20:17 +0000 (08:20 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 6 Sep 2012 16:03:47 +0000 (10:03 -0600)
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

index d087c33b50af845df7ebd9cb8b7f0d600777f98d..e1aa6caf1cd673c6f10f5633939afa623e5199f2 100644 (file)
@@ -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])