def METHOD_NAME(conf):
	"""
	Reads the command-line options to set lots of variables in *conf.env*. The variables
	BINDIR and LIBDIR will be overwritten.
	"""
	def get_param(varname, default):
		return getattr(Options.options, varname, '') or default
	env = conf.env
	env.LIBDIR = env.BINDIR = []
	env.EXEC_PREFIX = get_param('EXEC_PREFIX', env.PREFIX)
	env.PACKAGE = getattr(Context.g_module, 'APPNAME', None) or env.PACKAGE
	complete = False
	iter = 0
	while not complete and iter < len(_options) + 1:
		iter += 1
		complete = True
		for name, help, default in _options:
			name = name.upper()
			if not env[name]:
				try:
					env[name] = Utils.subst_vars(get_param(name, default).replace('/', os.sep), env)
				except TypeError:
					complete = False
	if not complete:
		lst = [x for x, _, _ in _options if not env[x.upper()]]
		raise conf.errors.WafError('Variable substitution failure %r' % lst)