Whamcloud - gitweb
Whitespace cleanup.
[fs/lustre-release.git] / lnet / autoconf / lustre-lnet.m4
index 21457fa..23605c8 100644 (file)
@@ -42,48 +42,6 @@ fi
 ])
 
 #
-# LN_CONFIG_CDEBUG
-#
-# whether to enable various libcfs debugs (CDEBUG, ENTRY/EXIT, LASSERT, etc.)
-#
-AC_DEFUN([LN_CONFIG_CDEBUG],
-[
-AC_MSG_CHECKING([whether to enable CDEBUG, CWARN])
-AC_ARG_ENABLE([libcfs_cdebug],
-       AC_HELP_STRING([--disable-libcfs-cdebug],
-                       [disable libcfs CDEBUG, CWARN]),
-       [],[enable_libcfs_cdebug='yes'])
-AC_MSG_RESULT([$enable_libcfs_cdebug])
-if test x$enable_libcfs_cdebug = xyes; then
-   AC_DEFINE(CDEBUG_ENABLED, 1, [enable libcfs CDEBUG, CWARN])
-else
-   AC_DEFINE(CDEBUG_ENABLED, 0, [disable libcfs CDEBUG, CWARN])
-fi
-
-AC_MSG_CHECKING([whether to enable ENTRY/EXIT])
-AC_ARG_ENABLE([libcfs_trace],
-       AC_HELP_STRING([--disable-libcfs-trace],
-                       [disable libcfs ENTRY/EXIT]),
-       [],[enable_libcfs_trace='yes'])
-AC_MSG_RESULT([$enable_libcfs_trace])
-if test x$enable_libcfs_trace = xyes; then
-   AC_DEFINE(CDEBUG_ENTRY_EXIT, 1, [enable libcfs ENTRY/EXIT])
-else
-   AC_DEFINE(CDEBUG_ENTRY_EXIT, 0, [disable libcfs ENTRY/EXIT])
-fi
-
-AC_MSG_CHECKING([whether to enable LASSERT, LASSERTF])
-AC_ARG_ENABLE([libcfs_assert],
-       AC_HELP_STRING([--disable-libcfs-assert],
-                       [disable libcfs LASSERT, LASSERTF]),
-       [],[enable_libcfs_assert='yes'])
-AC_MSG_RESULT([$enable_libcfs_assert])
-if test x$enable_libcfs_assert = xyes; then
-   AC_DEFINE(LIBCFS_DEBUG, 1, [enable libcfs LASSERT, LASSERTF])
-fi
-])
-
-#
 # LN_CONFIG_AFFINITY
 #
 # check if cpu affinity is available/wanted
@@ -169,30 +127,15 @@ else
        if test "$BOCD" != 0 ; then
                AC_DEFINE(SOCKNAL_BACKOFF, 1, [use tunable backoff TCP])
                AC_MSG_RESULT(yes)
+               if grep rto_max $LINUX/include/linux/tcp.h|grep -q __u16; then
+                   AC_DEFINE(SOCKNAL_BACKOFF_MS, 1, [tunable backoff TCP in ms])
+               fi
        else
                AC_MSG_RESULT([no (no kernel support)])
        fi
 fi
 ])
 
-#
-# LN_CONFIG_PANIC_DUMPLOG
-#
-# check if tunable panic_dumplog is wanted
-#
-AC_DEFUN([LN_CONFIG_PANIC_DUMPLOG],
-[AC_MSG_CHECKING([for tunable panic_dumplog support])
-AC_ARG_ENABLE([panic_dumplog],
-       AC_HELP_STRING([--enable-panic_dumplog],
-                      [enable panic_dumplog]),
-       [],[enable_panic_dumplog='no'])
-if test x$enable_panic_dumplog = xyes ; then
-       AC_DEFINE(LNET_DUMP_ON_PANIC, 1, [use dumplog on panic])
-       AC_MSG_RESULT([yes (by request)])
-else
-       AC_MSG_RESULT([no])
-fi
-])
 
 #
 # LN_CONFIG_PTLLND
@@ -527,7 +470,7 @@ else
                           -f ${O2IBPATH}/include/rdma/ib_fmr_pool.h \); then
                        o2ib_found=true
                        break
-               fi
+               fi
        done
        if ! $o2ib_found; then
                AC_MSG_RESULT([no])
