mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
meson: Use feature options
By using meson features we can replace the handcrafted dependency auto-detection by just passing the value from get_option directly to the required arg for dependency, find_library etc. 'auto' features make the dependency optional, 'enabled' requires it while 'disabled' features will skip detection entirely. Any skipped or not found dependency will just be a no-op when passed to build steps and therefore we can also skip the creation of empty vars. The use of skip_deps for these is dropped here as meson provides a way to disable all optional features in one go by passing '-Dauto_features=disabled'.
This commit is contained in:
parent
b26c345279
commit
43abc59a27
2
.github/workflows/build_test.sh
vendored
2
.github/workflows/build_test.sh
vendored
|
@ -11,7 +11,7 @@ ARGS=(
|
||||||
"--optimization=0"
|
"--optimization=0"
|
||||||
"--optimization=s"
|
"--optimization=s"
|
||||||
"--optimization=3 -Db_lto=true -Ddns-over-tls=false"
|
"--optimization=3 -Db_lto=true -Ddns-over-tls=false"
|
||||||
"--optimization=3 -Db_lto=false -Dtpm2=false -Dlibfido2=false -Dp11kit=false"
|
"--optimization=3 -Db_lto=false -Dtpm2=disabled -Dlibfido2=false -Dp11kit=disabled"
|
||||||
"--optimization=3 -Ddns-over-tls=openssl"
|
"--optimization=3 -Ddns-over-tls=openssl"
|
||||||
"--optimization=3 -Dfexecve=true -Dstandalone-binaries=true -Dstatic-libsystemd=true -Dstatic-libudev=true"
|
"--optimization=3 -Dfexecve=true -Dstandalone-binaries=true -Dstatic-libsystemd=true -Dstatic-libudev=true"
|
||||||
"-Db_ndebug=true"
|
"-Db_ndebug=true"
|
||||||
|
|
384
meson.build
384
meson.build
|
@ -1158,41 +1158,20 @@ else
|
||||||
endif
|
endif
|
||||||
conf.set10('HAVE_PASSWDQC', have)
|
conf.set10('HAVE_PASSWDQC', have)
|
||||||
|
|
||||||
want_seccomp = get_option('seccomp')
|
libseccomp = dependency('libseccomp',
|
||||||
if want_seccomp != 'false' and not skip_deps
|
version : '>= 2.3.1',
|
||||||
libseccomp = dependency('libseccomp',
|
required : get_option('seccomp'))
|
||||||
version : '>= 2.3.1',
|
conf.set10('HAVE_SECCOMP', libseccomp.found())
|
||||||
required : want_seccomp == 'true')
|
|
||||||
have = libseccomp.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libseccomp = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_SECCOMP', have)
|
|
||||||
|
|
||||||
want_selinux = get_option('selinux')
|
libselinux = dependency('libselinux',
|
||||||
if want_selinux != 'false' and not skip_deps
|
version : '>= 2.1.9',
|
||||||
libselinux = dependency('libselinux',
|
required : get_option('selinux'))
|
||||||
version : '>= 2.1.9',
|
conf.set10('HAVE_SELINUX', libselinux.found())
|
||||||
required : want_selinux == 'true')
|
|
||||||
have = libselinux.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libselinux = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_SELINUX', have)
|
|
||||||
|
|
||||||
want_apparmor = get_option('apparmor')
|
libapparmor = dependency('libapparmor',
|
||||||
if want_apparmor != 'false' and not skip_deps
|
version : '>= 2.13',
|
||||||
libapparmor = dependency('libapparmor',
|
required : get_option('apparmor'))
|
||||||
version : '>= 2.13',
|
conf.set10('HAVE_APPARMOR', libapparmor.found())
|
||||||
required : want_apparmor == 'true')
|
|
||||||
have = libapparmor.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libapparmor = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_APPARMOR', have)
|
|
||||||
|
|
||||||
have = get_option('smack') and get_option('smack-run-label') != ''
|
have = get_option('smack') and get_option('smack-run-label') != ''
|
||||||
conf.set10('HAVE_SMACK_RUN_LABEL', have)
|
conf.set10('HAVE_SMACK_RUN_LABEL', have)
|
||||||
|
@ -1220,62 +1199,29 @@ if want_polkit != 'false' and not skip_deps
|
||||||
endif
|
endif
|
||||||
conf.set10('ENABLE_POLKIT', install_polkit)
|
conf.set10('ENABLE_POLKIT', install_polkit)
|
||||||
|
|
||||||
want_acl = get_option('acl')
|
libacl = dependency('libacl',
|
||||||
if want_acl != 'false' and not skip_deps
|
required : get_option('acl'))
|
||||||
libacl = dependency('libacl', required : want_acl == 'true')
|
conf.set10('HAVE_ACL', libacl.found())
|
||||||
have = libacl.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libacl = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_ACL', have)
|
|
||||||
|
|
||||||
want_audit = get_option('audit')
|
libaudit = dependency('audit',
|
||||||
if want_audit != 'false' and not skip_deps
|
required : get_option('audit'))
|
||||||
libaudit = dependency('audit', required : want_audit == 'true')
|
conf.set10('HAVE_AUDIT', libaudit.found())
|
||||||
have = libaudit.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libaudit = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_AUDIT', have)
|
|
||||||
|
|
||||||
want_blkid = get_option('blkid')
|
libblkid = dependency('blkid',
|
||||||
if want_blkid != 'false' and not skip_deps
|
required : get_option('blkid'))
|
||||||
libblkid = dependency('blkid', required : want_blkid == 'true')
|
conf.set10('HAVE_BLKID', libblkid.found())
|
||||||
have = libblkid.found()
|
conf.set10('HAVE_BLKID_PROBE_SET_HINT',
|
||||||
|
libblkid.found() and cc.has_function('blkid_probe_set_hint', dependencies : libblkid))
|
||||||
|
|
||||||
conf.set10('HAVE_BLKID_PROBE_SET_HINT',
|
libkmod = dependency('libkmod',
|
||||||
have and cc.has_function('blkid_probe_set_hint', dependencies : libblkid))
|
version : '>= 15',
|
||||||
else
|
required : get_option('kmod'))
|
||||||
have = false
|
conf.set10('HAVE_KMOD', libkmod.found())
|
||||||
libblkid = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_BLKID', have)
|
|
||||||
|
|
||||||
want_kmod = get_option('kmod')
|
libxenctrl = dependency('xencontrol',
|
||||||
if want_kmod != 'false' and not skip_deps
|
version : '>= 4.9',
|
||||||
libkmod = dependency('libkmod',
|
required : get_option('xenctrl'))
|
||||||
version : '>= 15',
|
conf.set10('HAVE_XENCTRL', libxenctrl.found())
|
||||||
required : want_kmod == 'true')
|
|
||||||
have = libkmod.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libkmod = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_KMOD', have)
|
|
||||||
|
|
||||||
want_xenctrl = get_option('xenctrl')
|
|
||||||
if want_xenctrl != 'false' and not skip_deps
|
|
||||||
libxenctrl = dependency('xencontrol',
|
|
||||||
version : '>= 4.9',
|
|
||||||
required : want_xenctrl == 'true')
|
|
||||||
have = libxenctrl.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libxenctrl = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_XENCTRL', have)
|
|
||||||
|
|
||||||
want_pam = get_option('pam')
|
want_pam = get_option('pam')
|
||||||
if want_pam != 'false' and not skip_deps
|
if want_pam != 'false' and not skip_deps
|
||||||
|
@ -1296,17 +1242,10 @@ else
|
||||||
endif
|
endif
|
||||||
conf.set10('HAVE_PAM', have)
|
conf.set10('HAVE_PAM', have)
|
||||||
|
|
||||||
want_microhttpd = get_option('microhttpd')
|
libmicrohttpd = dependency('libmicrohttpd',
|
||||||
if want_microhttpd != 'false' and not skip_deps
|
version : '>= 0.9.33',
|
||||||
libmicrohttpd = dependency('libmicrohttpd',
|
required : get_option('microhttpd'))
|
||||||
version : '>= 0.9.33',
|
conf.set10('HAVE_MICROHTTPD', libmicrohttpd.found())
|
||||||
required : want_microhttpd == 'true')
|
|
||||||
have = libmicrohttpd.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libmicrohttpd = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_MICROHTTPD', have)
|
|
||||||
|
|
||||||
want_libcryptsetup = get_option('libcryptsetup')
|
want_libcryptsetup = get_option('libcryptsetup')
|
||||||
want_libcryptsetup_plugins = get_option('libcryptsetup-plugins')
|
want_libcryptsetup_plugins = get_option('libcryptsetup-plugins')
|
||||||
|
@ -1353,17 +1292,10 @@ else
|
||||||
endif
|
endif
|
||||||
conf.set10('HAVE_LIBCRYPTSETUP_PLUGINS', have)
|
conf.set10('HAVE_LIBCRYPTSETUP_PLUGINS', have)
|
||||||
|
|
||||||
want_libcurl = get_option('libcurl')
|
libcurl = dependency('libcurl',
|
||||||
if want_libcurl != 'false' and not skip_deps
|
version : '>= 7.32.0',
|
||||||
libcurl = dependency('libcurl',
|
required : get_option('libcurl'))
|
||||||
version : '>= 7.32.0',
|
conf.set10('HAVE_LIBCURL', libcurl.found())
|
||||||
required : want_libcurl == 'true')
|
|
||||||
have = libcurl.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libcurl = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_LIBCURL', have)
|
|
||||||
conf.set10('CURL_NO_OLDIES', conf.get('BUILD_MODE_DEVELOPER') == 1)
|
conf.set10('CURL_NO_OLDIES', conf.get('BUILD_MODE_DEVELOPER') == 1)
|
||||||
|
|
||||||
want_libidn = get_option('libidn')
|
want_libidn = get_option('libidn')
|
||||||
|
@ -1391,28 +1323,14 @@ else
|
||||||
endif
|
endif
|
||||||
conf.set10('HAVE_LIBIDN', have)
|
conf.set10('HAVE_LIBIDN', have)
|
||||||
|
|
||||||
want_libiptc = get_option('libiptc')
|
libiptc = dependency('libiptc',
|
||||||
if want_libiptc != 'false' and not skip_deps
|
required : get_option('libiptc'))
|
||||||
libiptc = dependency('libiptc',
|
conf.set10('HAVE_LIBIPTC', libiptc.found())
|
||||||
required : want_libiptc == 'true')
|
|
||||||
have = libiptc.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libiptc = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_LIBIPTC', have)
|
|
||||||
|
|
||||||
want_qrencode = get_option('qrencode')
|
libqrencode = dependency('libqrencode',
|
||||||
if want_qrencode != 'false' and not skip_deps
|
version : '>= 3',
|
||||||
libqrencode = dependency('libqrencode',
|
required : get_option('qrencode'))
|
||||||
version : '>= 3',
|
conf.set10('HAVE_QRENCODE', libqrencode.found())
|
||||||
required : want_qrencode == 'true')
|
|
||||||
have = libqrencode.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libqrencode = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_QRENCODE', have)
|
|
||||||
|
|
||||||
want_gcrypt = get_option('gcrypt')
|
want_gcrypt = get_option('gcrypt')
|
||||||
if want_gcrypt != 'false' and not skip_deps
|
if want_gcrypt != 'false' and not skip_deps
|
||||||
|
@ -1433,43 +1351,21 @@ if not have
|
||||||
endif
|
endif
|
||||||
conf.set10('HAVE_GCRYPT', have)
|
conf.set10('HAVE_GCRYPT', have)
|
||||||
|
|
||||||
want_gnutls = get_option('gnutls')
|
libgnutls = dependency('gnutls',
|
||||||
if want_gnutls != 'false' and not skip_deps
|
version : '>= 3.1.4',
|
||||||
libgnutls = dependency('gnutls',
|
required : get_option('gnutls'))
|
||||||
version : '>= 3.1.4',
|
conf.set10('HAVE_GNUTLS', libgnutls.found())
|
||||||
required : want_gnutls == 'true')
|
|
||||||
have = libgnutls.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libgnutls = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_GNUTLS', have)
|
|
||||||
|
|
||||||
want_openssl = get_option('openssl')
|
libopenssl = dependency('openssl',
|
||||||
if want_openssl != 'false' and not skip_deps
|
version : '>= 1.1.0',
|
||||||
libopenssl = dependency('openssl',
|
required : get_option('openssl'))
|
||||||
version : '>= 1.1.0',
|
conf.set10('HAVE_OPENSSL', libopenssl.found())
|
||||||
required : want_openssl == 'true')
|
|
||||||
have = libopenssl.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libopenssl = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_OPENSSL', have)
|
|
||||||
|
|
||||||
want_p11kit = get_option('p11kit')
|
libp11kit = dependency('p11-kit-1',
|
||||||
if want_p11kit != 'false' and not skip_deps
|
version : '>= 0.23.3',
|
||||||
libp11kit = dependency('p11-kit-1',
|
required : get_option('p11kit'))
|
||||||
version : '>= 0.23.3',
|
conf.set10('HAVE_P11KIT', libp11kit.found())
|
||||||
required : want_p11kit == 'true')
|
libp11kit_cflags = libp11kit.partial_dependency(includes: true, compile_args: true)
|
||||||
have = libp11kit.found()
|
|
||||||
libp11kit_cflags = libp11kit.partial_dependency(includes: true, compile_args: true)
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libp11kit_cflags = []
|
|
||||||
libp11kit = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_P11KIT', have)
|
|
||||||
|
|
||||||
want_libfido2 = get_option('libfido2')
|
want_libfido2 = get_option('libfido2')
|
||||||
if want_libfido2 != 'false' and not skip_deps
|
if want_libfido2 != 'false' and not skip_deps
|
||||||
|
@ -1489,45 +1385,21 @@ else
|
||||||
endif
|
endif
|
||||||
conf.set10('HAVE_LIBFIDO2', have)
|
conf.set10('HAVE_LIBFIDO2', have)
|
||||||
|
|
||||||
want_tpm2 = get_option('tpm2')
|
tpm2 = dependency('tss2-esys tss2-rc tss2-mu tss2-tcti-device',
|
||||||
if want_tpm2 != 'false' and not skip_deps
|
required : get_option('tpm2'))
|
||||||
tpm2 = dependency('tss2-esys tss2-rc tss2-mu tss2-tcti-device',
|
conf.set10('HAVE_TPM2', tpm2.found())
|
||||||
required : want_tpm2 == 'true')
|
conf.set10('HAVE_TSS2_ESYS3', tpm2.found() and tpm2.version().version_compare('>= 3.0.0'))
|
||||||
have = tpm2.found()
|
|
||||||
have_esys3 = tpm2.version().version_compare('>= 3.0.0')
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
have_esys3 = false
|
|
||||||
tpm2 = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_TPM2', have)
|
|
||||||
conf.set10('HAVE_TSS2_ESYS3', have_esys3)
|
|
||||||
|
|
||||||
want_elfutils = get_option('elfutils')
|
libdw = dependency('libdw',
|
||||||
if want_elfutils != 'false' and not skip_deps
|
required : get_option('elfutils'))
|
||||||
libdw = dependency('libdw',
|
conf.set10('HAVE_ELFUTILS', libdw.found())
|
||||||
required : want_elfutils == 'true')
|
# New in elfutils 0.177
|
||||||
have = libdw.found()
|
conf.set10('HAVE_DWELF_ELF_E_MACHINE_STRING',
|
||||||
|
libdw.found() and cc.has_function('dwelf_elf_e_machine_string', dependencies : libdw))
|
||||||
|
|
||||||
# New in elfutils 0.177
|
libz = dependency('zlib',
|
||||||
conf.set10('HAVE_DWELF_ELF_E_MACHINE_STRING',
|
required : get_option('zlib'))
|
||||||
have and cc.has_function('dwelf_elf_e_machine_string', dependencies : libdw))
|
conf.set10('HAVE_ZLIB', libz.found())
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libdw = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_ELFUTILS', have)
|
|
||||||
|
|
||||||
want_zlib = get_option('zlib')
|
|
||||||
if want_zlib != 'false' and not skip_deps
|
|
||||||
libz = dependency('zlib',
|
|
||||||
required : want_zlib == 'true')
|
|
||||||
have = libz.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libz = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_ZLIB', have)
|
|
||||||
|
|
||||||
want_bzip2 = get_option('bzip2')
|
want_bzip2 = get_option('bzip2')
|
||||||
if want_bzip2 != 'false' and not skip_deps
|
if want_bzip2 != 'false' and not skip_deps
|
||||||
|
@ -1543,104 +1415,60 @@ else
|
||||||
endif
|
endif
|
||||||
conf.set10('HAVE_BZIP2', have)
|
conf.set10('HAVE_BZIP2', have)
|
||||||
|
|
||||||
want_xz = get_option('xz')
|
libxz = dependency('liblzma',
|
||||||
if want_xz != 'false' and not skip_deps
|
required : get_option('xz'))
|
||||||
libxz = dependency('liblzma',
|
conf.set10('HAVE_XZ', libxz.found())
|
||||||
required : want_xz == 'true')
|
|
||||||
have_xz = libxz.found()
|
|
||||||
else
|
|
||||||
have_xz = false
|
|
||||||
libxz = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_XZ', have_xz)
|
|
||||||
|
|
||||||
want_lz4 = get_option('lz4')
|
liblz4 = dependency('liblz4',
|
||||||
if want_lz4 != 'false' and not skip_deps
|
version : '>= 1.3.0',
|
||||||
liblz4 = dependency('liblz4',
|
required : get_option('lz4'))
|
||||||
version : '>= 1.3.0',
|
conf.set10('HAVE_LZ4', liblz4.found())
|
||||||
required : want_lz4 == 'true')
|
|
||||||
have_lz4 = liblz4.found()
|
|
||||||
else
|
|
||||||
have_lz4 = false
|
|
||||||
liblz4 = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_LZ4', have_lz4)
|
|
||||||
|
|
||||||
want_zstd = get_option('zstd')
|
libzstd = dependency('libzstd',
|
||||||
if want_zstd != 'false' and not skip_deps
|
version : '>= 1.4.0',
|
||||||
libzstd = dependency('libzstd',
|
required : get_option('zstd'))
|
||||||
required : want_zstd == 'true',
|
conf.set10('HAVE_ZSTD', libzstd.found())
|
||||||
version : '>= 1.4.0')
|
|
||||||
have_zstd = libzstd.found()
|
|
||||||
else
|
|
||||||
have_zstd = false
|
|
||||||
libzstd = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_ZSTD', have_zstd)
|
|
||||||
|
|
||||||
conf.set10('HAVE_COMPRESSION', have_xz or have_lz4 or have_zstd)
|
conf.set10('HAVE_COMPRESSION', libxz.found() or liblz4.found() or libzstd.found())
|
||||||
|
|
||||||
compression = get_option('default-compression')
|
compression = get_option('default-compression')
|
||||||
if compression == 'auto'
|
if compression == 'auto'
|
||||||
if have_zstd
|
if libzstd.found()
|
||||||
compression = 'zstd'
|
compression = 'zstd'
|
||||||
elif have_lz4
|
elif liblz4.found()
|
||||||
compression = 'lz4'
|
compression = 'lz4'
|
||||||
elif have_xz
|
elif libxz.found()
|
||||||
compression = 'xz'
|
compression = 'xz'
|
||||||
else
|
else
|
||||||
compression = 'none'
|
compression = 'none'
|
||||||
endif
|
endif
|
||||||
elif compression == 'zstd' and not have_zstd
|
elif compression == 'zstd' and not libzstd.found()
|
||||||
error('default-compression=zstd requires zstd')
|
error('default-compression=zstd requires zstd')
|
||||||
elif compression == 'lz4' and not have_lz4
|
elif compression == 'lz4' and not liblz4.found()
|
||||||
error('default-compression=lz4 requires lz4')
|
error('default-compression=lz4 requires lz4')
|
||||||
elif compression == 'xz' and not have_xz
|
elif compression == 'xz' and not libxz.found()
|
||||||
error('default-compression=xz requires xz')
|
error('default-compression=xz requires xz')
|
||||||
endif
|
endif
|
||||||
conf.set('DEFAULT_COMPRESSION', 'COMPRESSION_@0@'.format(compression.to_upper()))
|
conf.set('DEFAULT_COMPRESSION', 'COMPRESSION_@0@'.format(compression.to_upper()))
|
||||||
|
|
||||||
want_xkbcommon = get_option('xkbcommon')
|
libxkbcommon = dependency('xkbcommon',
|
||||||
if want_xkbcommon != 'false' and not skip_deps
|
version : '>= 0.3.0',
|
||||||
libxkbcommon = dependency('xkbcommon',
|
required : get_option('xkbcommon'))
|
||||||
version : '>= 0.3.0',
|
conf.set10('HAVE_XKBCOMMON', libxkbcommon.found())
|
||||||
required : want_xkbcommon == 'true')
|
|
||||||
have = libxkbcommon.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libxkbcommon = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_XKBCOMMON', have)
|
|
||||||
|
|
||||||
want_pcre2 = get_option('pcre2')
|
libpcre2 = dependency('libpcre2-8',
|
||||||
if want_pcre2 != 'false' and not skip_deps
|
required : get_option('pcre2'))
|
||||||
libpcre2 = dependency('libpcre2-8',
|
conf.set10('HAVE_PCRE2', libpcre2.found())
|
||||||
required : want_pcre2 == 'true')
|
|
||||||
have = libpcre2.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libpcre2 = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_PCRE2', have)
|
|
||||||
|
|
||||||
want_glib = get_option('glib')
|
libglib = dependency('glib-2.0',
|
||||||
if want_glib != 'false' and not skip_deps
|
version : '>= 2.22.0',
|
||||||
libglib = dependency('glib-2.0',
|
required : get_option('glib'))
|
||||||
version : '>= 2.22.0',
|
libgobject = dependency('gobject-2.0',
|
||||||
required : want_glib == 'true')
|
version : '>= 2.22.0',
|
||||||
libgobject = dependency('gobject-2.0',
|
required : get_option('glib'))
|
||||||
version : '>= 2.22.0',
|
libgio = dependency('gio-2.0',
|
||||||
required : want_glib == 'true')
|
required : get_option('glib'))
|
||||||
libgio = dependency('gio-2.0',
|
conf.set10('HAVE_GLIB', libglib.found() and libgobject.found() and libgio.found())
|
||||||
required : want_glib == 'true')
|
|
||||||
have = libglib.found() and libgobject.found() and libgio.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libglib = []
|
|
||||||
libgobject = []
|
|
||||||
libgio = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_GLIB', have)
|
|
||||||
|
|
||||||
want_dbus = get_option('dbus')
|
want_dbus = get_option('dbus')
|
||||||
if want_dbus != 'false' and not skip_deps
|
if want_dbus != 'false' and not skip_deps
|
||||||
|
|
|
@ -350,11 +350,11 @@ option('www-target', type : 'string',
|
||||||
description : 'the address and dir to upload docs too',
|
description : 'the address and dir to upload docs too',
|
||||||
value : 'www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd')
|
value : 'www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd')
|
||||||
|
|
||||||
option('seccomp', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('seccomp', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'SECCOMP support')
|
description : 'SECCOMP support')
|
||||||
option('selinux', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('selinux', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'SELinux support')
|
description : 'SELinux support')
|
||||||
option('apparmor', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('apparmor', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'AppArmor support')
|
description : 'AppArmor support')
|
||||||
option('smack', type : 'boolean',
|
option('smack', type : 'boolean',
|
||||||
description : 'SMACK support')
|
description : 'SMACK support')
|
||||||
|
@ -367,17 +367,17 @@ option('polkit', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
option('ima', type : 'boolean',
|
option('ima', type : 'boolean',
|
||||||
description : 'IMA support')
|
description : 'IMA support')
|
||||||
|
|
||||||
option('acl', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('acl', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'libacl support')
|
description : 'libacl support')
|
||||||
option('audit', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('audit', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'libaudit support')
|
description : 'libaudit support')
|
||||||
option('blkid', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('blkid', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'libblkid support')
|
description : 'libblkid support')
|
||||||
option('fdisk', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('fdisk', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'libfdisk support')
|
description : 'libfdisk support')
|
||||||
option('kmod', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('kmod', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'support for loadable modules')
|
description : 'support for loadable modules')
|
||||||
option('xenctrl', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('xenctrl', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'support for Xen kexec')
|
description : 'support for Xen kexec')
|
||||||
option('pam', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('pam', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'PAM support')
|
description : 'PAM support')
|
||||||
|
@ -385,13 +385,13 @@ option('passwdqc', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'libpasswdqc support')
|
description : 'libpasswdqc support')
|
||||||
option('pwquality', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('pwquality', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'libpwquality support')
|
description : 'libpwquality support')
|
||||||
option('microhttpd', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('microhttpd', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'libµhttpd support')
|
description : 'libµhttpd support')
|
||||||
option('libcryptsetup', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('libcryptsetup', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'libcryptsetup support')
|
description : 'libcryptsetup support')
|
||||||
option('libcryptsetup-plugins', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('libcryptsetup-plugins', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'libcryptsetup LUKS2 external token handlers support (plugins)')
|
description : 'libcryptsetup LUKS2 external token handlers support (plugins)')
|
||||||
option('libcurl', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('libcurl', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'libcurl support')
|
description : 'libcurl support')
|
||||||
option('idn', type : 'boolean',
|
option('idn', type : 'boolean',
|
||||||
description : 'use IDN when printing hostnames')
|
description : 'use IDN when printing hostnames')
|
||||||
|
@ -399,43 +399,43 @@ option('libidn2', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'libidn2 support')
|
description : 'libidn2 support')
|
||||||
option('libidn', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('libidn', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'libidn support')
|
description : 'libidn support')
|
||||||
option('libiptc', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('libiptc', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'libiptc support')
|
description : 'libiptc support')
|
||||||
option('qrencode', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('qrencode', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'libqrencode support')
|
description : 'libqrencode support')
|
||||||
option('gcrypt', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('gcrypt', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'gcrypt support')
|
description : 'gcrypt support')
|
||||||
option('gnutls', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('gnutls', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'gnutls support')
|
description : 'gnutls support')
|
||||||
option('openssl', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('openssl', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'openssl support')
|
description : 'openssl support')
|
||||||
option('cryptolib', type : 'combo', choices : ['auto', 'openssl', 'gcrypt'],
|
option('cryptolib', type : 'combo', choices : ['auto', 'openssl', 'gcrypt'],
|
||||||
description : 'whether to use openssl or gcrypt where both are supported')
|
description : 'whether to use openssl or gcrypt where both are supported')
|
||||||
option('p11kit', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('p11kit', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'p11kit support')
|
description : 'p11kit support')
|
||||||
option('libfido2', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('libfido2', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'FIDO2 support')
|
description : 'FIDO2 support')
|
||||||
option('tpm2', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('tpm2', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'TPM2 support')
|
description : 'TPM2 support')
|
||||||
option('elfutils', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('elfutils', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'elfutils support')
|
description : 'elfutils support')
|
||||||
option('zlib', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('zlib', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'zlib compression support')
|
description : 'zlib compression support')
|
||||||
option('bzip2', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('bzip2', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'bzip2 compression support')
|
description : 'bzip2 compression support')
|
||||||
option('xz', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('xz', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'xz compression support')
|
description : 'xz compression support')
|
||||||
option('lz4', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('lz4', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'lz4 compression support')
|
description : 'lz4 compression support')
|
||||||
option('zstd', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('zstd', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'zstd compression support')
|
description : 'zstd compression support')
|
||||||
option('default-compression', type : 'combo', choices : ['auto', 'zstd', 'lz4', 'xz'], value: 'auto',
|
option('default-compression', type : 'combo', choices : ['auto', 'zstd', 'lz4', 'xz'], value: 'auto',
|
||||||
description : 'default compression algorithm')
|
description : 'default compression algorithm')
|
||||||
option('xkbcommon', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('xkbcommon', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'xkbcommon keymap support')
|
description : 'xkbcommon keymap support')
|
||||||
option('pcre2', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('pcre2', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'regexp matching support using pcre2')
|
description : 'regexp matching support using pcre2')
|
||||||
option('glib', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('glib', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'libglib support (for tests only)')
|
description : 'libglib support (for tests only)')
|
||||||
option('dbus', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('dbus', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
description : 'libdbus support (for tests only)')
|
description : 'libdbus support (for tests only)')
|
||||||
|
|
|
@ -117,38 +117,38 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
|
||||||
-D xdg-autostart=true
|
-D xdg-autostart=true
|
||||||
-D translations=true
|
-D translations=true
|
||||||
-D polkit=true
|
-D polkit=true
|
||||||
-D acl=true
|
-D acl=enabled
|
||||||
-D audit=true
|
-D audit=enabled
|
||||||
-D blkid=true
|
-D blkid=enabled
|
||||||
-D fdisk=true
|
-D fdisk=true
|
||||||
-D kmod=true
|
-D kmod=enabled
|
||||||
-D pam=true
|
-D pam=true
|
||||||
-D pwquality=true
|
-D pwquality=true
|
||||||
-D microhttpd=true
|
-D microhttpd=enabled
|
||||||
-D libcryptsetup=true
|
-D libcryptsetup=true
|
||||||
-D libcurl=true
|
-D libcurl=enabled
|
||||||
-D idn=true
|
-D idn=true
|
||||||
-D libidn2=true
|
-D libidn2=true
|
||||||
-D qrencode=true
|
-D qrencode=enabled
|
||||||
-D gcrypt=true
|
-D gcrypt=true
|
||||||
-D gnutls=true
|
-D gnutls=enabled
|
||||||
-D openssl=true
|
-D openssl=enabled
|
||||||
-D cryptolib=openssl
|
-D cryptolib=openssl
|
||||||
-D p11kit=true
|
-D p11kit=enabled
|
||||||
-D libfido2=true
|
-D libfido2=true
|
||||||
-D tpm2=true
|
-D tpm2=enabled
|
||||||
-D elfutils=true
|
-D elfutils=enabled
|
||||||
-D zstd=true
|
-D zstd=enabled
|
||||||
-D xkbcommon=true
|
-D xkbcommon=enabled
|
||||||
-D pcre2=true
|
-D pcre2=enabled
|
||||||
-D glib=true
|
-D glib=enabled
|
||||||
-D dbus=true
|
-D dbus=true
|
||||||
-D bootloader=true
|
-D bootloader=true
|
||||||
-D kernel-install=true
|
-D kernel-install=true
|
||||||
-D analyze=true
|
-D analyze=true
|
||||||
-D bpf-framework=true
|
-D bpf-framework=true
|
||||||
-D ukify="$UKIFY"
|
-D ukify="$UKIFY"
|
||||||
-D seccomp=true
|
-D seccomp=enabled
|
||||||
-D selinux=auto
|
-D selinux=auto
|
||||||
-D apparmor=auto
|
-D apparmor=auto
|
||||||
-D smack=true
|
-D smack=true
|
||||||
|
|
Loading…
Reference in a new issue