[Top][All Lists]

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

How can I override CXXFLAGS?

From: bholland
Subject: How can I override CXXFLAGS?
Date: Sun, 10 Aug 2014 10:48:49 -0700 (PDT)

Hi everyone,

I am working on a project that I joined and I noticed that the flags are all
a mess. When a flag called --enabled-debug was set it it sets 


but when I compile all of my stuff, the CXXFLAGS variable is set to -g -O2
which completely negates the ability to debug. Likewise, I want to set
LDFLAGS to actually link the compiled libraries first as oppose to anything
that I have installed. I don't think this is a problem as LDFLAGS apparently
doesn't have a default for autoconf, or at least not one that overrides. 

I am actually surprised that autoconf decided that the default CXXFLAG set
was not empty. I am sure there are reasons for that, but to me it causes
more harm than good. I set AM_CXXFLAGS with the expectation that if I don't
explicitly set CXXFLAGS, that I get to use whatever I set for AM_CXXFLAGS
but that is not the case. Even in build mode


will be overridden to be -g -O2 by CXXFLAGS. 

Basically, what I want is the expected default behavior. I want to set
CXXFLAGS to nothing by default unless it has been specified by the user. It
is very strange that this is not how it works so I suppose I am also curious
as to why this is the case. 


View this message in context:
Sent from the Gnu - Autoconf - General mailing list archive at

reply via email to

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