[openib-general] [PATCH] libibcm/libibat disable-libcheck option

Michael S. Tsirkin mst at mellanox.co.il
Wed Sep 14 10:15:21 PDT 2005


Add an option to disable configure checks for ib libraries.
This makes it possible to first configure all libraries,
then make them all.

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

Index: userspace/libibcm/configure.in
===================================================================
--- userspace.orig/libibcm/configure.in	2005-09-14 20:06:55.000000000 +0300
+++ userspace/libibcm/configure.in	2005-09-14 20:09:22.000000000 +0300
@@ -9,6 +9,12 @@ AM_INIT_AUTOMAKE(libibcm, 0.9.0)
 AC_DISABLE_STATIC
 AM_PROG_LIBTOOL
 
+AC_ARG_ENABLE(libcheck, [  --disable-libcheck      do not test for presence of ib libraries],
+[       if test x$enableval = xno ; then
+                disable_libcheck=yes
+        fi
+])
+
 dnl Checks for programs
 AC_PROG_CC
 
@@ -17,16 +23,22 @@ AC_C_CONST
 AC_CHECK_SIZEOF(long)
 
 dnl Checks for libraries
+if test "$disable_libcheck" != "yes"
+then
 AC_CHECK_LIB(ibverbs, ibv_get_devices, [],
     AC_MSG_ERROR([ibv_get_devices() not found.  libibcm requires libibcm.]))
 AC_CHECK_LIB(ibat, ib_at_route_by_ip, [],
     AC_MSG_ERROR([ib_at_route_by_ip() not found.  libibcm requires libat.]))
+fi
 
 dnl Checks for header files.
+if test "$disable_libcheck" != "yes"
+then
 AC_CHECK_HEADER(infiniband/verbs.h, [],
     AC_MSG_ERROR([<infiniband/verbs.h> not found.  Is libibverbs installed?]))
 AC_CHECK_HEADER(infiniband/at.h, [],
     AC_MSG_ERROR([<infiniband/at.h> not found.  Is libibat installed?]))
+fi
 AC_HEADER_STDC
 
 AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
Index: userspace/libibat/configure.in
===================================================================
--- userspace.orig/libibat/configure.in	2005-08-03 11:38:47.000000000 +0300
+++ userspace/libibat/configure.in	2005-09-14 20:12:03.000000000 +0300
@@ -9,14 +9,23 @@ AM_INIT_AUTOMAKE(libibat, 0.9.0)
 AC_DISABLE_STATIC
 AM_PROG_LIBTOOL
 
+AC_ARG_ENABLE(libcheck, [  --disable-libcheck      do not test for presence of ib libraries],
+[       if test x$enableval = xno ; then
+                disable_libcheck=yes
+        fi
+])
+
 dnl Checks for programs
 AC_PROG_CC
 
 dnl Checks for libraries
 
 dnl Checks for header files.
+if test "$disable_libcheck" != "yes"
+then
 AC_CHECK_HEADER(infiniband/verbs.h, [],
     AC_MSG_ERROR([<infiniband/verbs.h> not found.  Is libibverbs installed?]))
+fi
 AC_HEADER_STDC
 
 dnl Checks for typedefs, structures, and compiler characteristics.
-- 
MST



More information about the general mailing list