From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45304 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHHNJ-0003KG-BA for qemu-devel@nongnu.org; Wed, 26 May 2010 10:14:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHHHj-0003rX-F9 for qemu-devel@nongnu.org; Wed, 26 May 2010 10:08:40 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:61762) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHHHj-0003qp-9P for qemu-devel@nongnu.org; Wed, 26 May 2010 10:08:39 -0400 Received: by mail-wy0-f173.google.com with SMTP id 28so1006241wyf.4 for ; Wed, 26 May 2010 07:08:39 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 26 May 2010 16:08:17 +0200 Message-Id: <1274882909-9800-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1274882909-9800-1-git-send-email-pbonzini@redhat.com> References: <1274882909-9800-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 02/14] avoid using expr in configure List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Just a personal preference against duplicating hieroglyphics. Signed-off-by: Paolo Bonzini --- configure | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configure b/configure index e8dd2ef..5a7cb6e 100755 --- a/configure +++ b/configure @@ -928,6 +928,13 @@ if test -z "$target_list" ; then echo "No targets enabled" exit 1 fi +# see if system emulation was really requested +case " $target_list " in + *"-softmmu "*) softmmu=yes + ;; + *) softmmu=no + ;; +esac feature_not_found() { feature=$1 @@ -2282,7 +2289,7 @@ bsd) esac tools= -if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then +if test "$softmmu" = yes ; then tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then tools="qemu-nbd\$(EXESUF) $tools" @@ -2298,7 +2305,7 @@ echo "TOOLS=$tools" >> $config_host_mak roms= if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \ "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \ - `expr "$target_list" : ".*softmmu.*"` != 0 ; then + "$softmmu" = yes ; then roms="optionrom" fi echo "ROMS=$roms" >> $config_host_mak -- 1.6.6.1