diff --git a/configure b/configure index e41a96271ef..701f33b35e1 100755 --- a/configure +++ b/configure @@ -466,39 +466,25 @@ function set_os_id_version() { } if [[ "${CONFIG[VFIO_USER]}" = "y" ]]; then + set_os_id_version + if [[ $arch != x86_64* ]] || [[ $sys_name == "FreeBSD" ]]; then echo "Non x86_64 and Linux platform, disable CONFIG_VFIO_USER" CONFIG[VFIO_USER]="n" - break - fi - - set_os_id_version - # disable tests on ubuntu16 due to lack of macro definition in pci_regs.h - if [[ $OSID == "ubuntu" ]] && [[ $OSVERSION == "16.04" ]]; then + elif [[ $OSID == "ubuntu" ]] && [[ $OSVERSION == "16.04" ]]; then echo "ubuntu16 OS, disable CONFIG_VFIO_USER" CONFIG[VFIO_USER]="n" - break - fi - - if ! hash cmake; then + elif ! hash cmake; then echo "cmake not installed, disable CONFIG_VFIO_USER" CONFIG[VFIO_USER]="n" - break - fi - - if [[ ! -d /usr/include/json-c ]] && [[ ! -d /usr/local/include/json-c ]]; then + elif [[ ! -d /usr/include/json-c ]] && [[ ! -d /usr/local/include/json-c ]]; then echo "json-c-devel not installed, disable CONFIG_VFIO_USER" CONFIG[VFIO_USER]="n" - break - fi - - if [[ ! -e /usr/include/cmocka.h ]] && [[ ! -e /usr/local/include/cmocka.h ]]; then + elif [[ ! -e /usr/include/cmocka.h ]] && [[ ! -e /usr/local/include/cmocka.h ]]; then echo "libcmocka-devel not installed, disable CONFIG_VFIO_USER" CONFIG[VFIO_USER]="n" - break fi - fi # IDXD uses Intel specific instructions.