diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-03-26 22:52:57 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-03-26 22:52:57 (GMT) |
commit | b38138bebbb5cd676fcea97807df0f9e94e48e9e (patch) | |
tree | c2123e7ce78f1e73e64afb507786201b45e8cf81 /fortran/configure.in | |
parent | ff35b6979091d15c92fafcd350314acc33ba4942 (diff) | |
download | hdf5-b38138bebbb5cd676fcea97807df0f9e94e48e9e.zip hdf5-b38138bebbb5cd676fcea97807df0f9e94e48e9e.tar.gz hdf5-b38138bebbb5cd676fcea97807df0f9e94e48e9e.tar.bz2 |
[svn-r5086]
Purpose:
Bug Fix
Description:
The new way of detecting LibZ (just specifying the directory where
include/ and lib/ are) wasn't propagated down to the Fortran
directory.
Solution:
Added that code...
Platforms tested:
AIX and Linux
Diffstat (limited to 'fortran/configure.in')
-rw-r--r-- | fortran/configure.in | 71 |
1 files changed, 41 insertions, 30 deletions
diff --git a/fortran/configure.in b/fortran/configure.in index 1b6bf45..5bc529e 100644 --- a/fortran/configure.in +++ b/fortran/configure.in @@ -268,37 +268,48 @@ dnl Some systems where you need to specify exactly where the zlib is need dnl this. ac_cv_lib_z_compress="" -AC_ARG_WITH(zlib,[ --with-zlib=INC,LIB Use the GNU zlib compression], - ,withval=yes) -case "$withval" in - yes) - AC_CHECK_HEADERS(zlib.h) - AC_CHECK_LIB(z, compress) - ;; - no) - AC_MSG_CHECKING(for GNU zlib) - AC_MSG_RESULT(suppressed) - ;; - *) - zlib_inc="`echo $withval |cut -f1 -d,`" - if test -n "$zlib_inc"; then - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$zlib_inc" - AC_CHECK_HEADERS(zlib.h,,CPPFLAGS="$saved_CPPFLAGS") - else - AC_CHECK_HEADERS(zlib.h) - fi +AC_ARG_WITH(zlib, + [ --with-zlib[=DIR] Use the GNU zlib compression],, + withval=yes) - zlib_lib="`echo $withval |cut -f2 -d, -s`" - if test -n "$zlib_lib"; then - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -L$zlib_lib" - ZLIB_DIR=$zlib_lib - AC_CHECK_LIB(z, compress,,LDFLAGS="$saved_LDFLAGS") - else - AC_CHECK_LIB(z, compress) - fi - ;; +case "$withval" in + yes) + AC_CHECK_HEADERS(zlib.h) + AC_CHECK_LIB(z, compress) + ;; + no) + AC_MSG_CHECKING(for GNU zlib) + AC_MSG_RESULT(suppressed) + ;; + *) + case "$withval" in + *,*) + zlib_inc="`echo $withval |cut -f1 -d,`" + zlib_lib="`echo $withval |cut -f2 -d, -s`" + ;; + *) + if test -n "$withval"; then + zlib_inc="$withval/include" + zlib_lib="$withval/lib" + fi + ;; + esac + + saved_CPPFLAGS="$CPPFLAGS" + saved_LDFLAGS="$LDFLAGS" + + if test -n "$zlib_inc"; then + CPPFLAGS="$CPPFLAGS -I$zlib_inc" + fi + + AC_CHECK_HEADERS(zlib.h,, CPPFLAGS="$saved_CPPFLAGS") + + if test -n "$zlib_lib"; then + LDFLAGS="$LDFLAGS -L$zlib_lib" + fi + + AC_CHECK_LIB(z, compress2,, LDFLAGS="$saved_LDFLAGS") + ;; esac dnl ---------------------------------------------------------------------- |