[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH 2/2] configure: fix detection for SDL libs when st

From: Yann E. MORIN
Subject: [Qemu-trivial] [PATCH 2/2] configure: fix detection for SDL libs when static linking
Date: Tue, 28 Aug 2012 01:01:34 +0200

Currently, configure checks for SDL libs either with pkg-config (the
default), or with sdl-config (as a fallback).

As for cURL (previous patch), sdl-config does not have the same set of
options as pkg-config:
  - to check for shared libs, both use the option: --libs
  - to check for static libs:
    - pkg-config uses: --static --libs
    - curl-config uses: --static-libs

Fix that by using the previously introduced $QEMU_XXX_CONFIG_LIBS_FLAGS
variable, the way ot was done previously for cURL.

Also, simplify the code-path for checking for SDL libs with a single,
non-conditional call to $sdlconfig, which is either pkg-config or
sdl-config, as checked just above.

Signed-off-by: "Yann E. MORIN" <address@hidden>
 configure |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index e6a7c14..bf68a9e 100755
--- a/configure
+++ b/configure
@@ -1646,9 +1646,11 @@ fi
 if $pkg_config sdl --modversion >/dev/null 2>&1; then
   sdlconfig="$pkg_config sdl"
+  sdlconfiglibs="--libs"
   _sdlversion=`$sdlconfig --modversion 2>/dev/null | sed 's/[^0-9]//g'`
 elif has ${sdl_config}; then
+  sdlconfiglibs="$QEMU_XXX_CONFIG_LIBS_FLAGS"
   _sdlversion=`$sdlconfig --version | sed 's/[^0-9]//g'`
   if test "$sdl" = "yes" ; then
@@ -1668,11 +1670,7 @@ if test "$sdl" != "no" ; then
 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
   sdl_cflags=`$sdlconfig --cflags 2> /dev/null`
-  if test "$static" = "yes" ; then
-    sdl_libs=`$sdlconfig --static-libs 2>/dev/null`
-  else
-    sdl_libs=`$sdlconfig --libs 2> /dev/null`
-  fi
+  sdl_libs=`$sdlconfig $sdlconfiglibs 2> /dev/null`
   if compile_prog "$sdl_cflags" "$sdl_libs" ; then
     if test "$_sdlversion" -lt 121 ; then

reply via email to

[Prev in Thread] Current Thread [Next in Thread]