qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 20/20] move SDL static configuration near SDL detect


From: quintela
Subject: [Qemu-devel] [PATCH 20/20] move SDL static configuration near SDL detection
Date: Tue, 21 Jul 2009 00:13:30 +0200

From: Juan Quintela <address@hidden>


Signed-off-by: Juan Quintela <address@hidden>
---
 configure |   29 +++++++++--------------------
 1 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/configure b/configure
index a57f7f6..6cf71f8 100755
--- a/configure
+++ b/configure
@@ -901,7 +901,6 @@ sdl_too_old=no

 if test "$sdl" = "yes" ; then
     sdl=no
-    sdl_static=no

 cat > $TMPC << EOF
 #include <SDL.h>
@@ -921,17 +920,19 @@ EOF
         fi

         # static link with sdl ?
-        if test "$sdl" = "yes" ; then
+        if test "$sdl" = "yes" -a "$static" = "yes" ; then
             aa="no"
             `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` 
&& aa="yes"
-            sdl_static_libs=`sdl-config --static-libs 2>/dev/null`
+            sdl_libs=`sdl-config --static-libs 2>/dev/null`
             if [ "$aa" = "yes" ] ; then
-                sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
+                sdl_libs="$sdl_libs `aalib-config --static-libs`"
                 sdl_cflags="$sdl_cflags `aalib-config --cflags`"
             fi

-            if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_static_libs > 
/dev/null 2> /dev/null; then
-                sdl_static=yes
+            if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > 
/dev/null 2> /dev/null; then
+                :
+            else
+                sdl=no
             fi
         fi # static link
     fi # sdl compile test
@@ -1444,9 +1445,6 @@ if test "$darwin" = "yes" ; then
     echo "Cocoa support     $cocoa"
 fi
 echo "SDL support       $sdl"
-if test "$sdl" != "no" ; then
-    echo "SDL static link   $sdl_static"
-fi
 echo "curses support    $curses"
 echo "curl support      $curl"
 echo "mingw32 support   $mingw32"
@@ -1675,19 +1673,10 @@ echo "TARGET_DIRS=$target_list" >> $config_host_mak
 if [ "$build_docs" = "yes" ] ; then
   echo "BUILD_DOCS=yes" >> $config_host_mak
 fi
-if test "$static" = "yes"; then
-  sdl1=$sdl_static
-else
-  sdl1=$sdl
-fi
-if test "$sdl1" = "yes" ; then
+if test "$sdl" = "yes" ; then
   echo "#define CONFIG_SDL 1" >> $config_host_h
   echo "CONFIG_SDL=y" >> $config_host_mak
-  if test "$static" = "yes"; then
-    LIBS="$LIBS $sdl_static_libs"
-  else
-    LIBS="$LIBS $sdl_libs"
-  fi
+  LIBS="$LIBS $sdl_libs"
   echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak
 fi
 if test "$cocoa" = "yes" ; then
-- 
1.6.2.5





reply via email to

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