From 062d5ee7c60249e720ab9af037264aaffd77cf31 Mon Sep 17 00:00:00 2001 From: Jack Lloyd <jack@randombit.net> Date: Fri, 4 Nov 2016 10:52:12 -0400 Subject: Disable compression module if no compression library support enabled. Otherwise user is given a compression.h header that seems functional but does nothing at all because make_compressor never returns anything. --- configure.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure.py b/configure.py index 9122b38f0..b96d0754a 100755 --- a/configure.py +++ b/configure.py @@ -1635,6 +1635,14 @@ def choose_modules_to_use(modules, module_policy, archinfo, ccinfo, options): logging.error('Unknown load_on %s in %s' % ( module.load_on, modname)) + if 'compression' in to_load: + # Confirm that we have at least one compression library enabled + # Otherwise we leave a lot of useless support code compiled in, plus a + # make_compressor call that always fails + if 'zlib' not in to_load and 'bzip2' not in to_load and 'lzma' not in to_load: + to_load.remove('compression') + cannot_use_because('compression', 'no enabled compression schemes') + dependency_failure = True while dependency_failure: -- cgit v1.2.3