[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 1/2] qga: add additional win32 cflags and librari
From: |
Kirk Allan |
Subject: |
[Qemu-devel] [PATCH v2 1/2] qga: add additional win32 cflags and libraries |
Date: |
Wed, 1 Apr 2015 09:39:54 -0600 |
Use –extra-cflags to set cflags to such as _WIN32_WINVER and WINVER to
add additional functionality offered in Windows Visat/2008 and newer.
Add the -DARCH_$ARCH cflag.
Add the iphlpapi library to use APIs such as GetAdaptersInfo and
GetAdaptersAddresses.
Signed-off-by: Kirk Allan <address@hidden>
---
configure | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 09c9225..3d78bc4 100755
--- a/configure
+++ b/configure
@@ -700,7 +700,12 @@ fi
if test "$mingw32" = "yes" ; then
EXESUF=".exe"
DSOSUF=".dll"
- QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
+ # --extra-cflags can be used to set flags such as -DWINVER and
+ # -D_WIN32_WINNT. If -DWINVER has not be set, default to XP (0x501).
+ if [ "$QEMU_CFLAGS" = "${QEMU_CFLAGS%-DWINVER=*}" ] ; then
+ QEMU_CFLAGS="-DWINVER=0x501 $QEMU_CFLAGS"
+ fi
+ QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DARCH_$ARCH $QEMU_CFLAGS"
# enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
@@ -718,7 +723,7 @@ EOF
sysconfdir="\${prefix}"
local_statedir=
confsuffix=""
- libs_qga="-lws2_32 -lwinmm -lpowrprof $libs_qga"
+ libs_qga="-lws2_32 -lwinmm -lpowrprof -liphlpapi $libs_qga"
fi
werror=""
--
1.8.5.6