diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2020-08-17 15:43:01 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2020-08-17 15:43:01 (GMT) |
commit | ac51c7647e9233eb13cc8bf372909c4b5f3bc666 (patch) | |
tree | 45b5330319133163817c5af9ee788e1e99f66c48 | |
parent | 781f480bf839663c423e3283a7c982bdff6d52ed (diff) | |
parent | 4496516ceea24060b966b6b64f4affa2af48eab7 (diff) | |
download | hdf5-ac51c7647e9233eb13cc8bf372909c4b5f3bc666.zip hdf5-ac51c7647e9233eb13cc8bf372909c4b5f3bc666.tar.gz hdf5-ac51c7647e9233eb13cc8bf372909c4b5f3bc666.tar.bz2 |
Merge pull request #2788 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_8 to hdf5_1_8
* commit '4496516ceea24060b966b6b64f4affa2af48eab7':
Remove unnecessary assignment freom configure.ac.
Check for header szlib.h only when libsz passes AC_CHECK_LIB, so that H5_HAVE_SALIB_H is not defined when szip is not enabled, to prevent compile failures for incompatible szlib.
-rwxr-xr-x | configure | 33 | ||||
-rw-r--r-- | configure.ac | 11 |
2 files changed, 23 insertions, 21 deletions
@@ -25679,27 +25679,13 @@ $as_echo "suppressed" >&6; } AM_CPPFLAGS="$AM_CPPFLAGS -I$szlib_inc" fi - for ac_header in szlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "szlib.h" "ac_cv_header_szlib_h" "$ac_includes_default" -if test "x$ac_cv_header_szlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SZLIB_H 1 -_ACEOF - HAVE_SZLIB_H="yes" -else - CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_SZLIB -fi - -done - if test -n "$szlib_lib"; then LDFLAGS="$LDFLAGS -L$szlib_lib" AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib" fi - if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then + if test "x$HAVE_SZLIB" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SZ_BufftoBuffCompress in -lsz" >&5 $as_echo_n "checking for SZ_BufftoBuffCompress in -lsz... " >&6; } if ${ac_cv_lib_sz_SZ_BufftoBuffCompress+:} false; then : @@ -25755,7 +25741,22 @@ else CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB fi - if test -z "$HAVE_SZLIB"; then + if test -n "$HAVE_SZLIB"; then + for ac_header in szlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "szlib.h" "ac_cv_header_szlib_h" "$ac_includes_default" +if test "x$ac_cv_header_szlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SZLIB_H 1 +_ACEOF + HAVE_SZLIB_H="yes" +else + CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_SZLIB +fi + +done + + else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SZ_BufftoBuffCompress from libsz in $szlib_lib failed. Szip not enabled." >&5 $as_echo "Using SZ_BufftoBuffCompress from libsz in $szlib_lib failed. Szip not enabled." >&6; } fi diff --git a/configure.ac b/configure.ac index 8bb3636..1f685b2 100644 --- a/configure.ac +++ b/configure.ac @@ -1395,19 +1395,20 @@ case "X-$withval" in AM_CPPFLAGS="$AM_CPPFLAGS -I$szlib_inc" fi - AC_CHECK_HEADERS([szlib.h], - [HAVE_SZLIB_H="yes"], - [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB]) if test -n "$szlib_lib"; then LDFLAGS="$LDFLAGS -L$szlib_lib" AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib" fi - if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then + if test "x$HAVE_SZLIB" = "xyes"; then AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB]) - if test -z "$HAVE_SZLIB"; then + if test -n "$HAVE_SZLIB"; then + AC_CHECK_HEADERS([szlib.h], + [HAVE_SZLIB_H="yes"], + [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB]) + else AC_MSG_RESULT([Using SZ_BufftoBuffCompress from libsz in $szlib_lib failed. Szip not enabled.]) fi fi |