diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-07-31 08:28:21 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-08-04 14:34:53 +0200 |
commit | f3dca9e3c3373a5817582d4b583077b8f9358604 (patch) | |
tree | ea76ef30c91cf194ec7b47f59df44d452f26e10b /src/systemd/meson.build | |
parent | f3061b4c6efa8275466c56f291eca43d36178213 (diff) |
General: Update build system to upstream support of meson+ninja.
Upstream thinks, that the auto tools are too 'legacy', or that they
are at least no longer fitting.
We follow, as the classic auto tools files have been removed, so no
other choice here...
Diffstat (limited to 'src/systemd/meson.build')
-rw-r--r-- | src/systemd/meson.build | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/systemd/meson.build b/src/systemd/meson.build new file mode 100644 index 000000000..82159f336 --- /dev/null +++ b/src/systemd/meson.build @@ -0,0 +1,75 @@ +#if 0 /// No systemd-journal in elogind ... +# _systemd_headers = ''' +# sd-bus.h +# sd-bus-protocol.h +# sd-bus-vtable.h +# sd-daemon.h +# sd-event.h +# sd-id128.h +# sd-journal.h +# sd-login.h +# sd-messages.h +# '''.split() +#else +_systemd_headers = ''' + sd-bus.h + sd-bus-protocol.h + sd-bus-vtable.h + sd-daemon.h + sd-event.h + sd-id128.h + sd-login.h + sd-messages.h +'''.split() + +# https://github.com/mesonbuild/meson/issues/1633 +systemd_headers = files(_systemd_headers) + +# sd-device.h +# sd-hwdb.h +# sd-dhcp6-client.h +# sd-dhcp6-lease.h +# sd-dhcp-client.h +# sd-dhcp-lease.h +# sd-dhcp-server.h +# sd-ipv4acd.h +# sd-ipv4ll.h +# sd-lldp.h +# sd-ndisc.h +# sd-netlink.h +# sd-network.h +# sd-path.h +# sd-resolve.h +# sd-utf8.h + +install_headers( + systemd_headers, + '_sd-common.h', +#if 0 /// elogind needs them somewhere else +# subdir : 'systemd') +#else + subdir : 'elogind/systemd') +#endif // 0 + + +############################################################ + +opts = [['c'], + ['c', '-ansi'], + ['c', '-std=iso9899:1990']] + +cxx = find_program('c++', required : false) +if cxx.found() + opts += [['c++']] +endif + +foreach header : _systemd_headers + foreach opt : opts + name = ''.join([header, ':'] + opt) + test('cc-' + name, + check_compilation_sh, + args : cc.cmd_array() + ['-c', '-x'] + opt + + ['-Werror', '-include', + join_paths(meson.current_source_dir(), header)]) + endforeach +endforeach |