From patchwork Wed Jan 13 08:48:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 42791 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6A3F4B7C80 for ; Wed, 13 Jan 2010 19:52:55 +1100 (EST) Received: from localhost ([127.0.0.1]:33587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUyyB-0006fF-A9 for incoming@patchwork.ozlabs.org; Wed, 13 Jan 2010 03:52:51 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUyuY-0005k4-Nl for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:49:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUyuT-0005h7-WF for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:49:06 -0500 Received: from [199.232.76.173] (port=44950 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUyuT-0005gv-RA for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:49:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36791) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUyuT-0004Ed-Cj for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:49:01 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0D8mx5G008643 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 13 Jan 2010 03:49:00 -0500 Received: from localhost.localdomain (vpn2-11-187.ams2.redhat.com [10.36.11.187]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0D8muko012654 for ; Wed, 13 Jan 2010 03:48:59 -0500 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 13 Jan 2010 09:48:53 +0100 Message-Id: <1263372535-20535-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1263372535-20535-1-git-send-email-pbonzini@redhat.com> References: <1263372535-20535-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH v2 2/4] fixes to the static compilation case for sdl X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org After the next commit, pkg-config could be used for the shared library configuration case and sdl-config for static libraries. So I prepare the test here by doing two changes: at the same time I remove useless backslashes from the invocation of grep; 1) fixing a typo ($sd_cflags). The typo has been there since commit 1ac88f2 (remove sdl_static. Just do the right thing if static is yes, 2009-07-27). 2) fixing an erroneous "test `... | grep > /dev/null`" idiom that would never succeed since grep's output would be empty; 3) checking the status code after executing sdl-config --static --libs; this is needed for the next patch only. Signed-off-by: Paolo Bonzini --- 1 and 2 above show that the aalib-config case is not very much used. In addition to this, on my system aalib-config does not support --static-libs at all. So I was very much tempted to nuke the aalib-config handling completely. configure | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index f3584db..b8641b8 100755 --- a/configure +++ b/configure @@ -1009,12 +1009,12 @@ EOF fi fi - # static link with sdl ? + # static link with sdl ? (note: sdl.pc's --static --libs is broken) if test "$sdl" = "yes" -a "$static" = "yes" ; then sdl_libs=`sdl-config --static-libs 2>/dev/null` - if test `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` ; then + if test $? = 0 && echo $sdl_libs | grep -- -laa > /dev/null; then sdl_libs="$sdl_libs `aalib-config --static-libs >2 /dev/null`" - sdl_cflags="$sd_cflags `aalib-config --cflags >2 /dev/null`" + sdl_cflags="$sdl_cflags `aalib-config --cflags >2 /dev/null`" fi if compile_prog "$sdl_cflags" "$sdl_libs" ; then :