automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: flag question


From: Ralf Wildenhues
Subject: Re: flag question
Date: Sat, 26 Apr 2008 02:06:12 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

* 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

[Prev in Thread] Current Thread [Next in Thread]