Commit 8ad3a7ddb8fb2f83cf864af610da61e24d7f7f3c

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent d3d9738f

Calculate sdl_libs and sdl_flags and use them everywhere

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 9 additions and 7 deletions
configure
@@ -901,7 +901,9 @@ cat &gt; $TMPC &lt;&lt; EOF @@ -901,7 +901,9 @@ cat &gt; $TMPC &lt;&lt; EOF
901 #undef main /* We don't want SDL to override our main() */ 901 #undef main /* We don't want SDL to override our main() */
902 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } 902 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
903 EOF 903 EOF
904 - if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC `sdl-config --libs 2> /dev/null` > $TMPSDLLOG 2>&1 ; then 904 + sdl_cflags=`sdl-config --cflags 2> /dev/null`
  905 + sdl_libs=`sdl-config --libs 2> /dev/null`
  906 + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > $TMPSDLLOG 2>&1 ; then
905 _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'` 907 _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
906 if test "$_sdlversion" -lt 121 ; then 908 if test "$_sdlversion" -lt 121 ; then
907 sdl_too_old=yes 909 sdl_too_old=yes
@@ -920,7 +922,7 @@ EOF @@ -920,7 +922,7 @@ EOF
920 sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" 922 sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
921 fi 923 fi
922 924
923 - if $cc -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then 925 + if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then
924 sdl_static=yes 926 sdl_static=yes
925 fi 927 fi
926 fi # static link 928 fi # static link
@@ -937,7 +939,7 @@ cat &gt; $TMPC &lt;&lt;EOF @@ -937,7 +939,7 @@ cat &gt; $TMPC &lt;&lt;EOF
937 #endif 939 #endif
938 int main(void) { return 0; } 940 int main(void) { return 0; }
939 EOF 941 EOF
940 - if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC `sdl-config --libs 2> /dev/null` > /dev/null 2>&1 ; then 942 + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2>&1 ; then
941 sdl_x11="yes" 943 sdl_x11="yes"
942 fi 944 fi
943 fi 945 fi
@@ -1658,14 +1660,14 @@ if test &quot;$sdl1&quot; = &quot;yes&quot; ; then @@ -1658,14 +1660,14 @@ if test &quot;$sdl1&quot; = &quot;yes&quot; ; then
1658 if test "$target_softmmu" = "no" -o "$static" = "yes"; then 1660 if test "$target_softmmu" = "no" -o "$static" = "yes"; then
1659 echo "SDL_LIBS=$sdl_static_libs" >> $config_host_mak 1661 echo "SDL_LIBS=$sdl_static_libs" >> $config_host_mak
1660 elif test "$sdl_x11" = "yes" ; then 1662 elif test "$sdl_x11" = "yes" ; then
1661 - echo "SDL_LIBS=`sdl-config --libs` -lX11" >> $config_host_mak 1663 + echo "SDL_LIBS=$sld_libs -lX11" >> $config_host_mak
1662 else 1664 else
1663 - echo "SDL_LIBS=`sdl-config --libs`" >> $config_host_mak 1665 + echo "SDL_LIBS=$sdl_libs`" >> $config_host_mak
1664 fi 1666 fi
1665 if [ "${aa}" = "yes" ] ; then 1667 if [ "${aa}" = "yes" ] ; then
1666 - echo "SDL_CFLAGS=`sdl-config --cflags` `aalib-config --cflags`" >> $config_host_mak 1668 + echo "SDL_CFLAGS=$sdl_cflags `aalib-config --cflags`" >> $config_host_mak
1667 else 1669 else
1668 - echo "SDL_CFLAGS=`sdl-config --cflags`" >> $config_host_mak 1670 + echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak
1669 fi 1671 fi
1670 fi 1672 fi
1671 if test "$cocoa" = "yes" ; then 1673 if test "$cocoa" = "yes" ; then