diff --git a/configure b/configure index be0db3659..0380e3a25 100755 --- a/configure +++ b/configure @@ -407,9 +407,17 @@ if [[ "$OSTYPE" == "freebsd"* ]]; then fi if [ "${CONFIG[RDMA]}" = "y" ]; then - if echo -e '#include \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 \n#include \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 \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"