summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2012-10-23 11:08:51 +0200
committerJim Meyering <jim@meyering.net>2012-10-23 16:13:40 +0200
commit5065f95db429ababfaac10f5cd32f3906bd54329 (patch)
tree7fd4b7fb1066d1227974c240001c2793cc7ca1f8
parent36a93b370040444d6d2240100404490064b6fa00 (diff)
downloadidutils-5065f95db429ababfaac10f5cd32f3906bd54329.tar.gz
idutils-5065f95db429ababfaac10f5cd32f3906bd54329.tar.bz2
idutils-5065f95db429ababfaac10f5cd32f3906bd54329.zip
build: default to --enable-gcc-warnings in a git tree
Anyone building from cloned sources 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 default can still be overridden with --disable-gcc-warnings. * configure.ac (gl_gcc_warnings): Set default based on environment.
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4716744..b80a85d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,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]
)
if test "$gl_gcc_warnings" = yes; then