- config.load();
-
- if(flag && config.update(opts))
- builder.get_logger().log("configure", format("Configuration of %s changed", name));
-
- config.finish();
-
- for(ConditionList::iterator i=conditions.begin(); i!=conditions.end(); ++i)
- if(i->eval())
- {
- const StringList &reqs = i->get_requires();
- for(StringList::const_iterator j=reqs.begin(); j!=reqs.end(); ++j)
- if(Package *pkg = builder.get_package_manager().find_package(*j))
- requires.push_back(pkg);
- }
-
- for(PackageList::iterator i=requires.begin(); i!=requires.end(); ++i)
- {
- BinaryPackage *bpkg = dynamic_cast<BinaryPackage *>(*i);
- if(bpkg && bpkg->get_need_path())
- bpkg->set_path(config.get_option(bpkg->get_name()+"_path").value);
- }
-
- deps_cache.load();
-
- for(ComponentList::iterator i=components.begin(); i!=components.end(); ++i)
- i->configure(opts, flag);
-}
-
-void SourcePackage::init_config()
-{
- for(FeatureList::iterator i=features.begin(); i!=features.end(); ++i)
- config.add_option("with_"+i->name, i->def_value, i->descr);
-
- for(PackageList::const_iterator i=requires.begin(); i!=requires.end(); ++i)
- {
- BinaryPackage *bpkg = dynamic_cast<BinaryPackage *>(*i);
- if(bpkg && bpkg->get_need_path())
- config.add_option(bpkg->get_name()+"_path", "/usr", "Path for "+bpkg->get_name());
- }
-}
-
-void SourcePackage::create_build_info()
-{