@@ -538,64 +481,133 @@ else
                        *) AC_MSG_ERROR([internal error]);;
                esac
        else
-               O2IBCPPFLAGS="-I$O2IBPATH/include"
-               EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
-               EXTRA_KCFLAGS="$EXTRA_KCFLAGS $O2IBCPPFLAGS"
-               EXTRA_LNET_INCLUDE="$O2IBCPPFLAGS $EXTRA_LNET_INCLUDE"
-               LB_LINUX_TRY_COMPILE([
-                       #include <linux/version.h>
-                       #include <linux/pci.h>
-                       #if !HAVE_GFP_T
-                       typedef int gfp_t;
-                       #endif
-                       #include <rdma/rdma_cm.h>
-                       #include <rdma/ib_cm.h>
-                       #include <rdma/ib_verbs.h>
-                       #include <rdma/ib_fmr_pool.h>
-               ],[
-                       struct rdma_cm_id          *cm_id;
-                       struct rdma_conn_param      conn_param;
-                       struct ib_device_attr       device_attr;
-                       struct ib_qp_attr           qp_attr;
-                       struct ib_pool_fmr          pool_fmr;
-                       enum   ib_cm_rej_reason     rej_reason;
-
-                       cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP);
-                       return PTR_ERR(cm_id);
-               ],[
-                       AC_MSG_RESULT([yes])
-                       O2IBLND="o2iblnd"
+               # figure out whether the kernel has an infiniband stack
+               # configured
+               LB_LINUX_CONFIG_IM([INFINIBAND],[
+                       CONFIG_INFINIBAND_MODULE_defined=true
                ],[
-                       AC_MSG_RESULT([no])
-                       case $ENABLEO2IB in
-                       1) ;;
-                       2) AC_MSG_ERROR([can't compile with kernel OpenIB gen2 headers]);;
-                       3) AC_MSG_ERROR([can't compile with OpenIB gen2 headers under $O2IBPATH]);;
-                       *) AC_MSG_ERROR([internal error]);;
-                       esac
-                       O2IBLND=""
-                       O2IBCPPFLAGS=""
+                       CONFIG_INFINIBAND_MODULE_defined=false
                ])
-
-               # version checking is a hack and isn't reliable,
-               # we need verify it with each new ofed release
-
-               if grep -q ib_dma_map_single \
-                       ${O2IBPATH}/include/rdma/ib_verbs.h; then
-                       if grep -q comp_vector \
-                               ${O2IBPATH}/include/rdma/ib_verbs.h; then
-                               IBLND_OFED_VERSION="1025"
-                       else
-                               IBLND_OFED_VERSION="1020"
+               # at this point we know that the user either explicitly
+               # requested o2ib support or didn't explicitly disable it so
+               # make sure the kernel's CONFIG_INFINIBAND variable is set
+               # appropriately.
+               #
+               # possible error conditions are:
+               # 1) --with-o2ib[=yes] (implies in kernel since no path was
+               #    given) and kernel not configured for IB
+               # 2) --with-o2ib=/path and kernel is configured for IB
+               #
+               if test "$O2IBPATH" = "$LINUX" -o "$O2IBPATH" = "$LINUX/drivers/infiniband"; then
+                       # infiniband stack is in the kernel
+                       if test $ENABLEO2IB -eq 1 -o $ENABLEO2IB -eq 2 && ! $CONFIG_INFINIBAND_MODULE_defined; then
+                               # case #1
+                               AC_MSG_ERROR([Kernel supplied OFED drivers are being requested however the kernel is NOT configured to build OFED modules.  Please specify --with-o2ib=<path_to_ofed> or rebuild the kernel with Infiniband enabled.])
                        fi
                else
-                       IBLND_OFED_VERSION="1010"
+                       # had to be a specified path with --with-o2ib=/path
+                       if $CONFIG_INFINIBAND_MODULE_defined; then
+                               # case #2
+                               AC_MSG_ERROR([External OFED source has been specified but the kernel is configured to build OFED modules as well.  Remove --with-o2ib from the configuration or rebuild the kernel without Infiniband.])
+                       fi
                fi
+               if $o2ib_found; then
+                       O2IBCPPFLAGS="-I$O2IBPATH/include"
+                       EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
+                       EXTRA_KCFLAGS="$EXTRA_KCFLAGS $O2IBCPPFLAGS"
+                       EXTRA_LNET_INCLUDE="$O2IBCPPFLAGS $EXTRA_LNET_INCLUDE"
+                       LB_LINUX_TRY_COMPILE([
+                               #include <linux/version.h>
+                               #include <linux/pci.h>
+                               #if !HAVE_GFP_T
+                               typedef int gfp_t;
+                               #endif
+                               #include <rdma/rdma_cm.h>
+                               #include <rdma/ib_cm.h>
+                               #include <rdma/ib_verbs.h>
+                               #include <rdma/ib_fmr_pool.h>
+                       ],[
+                               struct rdma_cm_id          *cm_id;
+                               struct rdma_conn_param      conn_param;
+                               struct ib_device_attr       device_attr;
+                               struct ib_qp_attr           qp_attr;
+                               struct ib_pool_fmr          pool_fmr;
+                               enum   ib_cm_rej_reason     rej_reason;
+
+                               cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP);
+                               return PTR_ERR(cm_id);
+                       ],[
+                               AC_MSG_RESULT([yes])
+                               O2IBLND="o2iblnd"
+                       ],[
+                               AC_MSG_RESULT([no])
+                               case $ENABLEO2IB in
+                                       1) ;;
+                                       2) AC_MSG_ERROR([can't compile with kernel OpenIB gen2 headers]);;
+                                       3) AC_MSG_ERROR([can't compile with OpenIB gen2 headers under $O2IBPATH]);;
+                                       *) AC_MSG_ERROR([internal error]);;
+                               esac
+                               O2IBLND=""
+                               O2IBCPPFLAGS=""
+                       ])
+                       # we know at this point that the found OFED source is good
+                       O2IB_SYMVER=""
+                       if test $ENABLEO2IB -eq 3 ; then
+                               # OFED default rpm not handle sles10 Modules.symvers name
+                               for name in Module.symvers Modules.symvers; do
+                                       if test -f $O2IBPATH/$name; then
+                                               O2IB_SYMVER=$name;
+                                               break;
+                                       fi
+                               done
+                               if test -n $O2IB_SYMVER ; then
+                                       AC_MSG_NOTICE([adding $O2IBPATH/$O2IB_SYMVER to $PWD/$SYMVERFILE])
+                                       # strip out the existing symbols versions first
+                                       egrep -v $(echo $(awk '{ print $2 }' $O2IBPATH/$O2IB_SYMVER) | tr ' ' '|') $PWD/$SYMVERFILE > $PWD/$SYMVERFILE.old
+                                       cat $PWD/$SYMVERFILE.old $O2IBPATH/$O2IB_SYMVER > $PWD/$SYMVERFILE
+                               else
+                                       AC_MSG_ERROR([an external source tree was specified for o2iblnd however I could not find a $O2IBPATH/Module.symvers there])
+                               fi
+                       fi
+
+                       LB_LINUX_TRY_COMPILE([
+                               #include <linux/version.h>
+                               #include <linux/pci.h>
+                               #if !HAVE_GFP_T
+                               typedef int gfp_t;
+                               #endif
+                               #include <rdma/ib_verbs.h>
+                       ],[
+                               ib_dma_map_single(NULL, NULL, 0, 0);
+                               return 0;
+                       ],[
+                               AC_MSG_RESULT(yes)
+                               AC_DEFINE(HAVE_OFED_IB_DMA_MAP, 1,
+                                         [ib_dma_map_single defined])
+                       ],[
+                               AC_MSG_RESULT(NO)
+                       ])
 
