output : htmlalias,
command : ['ln', '-fs', html, '@OUTPUT@'])
if want_html
- dst = join_paths(docdir, 'html', htmlalias)
+#if 0 /// This must be configurable in elogind
+# dst = join_paths(docdir, 'html', htmlalias)
+#else
+ dst = get_option('htmldir')
+ dst = dst != '' ? dst: join_paths(docdir, 'html', htmlalias)
+#endif // 0
cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
meson.add_install_script('sh', '-c', cmd)
p2 += [link]
systemshutdowndir = join_paths(rootlibexecdir, 'system-shutdown')
systemsleepdir = join_paths(rootlibexecdir, 'system-sleep')
-# in elogind, udev is external and hus configurable
+# in elogind, udev is external and thus configurable
udevlibexecdir = get_option('udevbindir')
udevlibexecdir = udevlibexecdir != '' ? udevlibexecdir : join_paths(rootprefixdir, 'lib/udev')
udevrulesdir = get_option('udevrulesdir')
udevrulesdir = udevrulesdir != '' ? udevrulesdir : join_paths(udevlibexecdir, 'rules.d')
udevhomedir = udevlibexecdir
factorydir = join_paths(datadir, 'factory')
-docdir = '-'.join([join_paths(datadir, 'doc/elogind'),
- meson.project_version()])
+docdir = get_option('docdir')
+docdir = docdir != '' ? docdir: '-'.join([join_paths(datadir, 'doc/elogind'),
+ meson.project_version()])
testsdir = join_paths(prefixdir, 'lib/elogind/tests')
randomseeddir = join_paths(localstatedir, 'lib/elogind')
#endif // 0
endif
endforeach
-if cc.compiles('
+if cc.compiles('''
#include <time.h>
#include <inttypes.h>
typedef uint64_t usec_t;
struct timespec now;
return 0;
}
-', name : '-Werror=shadow with local shadowing')
+''', name : '-Werror=shadow with local shadowing')
add_project_arguments('-Werror=shadow', language : 'c')
endif
debug = get_option('debug')
enable_debug_hashmap = false
enable_debug_mmap_cache = false
+#if 1 /// additional elogind debug mode
+enable_debug_elogind = false
+#endif // 1
if debug != ''
foreach name : debug.split(',')
if name == 'hashmap'
enable_debug_hashmap = true
elif name == 'mmap-cache'
+ enable_debug_mmap_cache = true
#if 1 /// additional elogind debug mode
- elif name == 'elogind'
- conf.set('ENABLE_DEBUG_ELOGIND', true)
+ elif name == 'elogind'
+ enable_debug_elogind = true
#endif // 1
- enable_debug_mmap_cache = true
else
message('unknown debug option "@0@", ignoring'.format(name))
endif
endif
conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap)
conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache)
+#if 1 /// additional elogind debug mode
+conf.set10('ENABLE_DEBUG_ELOGIND', enable_debug_elogind)
+#endif // 1
#####################################################################
install_polkit_pkla = true
endif
endif
-conf.set10('ENABLE_POLKIT', install_polkit)
+conf.set10('ENABLE_POLKIT', install_polkit ? '1' : '0')
want_acl = get_option('acl')
if want_acl != 'false'
command : ['env', 'ctags', '-o', '@0@/tags'.format(meson.current_source_dir())] + all_files)
endif
-if git.found()
- meson_git_contrib_sh = find_program('tools/meson-git-contrib.sh')
- run_target(
- 'git-contrib',
- command : [meson_git_contrib_sh])
-endif
+#if 0 /// UNNEEDED by elogind
+# if git.found()
+# meson_git_contrib_sh = find_program('tools/meson-git-contrib.sh')
+# run_target(
+# 'git-contrib',
+# command : [meson_git_contrib_sh])
+# endif
+#endif // 0
if git.found()
git_head = run_command(
['debug mmap cache'],
]
- cond = tuple.get(1, '')
- if cond == ''
+ cond = tuple.get(1, false)
+ if not cond
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
endif
+
if cond
found += [tuple[0]]
else
option('udevbindir', type : 'string',
description : '''directory for udev binary files''')
+# We are nice and make the documentation paths configurable
+option('docdir', type : 'string', description : 'path where to install the documentation.')
+option('htmldir', type : 'string', description : 'path where to install the HTML documentation.')
+
# We have no systemd-shutdown binary, so we need 'halt' and 'reboot'
option('halt-path', type : 'string', description : 'path to halt')
option('reboot-path', type : 'string', description : 'path to reboot')
# option('time-epoch', type : 'string',
# description : 'time epoch for time clients')
#else
- description : 'Wanted cgroup hierarchy if elogind has to be a cgroup controller:
+ description : '''Wanted cgroup hierarchy if elogind has to be a cgroup controller:
"legacy" assumes cgroups version 1 mounted on /sys/fs/cgroup
"hybrid" assumes cgroups version 2 mounted on /sys/fs/cgroup/unified and
cgroups version 1 mounted on /sys/fs/cgroup.
- "unified" assumes cgroups version 2 on /sys/fs/cgroup')
+ "unified" assumes cgroups version 2 on /sys/fs/cgroup''')
option('cgroup-controller', type : 'string',
description : 'Name of the cgroup controller to use')
#endif // 0