From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E7C0AA04BC; Thu, 8 Oct 2020 19:06:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 31A941B9F8; Thu, 8 Oct 2020 19:06:00 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 8BD581B679 for ; Thu, 8 Oct 2020 19:05:58 +0200 (CEST) IronPort-SDR: OxV5b507eMiQ9qLo50aMAJPppj5q7KyCGhpdvvKo4eEfk59uF8xf5jUyKcs8v69J8uTkLUgIG8 6a7ceFRY37Jg== X-IronPort-AV: E=McAfee;i="6000,8403,9768"; a="162735010" X-IronPort-AV: E=Sophos;i="5.77,351,1596524400"; d="scan'208";a="162735010" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 10:05:56 -0700 IronPort-SDR: 0GinIEnP7voDNVSdNGNoU74PlQgWmtjYj1/NUjveN7U/PFJeWxiQAiqK/KrTU5oFvf+cPg7g1v Uhnxbrly44cQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,351,1596524400"; d="scan'208";a="298155630" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by fmsmga008.fm.intel.com with ESMTP; 08 Oct 2020 10:05:55 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Thu, 8 Oct 2020 18:05:36 +0100 Message-Id: <20201008170536.124111-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [RFC PATCH] build: use libpcap only from pkg-config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" All recent linux distro's - including RHEL 8 and Ubuntu 18.04 - provide a pkg-config file for libpcap, and using other methods of finding the library can cause issues when cross-compiling, so we can limit build support for pcap versions without a .pc file. Signed-off-by: Bruce Richardson --- config/meson.build | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/config/meson.build b/config/meson.build index 69f2aeb60..edc6c195a 100644 --- a/config/meson.build +++ b/config/meson.build @@ -163,13 +163,7 @@ if libbsd.found() endif # check for pcap -pcap_dep = dependency('pcap', required: false) -if pcap_dep.found() - # pcap got a pkg-config file only in 1.9.0 and before that meson uses - # an internal pcap-config finder, which is not compatible with - # cross-compilation, so try to fallback to find_library - pcap_dep = cc.find_library('pcap', required: false) -endif +pcap_dep = dependency('libpcap', required: false, method: 'pkg-config') if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep) dpdk_conf.set('RTE_PORT_PCAP', 1) dpdk_extra_ldflags += '-lpcap' -- 2.25.1