]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - meson.build
man: Fix a minor typo in systemctl(1)
[thirdparty/systemd.git] / meson.build
index d4af95a44a9b2c0e3448663aa721cec7e543a7ed..dbe841ba19e22023739134357740a1f4f7f60663 100644 (file)
@@ -1,22 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1+
 #
 # Copyright 2017 Zbigniew JÄ™drzejewski-Szmek
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# systemd is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
 project('systemd', 'c',
-        version : '237',
+        version : '238',
         license : 'LGPLv2+',
         default_options: [
                 'c_std=gnu99',
@@ -27,10 +14,10 @@ project('systemd', 'c',
         meson_version : '>= 0.41',
        )
 
-libsystemd_version = '0.21.0'
-libudev_version = '1.6.9'
+libsystemd_version = '0.22.0'
+libudev_version = '1.6.10'
 
-# We need the same data in three different formats, ugh!
+# We need the same data in two different formats, ugh!
 # Also, for hysterical reasons, we use different variable
 # names, sometimes. Not all variables are included in every
 # set. Ugh, ugh, ugh!
@@ -42,8 +29,6 @@ substs = configuration_data()
 substs.set('PACKAGE_URL',          'https://www.freedesktop.org/wiki/Software/systemd')
 substs.set('PACKAGE_VERSION',      meson.project_version())
 
-m4_defines = []
-
 #####################################################################
 
 # Try to install the git pre-commit hook
@@ -54,23 +39,34 @@ endif
 
 #####################################################################
 
-split_usr = get_option('split-usr')
-conf.set10('HAVE_SPLIT_USR', split_usr)
+if get_option('split-usr') == 'auto'
+        split_usr = run_command('test', '-L', '/bin').returncode() != 0
+else
+        split_usr = get_option('split-usr') == 'true'
+endif
+conf.set10('HAVE_SPLIT_USR', split_usr,
+           description : '/usr/bin and /bin directories are separate')
+
+if get_option('split-bin') == 'auto'
+        split_bin = run_command('test', '-L', '/usr/sbin').returncode() != 0
+else
+        split_bin = get_option('split-bin') == 'true'
+endif
+conf.set10('HAVE_SPLIT_BIN', split_bin,
+           description : 'bin and sbin directories are separate')
 
 rootprefixdir = get_option('rootprefix')
 # Unusual rootprefixdir values are used by some distros
 # (see https://github.com/systemd/systemd/pull/7461).
-rootprefix_default = get_option('split-usr') ? '/' : '/usr'
+rootprefix_default = split_usr ? '/' : '/usr'
 if rootprefixdir == ''
         rootprefixdir = rootprefix_default
 endif
 
 sysvinit_path = get_option('sysvinit-path')
 sysvrcnd_path = get_option('sysvrcnd-path')
-have = sysvinit_path != '' and sysvrcnd_path != ''
-conf.set10('HAVE_SYSV_COMPAT', have,
+conf.set10('HAVE_SYSV_COMPAT', sysvinit_path != '' and sysvrcnd_path != '',
            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
@@ -87,6 +83,7 @@ datadir = join_paths(prefixdir, get_option('datadir'))
 localstatedir = join_paths('/', get_option('localstatedir'))
 
 rootbindir = join_paths(rootprefixdir, 'bin')
+rootsbindir = join_paths(rootprefixdir, split_bin ? 'sbin' : 'bin')
 rootlibexecdir = join_paths(rootprefixdir, 'lib/systemd')
 
 rootlibdir = get_option('rootlibdir')
@@ -181,6 +178,9 @@ conf.set_quoted('SYSTEM_SYSVINIT_PATH',                       sysvinit_path)
 conf.set_quoted('SYSTEM_SYSVRCND_PATH',                       sysvrcnd_path)
 conf.set_quoted('RC_LOCAL_SCRIPT_PATH_START',                 get_option('rc-local'))
 conf.set_quoted('RC_LOCAL_SCRIPT_PATH_STOP',                  get_option('halt-local'))
+
+conf.set('ANSI_OK_COLOR',                                     'ANSI_' + get_option('ok-color').underscorify().to_upper())
+
 conf.set_quoted('USER_CONFIG_UNIT_PATH',                      join_paths(pkgsysconfdir, 'user'))
 conf.set_quoted('USER_DATA_UNIT_PATH',                        userunitdir)
 conf.set_quoted('CERTIFICATE_ROOT',                           get_option('certificate-root'))
@@ -220,7 +220,7 @@ conf.set_quoted('VENDOR_KEYRING_PATH',                        join_paths(rootlib
 conf.set_quoted('USER_KEYRING_PATH',                          join_paths(pkgsysconfdir, 'import-pubring.gpg'))
 conf.set_quoted('DOCUMENT_ROOT',                              join_paths(pkgdatadir, 'gatewayd'))
 conf.set('MEMORY_ACCOUNTING_DEFAULT',                         memory_accounting_default ? 'true' : 'false')
-conf.set_quoted('MEMORY_ACCOUNTING_DEFAULT_ON_OFF',           memory_accounting_default ? 'on' : 'off')
+conf.set_quoted('MEMORY_ACCOUNTING_DEFAULT_YES_NO',           memory_accounting_default ? 'yes' : 'no')
 
 conf.set_quoted('ABS_BUILD_DIR',                              meson.build_root())
 conf.set_quoted('ABS_SRC_DIR',                                meson.source_root())
@@ -370,8 +370,7 @@ if cc.get_id() == 'clang'
         foreach arg : ['-Wno-typedef-redefinition',
                        '-Wno-gnu-variable-sized-type-not-at-end',
                       ]
-                if cc.has_argument(arg,
-                                   name : '@0@ is supported'.format(arg))
+                if cc.has_argument(arg)
                         add_project_arguments(arg, language : 'c')
                 endif
         endforeach
@@ -395,25 +394,10 @@ foreach arg : ['-Wl,-z,relro',
         endif
 endforeach
 
-# Check if various sanitizers are supported
-sanitizers = []
-foreach arg : ['address']
-
-        have = run_command(check_compilation_sh,
-                           cc.cmd_array(), '-x', 'c',
-                           '-fsanitize=@0@'.format(arg),
-                           '-include', link_test_c).returncode() == 0
-        message('@0@ sanitizer supported: @1@'.format(arg, have ? 'yes' : 'no'))
-        if have
-                sanitizers += arg
-        endif
-endforeach
-
 if get_option('buildtype') != 'debug'
         foreach arg : ['-ffunction-sections',
                        '-fdata-sections']
-                if cc.has_argument(arg,
-                                   name : '@0@ is supported'.format(arg))
+                if cc.has_argument(arg)
                         add_project_arguments(arg, language : 'c')
                 endif
         endforeach
@@ -521,10 +505,11 @@ foreach ident : [
                                  #include <unistd.h>'''],
         ['bpf',               '''#include <sys/syscall.h>
                                  #include <unistd.h>'''],
-        ['explicit_bzero' ,   '''#include <string.h>'''],
         ['statx',             '''#include <sys/types.h>
                                  #include <sys/stat.h>
                                  #include <unistd.h>'''],
+        ['explicit_bzero' ,   '''#include <string.h>'''],
+        ['reallocarray',      '''#include <malloc.h>'''],
 ]
 
         have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
@@ -548,6 +533,7 @@ m4 = find_program('m4')
 stat = find_program('stat')
 git = find_program('git', required : false)
 env = find_program('env')
+perl = find_program('perl', required : false)
 
 meson_make_symlink = meson.source_root() + '/tools/meson-make-symlink.sh'
 mkdir_p = 'mkdir -p $DESTDIR/@0@'
@@ -558,7 +544,6 @@ splash_bmp = files('test/splash.bmp')
 # /usr/sbin, /sbin, and fall back to the default from middle column.
 progs = [['quotaon',    '/usr/sbin/quotaon'    ],
          ['quotacheck', '/usr/sbin/quotacheck' ],
-         ['kill',       '/usr/bin/kill'        ],
          ['kmod',       '/usr/bin/kmod'        ],
          ['kexec',      '/usr/sbin/kexec'      ],
          ['sulogin',    '/usr/sbin/sulogin'    ],
@@ -586,7 +571,7 @@ endforeach
 conf.set_quoted('TELINIT', get_option('telinit-path'))
 
 if run_command('ln', '--relative', '--help').returncode() != 0
-        error('ln does not support --relative')
+        error('ln does not support --relative (added in coreutils 8.16)')
 endif
 
 ############################################################
@@ -765,19 +750,15 @@ else
 endif
 substs.set('USERS_GID', users_gid)
 
-if get_option('adm-group')
-        m4_defines += ['-DENABLE_ADM_GROUP']
-endif
-
-if get_option('wheel-group')
-        m4_defines += ['-DENABLE_WHEEL_GROUP']
-endif
+conf.set10('ENABLE_ADM_GROUP', get_option('adm-group'))
+conf.set10('ENABLE_WHEEL_GROUP', get_option('wheel-group'))
 
 substs.set('DEV_KVM_MODE', get_option('dev-kvm-mode'))
 substs.set('GROUP_RENDER_MODE', get_option('group-render-mode'))
 
 kill_user_processes = get_option('default-kill-user-processes')
 conf.set10('KILL_USER_PROCESSES', kill_user_processes)
+conf.set_quoted('KILL_USER_PROCESSES_YES_NO', kill_user_processes ? 'yes' : 'no')
 substs.set('KILL_USER_PROCESSES', kill_user_processes ? 'yes' : 'no')
 
 dns_servers = get_option('dns-servers')
@@ -825,8 +806,7 @@ if not libcap.found()
 endif
 
 libmount = dependency('mount',
-                      version : '>= 2.30',
-                      required : not fuzzer_build)
+                      version : fuzzer_build ? '>= 0' : '>= 2.30')
 
 want_seccomp = get_option('seccomp')
 if want_seccomp != 'false' and not fuzzer_build
@@ -839,7 +819,6 @@ else
         libseccomp = []
 endif
 conf.set10('HAVE_SECCOMP', have)
-m4_defines += have ? ['-DHAVE_SECCOMP'] : []
 
 want_selinux = get_option('selinux')
 if want_selinux != 'false' and not fuzzer_build
@@ -852,7 +831,6 @@ else
         libselinux = []
 endif
 conf.set10('HAVE_SELINUX', have)
-m4_defines += have ? ['-DHAVE_SELINUX'] : []
 
 want_apparmor = get_option('apparmor')
 if want_apparmor != 'false' and not fuzzer_build
@@ -864,12 +842,10 @@ else
         libapparmor = []
 endif
 conf.set10('HAVE_APPARMOR', have)
-m4_defines += have ? ['-DHAVE_APPARMOR'] : []
 
 smack_run_label = get_option('smack-run-label')
 if smack_run_label != ''
         conf.set_quoted('SMACK_RUN_LABEL', smack_run_label)
-        m4_defines += ['-DHAVE_SMACK_RUN_LABEL']
 endif
 
 want_polkit = get_option('polkit')
@@ -896,7 +872,6 @@ else
         libacl = []
 endif
 conf.set10('HAVE_ACL', have)
-m4_defines += have ? ['-DHAVE_ACL'] : []
 
 want_audit = get_option('audit')
 if want_audit != 'false' and not fuzzer_build
@@ -941,7 +916,6 @@ else
         libpam_misc = []
 endif
 conf.set10('HAVE_PAM', have)
-m4_defines += have ? ['-DHAVE_PAM'] : []
 
 want_microhttpd = get_option('microhttpd')
 if want_microhttpd != 'false' and not fuzzer_build
@@ -954,7 +928,6 @@ else
         libmicrohttpd = []
 endif
 conf.set10('HAVE_MICROHTTPD', have)
-m4_defines += have ? ['-DHAVE_MICROHTTPD'] : []
 
 want_libcryptsetup = get_option('libcryptsetup')
 if want_libcryptsetup != 'false' and not fuzzer_build
@@ -979,7 +952,6 @@ else
         libcurl = []
 endif
 conf.set10('HAVE_LIBCURL', have)
-m4_defines += have ? ['-DHAVE_LIBCURL'] : []
 
 want_libidn = get_option('libidn')
 want_libidn2 = get_option('libidn2')
@@ -996,7 +968,6 @@ else
         libidn = []
 endif
 conf.set10('HAVE_LIBIDN', have)
-m4_defines += have ? ['-DHAVE_LIBIDN'] : []
 if not have and want_libidn2 != 'false' and not fuzzer_build
         # libidn is used for both libidn and libidn2 objects
         libidn = dependency('libidn2',
@@ -1006,7 +977,6 @@ else
         have = false
 endif
 conf.set10('HAVE_LIBIDN2', have)
-m4_defines += have ? ['-DHAVE_LIBIDN2'] : []
 
 want_libiptc = get_option('libiptc')
 if want_libiptc != 'false' and not fuzzer_build
@@ -1018,7 +988,6 @@ else
         libiptc = []
 endif
 conf.set10('HAVE_LIBIPTC', have)
-m4_defines += have ? ['-DHAVE_LIBIPTC'] : []
 
 want_qrencode = get_option('qrencode')
 if want_qrencode != 'false' and not fuzzer_build
@@ -1245,9 +1214,10 @@ foreach term : ['utmp',
         have = get_option(term)
         name = 'ENABLE_' + term.underscorify().to_upper()
         conf.set10(name, have)
-        m4_defines += have ? ['-D' + name] : []
 endforeach
 
+conf.set10('ENABLE_TIMEDATECTL', get_option('timedated') or get_option('timesyncd'))
+
 want_tests = get_option('tests')
 install_tests = get_option('install-tests')
 slow_tests = get_option('slow-tests')
@@ -1293,12 +1263,15 @@ config_h = configure_file(
         output : 'config.h',
         configuration : conf)
 
+meson_apply_m4 = find_program('tools/meson-apply-m4.sh')
+
 includes = include_directories('src/basic',
                                'src/shared',
                                'src/systemd',
                                'src/journal',
                                'src/resolve',
                                'src/timesync',
+                               'src/time-wait-sync',
                                'src/login',
                                'src/udev',
                                'src/libudev',
@@ -1350,6 +1323,31 @@ libsystemd = shared_library(
         install : true,
         install_dir : rootlibdir)
 
+static_libsystemd = get_option('static-libsystemd')
+static_libsystemd_pic = static_libsystemd == 'true' or static_libsystemd == 'pic'
+
+install_libsystemd_static = static_library(
+        'systemd',
+        libsystemd_sources,
+        journal_client_sources,
+        basic_sources,
+        basic_gcrypt_sources,
+        include_directories : includes,
+        build_by_default : static_libsystemd != 'false',
+        install : static_libsystemd != 'false',
+        install_dir : rootlibdir,
+        pic : static_libsystemd == 'true' or static_libsystemd == 'pic',
+        dependencies : [threads,
+                        librt,
+                        libxz,
+                        liblz4,
+                        libcap,
+                        libblkid,
+                        libmount,
+                        libselinux,
+                        libgcrypt],
+        c_args : libsystemd_c_args + (static_libsystemd_pic ? [] : ['-fno-PIC']))
+
 ############################################################
 
 # binaries that have --help and are intended for use by humans,
@@ -1452,6 +1450,10 @@ executable('systemd',
            install : true,
            install_dir : rootlibexecdir)
 
+meson.add_install_script(meson_make_symlink,
+                         join_paths(rootlibexecdir, 'systemd'),
+                         join_paths(rootsbindir, 'init'))
+
 exe = executable('systemd-analyze',
                  systemd_analyze_sources,
                  include_directories : includes,
@@ -1597,8 +1599,8 @@ if conf.get('ENABLE_RESOLVE') == 1
                    install : true,
                    install_dir : rootlibexecdir)
 
-        exe = executable('systemd-resolve',
-                         systemd_resolve_sources,
+        exe = executable('resolvectl',
+                         resolvectl_sources,
                          include_directories : includes,
                          link_with : [libshared,
                                       libbasic_gcrypt,
@@ -1610,6 +1612,14 @@ if conf.get('ENABLE_RESOLVE') == 1
                          install_rpath : rootlibexecdir,
                          install : true)
         public_programs += [exe]
+
+        meson.add_install_script(meson_make_symlink,
+                         join_paths(bindir, 'resolvectl'),
+                         join_paths(rootsbindir, 'resolvconf'))
+
+        meson.add_install_script(meson_make_symlink,
+                         join_paths(bindir, 'resolvectl'),
+                         join_paths(bindir, 'systemd-resolve'))
 endif
 
 if conf.get('ENABLE_LOGIND') == 1
@@ -1669,6 +1679,14 @@ if conf.get('ENABLE_LOGIND') == 1
         endif
 endif
 
+executable('systemd-user-runtime-dir',
+           user_runtime_dir_sources,
+           include_directories : includes,
+           link_with : [libshared, liblogind_core],
+           install_rpath : rootlibexecdir,
+           install : true,
+           install_dir : rootlibexecdir)
+
 if conf.get('HAVE_PAM') == 1
         executable('systemd-user-sessions',
                    'src/user-sessions/user-sessions.c',
@@ -1711,6 +1729,12 @@ exe = executable('systemctl', 'src/systemctl/systemctl.c',
                  install_dir : rootbindir)
 public_programs += [exe]
 
+foreach alias : ['halt', 'poweroff', 'reboot', 'runlevel', 'shutdown', 'telinit']
+        meson.add_install_script(meson_make_symlink,
+                                 join_paths(rootbindir, 'systemctl'),
+                                 join_paths(rootsbindir, alias))
+endforeach
+
 if conf.get('ENABLE_BACKLIGHT') == 1
         executable('systemd-backlight',
                    'src/backlight/backlight.c',
@@ -1847,12 +1871,15 @@ if conf.get('ENABLE_TIMEDATED') == 1
                    install_rpath : rootlibexecdir,
                    install : true,
                    install_dir : rootlibexecdir)
+endif
 
+if conf.get('ENABLE_TIMEDATECTL') == 1
         exe = executable('timedatectl',
                          'src/timedate/timedatectl.c',
                          include_directories : includes,
                          install_rpath : rootlibexecdir,
                          link_with : [libshared],
+                         dependencies : [libm],
                          install : true)
         public_programs += [exe]
 endif
@@ -1867,6 +1894,14 @@ if conf.get('ENABLE_TIMESYNCD') == 1
                    install_rpath : rootlibexecdir,
                    install : true,
                    install_dir : rootlibexecdir)
+
+        executable('systemd-time-wait-sync',
+                   'src/time-wait-sync/time-wait-sync.c',
+                   include_directories : includes,
+                   link_with : [libshared],
+                   install_rpath : rootlibexecdir,
+                   install : true,
+                   install_dir : rootlibexecdir)
 endif
 
 if conf.get('ENABLE_MACHINED') == 1
@@ -2372,6 +2407,7 @@ executable('systemd-shutdown',
            systemd_shutdown_sources,
            include_directories : includes,
            link_with : [libshared],
+           dependencies : [libmount],
            install_rpath : rootlibexecdir,
            install : true,
            install_dir : rootlibexecdir)
@@ -2511,17 +2547,30 @@ foreach tuple : tests
         endif
 endforeach
 
-test_libsystemd_sym = executable(
+exe = executable(
         'test-libsystemd-sym',
         test_libsystemd_sym_c,
         include_directories : includes,
         link_with : [libsystemd],
         install : install_tests,
         install_dir : testsdir)
-test('test-libsystemd-sym',
-     test_libsystemd_sym)
+test('test-libsystemd-sym', exe)
+
+exe = executable(
+        'test-libsystemd-static-sym',
+        test_libsystemd_sym_c,
+        include_directories : includes,
+        link_with : [install_libsystemd_static],
+        dependencies : [threads], # threads is already included in dependencies on the library,
+                                  # but does not seem to get propagated. Add here as a work-around.
+        build_by_default : static_libsystemd_pic,
+        install : install_tests and static_libsystemd_pic,
+        install_dir : testsdir)
+if static_libsystemd_pic
+        test('test-libsystemd-static-sym', exe)
+endif
 
-test_libudev_sym = executable(
+exe = executable(
         'test-libudev-sym',
         test_libudev_sym_c,
         include_directories : includes,
@@ -2529,8 +2578,20 @@ test_libudev_sym = executable(
         link_with : [libudev],
         install : install_tests,
         install_dir : testsdir)
-test('test-libudev-sym',
-     test_libudev_sym)
+test('test-libudev-sym', exe)
+
+exe = executable(
+        'test-libudev-static-sym',
+        test_libudev_sym_c,
+        include_directories : includes,
+        c_args : ['-Wno-deprecated-declarations'],
+        link_with : [install_libudev_static],
+        build_by_default : static_libudev_pic,
+        install : install_tests and static_libudev_pic,
+        install_dir : testsdir)
+if static_libudev_pic
+        test('test-libudev-static-sym', exe)
+endif
 
 ############################################################
 
@@ -2582,8 +2643,8 @@ subdir('network')
 subdir('man')
 subdir('shell-completion/bash')
 subdir('shell-completion/zsh')
-subdir('docs/sysvinit')
-subdir('docs/var-log')
+subdir('doc/sysvinit')
+subdir('doc/var-log')
 
 # FIXME: figure out if the warning is true:
 # https://github.com/mesonbuild/meson/wiki/Reference-manual#install_subdir
@@ -2595,15 +2656,17 @@ install_data('xorg/50-systemd-user.sh',
              install_dir : xinitrcdir)
 install_data('modprobe.d/systemd.conf',
              install_dir : modprobedir)
-install_data('README',
-             'NEWS',
-             'CODING_STYLE',
-             'DISTRO_PORTING',
-             'ENVIRONMENT.md',
-             'LICENSE.GPL2',
+install_data('LICENSE.GPL2',
              'LICENSE.LGPL2.1',
-             'TRANSIENT-SETTINGS.md',
-             'UIDS-GIDS.md',
+             'NEWS',
+             'README',
+             'doc/CODING_STYLE',
+             'doc/DISTRO_PORTING',
+             'doc/ENVIRONMENT.md',
+             'doc/HACKING',
+             'doc/TRANSIENT-SETTINGS.md',
+             'doc/TRANSLATORS',
+             'doc/UIDS-GIDS.md',
              'src/libsystemd/sd-bus/GVARIANT-SERIALIZATION',
              install_dir : docdir)
 
@@ -2623,48 +2686,56 @@ endforeach
 
 ############################################################
 
-prev = ''
-foreach p : fuzz_regression_tests
-        a = p.split('/')[-3]
-        b = p.split('/')[-2]
-        c = p.split('/')[-1]
-
-        if a == 'address'
-                build = sanitize_address
-        else
-                error('unknown sanitizer @0@'.format(a))
-        endif
+# Enable tests for all supported sanitizers
+foreach tuple : sanitizers
+        sanitizer = tuple[0]
+        build = tuple[1]
 
-        name = '@1@:@0@'.format(a, b)
-
-        if name != prev
-                if want_tests == 'false'
-                        message('Not compiling @0@ because tests is set to false'.format(name))
-                elif not sanitizers.contains(a)
-                        message('Not compiling @0@ because @1@ sanitizer is not available'.format(name, a))
-                elif slow_tests
-                        exe = custom_target(
-                                name,
-                                output : name,
-                                depends : build,
-                                command : [env, 'ln', '-fs',
-                                           join_paths(build.full_path(), b),
-                                           '@OUTPUT@'],
-                                build_by_default : true)
-                else
-                        message('Not compiling @0@ because slow-tests is set to false'.format(name))
-                endif
-        endif
-        prev = name
+        have = run_command(check_compilation_sh,
+                           cc.cmd_array(), '-x', 'c',
+                           '-fsanitize=@0@'.format(sanitizer),
+                           '-include', link_test_c).returncode() == 0
+        message('@0@ sanitizer supported: @1@'.format(sanitizer, have ? 'yes' : 'no'))
 
-        if want_tests != 'false' and slow_tests
-                test(c, env, args : [exe.full_path(),
-                                     join_paths(meson.source_root(),
-                                                'test/fuzz-regressions',
-                                                p)])
+        if have
+                prev = ''
+                foreach p : fuzz_regression_tests
+                        b = p.split('/')[-2]
+                        c = p.split('/')[-1]
+
+                        name = '@0@:@1@'.format(b, sanitizer)
+
+                        if name != prev
+                                if want_tests == 'false'
+                                        message('Not compiling @0@ because tests is set to false'.format(name))
+                                elif slow_tests
+                                        exe = custom_target(
+                                                name,
+                                                output : name,
+                                                depends : build,
+                                                command : [env, 'ln', '-fs',
+                                                           join_paths(build.full_path(), b),
+                                                           '@OUTPUT@'],
+                                                build_by_default : true)
+                                else
+                                        message('Not compiling @0@ because slow-tests is set to false'.format(name))
+                                endif
+                        endif
+                        prev = name
+
+                        if want_tests != 'false' and slow_tests
+                                test('@0@:@1@:@2@'.format(b, c, sanitizer),
+                                     env,
+                                     args : [exe.full_path(),
+                                             join_paths(meson.source_root(),
+                                                        'test/fuzz-regressions',
+                                                        p)])
+                        endif
+                endforeach
         endif
 endforeach
 
+
 ############################################################
 
 if git.found()
@@ -2724,6 +2795,8 @@ run_target(
 status = [
         '@0@ @1@'.format(meson.project_name(), meson.project_version()),
 
+        'split /usr:                        @0@'.format(split_usr),
+        'split bin-sbin:                    @0@'.format(split_bin),
         'prefix directory:                  @0@'.format(prefixdir),
         'rootprefix directory:              @0@'.format(rootprefixdir),
         'sysconf directory:                 @0@'.format(sysconfdir),
@@ -2860,7 +2933,6 @@ foreach tuple : [
         ['man pages',        want_man],
         ['html pages',       want_html],
         ['man page indices', want_man and have_lxml],
-        ['split /usr',       conf.get('HAVE_SPLIT_USR') == 1],
         ['SysV compat'],
         ['utmp'],
         ['ldconfig'],
@@ -2872,8 +2944,9 @@ foreach tuple : [
         ['debug mmap cache'],
 ]
 
-        cond = tuple.get(1, '')
-        if cond == ''
+        if tuple.length() >= 2
+                cond = tuple[1]
+        else
                 ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
                 ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
                 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1