-               AC_DEFINE_UNQUOTED(IBLND_OFED_VERSION, $IBLND_OFED_VERSION,
-                                  [OFED version])
+                       LB_LINUX_TRY_COMPILE([
+                               #include <linux/version.h>
+                               #include <linux/pci.h>
+                               #if !HAVE_GFP_T
+                               typedef int gfp_t;
+                               #endif
+                               #include <rdma/ib_verbs.h>
+                       ],[
+                               ib_create_cq(NULL, NULL, NULL, NULL, 0, 0);
+                               return 0;
+                       ],[
+                               AC_MSG_RESULT(yes)
+                               AC_DEFINE(HAVE_OFED_IB_COMP_VECTOR, 1,
+                                         [has completion vector])
+                       ],[
+                               AC_MSG_RESULT(NO)
+                       ])
 
-               EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
+                       EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
+               fi
        fi
 fi
 
@@ -631,7 +643,7 @@ AC_ARG_WITH([openib],
 if test $ENABLEOPENIB -eq 0; then
        AC_MSG_RESULT([disabled])
 elif test ! \( -f ${OPENIBPATH}/include/ts_ib_core.h -a \
-               -f ${OPENIBPATH}/include/ts_ib_cm.h -a\
+               -f ${OPENIBPATH}/include/ts_ib_cm.h -a \
               -f ${OPENIBPATH}/include/ts_ib_sa_client.h \); then
        AC_MSG_RESULT([no])
        case $ENABLEOPENIB in
@@ -946,237 +958,7 @@ AC_SUBST(RACPPFLAGS)
 AC_SUBST(RALND)
 ])
 
