diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-04-11 22:10:09 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-04-11 22:10:09 (GMT) |
commit | cbe3372aa9c892ae4e538918d21ecc6d5795b681 (patch) | |
tree | 8c35bc865db20c6620983c419c1c6269b826f260 /fortran/configure.in | |
parent | 624fcdfbc622b4db71221a04a194107f2fe71f87 (diff) | |
download | hdf5-cbe3372aa9c892ae4e538918d21ecc6d5795b681.zip hdf5-cbe3372aa9c892ae4e538918d21ecc6d5795b681.tar.gz hdf5-cbe3372aa9c892ae4e538918d21ecc6d5795b681.tar.bz2 |
[svn-r6637] Purpose:
Update
Description:
Added check for the SZlib option. The SZlib stuff needs to propagate
down to the h5fc script.
Also, removed "examples" from some of the Makefile's rules so that
it's the same as in the C library.
Platforms tested:
Modi4 (Parallel & Fortran)
Burrwhite (Fortran & C++)
Baldric (Fortran), but make check didn't work because of "libucb.so"
error that I can't fix...)
Misc. update:
Diffstat (limited to 'fortran/configure.in')
-rw-r--r-- | fortran/configure.in | 82 |
1 files changed, 81 insertions, 1 deletions
diff --git a/fortran/configure.in b/fortran/configure.in index 423cef7..ac937da 100644 --- a/fortran/configure.in +++ b/fortran/configure.in @@ -402,7 +402,8 @@ dnl If the library path is specified then it must be preceded by a comma. dnl AC_ARG_WITH([zlib], [AC_HELP_STRING([--with-zlib=DIR], - [Use GNU zlib compression [default=yes]])],, + [Use zlib library for external deflate I/O + filter [default=yes]])],, withval=yes) case $withval in @@ -475,6 +476,85 @@ 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 library for external szlib I/O + filter [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]) + + 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]) + + if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then + AC_MSG_ERROR([couldn't find szlib library]) + fi + ;; +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]) +fi dnl ---------------------------------------------------------------------- dnl Checks for header files. |