Commit 069b0bda7273634af02a68b86940b8509c13e1eb
1 parent
5b284968
Nicer script formatting, by Ben Taylor.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3072 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
39 additions
and
45 deletions
configure
| ... | ... | @@ -536,58 +536,52 @@ EOF |
| 536 | 536 | sdl_too_old=no |
| 537 | 537 | |
| 538 | 538 | if test -z "$sdl" ; then |
| 539 | - | |
| 540 | -sdl_config="sdl-config" | |
| 541 | -sdl=no | |
| 542 | -sdl_static=no | |
| 543 | - | |
| 544 | -if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then | |
| 545 | -# win32 cross compilation case | |
| 546 | - sdl_config="i386-mingw32msvc-sdl-config" | |
| 547 | - sdl=yes | |
| 548 | -else | |
| 549 | -# normal SDL probe | |
| 539 | + sdl_config="sdl-config" | |
| 540 | + sdl=no | |
| 541 | + sdl_static=no | |
| 542 | + | |
| 543 | + if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then | |
| 544 | + # win32 cross compilation case | |
| 545 | + sdl_config="i386-mingw32msvc-sdl-config" | |
| 546 | + sdl=yes | |
| 547 | + else | |
| 548 | + # normal SDL probe | |
| 550 | 549 | cat > $TMPC << EOF |
| 551 | 550 | #include <SDL.h> |
| 552 | 551 | #undef main /* We don't want SDL to override our main() */ |
| 553 | 552 | int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } |
| 554 | 553 | EOF |
| 554 | + if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /tmp/qemu-$$-sdl-config.log ; then | |
| 555 | + _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` | |
| 556 | + if test "$_sdlversion" -lt 121 ; then | |
| 557 | + sdl_too_old=yes | |
| 558 | + else | |
| 559 | + if test "$cocoa" = "no" ; then | |
| 560 | + sdl=yes | |
| 561 | + fi | |
| 562 | + fi | |
| 555 | 563 | |
| 556 | -if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /tmp/qemu-$$-sdl-config.log ; then | |
| 557 | -_sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` | |
| 558 | -if test "$_sdlversion" -lt 121 ; then | |
| 559 | -sdl_too_old=yes | |
| 560 | -else | |
| 561 | - if test "$cocoa" = "no" ; then | |
| 562 | - sdl=yes | |
| 563 | - fi | |
| 564 | -fi | |
| 565 | - | |
| 566 | -# static link with sdl ? | |
| 567 | -if test "$sdl" = "yes" ; then | |
| 568 | -aa="no" | |
| 569 | -`$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes" | |
| 570 | -sdl_static_libs=`$sdl_config --static-libs 2>/dev/null` | |
| 571 | -if [ "$aa" = "yes" ] ; then | |
| 572 | - sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" | |
| 573 | -fi | |
| 574 | - | |
| 575 | -if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then | |
| 576 | - sdl_static=yes | |
| 577 | -fi | |
| 578 | - | |
| 579 | -fi # static link | |
| 580 | - | |
| 581 | -fi # sdl compile test | |
| 582 | - | |
| 583 | -fi # cross compilation | |
| 584 | - | |
| 564 | + # static link with sdl ? | |
| 565 | + if test "$sdl" = "yes" ; then | |
| 566 | + aa="no" | |
| 567 | + `$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes" | |
| 568 | + sdl_static_libs=`$sdl_config --static-libs 2>/dev/null` | |
| 569 | + if [ "$aa" = "yes" ] ; then | |
| 570 | + sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" | |
| 571 | + fi | |
| 572 | + | |
| 573 | + if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then | |
| 574 | + sdl_static=yes | |
| 575 | + fi | |
| 576 | + fi # static link | |
| 577 | + fi # sdl compile test | |
| 578 | + fi # cross compilation | |
| 585 | 579 | else |
| 586 | - # Make sure to disable cocoa if sdl was set | |
| 587 | - if test "$sdl" = "yes" ; then | |
| 588 | - cocoa="no" | |
| 589 | - coreaudio="no" | |
| 590 | - fi | |
| 580 | + # Make sure to disable cocoa if sdl was set | |
| 581 | + if test "$sdl" = "yes" ; then | |
| 582 | + cocoa="no" | |
| 583 | + coreaudio="no" | |
| 584 | + fi | |
| 591 | 585 | fi # -z $sdl |
| 592 | 586 | |
| 593 | 587 | ########################################## | ... | ... |