On Tue, Feb 24, 2009 at 7:06 AM, Joe Orton <jorton@redhat.com> wrote:
On Mon, Feb 23, 2009 at 03:52:44PM -0500, Jeff Trawick wrote:
> Surely this is a FAQ, but I couldn't find it.  Why aren't user CFLAGS
> included in "apr-1-config --cflags"?
> A notable example of where this hurts is with a 64-bit APR build, where
> anything which uses that APR must also be 64-bit but the "CFLAGS=-m64" or
> similar which APR was built with aren't reported by apr-1-config --cflags.
>
> CPPFLAGS, LDFLAGS, etc. are similar.

Putting compiler ABI flags in anything other than $CC is still a "don't
do that" situation, IMO.

Ah...  That's a lesson I should have learned long ago.  It has always looked strange to me though (CC="cc -m64").
 
I don't think there is a "right" answer here in general; you can find
users who want it to work either way.

e.g. you might like to link a libapr against some malloc debugging
library -lmyalloc, and expect to be able to switch in a new libapr which
is not linked against said library.  That won't work if you find that
everything linked against libapr is already linked against -lmyalloc.

Yeah...  I expected there were plenty of counterexamples, but also expected that there was a pragmatic solution ;)

Thanks as always!