# This is to be used instead of meson.source_root(), as the latter will return
# the wrong result when systemd is being built as a meson subproject
project_source_root = meson.current_source_dir()
+project_build_root = meson.current_build_dir()
relative_source_path = run_command('realpath',
- '--relative-to=@0@'.format(meson.current_build_dir()),
+ '--relative-to=@0@'.format(project_build_root),
project_source_root).stdout().strip()
conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path)
substs.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'yes' : 'no')
substs.set('STATUS_UNIT_FORMAT_DEFAULT', status_unit_format_default)
substs.set('HIGH_RLIMIT_NOFILE', conf.get('HIGH_RLIMIT_NOFILE'))
-substs.set('BUILD_ROOT', meson.current_build_dir())
+substs.set('BUILD_ROOT', project_build_root)
#####################################################################
cc = meson.get_compiler('c')
pkgconfig = import('pkgconfig')
-check_compilation_sh = find_program('tools/meson-check-compilation.sh')
+check_compilation_sh = find_program('tools/check-compilation.sh')
meson_build_sh = find_program('tools/meson-build.sh')
want_tests = get_option('tests')
'-Wno-unused-result',
'-Wno-format-signedness',
]
-if get_option('b_ndebug') == 'true'
- # With asserts disabled with get a bunch of warnings about variables which
- # are used only in the asserts. This is not useful at all, so let's just silence
- # those warnings.
- basic_disabled_warnings += [
- '-Wno-unused-variable',
- '-Wno-unused-but-set-variable',
- ]
-endif
possible_cc_flags = [
'-Werror=undef',
'-Wno-error=#warnings', # clang
'-Wno-string-plus-int', # clang
- # work-around for gcc 7.1 turning this on on its own.
- '-Wno-error=nonnull',
-
# Disable -Wmaybe-uninitialized, since it's noisy on gcc 8 with
# optimizations enabled, producing essentially false positives.
'-Wno-maybe-uninitialized',
############################################################
-conf.set_quoted('FALLBACK_HOSTNAME', get_option('fallback-hostname'))
+fallback_hostname = get_option('fallback-hostname')
+if fallback_hostname == '' or fallback_hostname[0] == '.' or fallback_hostname[0] == '-'
+ error('Invalid fallback-hostname configuration')
+ # A more extensive test is done in test-hostname-util. Let's catch
+ # the most obvious errors here so we don't fail with an assert later.
+endif
+conf.set_quoted('FALLBACK_HOSTNAME', fallback_hostname)
+
conf.set10('ENABLE_COMPAT_GATEWAY_HOSTNAME', get_option('compat-gateway-hostname'))
gateway_hostnames = ['_gateway'] + (conf.get('ENABLE_COMPAT_GATEWAY_HOSTNAME') == 1 ? ['gateway'] : [])
endif
conf.set10('HAVE_LZ4', have)
+want_zstd = get_option('zstd')
+if want_zstd != 'false' and not skip_deps
+ libzstd = dependency('libzstd',
+ required : want_zstd == 'true',
+ version : '>= 1.4.0')
+ have = libzstd.found()
+else
+ have = false
+ libzstd = []
+endif
+conf.set10('HAVE_ZSTD', have)
+
want_xkbcommon = get_option('xkbcommon')
if want_xkbcommon != 'false' and not skip_deps
libxkbcommon = dependency('xkbcommon',
dependencies : [threads,
librt,
libxz,
+ libzstd,
liblz4],
link_depends : libsystemd_sym,
install : true,
dependencies : [threads,
librt,
libxz,
+ libzstd,
liblz4,
libcap,
libblkid,
dependencies : [threads,
libxz,
liblz4,
- libselinux],
+ libselinux,
+ libzstd],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
libqrencode,
libxz,
liblz4,
- libpcre2],
+ libpcre2,
+ libzstd],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootbindir)
link_with : [libshared],
dependencies : [threads,
liblz4,
- libxz],
+ libxz,
+ libzstd],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootbindir)
libcap,
libselinux,
libxz,
- liblz4],
+ liblz4,
+ libzstd],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootbindir)
install : true,
install_dir : rootlibexecdir)
- executable(
+ public_programs += executable(
'userdbctl',
userdbctl_sources,
include_directories : includes,
install : true,
install_dir : rootlibexecdir)
- executable(
+ public_programs += executable(
'homectl',
homectl_sources,
include_directories : includes,
link_with : [libshared],
dependencies : [threads,
libxz,
- liblz4],
+ liblz4,
+ libzstd],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootbindir)
libcurl,
libgnutls,
libxz,
- liblz4],
+ liblz4,
+ libzstd],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
libmicrohttpd,
libgnutls,
libxz,
- liblz4],
+ liblz4,
+ libzstd],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
libmicrohttpd,
libgnutls,
libxz,
- liblz4],
+ liblz4,
+ libzstd],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
libacl,
libdw,
libxz,
- liblz4],
+ liblz4,
+ libzstd],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
link_with : [libshared],
dependencies : [threads,
libxz,
- liblz4],
+ liblz4,
+ libzstd],
install_rpath : rootlibexecdir,
install : true)
endif
libacl,
libdw,
libxz,
- liblz4],
+ liblz4,
+ libzstd],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
output : 'systemd-runtest.env',
command : ['sh', '-c', '{ ' +
'echo SYSTEMD_TEST_DATA=@0@; '.format(join_paths(project_source_root, 'test')) +
- 'echo SYSTEMD_CATALOG_DIR=@0@; '.format(join_paths(meson.current_build_dir(), 'catalog')) +
+ 'echo SYSTEMD_CATALOG_DIR=@0@; '.format(join_paths(project_build_root, 'catalog')) +
'} >@OUTPUT@'],
build_by_default : true)
make_directive_index_py = find_program('tools/make-directive-index.py')
make_man_index_py = find_program('tools/make-man-index.py')
xml_helper_py = find_program('tools/xml_helper.py')
-hwdb_update_sh = find_program('tools/meson-hwdb-update.sh')
-autosuspend_update_sh = find_program('tools/meson-autosuspend-update.sh')
+hwdb_update_sh = find_program('tools/hwdb-update.sh')
+autosuspend_update_sh = find_program('tools/autosuspend-update.sh')
subdir('sysctl.d')
subdir('sysusers.d')
############################################################
-meson_check_help = find_program('tools/meson-check-help.sh')
+check_help = find_program('tools/check-help.sh')
foreach exec : public_programs
name = exec.full_path().split('/')[-1]
if want_tests != 'false'
test('check-help-' + name,
- meson_check_help,
+ check_help,
args : exec.full_path())
endif
endforeach
endif
if git.found()
- meson_git_contrib_sh = find_program('tools/meson-git-contrib.sh')
+ git_contrib_sh = find_program('tools/git-contrib.sh')
run_target(
'git-contrib',
- command : [meson_git_contrib_sh])
+ command : [git_contrib_sh])
endif
if git.found()
############################################################
-meson_check_api_docs_sh = find_program('tools/meson-check-api-docs.sh')
+check_api_docs_sh = find_program('tools/check-api-docs.sh')
run_target(
'check-api-docs',
depends : [man, libsystemd, libudev],
- command : [meson_check_api_docs_sh, libsystemd.full_path(), libudev.full_path()])
+ command : [check_api_docs_sh, libsystemd.full_path(), libudev.full_path()])
############################################################
watchdog_opt = service_watchdog == '' ? 'disabled' : service_watchdog
['SMACK'],
['zlib'],
['xz'],
+ ['zstd'],
['lz4'],
['bzip2'],
['ACL'],