@conf
def find_ldc2(conf):
    """
	Finds the program *ldc2* and set the variable *D*
	"""
    conf.find_program(['ldc2'], var='D')
    out = conf.cmd_and_log(conf.env.D + ['-version'])
    if out.find('based on DMD v2.') == -1:
        conf.fatal('detected compiler is not ldc2')
