mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
meson: properly handle libpcap if it's explicitly disabled
If libpcap is detected using pkg-config it would ignore the libpcap option. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
87e855a4e9
commit
c8be9ccc36
@ -1101,7 +1101,9 @@ if libparted_dep.found()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
libpcap_version = '1.5.0'
|
libpcap_version = '1.5.0'
|
||||||
|
if not get_option('libpcap').disabled()
|
||||||
libpcap_dep = dependency('libpcap', version: '>=' + libpcap_version, required: false)
|
libpcap_dep = dependency('libpcap', version: '>=' + libpcap_version, required: false)
|
||||||
|
|
||||||
if not libpcap_dep.found()
|
if not libpcap_dep.found()
|
||||||
pcap_config_prog = find_program('pcap-config', required: get_option('libpcap'))
|
pcap_config_prog = find_program('pcap-config', required: get_option('libpcap'))
|
||||||
if pcap_config_prog.found()
|
if pcap_config_prog.found()
|
||||||
@ -1113,6 +1115,9 @@ if not libpcap_dep.found()
|
|||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
libpcap_dep = dependency('', required: false)
|
||||||
|
endif
|
||||||
if libpcap_dep.found()
|
if libpcap_dep.found()
|
||||||
conf.set('WITH_LIBPCAP', 1)
|
conf.set('WITH_LIBPCAP', 1)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user