]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - meson.build
shell-completion: replace "gdb" verb with "debug" for coredumpctl
[thirdparty/systemd.git] / meson.build
index a123940f10488742b53c1957f1254b40af21c11a..f79ac4b12e78c32c72bacd68267843612f76100b 100644 (file)
@@ -90,8 +90,8 @@ if rootlibdir == ''
 endif
 
 # Dirs of external packages
-pkgconfigdatadir = join_paths(datadir, 'pkgconfig')
-pkgconfiglibdir = join_paths(libdir, 'pkgconfig')
+pkgconfigdatadir = get_option('pkgconfigdatadir') == '' ? join_paths(datadir, 'pkgconfig') : get_option('pkgconfigdatadir')
+pkgconfiglibdir = get_option('pkgconfiglibdir') == '' ? join_paths(libdir, 'pkgconfig') : get_option('pkgconfiglibdir')
 polkitpolicydir = join_paths(datadir, 'polkit-1/actions')
 polkitrulesdir = join_paths(datadir, 'polkit-1/rules.d')
 polkitpkladir = join_paths(localstatedir, 'lib/polkit-1/localauthority/10-vendor.d')
@@ -1013,6 +1013,18 @@ else
 endif
 conf.set10('HAVE_GNUTLS', have)
 
+want_openssl = get_option('openssl')
+if want_openssl != 'false' and not fuzzer_build
+        libopenssl = dependency('openssl',
+                                version : '>= 1.1.0',
+                                required : want_openssl == 'true')
+        have = libopenssl.found()
+else
+        have = false
+        libopenssl = []
+endif
+conf.set10('HAVE_OPENSSL', have)
+
 want_elfutils = get_option('elfutils')
 if want_elfutils != 'false' and not fuzzer_build
         libdw = dependency('libdw',
@@ -1136,15 +1148,30 @@ substs.set('DEFAULT_DNSSEC_MODE', default_dnssec)
 
 dns_over_tls = get_option('dns-over-tls')
 if dns_over_tls != 'false'
-        have = (conf.get('HAVE_GNUTLS') == 1 and
-                libgnutls.version().version_compare('>=3.5.3'))
-        if dns_over_tls == 'true' and not have
-                error('DNS-over-TLS support was requested, but dependencies are not available')
+        if dns_over_tls == 'openssl'
+                have_gnutls = false
+        else
+                have_gnutls = (conf.get('HAVE_GNUTLS') == 1 and libgnutls.version().version_compare('>= 3.5.3'))
+                if dns_over_tls == 'gnutls' and not have_gnutls
+                        error('DNS-over-TLS support was requested with gnutls, but dependencies are not available')
+                endif
         endif
+        if dns_over_tls == 'gnutls' or have_gnutls
+                have_openssl = false
+        else
+                have_openssl = conf.get('HAVE_OPENSSL') == 1
+                if dns_over_tls != 'auto' and not have_openssl
+                        str = dns_over_tls == 'openssl' ? ' with openssl' : ''
+                        error('DNS-over-TLS support was requested$0$, but dependencies are not available'.format(str))
+                endif
+        endif
+        have = have_gnutls or have_openssl
 else
-        have = false
+        have = have_gnutls = have_openssl = false
 endif
 conf.set10('ENABLE_DNS_OVER_TLS', have)
+conf.set10('DNS_OVER_TLS_USE_GNUTLS', have_gnutls)
+conf.set10('DNS_OVER_TLS_USE_OPENSSL', have_openssl)
 
 default_dns_over_tls = get_option('default-dns-over-tls')
 if fuzzer_build
@@ -1507,7 +1534,7 @@ exe = executable('systemd-analyze',
                                  libblkid],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 executable('systemd-journald',
            systemd_journald_sources,
@@ -1530,7 +1557,7 @@ exe = executable('systemd-cat',
                  dependencies : [threads],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 exe = executable('journalctl',
                  journalctl_sources,
@@ -1544,7 +1571,7 @@ exe = executable('journalctl',
                  install_rpath : rootlibexecdir,
                  install : true,
                  install_dir : rootbindir)
-public_programs += [exe]
+public_programs += exe
 
 executable('systemd-getty-generator',
            'src/getty-generator/getty-generator.c',
@@ -1621,7 +1648,7 @@ if conf.get('HAVE_BLKID') == 1
                          install_rpath : rootlibexecdir,
                          install : true,
                          install_dir : rootlibexecdir)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 if conf.get('ENABLE_RESOLVE') == 1
@@ -1648,7 +1675,7 @@ if conf.get('ENABLE_RESOLVE') == 1
                                          libidn],
                          install_rpath : rootlibexecdir,
                          install : true)
-        public_programs += [exe]
+        public_programs += exe
 
         meson.add_install_script(meson_make_symlink,
                          join_paths(bindir, 'resolvectl'),
@@ -1681,7 +1708,7 @@ if conf.get('ENABLE_LOGIND') == 1
                          install_rpath : rootlibexecdir,
                          install : true,
                          install_dir : rootbindir)
-        public_programs += [exe]
+        public_programs += exe
 
         exe = executable('systemd-inhibit',
                          'src/login/inhibit.c',
@@ -1690,7 +1717,7 @@ if conf.get('ENABLE_LOGIND') == 1
                          install_rpath : rootlibexecdir,
                          install : true,
                          install_dir : rootbindir)
-        public_programs += [exe]
+        public_programs += exe
 
         if conf.get('HAVE_PAM') == 1
                 version_script_arg = join_paths(meson.current_source_dir(), pam_systemd_sym)
@@ -1742,7 +1769,7 @@ if conf.get('ENABLE_EFI') == 1 and conf.get('HAVE_BLKID') == 1
                          dependencies : [libblkid],
                          install_rpath : rootlibexecdir,
                          install : true)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 exe = executable('systemd-socket-activate', 'src/activate/activate.c',
@@ -1751,7 +1778,7 @@ exe = executable('systemd-socket-activate', 'src/activate/activate.c',
                  dependencies : [threads],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 
 if get_option('link-systemctl-shared')
@@ -1774,7 +1801,7 @@ exe = executable('systemctl', 'src/systemctl/systemctl.c',
                  install_rpath : rootlibexecdir,
                  install : true,
                  install_dir : rootbindir)
-public_programs += [exe]
+public_programs += exe
 
 if conf.get('ENABLE_PORTABLED') == 1
         executable('systemd-portabled',
@@ -1793,7 +1820,7 @@ if conf.get('ENABLE_PORTABLED') == 1
                          install_rpath : rootlibexecdir,
                          install : true,
                          install_dir : rootlibexecdir)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 foreach alias : ['halt', 'poweroff', 'reboot', 'runlevel', 'shutdown', 'telinit']
@@ -1901,7 +1928,7 @@ if conf.get('ENABLE_HOSTNAMED') == 1
                          link_with : [libshared],
                          install_rpath : rootlibexecdir,
                          install : true)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 if conf.get('ENABLE_LOCALED') == 1
@@ -1927,7 +1954,7 @@ if conf.get('ENABLE_LOCALED') == 1
                          link_with : [libshared],
                          install_rpath : rootlibexecdir,
                          install : true)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 if conf.get('ENABLE_TIMEDATED') == 1
@@ -1948,7 +1975,7 @@ if conf.get('ENABLE_TIMEDATECTL') == 1
                          link_with : [libshared],
                          dependencies : [libm],
                          install : true)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 if conf.get('ENABLE_TIMESYNCD') == 1
