lib_cap_ng = dependency(
'libcap-ng',
required : get_option('build-setpriv'))
+ if not lib_cap_ng.found()
+ lib_cap_ng = disabler()
+ endif
lib_selinux = dependency(
'libselinux',
have = cc.compiles(code, name : 'using __progname')
conf.set('HAVE___PROGNAME', have ? 1 : false)
-have = conf.get('HAVE_PTY_H') != false and conf.get('HAVE_SYS_SIGNALFD_H') != false
+have = conf.get('HAVE_PTY_H').to_string() == '1' \
+ and conf.get('HAVE_SYS_SIGNALFD_H').to_string() == '1'
conf.set('HAVE_PTY', have ? 1 : false)
have_opal_get_status= cc.has_header_symbol('linux/sed-opal.h', 'IOC_OPAL_GET_STATUS')
bashcompletions += ['fadvise']
endif
-if LINUX and conf.get('HAVE_PIDFD_OPEN') != false
+if LINUX and conf.get('HAVE_PIDFD_OPEN').to_string() == '1'
exe = executable(
'waitpid',
waitpid_sources,
build_by_default: program_tests)
exes += exe
-if conf.get('HAVE_OPENAT') != false and conf.get('HAVE_DIRFD') != false
+if conf.get('HAVE_OPENAT').to_string() == '1' \
+ and conf.get('HAVE_DIRFD').to_string() == '1'
exe = executable(
'test_procfs',
'lib/procfs.c',
exes += exe
endif
-if conf.get('HAVE_PTY') != false
+if conf.get('HAVE_PTY').to_string() == '1'
exe = executable(
'test_pty',
pty_session_c,
include_directories : includes,
dependencies : [lib_cap_ng],
build_by_default: program_tests)
- exes += exe
+ if not is_disabler(exe)
+ exes += exe
+ endif
exe = executable(
'test_mbsencode',
############################################################
-if conf.get('HAVE_OPENAT') != false
+if conf.get('HAVE_OPENAT').to_string() == '1'
exe = executable(
'sample-scols-tree',
'libsmartcols/samples/tree.c',