mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
meson: Detect newer fuse
Now that we have support for fuse-3 we can detect it during the configure phase. Even better, we can detect fuse-3 first and fallback to old fuse only if the newer version doesn't exist. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d881cefe60
commit
09bb46991d
12
meson.build
12
meson.build
@ -947,10 +947,16 @@ if dlopen_dep.found()
|
||||
conf.set('WITH_DLFCN_H', 1)
|
||||
endif
|
||||
|
||||
fuse_version = '2.8.6'
|
||||
fuse_dep = dependency('fuse', version: '>=' + fuse_version, required: get_option('fuse'))
|
||||
fuse_version = '3.1.0'
|
||||
fuse_dep = dependency('fuse3', version: '>=' + fuse_version, required: false)
|
||||
if fuse_dep.found()
|
||||
conf.set('WITH_FUSE', 1)
|
||||
conf.set('WITH_FUSE', 3)
|
||||
else
|
||||
fuse_version = '2.8.6'
|
||||
fuse_dep = dependency('fuse', version: '>=' + fuse_version, required: get_option('fuse'))
|
||||
if fuse_dep.found()
|
||||
conf.set('WITH_FUSE', 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
glib_version = '2.56.0'
|
||||
|
@ -26,7 +26,11 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#if WITH_FUSE
|
||||
# define FUSE_USE_VERSION 26
|
||||
# if WITH_FUSE == 3
|
||||
# define FUSE_USE_VERSION 31
|
||||
# else
|
||||
# define FUSE_USE_VERSION 26
|
||||
# endif
|
||||
# include <fuse.h>
|
||||
# if FUSE_USE_VERSION >= 31
|
||||
# include <fuse_lowlevel.h>
|
||||
|
Loading…
Reference in New Issue
Block a user