Re: AC_INIT seems to be setting CXXFLAGS

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

 



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



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux