From 2be7d7cc0c5244274002bdc097c0e1a7fb264417 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Mon, 1 Oct 2001 01:00:19 -0500 Subject: [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. --- configure | 43 +++++++++++++++++++++---------------------- configure.in | 11 +++++------ 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/configure b/configure index 314d30b..727bc07 100755 --- a/configure +++ b/configure @@ -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 <&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 <&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 <&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 <&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++" -- cgit v0.12