def check_pthreads(context): """ Check if pthreads are supported for this platform. Sets POSIX_SUPPORTED based on the result. """ context.Message('Checking for POSIX Thread Support...') config = factory.make_c_compiler_config(context) ret = config.has_pthreads_support() context.env['POSIX_SUPPORTED'] = ret context.Result(ret) return ret
def check_c99_flags(context): """ Check if command line flag is required to enable C99 support. Returns 1 if no flag is required, 0 if no flag was found, or the actual flag if one was found. """ cc = context.env['CC'] context.Message('Checking for C99 flag for ' + cc + '... ') config = factory.make_c_compiler_config(context) ret = config.check_c99_flags() context.Result(ret) return ret