
On Fri, Dec 16, 2016 at 10:11:56 +0100, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- configure.ac | 34 +++--------------------------- m4/virt-storage-zfs.m4 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 31 deletions(-) create mode 100644 m4/virt-storage-zfs.m4 ... diff --git a/m4/virt-storage-zfs.m4 b/m4/virt-storage-zfs.m4 new file mode 100644 index 0000000000..5439b8b0d4 --- /dev/null +++ b/m4/virt-storage-zfs.m4 @@ -0,0 +1,56 @@ ... +AC_DEFUN([LIBVIRT_STORAGE_CHECK_ZFS], [ + if test "$with_storage_zfs" = "yes" || + test "$with_storage_zfs" = "check"; then + AC_PATH_PROG([ZFS], [zfs], [], [$LIBVIRT_SBIN_PATH]) + AC_PATH_PROG([ZPOOL], [zpool], [], [$LIBVIRT_SBIN_PATH]) + + if test "$with_storage_zfs" = "yes"; then + if test -z "$ZFS" || test -z "$ZPOOL"; then + AC_MSG_ERROR([We need zfs and zpool for ZFS storage driver]) + fi + else + if test -z "$ZFS" || test -z "$ZPOOL"; then + with_storage_zfs=no + fi + + if test "$with_storage_zfs" = "check"; then
Useless check again. ACK Jirka