diff options
author | Max Reitz <mreitz@redhat.com> | 2020-10-27 20:05:46 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-12-11 17:52:40 +0100 |
commit | df4ea7091b744c8568e8bd9212a756ac504c43d4 (patch) | |
tree | 4bb9ba1819d02bb97343e03def3f6ca06ac54251 /meson.build | |
parent | 4ca37a96a75aafe7a37ba51ab1912b09b7190a6b (diff) |
fuse: Implement hole detection through lseek
This is a relatively new feature in libfuse (available since 3.8.0,
which was released in November 2019), so we have to add a dedicated
check whether it is available before making use of it.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20201027190600.192171-7-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 6e8ef151d8..f344b25955 100644 --- a/meson.build +++ b/meson.build @@ -773,10 +773,28 @@ elif get_option('vhost_user_blk_server').disabled() or not have_system have_vhost_user_blk_server = false endif +if get_option('fuse').disabled() and get_option('fuse_lseek').enabled() + error('Cannot enable fuse-lseek while fuse is disabled') +endif + fuse = dependency('fuse3', required: get_option('fuse'), version: '>=3.1', method: 'pkg-config', static: enable_static) +fuse_lseek = not_found +if not get_option('fuse_lseek').disabled() + if fuse.version().version_compare('>=3.8') + # Dummy dependency + fuse_lseek = declare_dependency() + elif get_option('fuse_lseek').enabled() + if fuse.found() + error('fuse-lseek requires libfuse >=3.8, found ' + fuse.version()) + else + error('fuse-lseek requires libfuse, which was not found') + endif + endif +endif + ################# # config-host.h # ################# @@ -812,6 +830,7 @@ config_host_data.set('CONFIG_GETTID', has_gettid) config_host_data.set('CONFIG_MALLOC_TRIM', has_malloc_trim) config_host_data.set('CONFIG_STATX', has_statx) config_host_data.set('CONFIG_FUSE', fuse.found()) +config_host_data.set('CONFIG_FUSE_LSEEK', fuse_lseek.found()) config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version())) config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]) config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) @@ -2214,6 +2233,7 @@ summary_info += {'thread sanitizer': config_host.has_key('CONFIG_TSAN')} summary_info += {'rng-none': config_host.has_key('CONFIG_RNG_NONE')} summary_info += {'Linux keyring': config_host.has_key('CONFIG_SECRET_KEYRING')} summary_info += {'FUSE exports': fuse.found()} +summary_info += {'FUSE lseek': fuse_lseek.found()} summary(summary_info, bool_yn: true) if not supported_cpus.contains(cpu) |