Commit 1ac88f28ddfb7bde91a23c61aa58bb44539a43f6

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent aae3481d

remove sdl_static. Just do the right thing if static is yes

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 12 additions and 30 deletions
configure
@@ -893,7 +893,6 @@ sdl_too_old=no @@ -893,7 +893,6 @@ sdl_too_old=no
893 893
894 if test "$sdl" = "yes" ; then 894 if test "$sdl" = "yes" ; then
895 sdl=no 895 sdl=no
896 - sdl_static=no  
897 896
898 cat > $TMPC << EOF 897 cat > $TMPC << EOF
899 #include <SDL.h> 898 #include <SDL.h>
@@ -913,16 +912,18 @@ EOF @@ -913,16 +912,18 @@ EOF
913 fi 912 fi
914 913
915 # static link with sdl ? 914 # static link with sdl ?
916 - if test "$sdl" = "yes" ; then 915 + if test "$sdl" = "yes" -a "$static" = "yes" ; then
917 aa="no" 916 aa="no"
918 - `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"  
919 - sdl_static_libs=`sdl-config --static-libs 2>/dev/null`  
920 - if [ "$aa" = "yes" ] ; then  
921 - sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" 917 + sdl_libs=`sdl-config --static-libs 2>/dev/null`
  918 + if test `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` ; then
  919 + sdl_libs="$sdl_libs `aalib-config --static-libs >2 /dev/null`"
  920 + sdl_cflags="$sd_cflags `aalib-config --cflags >2 /dev/null`"
922 fi 921 fi
923 922
924 - if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then  
925 - sdl_static=yes 923 + if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2> /dev/null; then
  924 + :
  925 + else
  926 + sdl=no
926 fi 927 fi
927 fi # static link 928 fi # static link
928 fi # sdl compile test 929 fi # sdl compile test
@@ -1436,9 +1437,6 @@ if test &quot;$darwin&quot; = &quot;yes&quot; ; then @@ -1436,9 +1437,6 @@ if test &quot;$darwin&quot; = &quot;yes&quot; ; then
1436 echo "Cocoa support $cocoa" 1437 echo "Cocoa support $cocoa"
1437 fi 1438 fi
1438 echo "SDL support $sdl" 1439 echo "SDL support $sdl"
1439 -if test "$sdl" != "no" ; then  
1440 - echo "SDL static link $sdl_static"  
1441 -fi  
1442 echo "curses support $curses" 1440 echo "curses support $curses"
1443 echo "curl support $curl" 1441 echo "curl support $curl"
1444 echo "mingw32 support $mingw32" 1442 echo "mingw32 support $mingw32"
@@ -1477,9 +1475,6 @@ echo &quot;preadv support $preadv&quot; @@ -1477,9 +1475,6 @@ echo &quot;preadv support $preadv&quot;
1477 if test $sdl_too_old = "yes"; then 1475 if test $sdl_too_old = "yes"; then
1478 echo "-> Your SDL version is too old - please upgrade to have SDL support" 1476 echo "-> Your SDL version is too old - please upgrade to have SDL support"
1479 fi 1477 fi
1480 -#if test "$sdl_static" = "no"; then  
1481 -# echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output"  
1482 -#fi  
1483 1478
1484 config_host_mak="config-host.mak" 1479 config_host_mak="config-host.mak"
1485 config_host_h="config-host.h" 1480 config_host_h="config-host.h"
@@ -1648,24 +1643,11 @@ echo &quot;TARGET_DIRS=$target_list&quot; &gt;&gt; $config_host_mak @@ -1648,24 +1643,11 @@ echo &quot;TARGET_DIRS=$target_list&quot; &gt;&gt; $config_host_mak
1648 if [ "$build_docs" = "yes" ] ; then 1643 if [ "$build_docs" = "yes" ] ; then
1649 echo "BUILD_DOCS=yes" >> $config_host_mak 1644 echo "BUILD_DOCS=yes" >> $config_host_mak
1650 fi 1645 fi
1651 -if test "$static" = "yes"; then  
1652 - sdl1=$sdl_static  
1653 -else  
1654 - sdl1=$sdl  
1655 -fi  
1656 -if test "$sdl1" = "yes" ; then 1646 +if test "$sdl" = "yes" ; then
1657 echo "#define CONFIG_SDL 1" >> $config_host_h 1647 echo "#define CONFIG_SDL 1" >> $config_host_h
1658 echo "CONFIG_SDL=y" >> $config_host_mak 1648 echo "CONFIG_SDL=y" >> $config_host_mak
1659 - if test "$static" = "yes"; then  
1660 - echo "SDL_LIBS=$sdl_static_libs" >> $config_host_mak  
1661 - else  
1662 - echo "SDL_LIBS=$sdl_libs`" >> $config_host_mak  
1663 - fi  
1664 - if [ "${aa}" = "yes" ] ; then  
1665 - echo "SDL_CFLAGS=$sdl_cflags `aalib-config --cflags`" >> $config_host_mak  
1666 - else  
1667 - echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak  
1668 - fi 1649 + echo "SDL_LIBS=$sdl_libs" >> $config_host_mak
  1650 + echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak
1669 fi 1651 fi
1670 if test "$cocoa" = "yes" ; then 1652 if test "$cocoa" = "yes" ; then
1671 echo "#define CONFIG_COCOA 1" >> $config_host_h 1653 echo "#define CONFIG_COCOA 1" >> $config_host_h