Revision cd01b4a3 configure

b/configure
283 283
  ;;
284 284
  --disable-vnc-tls) vnc_tls="no"
285 285
  ;;
286
  --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" ; linux_user="no"
287
  ;;
288 286
  --disable-slirp) slirp="no"
289 287
  ;;
290 288
  --disable-vde) vde="no"
......
347 345
  esac
348 346
done
349 347

  
350
if [ "$bsd" = "yes" -o "$darwin" = "yes" -o "$mingw32" = "yes" ] ; then
351
    AIOLIBS=
352
else
353
    # Some Linux architectures (e.g. s390) don't imply -lpthread automatically.
354
    AIOLIBS="-lrt -lpthread"
355
fi
356

  
357 348
# default flags for all hosts
358 349
CFLAGS="$CFLAGS -Wall -O2 -g -fno-strict-aliasing"
359 350
LDFLAGS="$LDFLAGS -g"
......
423 414
echo "  --disable-werror         disable compilation abort on warning"
424 415
echo "  --disable-sdl            disable SDL"
425 416
echo "  --enable-cocoa           enable COCOA (Mac OS X only)"
426
echo "  --enable-mingw32         enable Win32 cross compilation with mingw32"
427 417
echo "  --audio-drv-list=LIST    set audio drivers list:"
428 418
echo "                           Available drivers: $audio_possible_drivers"
429 419
echo "  --audio-card-list=LIST   set list of additional emulated audio cards"
......
467 457
    exit 1
468 458
fi
469 459

  
460
# check compiler to see if we're on mingw32
461
cat > $TMPC <<EOF
462
#include <windows.h>
463
#ifndef _WIN32
464
#error not windows
465
#endif
466
int main(void) {}
467
EOF
468

  
469
if $cc $ARCH_CFLAGS -c -o $TMPO $TMPC 2> /dev/null ; then
470
    mingw32="yes"
471
fi
472

  
470 473
if test "$mingw32" = "yes" ; then
471 474
    linux="no"
472 475
    EXESUF=".exe"
473 476
    oss="no"
477
    linux_user="no"
478
fi
479

  
480
if [ "$bsd" = "yes" -o "$darwin" = "yes" -o "$mingw32" = "yes" ] ; then
481
    AIOLIBS=
482
else
483
    # Some Linux architectures (e.g. s390) don't imply -lpthread automatically.
484
    AIOLIBS="-lrt -lpthread"
474 485
fi
475 486

  
476 487
# Check for gcc4, error if pre-gcc4
......
700 711
    sdl=no
701 712
    sdl_static=no
702 713

  
703
    if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then
704
    # win32 cross compilation case
705
        sdl_config="i386-mingw32msvc-sdl-config"
706
        sdl=yes
707
    else
708
        # normal SDL probe
709 714
cat > $TMPC << EOF
710 715
#include <SDL.h>
711 716
#undef main /* We don't want SDL to override our main() */
712 717
int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
713 718
EOF
714
        if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /tmp/qemu-$$-sdl-config.log ; then
715
            _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
716
            if test "$_sdlversion" -lt 121 ; then
717
                sdl_too_old=yes
718
            else
719
                if test "$cocoa" = "no" ; then
720
                    sdl=yes
721
                fi
719
    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /tmp/qemu-$$-sdl-config.log ; then
720
        _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
721
        if test "$_sdlversion" -lt 121 ; then
722
            sdl_too_old=yes
723
        else
724
            if test "$cocoa" = "no" ; then
725
                sdl=yes
722 726
            fi
727
        fi
723 728

  
724
            # static link with sdl ?
725
            if test "$sdl" = "yes" ; then
726
                aa="no"
727
                `$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
728
                sdl_static_libs=`$sdl_config --static-libs 2>/dev/null`
729
                if [ "$aa" = "yes" ] ; then
730
                    sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
731
                fi
732

  
733
                if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then
734
                    sdl_static=yes
735
                fi
736
            fi # static link
737
        fi # sdl compile test
738
    fi # cross compilation
729
        # static link with sdl ?
730
        if test "$sdl" = "yes" ; then
731
            aa="no"
732
            `$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
733
            sdl_static_libs=`$sdl_config --static-libs 2>/dev/null`
734
            if [ "$aa" = "yes" ] ; then
735
                sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
736
            fi
737

  
738
            if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then
739
                sdl_static=yes
740
            fi
741
        fi # static link
742
    fi # sdl compile test
739 743
else
740 744
    # Make sure to disable cocoa if sdl was set
741 745
    if test "$sdl" = "yes" ; then

Also available in: Unified diff