Commit 8ad3a7ddb8fb2f83cf864af610da61e24d7f7f3c
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 > $TMPC << EOF |
901 | 901 | #undef main /* We don't want SDL to override our main() */ |
902 | 902 | int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } |
903 | 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 | 907 | _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'` |
906 | 908 | if test "$_sdlversion" -lt 121 ; then |
907 | 909 | sdl_too_old=yes |
... | ... | @@ -920,7 +922,7 @@ EOF |
920 | 922 | sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" |
921 | 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 | 926 | sdl_static=yes |
925 | 927 | fi |
926 | 928 | fi # static link |
... | ... | @@ -937,7 +939,7 @@ cat > $TMPC <<EOF |
937 | 939 | #endif |
938 | 940 | int main(void) { return 0; } |
939 | 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 | 943 | sdl_x11="yes" |
942 | 944 | fi |
943 | 945 | fi |
... | ... | @@ -1658,14 +1660,14 @@ if test "$sdl1" = "yes" ; then |
1658 | 1660 | if test "$target_softmmu" = "no" -o "$static" = "yes"; then |
1659 | 1661 | echo "SDL_LIBS=$sdl_static_libs" >> $config_host_mak |
1660 | 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 | 1664 | else |
1663 | - echo "SDL_LIBS=`sdl-config --libs`" >> $config_host_mak | |
1665 | + echo "SDL_LIBS=$sdl_libs`" >> $config_host_mak | |
1664 | 1666 | fi |
1665 | 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 | 1669 | else |
1668 | - echo "SDL_CFLAGS=`sdl-config --cflags`" >> $config_host_mak | |
1670 | + echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak | |
1669 | 1671 | fi |
1670 | 1672 | fi |
1671 | 1673 | if test "$cocoa" = "yes" ; then | ... | ... |