hdf5: avoid compilation with -I/usr/include (#22808)
This commit is contained in:
parent
ccc90e3a79
commit
253c0d0ebb
1 changed files with 10 additions and 2 deletions
|
@ -6,6 +6,8 @@
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from spack.util.environment import is_system_path
|
||||||
|
|
||||||
|
|
||||||
class Hdf5(AutotoolsPackage):
|
class Hdf5(AutotoolsPackage):
|
||||||
"""HDF5 is a data model, library, and file format for storing and managing
|
"""HDF5 is a data model, library, and file format for storing and managing
|
||||||
|
@ -249,8 +251,14 @@ def configure_args(self):
|
||||||
# combinations of other arguments. Enabling it just skips a
|
# combinations of other arguments. Enabling it just skips a
|
||||||
# sanity check in configure, so this doesn't merit a variant.
|
# sanity check in configure, so this doesn't merit a variant.
|
||||||
extra_args = ['--enable-unsupported',
|
extra_args = ['--enable-unsupported',
|
||||||
'--enable-symbols=yes',
|
'--enable-symbols=yes']
|
||||||
'--with-zlib=%s' % self.spec['zlib'].prefix]
|
|
||||||
|
# Do not specify the prefix of zlib if it is in a system directory
|
||||||
|
# (see https://github.com/spack/spack/pull/21900).
|
||||||
|
zlib_prefix = self.spec['zlib'].prefix
|
||||||
|
extra_args.append('--with-zlib={0}'.format(
|
||||||
|
'yes' if is_system_path(zlib_prefix) else zlib_prefix))
|
||||||
|
|
||||||
extra_args += self.enable_or_disable('threadsafe')
|
extra_args += self.enable_or_disable('threadsafe')
|
||||||
extra_args += self.enable_or_disable('cxx')
|
extra_args += self.enable_or_disable('cxx')
|
||||||
extra_args += self.enable_or_disable('hl')
|
extra_args += self.enable_or_disable('hl')
|
||||||
|
|
Loading…
Reference in a new issue