1 # SPDX-License-Identifier: LGPL-2.1+
3 # Copyright © 2017 Zbigniew Jędrzejewski-Szmek
5 #if 0 /// No systemd-journal in elogind ...
6 # _systemd_headers = '''
18 _systemd_headers = '''
30 # https://github.com/mesonbuild/meson/issues/1633
31 systemd_headers = files(_systemd_headers)
53 #if 0 /// elogind needs them somewhere else
56 subdir : 'elogind/systemd')
58 meson.add_install_script(meson_symlink_headers,
65 ############################################################
69 ['c', '-std=iso9899:1990'],
70 ['c', '-std=iso9899:2011']]
72 if cc.has_argument('-std=iso9899:2017')
73 opts += [['c', '-std=iso9899:2017']]
76 cxx = find_program('c++', required : false)
79 ['c++', '-std=c++98'],
80 ['c++', '-std=c++11']]
81 if cc.has_argument('-std=c++14')
82 opts += [['c++', '-std=c++14']]
84 if cc.has_argument('-std=c++17')
85 opts += [['c++', '-std=c++17']]
89 foreach header : _systemd_headers
91 name = ''.join([header, ':'] + opt)
94 args : cc.cmd_array() + ['-c', '-x'] + opt +
95 ['-Werror', '-include',
96 join_paths(meson.current_source_dir(), header)])