autoconf
[Top][All Lists]
Advanced

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

Re: AC_INIT seems to be setting CXXFLAGS


From: Richard Ash
Subject: Re: AC_INIT seems to be setting CXXFLAGS
Date: Sun, 26 Jul 2009 22:20:04 +0100

On Sun, 2009-07-26 at 22:11 +0100, Richard Connon wrote:
> Hi. I'm trying to write a configure.ac script for a project I'm working
> on. At present it has AC_INIT at the beginning.
> It seems that running that macro is adding "-g -O2" to the CXXFLAGS
> variable. Is there anything I can do to stop this?

I think it's actually AC_PROG_CXX which is finding g++ and adding those
options to CXXFLAGS. This is very easy to work around - just save and
restore the variable (and probably all the other compiler flag variables
for sanity) around the invocation of AC_PROG_*.

Quite a lot of package configure scripts do this, in order to be able to
turn debugging off properly when doing release builds (i.e. take -g out
and not have it put back in for you).

Richard





reply via email to

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