configure: fail --with-rdma if it's not available
While here, also refactor IBV_WR_SEND_WITH_INV check to use the new BUILD_CMD command. Change-Id: Ieefe77d769f2b1369d204ec54b976fa11441af46 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453706 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> 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>
This commit is contained in:
parent
32b356cd04
commit
eed0c6be16
14
configure
vendored
14
configure
vendored
@ -407,9 +407,17 @@ if [[ "$OSTYPE" == "freebsd"* ]]; then
|
||||
fi
|
||||
|
||||
if [ "${CONFIG[RDMA]}" = "y" ]; then
|
||||
if echo -e '#include <infiniband/verbs.h>\n \
|
||||
int main(void){ return !!IBV_WR_SEND_WITH_INV; }\n' \
|
||||
| ${CC:-cc} ${CFLAGS} -x c -c -o /dev/null - 2>/dev/null; then
|
||||
if ! echo -e '#include <infiniband/verbs.h>\n#include <rdma/rdma_verbs.h>\n' \
|
||||
'int main(void) { return 0; }\n' \
|
||||
| $BUILD_CMD -libverbs -lrdmacm - 2>/dev/null; then
|
||||
echo --with-rdma requires libverbs and librdmacm.
|
||||
echo Please install then re-run this script.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if echo -e '#include <infiniband/verbs.h>\n' \
|
||||
'int main(void) { return !!IBV_WR_SEND_WITH_INV; }\n' \
|
||||
| $BUILD_CMD -c - 2>/dev/null; then
|
||||
CONFIG[RDMA_SEND_WITH_INVAL]="y"
|
||||
else
|
||||
CONFIG[RDMA_SEND_WITH_INVAL]="n"
|
||||
|
Loading…
Reference in New Issue
Block a user