From 2c29bc24ffa74517adb67e822d9aac40534817d2 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Sun, 21 Apr 2002 23:12:42 -0500 Subject: [svn-r5215] Purpose: Bug fix Description: Zlib-compression was reported according to if a Z-library (e.g., libz.a) has been found. It actually needs the presence of a valid zlib.h header file and the compress2() routine. Solution: Changed the IF_YES_NO to be more general by accepting multiple arguments and changed the Zlib-compression depends on zlib.h header and the compress2() routine. Platforms tested: Eirene. --- configure | 16 ++++++++++++---- configure.in | 20 ++++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/configure b/configure index ca2bfb3..6bfa31b 100755 --- a/configure +++ b/configure @@ -30930,11 +30930,19 @@ PRINT() { } IF_YES_NO() { - if test "$1" = "yes"; then - PRINT "Yes" - else + if test $# -lt 1; then PRINT "No" + return + else + while test $# -gt 0; do + if test "$1" != "yes"; then + PRINT "No" + return + fi + shift + done fi + PRINT "Yes" } IF_ENABLED_DISABLED() { @@ -31025,4 +31033,4 @@ PRINT_N " Threadsafety" IF_ENABLED_DISABLED "$THREADSAFE" PRINT_N " Zlib-compression" -IF_YES_NO "$HAVE_ZLIB" +IF_YES_NO "$ac_cv_header_zlib_h" "$ac_cv_func_compress2" diff --git a/configure.in b/configure.in index b5cf493..d424192 100644 --- a/configure.in +++ b/configure.in @@ -1833,12 +1833,23 @@ PRINT() { echo "$1" 1>>src/libhdf5.settings } +dnl ---------------------------------------------------------------------- +dnl Print "Yes" if all arguments are "yes", otherwise "No" +dnl IF_YES_NO() { - if test "$1" = "yes"; then - PRINT "Yes" - else + if test $# -lt 1; then PRINT "No" + return + else + while test $# -gt 0; do + if test "$1" != "yes"; then + PRINT "No" + return + fi + shift + done fi + PRINT "Yes" } IF_ENABLED_DISABLED() { @@ -1928,5 +1939,6 @@ IF_ENABLED_DISABLED "$STREAM_VFD" PRINT_N " Threadsafety" IF_ENABLED_DISABLED "$THREADSAFE" +dnl Zlib compression depends on zlib.h header and compress2() PRINT_N " Zlib-compression" -IF_YES_NO "$HAVE_ZLIB" +IF_YES_NO "$ac_cv_header_zlib_h" "$ac_cv_func_compress2" -- cgit v0.12