Subject: RE: proposal: USE_FORTRAN
To: Bill Studenmund <>
From: None <>
List: tech-pkg
Date: 11/21/1999 23:49:40
On Thu, 18 Nov 1999, Bill Studenmund wrote:

> On Thu, 18 Nov 1999, Bernd Salbrechter wrote:
> > I know that it is current style to use several binary variables in
> > But wouldn't it better to change USE_F2C to USE_F_CPL and
> > set it to "f2c" or "f77" to enforce a specific fortran complier. Yes it's
> > paranoid to assume we get more than two fortran complier, but who knows.
> I think this is a good idea. One thing I'd like to do is nudge a Linux
> Fortran compiler company into making a NetBSD version. That'd be a third
> Fortran. :-)

ok.  So my plan then is to have packages which need a fortran compiler to
build set USE_FORTRAN in the package makefile.  Then there will be  a
variable PKG_FC which can be set in /etc/mk.conf to whatever fortran
compiler you want.  If you don't set PKG_FC, then it defaults to f2c-f77
for systems without /usr/bin/f77 and also defaults to f2c-f77 for other
systems.  This second default should be changed to f77 once the f77 we
ship works a little better.  Thats why I have the same default twice (so I
can change 1 later).

.if defined(USE_FORTRAN)
.if !exists(/usr/bin/f77)                    
PKG_FC?=                f2c-f77 
# it is anticipated that once /usr/bin/f77 is more stable that the 
# following default will be changed to f77.  However, in the case where
# there is no /usr/bin/f77, the default will remain as f2c-f77.
PKG_FC?=                f2c-f77
.if  (${PKG_FC} == "f2c-f77")
BUILD_DEPENDS+=       f2c-f77:${PKGSRCDIR}/lang/f2c
FC=             ${PKG_FC}
F77=            ${PKG_FC}

As always, comments are welcome.  Thanks.