From 64d2f319a07792ad68abeffb86399ddba3753e2e Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Thu, 14 Nov 2024 11:16:58 -0700 Subject: [PATCH] Update nc-config in support of changes made in #3034 --- RELEASE_NOTES.md | 2 + nc-config.cmake.in | 91 ++++++++++++++++--------------- nc-config.in | 131 ++++++++++++++++++++++++--------------------- 3 files changed, 122 insertions(+), 102 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7ca47ef83..7475de2d2 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -19,6 +19,8 @@ This file contains a high-level description of this package's evolution. Release > Note: To avoid a conflict between `_FillValue` and `libc++18`, we have introduced a new option, `--enable-legacy-macros` for autotools and `NETCDF_ENABLE_LEGACY_MACROS` for cmake. These are turned on by default currently but will be turned off eventually. Developers are encouraged to move away from the `FillValue` macro and replace it with the new `NC_FillValue` macro. See [Github #2858](https://github.com/Unidata/netcdf-c/issues/2858) for more information. + +* Add new `nc-config` flag, `--plugin-searchpath` to report a plugin search path which may be different from the plugin install directory. See [Github #3046](https://github.com/Unidata/netcdf-c/pull/3034) for more information. * Cleanup the blosc testing in nc_test4 and nczarr_test. See [Github #3046](https://github.com/Unidata/netcdf-c/pull/3046) for more information. * Provide better documentation for the .rc file mechanism and API. See [Github #2956](https://github.com/Unidata/netcdf-c/pull/2956) for more information. * Convert NCZarr V2 to store all netcdf-4 specific info as attributes. This improves interoperability with other Zarr implementations by no longer using non-standard keys. The price to be paid is that lazy attribute reading cannot be supported. See [Github #2836](https://github.com/Unidata/netcdf-c/pull/2936) for more information. diff --git a/nc-config.cmake.in b/nc-config.cmake.in index 27e99dbc4..ff857648a 100644 --- a/nc-config.cmake.in +++ b/nc-config.cmake.in @@ -9,6 +9,7 @@ exec_prefix="@CMAKE_INSTALL_PREFIX@" libdir="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" includedir="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@" plugindir="@NETCDF_PLUGIN_INSTALL_DIR@" +pluginsearchpath="@NETCDF_PLUGIN_SEARCH_PATH@" cc="@CMAKE_C_COMPILER@" cflags="-I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@" @@ -142,40 +143,41 @@ Usage: nc-config [OPTION] Available values for OPTION include: - --help display this help message and exit - --all display all options - --cc C compiler - --cflags pre-processor and compiler flags + --help display this help message and exit + --all display all options + --cc C compiler + --cflags pre-processor and compiler flags - --has-dap2 whether OPeNDAP (DAP2) is enabled in this build - --has-dap4 whether DAP4 is enabled in this build - --has-dap same as --has-dap2 (Deprecated) - --has-nc2 whether NetCDF-2 API is enabled - --has-nc4 whether NetCDF-4/HDF-5 is enabled in this build - --has-hdf5 whether HDF5 is used in build (always the same as --has-nc4) - --has-hdf4 whether HDF4 was used in build - --has-logging whether logging is enabled with --enable-logging. - --has-pnetcdf whether PnetCDF was used in build - --has-szlib whether szlib is included in build - --has-cdf5 whether cdf5 support is included in build - --has-parallel4 whether has parallel IO support via HDF5 - --has-parallel whether has parallel IO support via HDF5 or PnetCDF - --has-nczarr whether nczarr enabled - --has-zstd whether zstandard compression enabled - --has-multifilters whether multifilter support is enabled - --has-quanitze whether quantize support is enabled - --has-stdfilters lists the standard filters enabled - --has-benchmarks whether benchmarks enabled + --has-dap2 whether OPeNDAP (DAP2) is enabled in this build + --has-dap4 whether DAP4 is enabled in this build + --has-dap same as --has-dap2 (Deprecated) + --has-nc2 whether NetCDF-2 API is enabled + --has-nc4 whether NetCDF-4/HDF-5 is enabled in this build + --has-hdf5 whether HDF5 is used in build (always the same as --has-nc4) + --has-hdf4 whether HDF4 was used in build + --has-logging whether logging is enabled with --enable-logging. + --has-pnetcdf whether PnetCDF was used in build + --has-szlib whether szlib is included in build + --has-cdf5 whether cdf5 support is included in build + --has-parallel4 whether has parallel IO support via HDF5 + --has-parallel whether has parallel IO support via HDF5 or PnetCDF + --has-nczarr whether nczarr enabled + --has-zstd whether zstandard compression enabled + --has-multifilters whether multifilter support is enabled + --has-quanitze whether quantize support is enabled + --has-stdfilters lists the standard filters enabled + --has-benchmarks whether benchmarks enabled - --libs library linking information for netcdf - --libs-ac-syntax forces autotools-compatible syntax argument for libraries - --static library linking information for statically-compiled netcdf - --prefix Install prefix - --includedir Include directory - --libdir Library directory - --plugindir Plugin directory - --version Library version - --build-system Build System + --libs library linking information for netcdf + --libs-ac-syntax forces autotools-compatible syntax argument for libraries + --static library linking information for statically-compiled netcdf + --prefix Install prefix + --includedir Include directory + --libdir Library directory + --plugindir Plugin install directory + --plugin-searchpath Plugin search directory + --version Library version + --build-system Build System EOF @@ -187,10 +189,10 @@ all() echo echo "This $version has been built with the following features: " echo - echo " --cc -> $cc" - echo " --cflags -> $cflags" - echo " --libs -> $libs" - echo " --static -> $libsprivate" + echo " --cc -> $cc" + echo " --cflags -> $cflags" + echo " --libs -> $libs" + echo " --static -> $libsprivate" echo echo @@ -214,12 +216,13 @@ all() echo " --has-stdfilters -> @STD_FILTERS@" echo " --has-quantize -> $has_quantize" echo - echo " --prefix -> $prefix" - echo " --includedir -> $includedir" - echo " --libdir -> $libdir" - echo " --plugindir -> $plugindir" - echo " --version -> $version" - echo " --build-system -> cmake" + echo " --prefix -> $prefix" + echo " --includedir -> $includedir" + echo " --libdir -> $libdir" + echo " --plugindir -> $plugindir" + echo " --plugin-searchpath -> $pluginsearchpath" + echo " --version -> $version" + echo " --build-system -> cmake" echo } @@ -275,6 +278,10 @@ while test $# -gt 0; do echo $plugindir ;; + --plugin-searchpath) + echo $pluginsearchpath + ;; + --has-dap) echo $has_dap2 ;; diff --git a/nc-config.in b/nc-config.in index 85ce7254e..3259b3db1 100644 --- a/nc-config.in +++ b/nc-config.in @@ -8,12 +8,17 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ -plugindir=@PLUGIN_INSTALL_DIR@ +plugindir=@NETCDF_PLUGIN_INSTALL_DIR@ +pluginsearchpath=@NETCDF_PLUGIN_SEARCH_PATH@ -if test "@PLUGIN_INSTALL_DIR@" = "no" ; then +if test "@NETCDF_PLUGIN_INSTALL_DIR@" = "no" ; then plugindir="" fi +if test "@NETCDF_PLUGIN_SEARCH_PATH@" = "no" ; then + pluginsearchpath="" +fi + cc="@CC@" cflags="-I${includedir} @CPPFLAGS@" libs="-L${libdir} @NC_LIBS@" @@ -47,38 +52,39 @@ Usage: nc-config [OPTION] Available values for OPTION include: - --help display this help message and exit - --all display all options - --cc C compiler - --cflags pre-processor and compiler flags + --help display this help message and exit + --all display all options + --cc C compiler + --cflags pre-processor and compiler flags - --has-dap2 whether OPeNDAP (DAP2) is enabled in this build - --has-dap4 whether DAP4 is enabled in this build - --has-dap same as --has-dap2 (Deprecated) - --has-nc2 whether NetCDF-2 API is enabled - --has-hdf5 whether HDF5 is used in build - --has-hdf4 whether HDF4 was used in build - --has-logging whether logging is enabled with --enable-logging. - --has-pnetcdf whether PnetCDF was used in build - --has-szlib whether szlib is included in build - --has-cdf5 whether cdf5 support is included in build - --has-parallel4 whether has parallel IO support via HDF5 - --has-parallel whether has parallel IO support via HDF5 or PnetCDF - --has-nczarr whether nczarr enabled - --has-zstd whether zstandard compression enabled - --has-multifilters whether multifilter support is enabled - --has-quanitze whether quantize support is enabled - --has-stdfilters lists the standard filters enabled - --has-benchmarks whether benchmarks enabled + --has-dap2 whether OPeNDAP (DAP2) is enabled in this build + --has-dap4 whether DAP4 is enabled in this build + --has-dap same as --has-dap2 (Deprecated) + --has-nc2 whether NetCDF-2 API is enabled + --has-hdf5 whether HDF5 is used in build + --has-hdf4 whether HDF4 was used in build + --has-logging whether logging is enabled with --enable-logging. + --has-pnetcdf whether PnetCDF was used in build + --has-szlib whether szlib is included in build + --has-cdf5 whether cdf5 support is included in build + --has-parallel4 whether has parallel IO support via HDF5 + --has-parallel whether has parallel IO support via HDF5 or PnetCDF + --has-nczarr whether nczarr enabled + --has-zstd whether zstandard compression enabled + --has-multifilters whether multifilter support is enabled + --has-quanitze whether quantize support is enabled + --has-stdfilters lists the standard filters enabled + --has-benchmarks whether benchmarks enabled - --libs library linking information for netcdf - --static library linking information for statically-compiled netcdf - --prefix Install prefix - --includedir Include directory - --libdir Library directory - --plugindir Plugin directory - --version Library version - --build-system Build System + --libs library linking information for netcdf + --static library linking information for statically-compiled netcdf + --prefix Install prefix + --includedir Include directory + --libdir Library directory + --plugindir Plugin directory + --plugin-searchpath Plugin search directory + --version Library version + --build-system Build System EOF @@ -90,35 +96,36 @@ all() echo echo "This $version has been built with the following features: " echo - echo " --cc -> $cc" - echo " --cflags -> $cflags" - echo " --libs -> $libs" - echo " --static -> $libsprivate" - echo " --has-dap -> $has_dap" - echo " --has-dap2 -> $has_dap" - echo " --has-dap4 -> $has_dap4" - echo " --has-nc2 -> $has_nc2" - echo " --has-hdf5 -> $has_hdf5" - echo " --has-hdf4 -> $has_hdf4" - echo " --has-logging -> $has_logging" - echo " --has-pnetcdf -> $has_pnetcdf" - echo " --has-szlib -> $has_szlib" - echo " --has-cdf5 -> $has_cdf5" - echo " --has-parallel4 -> $has_parallel4" - echo " --has-parallel -> $has_parallel" - echo " --has-nczarr -> $has_nczarr" - echo " --has-zstd -> $has_zstd" - echo " --has-benchmarks -> $has_benchmarks" - echo " --has-multifilters -> $has_multifilters" - echo " --has-stdfilters -> @STD_FILTERS@" - echo " --has-quantize -> $has_quantize" + echo " --cc -> $cc" + echo " --cflags -> $cflags" + echo " --libs -> $libs" + echo " --static -> $libsprivate" + echo " --has-dap -> $has_dap" + echo " --has-dap2 -> $has_dap" + echo " --has-dap4 -> $has_dap4" + echo " --has-nc2 -> $has_nc2" + echo " --has-hdf5 -> $has_hdf5" + echo " --has-hdf4 -> $has_hdf4" + echo " --has-logging -> $has_logging" + echo " --has-pnetcdf -> $has_pnetcdf" + echo " --has-szlib -> $has_szlib" + echo " --has-cdf5 -> $has_cdf5" + echo " --has-parallel4 -> $has_parallel4" + echo " --has-parallel -> $has_parallel" + echo " --has-nczarr -> $has_nczarr" + echo " --has-zstd -> $has_zstd" + echo " --has-benchmarks -> $has_benchmarks" + echo " --has-multifilters -> $has_multifilters" + echo " --has-stdfilters -> @STD_FILTERS@" + echo " --has-quantize -> $has_quantize" echo - echo " --prefix -> $prefix" - echo " --includedir -> $includedir" - echo " --libdir -> $libdir" - echo " --plugindir -> $plugindir" - echo " --version -> $version" - echo " --build-system -> autotools" + echo " --prefix -> $prefix" + echo " --includedir -> $includedir" + echo " --libdir -> $libdir" + echo " --plugindir -> $plugindir" + echo " --plugin-searchpath -> $pluginsearchpath" + echo " --version -> $version" + echo " --build-system -> autotools" echo } @@ -173,6 +180,10 @@ while test $# -gt 0; do echo $plugindir ;; + --plugin-searchpath) + echo $pluginsearchpath + ;; + --has-dap) echo $has_dap ;;