+ load_sub(obj.build_info);
+}
+
+void SourcePackage::Loader::headers(const string &n)
+{
+ IO::print("%s: Note: headers components are deprecated\n", get_source());
+ Component comp(obj, Component::LIBRARY, n);
+ load_sub(comp);
+ const Component::SourceList &sources = comp.get_sources();
+ for(Component::SourceList::const_iterator i=sources.begin(); i!=sources.end(); ++i)
+ install_map[i->str()] = "include/"+comp.get_name();
+}
+
+void SourcePackage::Loader::if_feature(const string &cond)
+{
+ bool match = false;
+ string::size_type equals = cond.find('=');
+ if(equals!=string::npos)
+ {
+ if(equals==0)
+ throw invalid_argument("SourcePackage::Loader::if_feature");
+ bool negate = cond[equals-1]=='!';
+ string name = cond.substr(0, equals-negate);
+ string value = obj.config.get_option("with_"+name).value;
+ match = (value==cond.substr(equals+1))!=negate;
+ value = cond.substr(equals+1);
+ }
+ else
+ {
+ bool negate = (cond[0]=='!');
+ string name = cond.substr(negate);
+ string value = obj.config.get_option("with_"+name).value;
+ match = lexical_cast<bool>(value)!=negate;
+ }
+ obj.builder.get_logger().log("configure", format("%s: feature %s %smatched", obj.name, cond, (match ? "" : "not ")));
+ if(match)
+ load_sub_with(*this);
+}
+
+void SourcePackage::Loader::interface_version(const string &v)
+{
+ obj.interface_version = v;
+ if(obj.version.empty())
+ obj.version = v;
+}
+
+void SourcePackage::Loader::source_tarball()
+{
+ load_sub(*obj.source_tarball);