name(n),
buildable(true),
source(s),
+ config(*this),
conf_done(false),
use_pkgconfig(true),
need_path(false)
Processes configuration options that were most likely obtained from the command
line.
*/
-void Package::configure(const RawOptionMap &opts, unsigned flag)
+void Package::configure(const StringMap &opts, unsigned flag)
{
if(conf_done)
return;
{
init_config();
- RawOptionMap::const_iterator prof=opts.find("profile");
- if(prof!=opts.end())
+ StringMap::const_iterator prof=opts.find("profile");
+ if(prof!=opts.end() && flag)
config.select_profile(prof->second);
else
config.select_last_profile();
config.save();
}
+ config.finish();
+
for(PackageList::iterator i=all_reqs.begin(); i!=all_reqs.end(); ++i)
{
if((*i)->get_need_path())
builder(b),
name(n),
buildable(false),
+ config(*this),
conf_done(false)
{
for(vector<string>::const_iterator i=info.begin(); i!=info.end(); ++i)
config.add_option("arch", "native", "Architecture for cross-compiling");
config.add_option("staticlibs", "local", "Use static libraries");
- const char *home=getenv("HOME");
unsigned flags=get_install_flags();
if(flags)
- config.add_option("prefix", string(home)+"/local"/*"/usr"*/, "Installation prefix");
+ config.add_option("prefix", "$HOME/local", "Installation prefix");
/*if(flags&INCLUDE)
config.add_option("includedir", "$prefix/include", "Header installation directory");
if(flags&BIN)
for(PkgRefList::iterator i=requires.begin(); i!=requires.end(); ++i)
if(i->get_package() && i->get_package()->get_need_path())
config.add_option(i->get_name()+"_path", "", "Path for "+i->get_name());
-
- config.set_source(source);
}
/**