libxpm: cope with system gettext if configured. (#10881)
* If gettext is installed in the system it won't be in the spec tree.
This commit is contained in:
parent
ba0cd4d912
commit
9b763980b6
1 changed files with 6 additions and 2 deletions
|
@ -27,5 +27,9 @@ class Libxpm(AutotoolsPackage):
|
|||
depends_on('util-macros', type='build')
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format(
|
||||
self.spec['gettext'].prefix.lib))
|
||||
# If libxpm is installed as an external package, gettext won't
|
||||
# be available in the spec. See
|
||||
# https://github.com/spack/spack/issues/9149 for details.
|
||||
if 'gettext' in self.spec:
|
||||
spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format(
|
||||
self.spec['gettext'].prefix.lib))
|
||||
|
|
Loading…
Reference in a new issue