Ensure NC_HAS_META_H is defined
Modify test to also verify that NC_HAS_META_H is defined
#include <stdlib.h>
#include <stdio.h>
#include <netcdf.h>
+
+#if defined(NC_HAS_META_H)
#include <netcdf_meta.h>
+#endif
int main(int argc, char **argv) {
@@ -24,7 +27,11 @@ int main(int argc, char **argv) {
*/
#ifndef NETCDF_META_H
+#ifndef NC_HAS_META_H
+ printf("Error! NC_HAS_META_H not defined. Check netcdf.h.\n");
+#else
printf("Error! NETCDF_META_H not defined. Check netcdf_meta.h.\n");
+#endif
return -1;
#else
printf("Success! NETCDF_META_H defined.\n");
