On Sat, Jun 7, 2008 at 3:38 PM, Ralf Wildenhues <[EMAIL PROTECTED]> wrote:
> Hello Steven,
>
> * Steven Woody wrote on Fri, Jun 06, 2008 at 08:54:59PM CEST:
>> In my system, the default CXXFLAGS is '-g -O2'.  But, for a particular
>> program, I need -O0 and without -g.  I tried something like:
>>   bin_PROGRAS = xxx
>>   xxx_CXXFLAGS = -O0
>> in Makefile.am.  But, the final CXXFLAGS used when I compile is
>> actually -O0 -g -O2, the default CXXFLAGS appended to my xxx_CXXFLAGS.
>
> Note that is exactly done because CXXFLAGS is for the user, not the
> developer.  If you try to outsmart the user, then that may fire back
> because your users may just know better what's good for their system.
> Yes, they really may.
>

Thank you.

> That said, you can
>  CXXFLAGS =
>  AM_CXXFLAGS = $(CXXFLAGS)
>  xxx_CXXFLAGS = -O0

Set AM_ and xxx_ both?  Manual said, only one of them will be used.


>
> and you probably want `AUTOMAKE_OPTIONS = -Wno-override' in that
> Makefile.am.
>
> Alternatively, you can modify $CXXFLAGS within configure.ac; find out
> whether CXXFLAGS was set by the user _before_ AC_PROG_CXX, and if it
> wasn't, you can default it to your liking.

How?  Thanks.


Reply via email to