From nobody Sun Feb 8 15:37:38 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=1594893727; cv=none; d=zohomail.com; s=zohoarc; b=Z183rOgexSeUbrmNEreZTjw8EyS9YyYbRMUJOORkXl7bQFrp4sPHijMnqOILKI9h8MBe6OWAmM/mphrxMZ3+ht94vNXr8veOgXs6HbZi9nUHuGTY01QyngLm7e9DOtXHCiMOb0PVOLLtFXQAz8U73SdvNtQldoO3PlqtuOAyZDE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594893727; 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=UkYDaYoN9JloIQlL2slU+QioIho1IVfppR1g1OVjqP4=; b=V9YnkMgyH77dTpFNggZkw+K1iS0Z0DQjzFf8je1cLapyEPb7tl0q4ctdsBNgvzjT2SZ2M9wc8zXNZ7Pf/pmYes+5sRF7hb119YLQB6lSY2BirwVZJtlZfEanuOHOAUdoCYcHb4LDTSvCCLukEnRfAhS/PHmFhVrkjS5jt1I1qeI= 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 159489372771647.061096351988; Thu, 16 Jul 2020 03:02:07 -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-238-ozUZzUzTPzKcMaVzJVkWvw-1; Thu, 16 Jul 2020 06:01:19 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7F2EB10059AA; Thu, 16 Jul 2020 10:01:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C8872E03B; Thu, 16 Jul 2020 10:01:13 +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 258F6180476B; Thu, 16 Jul 2020 10:01:13 +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 06GA1BwS015764 for ; Thu, 16 Jul 2020 06:01:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0D86F2E036; Thu, 16 Jul 2020 10:01:11 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 783762E034 for ; Thu, 16 Jul 2020 10:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594893726; 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=UkYDaYoN9JloIQlL2slU+QioIho1IVfppR1g1OVjqP4=; b=HVz9RQIw3Ynr57Yj2Zch7qykzi87re69HQmvgnWTzSqulDZXN0M9PVxr2nXWQleX3D/LUy ua2UsQg8mmkhDs0u/IEo9Ag3rCNZVOrafbUtkJEEgMpFeSTmgfvXQZuGSy6z+obAkC+DUG gn42V4eXn8ifmcS8GTdKrOQTBQ3fR50= X-MC-Unique: ozUZzUzTPzKcMaVzJVkWvw-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 042/351] meson: add dbus build dependency Date: Thu, 16 Jul 2020 11:54:38 +0200 Message-Id: <55664405617394431e13bb0afbb698d77938e098.1594891445.git.phrdina@redhat.com> 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.84 on 10.5.11.23 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" Convert #if VAL into #ifdef VAL in order to make meson more readable and because it's not necessary to have both defines existing. Signed-off-by: Pavel Hrdina --- configure.ac | 3 --- m4/virt-dbus.m4 | 41 ----------------------------------------- meson.build | 17 +++++++++++++++++ meson_options.txt | 1 + 4 files changed, 18 insertions(+), 44 deletions(-) delete mode 100644 m4/virt-dbus.m4 diff --git a/configure.ac b/configure.ac index f89ea566c03..3499b372036 100644 --- a/configure.ac +++ b/configure.ac @@ -114,7 +114,6 @@ fi =20 # Check for compiler and library settings. =20 -LIBVIRT_ARG_DBUS LIBVIRT_ARG_FIREWALLD LIBVIRT_ARG_FIREWALLD_ZONE LIBVIRT_ARG_FUSE @@ -142,7 +141,6 @@ LIBVIRT_ARG_VIRTUALPORT LIBVIRT_ARG_WIRESHARK LIBVIRT_ARG_YAJL =20 -LIBVIRT_CHECK_DBUS LIBVIRT_CHECK_DEVMAPPER LIBVIRT_CHECK_DLOPEN LIBVIRT_CHECK_FIREWALLD @@ -463,7 +461,6 @@ LIBVIRT_RESULT_DRIVER_MODULES AC_MSG_NOTICE([]) AC_MSG_NOTICE([Libraries]) AC_MSG_NOTICE([]) -LIBVIRT_RESULT_DBUS LIBVIRT_RESULT_DLOPEN LIBVIRT_RESULT_FIREWALLD LIBVIRT_RESULT_FIREWALLD_ZONE diff --git a/m4/virt-dbus.m4 b/m4/virt-dbus.m4 deleted file mode 100644 index f5af1a8022b..00000000000 --- a/m4/virt-dbus.m4 +++ /dev/null @@ -1,41 +0,0 @@ -dnl The libdbus.so library -dnl -dnl Copyright (C) 2012-2014 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_ARG_DBUS],[ - LIBVIRT_ARG_WITH_FEATURE([DBUS], [dbus-1], [check], [1.0.0]) -]) - -AC_DEFUN([LIBVIRT_CHECK_DBUS],[ - LIBVIRT_CHECK_PKG([DBUS], [dbus-1], [1.0.0]) - - if test "$with_dbus" =3D "yes" ; then - old_CFLAGS=3D"$CFLAGS" - old_LIBS=3D"$LIBS" - CFLAGS=3D"$CFLAGS $DBUS_CFLAGS" - LIBS=3D"$LIBS $DBUS_LIBS" - AC_CHECK_FUNCS([dbus_watch_get_unix_fd]) - AC_CHECK_TYPES([DBusBasicValue], [], [], [[#include ]]) - CFLAGS=3D"$old_CFLAGS" - LIBS=3D"$old_LIBS" - fi -]) - -AC_DEFUN([LIBVIRT_RESULT_DBUS],[ - LIBVIRT_RESULT_LIB([DBUS]) -]) diff --git a/meson.build b/meson.build index 26378134118..081641c8617 100644 --- a/meson.build +++ b/meson.build @@ -995,6 +995,22 @@ if curl_dep.found() conf.set('WITH_CURL', 1) endif =20 +dbus_version =3D '1.0.0' +dbus_dep =3D dependency('dbus-1', version: '>=3D' + dbus_version, required= : get_option('dbus')) +if dbus_dep.found() + conf.set('WITH_DBUS', 1) + + function =3D 'dbus_watch_get_unix_fd' + if cc.has_function(function, dependencies: dbus_dep) + conf.set('HAVE_@0@'.format(function.to_upper()), 1) + endif + + type =3D 'DBusBasicValue' + if cc.has_type(type, dependencies: dbus_dep, prefix: '#include ') + conf.set('HAVE_@0@'.format(type.to_upper()), 1) + endif +endif + # readline 7.0 is the first version which includes pkg-config support readline_version =3D '7.0' readline_dep =3D dependency('readline', version: '>=3D' + readline_version= , required: false) @@ -1112,6 +1128,7 @@ libs_summary =3D { 'blkid': blkid_dep.found(), 'capng': capng_dep.found(), 'curl': curl_dep.found(), + 'dbus': dbus_dep.found(), 'readline': readline_dep.found(), } summary(libs_summary, section: 'Libraries', bool_yn: true) diff --git a/meson_options.txt b/meson_options.txt index f0d5e05b469..957c88a1622 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -17,4 +17,5 @@ option('bash_completion_dir', type: 'string', value: '', = description: 'directory option('blkid', type: 'feature', value: 'auto', description: 'blkid suppor= t') option('capng', type: 'feature', value: 'auto', description: 'cap-ng suppo= rt') option('curl', type: 'feature', value: 'auto', description: 'curl support') +option('dbus', type: 'feature', value: 'auto', description: 'dbus-1 suppor= t') option('readline', type: 'feature', value: 'auto', description: 'readline = support') --=20 2.26.2