diff options
author | Jack Lloyd <[email protected]> | 2016-11-04 10:52:12 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-04 10:52:12 -0400 |
commit | 062d5ee7c60249e720ab9af037264aaffd77cf31 (patch) | |
tree | 38693dd62941b6112efaf3cdd5c196e0cbd63fd0 | |
parent | 19ac22af33d8e185d30e6c84299b8b86d7b0fa3f (diff) |
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.
-rwxr-xr-x | configure.py | 8 |
1 files changed, 8 insertions, 0 deletions
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: |