enable_multithread = get_option('multithread_support')
enable_zlib = get_option('zlib_support')
enable_lzma = get_option('lzma_support')
+enable_lz4 = get_option('lz4_support')
# =============================================================================
# Helper scripts for Meson
libm_dep = cc.find_library('m', required: true)
thread_dep = dependency('threads', required: false)
zlib_dep = dependency('zlib', required: false)
-lzma_dep = dependency('lzma', required: false)
+lzma_dep = dependency('liblzma', required: false)
+lz4_dep = dependency('liblz4', required: false)
# =============================================================================
# Compiler flags
description: 'Enable zlib support')
option('lzma_support', type: 'boolean', value: false,
description: 'Enable lzma support')
+option('lz4_support', type: 'boolean', value: false,
+ description: 'Enable lz4 support')
zstd_c_args += [ '-DZSTD_LZMACOMPRESS', '-DZSTD_LZMADECOMPRESS' ]
endif
+if enable_lz4 and lz4_dep.found()
+ zstd_deps += [ lz4_dep ]
+ zstd_c_args += [ '-DZSTD_LZ4COMPRESS', '-DZSTD_LZ4DECOMPRESS' ]
+endif
+
zstd = executable('zstd',
zstd_programs_sources,
c_args: zstd_c_args,