summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/libint/package.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py
index 889e98776e..2dd4cd97a8 100644
--- a/var/spack/repos/builtin/packages/libint/package.py
+++ b/var/spack/repos/builtin/packages/libint/package.py
@@ -117,6 +117,9 @@ class Libint(AutotoolsPackage):
env.set("CFLAGS", self.optflags)
env.set("CXXFLAGS", self.optflags)
+ if self.spec.satisfies("%fj"):
+ env.set("LDFLAGS", "--linkfortran")
+
# Change AR to xiar if we compile with Intel and we
# find the executable
if "%intel" in self.spec and which("xiar"):
@@ -238,11 +241,18 @@ class Libint(AutotoolsPackage):
def install(self, spec, prefix):
with working_dir(os.path.join(self.build_directory, "generated")):
make("install")
+ if "+fortran" in self.spec:
+ mkdirp(prefix.include)
+ install(join_path("fortran", "*.mod"), prefix.include)
def patch(self):
# Use Fortran compiler to link the Fortran example, not the C++
# compiler
if "+fortran" in self.spec:
- filter_file(
- "$(CXX) $(CXXFLAGS)", "$(FC) $(FCFLAGS)", "export/fortran/Makefile", string=True
- )
+ if not self.spec.satisfies("%fj"):
+ filter_file(
+ "$(CXX) $(CXXFLAGS)",
+ "$(FC) $(FCFLAGS)",
+ "export/fortran/Makefile",
+ string=True,
+ )