diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/meson.build b/meson.build index bf9b8c7e74..7ac331fb36 100644 --- a/meson.build +++ b/meson.build @@ -232,6 +232,7 @@ conf.set_quoted('ENVIRONMENT_DIR', environmentdir) conf.set_quoted('INCLUDE_DIR', includedir) conf.set_quoted('LIBDIR', libdir) conf.set_quoted('LIBEXECDIR', libexecdir) +conf.set_quoted('KERNEL_INSTALL_DIR', kernelinstalldir) conf.set_quoted('MODPROBE_DIR', modprobedir) conf.set_quoted('MODULESLOAD_DIR', modulesloaddir) conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir) @@ -761,17 +762,6 @@ if fallback_hostname == '' or fallback_hostname[0] == '.' or fallback_hostname[0 endif conf.set_quoted('FALLBACK_HOSTNAME', fallback_hostname) -default_hierarchy = get_option('default-hierarchy') -conf.set_quoted('DEFAULT_HIERARCHY_NAME', default_hierarchy, - description : 'default cgroup hierarchy as string') -if default_hierarchy == 'legacy' - conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_NONE') -elif default_hierarchy == 'hybrid' - conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_SYSTEMD') -else - conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_ALL') -endif - extra_net_naming_schemes = [] extra_net_naming_map = [] foreach scheme: get_option('extra-net-naming-schemes').split(',') @@ -1381,16 +1371,19 @@ conf.set10('HAVE_BZIP2', libbzip2.found()) libxz = dependency('liblzma', required : get_option('xz')) conf.set10('HAVE_XZ', libxz.found()) +libxz_cflags = libxz.partial_dependency(includes: true, compile_args: true) liblz4 = dependency('liblz4', version : '>= 1.3.0', required : get_option('lz4')) conf.set10('HAVE_LZ4', liblz4.found()) +liblz4_cflags = liblz4.partial_dependency(includes: true, compile_args: true) libzstd = dependency('libzstd', version : '>= 1.4.0', required : get_option('zstd')) conf.set10('HAVE_ZSTD', libzstd.found()) +libzstd_cflags = libzstd.partial_dependency(includes: true, compile_args: true) conf.set10('HAVE_COMPRESSION', libxz.found() or liblz4.found() or libzstd.found()) @@ -1853,13 +1846,27 @@ xml_helper_py = find_program('tools/xml_helper.py') ##################################################################### version_tag = get_option('version-tag') -version_h = vcs_tag( - input : 'src/version/version.h.in', - output : 'version.h', - command: [project_source_root / 'tools/meson-vcs-tag.sh', - project_source_root, - version_tag, - ]) +if version_tag == '' + version_tag = meson.project_version() +endif + +conf.set_quoted('VERSION_TAG', version_tag) + +vcs_tag = get_option('vcs-tag') +if vcs_tag and fs.is_dir(project_source_root / '.git') + version_h = vcs_tag( + input : 'src/version/version.h.in', + output : 'version.h', + fallback : '', + command : ['sh', '-c', 'echo "-g$(git -C . describe --abbrev=7 --match="" --always --dirty=^)"'], + ) +else + version_h = configure_file( + input : 'src/version/version.h.in', + output : 'version.h', + configuration : configuration_data({'VCS_TAG' : ''}), + ) +endif shared_lib_tag = get_option('shared-lib-tag') if shared_lib_tag == '' @@ -1880,7 +1887,7 @@ config_h = configure_file( userspace_c_args += ['-include', 'config.h'] -jinja2_cmdline = [meson_render_jinja2, config_h, version_h] +jinja2_cmdline = [meson_render_jinja2, config_h] userspace = declare_dependency( compile_args : userspace_c_args, @@ -1947,8 +1954,7 @@ libsystemd = shared_library( link_args : ['-shared', '-Wl,--version-script=' + libsystemd_sym_path], link_with : [libbasic, - libbasic_gcrypt, - libbasic_compress], + libbasic_gcrypt], link_whole : [libsystemd_static], dependencies : [librt, threads, @@ -1965,7 +1971,6 @@ install_libsystemd_static = static_library( libsystemd_sources, basic_sources, basic_gcrypt_sources, - basic_compress_sources, fundamental_sources, include_directories : libsystemd_includes, build_by_default : static_libsystemd != 'false', @@ -1977,12 +1982,12 @@ install_libsystemd_static = static_library( libcap, libdl, libgcrypt, - liblz4, + liblz4_cflags, libmount, libopenssl, librt, - libxz, - libzstd, + libxz_cflags, + libzstd_cflags, threads, userspace], c_args : libsystemd_c_args + (static_libsystemd_pic ? [] : ['-fno-PIC'])) @@ -2754,9 +2759,8 @@ summary({ 'default LLMNR mode' : default_llmnr, 'default DNS servers' : dns_servers.split(' '), 'default NTP servers' : ntp_servers.split(' '), - 'default cgroup hierarchy' : default_hierarchy, - 'default net.naming-scheme value' : default_net_naming_scheme, - 'default KillUserProcesses value' : kill_user_processes, + 'default net.naming_scheme= value': default_net_naming_scheme, + 'default KillUserProcesses= value': kill_user_processes, 'default locale' : default_locale, 'default nspawn locale' : nspawn_locale, 'default status unit format' : status_unit_format_default, |