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

Re: Compiling C++ without -g



On Sat, Aug 03, 2002 at 09:37:59PM +0200, Ove Kaaven wrote:

> On Sat, 3 Aug 2002, Matt Zimmerman wrote:
> 
> > > e.g.
> > > AC_PROG_CXX calls _AC_PROG_CXX_G which if successful unconditionally appends 
> > > "-g" to the command line.
> > 
> > Try passing CFLAGS to configure, e.g. CFLAGS="-O2" ./configure...
> 
> And if that doesn't work, try CXXFLAGS (which applies to C++ code)...
> although in some of my packages I've opted to override CXXFLAGS for the
> subsequent make (make CXXFLAGS="...") rather than for the configure
> (CXXFLAGS="..." ./configure), for some reason I can't remember.

Right, CXXFLAGS should be used in this case, and not CFLAGS.  If you needed
to set this variable at make time and not at configure time, this was
probably a bug in the makefiles which should be fixed---with autoconf, the
recommended method is passing to configure.

-- 
 - mdz



Reply to: