summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2018-05-29 12:50:22 -0700
committerJohn Stebbins <[email protected]>2018-05-29 14:29:29 -0700
commite52abd8813732080752eff10e4762e47ddca037c (patch)
tree9a5ee6381db0b113fe29d72ad12840135086a619 /make
parentf314b7673fcd0d95a30d10e5f1e5b32bebbad092 (diff)
contrib: add lzma support
lzma may be used by the ffmpeg tiff decoder which can be used in matroska files.
Diffstat (limited to 'make')
-rw-r--r--make/configure.py14
-rw-r--r--make/include/contrib.defs2
-rw-r--r--make/include/main.defs3
3 files changed, 18 insertions, 1 deletions
diff --git a/make/configure.py b/make/configure.py
index 99c9a5f49..532c9ee1a 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -1686,6 +1686,18 @@ int main ()
libz = LDProbe( 'static zlib', '%s -static' % Tools.gcc.pathname, '-lz', libz_test )
libz.run()
+ xz_test = """
+#include <stdio.h>
+#include <lzma.h>
+int main ()
+{
+ lzma_stream_decoder(NULL, 0, 0);
+ return 0;
+}
+"""
+ xz = LDProbe( 'static xz', '%s -static' % Tools.gcc.pathname, '-llzma', xz_test )
+ xz.run()
+
iconv_test = """
#include <stdio.h>
#include <iconv.h>
@@ -1893,6 +1905,8 @@ int main()
doc.add( 'HAS.bz2', 1 )
if not libz.fail:
doc.add( 'HAS.libz', 1 )
+ if not xz.fail:
+ doc.add( 'HAS.xz', 1 )
if not iconv.fail:
doc.add( 'HAS.iconv', 1 )
if not regex.fail:
diff --git a/make/include/contrib.defs b/make/include/contrib.defs
index 26c2248da..5223fb45e 100644
--- a/make/include/contrib.defs
+++ b/make/include/contrib.defs
@@ -118,7 +118,7 @@ define import.CONTRIB.defs
$(1).CONFIGURE.env.CFLAGS = CFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?c_std ?extra *D)"
$(1).CONFIGURE.env.CXXFLAGS = CXXFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?cxx_std ?extra *D)"
endif
- $(1).CONFIGURE.env.CPPFLAGS = CPPFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra *D)"
+ $(1).CONFIGURE.env.CPPFLAGS = CPPFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver *D)"
$(1).CONFIGURE.env.LDFLAGS = LDFLAGS="-L$$(call fn.ABSOLUTE,$(CONTRIB.build/))lib $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra.exe *D)"
$(1).CONFIGURE.env.PKG_CONFIG_PATH = PKG_CONFIG_PATH="$$(call fn.ABSOLUTE,$$(CONTRIB.build/))lib/pkgconfig"
diff --git a/make/include/main.defs b/make/include/main.defs
index 7bbab9bce..b7719ff74 100644
--- a/make/include/main.defs
+++ b/make/include/main.defs
@@ -102,6 +102,9 @@ ifneq (,$(filter $(BUILD.system),cygwin mingw))
ifneq ($(HAS.iconv),1)
MODULES += contrib/libiconv
endif
+ifneq ($(HAS.xz),1)
+ MODULES += contrib/xz
+endif
ifneq ($(HAS.libz),1)
MODULES += contrib/zlib
endif