summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Z.c3
-rw-r--r--src/H5Zszip.c6
-rw-r--r--src/H5config.h.in3
3 files changed, 4 insertions, 8 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index fa52ec8..4dddca8 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -94,6 +94,9 @@ H5Z_init_interface (void)
HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter")
#endif /* H5_HAVE_FILTER_FLETCHER32 */
#ifdef H5_HAVE_FILTER_SZIP
+ H5Z_SZIP->encoder_present = SZ_encoder_enabled();
+ if (H5Z_SZIP->encoder_present < 0)
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "szip filter reports bad status")
if (H5Z_register (H5Z_SZIP)<0)
HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter")
#endif /* H5_HAVE_FILTER_SZIP */
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index bca998e..5d0282a 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -43,11 +43,7 @@ static size_t H5Z_filter_szip (unsigned flags, size_t cd_nelmts,
H5Z_class_t H5Z_SZIP[1] = {{
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_SZIP, /* Filter id number */
-#ifdef H5_SZIP_CAN_ENCODE
- 1, /* Encoder present */
-#else
- 0, /* Encoder disabled */
-#endif
+ 1, /* Assume encoder present: check before registering */
1, /* decoder_present flag (set to true) */
"szip", /* Filter name for debugging */
H5Z_can_apply_szip, /* The "can apply" callback */
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 2a01753..d884a20 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -524,9 +524,6 @@
PTHREAD_SCOPE_SYSTEM) call. */
#undef SYSTEM_SCOPE_THREADS
-/* Define if szip encoder is present */
-#undef SZIP_CAN_ENCODE
-
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME