aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-10-06 15:50:20 +0300
committerLasse Collin <lasse.collin@tukaani.org>2022-11-09 14:24:20 +0200
commit0538db038f3cdc352007dacb42454aa1806b8e40 (patch)
tree554d3cba6f6a7307e6c9c32680ab3c216aeffb77 /configure.ac
parentliblzma: Add the missing Makefile.inc change for --disable-microlzma. (diff)
downloadxz-0538db038f3cdc352007dacb42454aa1806b8e40.tar.xz
liblzma: Add .lz (lzip) decompression support (format versions 0 and 1).
Support for format version 0 was removed from lzip 1.18 for some reason. .lz format version 0 files are rare (and old) but some source packages were released in this format, and some people might have personal files in this format too. It's very little extra code to support it along side format version 1 so this commits adds support for both. The Sync Flush marker extentension to the original .lz format version 1 isn't supported. It would require changes to the LZMA decoder itself. Such files are very rare anyway. See the API doc for lzma_lzip_decoder() for more details about the .lz format support. Thanks to Michał Górny for the original patch.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 20da4a82..15b4ba4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -316,6 +316,27 @@ esac
AM_CONDITIONAL(COND_MICROLZMA, test "x$enable_microlzma" = xyes)
+#############################
+# .lz (lzip) format support #
+#############################
+
+AC_MSG_CHECKING([if .lz (lzip) decompression support should be built])
+AC_ARG_ENABLE([lzip-decoder], AS_HELP_STRING([--disable-lzip-decoder],
+ [Disable decompression support for .lz (lzip) files.]),
+ [], [enable_lzip_decoder=yes])
+if test "x$enable_decoder_lzma1" != xyes; then
+ enable_lzip_decoder=no
+ AC_MSG_RESULT([no because LZMA1 decoder is disabled])
+elif test "x$enable_lzip_decoder" = xyes; then
+ AC_DEFINE([HAVE_LZIP_DECODER], [1],
+ [Define to 1 if .lz (lzip) decompression support is enabled.])
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+AM_CONDITIONAL(COND_LZIP_DECODER, test "x$enable_lzip_decoder" = xyes)
+
+
###########################
# Assembler optimizations #
###########################