diff options
author | Eric Blake <eblake@redhat.com> | 2012-10-23 11:06:11 +0200 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2012-10-23 16:15:53 +0200 |
commit | aa90739c85fcbb88da54b489273246e05f3ea8c9 (patch) | |
tree | 428cd195d61cdac78e4b868b7a281091bd285b42 /configure.ac | |
parent | 60b3f4eb672a85de28ecaad47ed426f8c8fe6c32 (diff) | |
download | gzip-aa90739c85fcbb88da54b489273246e05f3ea8c9.tar.gz |
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index ecb362b..64112da 100644 --- a/configure.ac +++ b/configure.ac @@ -51,7 +51,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 |