Eric Blake wrote: > On 09/06/2012 01:11 AM, Bernhard Voelker wrote: >> On September 6, 2012 at 8:39 AM Jim Meyering <[email protected]> wrote: >> >>> Bernhard Voelker wrote: >>>> What about making --enable-gcc-warnings the default >>>> for CU developers, i.e. when .git exists? >>> >>> Good idea. >>> If someone has gone to the trouble of building from cloned sources >>> they're probably also using modern enough tools. >>> >>> Do you feel like writing the patch? >> >> I'm not so familiar with coreutils' build system (you can >> guess from my recent mails when building failed in the last >> few days ...), so I'd be happy if someone else jumps in. >> I'll be busy with replacing a dying hard disk this weekend >> anyway ;-( >> >> A new --disable-gcc-warnings (or --disable-dev-warnings) >> would also be nice then ... > > By virtue of the fact that you have --enable-gcc-warnings via autoconf, > you already automatically have --disable-gcc-warnings. > > This patch should do it (although I didn't really stress-test it, but > just whipped something up for the purposes of a fast reply). If you > like it, I'll turn it into a formal patch before committing.
Looks right. Thanks! > diff --git i/configure.ac w/configure.ac > index d087c33..e1aa6ca 100644 > --- i/configure.ac > +++ w/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])
