libcli: SMB2: Pure SMB2-only negprot fix to make us behave as a Windows client does.
[Samba.git] / buildtools / wafadmin / Tools / compiler_d.py
blob1ea5efa30e8b4ba7cd24b4bd1352724db246ba16
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # Carlos Rafael Giani, 2007 (dv)
5 import os, sys, imp, types
6 import Utils, Configure, Options
8 def detect(conf):
9 if getattr(Options.options, 'check_dmd_first', None):
10 test_for_compiler = ['dmd', 'gdc']
11 else:
12 test_for_compiler = ['gdc', 'dmd']
14 for d_compiler in test_for_compiler:
15 try:
16 conf.check_tool(d_compiler)
17 except:
18 pass
19 else:
20 break
21 else:
22 conf.fatal('no suitable d compiler was found')
24 def set_options(opt):
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',
29 default=False)
31 for d_compiler in ['gdc', 'dmd']:
32 opt.tool_options('%s' % d_compiler, option_group=d_compiler_opts)