Skip to content

Commit

Permalink
Merge pull request #2507 from WardF/zstd_dev_header.wif
Browse files Browse the repository at this point in the history
Check for zstd development headers in autotools
  • Loading branch information
WardF authored Sep 16, 2022
2 parents f7d694a + c07fdaf commit bf7062e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1172,7 +1186,7 @@ AC_CHECK_HEADERS([sys/param.h])
AC_CHECK_HEADERS([libgen.h])
#AC_CHECK_HEADERS([locale.h])
AC_HEADER_STDC
AC_CHECK_HEADERS([locale.h stdio.h stdarg.h fcntl.h malloc.h stdlib.h string.h strings.h unistd.h sys/stat.h getopt.h sys/time.h sys/types.h time.h dirent.h])
AC_CHECK_HEADERS([locale.h stdio.h stdarg.h fcntl.h malloc.h stdlib.h string.h strings.h unistd.h sys/stat.h getopt.h sys/time.h sys/types.h time.h dirent.h stdint.h])

# Do sys/resource.h separately
#AC_CHECK_HEADERS([sys/resource.h],[havesysresource=1],[havesysresource=0])
Expand Down

0 comments on commit bf7062e

Please sign in to comment.