- bool match = false;
- string::size_type equals = cond.find('=');
- if(equals!=string::npos)
- {
- if(equals==0)
- error("No feature name specified");
- 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);