+ def check_ccflags(context, flags):
+ '''Check if given CCFLAGS are supported'''
+ context.Message('Checking support for CCFLAGS="%s"... ' % flags)
+ oldflags = context.env['CCFLAGS']
+ context.env.Append(CCFLAGS = flags)
+ result = context.TryCompile("int main() {return 0;}", '.c')
+ context.env.Replace(CCFLAGS = oldflags)
+ context.Result(result)
+ return result
+
+ conf = Configure(env, custom_tests = {'CheckCCFLAGS': check_ccflags})