summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/netcdf-c/package.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/netcdf-c/package.py b/var/spack/repos/builtin/packages/netcdf-c/package.py
index 49c68122b2..f65e55eca0 100644
--- a/var/spack/repos/builtin/packages/netcdf-c/package.py
+++ b/var/spack/repos/builtin/packages/netcdf-c/package.py
@@ -67,7 +67,7 @@ class NetcdfC(AutotoolsPackage):
variant('shared', default=True, description='Enable shared library')
variant('dap', default=False, description='Enable DAP support')
variant('jna', default=False, description='Enable JNA support')
- variant('enable-fsync', default=False, description='Enable fsync support')
+ variant('fsync', default=False, description='Enable fsync support')
# It's unclear if cdmremote can be enabled if '--enable-netcdf-4' is passed
# to the configure script. Since netcdf-4 support is mandatory we comment
@@ -141,9 +141,7 @@ class NetcdfC(AutotoolsPackage):
'--enable-largefile',
'--enable-netcdf-4']
- # The flag was introduced in version 4.1.0
- if self.spec.satisfies('@4.1:'):
- config_args.append('--enable-fsync')
+ config_args.extend(self.enable_or_disable('fsync'))
# The flag was introduced in version 4.3.1
if self.spec.satisfies('@4.3.1:'):
@@ -189,12 +187,6 @@ class NetcdfC(AutotoolsPackage):
if hdf5_hl.satisfies('~shared'):
libs.append(hdf5_hl.libs.link_flags)
- if '+enable-fsync' in self.spec:
- # The flag was introduced in version 4.1.0. It was default
- # `on` until 4.3.0 when it now defaults to `off`.
- if self.spec.satisfies('@4.1:'):
- config_args.append('--enable-fsync')
-
if '+parallel-netcdf' in self.spec:
config_args.append('--enable-pnetcdf')
pnetcdf = self.spec['parallel-netcdf']