From nobody Sun Feb 8 17:46:53 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=1594893689; cv=none; d=zohomail.com; s=zohoarc; b=AdMfQioCNtSZXg/5texP0ZJdxQ3VDiDsybzh5kBFUX8lqLbo6lgUu6JfitlTVdDzL8Vgvne+ruHFXklscXt9eH6BVIQvGkkPnT4bGaKvBMb15DLqHjGNkdw/FSs2vJD5T7fJce8E9P30iIidkRjJuQfcIyG8Tz8knF1DsUH2yk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594893689; 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=/HYwC/l/Tz/a7acKG4UHQ5KGarCDMd8ZhXGdsUXVw/o=; b=gDPIcQXnHxpdmRmH9eCJGacABQj6uFWpZ2bIKeXogEa2RQWGxSBV88/NaV28BvoO8kDRaCCjVG3mzjDfOENrsc7rN2wf70HC3ZcX8/sOaNUVZKI7dm1voCOqA/oiId8d98eygcIXNwSBXBukLJgr1fKeDx9L0M37a0FiLJzL0vg= 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 1594893689141998.7142060935898; Thu, 16 Jul 2020 03:01:29 -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-419-bmkTSFdgO-Kqc32e9qk89w-1; Thu, 16 Jul 2020 06:01:23 -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 2A45C18A1DE5; Thu, 16 Jul 2020 10:01:18 +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 04E5C70596; Thu, 16 Jul 2020 10:01:18 +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 C836E9623A; Thu, 16 Jul 2020 10:01:17 +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 06GA1E7R015802 for ; Thu, 16 Jul 2020 06:01:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id D3B352B6DC; Thu, 16 Jul 2020 10:01:14 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 467232E040 for ; Thu, 16 Jul 2020 10:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594893687; 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=/HYwC/l/Tz/a7acKG4UHQ5KGarCDMd8ZhXGdsUXVw/o=; b=TE4fzjLz5dprPdPEKIT2BSephU/KfJy2ydFhT3dql7ied3xATiFKAKfelWCPep8KuFsNc7 XZA3XcS9TW5ysFsjPVZNNNp03tjHe8/Kk4vcAYnYl7X1nxEJ0YeWi1OnRNWWHEJzPsIQf3 KEelQjOcdlXV/+nyVPvYod/Gzw9WEtY= X-MC-Unique: bmkTSFdgO-Kqc32e9qk89w-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 044/351] meson: add dlopen build dependency Date: Thu, 16 Jul 2020 11:54:40 +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 | 2 -- m4/virt-dlopen.m4 | 45 --------------------------------------------- meson.build | 10 ++++++++++ 3 files changed, 10 insertions(+), 47 deletions(-) delete mode 100644 m4/virt-dlopen.m4 diff --git a/configure.ac b/configure.ac index 9bb397d8e3e..0dc9dc3bcfb 100644 --- a/configure.ac +++ b/configure.ac @@ -141,7 +141,6 @@ LIBVIRT_ARG_VIRTUALPORT LIBVIRT_ARG_WIRESHARK LIBVIRT_ARG_YAJL =20 -LIBVIRT_CHECK_DLOPEN LIBVIRT_CHECK_FIREWALLD LIBVIRT_CHECK_FIREWALLD_ZONE LIBVIRT_CHECK_FUSE @@ -460,7 +459,6 @@ LIBVIRT_RESULT_DRIVER_MODULES AC_MSG_NOTICE([]) AC_MSG_NOTICE([Libraries]) AC_MSG_NOTICE([]) -LIBVIRT_RESULT_DLOPEN LIBVIRT_RESULT_FIREWALLD LIBVIRT_RESULT_FIREWALLD_ZONE LIBVIRT_RESULT_FUSE diff --git a/m4/virt-dlopen.m4 b/m4/virt-dlopen.m4 deleted file mode 100644 index 412ce79adec..00000000000 --- a/m4/virt-dlopen.m4 +++ /dev/null @@ -1,45 +0,0 @@ -dnl The dlopen library -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_CHECK_DLOPEN], [ - - with_dlopen=3Dyes - with_dlfcn=3Dyes - - AC_CHECK_HEADER([dlfcn.h],, [with_dlfcn=3Dno]) - AC_SEARCH_LIBS([dlopen], [dl],, [with_dlopen=3Dno]) - - case $ac_cv_search_dlopen:$host_os in - 'none required'* | *:mingw* | *:msvc*) - DLOPEN_LIBS=3D ;; - no*) - AC_MSG_ERROR([Unable to find dlopen()]) ;; - *) - if test "x$with_dlfcn" !=3D "xyes"; then - AC_MSG_ERROR([Unable to find dlfcn.h]) - fi - DLOPEN_LIBS=3D$ac_cv_search_dlopen ;; - esac - - AC_SUBST([DLOPEN_LIBS]) -]) - -AC_DEFUN([LIBVIRT_RESULT_DLOPEN], [ - LIBVIRT_RESULT_LIB([DLOPEN]) -]) diff --git a/meson.build b/meson.build index 01525c05055..31f4e730ce7 100644 --- a/meson.build +++ b/meson.build @@ -1024,6 +1024,15 @@ if devmapper_dep.found() conf.set('WITH_DEVMAPPER', 1) endif =20 +dlopen_use =3D host_machine.system() !=3D 'windows' +dlopen_dep =3D cc.find_library('dl', required: dlopen_use) +if dlopen_dep.found() + if not cc.has_header('dlfcn.h') + error('Unable to find dlfcn.h') + endif + conf.set('HAVE_DLFCN_H', 1) +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) @@ -1142,6 +1151,7 @@ libs_summary =3D { 'capng': capng_dep.found(), 'curl': curl_dep.found(), 'dbus': dbus_dep.found(), + 'dlopen': dlopen_dep.found(), 'readline': readline_dep.found(), } summary(libs_summary, section: 'Libraries', bool_yn: true) --=20 2.26.2