[libvirt PATCH 08/15] meson: add libnl build option

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 libvirt.spec.in   | 1 +
 meson.build       | 8 +++++---
 meson_options.txt | 1 +
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index c0d84c0e75..7c4ccaa659 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1168,6 +1168,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
            -Dyajl=enabled \
            %{?arg_sanlock} \
            -Dlibpcap=enabled \
+           -Dlibnl=enabled \
            -Daudit=enabled \
            -Ddtrace=enabled \
            %{?arg_firewalld} \
diff --git a/meson.build b/meson.build
index bb01731264..b6e0b1cb76 100644
--- a/meson.build
+++ b/meson.build
@@ -1075,9 +1075,9 @@ libiscsi_version = '1.18.0'
 libiscsi_dep = dependency('libiscsi', version: '>=' + libiscsi_version, required: get_option('libiscsi'))
 
 libnl_version = '3.0'
-if host_machine.system() == 'linux'
-  libnl_dep = dependency('libnl-3.0', version: '>=' + libnl_version, required: false)
-  libnl_route_dep = dependency('libnl-route-3.0', version: '>=' + libnl_version, required: false)
+if not get_option('libnl').disabled() and host_machine.system() == 'linux'
+  libnl_dep = dependency('libnl-3.0', version: '>=' + libnl_version, required: get_option('libnl'))
+  libnl_route_dep = dependency('libnl-route-3.0', version: '>=' + libnl_version, required: get_option('libnl'))
 
   if libnl_dep.found() and libnl_route_dep.found()
     libnl_dep = declare_dependency(
@@ -1085,6 +1085,8 @@ if host_machine.system() == 'linux'
     )
     conf.set('WITH_LIBNL', 1)
   endif
+elif get_option('libnl').enabled()
+  error('libnl can be enabled only on linux')
 else
   libnl_dep = dependency('', required: false)
 endif
diff --git a/meson_options.txt b/meson_options.txt
index 36aa763526..b3f4d7744f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -21,6 +21,7 @@ option('curl', type: 'feature', value: 'auto', description: 'curl support')
 option('fuse', type: 'feature', value: 'auto', description: 'fuse support')
 option('glusterfs', type: 'feature', value: 'auto', description: 'glusterfs support')
 option('libiscsi', type: 'feature', value: 'auto', description: 'libiscsi support')
+option('libnl', type: 'feature', value: 'auto', description: 'libnl support')
 option('libpcap', type: 'feature', value: 'auto', description: 'libpcap support')
 option('libssh', type: 'feature', value: 'auto', description: 'libssh support')
 option('libssh2', type: 'feature', value: 'auto', description: 'libssh2 support')
-- 
2.26.2




[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