summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/lhapdf/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/lhapdf/package.py b/var/spack/repos/builtin/packages/lhapdf/package.py
index a58107b8a2..41c3887f89 100644
--- a/var/spack/repos/builtin/packages/lhapdf/package.py
+++ b/var/spack/repos/builtin/packages/lhapdf/package.py
@@ -41,6 +41,15 @@ class Lhapdf(AutotoolsPackage):
depends_on("py-setuptools", type="build", when="+python")
depends_on("gettext", type="build", when="+python")
+ def setup_build_environment(self, env):
+ # Add -lintl if provided by gettext, otherwise libintl is provided by the system's glibc:
+ if (
+ self.spec.satisfies("+python")
+ and "gettext" in self.spec
+ and "intl" in self.spec["gettext"].libs.names
+ ):
+ env.append_flags("LDFLAGS", "-L" + self.spec["gettext"].prefix.lib)
+
def configure_args(self):
args = ["FCFLAGS=-O3", "CFLAGS=-O3", "CXXFLAGS=-O3"]