From 745c2c679f07f7b2f50290b2d8cc7a948be08931 Mon Sep 17 00:00:00 2001 From: Masayuki Yamamoto Date: Fri, 23 Aug 2019 20:39:14 +0900 Subject: [PATCH] Fix configure args info to include "without" and "disable" options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit configure引数の検索条件を変更して--without-*や--disable-*ではじまる オプションを引数情報に含めるように修正する。 --- src/environment.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/environment.cpp b/src/environment.cpp index 5e84c6eb3..e81ff3663 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -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 )