_YesNoResult(context, ret, None, text)
return ret
+def CheckSHCC(context):
+ """
+ Configure check for a working shared C compiler.
+
+ This checks whether the C compiler, as defined in the $SHCC construction
+ variable, can compile a C source file. It uses the current $SHCCCOM value
+ too, so that it can test against non working flags.
+
+ """
+ context.Display("Checking whether the (shared) C compiler works")
+ text = """
+int foo()
+{
+ return 0;
+}
+"""
+ ret = _check_empty_program(context, 'SHCC', text, 'C')
+ _YesNoResult(context, ret, None, text)
+ return ret
+
def CheckCXX(context):
"""
Configure check for a working CXX compiler.
_YesNoResult(context, ret, None, text)
return ret
+def CheckSHCXX(context):
+ """
+ Configure check for a working shared CXX compiler.
+
+ This checks whether the CXX compiler, as defined in the $SHCXX construction
+ variable, can compile a CXX source file. It uses the current $SHCXXCOM value
+ too, so that it can test against non working flags.
+
+ """
+ context.Display("Checking whether the (shared) C++ compiler works")
+ text = """
+int main()
+{
+ return 0;
+}
+"""
+ ret = _check_empty_program(context, 'SHCXX', text, 'C++')
+ _YesNoResult(context, ret, None, text)
+ return ret
+
def _check_empty_program(context, comp, text, language):
"""Return 0 on success, 1 otherwise."""
if not context.env.has_key(comp) or not context.env[comp]:
default_tests = {
'CheckCC' : CheckCC,
'CheckCXX' : CheckCXX,
+ 'CheckSHCC' : CheckSHCC,
+ 'CheckSHCXX' : CheckSHCXX,
'CheckFunc' : CheckFunc,
'CheckType' : CheckType,
'CheckTypeSize' : CheckTypeSize,
res = SCons.Conftest.CheckCXX(context)
return not res
+def CheckSHCC(context):
+ res = SCons.Conftest.CheckSHCC(context)
+ return not res
+
+def CheckSHCXX(context):
+ res = SCons.Conftest.CheckSHCXX(context)
+ return not res
+
# Bram: Make this function obsolete? CheckHeader() is more generic.
def CheckCHeader(context, header, include_quotes = '""'):