3 # Carlos Rafael Giani, 2007 (dv)
5 import os, sys, imp, types
6 import Utils, Configure, Options
9 if getattr(Options.options, 'check_dmd_first', None):
10 test_for_compiler = ['dmd', 'gdc']
12 test_for_compiler = ['gdc', 'dmd']
14 for d_compiler in test_for_compiler:
16 conf.check_tool(d_compiler)
22 conf.fatal('no suitable d compiler was found')
25 d_compiler_opts = opt.add_option_group('D Compiler Options')
26 d_compiler_opts.add_option('--check-dmd-first', action='store_true',
27 help='checks for the gdc compiler before dmd (default is the other way round)',
28 dest='check_dmd_first',
31 for d_compiler in ['gdc', 'dmd']:
32 opt.tool_options('%s' % d_compiler, option_group=d_compiler_opts)