project('systemd', 'c',
- version : '233',
+ version : '235',
license : 'LGPLv2+',
default_options: [
'c_std=gnu99',
meson_version : '>= 0.40',
)
+libsystemd_version = '0.19.0'
+libudev_version = '1.6.6'
+
# We need the same data in three different formats, ugh!
# Also, for hysterical reasons, we use different variable
# names, sometimes. Not all variables are included in every
#####################################################################
+# Try to install the git pre-commit hook
+git_hook = run_command(join_paths(meson.source_root(), 'tools/add-git-hook.sh'))
+if git_hook.returncode() == 0
+ message(git_hook.stdout().strip())
+endif
+
+#####################################################################
+
rootprefixdir = get_option('rootprefix')
+conf.set10('HAVE_SPLIT_USR', get_option('split-usr'))
if get_option('split-usr')
- conf.set('HAVE_SPLIT_USR', true)
rootprefixdir = rootprefixdir != '' ? rootprefixdir : '/'
else
rootprefixdir = rootprefixdir != '' ? rootprefixdir : '/usr'
sysvinit_path = get_option('sysvinit-path')
sysvrcnd_path = get_option('sysvrcnd-path')
-if sysvinit_path != '' or sysvrcnd_path != ''
- conf.set('HAVE_SYSV_COMPAT', true,
- description : 'SysV init scripts and rcN.d links are supported')
- m4_defines += ['-DHAVE_SYSV_COMPAT']
-endif
+have = sysvinit_path != '' or sysvrcnd_path != ''
+conf.set10('HAVE_SYSV_COMPAT', have,
+ description : 'SysV init scripts and rcN.d links are supported')
+m4_defines += have ? ['-DHAVE_SYSV_COMPAT'] : []
# join_paths ignore the preceding arguments if an absolute component is
# encountered, so this should canonicalize various paths when they are
varlogdir = join_paths(localstatedir, 'log')
xinitrcdir = join_paths(sysconfdir, 'X11/xinit/xinitrc.d')
rpmmacrosdir = get_option('rpmmacrosdir')
+modprobedir = join_paths(prefixdir, 'lib/modprobe.d')
# Our own paths
pkgdatadir = join_paths(datadir, 'systemd')
add_languages('cpp')
endif
-foreach arg : ['-Wundef',
+foreach arg : ['-Wextra',
+ '-Werror=undef',
'-Wlogical-op',
'-Wmissing-include-dirs',
'-Wold-style-definition',
foreach arg : ['unused-parameter',
'missing-field-initializers',
'unused-result',
- 'format-signedness']
+ 'format-signedness',
+ 'error=nonnull', # work-around for gcc 7.1 turning this on on its own
+ ]
if cc.has_argument('-W' + arg)
add_project_arguments('-Wno-' + arg, language : 'c')
endif
foreach arg : ['-Wl,-z,relro',
'-Wl,-z,now',
'-pie',
- '-Wl,-fuse-ld=gold',
]
have = run_command(check_compilation_sh,
decl_headers = '''
#include <uchar.h>
#include <linux/ethtool.h>
+#include <linux/fib_rules.h>
'''
# FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail
'char32_t',
'key_serial_t',
'struct ethtool_link_settings',
+ 'struct fib_rule_uid_range',
]
# We get -1 if the size cannot be determined
have = cc.sizeof(decl, prefix : decl_headers) > 0
- conf.set('HAVE_' + decl.underscorify().to_upper(), have)
+ conf.set10('HAVE_' + decl.underscorify().to_upper(), have)
endforeach
foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'],
['IFLA_BR_VLAN_DEFAULT_PVID', 'linux/if_link.h'],
['NDA_IFINDEX', 'linux/neighbour.h'],
['IFA_FLAGS', 'linux/if_addr.h'],
+ ['FRA_UID_RANGE', 'linux/fib_rules.h'],
['LO_FLAGS_PARTSCAN', 'linux/loop.h'],
]
prefix = decl.length() > 2 ? decl[2] : ''
have = cc.has_header_symbol(decl[1], decl[0], prefix : prefix)
- conf.set10('HAVE_DECL_' + decl[0], have)
+ conf.set10('HAVE_' + decl[0], have)
endforeach
-skip = false
foreach ident : ['secure_getenv', '__secure_getenv']
- if not skip and cc.has_function(ident)
- conf.set('HAVE_' + ident.to_upper(), true)
- skip = true
- endif
+ conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident))
endforeach
foreach ident : [
#include <keyutils.h>'''],
['copy_file_range', '''#include <sys/syscall.h>
#include <unistd.h>'''],
+ ['bpf', '''#include <sys/syscall.h>
+ #include <unistd.h>'''],
['explicit_bzero' , '''#include <string.h>'''],
]
have = cc.has_function(ident[0], prefix : ident[1])
- conf.set10('HAVE_DECL_' + ident[0].to_upper(), have)
+ conf.set10('HAVE_' + ident[0].to_upper(), have)
endforeach
if cc.has_function('getrandom', prefix : '''#include <sys/random.h>''')
- conf.set('USE_SYS_RANDOM_H', true)
- conf.set10('HAVE_DECL_GETRANDOM', true)
+ conf.set10('USE_SYS_RANDOM_H', true)
+ conf.set10('HAVE_GETRANDOM', true)
else
have = cc.has_function('getrandom', prefix : '''#include <linux/random.h>''')
- conf.set10('HAVE_DECL_GETRANDOM', have)
+ conf.set10('USE_SYS_RANDOM_H', false)
+ conf.set10('HAVE_GETRANDOM', have)
endif
#####################################################################
m4 = find_program('m4')
stat = find_program('stat')
git = find_program('git', required : false)
-etags = find_program('etags', required : false)
meson_make_symlink = meson.source_root() + '/tools/meson-make-symlink.sh'
mkdir_p = 'mkdir -p $DESTDIR/@0@'
foreach header : ['linux/btrfs.h',
'linux/memfd.h',
'linux/vm_sockets.h',
+ 'sys/auxv.h',
'valgrind/memcheck.h',
'valgrind/valgrind.h',
]
- conf.set('HAVE_' + header.underscorify().to_upper(),
- cc.has_header(header))
+ conf.set10('HAVE_' + header.underscorify().to_upper(),
+ cc.has_header(header))
endforeach
############################################################
conf.set_quoted('FALLBACK_HOSTNAME', get_option('fallback-hostname'))
+conf.set10('ENABLE_COMPAT_GATEWAY_HOSTNAME', get_option('compat-gateway-hostname'))
+gateway_hostnames = ['_gateway'] + (conf.get('ENABLE_COMPAT_GATEWAY_HOSTNAME') == 1 ? ['gateway'] : [])
default_hierarchy = get_option('default-hierarchy')
conf.set_quoted('DEFAULT_HIERARCHY_NAME', default_hierarchy,
substs.set('DEBUGTTY', get_option('debug-tty'))
debug = get_option('debug')
+enable_debug_hashmap = false
+enable_debug_mmap_cache = false
if debug != ''
foreach name : debug.split(',')
if name == 'hashmap'
- conf.set('ENABLE_DEBUG_HASHMAP', true)
+ enable_debug_hashmap = true
elif name == 'mmap-cache'
- conf.set('ENABLE_DEBUG_MMAP_CACHE', true)
+ enable_debug_mmap_cache = true
else
message('unknown debug option "@0@", ignoring'.format(name))
endif
endforeach
endif
+conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap)
+conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache)
#####################################################################
endif
libmount = dependency('mount',
- version : '>= 2.27')
+ version : '>= 2.30')
want_seccomp = get_option('seccomp')
if want_seccomp != 'false'
libseccomp = dependency('libseccomp',
version : '>= 2.3.1',
required : want_seccomp == 'true')
- if libseccomp.found()
- conf.set('HAVE_SECCOMP', true)
- m4_defines += ['-DHAVE_SECCOMP']
- endif
+ have = libseccomp.found()
else
+ have = false
libseccomp = []
endif
+conf.set10('HAVE_SECCOMP', have)
+m4_defines += have ? ['-DHAVE_SECCOMP'] : []
want_selinux = get_option('selinux')
if want_selinux != 'false'
libselinux = dependency('libselinux',
version : '>= 2.1.9',
required : want_selinux == 'true')
- if libselinux.found()
- conf.set('HAVE_SELINUX', true)
- m4_defines += ['-DHAVE_SELINUX']
- endif
+ have = libselinux.found()
else
+ have = false
libselinux = []
endif
+conf.set10('HAVE_SELINUX', have)
+m4_defines += have ? ['-DHAVE_SELINUX'] : []
want_apparmor = get_option('apparmor')
if want_apparmor != 'false'
libapparmor = dependency('libapparmor',
required : want_apparmor == 'true')
- if libapparmor.found()
- conf.set('HAVE_APPARMOR', true)
- m4_defines += ['-DHAVE_APPARMOR']
- endif
+ have = libapparmor.found()
else
+ have = false
libapparmor = []
endif
+conf.set10('HAVE_APPARMOR', have)
+m4_defines += have ? ['-DHAVE_APPARMOR'] : []
smack_run_label = get_option('smack-run-label')
if smack_run_label != ''
install_polkit = false
install_polkit_pkla = false
if want_polkit != 'false'
- conf.set('ENABLE_POLKIT', true)
install_polkit = true
libpolkit = dependency('polkit-gobject-1',
install_polkit_pkla = true
endif
endif
+conf.set10('ENABLE_POLKIT', install_polkit)
want_acl = get_option('acl')
if want_acl != 'false'
libacl = cc.find_library('acl', required : want_acl == 'true')
- if libacl.found()
- conf.set('HAVE_ACL', true)
- m4_defines += ['-DHAVE_ACL']
- endif
+ have = libacl.found()
else
+ have = false
libacl = []
endif
+conf.set10('HAVE_ACL', have)
+m4_defines += have ? ['-DHAVE_ACL'] : []
want_audit = get_option('audit')
if want_audit != 'false'
libaudit = dependency('audit', required : want_audit == 'true')
- conf.set('HAVE_AUDIT', libaudit.found())
+ have = libaudit.found()
else
+ have = false
libaudit = []
endif
+conf.set10('HAVE_AUDIT', have)
want_blkid = get_option('blkid')
if want_blkid != 'false'
libblkid = dependency('blkid', required : want_blkid == 'true')
- conf.set('HAVE_BLKID', libblkid.found())
+ have = libblkid.found()
else
+ have = false
libblkid = []
endif
+conf.set10('HAVE_BLKID', have)
want_kmod = get_option('kmod')
if want_kmod != 'false'
libkmod = dependency('libkmod',
version : '>= 15',
required : want_kmod == 'true')
- conf.set('HAVE_KMOD', libkmod.found())
+ have = libkmod.found()
else
+ have = false
libkmod = []
endif
+conf.set10('HAVE_KMOD', have)
want_pam = get_option('pam')
if want_pam != 'false'
libpam = cc.find_library('pam', required : want_pam == 'true')
libpam_misc = cc.find_library('pam_misc', required : want_pam == 'true')
- if libpam.found() and libpam_misc.found()
- conf.set('HAVE_PAM', true)
- m4_defines += ['-DHAVE_PAM']
- endif
+ have = libpam.found() and libpam_misc.found()
else
+ have = false
libpam = []
libpam_misc = []
endif
+conf.set10('HAVE_PAM', have)
+m4_defines += have ? ['-DHAVE_PAM'] : []
want_microhttpd = get_option('microhttpd')
if want_microhttpd != 'false'
libmicrohttpd = dependency('libmicrohttpd',
version : '>= 0.9.33',
required : want_microhttpd == 'true')
- if libmicrohttpd.found()
- conf.set('HAVE_MICROHTTPD', true)
- m4_defines += ['-DHAVE_MICROHTTPD']
- endif
+ have = libmicrohttpd.found()
else
+ have = false
libmicrohttpd = []
endif
+conf.set10('HAVE_MICROHTTPD', have)
+m4_defines += have ? ['-DHAVE_MICROHTTPD'] : []
want_libcryptsetup = get_option('libcryptsetup')
if want_libcryptsetup != 'false'
libcryptsetup = dependency('libcryptsetup',
version : '>= 1.6.0',
required : want_libcryptsetup == 'true')
- conf.set('HAVE_LIBCRYPTSETUP', libcryptsetup.found())
+ have = libcryptsetup.found()
else
+ have = false
libcryptsetup = []
endif
+conf.set10('HAVE_LIBCRYPTSETUP', have)
want_libcurl = get_option('libcurl')
if want_libcurl != 'false'
libcurl = dependency('libcurl',
version : '>= 7.32.0',
required : want_libcurl == 'true')
- if libcurl.found()
- conf.set('HAVE_LIBCURL', true)
- m4_defines += ['-DHAVE_LIBCURL']
- endif
+ have = libcurl.found()
else
+ have = false
libcurl = []
endif
+conf.set10('HAVE_LIBCURL', have)
+m4_defines += have ? ['-DHAVE_LIBCURL'] : []
want_libidn = get_option('libidn')
want_libidn2 = get_option('libidn2')
error('libidn and libidn2 cannot be requested simultaneously')
endif
-if want_libidn2 != 'false' and want_libidn != 'true'
- libidn = dependency('libidn2',
- required : want_libidn2 == 'true')
- # libidn is used for both libidn and libidn2 objects
- if libidn.found()
- conf.set('HAVE_LIBIDN2', true)
- m4_defines += ['-DHAVE_LIBIDN2']
- endif
+if want_libidn != 'false' and want_libidn2 != 'true'
+ libidn = dependency('libidn',
+ required : want_libidn == 'true')
+ have = libidn.found()
else
+ have = false
libidn = []
endif
-if not conf.get('HAVE_LIBIDN2', false) and want_libidn != 'false'
- libidn = dependency('libidn',
- required : want_libidn == 'true')
- if libidn.found()
- conf.set('HAVE_LIBIDN', true)
- m4_defines += ['-DHAVE_LIBIDN']
- endif
+conf.set10('HAVE_LIBIDN', have)
+m4_defines += have ? ['-DHAVE_LIBIDN'] : []
+if not have and want_libidn2 != 'false'
+ # libidn is used for both libidn and libidn2 objects
+ libidn = dependency('libidn2',
+ required : want_libidn2 == 'true')
+ have = libidn.found()
+else
+ have = false
endif
+conf.set10('HAVE_LIBIDN2', have)
+m4_defines += have ? ['-DHAVE_LIBIDN2'] : []
want_libiptc = get_option('libiptc')
if want_libiptc != 'false'
libiptc = dependency('libiptc',
required : want_libiptc == 'true')
- if libiptc.found()
- conf.set('HAVE_LIBIPTC', true)
- m4_defines += ['-DHAVE_LIBIPTC']
- endif
+ have = libiptc.found()
else
+ have = false
libiptc = []
endif
+conf.set10('HAVE_LIBIPTC', have)
+m4_defines += have ? ['-DHAVE_LIBIPTC'] : []
want_qrencode = get_option('qrencode')
if want_qrencode != 'false'
libqrencode = dependency('libqrencode',
required : want_qrencode == 'true')
- conf.set('HAVE_QRENCODE', libqrencode.found())
+ have = libqrencode.found()
else
+ have = false
libqrencode = []
endif
+conf.set10('HAVE_QRENCODE', have)
+
+want_gcrypt = get_option('gcrypt')
+if want_gcrypt != 'false'
+ libgcrypt = cc.find_library('gcrypt', required : want_gcrypt == 'true')
+ libgpg_error = cc.find_library('gpg-error', required : want_gcrypt == 'true')
+ have = libgcrypt.found() and libgpg_error.found()
+else
+ have = false
+endif
+if not have
+ # link to neither of the libs if one is not found
+ libgcrypt = []
+ libgpg_error = []
+endif
+conf.set10('HAVE_GCRYPT', have)
want_gnutls = get_option('gnutls')
if want_gnutls != 'false'
libgnutls = dependency('gnutls',
version : '>= 3.1.4',
required : want_gnutls == 'true')
- conf.set('HAVE_GNUTLS', libgnutls.found())
+ have = libgnutls.found()
else
+ have = false
libgnutls = []
endif
+conf.set10('HAVE_GNUTLS', have)
want_elfutils = get_option('elfutils')
if want_elfutils != 'false'
libdw = dependency('libdw',
required : want_elfutils == 'true')
- conf.set('HAVE_ELFUTILS', libdw.found())
+ have = libdw.found()
else
+ have = false
libdw = []
endif
+conf.set10('HAVE_ELFUTILS', have)
want_zlib = get_option('zlib')
if want_zlib != 'false'
libz = dependency('zlib',
required : want_zlib == 'true')
- conf.set('HAVE_ZLIB', libz.found())
+ have = libz.found()
else
+ have = false
libz = []
endif
+conf.set10('HAVE_ZLIB', have)
want_bzip2 = get_option('bzip2')
if want_bzip2 != 'false'
libbzip2 = cc.find_library('bz2',
required : want_bzip2 == 'true')
- conf.set('HAVE_BZIP2', libbzip2.found())
+ have = libbzip2.found()
else
+ have = false
libbzip2 = []
endif
+conf.set10('HAVE_BZIP2', have)
want_xz = get_option('xz')
if want_xz != 'false'
libxz = dependency('liblzma',
required : want_xz == 'true')
- conf.set('HAVE_XZ', libxz.found())
+ have = libxz.found()
else
+ have = false
libxz = []
endif
+conf.set10('HAVE_XZ', have)
want_lz4 = get_option('lz4')
if want_lz4 != 'false'
liblz4 = dependency('liblz4',
required : want_lz4 == 'true')
- conf.set('HAVE_LZ4', liblz4.found())
+ have = liblz4.found()
else
+ have = false
liblz4 = []
endif
+conf.set10('HAVE_LZ4', have)
+
+want_xkbcommon = get_option('xkbcommon')
+if want_xkbcommon != 'false'
+ libxkbcommon = dependency('xkbcommon',
+ version : '>= 0.3.0',
+ required : want_xkbcommon == 'true')
+ have = libxkbcommon.found()
+else
+ have = false
+ libxkbcommon = []
+endif
+conf.set10('HAVE_XKBCOMMON', have)
want_glib = get_option('glib')
if want_glib != 'false'
libgio = dependency('gio-2.0',
required : want_glib == 'true')
have = libglib.found() and libgobject.found() and libgio.found()
- conf.set('HAVE_GLIB', have)
else
+ have = false
libglib = []
libgobject = []
libgio = []
endif
-
-want_xkbcommon = get_option('xkbcommon')
-if want_xkbcommon != 'false'
- libxkbcommon = dependency('xkbcommon',
- version : '>= 0.3.0',
- required : want_xkbcommon == 'true')
- conf.set('HAVE_XKBCOMMON', libxkbcommon.found())
-else
- libxkbcommon = []
-endif
+conf.set10('HAVE_GLIB', have)
want_dbus = get_option('dbus')
if want_dbus != 'false'
libdbus = dependency('dbus-1',
version : '>= 1.3.2',
required : want_dbus == 'true')
- conf.set('HAVE_DBUS', libdbus.found())
+ have = libdbus.found()
else
+ have = false
libdbus = []
endif
-
-want_gcrypt = get_option('gcrypt')
-if want_gcrypt != 'false'
- libgcrypt = cc.find_library('gcrypt', required : want_gcrypt == 'true')
- libgpg_error = cc.find_library('gpg-error', required : want_gcrypt == 'true')
-
- have_deps = libgcrypt.found() and libgpg_error.found()
- conf.set('HAVE_GCRYPT', have_deps)
- if not have_deps
- # link to neither of the libs if one is not found
- libgcrypt = []
- libgpg_error = []
- endif
-else
- libgcrypt = []
- libgpg_error = []
-endif
+conf.set10('HAVE_DBUS', have)
default_dnssec = get_option('default-dnssec')
-if default_dnssec != 'no' and not conf.get('HAVE_GCRYPT', false)
+if default_dnssec != 'no' and conf.get('HAVE_GCRYPT') == 0
message('default-dnssec cannot be set to yes or allow-downgrade when gcrypt is disabled. Setting default-dnssec to no.')
default_dnssec = 'no'
endif
want_importd = get_option('importd')
if want_importd != 'false'
- have_deps = (conf.get('HAVE_LIBCURL', false) and
- conf.get('HAVE_ZLIB', false) and
- conf.get('HAVE_BZIP2', false) and
- conf.get('HAVE_XZ', false) and
- conf.get('HAVE_GCRYPT', false))
- conf.set('ENABLE_IMPORTD', have_deps)
- if want_importd == 'true' and not have_deps
+ have = (conf.get('HAVE_LIBCURL') == 1 and
+ conf.get('HAVE_ZLIB') == 1 and
+ conf.get('HAVE_BZIP2') == 1 and
+ conf.get('HAVE_XZ') == 1 and
+ conf.get('HAVE_GCRYPT') == 1)
+ if want_importd == 'true' and not have
error('importd support was requested, but dependencies are not available')
endif
+else
+ have = false
endif
+conf.set10('ENABLE_IMPORTD', have)
want_remote = get_option('remote')
if want_remote != 'false'
- have_deps = [conf.get('HAVE_MICROHTTPD', false),
- conf.get('HAVE_LIBCURL', false)]
+ have_deps = [conf.get('HAVE_MICROHTTPD') == 1,
+ conf.get('HAVE_LIBCURL') == 1]
# sd-j-remote requires µhttpd, and sd-j-upload requires libcurl, so
# it's possible to build one without the other. Complain only if
# support was explictly requested. The auxiliary files like sysusers
if want_remote == 'true' and not (have_deps[0] and have_deps[1])
error('remote support was requested, but dependencies are not available')
endif
- conf.set('ENABLE_REMOTE', have_deps[0] or have_deps[1])
+ have = have_deps[0] or have_deps[1]
+else
+ have = false
endif
+conf.set10('ENABLE_REMOTE', have)
-foreach pair : [['utmp', 'HAVE_UTMP'],
+foreach pair : [['utmp', 'ENABLE_UTMP'],
['hibernate', 'ENABLE_HIBERNATE'],
['environment-d', 'ENABLE_ENVIRONMENT_D'],
['binfmt', 'ENABLE_BINFMT'],
['rfkill', 'ENABLE_RFKILL'],
['ldconfig', 'ENABLE_LDCONFIG'],
['efi', 'ENABLE_EFI'],
- ['tpm', 'SD_BOOT_LOG_TPM'],
- ['ima', 'HAVE_IMA'],
- ['smack', 'HAVE_SMACK'],
+ ['tpm', 'ENABLE_TPM'],
+ ['ima', 'ENABLE_IMA'],
+ ['smack', 'ENABLE_SMACK'],
['gshadow', 'ENABLE_GSHADOW'],
['idn', 'ENABLE_IDN'],
+ ['nss-systemd', 'ENABLE_NSS_SYSTEMD'],
]
- if get_option(pair[0])
- conf.set(pair[1], true)
- m4_defines += ['-D' + pair[1]]
- endif
+ have = get_option(pair[0])
+ conf.set10(pair[1], have)
+ m4_defines += have ? ['-D' + pair[1]] : []
endforeach
want_tests = get_option('tests')
install_tests = get_option('install-tests')
tests = []
+conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', get_option('slow-tests'))
+
#####################################################################
if get_option('efi')
gnu_efi_arch = ''
endif
- conf.set('ENABLE_EFI', true)
+ have = true
conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME)
conf.set('SD_TPM_PCR', get_option('tpm-pcrindex').to_int())
+else
+ have = false
endif
+conf.set10('ENABLE_EFI', have)
#####################################################################
'src/libsystemd/sd-netlink',
'src/libsystemd/sd-network',
'src/libsystemd-network',
+ '.',
)
add_project_arguments('-include', 'config.h', language : 'c')
'systemd',
libsystemd_internal_sources,
journal_internal_sources,
- version : '0.18.0',
+ version : libsystemd_version,
include_directories : includes,
link_args : ['-shared',
'-Wl,--version-script=' + libsystemd_sym_path],
dependencies : [libdl])
foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME'],
- ['systemd', '' ],
+ ['systemd', 'ENABLE_NSS_SYSTEMD'],
['mymachines', 'ENABLE_MACHINED'],
['resolve', 'ENABLE_RESOLVED']]
- condition = tuple[1] == '' or conf.get(tuple[1], false)
+ condition = tuple[1] == '' or conf.get(tuple[1]) == 1
if condition
module = tuple[0]
install : true,
install_dir : systemgeneratordir)
-if conf.get('ENABLE_ENVIRONMENT_D', false)
+if conf.get('ENABLE_ENVIRONMENT_D') == 1
executable('30-systemd-environment-d-generator',
'src/environment-d-generator/environment-d-generator.c',
include_directories : includes,
join_paths(environmentdir, '99-environment.conf'))
endif
-if conf.get('ENABLE_HIBERNATE', false)
+if conf.get('ENABLE_HIBERNATE') == 1
executable('systemd-hibernate-resume-generator',
'src/hibernate-resume/hibernate-resume-generator.c',
include_directories : includes,
install_dir : rootlibexecdir)
endif
-if conf.get('HAVE_BLKID', false)
+if conf.get('HAVE_BLKID') == 1
executable('systemd-gpt-auto-generator',
'src/gpt-auto-generator/gpt-auto-generator.c',
'src/basic/blkid-util.h',
public_programs += [exe]
endif
-if conf.get('ENABLE_RESOLVED', false)
+if conf.get('ENABLE_RESOLVED') == 1
executable('systemd-resolved',
systemd_resolved_sources,
gcrypt_util_sources,
public_programs += [exe]
endif
-if conf.get('ENABLE_LOGIND', false)
+if conf.get('ENABLE_LOGIND') == 1
executable('systemd-logind',
systemd_logind_sources,
include_directories : includes,
install_dir : rootbindir)
public_programs += [exe]
- if conf.get('HAVE_PAM', false)
+ if conf.get('HAVE_PAM') == 1
version_script_arg = join_paths(meson.current_source_dir(), pam_systemd_sym)
pam_systemd = shared_library(
'pam_systemd',
endif
endif
-if conf.get('HAVE_PAM', false)
+if conf.get('HAVE_PAM') == 1
executable('systemd-user-sessions',
'src/user-sessions/user-sessions.c',
include_directories : includes,
install_dir : rootlibexecdir)
endif
-if conf.get('ENABLE_EFI', false) and conf.get('HAVE_BLKID', false)
+if conf.get('ENABLE_EFI') == 1 and conf.get('HAVE_BLKID') == 1
exe = executable('bootctl',
'src/boot/bootctl.c',
include_directories : includes,
install_dir : rootbindir)
public_programs += [exe]
-if conf.get('ENABLE_BACKLIGHT', false)
+if conf.get('ENABLE_BACKLIGHT') == 1
executable('systemd-backlight',
'src/backlight/backlight.c',
include_directories : includes,
install_dir : rootlibexecdir)
endif
-if conf.get('ENABLE_RFKILL', false)
+if conf.get('ENABLE_RFKILL') == 1
executable('systemd-rfkill',
'src/rfkill/rfkill.c',
include_directories : includes,
install : true,
install_dir : systemgeneratordir)
-if conf.get('HAVE_LIBCRYPTSETUP', false)
+if conf.get('HAVE_LIBCRYPTSETUP') == 1
executable('systemd-cryptsetup',
'src/cryptsetup/cryptsetup.c',
include_directories : includes,
install_dir : systemgeneratordir)
endif
-if conf.get('HAVE_SYSV_COMPAT', false)
+if conf.get('HAVE_SYSV_COMPAT') == 1
executable('systemd-sysv-generator',
'src/sysv-generator/sysv-generator.c',
include_directories : includes,
install_dir : systemgeneratordir)
endif
-if conf.get('ENABLE_HOSTNAMED', false)
+if conf.get('ENABLE_HOSTNAMED') == 1
executable('systemd-hostnamed',
'src/hostname/hostnamed.c',
include_directories : includes,
public_programs += [exe]
endif
-if conf.get('ENABLE_LOCALED', false)
- if conf.get('HAVE_XKBCOMMON', false)
+if conf.get('ENABLE_LOCALED') == 1
+ if conf.get('HAVE_XKBCOMMON') == 1
# logind will load libxkbcommon.so dynamically on its own
deps = [libdl]
else
public_programs += [exe]
endif
-if conf.get('ENABLE_TIMEDATED', false)
+if conf.get('ENABLE_TIMEDATED') == 1
executable('systemd-timedated',
'src/timedate/timedated.c',
include_directories : includes,
public_programs += [exe]
endif
-if conf.get('ENABLE_TIMESYNCD', false)
+if conf.get('ENABLE_TIMESYNCD') == 1
executable('systemd-timesyncd',
systemd_timesyncd_sources,
include_directories : includes,
install_dir : rootlibexecdir)
endif
-if conf.get('ENABLE_MACHINED', false)
+if conf.get('ENABLE_MACHINED') == 1
executable('systemd-machined',
systemd_machined_sources,
include_directories : includes,
public_programs += [exe]
endif
-if conf.get('ENABLE_IMPORTD', false)
+if conf.get('ENABLE_IMPORTD') == 1
executable('systemd-importd',
systemd_importd_sources,
include_directories : includes,
public_programs += [systemd_pull, systemd_import, systemd_export]
endif
-if conf.get('ENABLE_REMOTE', false) and conf.get('HAVE_LIBCURL', false)
+if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1
exe = executable('systemd-journal-upload',
systemd_journal_upload_sources,
include_directories : includes,
public_programs += [exe]
endif
-if conf.get('ENABLE_REMOTE', false) and conf.get('HAVE_MICROHTTPD', false)
+if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
s_j_remote = executable('systemd-journal-remote',
systemd_journal_remote_sources,
include_directories : includes,
public_programs += [s_j_remote, s_j_gatewayd]
endif
-if conf.get('ENABLE_COREDUMP', false)
+if conf.get('ENABLE_COREDUMP') == 1
executable('systemd-coredump',
systemd_coredump_sources,
include_directories : includes,
public_programs += [exe]
endif
-if conf.get('ENABLE_BINFMT', false)
+if conf.get('ENABLE_BINFMT') == 1
exe = executable('systemd-binfmt',
'src/binfmt/binfmt.c',
include_directories : includes,
mkdir_p.format(join_paths(sysconfdir, 'binfmt.d')))
endif
-if conf.get('ENABLE_VCONSOLE', false)
+if conf.get('ENABLE_VCONSOLE') == 1
executable('systemd-vconsole-setup',
'src/vconsole/vconsole-setup.c',
include_directories : includes,
install_dir : rootlibexecdir)
endif
-if conf.get('ENABLE_RANDOMSEED', false)
+if conf.get('ENABLE_RANDOMSEED') == 1
executable('systemd-random-seed',
'src/random-seed/random-seed.c',
include_directories : includes,
install_dir : rootlibexecdir)
endif
-if conf.get('ENABLE_FIRSTBOOT', false)
+if conf.get('ENABLE_FIRSTBOOT') == 1
executable('systemd-firstboot',
'src/firstboot/firstboot.c',
include_directories : includes,
install : true)
public_programs += [exe]
-if conf.get('ENABLE_SYSUSERS', false)
+if conf.get('ENABLE_SYSUSERS') == 1
exe = executable('systemd-sysusers',
'src/sysusers/sysusers.c',
include_directories : includes,
public_programs += [exe]
endif
-if conf.get('ENABLE_TMPFILES', false)
+if conf.get('ENABLE_TMPFILES') == 1
exe = executable('systemd-tmpfiles',
'src/tmpfiles/tmpfiles.c',
include_directories : includes,
public_programs += [exe]
endif
-if conf.get('ENABLE_HWDB', false)
+if conf.get('ENABLE_HWDB') == 1
exe = executable('systemd-hwdb',
'src/hwdb/hwdb.c',
'src/libsystemd/sd-hwdb/hwdb-internal.h',
public_programs += [exe]
endif
-if conf.get('ENABLE_QUOTACHECK', false)
+if conf.get('ENABLE_QUOTACHECK') == 1
executable('systemd-quotacheck',
'src/quotacheck/quotacheck.c',
include_directories : includes,
install : true,
install_dir : rootlibexecdir)
-if conf.get('HAVE_KMOD', false)
+if conf.get('HAVE_KMOD') == 1
executable('systemd-modules-load',
'src/modules-load/modules-load.c',
include_directories : includes,
install : true)
public_programs += [exe]
-if conf.get('ENABLE_NETWORKD', false)
+if conf.get('ENABLE_NETWORKD') == 1
executable('systemd-networkd',
systemd_networkd_sources,
include_directories : includes,
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
-endif
-exe = executable('networkctl',
- networkctl_sources,
- include_directories : includes,
- link_with : [libsystemd_network,
+ exe = executable('networkctl',
+ networkctl_sources,
+ include_directories : includes,
+ link_with : [libsystemd_network,
libshared],
- install_rpath : rootlibexecdir,
- install : true,
- install_dir : rootbindir)
-public_programs += [exe]
-
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : rootbindir)
+ public_programs += [exe]
+endif
############################################################
foreach tuple : tests
type = ''
endif
- if condition == '' or conf.get(condition, false)
- install = install_tests and type == ''
-
+ if condition == '' or conf.get(condition) == 1
exe = executable(
name,
sources,
dependencies : dependencies,
c_args : defs,
install_rpath : rootlibexecdir,
- install : install,
- install_dir : testsdir)
+ install : install_tests,
+ install_dir : join_paths(testsdir, type))
if type == 'manual'
message('@0@ is a manual test'.format(name))
install_dir : xinitrcdir)
install_data('system-preset/90-systemd.preset',
install_dir : systempresetdir)
+install_data('modprobe.d/systemd.conf',
+ install_dir : modprobedir)
install_data('README',
'NEWS',
'CODING_STYLE',
############################################################
-if git.found() and etags.found()
+if git.found()
all_files = run_command(
git,
- ['--git-dir=@0@/.git'.format(meson.source_root()),
+ ['--git-dir=@0@/.git'.format(meson.current_source_dir()),
'ls-files',
':/*.[ch]'])
all_files = files(all_files.stdout().split())
- run_target(
- 'TAGS',
- input : all_files,
- command : [etags, '-o', '@0@/TAGS'.format(meson.source_root())] + all_files)
+ custom_target(
+ 'tags',
+ output : 'tags',
+ command : ['env', 'etags', '-o', '@0@/TAGS'.format(meson.current_source_dir())] + all_files)
+ custom_target(
+ 'ctags',
+ output : 'ctags',
+ command : ['env', 'ctags', '-o', '@0@/tags'.format(meson.current_source_dir())] + all_files)
endif
if git.found()
if git.found()
git_head = run_command(
git,
- ['--git-dir=@0@/.git'.format(meson.source_root()),
+ ['--git-dir=@0@/.git'.format(meson.current_source_dir()),
'rev-parse', 'HEAD']).stdout().strip()
git_head_short = run_command(
git,
- ['--git-dir=@0@/.git'.format(meson.source_root()),
+ ['--git-dir=@0@/.git'.format(meson.current_source_dir()),
'rev-parse', '--short=7', 'HEAD']).stdout().strip()
run_target(
'git-snapshot',
command : ['git', 'archive',
- '-o', '@0@/systemd-@1@.tar.gz'.format(meson.source_root(),
+ '-o', '@0@/systemd-@1@.tar.gz'.format(meson.current_source_dir(),
git_head_short),
'--prefix', 'systemd-@0@/'.format(git_head),
'HEAD'])
'PAM modules dir: @0@'.format(pamlibdir),
'PAM configuration dir: @0@'.format(pamconfdir),
'RPM macros dir: @0@'.format(rpmmacrosdir),
+ 'modprobe.d dir: @0@'.format(modprobedir),
'D-Bus policy dir: @0@'.format(dbuspolicydir),
'D-Bus session dir: @0@'.format(dbussessionservicedir),
'D-Bus system dir: @0@'.format(dbussystemservicedir),
'nobody user name: @0@'.format(get_option('nobody-user')),
'nobody group name: @0@'.format(get_option('nobody-group')),
'fallback hostname: @0@'.format(get_option('fallback-hostname')),
+ 'symbolic gateway hostnames: @0@'.format(', '.join(gateway_hostnames)),
'default DNSSEC mode: @0@'.format(default_dnssec),
'default cgroup hierarchy: @0@'.format(default_hierarchy),
# CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
# LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
-if conf.get('ENABLE_EFI', false)
+if conf.get('ENABLE_EFI') == 1
status += [
'efi arch: @0@'.format(efi_arch)]
['idn'],
['libidn2'],
['libidn'],
+ ['nss-systemd'],
['libiptc'],
['elfutils'],
['binfmt'],
['blkid'],
['dbus'],
['glib'],
- ['nss-myhostname', conf.get('HAVE_MYHOSTNAME', false)],
+ ['nss-myhostname', conf.get('HAVE_MYHOSTNAME') == 1],
['hwdb'],
['tpm'],
['man pages', want_man],
['html pages', want_html],
['man page indices', want_man and have_lxml],
- ['split /usr', conf.get('HAVE_SPLIT_USR', false)],
+ ['split /usr', conf.get('HAVE_SPLIT_USR') == 1],
['SysV compat'],
['utmp'],
['ldconfig'],
if cond == ''
ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
- cond = conf.get(ident1, false) or conf.get(ident2, false)
+ cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
endif
if cond
found += [tuple[0]]
endforeach
status += [
+ '',
'enabled features: @0@'.format(', '.join(found)),
- 'disabled features: @0@'.format(', '.join(missing))]
+ '',
+ 'disabled features: @0@'.format(', '.join(missing)),
+ '']
message('\n '.join(status))