From nobody Sun Feb 8 12:20:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594893845; cv=none; d=zohomail.com; s=zohoarc; b=Afn1hWiB4QN1SzIppUerBcuj1UsFARu2vhmTP3jW6NmnLFbSUXPNFPY+sBPzOg+BdNOwCcF9hCBPC59b/WvqKJFW3iSFz4X3vH1VDFq0xb6Kbp9/qQP5zTlObQdTQ/F2T5I/x+BAHyxpXbWTDsqX8u7S+8Xn7n3vgBqKCENRhsE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594893845; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8iKrWblDmUe+gy+sIh681lQdlIfxzKPr+zD4c2ssTuY=; b=XQEDJ8TQR66sZENV09StlbPsp0cveAl2Ui73NeSPUrnEqJ4J5BxqY8EVyguYZJG6oHQKv4Nl4FLHfs7wHztHu1WWQxoywp4gXfQ2F3ehwB2oDydIcNGpJWfIqh7vczKFqY/LKs52qImIyzPDL/dnXwHl+zkYIAeU8GCMEkXnItw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1594893845679917.7301527279178; Thu, 16 Jul 2020 03:04:05 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-393-wMLNQCZSPWqAJMgYev5-cQ-1; Thu, 16 Jul 2020 06:03:05 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BCE41802B47; Thu, 16 Jul 2020 10:02:39 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9940760C47; Thu, 16 Jul 2020 10:02:39 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6A42996237; Thu, 16 Jul 2020 10:02:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA2XxO016502 for ; Thu, 16 Jul 2020 06:02:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4D67B2B6DB; Thu, 16 Jul 2020 10:02:33 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4B102DE6D for ; Thu, 16 Jul 2020 10:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594893844; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=8iKrWblDmUe+gy+sIh681lQdlIfxzKPr+zD4c2ssTuY=; b=QO/lB5DaCXBK7MEScxrKApZSbufkTh/3yNQ1kXnV2dzZjTC4Sv5j8rRLlcOZ9Hs61hW/l1 zMTHCB68AIuT3LcKGfQ5jVpaYNAE7JqX5BYwIFKpdFBUCKgaFAHb3zKnFZ6dUISNERRl07 IqOdpKrMLB9KjcAmusbx9Q8nYWeCtb8= X-MC-Unique: wMLNQCZSPWqAJMgYev5-cQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 076/351] meson: add win32 build dependency Date: Thu, 16 Jul 2020 11:55:12 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- configure.ac | 3 --- m4/virt-win-common.m4 | 42 ------------------------------------------ m4/virt-win-mingw.m4 | 28 ---------------------------- meson.build | 26 ++++++++++++++++++++++++++ 4 files changed, 26 insertions(+), 73 deletions(-) delete mode 100644 m4/virt-win-common.m4 delete mode 100644 m4/virt-win-mingw.m4 diff --git a/configure.ac b/configure.ac index 86e4b63ddf7..0b02b259c65 100644 --- a/configure.ac +++ b/configure.ac @@ -291,8 +291,6 @@ AC_SUBST(RUNUTF8) =20 =20 dnl MinGW checks -LIBVIRT_WIN_CHECK_COMMON -LIBVIRT_WIN_CHECK_MINGW LIBVIRT_WIN_CHECK_SYMBOLS LIBVIRT_WIN_CHECK_WINDRES =20 @@ -402,7 +400,6 @@ LIBVIRT_RESULT_YAJL AC_MSG_NOTICE([]) AC_MSG_NOTICE([Windows]) AC_MSG_NOTICE([]) -LIBVIRT_WIN_RESULT_COMMON LIBVIRT_WIN_RESULT_WINDRES AC_MSG_NOTICE([]) AC_MSG_NOTICE([Miscellaneous]) diff --git a/m4/virt-win-common.m4 b/m4/virt-win-common.m4 deleted file mode 100644 index ebc9d0836e4..00000000000 --- a/m4/virt-win-common.m4 +++ /dev/null @@ -1,42 +0,0 @@ -dnl The MinGW common checks -dnl -dnl Copyright (C) 2016 Red Hat, Inc. -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library. If not, see -dnl . -dnl - -AC_DEFUN([LIBVIRT_WIN_CHECK_COMMON], [ - WIN32_EXTRA_CFLAGS=3D - WIN32_EXTRA_LIBS=3D - - case "$host" in - *-*-mingw* ) - WIN32_EXTRA_LIBS=3D"-lole32 -loleaut32" - # If the host is Windows, and shared libraries are disabled, we - # need to add -DLIBVIRT_STATIC to the CFLAGS for proper linking - if test "x$enable_shared" =3D "xno"; then - WIN32_EXTRA_CFLAGS=3D"-DLIBVIRT_STATIC" - fi - ;; - esac - - AC_SUBST([WIN32_EXTRA_CFLAGS]) - AC_SUBST([WIN32_EXTRA_LIBS]) -]) - -AC_DEFUN([LIBVIRT_WIN_RESULT_COMMON], [ - details=3D"CFLAGS=3D'$WIN32_EXTRA_CFLAGS' LIBS=3D'$WIN32_EXTRA_LIBS'" - LIBVIRT_RESULT([MinGW], [$with_win], [$details]) -]) diff --git a/m4/virt-win-mingw.m4 b/m4/virt-win-mingw.m4 deleted file mode 100644 index 3003bcf031f..00000000000 --- a/m4/virt-win-mingw.m4 +++ /dev/null @@ -1,28 +0,0 @@ -dnl The MinGW check -dnl -dnl Copyright (C) 2016 Red Hat, Inc. -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library. If not, see -dnl . -dnl - -AC_DEFUN([LIBVIRT_WIN_CHECK_MINGW], [ - MINGW_EXTRA_LDFLAGS=3D - case "$host" in - *-*-mingw*) - MINGW_EXTRA_LDFLAGS=3D"-no-undefined" - esac - - AC_SUBST([MINGW_EXTRA_LDFLAGS]) -]) diff --git a/meson.build b/meson.build index f5cc0e1d41f..3f05a1c0c6b 100644 --- a/meson.build +++ b/meson.build @@ -1383,6 +1383,27 @@ if not get_option('virtualport').disabled() endif endif =20 +if host_machine.system() =3D=3D 'windows' + ole32_dep =3D cc.find_library('ole32') + oleaut32_dep =3D cc.find_library('oleaut32') + win32_dep =3D declare_dependency( + dependencies: [ + ole32_dep, + oleaut32_dep, + ], + ) + if get_option('default_library') =3D=3D 'static' + win32_flags =3D [ '-DLIBVIRT_STATIC' ] + else + win32_flags =3D [] + endif + win32_link_flags =3D [ '-Wl,-no-undefined' ] +else + win32_dep =3D dependency('', required: false) + win32_flags =3D [] + win32_link_flags =3D [] +endif + =20 # generic build dependencies checks =20 @@ -1501,6 +1522,11 @@ libs_summary =3D { } summary(libs_summary, section: 'Libraries', bool_yn: true) =20 +win_summary =3D { + 'MinGW': host_machine.system() =3D=3D 'windows', +} +summary(win_summary, section: 'Windows', bool_yn: true) + test_summary =3D { 'Coverage': coverage_flags.length() > 0, } --=20 2.26.2