[openib-general] [PATCH] osm: backward compat autoconf on 64bit machine
Eitan Zahavi
eitan at mellanox.co.il
Wed Sep 21 02:14:00 PDT 2005
Hi Hal
The attached patch allows compiling OpenSM in gen1 mode
on 64 bit machine and supports customized driver installation dir
through the use of MTHOME and TSHOME environmnet variables.
These are only needed by non standard installations.
Thanks
Eitan
Signed-off-by: Eitan Zahavi <eitan at mellanox.co.il>
Index: config/osmvsel.m4
===================================================================
--- config/osmvsel.m4 (revision 3488)
+++ config/osmvsel.m4 (working copy)
@@ -34,19 +34,31 @@ elif test $with_osmv = "sim" ; then
OSMV_LDADD="-L$with_sim/lib -libmscli"
elif test $with_osmv = "gen1"; then
OSMV_CFLAGS="-DOSM_VENDOR_INTF_TS"
- OSMV_INCLUDES="-I/usr/local/ibgd/driver/infinihost/include -I\$(srcdir)/../include"
+
+ if test -z $MTHOME; then
+ MTHOME=/usr/local/ibgd/driver/infinihost
+ fi
+
+ OSMV_INCLUDES="-I$MTHOME/include -I\$(srcdir)/../include"
dnl we need to find the TS includes somewhere...
- osmv_dir=`uname -r|sed 's/smp//'`
- osmv_dir_smp=`uname -r`
osmv_found=0
- for d in /usr/src/$osmv_dir /usr/src/$osmv_dir_smp /lib/modules/$osmv_dir/build /lib/modules/$osmv_dir_smp/build/; do
- if test -d $d/drivers/infiniband/include; then
+ if test -z $TSHOME; then
+ osmv_dir=`uname -r|sed 's/-smp//'`
+ osmv_dir_smp=`uname -r`
+ for d in /usr/src/linux-$osmv_dir /usr/src/linux-$osmv_dir_smp /lib/modules/$osmv_dir/build /lib/modules/$osmv_dir_smp/build/; do
+ if test -f $d/drivers/infiniband/include/ts_ib_useraccess.h; then
OSMV_INCLUDES="$OSMV_INCLUDES -I$d/drivers/infiniband/include"
osmv_found=1
fi
done
- if test -z $osmv_found; then
+ else
+ if test -f $TSHOME/ts_ib_useraccess.h; then
+ OSMV_INCLUDES="$OSMV_INCLUDES -I$TSHOME"
+ osmv_found=1
+ fi
+ fi
+ if test $osmv_found = 0; then
AC_MSG_ERROR([Fail to find gen1 include files dir])
fi
OSMV_LDADD="-L/usr/local/ibgd/driver/infinihost/lib -lvapi -lmosal -lmtl_common -lmpga"
@@ -86,7 +98,7 @@ if test "$disable_libcheck" != "yes"; th
AC_MSG_ERROR([ibms_bind() not found. libosmvendor of type sim requires libibmscli.]))
elif test $with_osmv = "gen1"; then
osmv_save_ldflags=$LDFALGS
- LDFLAGS="$LDFLAGS -L/usr/local/ibgd/driver/infinihost/lib -lmosal -lmtl_common -lmpga"
+ LDFLAGS="$LDFLAGS -L$MTHOME/lib -L$MTHOME/lib64 -lmosal -lmtl_common -lmpga"
AC_CHECK_LIB(vapi, vipul_init, [],
AC_MSG_ERROR([vipul_init() not found. libosmvendor of type gen1 requires libvapi.]))
LD_FLAGS=$osmv_save_ldflags
More information about the general
mailing list