[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Best means to override CXXFLAGS locally
From: |
Akim Demaille |
Subject: |
Re: Best means to override CXXFLAGS locally |
Date: |
Mon, 30 Oct 2006 08:27:00 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
>>> "Ralf" == Ralf Wildenhues <address@hidden> writes:
> Hello Akim,
> * Akim Demaille wrote on Sun, Oct 22, 2006 at 01:10:02PM CEST:
>> >What would be the cleanest means to handle this exception?
>>
>> Here is what I did:
> I think it's much better to do the munging in configure.ac. Store the
> CFLAGS set by the user and/or AC_PROG_CC in AM_CFLAGS, and override
> CFLAGS. Depending upon whether the changed flags settings apply to only
> a few, non-portability-problematic files in your project, the rest of
> the configure tests should run with the flags set by the user, and you
> should only override at the end, or the converse.
I agree this is cleaner, but it is also more dangerous: there are many
libraries and programs in there, including several with their own
flags (where I would have to also add C*FLAGS by hand). So, although
I also considered that option, I chose the other because it is less
dangerous. The circumlocutions are more local this way.
> Much cleaner, involves much less changes. If you have something that
> works nicely and is reasonably generally useful, post a summary, or
> even better, a FAQ addition to the manual. ;-)