configure: _WIN32_WINNT should be set when WINVER is set
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Mon, 19 Oct 2015 05:05:15 +0000 (14:05 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Mon, 19 Oct 2015 06:30:40 +0000 (15:30 +0900)
_WIN32_WINNT can be set different value from WINVER. But _WIN32_WINNT
and WINVER are used independantly in header files for determining which
API can be used for specified Windows version. So, it is better that
_WIN32_WINNT and WINVER has same value.

And if _WIN32_WINNT >= 0x0600 (Vista or newer) some APIs need ole32.

Change-Id: I6a1900e80327caad4dc0e7709dec3a1c981b7b0d
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
configure

index 308412ed8436dbeb01affb9d1cce95be94613246..c2902b115e4e5d2d2cb5d7c1059684216e625d46 100755 (executable)
--- a/configure
+++ b/configure
@@ -604,6 +604,8 @@ MINGW32*)
   else
     audio_drv_list=""
   fi
+  LIBS="-lole32 $LIBS"
+  libs_qga="-lole32 $libs_qga"
 ;;
 GNU/kFreeBSD)
   bsd="yes"
@@ -4572,7 +4574,7 @@ fi
 # set WINVER
 
 if test "$mingw32" = "yes" ; then
-  QEMU_CFLAGS="-DWINVER=$winver $QEMU_CFLAGS"
+  QEMU_CFLAGS="-DWINVER=$winver -D_WIN32_WINNT=$winver $QEMU_CFLAGS"
 fi
 
 ########################################