configure: Fix vfio-user dependency check
Use the same method for checking for vfio-user dependencies as the rest of the script (compiler invocation). Do not depend on headers being present in a specific location as long as they are usable. Change-Id: Iad14a72de7fd89f2cff2838e94bcbaad6b3f329d Signed-off-by: Greg Inozemtsev <greg@enfabrica.net> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13493 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
400aadf83f
commit
421368c04f
7
configure
vendored
7
configure
vendored
@ -665,13 +665,14 @@ fi
|
||||
BUILD_CMD+=(-I/usr/local/include -L/usr/local/lib)
|
||||
|
||||
if [[ "${CONFIG[VFIO_USER]}" = "y" ]]; then
|
||||
|
||||
if [[ ! -d /usr/include/json-c ]] && [[ ! -d /usr/local/include/json-c ]]; then
|
||||
if ! echo -e '#include <json-c/json.h>' \
|
||||
| "${BUILD_CMD[@]}" -E - 2> /dev/null; then
|
||||
echo "ERROR: --with-vfio-user requires json-c-devel"
|
||||
echo "Please install then re-run this script"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -e /usr/include/cmocka.h ]] && [[ ! -e /usr/local/include/cmocka.h ]]; then
|
||||
if ! echo -e '#include <cmocka.h>' \
|
||||
| "${BUILD_CMD[@]}" -E - 2> /dev/null; then
|
||||
echo "ERROR: --with-vfio-user requires libcmocka-devel"
|
||||
echo "Please install then re-run this script"
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user