configure: check if liburing is installed

When user specifies --with-uring without a directory,
check that liburing is actually installed on the system.
If it isn't, instruct user to build and install liburing
and exit with error.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iead4f30bdc3905c3b3462a32fd676a39fbd0d7d2

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7542
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Jim Harris 2021-04-21 16:30:45 -07:00
parent 9d2f6f861d
commit 4ccc9ea3e0

5
configure vendored
View File

@ -785,6 +785,11 @@ if [[ "${CONFIG[URING]}" = "y" ]]; then
echo "${CONFIG[URING_PATH]}: directory not found"
exit 1
fi
elif ! echo -e '#include <liburing.h>\nint main(void) { return 0; }\n' \
| "${BUILD_CMD[@]}" -luring - 2> /dev/null; then
echo "--with-uring requires liburing."
echo "Please build and install then re-run this script."
exit 1
fi
fi