# Path: waflib/Configure.py
# def conf(f):
# 	"""
# 	Decorator: attach new configuration functions to :py:class:`waflib.Build.BuildContext` and
# 	:py:class:`waflib.Configure.ConfigurationContext`. The methods bound will accept a parameter
# 	named 'mandatory' to disable the configuration errors::
# 
# 		def configure(conf):
# 			conf.find_program('abc', mandatory=False)
# 
# 	:param f: method to bind
# 	:type f: function
# 	"""
# 	def fun(*k, **kw):
# 		mandatory = kw.pop('mandatory', True)
# 		try:
# 			return f(*k, **kw)
# 		except Errors.ConfigurationError:
# 			if mandatory:
# 				raise
# 
# 	fun.__name__ = f.__name__
# 	setattr(ConfigurationContext, f.__name__, fun)
# 	setattr(Build.BuildContext, f.__name__, fun)
# 	return f


from waflib import Utils, Errors
from waflib.Configure import conf
	if 'd' in exts:
		feats.append('d')

	if 'java' in exts:
		feats.append('java')
		return 'java'

	if typ in ('program', 'shlib', 'stlib'):
		will_link = False
		for x in feats:
			if x in ('cxx', 'd', 'fc', 'c', 'asm'):
				feats.append(x + typ)
				will_link = True
		if not will_link and not kw.get('features', []):
			raise Errors.WafError('Cannot link from %r, try passing eg: features="c cprogram"?' % kw)
	return feats

def set_features(kw, typ):
	"""
	Inserts data in the input dict *kw* based on existing data and on the type of target
	required (typ).

	:param kw: task generator parameters
	:type kw: dict
	:param typ: type of target
	:type typ: string
	"""
	kw['typ'] = typ
	kw['features'] = Utils.to_list(kw.get('features', [])) + Utils.to_list(sniff_features(**kw))


# Path: waflib/Configure.py
# def conf(f):
# 	"""
# 	Decorator: attach new configuration functions to :py:class:`waflib.Build.BuildContext` and
# 	:py:class:`waflib.Configure.ConfigurationContext`. The methods bound will accept a parameter
# 	named 'mandatory' to disable the configuration errors::
# 
# 		def configure(conf):
# 			conf.find_program('abc', mandatory=False)
# 
# 	:param f: method to bind
# 	:type f: function
# 	"""
# 	def fun(*k, **kw):
# 		mandatory = kw.pop('mandatory', True)
# 		try:
# 			return f(*k, **kw)
# 		except Errors.ConfigurationError:
# 			if mandatory:
# 				raise
# 
# 	fun.__name__ = f.__name__
# 	setattr(ConfigurationContext, f.__name__, fun)
# 	setattr(Build.BuildContext, f.__name__, fun)
# 	return f


# Path: waflib/Tools/c_aliases.py
from waflib import Utils, Errors
from waflib.Configure import conf

	if 'd' in exts:
		feats.append('d')

	if 'java' in exts:
		feats.append('java')
		return 'java'

	if typ in ('program', 'shlib', 'stlib'):
		will_link = False
		for x in feats:
			if x in ('cxx', 'd', 'fc', 'c', 'asm'):
				feats.append(x + typ)
				will_link = True
		if not will_link and not kw.get('features', []):
			raise Errors.WafError('Cannot link from %r, try passing eg: features="c cprogram"?' % kw)
	return feats

def set_features(kw, typ):
	"""
	Inserts data in the input dict *kw* based on existing data and on the type of target
	required (typ).

	:param kw: task generator parameters
	:type kw: dict
	:param typ: type of target
	:type typ: string
	"""
	kw['typ'] = typ
	kw['features'] = Utils.to_list(kw.get('features', [])) + Utils.to_list(sniff_features(**kw))


@conf