]> granicus.if.org Git - xz/commitdiff
Build: Build LZMA1/2 presets also when only decoder is wanted.
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 3 Nov 2015 16:06:40 +0000 (18:06 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Tue, 3 Nov 2015 16:06:40 +0000 (18:06 +0200)
People shouldn't rely on the presets when decoding raw streams,
but xz uses the presets as the starting point for raw decoder
options anyway.

lzma_encocder_presets.c was renamed to lzma_presets.c to
make it clear it's not used solely by the encoder code.

src/liblzma/lzma/Makefile.inc
src/liblzma/lzma/lzma_presets.c [moved from src/liblzma/lzma/lzma_encoder_presets.c with 94% similarity]

index 7fc4d1720964706abc68a74d94f638125c376c04..0c8cd3807df8a757f69cfb434a039a34be9243ee 100644 (file)
@@ -9,12 +9,16 @@ EXTRA_DIST += lzma/fastpos_tablegen.c
 
 liblzma_la_SOURCES += lzma/lzma_common.h
 
+if COND_FILTER_LZMA1
+liblzma_la_SOURCES += \
+       lzma/lzma_presets.c
+endif
+
 if COND_ENCODER_LZMA1
 liblzma_la_SOURCES += \
        lzma/fastpos.h \
        lzma/lzma_encoder.h \
        lzma/lzma_encoder.c \
-       lzma/lzma_encoder_presets.c \
        lzma/lzma_encoder_private.h \
        lzma/lzma_encoder_optimum_fast.c \
        lzma/lzma_encoder_optimum_normal.c
similarity index 94%
rename from src/liblzma/lzma/lzma_encoder_presets.c
rename to src/liblzma/lzma/lzma_presets.c
index 8484b77444b1f341a730923964c9e9200f636aed..d49d2427cdd609c8c2cc2876ae8e4e06f199f6db 100644 (file)
@@ -1,7 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-/// \file       lzma_encoder_presets.c
+/// \file       lzma_presets.c
 /// \brief      Encoder presets
+/// \note       xz needs this even when only decoding is enabled.
 //
 //  Author:     Lasse Collin
 //