dnl
AC_DEFUN([LIBVIRT_WIN_CHECK_SYMBOLS], [
- LIBVIRT_SYMBOL_FILE=libvirt.syms
LIBVIRT_ADMIN_SYMBOL_FILE=admin/libvirt_admin.syms
LIBVIRT_LXC_SYMBOL_FILE='$(srcdir)/libvirt_lxc.syms'
LIBVIRT_QEMU_SYMBOL_FILE='$(srcdir)/libvirt_qemu.syms'
# Also set the symbol file to .def, so src/Makefile generates libvirt.def
# from libvirt.syms and passes libvirt.def instead of libvirt.syms to the
# linker
- LIBVIRT_SYMBOL_FILE=libvirt.def
LIBVIRT_ADMIN_SYMBOL_FILE=admin/libvirt_admin.def
LIBVIRT_LXC_SYMBOL_FILE=libvirt_lxc.def
LIBVIRT_QEMU_SYMBOL_FILE=libvirt_qemu.def
;;
esac
- AC_SUBST([LIBVIRT_SYMBOL_FILE])
AC_SUBST([LIBVIRT_ADMIN_SYMBOL_FILE])
AC_SUBST([LIBVIRT_LXC_SYMBOL_FILE])
AC_SUBST([LIBVIRT_QEMU_SYMBOL_FILE])
include logging/Makefile.inc.am
include locking/Makefile.inc.am
include admin/Makefile.inc.am
-include esx/Makefile.inc.am
-include vmx/Makefile.inc.am
-include vmware/Makefile.inc.am
include vbox/Makefile.inc.am
-include openvz/Makefile.inc.am
include qemu/Makefile.inc.am
include bhyve/Makefile.inc.am
include libxl/Makefile.inc.am
# All .syms files should be placed in exactly one of these three lists,
# depending on whether they are stored in git and/or used in the build.
SYM_FILES += $(USED_SYM_FILES)
-USED_SYM_FILES += $(srcdir)/libvirt_private.syms
GENERATED_SYM_FILES += \
- libvirt.syms libvirt.def libvirt_qemu.def libvirt_lxc.def \
+ libvirt_qemu.def libvirt_lxc.def \
$(NULL)
AUG_GENTEST_SCRIPT = $(top_srcdir)/scripts/augeas-gentest.py
AUG_GENTEST = $(RUNUTF8) $(PYTHON) $(AUG_GENTEST_SCRIPT)
-
-#
-# Build our version script. This is composed of three parts:
-#
-# 1. libvirt_public.syms - public API. These functions are always
-# present in the library and should never change incompatibly.
-#
-# 2. libvirt_private.syms - private API. These symbols are private and
-# semantics may change on every release, hence the version number is
-# spliced in at build time. This ensures that if libvirtd, virsh, or a
-# driver module was built against one libvirt release, it will refuse to
-# load with another where symbols may have same names but different
-# semantics. Such symbols should never be visible in an (installed)
-# public header file.
-#
-# 3. libvirt_*.syms - dynamic private API. Like libvirt_private.syms,
-# except that build options (such as --enable-debug) can mean these
-# symbols aren't present at all.
-#
-
-USED_SYM_FILES += $(srcdir)/libvirt_driver_modules.syms
-
-if WITH_LINUX
-USED_SYM_FILES += $(srcdir)/libvirt_linux.syms
-else ! WITH_LINUX
-SYM_FILES += $(srcdir)/libvirt_linux.syms
-endif ! WITH_LINUX
-
-if WITH_SASL
-USED_SYM_FILES += $(srcdir)/libvirt_sasl.syms
-else ! WITH_SASL
-SYM_FILES += $(srcdir)/libvirt_sasl.syms
-endif ! WITH_SASL
-
-if WITH_SSH2
-USED_SYM_FILES += $(srcdir)/libvirt_libssh2.syms
-else ! WITH_SSH2
-SYM_FILES += $(srcdir)/libvirt_libssh2.syms
-endif ! WITH_SSH2
-
-if WITH_LIBSSH
-USED_SYM_FILES += $(srcdir)/libvirt_libssh.syms
-else ! WITH_LIBSSH
-SYM_FILES += $(srcdir)/libvirt_libssh.syms
-endif ! WITH_LIBSSH
-
BUILT_SOURCES += $(GENERATED_SYM_FILES)
# Empty source list - it merely links a bunch of convenience libs together
# vim: filetype=automake
-ACCESS_DRIVER_SYM_FILES = \
- libvirt_access.syms \
- libvirt_access_qemu.syms \
- libvirt_access_lxc.syms \
- $(NULL)
-
ACCESS_DRIVER_API_FILES = \
libvirt_access.xml \
libvirt_access_qemu.xml \
ACCESS_DRIVER_POLKIT_POLICY = access/org.libvirt.api.policy
-GENERATED_SYM_FILES += $(ACCESS_DRIVER_SYM_FILES)
-
libvirt_la_BUILT_LIBADD += libvirt_driver_access.la
$(ACCESS_DRIVER_POLKIT_POLICY): $(srcdir)/access/viraccessperm.h \
BUILT_SOURCES += $(ACCESS_DRIVER_POLKIT_POLICY)
endif WITH_POLKIT
-
BUILT_SOURCES += \
$(ACCESS_DRIVER_API_FILES) \
$(NULL)
-libvirt_access.syms: $(srcdir)/rpc/gendispatch.pl \
- $(REMOTE_PROTOCOL) Makefile.am
- $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclsym \
- remote REMOTE $(REMOTE_PROTOCOL) > $@
-libvirt_access_qemu.syms: $(srcdir)/rpc/gendispatch.pl \
- $(QEMU_PROTOCOL) Makefile.am
- $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclsym \
- qemu QEMU $(QEMU_PROTOCOL) > $@
-libvirt_access_lxc.syms: $(srcdir)/rpc/gendispatch.pl \
- $(LXC_PROTOCOL) Makefile.am
- $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclsym \
- lxc LXC $(LXC_PROTOCOL) > $@
-
libvirt_access.xml: $(srcdir)/rpc/gendispatch.pl \
$(REMOTE_PROTOCOL) Makefile.am
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclapi \
access_gen_headers = []
access_gen_sources = []
+access_gen_sym = []
foreach name : [ 'remote', 'qemu', 'lxc' ]
if name == 'remote'
header_file = 'viraccessapicheck.h'
source_file = 'viraccessapicheck.c'
+ syms_file = 'libvirt_access.syms'
else
header_file = 'viraccessapicheck@0@.h'.format(name)
source_file = 'viraccessapicheck@0@.c'.format(name)
+ syms_file = 'libvirt_access_@0@.syms'.format(name)
endif
protocol_file = remote_path / '@0@_protocol.x'.format(name)
],
capture: true,
)
+
+ access_gen_sym += custom_target(
+ syms_file,
+ output: syms_file,
+ capture: true,
+ command: [
+ gendispatch_prog, '--mode=aclsym', name, name.to_upper(), protocol_file,
+ ]
+ )
endforeach
if conf.has('WITH_POLKIT')
include_directories: access_inc_dir,
sources: access_gen_headers,
)
+
+generated_sym_files += access_gen_sym
+++ /dev/null
-# vim: filetype=automake
-
-if WITH_ESX
-USED_SYM_FILES += $(srcdir)/libvirt_esx.syms
-else ! WITH_ESX
-SYM_FILES += $(srcdir)/libvirt_esx.syms
-endif ! WITH_ESX
],
)
endif
+
+if conf.has('WITH_ESX')
+ used_sym_files += 'libvirt_esx.syms'
+else
+ sym_files += 'libvirt_esx.syms'
+endif
endif
+# symbol files
+
+public_sym_file = 'libvirt_public.syms'
+
+used_sym_files = [
+ 'libvirt_private.syms',
+ 'libvirt_driver_modules.syms',
+]
+
+generated_sym_files = []
+
+sym_files = []
+
+if host_machine.system() == 'linux'
+ used_sym_files += 'libvirt_linux.syms'
+else
+ sym_files += 'libvirt_linux.syms'
+endif
+
+if conf.has('WITH_SASL')
+ used_sym_files += 'libvirt_sasl.syms'
+else
+ sym_files += 'libvirt_sasl.syms'
+endif
+
+if conf.has('WITH_LIBSSH')
+ used_sym_files += 'libvirt_libssh.syms'
+else
+ sym_files += 'libvirt_libssh.syms'
+endif
+
+if conf.has('WITH_SSH2')
+ used_sym_files += 'libvirt_libssh2.syms'
+else
+ sym_files += 'libvirt_libssh2.syms'
+endif
+
+
# list subdirectories
subdir('util')
conf_inc_dir,
],
)
+
+
+# symbol files for libvirt.so
+
+# Build our version script. This is composed of three parts:
+#
+# 1. libvirt_public.syms - public API. These functions are always
+# present in the library and should never change incompatibly.
+#
+# 2. libvirt_private.syms - private API. These symbols are private and
+# semantics may change on every release, hence the version number is
+# spliced in at build time. This ensures that if libvirtd, virsh, or a
+# driver module was built against one libvirt release, it will refuse to
+# load with another where symbols may have same names but different
+# semantics. Such symbols should never be visible in an (installed)
+# public header file.
+#
+# 3. libvirt_*.syms - dynamic private API. Like libvirt_private.syms,
+# except that build options (such as --enable-debug) can mean these
+# symbols aren't present at all.
+
+libvirt_syms = custom_target(
+ 'libvirt.syms',
+ input: [ public_sym_file ] + used_sym_files + generated_sym_files,
+ output: 'libvirt.syms',
+ command: [
+ meson_python_prog, python3_prog.path(), meson_gen_sym_prog.path(),
+ '@OUTPUT@', 'LIBVIRT_PRIVATE_' + meson.project_version(), '@INPUT@',
+ ],
+)
+if host_machine.system() == 'windows'
+ libvirt_def = custom_target(
+ 'libvirt.def',
+ input: libvirt_syms,
+ output: 'libvirt.def',
+ command: [
+ meson_python_prog, python3_prog.path(), meson_gen_def_prog.path(),
+ '@INPUT@', '@OUTPUT@',
+ ],
+ )
+endif
+++ /dev/null
-# vim: filetype=automake
-
-if WITH_OPENVZ
-USED_SYM_FILES += $(srcdir)/libvirt_openvz.syms
-else ! WITH_OPENVZ
-SYM_FILES += $(srcdir)/libvirt_openvz.syms
-endif ! WITH_OPENVZ
],
)
endif
+
+if conf.has('WITH_OPENVZ')
+ used_sym_files += 'libvirt_openvz.syms'
+else
+ sym_files += 'libvirt_openvz.syms'
+endif
$(REMOTE_DAEMON_GENERATED) \
$(NULL)
-if WITH_REMOTE
-USED_SYM_FILES += $(srcdir)/libvirt_remote.syms
-else ! WITH_REMOTE
-SYM_FILES += $(srcdir)/libvirt_remote.syms
-endif ! WITH_REMOTE
-
if WITH_LIBVIRTD
sbin_PROGRAMS += libvirtd virtproxyd
],
)
endif
+
+if conf.has('WITH_REMOTE')
+ used_sym_files += 'libvirt_remote.syms'
+else
+ sym_files += 'libvirt_remote.syms'
+endif
+++ /dev/null
-# vim: filetype=automake
-
-if WITH_VMWARE
-USED_SYM_FILES += $(srcdir)/libvirt_vmware.syms
-else ! WITH_VMWARE
-SYM_FILES += $(srcdir)/libvirt_vmware.syms
-endif ! WITH_VMWARE
],
)
endif
+
+if conf.has('WITH_VMWARE')
+ used_sym_files += 'libvirt_vmware.syms'
+else
+ sym_files += 'libvirt_vmware.syms'
+endif
+++ /dev/null
-# vim: filetype=automake
-
-if WITH_VMX
-USED_SYM_FILES += $(srcdir)/libvirt_vmx.syms
-else ! WITH_VMX
-SYM_FILES += $(srcdir)/libvirt_vmx.syms
-endif ! WITH_VMX
endif
vmx_inc_dir = include_directories('.')
+
+if conf.has('WITH_VMX')
+ used_sym_files += 'libvirt_vmx.syms'
+else
+ sym_files += 'libvirt_vmx.syms'
+endif