Skip to content

Commit

Permalink
Fix configure with --build-static option which enables static RDMA in…
Browse files Browse the repository at this point in the history
… Issue #1801

This pull request to probe static libibverbs/librdmacm/librpma library.
It's neccessary to enable static RDMA engine build with netlink libnl-3 and libnl-route-3.

Signed-off-by: Huang Shumin [email protected]
  • Loading branch information
HuangShumin committed Aug 22, 2024
1 parent 2d41633 commit 4f41e30
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1005,8 +1005,9 @@ int main(int argc, char **argv)
return pd != NULL;
}
EOF
if test "$disable_rdma" != "yes" && compile_prog "" "-libverbs" "libverbs" ; then
if test "$disable_rdma" != "yes" && compile_prog "" "-libverbs -lnl-3 -lnl-route-3" "libverbs" ; then
libverbs="yes"
LIBS="-libverbs -lnl-3 -lnl-route-3 $LIBS"
fi
print_config "libverbs" "$libverbs"

Expand All @@ -1024,8 +1025,9 @@ int main(int argc, char **argv)
return 0;
}
EOF
if test "$disable_rdma" != "yes" && compile_prog "" "-lrdmacm" "rdma"; then
if test "$disable_rdma" != "yes" && compile_prog "" "-lrdmacm -lnl-3 -lnl-route-3" "rdma"; then
rdmacm="yes"
LIBS="$(pkg-config --static --libs librpma) $LIBS"
fi
print_config "rdmacm" "$rdmacm"

Expand All @@ -1044,8 +1046,9 @@ int main(void)
return 0;
}
EOF
if test "$disable_rdma" != "yes" && compile_prog "" "-lrpma" "rpma"; then
if test "$disable_rdma" != "yes" && compile_prog "" "$(pkg-config --static --libs librpma)" "rpma"; then
librpma="yes"
LIBS="$(pkg-config --static --libs librpma) $LIBS"
fi
print_config "librpma" "$librpma"

Expand Down

0 comments on commit 4f41e30

Please sign in to comment.