@@ -1991,7 +2018,7 @@ if conf.get('ENABLE_MACHINED') == 1
                          install_rpath : rootlibexecdir,
                          install : true,
                          install_dir : rootbindir)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 if conf.get('ENABLE_IMPORTD') == 1
@@ -2056,7 +2083,7 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1
                          install_rpath : rootlibexecdir,
                          install : true,
                          install_dir : rootlibexecdir)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
@@ -2112,7 +2139,7 @@ if conf.get('ENABLE_COREDUMP') == 1
                                          liblz4],
                          install_rpath : rootlibexecdir,
                          install : true)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 if conf.get('ENABLE_BINFMT') == 1
@@ -2123,7 +2150,7 @@ if conf.get('ENABLE_BINFMT') == 1
                          install_rpath : rootlibexecdir,
                          install : true,
                          install_dir : rootlibexecdir)
-        public_programs += [exe]
+        public_programs += exe
 
         meson.add_install_script('sh', '-c',
                                  mkdir_p.format(binfmtdir))
@@ -2222,7 +2249,7 @@ exe = executable('systemd-sysctl',
                  install_rpath : rootlibexecdir,
                  install : true,
                  install_dir : rootlibexecdir)
-public_programs += [exe]
+public_programs += exe
 
 executable('systemd-ac-power',
            'src/ac-power/ac-power.c',
@@ -2238,7 +2265,7 @@ exe = executable('systemd-detect-virt',
                  link_with : [libshared],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 exe = executable('systemd-delta',
                  'src/delta/delta.c',
@@ -2246,7 +2273,7 @@ exe = executable('systemd-delta',
                  link_with : [libshared],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 exe = executable('systemd-escape',
                  'src/escape/escape.c',
@@ -2255,7 +2282,7 @@ exe = executable('systemd-escape',
                  install_rpath : rootlibexecdir,
                  install : true,
                  install_dir : rootbindir)
-public_programs += [exe]
+public_programs += exe
 
 exe = executable('systemd-notify',
                  'src/notify/notify.c',
@@ -2264,7 +2291,7 @@ exe = executable('systemd-notify',
                  install_rpath : rootlibexecdir,
                  install : true,
                  install_dir : rootbindir)
-public_programs += [exe]
+public_programs += exe
 
 executable('systemd-volatile-root',
            'src/volatile-root/volatile-root.c',
@@ -2288,7 +2315,7 @@ exe = executable('systemd-path',
                  link_with : [libshared],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 exe = executable('systemd-ask-password',
                  'src/ask-password/ask-password.c',
@@ -2297,7 +2324,7 @@ exe = executable('systemd-ask-password',
                  install_rpath : rootlibexecdir,
                  install : true,
                  install_dir : rootbindir)
-public_programs += [exe]
+public_programs += exe
 
 executable('systemd-reply-password',
            'src/reply-password/reply-password.c',
@@ -2314,7 +2341,7 @@ exe = executable('systemd-tty-ask-password-agent',
                  install_rpath : rootlibexecdir,
                  install : true,
                  install_dir : rootbindir)
-public_programs += [exe]
+public_programs += exe
 
 exe = executable('systemd-cgls',
                  'src/cgls/cgls.c',
@@ -2322,7 +2349,7 @@ exe = executable('systemd-cgls',
                  link_with : [libshared],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 exe = executable('systemd-cgtop',
                  'src/cgtop/cgtop.c',
@@ -2330,7 +2357,7 @@ exe = executable('systemd-cgtop',
                  link_with : [libshared],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 executable('systemd-initctl',
            'src/initctl/initctl.c',
@@ -2346,7 +2373,7 @@ exe = executable('systemd-mount',
                  link_with : [libshared],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 meson.add_install_script(meson_make_symlink,
                          'systemd-mount', join_paths(bindir, 'systemd-umount'))
@@ -2357,7 +2384,7 @@ exe = executable('systemd-run',
                  link_with : [libshared],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 exe = executable('systemd-stdio-bridge',
                  'src/stdio-bridge/stdio-bridge.c',
@@ -2365,7 +2392,7 @@ exe = executable('systemd-stdio-bridge',
                  link_with : [libshared],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 exe = executable('busctl',
                  'src/busctl/busctl.c',
@@ -2375,7 +2402,7 @@ exe = executable('busctl',
                  link_with : [libshared],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 if conf.get('ENABLE_SYSUSERS') == 1
         exe = executable('systemd-sysusers',
@@ -2385,7 +2412,7 @@ if conf.get('ENABLE_SYSUSERS') == 1
                          install_rpath : rootlibexecdir,
                          install : true,
                          install_dir : rootbindir)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 if conf.get('ENABLE_TMPFILES') == 1
@@ -2397,7 +2424,7 @@ if conf.get('ENABLE_TMPFILES') == 1
                          install_rpath : rootlibexecdir,
                          install : true,
                          install_dir : rootbindir)
-        public_programs += [exe]
+        public_programs += exe
 
         test('test-systemd-tmpfiles',
              test_systemd_tmpfiles_py,
@@ -2414,7 +2441,7 @@ if conf.get('ENABLE_HWDB') == 1
                          install_rpath : udev_rpath,
                          install : true,
                          install_dir : rootbindir)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 if conf.get('ENABLE_QUOTACHECK') == 1
@@ -2435,7 +2462,7 @@ exe = executable('systemd-socket-proxyd',
                  install_rpath : rootlibexecdir,
                  install : true,
                  install_dir : rootlibexecdir)
-public_programs += [exe]
+public_programs += exe
 
 exe = executable('systemd-udevd',
                  systemd_udevd_sources,
@@ -2452,7 +2479,7 @@ exe = executable('systemd-udevd',
                  install_rpath : udev_rpath,
                  install : true,
                  install_dir : rootlibexecdir)
-public_programs += [exe]
+public_programs += exe
 
 exe = executable('udevadm',
                  udevadm_sources,
@@ -2469,7 +2496,7 @@ exe = executable('udevadm',
                  install_rpath : udev_rpath,
                  install : true,
                  install_dir : rootbindir)
-public_programs += [exe]
+public_programs += exe
 
 executable('systemd-shutdown',
            systemd_shutdown_sources,
@@ -2525,7 +2552,7 @@ exe = executable('systemd-nspawn',
                  dependencies : [libblkid],
                  install_rpath : rootlibexecdir,
                  install : true)
-public_programs += [exe]
+public_programs += exe
 
 if conf.get('ENABLE_NETWORKD') == 1
         executable('systemd-networkd',
@@ -2557,7 +2584,7 @@ if conf.get('ENABLE_NETWORKD') == 1
                    install_rpath : rootlibexecdir,
                    install : true,
                    install_dir : rootbindir)
-        public_programs += [exe]
+        public_programs += exe
 endif
 
 executable('systemd-sulogin-shell',
@@ -2916,8 +2943,7 @@ status += [
 # LDFLAGS:  ${OUR_LDFLAGS} ${LDFLAGS}
 
 if conf.get('ENABLE_EFI') == 1
-        status += [
-                'efi arch:                          @0@'.format(efi_arch)]
+        status += 'efi arch:                          @0@'.format(efi_arch)
 
         if have_gnu_efi
                 status += [
@@ -2950,6 +2976,7 @@ foreach tuple : [
         ['qrencode'],
         ['microhttpd'],
         ['gnutls'],
+        ['openssl'],
         ['libcurl'],
         ['idn'],
         ['libidn2'],
@@ -2976,7 +3003,8 @@ foreach tuple : [
         ['localed'],
         ['networkd'],
         ['resolve'],
-        ['DNS-over-TLS'],
+        ['DNS-over-TLS(gnutls)',  conf.get('DNS_OVER_TLS_USE_GNUTLS') == 1],
+        ['DNS-over-TLS(openssl)', conf.get('DNS_OVER_TLS_USE_OPENSSL') == 1],
         ['coredump'],
         ['polkit'],
         ['legacy pkla',      install_polkit_pkla],
@@ -3017,9 +3045,9 @@ foreach tuple : [
                 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
         endif
         if cond
-                found += [tuple[0]]
+                found += tuple[0]
         else
-                missing += [tuple[0]]
+                missing += tuple[0]
         endif
 endforeach