Commit 55bd0d3a authored by Darek Stojaczyk's avatar Darek Stojaczyk Committed by Jim Harris
Browse files

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

parent ce711726
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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