Skip to content

Commit

Permalink
Fix configure args info to include "without" and "disable" options
Browse files Browse the repository at this point in the history
configure引数の検索条件を変更して--without-*や--disable-*ではじまる
オプションを引数情報に含めるように修正する。
  • Loading branch information
ma8ma committed Aug 25, 2019
1 parent 70eb332 commit 745c2c6
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/environment.cpp
Expand Up @@ -69,12 +69,17 @@ std::string ENVIRONMENT::get_configure_args( const int mode )
bool multi = false;

// 省略形として"--with-"や"--enable-"などを取り出す
while( ( found_pos = args.find( "'--with-", search_pos ) ) != std::string::npos ||
( found_pos = args.find( "'--enable-", search_pos ) ) != std::string::npos )
while( ( found_pos = args.find( "'--", search_pos ) ) != std::string::npos )
{
size_t quote_pos = args.find( "'", found_pos + 1 );
const size_t quote_pos = args.find( "'", found_pos + 1 );

if( quote_pos != std::string::npos && quote_pos != end_quote_pos)
if( args.compare( found_pos + 3, 4, "with" ) != 0
&& args.compare( found_pos + 3, 6, "enable" ) != 0
&& args.compare( found_pos + 3, 7, "disable" ) != 0 )
{
search_pos = quote_pos + 1;
}
else if( quote_pos != std::string::npos && quote_pos != end_quote_pos )
{
// 項目が複数の場合は改行かスペースを付与
if( multi )
Expand Down

0 comments on commit 745c2c6

Please sign in to comment.