diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2001-10-01 06:00:19 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2001-10-01 06:00:19 (GMT) |
commit | 2be7d7cc0c5244274002bdc097c0e1a7fb264417 (patch) | |
tree | b014d21805152ff79feeb0b49d10809f52463b22 | |
parent | 1a8a5d8cfcf2051f6367401bbbf39915c2820f9d (diff) | |
download | hdf5-2be7d7cc0c5244274002bdc097c0e1a7fb264417.zip hdf5-2be7d7cc0c5244274002bdc097c0e1a7fb264417.tar.gz hdf5-2be7d7cc0c5244274002bdc097c0e1a7fb264417.tar.bz2 |
[svn-r4502] Purpose:
'Bug fix'
Description:
When testing the validity of zlib, the compress() function is
used. HDF5 actually requires a newer version of zlib which
contains compress2(). Compress2 is tested in later part of
the configure. This caused redundent tests and confusion too.
Solution:
Changed zlib test to look for compress2() instead.
Older version of HDF4 libraries (e.g. 4.1r2) would fail this
test correctly. This eliminated the possibility of using an
older version of HDF4 without using zlib compression in HDF5.
But since we need newer version of hdp (with loops detection),
the older version hdf4 is not old any more.
Remark: the compress2 test is not removed. After this change
proven working correctly for all platforms, the extra compress2
test can be removed and source code must be updated too.
Platforms tested:
modi4: tested with hdf4.1r2 and failed as expected. Tested with
newer hdf4 libraries and succeeded as expected.
-rwxr-xr-x | configure | 43 | ||||
-rw-r--r-- | configure.in | 11 |
2 files changed, 26 insertions, 28 deletions
@@ -4377,9 +4377,9 @@ fi case "$withval" in yes) failed="no" - echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:4382: checking for compress in -lz" >&5 -ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` + echo $ac_n "checking for compress2 in -lz""... $ac_c" 1>&6 +echo "configure:4382: checking for compress2 in -lz" >&5 +ac_lib_var=`echo z'_'compress2 | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4391,10 +4391,10 @@ cat > conftest.$ac_ext <<EOF /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char compress(); +char compress2(); int main() { -compress() +compress2() ; return 0; } EOF if { (eval echo configure:4401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -4657,9 +4657,9 @@ done fi if test "$failed" = "no"; then - echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:4662: checking for compress in -lz" >&5 -ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` + echo $ac_n "checking for compress2 in -lz""... $ac_c" 1>&6 +echo "configure:4662: checking for compress2 in -lz" >&5 +ac_lib_var=`echo z'_'compress2 | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4671,10 +4671,10 @@ cat > conftest.$ac_ext <<EOF /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char compress(); +char compress2(); int main() { -compress() +compress2() ; return 0; } EOF if { (eval echo configure:4681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -4920,9 +4920,9 @@ else fi done - echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:4925: checking for compress in -lz" >&5 -ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` + echo $ac_n "checking for compress2 in -lz""... $ac_c" 1>&6 +echo "configure:4925: checking for compress2 in -lz" >&5 +ac_lib_var=`echo z'_'compress2 | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4934,10 +4934,10 @@ cat > conftest.$ac_ext <<EOF /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char compress(); +char compress2(); int main() { -compress() +compress2() ; return 0; } EOF if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -5043,9 +5043,9 @@ done LDFLAGS="$LDFLAGS -L$zlib_lib" fi - echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:5048: checking for compress in -lz" >&5 -ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` + echo $ac_n "checking for compress2 in -lz""... $ac_c" 1>&6 +echo "configure:5048: checking for compress2 in -lz" >&5 +ac_lib_var=`echo z'_'compress2 | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5057,10 +5057,10 @@ cat > conftest.$ac_ext <<EOF /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char compress(); +char compress2(); int main() { -compress() +compress2() ; return 0; } EOF if { (eval echo configure:5067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -10360,7 +10360,7 @@ IF_ENABLED_DISABLED() { fi } -PRINT "" +PRINT "Configure Summary" PRINT "Compiling Options:" PRINT_N " Compilation Mode" @@ -10395,7 +10395,6 @@ else PRINT "No" fi -PRINT "" PRINT "Features:" PRINT_N " C++" diff --git a/configure.in b/configure.in index 12ac98c..a962393 100644 --- a/configure.in +++ b/configure.in @@ -629,7 +629,7 @@ AC_ARG_WITH(hdf4, case "$withval" in yes) failed="no" - AC_CHECK_LIB(z, compress,, failed="yes") + AC_CHECK_LIB(z, compress2,, failed="yes") if test "$failed" = "no"; then HAVE_ZLIB="yes" AC_CHECK_LIB(jpeg, jpeg_start_compress,, failed="yes") @@ -680,7 +680,7 @@ case "$withval" in fi if test "$failed" = "no"; then - AC_CHECK_LIB(z, compress,, failed="yes") + AC_CHECK_LIB(z, compress2,, failed="yes") fi if test "$failed" = "no"; then AC_CHECK_LIB(jpeg, jpeg_start_compress,, failed="yes") @@ -721,7 +721,7 @@ case $withval in yes) HAVE_ZLIB="yes" AC_CHECK_HEADERS(zlib.h) - AC_CHECK_LIB(z, compress,, unset HAVE_ZLIB) + AC_CHECK_LIB(z, compress2,, unset HAVE_ZLIB) ;; no) HAVE_ZLIB="no" @@ -756,7 +756,7 @@ case $withval in LDFLAGS="$LDFLAGS -L$zlib_lib" fi - AC_CHECK_LIB(z, compress,, LDFLAGS="$saved_LDFLAGS"; unset HAVE_ZLIB) + AC_CHECK_LIB(z, compress2,, LDFLAGS="$saved_LDFLAGS"; unset HAVE_ZLIB) ;; esac @@ -1852,7 +1852,7 @@ IF_ENABLED_DISABLED() { fi } -PRINT "" +PRINT "Configure Summary" PRINT "Compiling Options:" PRINT_N " Compilation Mode" @@ -1887,7 +1887,6 @@ else PRINT "No" fi -PRINT "" PRINT "Features:" PRINT_N " C++" |