summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2007-04-06 19:38:29 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2007-04-06 19:38:29 (GMT)
commit2781e1e34d399ebcd12779ae1786ee48ceb5d8b0 (patch)
tree116401fdb47b4d9b857a8c52ac5cfb98fbe9f885 /configure.in
parenta245b69e9b2c0ec3e843ce7f0b8debde883feaf4 (diff)
downloadhdf5-2781e1e34d399ebcd12779ae1786ee48ceb5d8b0.zip
hdf5-2781e1e34d399ebcd12779ae1786ee48ceb5d8b0.tar.gz
hdf5-2781e1e34d399ebcd12779ae1786ee48ceb5d8b0.tar.bz2
[svn-r13603] The issue with linking szip's shared libraries on some machines that occurred in the 1.8
branch is occurring in the 1.6 branch as well. The issue is that szip's shared libraries cannot be linked when running on certain machines. The fix is added to configure, and it disables the use of szip when the shared libraries cannot be used. This is the same fix that was applied to the 1.8 branch. Detected and tested on kagiso.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in48
1 files changed, 35 insertions, 13 deletions
diff --git a/configure.in b/configure.in
index 2a620f0..e69f89d 100644
--- a/configure.in
+++ b/configure.in
@@ -992,13 +992,20 @@ case $withval in
esac
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
- AC_DEFINE(HAVE_FILTER_SZIP, 1,
- [Define if support for szip filter is enabled])
- USE_FILTER_SZIP="yes"
-
dnl SZLIB library is available. Check if it can encode
AC_MSG_CHECKING([for szlib encoder])
+ AC_CACHE_VAL([hdf5_cv_szlib_functional],
+ [AC_TRY_RUN([
+ #include <szlib.h>
+
+ int main(void)
+ {
+ SZ_encoder_enabled();
+ exit(0);
+ }
+ ], [hdf5_cv_szlib_functional=yes], [hdf5_cv_szlib_functional=no],)])
+
AC_CACHE_VAL([hdf5_cv_szlib_can_encode],
[AC_TRY_RUN([
#include <szlib.h>
@@ -1013,24 +1020,39 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
}
], [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)])
+ if test ${hdf5_cv_szlib_functional} = "no"; then
+ hdf5_cv_szlib_can_encode=broken
+ else
+ AC_DEFINE(HAVE_FILTER_SZIP, 1,
+ [Define if support for szip filter is enabled])
+ USE_FILTER_SZIP="yes"
+ fi
+
if test ${hdf5_cv_szlib_can_encode} = "yes"; then
AC_MSG_RESULT([yes])
- else
+ fi
+ if test ${hdf5_cv_szlib_can_encode} = "no"; then
AC_MSG_RESULT([no])
fi
+ if test ${hdf5_cv_szlib_can_encode} = "broken"; then
+ AC_MSG_RESULT([shared szlib doesn't work. disabling szip.])
+ fi
dnl Add "szip" to external filter list
- if test "X$EXTERNAL_FILTERS" != "X"; then
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
- fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip"
if test ${hdf5_cv_szlib_can_encode} = "yes"; then
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}(encoder)"
- else
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}(no encoder)"
+ if test "X$EXTERNAL_FILTERS" != "X"; then
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
+ fi
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
+ fi
+ if test ${hdf5_cv_szlib_can_encode} = "no"; then
+ if test "X$EXTERNAL_FILTERS" != "X"; then
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
+ fi
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
fi
-fi
+fi
dnl ----------------------------------------------------------------------
dnl Is SSL library present? It is needed by GLOBUS-GASS and Grid Storage