configure: detect libibverbs using ldcofnig

This should be most robust way of detecting it.

Fixes #524

Change-Id: Ic1e50500ca5eb51177ac5197c59005b133cd8367
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/435996
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Andrey Kuzmin <akuzmin@jetstreamsoft.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
Pawel Wodkowski 2018-12-04 13:06:31 +01:00 committed by Jim Harris
parent e585afbea3
commit a5380c752b

10
configure vendored
View File

@ -332,14 +332,20 @@ fi
if [ "${CONFIG[RDMA]}" = "y" ]; then
if [ "$OSTYPE" != "FreeBSD"* ]; then
ibv_lib_file="$(readlink -f /usr/lib64/libibverbs.so)" || true
ibv_lib_file="$(ldconfig -p | grep 'libibverbs.so ' || true)"
if [ ! -z "$ibv_lib_file" ]; then
ibv_lib_file="${ibv_lib_file##*=> }"
ibv_lib_file="$(readlink -f $ibv_lib_file)" || true
fi
if [ -z $ibv_lib_file ]; then
ibv_lib_file="libibverbs.so.0.0.0"
fi
ibv_ver_str="$(basename $ibv_lib_file)"
ibv_maj_ver=`echo $ibv_ver_str | cut -d. -f3`
ibv_min_ver=`echo $ibv_ver_str | cut -d. -f4`
if [[ "$ibv_maj_var" > 1 || ("$ibv_maj_ver" -eq 1 && "$ibv_min_ver" -ge 1) ]]; then
if [[ "$ibv_maj_var" -gt 1 || ("$ibv_maj_ver" -eq 1 && "$ibv_min_ver" -ge 1) ]]; then
CONFIG[RDMA_SEND_WITH_INVAL]="y"
else
CONFIG[RDMA_SEND_WITH_INVAL]="n"