endif
if not get_option('storage_zfs').disabled()
- zfs_enable = true
foreach name : [ 'zfs', 'zpool' ]
set_variable(
'@0@_prog'.format(name),
find_program(name, required: get_option('storage_zfs'), dirs: libvirt_sbin_path)
)
- if not get_variable('@0@_prog'.format(name)).found()
- zfs_enable = false
- endif
endforeach
- if zfs_enable
- use_storage = true
- conf.set('WITH_STORAGE_ZFS', 1)
- foreach name : [ 'zfs', 'zpool' ]
- conf.set_quoted(name.to_upper(), get_variable('@0@_prog'.format(name)).path())
- endforeach
- endif
+ use_storage = true
+ conf.set('WITH_STORAGE_ZFS', 1)
+ foreach name : [ 'zfs', 'zpool' ]
+ prog_var = get_variable('@0@_prog'.format(name))
+ if prog_var.found()
+ prog_path = prog_var.path()
+ else
+ prog_path = name
+ endif
+ conf.set_quoted(name.to_upper(), prog_path)
+ endforeach
endif
endif