aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure82
1 files changed, 43 insertions, 39 deletions
diff --git a/configure b/configure
index f3ba9df31c..cfc1c5ff72 100755
--- a/configure
+++ b/configure
@@ -283,8 +283,6 @@ for opt do
;;
--disable-vnc-tls) vnc_tls="no"
;;
- --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" ; linux_user="no"
- ;;
--disable-slirp) slirp="no"
;;
--disable-vde) vde="no"
@@ -347,13 +345,6 @@ for opt do
esac
done
-if [ "$bsd" = "yes" -o "$darwin" = "yes" -o "$mingw32" = "yes" ] ; then
- AIOLIBS=
-else
- # Some Linux architectures (e.g. s390) don't imply -lpthread automatically.
- AIOLIBS="-lrt -lpthread"
-fi
-
# default flags for all hosts
CFLAGS="$CFLAGS -Wall -O2 -g -fno-strict-aliasing"
LDFLAGS="$LDFLAGS -g"
@@ -423,7 +414,6 @@ echo " --static enable static build [$static]"
echo " --disable-werror disable compilation abort on warning"
echo " --disable-sdl disable SDL"
echo " --enable-cocoa enable COCOA (Mac OS X only)"
-echo " --enable-mingw32 enable Win32 cross compilation with mingw32"
echo " --audio-drv-list=LIST set audio drivers list:"
echo " Available drivers: $audio_possible_drivers"
echo " --audio-card-list=LIST set list of additional emulated audio cards"
@@ -467,10 +457,31 @@ else
exit 1
fi
+# check compiler to see if we're on mingw32
+cat > $TMPC <<EOF
+#include <windows.h>
+#ifndef _WIN32
+#error not windows
+#endif
+int main(void) {}
+EOF
+
+if $cc $ARCH_CFLAGS -c -o $TMPO $TMPC 2> /dev/null ; then
+ mingw32="yes"
+fi
+
if test "$mingw32" = "yes" ; then
linux="no"
EXESUF=".exe"
oss="no"
+ linux_user="no"
+fi
+
+if [ "$bsd" = "yes" -o "$darwin" = "yes" -o "$mingw32" = "yes" ] ; then
+ AIOLIBS=
+else
+ # Some Linux architectures (e.g. s390) don't imply -lpthread automatically.
+ AIOLIBS="-lrt -lpthread"
fi
# Check for gcc4, error if pre-gcc4
@@ -700,42 +711,35 @@ if test -z "$sdl" ; then
sdl=no
sdl_static=no
- if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then
- # win32 cross compilation case
- sdl_config="i386-mingw32msvc-sdl-config"
- sdl=yes
- else
- # normal SDL probe
cat > $TMPC << EOF
#include <SDL.h>
#undef main /* We don't want SDL to override our main() */
int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
EOF
- 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
- _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
- if test "$_sdlversion" -lt 121 ; then
- sdl_too_old=yes
- else
- if test "$cocoa" = "no" ; then
- sdl=yes
- fi
+ 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
+ _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
+ if test "$_sdlversion" -lt 121 ; then
+ sdl_too_old=yes
+ else
+ if test "$cocoa" = "no" ; then
+ sdl=yes
fi
+ fi
- # static link with sdl ?
- if test "$sdl" = "yes" ; then
- aa="no"
- `$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
- sdl_static_libs=`$sdl_config --static-libs 2>/dev/null`
- if [ "$aa" = "yes" ] ; then
- sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
- fi
-
- if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then
- sdl_static=yes
- fi
- fi # static link
- fi # sdl compile test
- fi # cross compilation
+ # static link with sdl ?
+ if test "$sdl" = "yes" ; then
+ aa="no"
+ `$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
+ sdl_static_libs=`$sdl_config --static-libs 2>/dev/null`
+ if [ "$aa" = "yes" ] ; then
+ sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
+ fi
+
+ if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then
+ sdl_static=yes
+ fi
+ fi # static link
+ fi # sdl compile test
else
# Make sure to disable cocoa if sdl was set
if test "$sdl" = "yes" ; then