diff options
author | Jack Lloyd <[email protected]> | 2015-12-12 08:55:07 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-12-12 08:55:07 -0500 |
commit | a69c55ed127ba01b82760386ec72e33ed4fe2086 (patch) | |
tree | 3255470753efb94f479da7080022db49e34cc009 /configure.py | |
parent | 740591cb0adf608f9ae93d0720173d1daa7934f7 (diff) |
Expose os_type setting as BOTAN_TARGET_OS_TYPE_IS_x
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/configure.py b/configure.py index 8c1118cc4..925f2d768 100755 --- a/configure.py +++ b/configure.py @@ -984,13 +984,21 @@ class OsInfo(object): def defines(self, options): r = [] - for feat in self.target_features: - if feat not in options.without_os_features: - r += ['TARGET_OS_HAS_' + feat.upper()] - for feat in options.with_os_features: - if feat not in self.target_features: - r += ['TARGET_OS_HAS_' + feat.upper()] - return ['TARGET_OS_IS_%s' % (self.basename.upper())] + sorted(r) + r += ['TARGET_OS_IS_%s' % (self.basename.upper())] + + if self.os_type != None: + r += ['TARGET_OS_TYPE_IS_%s' % (self.os_type.upper())] + + def feat_macros(): + for feat in self.target_features: + if feat not in options.without_os_features: + yield 'TARGET_OS_HAS_' + feat.upper() + for feat in options.with_os_features: + if feat not in self.target_features: + yield 'TARGET_OS_HAS_' + feat.upper() + + r += sorted(feat_macros()) + return r def fixup_proc_name(proc): proc = proc.lower().replace(' ', '') |