conf.set_quoted('_PATH_VENDORDIR', vendordir)
conf.set('USE_VENDORDIR', vendordir == '' ? false : 1)
-build_libblkid = not get_option('build-libblkid').require(get_option('build-libmount').allowed()).disabled()
+build_libblkid = get_option('build-libblkid').allowed()
conf.set('HAVE_LIBBLKID', build_libblkid ? 1 : false)
summary('libblkid', build_libblkid ? 'enabled' : 'disabled', section : 'components')
have_struct_statx = cc.sizeof('struct statx', prefix : '#include <sys/stat.h>') > 0
conf.set('HAVE_STRUCT_STATX', have_struct_statx ? 1 : false)
-build_libmount = get_option('build-libmount').require(get_option('build-libblkid').allowed()).allowed()
+have_sys_vfs_header = cc.has_header('sys/vfs.h')
+
+build_libmount = get_option('build-libmount').require(
+ get_option('build-libblkid').allowed() \
+ and have_sys_vfs_header \
+).allowed()
conf.set('HAVE_LIBMOUNT', build_libmount ? 1 : false)
conf.set('USE_LIBMOUNT_SUPPORT_NAMESPACES', 1)
lib_tinfo = dependency(
'tinfo',
+ disabler : true,
required : get_option('tinfo'))
lib_ncursesw = dependency(
else
lib_ncurses = dependency(
'ncurses',
+ disabler : true,
required : get_option('ncurses'))
headers += ['ncurses.h',
'term.h']
lib_z = dependency(
'zlib',
+ disabler : true,
required : get_option('zlib'))
lib_readline = dependency(
bison = find_program('bison')
flex = find_program('flex')
+awk = find_program('gawk', 'mawk', 'nawk', 'awk')
build_hwclock = not get_option('build-hwclock').disabled()
bison_gen = generator(
bashcompletions += ['tunelp']
endif
-opt = not get_option('build-fstrim').disabled()
+opt = get_option('build-fstrim').require(have_sys_vfs_header).allowed()
exe = executable(
'fstrim',
fstrim_sources,
errnos_h = custom_target('errnos.h',
input : 'tools/all_errnos',
output : 'errnos.h',
- command : ['tools/all_errnos', cc.cmd_array(), get_option('c_args')],
+ command : ['tools/all_errnos', awk.full_path(),
+ cc.cmd_array(), get_option('c_args')],
)
opt = not get_option('build-lsfd').require(lib_rt.found()).disabled()
syscalls_h = custom_target('syscalls.h',
input : 'tools/all_syscalls',
output : 'syscalls.h',
- command : ['tools/all_syscalls', cc.cmd_array(), get_option('c_args')],
+ command : ['tools/all_syscalls', awk.full_path(),
+ cc.cmd_array(), get_option('c_args')],
)
if cc.compiles(fs.read('include/audit-arch.h'), name : 'has AUDIT_ARCH_NATIVE')