2020-10-08 13:31:33 +03:00
|
|
|
have_virtiofsd = (targetos == 'linux' and
|
2020-02-05 11:45:39 +03:00
|
|
|
have_tools and
|
2020-11-17 16:22:24 +03:00
|
|
|
seccomp.found() and
|
2020-11-17 16:46:58 +03:00
|
|
|
libcap_ng.found() and
|
2020-02-05 11:45:39 +03:00
|
|
|
'CONFIG_VHOST_USER' in config_host)
|
|
|
|
|
2020-10-08 13:31:33 +03:00
|
|
|
if get_option('virtiofsd').enabled()
|
|
|
|
if not have_virtiofsd
|
|
|
|
if targetos != 'linux'
|
|
|
|
error('virtiofsd requires Linux')
|
2020-11-17 16:46:58 +03:00
|
|
|
elif not seccomp.found() or not libcap_ng.found()
|
2020-10-08 13:31:33 +03:00
|
|
|
error('virtiofsd requires libcap-ng-devel and seccomp-devel')
|
2021-02-02 00:14:56 +03:00
|
|
|
elif 'CONFIG_VHOST_USER' not in config_host
|
|
|
|
error('virtiofsd needs vhost-user support')
|
|
|
|
else
|
|
|
|
# Disabled all the tools but virtiofsd.
|
|
|
|
have_virtiofsd = true
|
2020-10-08 13:31:33 +03:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
elif get_option('virtiofsd').disabled() or not have_system
|
|
|
|
have_virtiofsd = false
|
|
|
|
endif
|
|
|
|
|
2020-02-05 11:45:39 +03:00
|
|
|
if have_virtiofsd
|
|
|
|
subdir('virtiofsd')
|
|
|
|
endif
|