From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzWFw-0006tm-1Q for qemu-devel@nongnu.org; Mon, 01 Jun 2015 16:24:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzWFs-0004pH-PP for qemu-devel@nongnu.org; Mon, 01 Jun 2015 16:24:19 -0400 Received: from mail-wg0-x233.google.com ([2a00:1450:400c:c00::233]:33323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzWFs-0004p1-If for qemu-devel@nongnu.org; Mon, 01 Jun 2015 16:24:16 -0400 Received: by wgez8 with SMTP id z8so123771225wge.0 for ; Mon, 01 Jun 2015 13:24:15 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <556CBF6B.2060202@redhat.com> Date: Mon, 01 Jun 2015 22:24:11 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1433184977-20001-1-git-send-email-kallan@suse.com> <1433184977-20001-2-git-send-email-kallan@suse.com> In-Reply-To: <1433184977-20001-2-git-send-email-kallan@suse.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v4 1/2] qga: add additional win32 cflags and libraries List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirk Allan , qemu-devel@nongnu.org Cc: okrishtal@parallels.com, =?UTF-8?B?QWxleCBCZW5uw6ll?= , mdroth@linux.vnet.ibm.com, sw@weilnetz.de On 01/06/2015 20:56, Kirk Allan wrote: > Test if –-extra-cflags is being used to include flags such as > _WIN32_WINVER and WINVER to gain additional functionality offered > by Windows Vista/2008 and newer. If not, default WINVER to 0x501. > > Add the iphlpapi library to use APIs such as GetAdaptersInfo and > GetAdaptersAddresses. > > Signed-off-by: Kirk Allan Elsewhere on the list, we've discussed putting extra cflags _after_ the configure-detected QEMU_CFLAGS. This would fix the issue in the first part of this patch too. Is iphlpapi available on Windows XP? Paolo > --- > configure | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/configure b/configure > index 4e2f78a..67bd9af 100755 > --- a/configure > +++ b/configure > @@ -708,7 +708,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 $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" > @@ -724,7 +729,7 @@ if test "$mingw32" = "yes" ; then > sysconfdir="\${prefix}" > local_statedir= > confsuffix="" > - libs_qga="-lws2_32 -lwinmm -lpowrprof $libs_qga" > + libs_qga="-lws2_32 -lwinmm -lpowrprof -liphlpapi $libs_qga" > fi > > werror="" >