[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-idutils] enable --enable-gcc-warnings by default in a from-clone bu
From: |
Jim Meyering |
Subject: |
[bug-idutils] enable --enable-gcc-warnings by default in a from-clone build |
Date: |
Tue, 23 Oct 2012 14:58:58 +0200 |
Eric did this in libvirt, and I liked it, so also in coreutils.
Finally, I'm updating all other C projects I tend to do the same thing:
>From a6211c988649214a6cfaa10ba13d77b8e65a8fff Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 23 Oct 2012 11:08:51 +0200
Subject: [PATCH] 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.
---
configure.ac | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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
--
1.8.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-idutils] enable --enable-gcc-warnings by default in a from-clone build,
Jim Meyering <=