Subject: Re: test for gcc3 ?
To: Johnny C. Lam <jlam@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-pkg
Date: 03/20/2004 17:10:36
On Fri, Mar 19, 2004 at 10:28:39PM +0000, Johnny C. Lam wrote:
> On Fri, Mar 19, 2004 at 09:49:11PM +0100, Manuel Bouyer wrote:
> > what is the appropriate test to know if we are using gcc3 or some other kind
> > of compiler ?
> > I need to do this for emacs:
> > .if ${OPSYS} == "SunOS"
> > CFLAGS+=        -fno-zero-initialized-in-bss
> > .endif
> > but only if using gcc3 (this doesn't exists in gcc2).
> 
> I would do:
> 
> .include "../../mk/compiler.mk"
> .if (${OPSYS} == "SunOS") && !empty(CC_VERSION:gcc-3.*)

With
.if (${OPSYS} == "SunOS") && !empty(CC_VERSION:Mgcc-3.*)
if works :)
thanks

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--