[libvirt PATCH 07/26] meson: Use built-in pcap detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Meson already knows how to look for pcap using pkg-config
first, and falling back to pcap-config if that didn't work.

https://mesonbuild.com/Dependencies.html#pcap

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 meson.build | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/meson.build b/meson.build
index 7f6756abca..81f8caae06 100644
--- a/meson.build
+++ b/meson.build
@@ -978,19 +978,7 @@ endif
 
 libpcap_version = '1.5.0'
 if not get_option('libpcap').disabled()
-  libpcap_dep = dependency('libpcap', version: '>=' + libpcap_version, required: false)
-
-  if not libpcap_dep.found()
-    pcap_config_prog = find_program('pcap-config', required: get_option('libpcap'))
-    if pcap_config_prog.found()
-      pcap_args = run_command(pcap_config_prog, '--cflags').stdout().strip().split()
-      pcap_libs = run_command(pcap_config_prog, '--libs').stdout().strip().split()
-      libpcap_dep = declare_dependency(
-        compile_args: pcap_args,
-        link_args: pcap_libs,
-      )
-    endif
-  endif
+  libpcap_dep = dependency('pcap', version: '>=' + libpcap_version, required: get_option('libpcap'))
 else
   libpcap_dep = dependency('', required: false)
 endif
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux