autoconf
[Top][All Lists]
Advanced

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

Re: ac_cv_env_CXXFLAGS_set ... api?


From: Monty Taylor
Subject: Re: ac_cv_env_CXXFLAGS_set ... api?
Date: Tue, 11 Aug 2009 11:45:04 -0700
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

Ralf Wildenhues wrote:
> Hello Monty,
> 
> * Monty Taylor wrote on Thu, Aug 06, 2009 at 07:16:18PM CEST:
>> Is ac_cv_env_CXXFLAGS_set fair game to use?
> 
> Well, it is not documented explicitly in the Autoconf manual, but
> you can infer at least the name (but not the semantics) mostly from the
> description in 'info Autoconf "Cache Variable Names"'.
> 
>> I'm using it, but someone was asking if it was an implementation
>> detail or an actually usable thing... so I thought I'd ask...
> 
> Why do you need it, rather than just testing $CXXFLAGS directly for
> being set?

Because it's being called in a context where some other part of the
system may have set CXXFLAGS (like AC_PROG_CC setting -g -O2) but where
the question being asked is "did the user set flags directly? Or are
they set to some values we have provided for him" In the second case, we
may want to continue to conditionally add something to the flags.

I could, of course, test CXXFLAGS before calling AC_PROG_CC and set a
variable if it's set or not, but since ac_cv_env_CXXFLAGS_set is already
set, it seemed like duplication of effort - unless that varaible is
marked "please don't use, may go away" - which is sounds like it's not?

Thanks
Monty




reply via email to

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