enabling -O2 with gcc 2.96 and later

Alexandre Oliva oliva@lsd.ic.unicamp.br
Fri Dec 17 11:13:00 GMT 1999


On Dec 17, 1999, Phil Edwards <pedwards@jaj.com> wrote:

> My first approach was wonderfully freakin' braindead.

No offense intended, but so is this second attempt, IMHO :-)

How about:

AC_EGREP_CPP([ok], [
#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
ok
#fi
], [OPTLEVEL='-O2'], [OPTLEVEL=])
AC_SUBST(OPTLEVEL)

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them



More information about the Libstdc++ mailing list