From nobody Fri Apr 26 18:24:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 154039288682182.1089499047032; Wed, 24 Oct 2018 07:54:46 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62120C05D3E1; Wed, 24 Oct 2018 14:54:43 +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 E6FF82C8B0; Wed, 24 Oct 2018 14:54:40 +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 F3CAF4CA94; Wed, 24 Oct 2018 14:54:36 +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 w9ODqNoU001415 for ; Wed, 24 Oct 2018 09:52:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 35CC31C930; Wed, 24 Oct 2018 13:52:23 +0000 (UTC) Received: from burns.redhat.com (unknown [10.40.205.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id 50A7D1C938; Wed, 24 Oct 2018 13:52:18 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 24 Oct 2018 14:52:12 +0100 Message-Id: <7b8d2f4ee0bd5866d33c391cda928b10a2e9eeb8.1540389101.git.mprivozn@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: mkletzan@redhat.com Subject: [libvirt] [snmp PATCH] configure: Fix MIB_DIR's prefix 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 24 Oct 2018 14:54:45 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" So far we are taking whatever is `net-snmp-config --default-mibdirs` returns and using that as MIB_DIR to install our MIB. This has a drawback that it ignores whatever prefix user specifies to configure script (which is used by `make distcheck` too). The fix consists of querying for net-snmp-config --prefix and replacing that in MIB_DIR var. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- This is similar to what we do for wireshark in libvirt. configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index baac0e1..f729ac1 100644 --- a/configure.ac +++ b/configure.ac @@ -73,6 +73,14 @@ if test "x$with_mibdir" =3D "x" ; then MIB_DIR=3D$(echo $MIB_DIR | awk -F : '{print $NF}') =20 AC_MSG_RESULT([found $MIB_DIR]) + + dnl Replace net-snmp's exec_prefix with our own. + dnl Note that ${exec_prefix} is kept verbatim at this point in time, + dnl and will only be expanded later, when make is called: this makes + dnl it possible to override such prefix at compilation or installation + dnl time + MIB_PREFIX=3D"`$SNMP_CONFIG --prefix`" + MIB_DIR=3D'${exec_prefix}'"${MIB_DIR#$MIB_PREFIX}" else AC_MSG_CHECKING([accessibility of $with_mibdir]) if test ! -d "$with_mibdir" ; then --=20 2.18.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list