diff --git a/configure.ac b/configure.ac index 31322216ab..35b783c56b 100644 --- a/configure.ac +++ b/configure.ac @@ -718,10 +718,24 @@ AC_CHECK_LIB([zstd],[ZSTD_compress],[have_zstd=yes],[have_zstd=no]) if test "x$have_zstd" = "xyes" ; then AC_SEARCH_LIBS([ZSTD_compress],[zstd zstd.dll cygzstd.dll], [], []) AC_DEFINE([HAVE_ZSTD], [1], [if true, zstd library is available]) + fi AC_MSG_CHECKING([whether libzstd library is available]) AC_MSG_RESULT([${have_zstd}]) +## +# Ensure that the zstd.h dev files are also available. +## +if test "x$have_zstd" = "xyes" ; then + AC_CHECK_HEADERS([zstd.h], [], [nc_zstd_h_missing=yes]) + if test "x$nc_zstd_h_missing" = xyes; then + AC_MSG_WARN([zstd library detected, but zstd.h development file not found. Ensure that the zstd development files are installed in order to build zstd support.]) + AC_DEFINE([HAVE_ZSTD], [0], [if true, zstd library is available]) + have_zstd=no + fi +fi + + # See if we have libbz2 AC_CHECK_LIB([bz2],[BZ2_bzCompress],[have_bz2=yes],[have_bz2=no]) if test "x$have_bz2" = "xyes" ; then