meson: add libnl build option

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Pavel Hrdina 2020-10-08 13:01:29 +02:00
parent 8485287485
commit b3e2ef408b
3 changed files with 7 additions and 3 deletions

View File

@ -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} \

View File

@ -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

View File

@ -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')