Skip to content

Commit 92c489f

Browse files
committed
Add various newer options to nc-config
1 parent 3649364 commit 92c489f

File tree

2 files changed

+85
-30
lines changed

2 files changed

+85
-30
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ IF(ENABLE_PLUGIN_INSTALL)
11851185
IF(ISMSVC OR ISMINGW)
11861186
SET(PLUGIN_INSTALL_DIR "$ENV{ALLUSERSPROFILE}\\hdf5\\lib\\plugin")
11871187
ELSE()
1188-
SET(PLUGIN_PLUGIN_DIR "/usr/local/hdf5/lib/plugin")
1188+
SET(PLUGIN_INSTALL_DIR "/usr/local/hdf5/lib/plugin")
11891189
ENDIF()
11901190
ENDIF()
11911191
MESSAGE("Defaulting to -DPLUGIN_INSTALL_DIR=${PLUGIN_INSTALL_DIR}")

nc-config.cmake.in

+84-29
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ prefix="@CMAKE_INSTALL_PREFIX@"
88
exec_prefix="@CMAKE_INSTALL_PREFIX@"
99
libdir="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@"
1010
includedir="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@"
11+
plugindir="@PLUGIN_INSTALL_DIR@"
1112

1213
cc="@CMAKE_C_COMPILER@"
1314
cflags="-I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@"
@@ -108,6 +109,34 @@ else
108109
has_nczarr="yes"
109110
fi
110111

112+
has_benchmarks="@HAS_BENCHMARKS@"
113+
if [ -z "$has_benchmarks" -o "$has_benchmarks" = "OFF" -o "$has_benchmarks" = "FALSE" ]; then
114+
has_benchmarks="no"
115+
else
116+
has_benchmarks="yes"
117+
fi
118+
119+
has_multifilters="@HAS_MULTIFILTERS@"
120+
if [ -z "$has_multifilters" -o "$has_multifilters" = "OFF" -o "$has_multifilters" = "FALSE" ]; then
121+
has_multifilters="no"
122+
else
123+
has_multifilters="yes"
124+
fi
125+
126+
has_zstd="@HAS_ZSTD"
127+
if [ -z "$has_zstd" -o "$has_zstd" = "OFF" -o "$has_zstd" = "FALSE" ]; then
128+
has_zstd="no"
129+
else
130+
has_zstd="yes"
131+
fi
132+
133+
has_quantize="@HAS_QUANTIZE@"
134+
if [ -z "$has_quantize" -o "$has_quantize" = "OFF" -o "$has_quantize" = "FALSE" ]; then
135+
has_quantize="no"
136+
else
137+
has_quantize="yes"
138+
fi
139+
111140
version="@PACKAGE@ @VERSION@"
112141

113142

