Skip to content

Commit

Permalink
configure: fix 'break' error in configure file
Browse files Browse the repository at this point in the history
Break is not supported in if statement which cause error messages

Signed-off-by: Rui Chang <[email protected]>
Change-Id: I671510ac936e2ac43a6570c9c3d0a6458e28f0d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6041
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Nick Connolly <[email protected]>
Reviewed-by: Aleksey Marchuk <[email protected]>
Reviewed-by: Shuhei Matsumoto <[email protected]>
Reviewed-by: <[email protected]>
Reviewed-by: Jim Harris <[email protected]>
Reviewed-by: Changpeng Liu <[email protected]>
  • Loading branch information
changruinj authored and jimharris committed Jan 25, 2021
1 parent f1f51f2 commit 229a67a
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 229a67a

Please sign in to comment.