Without setting this, the default build will fail if you don't have the
static libcap library installed (on openSUSE this is packaged separately
to libcap-devel).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
'''
if libcap_static.found()
libcap_static_linkable = cc.links(code, args: '-static', dependencies: libcap_static)
- srcconf.set10('HAVE_STATIC_LIBCAP', libcap_static_linkable)
else
- srcconf.set10('HAVE_STATIC_LIBCAP', false)
+ libcap_static_linkable = false
endif
+ srcconf.set10('HAVE_STATIC_LIBCAP', libcap_static_linkable)
else
libcap_static = []
+ libcap_static_linkable = false
srcconf.set10('HAVE_LIBCAP', false)
srcconf.set10('HAVE_STATIC_LIBCAP', false)
endif
output: 'lxc-update-config')
install_data(join_paths(project_build_root, 'src/lxc/cmd/lxc-update-config'), install_dir: bindir)
-if sanitize == 'none'
+if sanitize == 'none' and libcap_static_linkable
cmd_programs += executable(
'init.lxc.static',
cmd_lxc_init_sources,