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

Michael S. Tsirkin mst at mellanox.co.il
Mon Aug 8 07:26:41 PDT 2005


Hal, I'm trying to split the build process to configure/make/install
steps.
One of the problems is, that I am forced to do make one
library before configuring another one that depends on it.

As a solution, I'd like to add a configure option to skip
the library test.

I then can
configure --disable-libcheck
in all directories, and then
make

--- 

Add option to skip 

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

Index: libibmad/configure.in
===================================================================
--- libibmad/configure.in	(revision 2963)
+++ libibmad/configure.in	(working copy)
@@ -6,27 +6,42 @@ AC_CONFIG_SRCDIR([src/sa.c])
 AC_CONFIG_AUX_DIR(config)
 AM_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE(libibmad, 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
+])
+
+
 AM_PROG_LIBTOOL
 
 dnl Checks for programs
 AC_PROG_CC
 
 dnl Checks for libraries
+if test "$disable_libcheck" != "yes"
+then
 LDFLAGS="$LDFLAGS -L/usr/local/ib/lib"
 AC_CHECK_LIB(ibcommon, sys_read_string, [],
 	AC_MSG_ERROR([sys_read_string() not found. libibmad requires libibcommon.]))
 AC_CHECK_LIB(ibumad, umad_init, [],
 	AC_MSG_ERROR([umad_init() not found. libibmad requires libibumad.]))
+fi
 
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS([netinet/in.h stdlib.h string.h sys/time.h unistd.h])
+if test "$disable_libcheck" != "yes"
+then
 AC_CHECK_HEADER(infiniband/common.h, [],
 	AC_MSG_ERROR([<infiniband/common.h> not found. libibmad requires libibcommon.])
 )
 AC_CHECK_HEADER(infiniband/umad.h, [],
 	AC_MSG_ERROR([<infiniband/umad.h> not found. libibmad requires libibumad.])
 )
+fi
 
 dnl Checks for library functions
 AC_CHECK_FUNCS([memset strrchr strtol])

-- 
MST



More information about the general mailing list