qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v3 2/4] fixes to the static compilation case for sdl
Date: Wed, 13 Jan 2010 09:52:54 +0100	[thread overview]
Message-ID: <1263372776-23753-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1263372776-23753-1-git-send-email-pbonzini@redhat.com>

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 <pbonzini@redhat.com>
---
        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
 	:
-- 
1.6.5.2

  parent reply	other threads:[~2010-01-13  8:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13  8:52 [Qemu-devel] [PATCH v3 0/4] pkg-config related fixes for cross compilation Paolo Bonzini
2010-01-13  8:52 ` [Qemu-devel] [PATCH v3 1/4] use cross-prefix for pkgconfig Paolo Bonzini
2010-01-13 23:27   ` Anthony Liguori
2010-01-13  8:52 ` Paolo Bonzini [this message]
2010-01-13  8:52 ` [Qemu-devel] [PATCH v3 3/4] use pkg-config for sdl whenever available Paolo Bonzini
2010-01-13  8:52 ` [Qemu-devel] [PATCH v3 4/4] use pkg-config for libcurl " Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1263372776-23753-3-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).