[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Get rid of `-g' in CXXFLAGS
From: |
Frank A. Uepping |
Subject: |
Re: Get rid of `-g' in CXXFLAGS |
Date: |
Sat, 2 Aug 2003 11:20:28 +0200 |
On Saturday 02 August 2003 07:46, Richard Bos wrote:
> Op vrijdag 1 augustus 2003 21:38, schreef Frank A. Uepping:
> > Unfortuantely AC_PROG_CXX includes the `-g' option in CXXFLAGS,
> > with what I am not happy with.
> > How can I get rid of the `-g' flag in a way that doesn't *clobber* a user
> > supplied CXXFLAGS?
> > (However, I assume resetting CXXFLAGS entirely is not wise, isn't it?)
> > Is there any AC_ switch for it, or do I have to hack some shell code
> > around AC_PROG_CXX?
> >
> > /FAU
>
> It seems defined in /usr/share/autoconf/autoconf/c.m4
>
> where you have:
> CXXFLAGS="-g"
> AC_CACHE_CHECK(whether $CXX accepts -g, ac_cv_prog_cxx_g,
> [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
> [ac_cv_prog_cxx_g=yes],
> [ac_cv_prog_cxx_g=no])])
> if test "$ac_test_CXXFLAGS" = set; then
> CXXFLAGS=$ac_save_CXXFLAGS
> elif test $ac_cv_prog_cxx_g = yes; then
> if test "$GXX" = yes; then
> CXXFLAGS="-g -O2"
> else
> CXXFLAGS="-g"
> fi
> fi[]dnl
>
> I would expect no "-g" by default as well, and to be able to tell configure
> use "-g" with e.g. an argument "enable-debug".
That is what I found reasonable too.
I think the best way to achieve this is to alter directely the AC_PROG_CXX
macro.
/FAU
- Re: Get rid of `-g' in CXXFLAGS, (continued)
- Re: Get rid of `-g' in CXXFLAGS, Guido Draheim, 2003/08/01
- Re: Get rid of `-g' in CXXFLAGS, John W. Eaton, 2003/08/01
- Re: Get rid of `-g' in CXXFLAGS, John Burger, 2003/08/02
- Re: Get rid of `-g' in CXXFLAGS, Braden McDaniel, 2003/08/02
- Re: Get rid of `-g' in CXXFLAGS, Bob Proulx, 2003/08/02
- Re: Get rid of `-g' in CXXFLAGS, Braden McDaniel, 2003/08/01
- Re: Get rid of `-g' in CXXFLAGS, Richard Bos, 2003/08/02
- Re: Get rid of `-g' in CXXFLAGS,
Frank A. Uepping <=