-#
-# LN_STRUCT_PAGE_LIST
-#
-# 2.6.4 no longer has page->list
-#
-AC_DEFUN([LN_STRUCT_PAGE_LIST],
-[AC_MSG_CHECKING([if struct page has a list field])
-LB_LINUX_TRY_COMPILE([
-       #include <linux/mm.h>
-],[
-       struct page page;
-       &page.list;
-],[
-       AC_MSG_RESULT([yes])
-       AC_DEFINE(HAVE_PAGE_LIST, 1, [struct page has a list field])
-],[
-       AC_MSG_RESULT([no])
-])
-])
-
-#
-# LN_STRUCT_SIGHAND
-#
-# red hat 2.4 adds sighand to struct task_struct
-#
-AC_DEFUN([LN_STRUCT_SIGHAND],
-[AC_MSG_CHECKING([if task_struct has a sighand field])
-LB_LINUX_TRY_COMPILE([
-       #include <linux/sched.h>
-],[
-       struct task_struct p;
-       p.sighand = NULL;
-],[
-       AC_DEFINE(CONFIG_RH_2_4_20, 1, [this kernel contains Red Hat 2.4.20 patches])
-       AC_MSG_RESULT([yes])
-],[
-       AC_MSG_RESULT([no])
-])
-])
 
