]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - meson.build
libsmartcols: (filter) emulate YYerror for old Bison
[thirdparty/util-linux.git] / meson.build
index 21822f0bd426ea0e863edaf74d5077a09fcd385d..99126f7aada9f22a14d0879afc2ea26bc02394f2 100644 (file)
@@ -78,7 +78,7 @@ conf.set_quoted('ADJTIME_PATH', '/etc/adjtime') # yes, both are used :(
 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')
 
@@ -102,7 +102,12 @@ conf.set('HAVE_MOUNTFD_API', have_mountfd_api ? 1 : false)
 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)
@@ -246,6 +251,7 @@ lib_m = cc.find_library('m')
 
 lib_tinfo = dependency(
   'tinfo',
+  disabler : true,
   required : get_option('tinfo'))
 
 lib_ncursesw = dependency(
@@ -260,6 +266,7 @@ if lib_ncursesw.found()
 else
   lib_ncurses = dependency(
     'ncurses',
+    disabler : true,
     required : get_option('ncurses'))
   headers += ['ncurses.h',
               'term.h']
@@ -292,6 +299,7 @@ endforeach
 
 lib_z = dependency(
   'zlib',
+  disabler : true,
   required : get_option('zlib'))
 
 lib_readline = dependency(
@@ -1501,7 +1509,7 @@ if opt and not is_disabler(exe)
   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,