On 03/21/2012 10:34 PM, Artur R. Czechowski wrote:
> Hello,
> Plase consider simple autoconf.ac script:
> 
> AC_INIT([bugreport], [0.1])
> AC_C_CONST
> 
> After processing it with autoconf there is a differnce between the calls:
> ./configure
> ./configure CFLAGS="-W -Wall -Werror"

Don't do that.  This issue repeatedly comes up on the list, and the
answer is always the same - configuring with CFLAGS=-Werror is wrong,
because there is no way to portably write tests that are guaranteed to
be warning-free across all versions of all compilers.

If you _must_ use -Werror when building your package, then configure
without it, and add -Werror in later.  See for example how coreutils
does it, via it's --enable-gcc-warnings configure switch.

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to