summaryrefslogtreecommitdiff
path: root/math/scalapack/files
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2014-08-24 16:14:56 +0000
committerThierry Thomas <thierry@FreeBSD.org>2014-08-24 16:14:56 +0000
commit95c5e784df9194d6380ce04e438dbb6e60de5760 (patch)
treefdee1567c8be2392a5e131b172c607e4c932ec8d /math/scalapack/files
parentAdd sysutils/fusefs-simple-mtpfs. (diff)
- Upgrade scalapack to 2.0.2 and stagify
- Bump PORTREVISION for consumers.
Notes
Notes: svn path=/head/; revision=365954
Diffstat (limited to 'math/scalapack/files')
-rw-r--r--math/scalapack/files/SLmake.inc-mpich.diff73
-rw-r--r--math/scalapack/files/SLmake.inc-openmpi.diff72
-rw-r--r--math/scalapack/files/manpages617
-rw-r--r--math/scalapack/files/patch-SLmake.inc.example35
-rw-r--r--math/scalapack/files/scalapack.h36
5 files changed, 71 insertions, 762 deletions
diff --git a/math/scalapack/files/SLmake.inc-mpich.diff b/math/scalapack/files/SLmake.inc-mpich.diff
deleted file mode 100644
index 3a35693d450c..000000000000
--- a/math/scalapack/files/SLmake.inc-mpich.diff
+++ /dev/null
@@ -1,73 +0,0 @@
---- SLmake.inc.example 2007-04-04 13:24:52.000000000 +0900
-+++ SLmake.inc.example 2007-10-06 18:47:01.000000000 +0900
-@@ -19,26 +19,26 @@
- # The complete path to the top level of ScaLAPACK directory, usually
- # $(HOME)/SCALAPACK
- #
--home = $(HOME)/SCALAPACK
-+home = @WRKSRC@
- #
- # The platform identifier to suffix to the end of library names
- #
--PLAT = LINUX
-+PLAT = FreeBSD
- #
- # BLACS setup. All version need the debug level (0 or 1),
- # and the directory where the BLACS libraries are
- #
- BLACSDBGLVL = 0
--BLACSdir = /usr/local/lib
-+BLACSdir = @LOCALBASE@/lib
- #
- # MPI setup; tailor to your system if using MPIBLACS
- # Will need to comment out these 6 lines if using PVM
- #
- USEMPI = -DUsingMpiBlacs
--SMPLIB = /usr/local/mpich-1.2.1/lib/libmpich.a
--BLACSFINIT = $(BLACSdir)/libmpiblacsF77init-p4.a
--BLACSCINIT = $(BLACSdir)/libmpiblacsCinit-p4.a
--BLACSLIB = $(BLACSdir)/libmpiblacs-p4.a
-+SMPLIB = -L@LOCALBASE@ -lmpich
-+BLACSFINIT = $(BLACSdir)/libblacsf77.a #-L$(BLACSdir) -lblacsf77
-+BLACSCINIT = $(BLACSdir)/libblacsc.a #-L$(BLACSdir) -lblacsc
-+BLACSLIB = $(BLACSdir)/libblacs.a #-L$(BLACSdir) -lblacs
- TESTINGdir = $(home)/TESTING
-
- #
-@@ -67,11 +67,11 @@
- #
- # The fortran and C compilers, loaders, and their flags
- #
--F77 = mpif77
--CC = mpicc
--NOOPT =
--F77FLAGS = -O3 $(NOOPT)
--CCFLAGS = -O4
-+F77 = @MPIF77@
-+CC = @MPICC@
-+NOOPT = @NOOPT@
-+F77FLAGS = @FFLAGS@
-+CCFLAGS = @CFLAGS@
- SRCFLAG =
- F77LOADER = $(F77)
- CCLOADER = $(CC)
-@@ -81,7 +81,7 @@
- # C preprocessor defs for compilation
- # (-DNoChange, -DAdd_, -DUpCase, or -Df77IsF2C)
- #
--CDEFS = -Df77IsF2C -DNO_IEEE $(USEMPI)
-+CDEFS = -DAdd_ -DNO_IEEE $(USEMPI)
- #
- # The archiver and the flag(s) to use when building archive (library)
- # Also the ranlib routine. If your system has no ranlib, set RANLIB = echo
-@@ -93,8 +93,8 @@
- # The name of the libraries to be created/linked to
- #
- SCALAPACKLIB = $(home)/libscalapack.a
--BLASLIB = /usr/local/lib/libf77blas.a /usr/local/lib/libatlas.a
--LAPACKLIB = /usr/local/lib/liblapack.a
-+BLASLIB = -L@LOCALBASE@/lib @BLAS@
-+LAPACKLIB = -L@LOCALBASE@/lib @LAPACK@
- #
- PBLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(LAPACKLIB) $(BLASLIB) $(SMPLIB)
- PRLIBS = $(SCALAPACKLIB) $(CBLACSLIB) $(SMPLIB)
diff --git a/math/scalapack/files/SLmake.inc-openmpi.diff b/math/scalapack/files/SLmake.inc-openmpi.diff
deleted file mode 100644
index 33a7eb1d873d..000000000000
--- a/math/scalapack/files/SLmake.inc-openmpi.diff
+++ /dev/null
@@ -1,72 +0,0 @@
---- SLmake.inc.example Thu Jan 19 06:36:03 2006
-+++ SLmake.inc.example Wed Mar 7 14:03:20 2007
-@@ -19,26 +19,26 @@
- # The complete path to the top level of ScaLAPACK directory, usually
- # $(HOME)/SCALAPACK
- #
--home = $(HOME)/SCALAPACK
-+home = @WRKSRC@
- #
- # The platform identifier to suffix to the end of library names
- #
--PLAT = LINUX
-+PLAT = FreeBSD
- #
- # BLACS setup. All version need the debug level (0 or 1),
- # and the directory where the BLACS libraries are
- #
- BLACSDBGLVL = 0
--BLACSdir = /usr/local/lib
-+BLACSdir = @LOCALBASE@/lib
- #
- # MPI setup; tailor to your system if using MPIBLACS
- # Will need to comment out these 6 lines if using PVM
- #
- USEMPI = -DUsingMpiBlacs
--SMPLIB = /usr/local/mpich-1.2.1/lib/libmpich.a
--BLACSFINIT = $(BLACSdir)/libmpiblacsF77init-p4.a
--BLACSCINIT = $(BLACSdir)/libmpiblacsCinit-p4.a
--BLACSLIB = $(BLACSdir)/libmpiblacs-p4.a
-+SMPLIB =
-+BLACSFINIT = $(BLACSdir)/libblacsf77.a
-+BLACSCINIT = $(BLACSdir)/libblacsc.a
-+BLACSLIB = $(BLACSdir)/libblacs.a
- TESTINGdir = $(home)/TESTING
-
- #
-@@ -67,12 +67,12 @@
- #
- # The fortran and C compilers, loaders, and their flags
- #
--F77 = g77
-+F77 = mpif77
- #F77 = /usr/local/pgi/linux86/bin/pgf77
--CC = gcc
--NOOPT =
--F77FLAGS = -O3 $(NOOPT)
--CCFLAGS = -O4
-+CC = mpicc
-+NOOPT = @NOOPT@
-+F77FLAGS = @FFLAGS@
-+CCFLAGS = @CFLAGS@
- SRCFLAG =
- F77LOADER = $(F77)
- CCLOADER = $(CC)
-@@ -82,7 +82,7 @@
- # C preprocessor defs for compilation
- # (-DNoChange, -DAdd_, -DUpCase, or -Df77IsF2C)
- #
--CDEFS = -Df77IsF2C -DNO_IEEE $(USEMPI)
-+CDEFS = -DAdd_ -DNO_IEEE $(USEMPI)
- #
- # The archiver and the flag(s) to use when building archive (library)
- # Also the ranlib routine. If your system has no ranlib, set RANLIB = echo
-@@ -94,7 +94,7 @@
- # The name of the libraries to be created/linked to
- #
- SCALAPACKLIB = $(home)/libscalapack.a
--BLASLIB = /usr/local/lib/libf77blas.a /usr/local/lib/libatlas.a
-+BLASLIB = -L@LOCALBASE@/lib @BLAS@
- #
- PBLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(BLASLIB) $(SMPLIB)
- PRLIBS = $(SCALAPACKLIB) $(CBLACSLIB) $(SMPLIB)
diff --git a/math/scalapack/files/manpages b/math/scalapack/files/manpages
deleted file mode 100644
index 08d385feefee..000000000000
--- a/math/scalapack/files/manpages
+++ /dev/null
@@ -1,617 +0,0 @@
-MANL= \
-cdbtf2.l \
-cdbtrf.l \
-cdttrf.l \
-cdttrsv.l \
-clahqr2.l \
-clamsh.l \
-clanv2.l \
-claref.l \
-cpttrsv.l \
-csteqr2.l \
-ctrmvt.l \
-ddbtf2.l \
-ddbtrf.l \
-ddttrf.l \
-ddttrsv.l \
-dlamsh.l \
-dlapst.l \
-dlaref.l \
-dlasorte.l \
-dlasrt2.l \
-dpttrsv.l \
-dstein2.l \
-dsteqr2.l \
-dtrmvt.l \
-pcdbsv.l \
-pcdbtrf.l \
-pcdbtrs.l \
-pcdbtrsv.l \
-pcdtsv.l \
-pcdttrf.l \
-pcdttrs.l \
-pcdttrsv.l \
-pcgbsv.l \
-pcgbtrf.l \
-pcgbtrs.l \
-pcgebd2.l \
-pcgebrd.l \
-pcgecon.l \
-pcgeequ.l \
-pcgehd2.l \
-pcgehrd.l \
-pcgelq2.l \
-pcgelqf.l \
-pcgels.l \
-pcgeql2.l \
-pcgeqlf.l \
-pcgeqpf.l \
-pcgeqr2.l \
-pcgeqrf.l \
-pcgerfs.l \
-pcgerq2.l \
-pcgerqf.l \
-pcgesv.l \
-pcgesvx.l \
-pcgetf2.l \
-pcgetrf.l \
-pcgetri.l \
-pcgetrs.l \
-pcggqrf.l \
-pcggrqf.l \
-pcheev.l \
-pcheevd.l \
-pcheevx.l \
-pchegs2.l \
-pchegst.l \
-pchegvx.l \
-pchengst.l \
-pchentrd.l \
-pchetd2.l \
-pchetrd.l \
-pchettrd.l \
-pclabrd.l \
-pclacgv.l \
-pclacon.l \
-pclaconsb.l \
-pclacp2.l \
-pclacp3.l \
-pclacpy.l \
-pclaevswp.l \
-pclahqr.l \
-pclahrd.l \
-pclamr1d.l \
-pclange.l \
-pclanhe.l \
-pclanhs.l \
-pclansy.l \
-pclantr.l \
-pclapiv.l \
-pclapv2.l \
-pclaqge.l \
-pclaqsy.l \
-pclarf.l \
-pclarfb.l \
-pclarfc.l \
-pclarfg.l \
-pclarft.l \
-pclarz.l \
-pclarzb.l \
-pclarzc.l \
-pclarzt.l \
-pclascl.l \
-pclase2.l \
-pclaset.l \
-pclasmsub.l \
-pclassq.l \
-pclaswp.l \
-pclatra.l \
-pclatrd.l \
-pclatrs.l \
-pclatrz.l \
-pclattrs.l \
-pclauu2.l \
-pclauum.l \
-pclawil.l \
-pcmax1.l \
-pcpbsv.l \
-pcpbtrf.l \
-pcpbtrs.l \
-pcpbtrsv.l \
-pcpocon.l \
-pcpoequ.l \
-pcporfs.l \
-pcposv.l \
-pcposvx.l \
-pcpotf2.l \
-pcpotrf.l \
-pcpotri.l \
-pcpotrs.l \
-pcptsv.l \
-pcpttrf.l \
-pcpttrs.l \
-pcpttrsv.l \
-pcsrscl.l \
-pcstein.l \
-pctrcon.l \
-pctrevc.l \
-pctrrfs.l \
-pctrti2.l \
-pctrtri.l \
-pctrtrs.l \
-pctzrzf.l \
-pcung2l.l \
-pcung2r.l \
-pcungl2.l \
-pcunglq.l \
-pcungql.l \
-pcungqr.l \
-pcungr2.l \
-pcungrq.l \
-pcunm2l.l \
-pcunm2r.l \
-pcunmbr.l \
-pcunmhr.l \
-pcunml2.l \
-pcunmlq.l \
-pcunmql.l \
-pcunmqr.l \
-pcunmr2.l \
-pcunmr3.l \
-pcunmrq.l \
-pcunmrz.l \
-pcunmtr.l \
-pddbsv.l \
-pddbtrf.l \
-pddbtrs.l \
-pddbtrsv.l \
-pddtsv.l \
-pddttrf.l \
-pddttrs.l \
-pddttrsv.l \
-pdgbsv.l \
-pdgbtrf.l \
-pdgbtrs.l \
-pdgebd2.l \
-pdgebrd.l \
-pdgecon.l \
-pdgeequ.l \
-pdgehd2.l \
-pdgehrd.l \
-pdgelq2.l \
-pdgelqf.l \
-pdgels.l \
-pdgeql2.l \
-pdgeqlf.l \
-pdgeqpf.l \
-pdgeqr2.l \
-pdgeqrf.l \
-pdgerfs.l \
-pdgerq2.l \
-pdgerqf.l \
-pdgesv.l \
-pdgesvd.l \
-pdgesvx.l \
-pdgetf2.l \
-pdgetrf.l \
-pdgetri.l \
-pdgetrs.l \
-pdggqrf.l \
-pdggrqf.l \
-pdlabad.l \
-pdlabrd.l \
-pdlacon.l \
-pdlaconsb.l \
-pdlacp2.l \
-pdlacp3.l \
-pdlacpy.l \
-pdlaed0.l \
-pdlaed1.l \
-pdlaed2.l \
-pdlaed3.l \
-pdlaedz.l \
-pdlaevswp.l \
-pdlahqr.l \
-pdlahrd.l \
-pdlamch.l \
-pdlamr1d.l \
-pdlange.l \
-pdlanhs.l \
-pdlansy.l \
-pdlantr.l \
-pdlapiv.l \
-pdlapv2.l \
-pdlaqge.l \
-pdlaqsy.l \
-pdlared1d.l \
-pdlared2d.l \
-pdlarf.l \
-pdlarfb.l \
-pdlarfg.l \
-pdlarft.l \
-pdlarz.l \
-pdlarzb.l \
-pdlarzt.l \
-pdlascl.l \
-pdlase2.l \
-pdlaset.l \
-pdlasmsub.l \
-pdlasrt.l \
-pdlassq.l \
-pdlaswp.l \
-pdlatra.l \
-pdlatrd.l \
-pdlatrs.l \
-pdlatrz.l \
-pdlauu2.l \
-pdlauum.l \
-pdlawil.l \
-pdorg2l.l \
-pdorg2r.l \
-pdorgl2.l \
-pdorglq.l \
-pdorgql.l \
-pdorgqr.l \
-pdorgr2.l \
-pdorgrq.l \
-pdorm2l.l \
-pdorm2r.l \
-pdormbr.l \
-pdormhr.l \
-pdorml2.l \
-pdormlq.l \
-pdormql.l \
-pdormqr.l \
-pdormr2.l \
-pdormr3.l \
-pdormrq.l \
-pdormrz.l \
-pdormtr.l \
-pdpbsv.l \
-pdpbtrf.l \
-pdpbtrs.l \
-pdpbtrsv.l \
-pdpocon.l \
-pdpoequ.l \
-pdporfs.l \
-pdposv.l \
-pdposvx.l \
-pdpotf2.l \
-pdpotrf.l \
-pdpotri.l \
-pdpotrs.l \
-pdptsv.l \
-pdpttrf.l \
-pdpttrs.l \
-pdpttrsv.l \
-pdrscl.l \
-pdstebz.l \
-pdstedc.l \
-pdstein.l \
-pdsyev.l \
-pdsyevd.l \
-pdsyevx.l \
-pdsygs2.l \
-pdsygst.l \
-pdsygvx.l \
-pdsyngst.l \
-pdsyntrd.l \
-pdsytd2.l \
-pdsytrd.l \
-pdsyttrd.l \
-pdtrcon.l \
-pdtrrfs.l \
-pdtrti2.l \
-pdtrtri.l \
-pdtrtrs.l \
-pdtzrzf.l \
-pdzsum1.l \
-pjlaenv.l \
-pscsum1.l \
-psdbsv.l \
-psdbtrf.l \
-psdbtrs.l \
-psdbtrsv.l \
-psdtsv.l \
-psdttrf.l \
-psdttrs.l \
-psdttrsv.l \
-psgbsv.l \
-psgbtrf.l \
-psgbtrs.l \
-psgebd2.l \
-psgebrd.l \
-psgecon.l \
-psgeequ.l \
-psgehd2.l \
-psgehrd.l \
-psgelq2.l \
-psgelqf.l \
-psgels.l \
-psgeql2.l \
-psgeqlf.l \
-psgeqpf.l \
-psgeqr2.l \
-psgeqrf.l \
-psgerfs.l \
-psgerq2.l \
-psgerqf.l \
-psgesv.l \
-psgesvd.l \
-psgesvx.l \
-psgetf2.l \
-psgetrf.l \
-psgetri.l \
-psgetrs.l \
-psggqrf.l \
-psggrqf.l \
-pslabad.l \
-pslabrd.l \
-pslacon.l \
-pslaconsb.l \
-pslacp2.l \
-pslacp3.l \
-pslacpy.l \
-pslaed0.l \
-pslaed1.l \
-pslaed2.l \
-pslaed3.l \
-pslaedz.l \
-pslaevswp.l \
-pslahqr.l \
-pslahrd.l \
-pslamch.l \
-pslamr1d.l \
-pslange.l \
-pslanhs.l \
-pslansy.l \
-pslantr.l \
-pslapiv.l \
-pslapv2.l \
-pslaqge.l \
-pslaqsy.l \
-pslared1d.l \
-pslared2d.l \
-pslarf.l \
-pslarfb.l \
-pslarfg.l \
-pslarft.l \
-pslarz.l \
-pslarzb.l \
-pslarzt.l \
-pslascl.l \
-pslase2.l \
-pslaset.l \
-pslasmsub.l \
-pslasrt.l \
-pslassq.l \
-pslaswp.l \
-pslatra.l \
-pslatrd.l \
-pslatrs.l \
-pslatrz.l \
-pslauu2.l \
-pslauum.l \
-pslawil.l \
-psorg2l.l \
-psorg2r.l \
-psorgl2.l \
-psorglq.l \
-psorgql.l \
-psorgqr.l \
-psorgr2.l \
-psorgrq.l \
-psorm2l.l \
-psorm2r.l \
-psormbr.l \
-psormhr.l \
-psorml2.l \
-psormlq.l \
-psormql.l \
-psormqr.l \
-psormr2.l \
-psormr3.l \
-psormrq.l \
-psormrz.l \
-psormtr.l \
-pspbsv.l \
-pspbtrf.l \
-pspbtrs.l \
-pspbtrsv.l \
-pspocon.l \
-pspoequ.l \
-psporfs.l \
-psposv.l \
-psposvx.l \
-pspotf2.l \
-pspotrf.l \
-pspotri.l \
-pspotrs.l \
-psptsv.l \
-pspttrf.l \
-pspttrs.l \
-pspttrsv.l \
-psrscl.l \
-psstebz.l \
-psstedc.l \
-psstein.l \
-pssyev.l \
-pssyevd.l \
-pssyevx.l \
-pssygs2.l \
-pssygst.l \
-pssygvx.l \
-pssyngst.l \
-pssyntrd.l \
-pssytd2.l \
-pssytrd.l \
-pssyttrd.l \
-pstrcon.l \
-pstrrfs.l \
-pstrti2.l \
-pstrtri.l \
-pstrtrs.l \
-pstzrzf.l \
-pzdbsv.l \
-pzdbtrf.l \
-pzdbtrs.l \
-pzdbtrsv.l \
-pzdrscl.l \
-pzdtsv.l \
-pzdttrf.l \
-pzdttrs.l \
-pzdttrsv.l \
-pzgbsv.l \
-pzgbtrf.l \
-pzgbtrs.l \
-pzgebd2.l \
-pzgebrd.l \
-pzgecon.l \
-pzgeequ.l \
-pzgehd2.l \
-pzgehrd.l \
-pzgelq2.l \
-pzgelqf.l \
-pzgels.l \
-pzgeql2.l \
-pzgeqlf.l \
-pzgeqpf.l \
-pzgeqr2.l \
-pzgeqrf.l \
-pzgerfs.l \
-pzgerq2.l \
-pzgerqf.l \
-pzgesv.l \
-pzgesvx.l \
-pzgetf2.l \
-pzgetrf.l \
-pzgetri.l \
-pzgetrs.l \
-pzggqrf.l \
-pzggrqf.l \
-pzheev.l \
-pzheevd.l \
-pzheevx.l \
-pzhegs2.l \
-pzhegst.l \
-pzhegvx.l \
-pzhengst.l \
-pzhentrd.l \
-pzhetd2.l \
-pzhetrd.l \
-pzhettrd.l \
-pzlabrd.l \
-pzlacgv.l \
-pzlacon.l \
-pzlaconsb.l \
-pzlacp2.l \
-pzlacp3.l \
-pzlacpy.l \
-pzlaevswp.l \
-pzlahqr.l \
-pzlahrd.l \
-pzlamr1d.l \
-pzlange.l \
-pzlanhe.l \
-pzlanhs.l \
-pzlansy.l \
-pzlantr.l \
-pzlapiv.l \
-pzlapv2.l \
-pzlaqge.l \
-pzlaqsy.l \
-pzlarf.l \
-pzlarfb.l \
-pzlarfc.l \
-pzlarfg.l \
-pzlarft.l \
-pzlarz.l \
-pzlarzb.l \
-pzlarzc.l \
-pzlarzt.l \
-pzlascl.l \
-pzlase2.l \
-pzlaset.l \
-pzlasmsub.l \
-pzlassq.l \
-pzlaswp.l \
-pzlatra.l \
-pzlatrd.l \
-pzlatrs.l \
-pzlatrz.l \
-pzlattrs.l \
-pzlauu2.l \
-pzlauum.l \
-pzlawil.l \
-pzmax1.l \
-pzpbsv.l \
-pzpbtrf.l \
-pzpbtrs.l \
-pzpbtrsv.l \
-pzpocon.l \
-pzpoequ.l \
-pzporfs.l \
-pzposv.l \
-pzposvx.l \
-pzpotf2.l \
-pzpotrf.l \
-pzpotri.l \
-pzpotrs.l \
-pzptsv.l \
-pzpttrf.l \
-pzpttrs.l \
-pzpttrsv.l \
-pzstein.l \
-pztrcon.l \
-pztrevc.l \
-pztrrfs.l \
-pztrti2.l \
-pztrtri.l \
-pztrtrs.l \
-pztzrzf.l \
-pzung2l.l \
-pzung2r.l \
-pzungl2.l \
-pzunglq.l \
-pzungql.l \
-pzungqr.l \
-pzungr2.l \
-pzungrq.l \
-pzunm2l.l \
-pzunm2r.l \
-pzunmbr.l \
-pzunmhr.l \
-pzunml2.l \
-pzunmlq.l \
-pzunmql.l \
-pzunmqr.l \
-pzunmr2.l \
-pzunmr3.l \
-pzunmrq.l \
-pzunmrz.l \
-pzunmtr.l \
-sdbtf2.l \
-sdbtrf.l \
-sdttrf.l \
-sdttrsv.l \
-slamsh.l \
-slapst.l \
-slaref.l \
-slasorte.l \
-slasrt2.l \
-spttrsv.l \
-sstein2.l \
-ssteqr2.l \
-strmvt.l \
-zdbtf2.l \
-zdbtrf.l \
-zdttrf.l \
-zdttrsv.l \
-zlahqr2.l \
-zlamsh.l \
-zlanv2.l \
-zlaref.l \
-zpttrsv.l \
-zsteqr2.l \
-ztrmvt.l
-
diff --git a/math/scalapack/files/patch-SLmake.inc.example b/math/scalapack/files/patch-SLmake.inc.example
new file mode 100644
index 000000000000..b2740add5e2b
--- /dev/null
+++ b/math/scalapack/files/patch-SLmake.inc.example
@@ -0,0 +1,35 @@
+--- SLmake.inc.example.orig 2011-11-01 18:24:54.000000000 +0100
++++ SLmake.inc.example 2014-08-24 11:35:47.000000000 +0200
+@@ -20,17 +20,17 @@
+ # -DUpCase (fortran subprogram names are upper case without any suffix)
+ # -DAdd_ (fortran subprogram names are lower case with "_" appended)
+
+-CDEFS = -DAdd_
++CDEFS = -DAdd_ -DNO_IEEE $(USEMPI)
+
+ #
+ # The fortran and C compilers, loaders, and their flags
+ #
+
+-FC = mpif90
+-CC = mpicc
+-NOOPT = -O0
+-FCFLAGS = -O3
+-CCFLAGS = -O3
++FC = @MPIF77@
++CC = @MPICC@
++NOOPT = @NOOPT@
++FCFLAGS = @FFLAGS@
++CCFLAGS = @CFLAGS@
+ FCLOADER = $(FC)
+ CCLOADER = $(CC)
+ FCLOADFLAGS = $(FCFLAGS)
+@@ -55,6 +55,6 @@
+ # BLAS, LAPACK (and possibly other) libraries needed for linking test programs
+ #
+
+-BLASLIB = -lblas
+-LAPACKLIB = -llapack
++BLASLIB = -L@LOCALBASE@/lib @BLAS@
++LAPACKLIB = -L@LOCALBASE@/lib @LAPACK@
+ LIBS = $(LAPACKLIB) $(BLASLIB)
diff --git a/math/scalapack/files/scalapack.h b/math/scalapack/files/scalapack.h
new file mode 100644
index 000000000000..63950b49c69f
--- /dev/null
+++ b/math/scalapack/files/scalapack.h
@@ -0,0 +1,36 @@
+# It's no more possible to generate this header with f2c due to post-F77 clauses.
+# Obtained from
+# http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=271
+
+extern void pdlawrite_( char **filenam, int *m, int *n, double *A, int *ia, int *ja, int *descA, int *irwrit, int *icwrit, double *work);
+extern void pdelset_( double *A, int *ia, int *ja, int *desca, double *alpha);
+extern double pdlamch_( int *ictxt, char *cmach);
+extern int indxg2p_( int *indxglob, int *nb, int *iproc, int *isrcproc, int *nprocs);
+extern int indxg2l_( int *indxglob, int *nb, int *iproc, int *isrcproc, int *nprocs);
+extern int numroc_( int *n, int *nb, int *iproc, int *isrcproc, int *nprocs);
+extern void descinit_( int *desc, int *m, int *n, int *mb, int *nb, int *irsrc, int *icsrc,
+ int *ictxt, int *lld, int *info);
+extern void pdlaset_( char *uplo, int *m, int *n, double *alpha, double *beta, double *A, int *ia, int *ja, int *descA );
+extern double pdlange_( char *norm, int *m, int *n, double *A, int *ia, int *ja, int *desca, double *work);
+extern void pdlacpy_( char *uplo, int *m, int *n, double *a, int *ia, int *ja, int *desca,
+ double *b, int *ib, int *jb, int *descb);
+extern void pdgesv_( int *n, int *nrhs, double *A, int *ia, int *ja, int *desca, int* ipiv,
+ double *B, int *ib, int *jb, int *descb, int *info);
+extern void pdgesvd_( char *jobu, char *jobvt, int *m, int *n, double *a, int *ia, int *ja, int *desca,
+ double *s, double *u, int *iu, int *ju, int *descu,
+ double *vt, int *ivt, int *jvt, int *descvt, double *work, int *lwork, int *info);
+extern void pdgemm_( char *TRANSA, char *TRANSB, int * M, int * N, int * K, double * ALPHA,
+ double * A, int * IA, int * JA, int * DESCA, double * B, int * IB, int * JB, int * DESCB,
+ double * BETA, double * C, int * IC, int * JC, int * DESCC );
+extern int indxg2p_( int *indxglob, int *nb, int *iproc, int *isrcproc, int *nprocs);
+
+#ifdef F77_WITH_NO_UNDERSCORE
+#define numroc_ numroc
+#define descinit_ descinit
+#define pdlamch_ pdlamch
+#define pdlange_ pdlange
+#define pdlacpy_ pdlacpy
+#define pdgesv_ pdgesv
+#define pdgemm_ pdgemm
+#define indxg2p_ indxg2p
+#endif