* Bob Friesenhahn wrote on Fri, Apr 25, 2008 at 11:32:34PM CEST:
> On Fri, 25 Apr 2008, NightStrike wrote:
>>
>> Is there a configure test to see if -Wall works?
>
> These options only work with GCC.  If the compiler is GCC you can use  
> them, otherwise skip them.

FWIW, icc supports -Wall, too.

For a configure test, you can either just add a flag to CFLAGS (after
saving the original value), do an AC_LINK_IFELSE of a trivial program,
and keep the flag if successful.  It may cause noisy warnings during the
build though (as some compilers warn, but not fail, upon unknown
options).

Or you can use something like Libtool's _LT_COMPILER_OPTION or
_LT_LINKER_OPTION which tries to check warnings, but the latter is
notoriously unreliable.

Cheers,
Ralf


Reply via email to