@@ -60,6 +60,7 @@ def check_api(inc_dirs,netcdf_lib_version):
6060 has_blosc = False
6161 has_ncfilter = False
6262 has_set_alignment = False
63+ has_nc_rc_set = False
6364
6465 for d in inc_dirs :
6566 try :
@@ -83,6 +84,8 @@ def check_api(inc_dirs,netcdf_lib_version):
8384 has_quantize = True
8485 if line .startswith ('nc_set_alignment' ):
8586 has_set_alignment = True
87+ if line .startswith ('EXTERNL int nc_rc_set' ):
88+ has_nc_rc_set = True
8689
8790 if has_nc_open_mem :
8891 try :
@@ -150,7 +153,8 @@ def check_api(inc_dirs,netcdf_lib_version):
150153 return has_rename_grp , has_nc_inq_path , has_nc_inq_format_extended , \
151154 has_cdf5_format , has_nc_open_mem , has_nc_create_mem , \
152155 has_parallel4_support , has_pnetcdf_support , has_szip_support , has_quantize , \
153- has_zstandard , has_bzip2 , has_blosc , has_set_alignment , has_ncfilter
156+ has_zstandard , has_bzip2 , has_blosc , has_set_alignment , has_ncfilter , \
157+ has_nc_rc_set
154158
155159
156160def getnetcdfvers (libdirs ):
@@ -564,7 +568,7 @@ def _populate_hdf5_info(dirstosearch, inc_dirs, libs, lib_dirs):
564568 has_rename_grp , has_nc_inq_path , has_nc_inq_format_extended , \
565569 has_cdf5_format , has_nc_open_mem , has_nc_create_mem , \
566570 has_parallel4_support , has_pnetcdf_support , has_szip_support , has_quantize , \
567- has_zstandard , has_bzip2 , has_blosc , has_set_alignment , has_ncfilter = \
571+ has_zstandard , has_bzip2 , has_blosc , has_set_alignment , has_ncfilter , has_nc_rc_set = \
568572 check_api (inc_dirs ,netcdf_lib_version )
569573 # for netcdf 4.4.x CDF5 format is always enabled.
570574 if netcdf_lib_version is not None and \
@@ -686,6 +690,13 @@ def _populate_hdf5_info(dirstosearch, inc_dirs, libs, lib_dirs):
686690 sys .stdout .write ('netcdf lib does not have nc_inq_filter_avail function\n ' )
687691 f .write ('DEF HAS_NCFILTER = 0\n ' )
688692
693+ if has_nc_rc_set :
694+ sys .stdout .write ('netcdf lib has nc_rc_set function\n ' )
695+ f .write ('DEF HAS_NCRCSET = 1\n ' )
696+ else :
697+ sys .stdout .write ('netcdf lib does not have nc_rc_set function\n ' )
698+ f .write ('DEF HAS_NCRCSET = 0\n ' )
699+
689700 f .close ()
690701
691702 if has_parallel4_support or has_pnetcdf_support :
0 commit comments