2020-06-17 23:54:09 +00:00
|
|
|
if conf.has('WITH_BSD_NSS')
|
|
|
|
nss_sym_file = 'libvirt_nss_bsd.syms'
|
|
|
|
nss_guest_sym_file = nss_sym_file
|
|
|
|
nss_so_ver = '1'
|
|
|
|
nss_prefix = ''
|
|
|
|
else
|
|
|
|
nss_sym_file = 'libvirt_nss.syms'
|
|
|
|
nss_guest_sym_file = 'libvirt_guest_nss.syms'
|
|
|
|
nss_so_ver = '2'
|
|
|
|
nss_prefix = 'lib'
|
|
|
|
endif
|
2020-05-20 19:19:50 +00:00
|
|
|
|
|
|
|
nss_sources = [
|
|
|
|
'libvirt_nss.c',
|
|
|
|
'libvirt_nss_leases.c',
|
|
|
|
]
|
|
|
|
|
2020-05-20 19:14:37 +00:00
|
|
|
nss_guest_sources = [
|
|
|
|
'libvirt_nss_macs.c',
|
|
|
|
]
|
|
|
|
|
2020-05-20 19:19:50 +00:00
|
|
|
nss_libvirt_impl = static_library(
|
|
|
|
'nss_libvirt_impl',
|
|
|
|
[
|
|
|
|
nss_sources,
|
|
|
|
],
|
|
|
|
c_args: [
|
|
|
|
'-DLIBVIRT_NSS'
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
tools_dep,
|
|
|
|
yajl_dep,
|
|
|
|
],
|
|
|
|
)
|
2020-05-20 19:14:37 +00:00
|
|
|
|
|
|
|
nss_libvirt_guest_impl = static_library(
|
|
|
|
'nss_libvirt_guest_impl',
|
|
|
|
[
|
|
|
|
nss_sources,
|
|
|
|
nss_guest_sources,
|
|
|
|
],
|
|
|
|
c_args: [
|
|
|
|
'-DLIBVIRT_NSS',
|
|
|
|
'-DLIBVIRT_NSS_GUEST',
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
tools_dep,
|
|
|
|
yajl_dep,
|
|
|
|
],
|
|
|
|
)
|
2020-05-20 19:16:55 +00:00
|
|
|
|
2022-05-05 13:06:47 +00:00
|
|
|
nss_libvirt_syms_file = meson.current_source_dir() / nss_sym_file
|
|
|
|
nss_libvirt_syms_path = nss_libvirt_syms_file
|
2020-05-20 19:16:55 +00:00
|
|
|
|
2022-05-05 13:06:47 +00:00
|
|
|
nss_libvirt_link_args = [
|
|
|
|
libvirt_export_dynamic,
|
|
|
|
coverage_flags,
|
2022-05-05 13:29:00 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if version_script_flags != ''
|
|
|
|
nss_libvirt_link_args += '@0@@1@'.format(
|
2022-05-05 13:06:47 +00:00
|
|
|
version_script_flags,
|
|
|
|
nss_libvirt_syms_path,
|
2022-05-05 13:29:00 +00:00
|
|
|
)
|
|
|
|
endif
|
2020-06-29 18:49:10 +00:00
|
|
|
|
2021-12-11 00:10:40 +00:00
|
|
|
nss_libvirt_lib = shared_library(
|
2020-05-20 19:16:55 +00:00
|
|
|
'nss_libvirt',
|
|
|
|
name_prefix: nss_prefix,
|
|
|
|
name_suffix: 'so.@0@'.format(nss_so_ver),
|
2022-05-05 13:06:47 +00:00
|
|
|
link_args: nss_libvirt_link_args,
|
2020-05-20 19:16:55 +00:00
|
|
|
link_whole: [
|
|
|
|
nss_libvirt_impl,
|
|
|
|
],
|
|
|
|
install: true,
|
|
|
|
install_dir: libdir,
|
|
|
|
)
|
2020-06-29 18:49:10 +00:00
|
|
|
|
2022-05-05 13:06:47 +00:00
|
|
|
nss_libvirt_guest_syms_file = meson.current_source_dir() / nss_guest_sym_file
|
|
|
|
nss_libvirt_guest_syms_path = nss_libvirt_guest_syms_file
|
|
|
|
|
|
|
|
nss_libvirt_guest_link_args = [
|
|
|
|
libvirt_export_dynamic,
|
|
|
|
coverage_flags,
|
2022-05-05 13:29:00 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if version_script_flags != ''
|
|
|
|
nss_libvirt_guest_link_args += '@0@@1@'.format(
|
2022-05-05 13:06:47 +00:00
|
|
|
version_script_flags,
|
|
|
|
nss_libvirt_guest_syms_path,
|
2022-05-05 13:29:00 +00:00
|
|
|
)
|
|
|
|
endif
|
2022-05-05 13:06:47 +00:00
|
|
|
|
2020-06-29 18:49:10 +00:00
|
|
|
nss_libvirt_guest_lib = shared_library(
|
|
|
|
'nss_libvirt_guest',
|
|
|
|
name_prefix: nss_prefix,
|
|
|
|
name_suffix: 'so.@0@'.format(nss_so_ver),
|
2022-05-05 13:06:47 +00:00
|
|
|
link_args: nss_libvirt_guest_link_args,
|
2020-06-29 18:49:10 +00:00
|
|
|
link_whole: [
|
|
|
|
nss_libvirt_guest_impl,
|
|
|
|
],
|
|
|
|
install: true,
|
|
|
|
install_dir: libdir,
|
|
|
|
)
|
2020-06-24 10:28:57 +00:00
|
|
|
|
|
|
|
nss_inc_dir = include_directories('.')
|