@@ -151,38 +180,39 @@ Usage: nc-config [OPTION]
151180
152181
Available values for OPTION include:
153182
154-
--help display this help message and exit
155-
--all display all options
156-
--cc C compiler
157-
--cflags pre-processor and compiler flags
158-
--has-c++ whether C++ API is installed
159-
--has-c++4 whether netCDF-4 C++ API is installed
160-
--has-fortran whether Fortran API is installed
161-
--has-dap2 whether OPeNDAP (DAP2) is enabled in this build
162-
--has-dap4 whether DAP4 is enabled in this build
163-
--has-dap same as --has-dap2 (Deprecated)
164-
--has-nc2 whether NetCDF-2 API is enabled
165-
--has-nc4 whether NetCDF-4/HDF-5 is enabled in this build
166-
--has-hdf5 whether HDF5 is used in build (always the same as --has-nc4)
167-
--has-hdf4 whether HDF4 was used in build
168-
--has-logging whether logging is enabled with --enable-logging.
169-
--has-pnetcdf whether PnetCDF was used in build
170-
--has-szlib whether szlib is included in build
171-
--has-cdf5 whether cdf5 support is included in build
172-
--has-parallel4 whether has parallel IO support via HDF5
173-
--has-parallel whether has parallel IO support via HDF5 or PnetCDF
174-
--has-nczarr whether nczarr enabled
175-
--has-zstd whether zstandard compression enabled
183+
--help display this help message and exit
184+
--all display all options
185+
--cc C compiler
186+
--cflags pre-processor and compiler flags
187+
--has-c++ whether C++ API is installed
188+
--has-c++4 whether netCDF-4 C++ API is installed
189+
--has-fortran whether Fortran API is installed
190+
--has-dap2 whether OPeNDAP (DAP2) is enabled in this build
191+
--has-dap4 whether DAP4 is enabled in this build
192+
--has-dap same as --has-dap2 (Deprecated)
193+
--has-nc2 whether NetCDF-2 API is enabled
194+
--has-nc4 whether NetCDF-4/HDF-5 is enabled in this build
195+
--has-hdf5 whether HDF5 is used in build (always the same as --has-nc4)
196+
--has-hdf4 whether HDF4 was used in build
197+
--has-logging whether logging is enabled with --enable-logging.
198+
--has-pnetcdf whether PnetCDF was used in build
199+
--has-szlib whether szlib is included in build
200+
--has-cdf5 whether cdf5 support is included in build
201+
--has-parallel4 whether has parallel IO support via HDF5
202+
--has-parallel whether has parallel IO support via HDF5 or PnetCDF
203+
--has-nczarr whether nczarr enabled
204+
--has-zstd whether zstandard compression enabled
176205
--has-multifilters whether multifilter support is enabled
177-
--has-quanitze whether quantize support is enabled
178-
--has-stdfilters lists the standard filters enabled
179-
--has-benchmarks whether benchmarks enabled
206+
--has-quanitze whether quantize support is enabled
207+
--has-stdfilters lists the standard filters enabled
208+
--has-benchmarks whether benchmarks enabled
180209
181210
--libs library linking information for netcdf
182211
--static library linking information for statically-compiled netcdf
183212
--prefix Install prefix
184213
--includedir Include directory
185214
--libdir Library directory
215+
--plugindir Plugin directory
186216
--version Library version
187217
188218
EOF
@@ -236,7 +266,6 @@ if [ -f "$ncxx4conf" ]; then
236266
echo " --cxx4libs -> $cxx4libs"
237267
fi
238268
echo
239-
240269
echo " --has-fortran -> $has_fortran"
241270
if [ -f "$nfconf" ]; then
242271
echo " --fc -> $fc"
@@ -246,8 +275,9 @@ if [ -f "$nfconf" ]; then
246275
echo " --has-f03 -> $has_f03"
247276
echo
248277
fi
249-
echo " --has-dap -> $has_dap"
250-
echo " --has-dap2 -> $has_dap"
278+
echo
279+
echo " --has-dap -> $has_dap2"
280+
echo " --has-dap2 -> $has_dap2"
251281
echo " --has-dap4 -> $has_dap4"
252282
echo " --has-nc2 -> $has_nc2"
253283
echo " --has-nc4 -> $has_nc4"
@@ -263,12 +293,13 @@ fi
263293
echo " --has-zstd -> $has_zstd"
264294
echo " --has-benchmarks -> $has_benchmarks"
265295
echo " --has-multifilters -> $has_multifilters"
266-
echo " --has-stdfilters -> $has_multifilters"
296+
echo " --has-stdfilters -> @STD_FILTERS@"
267297
echo " --has-quantize -> $has_quantize"
268298
echo
269299
echo " --prefix -> $prefix"
270300
echo " --includedir -> $includedir"
271301
echo " --libdir -> $libdir"
302+
echo " --plugindir -> $plugindir"
272303
echo " --version -> $version"
273304
echo
274305
}
@@ -314,6 +345,10 @@ while test $# -gt 0; do
314345
echo $cflags
315346
;;
316347

348+
--plugindir)
349+
echo $plugindir
350+
;;
351+
317352
--has-dap)
318353
echo $has_dap2
319354
;;
@@ -370,6 +405,26 @@ while test $# -gt 0; do
370405
echo $has_nczarr
371406
;;
372407

408+
--has-zstd)
409+
echo $has_zstd
410+
;;
411+
412+
--has-benchmarks)
413+
echo $has_benchmarks
414+
;;
415+
416+
--has-multifilters)
417+
echo $has_multifilters
418+
;;
419+
420+
--has-stdfilters)
421+
echo @STD_FILTERS@
422+
;;
423+
424+
--has-quantize)
425+
echo $has_quantize
426+
;;
427+
373428
--libs)
374429
if [ "x$HAS_STATIC" = "xTRUE" ]; then
375430
echo $libs $libsprivate

0 commit comments

Comments
 (0)