build_info.libpath.push_back((builder.get_prefix()/"lib").str());
for(FeatureList::iterator i=features.begin(); i!=features.end(); ++i)
- if(lexical_cast<bool>(config.get_option("with_"+i->name).value))
- build_info.defines["WITH_"+toupper(i->name)] = "1";
+ {
+ string ident = "WITH_"+toupper(i->name);
+ string value = config.get_option("with_"+i->name).value;
+ if(!i->choices.empty())
+ build_info.defines[ident] = value;
+ else if(lexical_cast<bool>(value))
+ build_info.defines[ident] = "1";
+ }
bool export_paths = false;
for(list<Component>::iterator i=components.begin(); i!=components.end(); ++i)
{
Feature feat(n);
feat.description = d;
- feat.default_value = "no";
load_sub(feat);
obj.features.push_back(feat);