[openib-general] [PATCH] osm: support arbitrary ibumad installation path
Eitan Zahavi
eitan at mellanox.co.il
Tue Dec 27 07:40:09 PST 2005
Hi Hal
Current build for OpenSM assumed ibumad is located always under
/usr/local . Some installations require more flexibility.
The patch below allows the user to specify either:
--with-umad-prefix (then we use $with_umad_prefix/include and lib)
or
--with-umad-libs and --with-umad-includes
This provides the greatest flexibility.
Thanks
Eitan
Signed-off-by: Eitan Zahavi <eitan at mellanox.co.il>
Index: config/osmvsel.m4
===================================================================
--- config/osmvsel.m4 (revision 4622)
+++ config/osmvsel.m4 (working copy)
@@ -17,34 +17,56 @@ AC_ARG_WITH(osmv,
AC_MSG_NOTICE(Using OSM Vendor Type:$with_osmv),
with_osmv="openib")
-dnl Define a way for the user to provide the path to the driver installation
-AC_ARG_WITH(uldrv,
-[ --with-uldrv=<dir> define the dir where the user level driver is installed],
-AC_MSG_NOTICE(Using user level installation prefix:$with_uldrv),
-with_uldrv="")
+dnl Define a way for the user to provide the path to the ibumad installation
+AC_ARG_WITH(umad-prefix,
+[ --with-umad-prefix=<dir> define the dir used as prefix for ibumad installation],
+AC_MSG_NOTICE(Using ibumad installation prefix:$with_umad_prefix),
+with_umad_prefix="")
+
+dnl Define a way for the user to provide the path to the ibumad includes
+AC_ARG_WITH(umad-includes,
+[ --with-umad-includes=<dir> define the dir where ibumad includes are installed],
+AC_MSG_NOTICE(Using ibumad includes from:$with_umad_includes),
+with_umad_includes="")
+
+if test x$with_umad_includes = x; then
+ if test x$with_umad_prefix != x; then
+ with_umad_includes=$with_umad_prefix/include
+ fi
+fi
-dnl Define a way for the user to provide the path to the simulator installation
-AC_ARG_WITH(sim,
-[ --with-sim=<dir> define the simulator prefix for building sim vendor (/usr)],
-AC_MSG_NOTICE(Using Simulator from:$with_sim),
-with_sim="/usr")
+dnl Define a way for the user to provide the path to the ibumad libs
+AC_ARG_WITH(umad-libs,
+[ --with-umad-libs=<dir> define the dir where ibumad libs are installed],
+AC_MSG_NOTICE(Using ibumad libs from:$with_umad_libs),
+with_umad_libs="")
+if test x$with_umad_libs = x; then
+ if test x$with_umad_prefix != x; then
dnl Should we use lib64 or lib
if test "$(uname -m)" = "x86_64"; then
- osmv_lib_type="lib64"
+ with_umad_libs=$with_umad_prefix/lib64
else
- osmv_lib_type="lib"
+ with_umad_libs=$with_umad_prefix/lib
+ fi
fi
+fi
+
+dnl Define a way for the user to provide the path to the simulator installation
+AC_ARG_WITH(sim,
+[ --with-sim=<dir> define the simulator prefix for building sim vendor (/usr)],
+AC_MSG_NOTICE(Using Simulator from:$with_sim),
+with_sim="/usr")
dnl based on the with_osmv we can try the vendor flag
if test $with_osmv = "openib"; then
OSMV_CFLAGS="-DOSM_VENDOR_INTF_OPENIB"
OSMV_INCLUDES="-I\$(srcdir)/../include -I\$(srcdir)/../../libibcommon/include/infiniband -I\$(srcdir)/../../libibumad/include/infiniband"
- if test "x$with_uldrv" = "x"; then
+ if test "x$with_umad_libs" = "x"; then
OSMV_LDADD="-libumad"
else
- OSMV_INCLUDES="-I$with_uldrv/include $OSMV_INCLUDES"
- OSMV_LDADD="-L$with_uldrv/$osmv_lib_type -libumad"
+ OSMV_INCLUDES="-I$with_umad_includes $OSMV_INCLUDES"
+ OSMV_LDADD="-L$with_umad_libs -libumad"
fi
elif test $with_osmv = "sim" ; then
OSMV_CFLAGS="-DOSM_VENDOR_INTF_SIM"
More information about the general
mailing list