-#
-# LN_FUNC_CPU_ONLINE
-#
-# cpu_online is different in rh 2.4, vanilla 2.4, and 2.6
-#
-AC_DEFUN([LN_FUNC_CPU_ONLINE],
-[AC_MSG_CHECKING([if kernel defines cpu_online()])
-LB_LINUX_TRY_COMPILE([
-       #include <linux/sched.h>
-],[
-       cpu_online(0);
-],[
-       AC_MSG_RESULT([yes])
-       AC_DEFINE(HAVE_CPU_ONLINE, 1, [cpu_online found])
-],[
-       AC_MSG_RESULT([no])
-])
-])
-
-#
-# LN_TYPE_GFP_T
-#
-# check if gfp_t is typedef-ed
-#
-AC_DEFUN([LN_TYPE_GFP_T],
-[AC_MSG_CHECKING([if kernel defines gfp_t])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/gfp.h>
-],[
-       return sizeof(gfp_t);
-],[
-       AC_MSG_RESULT([yes])
-       AC_DEFINE(HAVE_GFP_T, 1, [gfp_t found])
-],[
-       AC_MSG_RESULT([no])
-])
-])
-
-#
-# LN_TYPE_CPUMASK_T
-#
-# same goes for cpumask_t
-#
-AC_DEFUN([LN_TYPE_CPUMASK_T],
-[AC_MSG_CHECKING([if kernel defines cpumask_t])
-LB_LINUX_TRY_COMPILE([
-       #include <linux/sched.h>
-],[
-       return sizeof (cpumask_t);
-],[
-       AC_MSG_RESULT([yes])
-       AC_DEFINE(HAVE_CPUMASK_T, 1, [cpumask_t found])
-],[
-       AC_MSG_RESULT([no])
-])
-])
-
-#
-# LN_FUNC_SHOW_TASK
-#
-# we export show_task(), but not all kernels have it (yet)
-#
-AC_DEFUN([LN_FUNC_SHOW_TASK],
-[LB_CHECK_SYMBOL_EXPORT([show_task],
-[kernel/ksyms.c kernel/sched.c],[
-AC_DEFINE(HAVE_SHOW_TASK, 1, [show_task is exported])
-],[
-])
-])
-
-# LN_TASKLIST_LOCK
-# 2.6.18 remove tasklist_lock export
-AC_DEFUN([LN_TASKLIST_LOCK],
-[LB_CHECK_SYMBOL_EXPORT([tasklist_lock],
-[kernel/fork.c],[
-AC_DEFINE(HAVE_TASKLIST_LOCK, 1,
-         [tasklist_lock exported])
-],[
-])
-])
-
-# 2.6.19 API changes
-# kmem_cache_destroy(cachep) return void instead of
-# int
-AC_DEFUN([LN_KMEM_CACHE_DESTROY_INT],
-[AC_MSG_CHECKING([kmem_cache_destroy(cachep) return int])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/slab.h>
-],[
-       int i = kmem_cache_destroy(NULL);
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_KMEM_CACHE_DESTROY_INT, 1,
-                [kmem_cache_destroy(cachep) return int])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
-
-# 2.6.19 API change
-#panic_notifier_list use atomic_notifier operations
-#
-AC_DEFUN([LN_ATOMIC_PANIC_NOTIFIER],
-[AC_MSG_CHECKING([panic_notifier_list is atomic])
-LB_LINUX_TRY_COMPILE([
-       #include <linux/notifier.h>
-       #include <linux/kernel.h>
-],[
-       struct atomic_notifier_head panic_notifier_list;
-],[
-        AC_MSG_RESULT(yes)
-       AC_DEFINE(HAVE_ATOMIC_PANIC_NOTIFIER, 1,
-               [panic_notifier_list is atomic_notifier_head])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
-
-# 2.6.20 API change INIT_WORK use 2 args and not
-# store data inside
-AC_DEFUN([LN_3ARGS_INIT_WORK],
-[AC_MSG_CHECKING([check INIT_WORK want 3 args])
-LB_LINUX_TRY_COMPILE([
-       #include <linux/workqueue.h>
-],[
-       struct work_struct work;
-
-       INIT_WORK(&work, NULL, NULL);
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_3ARGS_INIT_WORK, 1,
-                  [INIT_WORK use 3 args and store data inside])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
-
-# 2.6.21 api change. 'register_sysctl_table' use only one argument,
-# instead of more old which need two.
-AC_DEFUN([LN_2ARGS_REGISTER_SYSCTL],
-[AC_MSG_CHECKING([check register_sysctl_table want 2 args])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/sysctl.h>
-],[
-       return register_sysctl_table(NULL,0);
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_2ARGS_REGISTER_SYSCTL, 1,
-                  [register_sysctl_table want 2 args])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
-
-# 2.6.21 marks kmem_cache_t deprecated and uses struct kmem_cache
-# instead
-AC_DEFUN([LN_KMEM_CACHE],
-[AC_MSG_CHECKING([check kernel has struct kmem_cache])
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-LB_LINUX_TRY_COMPILE([
-        #include <linux/slab.h>
-        typedef struct kmem_cache cache_t;
-],[
-       cache_t *cachep = NULL;
-
-       kmem_cache_alloc(cachep, 0);
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_KMEM_CACHE, 1,
-                  [kernel has struct kmem_cache])
-],[
-        AC_MSG_RESULT(NO)
-])
-EXTRA_KCFLAGS="$tmp_flags"
-])
-# 2.6.23 lost dtor argument
-AC_DEFUN([LN_KMEM_CACHE_CREATE_DTOR],
-[AC_MSG_CHECKING([check kmem_cache_create has dtor argument])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/slab.h>
-],[
-       kmem_cache_create(NULL, 0, 0, 0, NULL, NULL);
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_KMEM_CACHE_CREATE_DTOR, 1,
-                  [kmem_cache_create has dtor argument])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
 
 #
 # LN_PROG_LINUX
@@ -1185,12 +967,8 @@ LB_LINUX_TRY_COMPILE([
 #
 AC_DEFUN([LN_PROG_LINUX],
 [
-LN_FUNC_CPU_ONLINE
-LN_TYPE_GFP_T
-LN_TYPE_CPUMASK_T
 LN_CONFIG_AFFINITY
 LN_CONFIG_BACKOFF
-LN_CONFIG_PANIC_DUMPLOG
 LN_CONFIG_QUADRICS
 LN_CONFIG_GM
 LN_CONFIG_OPENIB
@@ -1201,24 +979,6 @@ LN_CONFIG_O2IB
 LN_CONFIG_RALND
 LN_CONFIG_PTLLND
 LN_CONFIG_MX
-
-LN_STRUCT_PAGE_LIST
-LN_STRUCT_SIGHAND
-LN_FUNC_SHOW_TASK
-# 2.6.18
-LN_TASKLIST_LOCK
-# 2.6.19
-LN_KMEM_CACHE_DESTROY_INT
-LN_ATOMIC_PANIC_NOTIFIER
-# 2.6.20
-LN_3ARGS_INIT_WORK
-# 2.6.21
-LN_2ARGS_REGISTER_SYSCTL
-LN_KMEM_CACHE
-# 2.6.23
-LN_KMEM_CACHE_CREATE_DTOR
-# PPC/PPC64 support
-LC_SEGMENT_H
 ])
 
 #
@@ -1290,20 +1050,6 @@ else
 fi
 AC_SUBST(LIBREADLINE)
 
-AC_MSG_CHECKING([if efence debugging support is requested])
-AC_ARG_ENABLE(efence,
-       AC_HELP_STRING([--enable-efence],
-                       [use efence library]),
-       [],[enable_efence='no'])
-AC_MSG_RESULT([$enable_efence])
-if test "$enable_efence" = "yes" ; then
-       LIBEFENCE="-lefence"
-       AC_DEFINE(HAVE_LIBEFENCE, 1, [libefence support is requested])
-else
-       LIBEFENCE=""
-fi
-AC_SUBST(LIBEFENCE)
-
 # -------- enable acceptor libwrap (TCP wrappers) support? -------
 AC_MSG_CHECKING([if libwrap support is requested])
 AC_ARG_ENABLE([libwrap],
@@ -1322,31 +1068,6 @@ else
 fi
 AC_SUBST(LIBWRAP)
 
-# -------- check for -lpthread support ----
-AC_MSG_CHECKING([whether to use libpthread for lnet library])
-AC_ARG_ENABLE([libpthread],
-               AC_HELP_STRING([--disable-libpthread],
-                       [disable libpthread]),
-               [],[enable_libpthread=yes])
-if test "$enable_libpthread" = "yes" ; then
-       AC_CHECK_LIB([pthread], [pthread_create],
-               [ENABLE_LIBPTHREAD="yes"],
-               [ENABLE_LIBPTHREAD="no"])
-       if test "$ENABLE_LIBPTHREAD" = "yes" ; then
-               AC_MSG_RESULT([$ENABLE_LIBPTHREAD])
-               PTHREAD_LIBS="-lpthread"
-               AC_DEFINE([HAVE_LIBPTHREAD], 1, [use libpthread])
-       else
-               PTHREAD_LIBS=""
-               AC_MSG_RESULT([no libpthread is found])
-       fi
-       AC_SUBST(PTHREAD_LIBS)
-else
-       AC_MSG_RESULT([no (disabled explicitly)])
-       ENABLE_LIBPTHREAD="no"
-fi
-AC_SUBST(ENABLE_LIBPTHREAD)
-
 # ----------------------------------------
 # some tests for catamount-like systems
 # ----------------------------------------
@@ -1422,8 +1143,6 @@ lnet/autoMakefile
 lnet/autoconf/Makefile
 lnet/doc/Makefile
 lnet/include/Makefile
-lnet/include/libcfs/Makefile
-lnet/include/libcfs/linux/Makefile
 lnet/include/lnet/Makefile
 lnet/include/lnet/linux/Makefile
 lnet/klnds/Makefile
@@ -1450,9 +1169,6 @@ lnet/klnds/socklnd/Makefile
 lnet/klnds/socklnd/autoMakefile
 lnet/klnds/ptllnd/Makefile
 lnet/klnds/ptllnd/autoMakefile
-lnet/libcfs/Makefile
-lnet/libcfs/autoMakefile
-lnet/libcfs/linux/Makefile
 lnet/lnet/Makefile
 lnet/lnet/autoMakefile
 lnet/selftest/Makefile
@@ -1466,9 +1182,7 @@ lnet/utils/Makefile
 case $lb_target_os in
        darwin)
                AC_CONFIG_FILES([
-lnet/include/libcfs/darwin/Makefile
 lnet/include/lnet/darwin/Makefile
-lnet/libcfs/darwin/Makefile
 ])
                ;;
 esac