diff options
author | Petr Malat <oss@malat.biz> | 2021-12-23 11:47:04 +0100 |
---|---|---|
committer | Petr Malat <oss@malat.biz> | 2021-12-23 12:23:16 +0100 |
commit | 406165fcb2a1b3a49983d9e68fcbee9d3640fbea (patch) | |
tree | 3d62967daca48d0575f082c73c0c5cd4abd03367 /configure.ac | |
parent | 411284e3f5819a5726622f3f129ebf2859f2d46b (diff) | |
download | libarchive-406165fcb2a1b3a49983d9e68fcbee9d3640fbea.tar.gz |
Support libzstd compiled with compressor disabled
ZSTD library can be compiled with the compressor disabled, which is
handy on space restricted systems as the compressor accounts for more
than two thirds of the library size.
Detect this case and use libzstd for the decompression only.
Compression will be done using zstd binary if it's available.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index cb89c3ee..bd92e2cc 100644 --- a/configure.ac +++ b/configure.ac @@ -400,7 +400,9 @@ AC_ARG_WITH([zstd], if test "x$with_zstd" != "xno"; then AC_CHECK_HEADERS([zstd.h]) - AC_CHECK_LIB(zstd,ZSTD_compressStream) + AC_CHECK_LIB(zstd,ZSTD_decompressStream) + AC_CHECK_LIB(zstd,ZSTD_compressStream, + AC_DEFINE([HAVE_LIBZSTD_COMPRESSOR], [1], [Define to 1 if you have the `zstd' library (-lzstd) with compression support.])) fi AC_ARG_WITH([lzma], |