# $1 - *unique* name matching the LB2_LINUX_TEST_SRC macro
# $2 - run on success (valid .ko generated)
# $3 - run on failure (unable to compile)
+# $4 - compile only
#
AC_DEFUN([LB2_LINUX_TEST_RESULT],[
TEST_DIR=${TEST_DIR:-${ac_pwd}/_lpb}
# Abort if key does not exist
AS_IF([test -f ${O}.tested], [],
[AC_MSG_ERROR([*** Compile test for $1 was not run.])])
+ # Default is to expect only the <module>.o be generated.
+ NEED_KO=0
+ # Require the <module>.ko file when "module" is passed
+ AS_IF([test "X'$4'" == "X'module'"], [NEED_KO=1])
# If test was compiled and if we got an object ...
- AS_IF([test -f ${O}.o], [touch ${O}.ko])
+ AS_IF([test ${NEED_KO} -eq 0], [AS_IF([test ! -f ${O}.ko], [AS_IF(
+ [test -f ${O}.o], [touch ${O}.ko])])])
# key is valid. Cache should be valid, set the variable
AC_CACHE_CHECK([for $1], lb_test,
AS_IF([test -f ${O}.ko],
LB2_LINUX_TEST_RESULT([sane_ib_dma_map_sg], [
AC_DEFINE(HAVE_SANE_IB_DMA_MAP_SG, 1,
[ib_dma_map_sg is sane])
- ])
+ ],[],[module])
])
#
LN_SRC_O2IB_IB_ALLOC_PD
LN_SRC_O2IB_IB_INC_RKEY
LN_SRC_O2IB_IB_POST_SEND_CONST
+ LN_SRC_SANE_IB_DMA_MAP_SG
LN_SRC_O2IB_IB_DEVICE_OPS_EXISTS
LN_SRC_O2IB_IB_SG_DMA_ADDRESS_EXISTS
LN_SRC_O2IB_RDMA_REJECT
LN_O2IB_IB_ALLOC_PD
LN_O2IB_IB_INC_RKEY
LN_O2IB_IB_POST_SEND_CONST
+ LN_SANE_IB_DMA_MAP_SG
LN_O2IB_IB_DEVICE_OPS_EXISTS
LN_O2IB_IB_SG_DMA_ADDRESS_EXISTS
LN_O2IB_RDMA_REJECT