@ECHO OFF
SET ZLIB_VERSION=1.3
SET BZIP2_VERSION=1ea1ac188ad4b9cb662e3f8314673c63df95a589
-SET XZ_VERSION=5.4.4
+SET XZ_VERSION=5.6.3
IF NOT "%BE%"=="mingw-gcc" (
IF NOT "%BE%"=="msvc" (
ECHO Environment variable BE must be mingw-gcc or msvc
AS_HELP_STRING([--without-lzma], [Don't build support for xz through lzma]))
if test "x$with_lzma" != "xno"; then
+ PKG_PROG_PKG_CONFIG
+ PKG_CHECK_MODULES(LZMA_PC, [liblzma], [
+ CPPFLAGS="${CPPFLAGS} ${LZMA_PC_CFLAGS}"
+ LIBS="${LIBS} ${LZMA_PC_LIBS}"
+ AC_DEFINE(HAVE_LIBLZMA, [1], [Define to 1 if you have the `lzma' library.])
+ ], [
+ AC_CHECK_LIB(lzma,lzma_stream_decoder)
+ ])
AC_CHECK_HEADERS([lzma.h])
- AC_CHECK_LIB(lzma,lzma_stream_decoder)
+
# Some pre-release (but widely distributed) versions of liblzma
# included a disabled version of lzma_stream_encoder_mt that
# fools a naive AC_CHECK_LIB or AC_CHECK_FUNC, so we need
if (ARCHIVE_OK != archive_read_support_filter_zstd(a)) {
skipping(
"7zip:zstd decoding is not supported on this platform");
+ } else if (ARCHIVE_OK != archive_read_support_filter_xz(a)) {
+ // The directory header entries in the test file uses lzma.
+ skipping(
+ "7zip:lzma decoding is not supported on this platform");
} else {
test_extract_all_files_zstd("test_read_format_7zip_zstd.7z");
}
if (ARCHIVE_OK != archive_read_support_filter_zstd(a)) {
skipping(
"7zip:zstd decoding is not supported on this platform");
+ } else if (ARCHIVE_OK != archive_read_support_filter_xz(a)) {
+ // The directory header entries in the test file uses lzma.
+ skipping(
+ "7zip:lzma decoding is not supported on this platform");
} else {
test_extract_all_files_zstd("test_read_format_7zip_solid_zstd.7z");
}