[openib-general] [PATCH] libibumad: configure option to skip library test

Michael S. Tsirkin mst at mellanox.co.il
Tue Aug 9 05:12:55 PDT 2005


Add option to skip infiniband library checks in libibumad.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: libibumad/configure.in
===================================================================
--- libibumad/configure.in	(revision 2963)
+++ libibumad/configure.in	(working copy)
@@ -7,6 +7,12 @@ AC_CONFIG_AUX_DIR(config)
 AM_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE(libibumad, 0.9.0)
 
+AC_ARG_ENABLE(libcheck, [  --disable-libcheck      do not test for presense of ib libraries],
+[       if test x$enableval = xno ; then
+                disable_libcheck=yes
+        fi
+])
+
 dnl Checks for programs
 AC_PROG_CXX
 AC_PROG_CC
@@ -16,18 +22,24 @@ AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AM_PROG_LIBTOOL
 
+if test "$disable_libcheck" != "yes"
+then
 dnl Checks for libraries
 LDFLAGS="$LDFLAGS -L/usr/local/ib/lib"
 AC_CHECK_LIB(ibcommon, sys_read_string, [],
 	AC_MSG_ERROR([sys_read_string() not found. libibumad requires libibcommon.]))
+fi
 
 dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_CHECK_HEADERS([fcntl.h netinet/in.h stdlib.h string.h sys/ioctl.h unistd.h])
+if test "$disable_libcheck" != "yes"
+then
 AC_CHECK_HEADER(infiniband/common.h, [],
 	AC_MSG_ERROR([<infiniband/common.h> not found. libibumad requires libibcommon.])
 )
+fi
 
 dnl Checks for library functions
 AC_PROG_GCC_TRADITIONAL

-- 
MST



More information about the general mailing list