From 4ccc9ea3e0975d49defe5fd2c9b49cbc77ea3d36 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 21 Apr 2021 16:30:45 -0700 Subject: [PATCH] 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 Change-Id: Iead4f30bdc3905c3b3462a32fd676a39fbd0d7d2 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7542 Reviewed-by: Ben Walker Reviewed-by: Ziye Yang Reviewed-by: Aleksey Marchuk Reviewed-by: Tomasz Zawadzki Tested-by: SPDK CI Jenkins --- configure | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure b/configure index f117e9bcb1..3a785ce946 100755 --- a/configure +++ b/configure @@ -785,6 +785,11 @@ if [[ "${CONFIG[URING]}" = "y" ]]; then echo "${CONFIG[URING_PATH]}: directory not found" exit 1 fi + elif ! echo -e '#include \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