From 55bd0d3afcfebbd95e57c62c1ac6758b06d3ac68 Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Tue, 7 May 2019 18:42:28 +0200 Subject: [PATCH] configure: fail --with-rbd if it's not available Change-Id: I9767582835c0ef7ae1a341f60134bb74efbe3fd4 Signed-off-by: Darek Stojaczyk Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453708 Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- configure | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure b/configure index f81a5ff5f..c2bd8c4ec 100755 --- a/configure +++ b/configure @@ -495,6 +495,16 @@ if [[ "${CONFIG[REDUCE]}" = "y" ]]; then fi fi +if [[ "${CONFIG[RBD]}" = "y" ]]; then + if ! echo -e '#include \n#include \n' \ + 'int main(void) { return 0; }\n' \ + | $BUILD_CMD -lrados -lrbd - 2>/dev/null; then + echo --with-rbd requires librados and librbd. + echo Please install then re-run this script. + exit 1 + fi +fi + if [[ "${CONFIG[OCF]}" = "y" ]]; then # If OCF_PATH is a file, assume it is a library and use it to compile with if [ -f ${CONFIG[OCF_PATH]} ]; then