From 18d48581310d60e3c9cd0fbdc0a574d8ebaaeed4 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 29 Sep 2009 18:36:24 +0000 Subject: Add a new macro BOTAN_BUILD_COMPILER_IS_XXX to build.h --- configure.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'configure.py') diff --git a/configure.py b/configure.py index 9d6641c12..5c8835a95 100755 --- a/configure.py +++ b/configure.py @@ -443,6 +443,7 @@ class CompilerInfo(object): ['so_link_flags', 'mach_opt', 'mach_abi_linking'], { 'realname': '', 'binary_name': None, + 'macro_name': None, 'compile_option': '-c ', 'output_to_option': '-o ', 'add_include_dir_option': '-I', @@ -483,6 +484,7 @@ class CompilerInfo(object): del self.mach_opt + def mach_abi_link_flags(self, osname, arch, submodel): abi_link = set() @@ -515,15 +517,18 @@ class CompilerInfo(object): return self.so_link_flags['default'] def defines(self, with_tr1): - if with_tr1: - if with_tr1 == 'boost': - return ['USE_BOOST_TR1'] - elif with_tr1 == 'system': + + def tr1_macro(): + if with_tr1: + if with_tr1 == 'boost': + return ['USE_BOOST_TR1'] + elif with_tr1 == 'system': + return ['USE_STD_TR1'] + elif self.compiler_has_tr1: return ['USE_STD_TR1'] - elif self.compiler_has_tr1: - return ['USE_STD_TR1'] + return [] - return [] + return ['BUILD_COMPILER_IS_' + self.macro_name] + tr1_macro() class OsInfo(object): def __init__(self, infofile): -- cgit v1.2.3