summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authormarkd <markd@pkgsrc.org>2009-07-08 21:25:30 +0000
committermarkd <markd@pkgsrc.org>2009-07-08 21:25:30 +0000
commit18431bf03b2dcb968a29b63e24dbf4e84470643f (patch)
tree9ce10a1878311d4d39140e607c6d1f69565179a5 /mk/compiler
parent8c4f76aa01904b0052a772630c6f7fb4633b5cb2 (diff)
downloadpkgsrc-18431bf03b2dcb968a29b63e24dbf4e84470643f.tar.gz
Allow other fortran compilers than f2c to be used when gcc doesn't supply
one. Now to use g95 as the fortran compiler just add PKGSRC_FORTRAN= g95 FC= g95 to the mk.conf.
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/gcc.mk18
1 files changed, 10 insertions, 8 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index f7af66b3f63..78c83e48bcc 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.97 2009/05/30 18:16:26 joerg Exp $
+# $NetBSD: gcc.mk,v 1.98 2009/07/08 21:25:30 markd Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -48,7 +48,7 @@ _DEF_VARS.gcc= \
_GCC_FC _GCC_LDFLAGS _GCC_LIBDIRS _GCC_PKG \
_GCC_PKGBASE _GCC_PKGSRCDIR _GCC_PKG_SATISFIES_DEP \
_GCC_PREFIX _GCC_REQD _GCC_STRICTEST_REQD _GCC_SUBPREFIX \
- _GCC_TEST_DEPENDS _GCC_USE_F2C _GCC_VARS _GCC_VERSION \
+ _GCC_TEST_DEPENDS _GCC_NEEDS_A_FORTRAN _GCC_VARS _GCC_VERSION \
_GCC_VERSION_STRING \
_IGNORE_GCC _IGNORE_GCC3CXX _IGNORE_GCC3F77 _IGNORE_GCC3OBJC \
_IS_BUILTIN_GCC \
@@ -505,20 +505,22 @@ ${_GCC_${_var_}}:
.endfor
# On older NetBSD systems and where the Fortran compiler doesn't exist,
-# force the use of f2c-f77.
+# force the use of f2c-f77 or some other fortran.
#
-_GCC_USE_F2C= no
+PKGSRC_FORTRAN?=f2c
+
+_GCC_NEEDS_A_FORTRAN= no
.if !exists(${FCPATH})
-_GCC_USE_F2C= yes
+_GCC_NEEDS_A_FORTRAN= yes
.else
. for _pattern_ in 0.* 1.[0-4] 1.[0-4].*
. if !empty(MACHINE_PLATFORM:MNetBSD-${_pattern_}-*)
-_GCC_USE_F2C= yes
+_GCC_NEEDS_A_FORTRAN= yes
. endif
. endfor
.endif
-.if !empty(_GCC_USE_F2C:M[yY][eE][sS])
-. include "../../mk/compiler/f2c.mk"
+.if !empty(_GCC_NEEDS_A_FORTRAN:M[yY][eE][sS])
+. include "../../mk/compiler/${PKGSRC_FORTRAN}.mk"
.endif
.endif # COMPILER_GCC_MK