Added an additional check for zstd.h in configure.ac

This commit is contained in:
Ward Fisher 2022-09-16 11:03:51 -06:00
parent 8173d96d83
commit a4c158e074

View File

@ -718,10 +718,24 @@ AC_CHECK_LIB([zstd],[ZSTD_compress],[have_zstd=yes],[have_zstd=no])
if test "x$have_zstd" = "xyes" ; then if test "x$have_zstd" = "xyes" ; then
AC_SEARCH_LIBS([ZSTD_compress],[zstd zstd.dll cygzstd.dll], [], []) AC_SEARCH_LIBS([ZSTD_compress],[zstd zstd.dll cygzstd.dll], [], [])
AC_DEFINE([HAVE_ZSTD], [1], [if true, zstd library is available]) AC_DEFINE([HAVE_ZSTD], [1], [if true, zstd library is available])
fi fi
AC_MSG_CHECKING([whether libzstd library is available]) AC_MSG_CHECKING([whether libzstd library is available])
AC_MSG_RESULT([${have_zstd}]) 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 # See if we have libbz2
AC_CHECK_LIB([bz2],[BZ2_bzCompress],[have_bz2=yes],[have_bz2=no]) AC_CHECK_LIB([bz2],[BZ2_bzCompress],[have_bz2=yes],[have_bz2=no])
if test "x$have_bz2" = "xyes" ; then if test "x$have_bz2" = "xyes" ; then