add static options for some libraries (#2876)

* add static options for some libraries

* make requested changes: add comments and use configure_args
This commit is contained in:
Jason Sarich
2017-01-24 13:48:01 -06:00
committed by Todd Gamblin
parent 7d3da2ebdc
commit 6e895c4ccc
5 changed files with 50 additions and 15 deletions

View File

@@ -37,6 +37,8 @@ class Matio(AutotoolsPackage):
description='support for compressed mat files')
variant("hdf5", default=True,
description='support for version 7.3 mat files via hdf5')
variant("shared", default=True, description='Enables the build of shared libraries.')
depends_on("zlib", when="+zlib")
depends_on("hdf5", when="+hdf5")
@@ -47,4 +49,6 @@ def configure_args(self):
args.append("--with-zlib=%s" % self.spec['zlib'].prefix)
if '+hdf5' in self.spec:
args.append("--with-hdf5=%s" % self.spec['hdf5'].prefix)
if '+shared' not in self.spec:
args.append("--disable-shared")
return args