summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2003-04-01 15:18:40 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2003-04-01 15:18:40 (GMT)
commit175e5a1bbe5c13891c728b364184477c6e49356f (patch)
treeb668c2d3f7248686eb364e09c4a90acd9569d68a /configure.in
parentbf10a762dff0cd76684eae02c9172b70410da60d (diff)
downloadhdf5-175e5a1bbe5c13891c728b364184477c6e49356f.zip
hdf5-175e5a1bbe5c13891c728b364184477c6e49356f.tar.gz
hdf5-175e5a1bbe5c13891c728b364184477c6e49356f.tar.bz2
[svn-r6549] Purpose:
This is the first check-in message related to szip support at HDF5 1.6 release Description: szip compression support is required by NASA ESDIS. The compression algorithm is a good compression algorithm for scientific data. In HDF5, we add another filter function to make szip as a default compression package as we did for gzip(or zlib). Solution: In the configure.in and configure, I handled szip exactly the same as what zlib was built into the HDF5. Currently if you don't specify in the configure command line with: ./configure --with-szlib=/..... Unless you put your szip library in your path,you will build the same HDF5 library like before. Also, I only use static szip library to test with HDF5. Platforms tested: Since there are changes of configure.in and configure,I didn't use h5committest. I tested with four platforms. 1) Linux 2.4 (eirene) 2) Solaris 2.7(arabica) 3) windows 2000(VS 6.0) 4) SGI IRIX6.5-64(modi4) For test 1)-3), only basic C tests were done For modi4 test, I tested 64-bit C,parallel and fortran. ALl tests passed, except a warning message from szip library when checksum is used in some order, which doesn't cause any real problems. Misc. update:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in89
1 files changed, 89 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 94ea925..56fb28b 100644
--- a/configure.in
+++ b/configure.in
@@ -834,6 +834,92 @@ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2"
[Define if support for deflate filter is enabled])
fi
+
+dnl ----------------------------------------------------------------------
+dnl Is the szlib present? It has a header file `szlib.h' and a library
+dnl `-lsz' and their locations might be specified with the `--with-szlib'
+dnl command-line switch. The value is an include path and/or a library path.
+dnl If the library path is specified then it must be preceded by a comma.
+dnl
+AC_ARG_WITH([szlib],
+ [AC_HELP_STRING([--with-szlib=DIR],
+ [Use szlib compression [default=yes]])],,
+ withval=yes)
+
+case $withval in
+ yes)
+ HAVE_SZLIB="yes"
+ AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"])
+ AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZLIB])
+ dnl Not including this function checking for the time being
+ dnl AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
+
+ if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
+ AC_MSG_ERROR([couldn't find szlib library])
+ fi
+ ;;
+ no)
+ HAVE_SZLIB="no"
+ AC_MSG_CHECKING([for szlib])
+ AC_MSG_RESULT([suppressed])
+ ;;
+ *)
+ HAVE_SZLIB="yes"
+ case "$withval" in
+ *,*)
+ szlib_inc="`echo $withval |cut -f1 -d,`"
+ szlib_lib="`echo $withval |cut -f2 -d, -s`"
+ ;;
+ *)
+ if test -n "$withval"; then
+ szlib_inc="$withval/include"
+ szlib_lib="$withval/lib"
+ fi
+ ;;
+ esac
+
+ dnl Trying to include -I/usr/include and -L/usr/lib is redundant and
+ dnl can mess some compilers up.
+ if test "X$szlib_inc" = "X/usr/include"; then
+ szlib_inc=""
+ fi
+ if test "X$szlib_lib" = "X/usr/lib"; then
+ szlib_lib=""
+ fi
+
+ saved_CPPFLAGS="$CPPFLAGS"
+ saved_LDFLAGS="$LDFLAGS"
+
+ if test -n "$szlib_inc"; then
+ CPPFLAGS="$CPPFLAGS -I$szlib_inc"
+ fi
+
+ AC_CHECK_HEADERS([szlib.h],
+ [HAVE_SZLIB_H="yes"],
+ [CPPFLAGS="$saved_CPPFLAGS"])
+
+ if test -n "$szlib_lib"; then
+ LDFLAGS="$LDFLAGS -L$szlib_lib"
+ fi
+
+ AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],,
+ [LDFLAGS="$saved_LDFLAGS"; unset HAVE_SZLIB])
+dnl AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
+
+ if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
+ AC_MSG_ERROR([couldn't find szlib library])
+ fi
+ ;;
+esac
+
+dnl if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" = "xyes"; then
+
+ 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])
+fi
+
dnl ----------------------------------------------------------------------
dnl Pablo Configuration
dnl
@@ -2365,3 +2451,6 @@ IF_ENABLED_DISABLED "$THREADSAFE"
PRINT_N " Zlib-compression"
IF_YES_NO "$HAVE_ZLIB"
+
+PRINT_N " SZlib-compression"
+IF_YES_NO "$HAVE_SZLIB"