aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-09-09 23:02:48 +0200
committerSimon Warta <[email protected]>2015-09-09 23:05:31 +0200
commit71092b319e289920db34c0b5839867b3aa29de58 (patch)
tree40d767a7e14f474023242515f8e6c3006eddcee9 /configure.py
parent37ebfc0c5b3ffe6ead52678425dee62fd7993ec7 (diff)
Prevent users from building static non-amalgamations on MinGW and Cygwin
* Rename variable to avoid confusion of build_shared and options.build_shared_lib * Don't automatically change shared -> static. Force user to do that Fixes #211
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/configure.py b/configure.py
index 32b8a7d3a..235c631ef 100755
--- a/configure.py
+++ b/configure.py
@@ -971,14 +971,14 @@ class OsInfo(object):
'bin_dir': 'bin',
'lib_dir': 'lib',
'doc_dir': 'share/doc',
- 'build_shared': 'yes',
+ 'building_shared_supported': 'yes',
'install_cmd_data': 'install -m 644',
'install_cmd_exec': 'install -m 755'
})
self.ar_needs_ranlib = bool(self.ar_needs_ranlib)
- self.build_shared = (True if self.build_shared == 'yes' else False)
+ self.building_shared_supported = (True if self.building_shared_supported == 'yes' else False)
def ranlib_command(self):
return ('ranlib' if self.ar_needs_ranlib else 'true')
@@ -1926,17 +1926,16 @@ def main(argv = None):
raise Exception('Static build is only supported using amalgamation. '
'Add --via-amalgamation.')
+ if options.build_shared_lib and not osinfo.building_shared_supported:
+ raise Exception('Botan does not support building as shared library on the target os. '
+ 'Build static using --disable-shared.')
+
loaded_mods = choose_modules_to_use(modules, arch, cc, options)
for m in loaded_mods:
if modules[m].load_on == 'vendor':
logging.info('Enabling use of external dependency %s' % (m))
- if not osinfo.build_shared:
- if options.build_shared_lib:
- logging.info('Disabling shared lib on %s' % (options.os))
- options.build_shared_lib = False
-
using_mods = [modules[m] for m in loaded_mods]
build_config = BuildConfigurationInformation(options, using_mods)