autoconf
[Top][All Lists]
Advanced

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

Re: Conditional change of C++ compiler flags


From: Alex Farber
Subject: Re: Conditional change of C++ compiler flags
Date: Wed, 26 May 2010 17:11:19 +0300

On Wed, May 26, 2010 at 8:34 AM, Ralf Wildenhues <address@hidden>wrote:

> Hello Alex,
>
> * Alex Farber wrote on Wed, May 26, 2010 at 07:24:14AM CEST:
> > I want to add --enable-debug switch to my configure script, which
> replaces
> > default "-g O3" compiler options with "-g3 -O0". My attempt is obviously
> > incorrect:
> >
> > AC_ARG_ENABLE( debug,
> >     [  --enable-debug,  Enable debug build],
> >     [ CXXFLAGS="${CXXFLAGS} -g3 -O0"] )
> >
> > This gives compiler command line: "-g O3 g3 -O0" instead of desired "-g3
> > -O0"
> > Also, automake manual doesn't recommend to touch CXXFLAGS variable,
> leaving
> > it completely to user. What is correct way to do this?
>
> We should have a FAQ entry for this, it comes up every other month.
> Any takers?  Last instance was this (although the FAQ entry should
> probably be a bit more verbose):
>
> http://thread.gmane.org/gmane.comp.sysutils.autoconf.general/12996/focus=12998
>
> Hope that helps.
>
> Cheers,
> Ralf
>

Thank you. After fighting some time with this stuff, I decided to make debug
build by this way:

./configure " CXXFLAGS="-g3 -O0"
make

Since I need debug build only for my own use, this is OK for me.


reply via email to

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