It is useful to be able to determine whether the netcdf library has parallel capabilities enabled. Currently can look at netcdf_meta.h, but would be useful be able to get information from nc-config since that is how most other options settings are displayed.
I was getting "yes" output from some of the options which were not enabled. This was due to two reasons:
* If CMake set the variable to "OFF", then the `-z $var test` would fail and `$var` would be set to "yes" even though it should be "no"
* If CMake set the variable to empty string (`has_var=""`), then the `-z $has_var` test would also fail and set it to yes instead of no.
With these changes, it looks like I am getting the correct output from nc-config consistent with my configuration options.
The `has_dap4` define was missing trailing @. I also added tests similar to other code to result in lowercase yes no for `--has_dap4`.
I'm not as sure about the `--has-dap` changes. One place was outputting `$has_dap` which is never defined. I think that the intent is that `--has-dap` returns the same as `--has-dap2` so made changes that did that. If that isn't the intent, then let me know and I will back out those changes and only leave the dap4-related change.
1. When running under windows (as opposed to cygwin)
we need to make sure to not user /cygdrive/ file paths.
This was ocurring in libdap4/d4read.c, but may occur
elsewhere.
2. Shell scripts in the git repo are not being checked-out
with the executable mode set. Had core.filemode set to false.
Was a major hassle to fix.
Specific changes:
1. Add dap4 code: libdap4 and dap4_test.
Note that until the d4ts server problem is solved, dap4 is turned off.
2. Modify various files to support dap4 flags:
configure.ac, Makefile.am, CMakeLists.txt, etc.
3. Add nc_test/test_common.sh. This centralizes
the handling of the locations of various
things in the build tree: e.g. where is
ncgen.exe located. See nc_test/test_common.sh
for details.
4. Modify .sh files to use test_common.sh
5. Obsolete separate oc2 by moving it to be part of
netcdf-c. This means replacing code with netcdf-c
equivalents.
5. Add --with-testserver to configure.ac to allow
override of the servers to be used for --enable-dap-remote-tests.
6. There were multiple versions of nctypealignment code. Try to
centralize in libdispatch/doffset.c and include/ncoffsets.h
7. Add a unit test for the ncuri code because of its complexity.
8. Move the findserver code out of libdispatch and into
a separate, self contained program in ncdap_test and dap4_test.
9. Move the dispatch header files (nc{3,4}dispatch.h) to
.../include because they are now shared by modules.
10. Revamp the handling of TOPSRCDIR and TOPBUILDDIR for shell scripts.
11. Make use of MREMAP if available
12. Misc. minor changes e.g.
- #include <config.h> -> #include "config.h"
- Add some no-install headers to /include
- extern -> EXTERNL and vice versa as needed
- misc header cleanup
- clean up checking for misc. unix vs microsoft functions
13. Change copyright decls in some files to point to LICENSE file.
14. Add notes to RELEASENOTES.md
- Add --has-fortran, in addition to the specific --has-f90, --has-f03
- Add --libdir to print just the libdir
- Also 'which nf-config' will spit out errors if nf-config is not found.
Silence these errors
A couple of the `has_XX` variables seem to have values of OFF or ON instead of `empty` or ON which causes incorrect output from the nc-config script since it is using `-z` to test whether the variable is non-empty. This causes nc-config to incorrectly report that the library supports HDF5 or has the version 2 api.