3
# Matthias Jahn <jahn.matthias@freenet.de>, 2007 (pmarat)
5
import os, sys, imp, types
7
import Utils, Action, Params, checks, Configure
9
def __list_possible_compiler(plattform):
11
'win32': ['msvc', 'g++'],
15
'linux': ['g++', 'sunc++'],
16
'sunos': ['sunc++', 'g++'],
22
return(c_compiler[plattform])
24
return(c_compiler["default"])
30
test_for_compiler = Params.g_options.check_cxx_compiler
31
for cxx_compiler in test_for_compiler.split():
32
if conf.check_tool(cxx_compiler):
33
conf.check_message("%s" %cxx_compiler, '', True)
34
conf.env["COMPILER_CXX"] = "%s" %cxx_compiler #store the choosed c++ compiler
36
conf.check_message("%s" %cxx_compiler, '', False)
37
conf.env["COMPILER_CXX"] = None
41
detected_plattform = checks.detect_platform(None)
42
possible_compiler_list = __list_possible_compiler(detected_plattform)
43
test_for_compiler = str(" ").join(possible_compiler_list)
44
cxx_compiler_opts = opt.add_option_group("C++ Compiler Options")
46
cxx_compiler_opts.add_option('--check-cxx-compiler', default="%s" % test_for_compiler,
47
help='On this platform (%s) following C++ Compiler will be checked default: "%s"' %
48
(detected_plattform, test_for_compiler),
49
dest="check_cxx_compiler")
50
except optparse.OptionConflictError:
51
# the g++ tool might have added that option already
53
for cxx_compiler in test_for_compiler.split():
54
opt.tool_options('%s' % cxx_compiler, option_group=cxx_compiler_opts)