Commit 229a67ad authored by Rui Chang's avatar Rui Chang Committed by Jim Harris
Browse files

configure: fix 'break' error in configure file



Break is not supported in if statement which cause error messages

Signed-off-by: default avatarRui Chang <rui.chang@arm.com>
Change-Id: I671510ac936e2ac43a6570c9c3d0a6458e28f0d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6041


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarNick Connolly <nick.connolly@mayadata.io>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatar <dongx.yi@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent f1f51f2b
Loading
Loading
Loading
Loading
+6 −20
Original line number Diff line number Diff line
@@ -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.