project(
'lxcfs',
'c',
- version: '4.0.0',
+ version: '5.0.0',
license: 'LGPLv2+',
default_options: [
'b_colorout=always',
lxcfssharedir = join_paths(datadir, 'lxcfs')
lxcconfdir = join_paths(datadir, 'lxc/config/common.conf.d')
+lxcmandir = join_paths(datadir, 'man')
conf.set_quoted('BINDIR', bindir)
conf.set_quoted('LIBDIR', libdir)
# Custom configuration.
init_script = get_option('init-script')
want_tests = get_option('tests')
+want_docs= get_option('docs')
# Build flags.
conf.set10('HAVE_' + ident[0].to_upper(), have)
endforeach
-libfuse = dependency('fuse3', required: false)
-if libfuse.found()
- conf.set10('HAVE_FUSE3', true)
- conf.set('FUSE_USE_VERSION', 30)
-else
+fuse_version = get_option('fuse-version')
+if fuse_version == '3' or fuse_version == 'auto'
+ libfuse = dependency('fuse3', required: false)
+ if libfuse.found()
+ conf.set10('HAVE_FUSE3', true)
+ conf.set('FUSE_USE_VERSION', 35)
+ if libfuse.version().version_compare('>=3.10.3')
+ conf.set10('HAVE_FUSE_RETURNS_DT_TYPE', true)
+ else
+ conf.set10('HAVE_FUSE_RETURNS_DT_TYPE', false)
+ endif
+ endif
+endif
+
+if fuse_version == '2' or (not libfuse.found() and fuse_version == 'auto')
libfuse = dependency('fuse', version: '>= 2.6')
if libfuse.found()
conf.set10('HAVE_FUSE', true)
conf.set('FUSE_USE_VERSION', 26)
+ conf.set10('HAVE_FUSE_RETURNS_DT_TYPE', true)
endif
endif
+if not libfuse.found()
+ error('no usable fuse version found')
+endif
+
libdl = cc.find_library('dl')
threads = dependency('threads')
# Binary.
lxcfs_sources = files('src/lxcfs.c')
-public_programs = []
-public_programs += executable(
+lxcfs = executable(
'lxcfs',
lxcfs_sources,
dependencies: [
'@OUTPUT@',
])
+# Man pages
+if want_docs == true
+ help2man = find_program('help2man')
+ help2man_opts = [
+ '--name="System virtualization filesystem for containers"',
+ '--no-discard-stderr',
+ '--section=1',
+ '--opt-include=docs/lxcfs.man.add',
+ '--no-info',
+ ]
+ custom_target('lxcfs.1',
+ output: 'lxcfs.1',
+ command: [help2man, help2man_opts, '--output=@OUTPUT@', lxcfs],
+ install: true,
+ install_dir: join_paths(lxcmandir, 'man1'))
+endif
+
+
# Include sub-directories.
subdir('config/init')
subdir('share')
'lxcfs source root directory: @0@'.format(project_source_root),
'init system: @0@'.format(init_script),
'tests: @0@'.format(want_tests),
+ 'documentation: @0@'.format(want_docs),
]
message('\n '.join(status))