summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authormarkd <markd>2009-07-08 21:25:30 +0000
committermarkd <markd>2009-07-08 21:25:30 +0000
commit529723107fd1fa92d13f6a6d6ab6822951b46fda (patch)
tree9ce10a1878311d4d39140e607c6d1f69565179a5 /mk
parent4ea7dc4c96b3273b8dc563adeccdfe15e810d218 (diff)
downloadpkgsrc-529723107fd1fa92d13f6a6d6ab6822951b46fda.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')
-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