configure: fail --with-rbd if it's not available

Change-Id: I9767582835c0ef7ae1a341f60134bb74efbe3fd4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453708
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Darek Stojaczyk 2019-05-07 18:42:28 +02:00 committed by Jim Harris
parent ce71172650
commit 55bd0d3afc

10
configure vendored
View File

@ -495,6 +495,16 @@ if [[ "${CONFIG[REDUCE]}" = "y" ]]; then
fi
fi
if [[ "${CONFIG[RBD]}" = "y" ]]; then
if ! echo -e '#include <rbd/librbd.h>\n#include <rados/librados.h>\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