Whamcloud - gitweb
b=21666 prevent use of OFED source dir instead of headers
authorBrian J. Murrell <brian@sun.com>
Tue, 30 Mar 2010 18:40:44 +0000 (11:40 -0700)
committerRobert Read <rread@sun.com>
Tue, 30 Mar 2010 18:40:44 +0000 (11:40 -0700)
Try to determine if the user is pointing configure at the OFED source
directory intead of the devel/headers directory and error out of
configure if so and display an informative warning.

i=panda
i=whitebear

lnet/autoconf/lustre-lnet.m4

index 427c153..44c7a23 100644 (file)
@@ -468,6 +468,11 @@ else
                           -f ${O2IBPATH}/include/rdma/ib_cm.h -a \
                           -f ${O2IBPATH}/include/rdma/ib_verbs.h -a \
                           -f ${O2IBPATH}/include/rdma/ib_fmr_pool.h \); then
+                       if test \( -d ${O2IBPATH}/kernel_patches -a \
+                                  -f ${O2IBPATH}/Makefile \); then
+                               AC_MSG_RESULT([no])
+                               AC_MSG_ERROR([you appear to be trying to use the OFED distribution's source directory (${O2IBPATH}) rather than the "development/headers" directory which is likely in ${O2IBPATH%-*}])
+                       fi
                        o2ib_found=true
                        break
                fi