diff --git a/configure.ac b/configure.ac index 406520c5ba..7a67b53d6c 100644 --- a/configure.ac +++ b/configure.ac @@ -799,7 +799,7 @@ AC_ARG_ENABLE([filter-bz2], [AS_HELP_STRING([--disable-filter-bz2], [disable external bz2 filter support. bz2 support defaults to internal implementation if this is disabled or if the external library is not found.])]) test "x$enable_filter_bz2" = xno || enable_filter_bz2=yes -AC_MSG_RESULT($enable_filter_bz2) +AC_MSG_RESULT([$enable_filter_bz2]) if test "x$enable_filter_bz2" = "xyes" ; then @@ -811,14 +811,27 @@ if test "x$enable_filter_bz2" = "xyes" ; then AC_MSG_CHECKING([whether libbz2 library is available]) AC_MSG_RESULT([${have_bz2}]) +fi +# How about bzip2 - if test "x$have_bz2" = "xno" ; then - have_local_bz2=yes - AC_MSG_NOTICE([Defaulting to internal libbz2]) - else - have_local_bz2=no +if test "x$have_bz2" = x ; then + + AC_CHECK_LIB([bzip2],[BZ2_bzCompress],[have_bz2=yes],[have_bz2=no]) + if test "x$have_bz2" = "xyes" ; then + AC_SEARCH_LIBS([BZ2_bzCompress],[bzip2 bzip2.dll cygbzip2.dll], [], []) + AC_DEFINE([HAVE_BZ2], [1], [if true, bzip2 library is installed]) fi + AC_MSG_CHECKING([whether libbzip2 library is available]) + AC_MSG_RESULT([${have_bz2}]) + +fi + +if test "x$have_bz2" = "xno" ; then + have_local_bz2=yes + AC_MSG_NOTICE([Defaulting to internal libbz2]) +else + have_local_bz2=no fi AM_CONDITIONAL(HAVE_LOCAL_BZ2, [test "x$have_local_bz2" = xyes]) diff --git a/libdispatch/ncexhash.c b/libdispatch/ncexhash.c index dcaa919dca..d1677805e7 100644 --- a/libdispatch/ncexhash.c +++ b/libdispatch/ncexhash.c @@ -854,7 +854,7 @@ ncexhashprintstats(NCexhashmap* map) fprintf(stderr," |leaf|=%d nactive/nleaves=%g", map->leaflen, leafavg); fprintf(stderr," load=%g",leafload); fprintf(stderr,"]\n"); - dirsize = (1<<(map->depth)*((unsigned long long)sizeof(void*))); + dirsize = (1<<(map->depth))*((unsigned long long)sizeof(void*)); leafsize = (nleaves)*((unsigned long long)sizeof(NCexleaf)); total = dirsize + leafsize; fprintf(stderr,"\tsizeof(directory)=%llu sizeof(leaves)=%lld total=%lld\n", diff --git a/nc_test/test_byterange.sh b/nc_test/test_byterange.sh index fe9a2cb487..59fc07ea68 100755 --- a/nc_test/test_byterange.sh +++ b/nc_test/test_byterange.sh @@ -26,9 +26,10 @@ URL4d="s3://unidata-zarr-test-data/byterangefiles/upload4.nc#bytes&aws.profile=u fi URL4f="https://crudata.uea.ac.uk/cru/data/temperature/HadCRUT.4.6.0.0.median.nc#mode=bytes" +if test "x$FEATURE_S3TESTS" = xyes ; then # Do not use unless we know it has some permanence (note the segment 'testing' in the URL); URL4x="https://s3.us-west-2.amazonaws.com/coawst-public/testing/HadCRUT.4.6.0.0.median.nc#mode=bytes,&aws.profile=none" - +fi echo ""