Whamcloud - gitweb
Update e2fsprogs version in changelog
[fs/lustre-release.git] / lnet / autoconf / lustre-lnet.m4
1 #
2 # LN_CONFIG_MAX_PAYLOAD
3 #
4 # configure maximum payload
5 #
6 AC_DEFUN([LN_CONFIG_MAX_PAYLOAD],
7 [AC_MSG_CHECKING([for non-default maximum LNET payload])
8 AC_ARG_WITH([max-payload-mb],
9         AC_HELP_STRING([--with-max-payload-mb=MBytes],
10                        [set maximum lnet payload in MBytes]),
11         [
12                 AC_MSG_RESULT([$with_max_payload_mb])
13                 LNET_MAX_PAYLOAD_MB=$with_max_payload_mb
14                 LNET_MAX_PAYLOAD="(($with_max_payload_mb)<<20)"
15         ], [
16                 AC_MSG_RESULT([no])
17                 LNET_MAX_PAYLOAD="LNET_MTU"
18         ])
19         AC_DEFINE_UNQUOTED(LNET_MAX_PAYLOAD, $LNET_MAX_PAYLOAD,
20                            [Max LNET payload])
21 ])
22
23 #
24 # LN_CHECK_GCC_VERSION
25 #
26 # Check compiler version
27 #
28 AC_DEFUN([LN_CHECK_GCC_VERSION],
29 [AC_MSG_CHECKING([compiler version])
30 PTL_CC_VERSION=`$CC --version | awk '/^gcc/{print $ 3}'`
31 PTL_MIN_CC_VERSION="3.2.2"
32 v2n() {
33         awk -F. '{printf "%d\n", (($ 1)*100+($ 2))*100+($ 3)}'
34 }
35 if test -z "$PTL_CC_VERSION" -o \
36         `echo $PTL_CC_VERSION | v2n` -ge `echo $PTL_MIN_CC_VERSION | v2n`; then
37         AC_MSG_RESULT([ok])
38 else
39         AC_MSG_RESULT([Buggy compiler found])
40         AC_MSG_ERROR([Need gcc version >= $PTL_MIN_CC_VERSION])
41 fi
42 ])
43
44 #
45 # LN_CONFIG_CDEBUG
46 #
47 # whether to enable various libcfs debugs (CDEBUG, ENTRY/EXIT, LASSERT, etc.)
48 #
49 AC_DEFUN([LN_CONFIG_CDEBUG],
50 [
51 AC_MSG_CHECKING([whether to enable CDEBUG, CWARN])
52 AC_ARG_ENABLE([libcfs_cdebug],
53         AC_HELP_STRING([--disable-libcfs-cdebug],
54                         [disable libcfs CDEBUG, CWARN]),
55         [],[enable_libcfs_cdebug='yes'])
56 AC_MSG_RESULT([$enable_libcfs_cdebug])
57 if test x$enable_libcfs_cdebug = xyes; then
58    AC_DEFINE(CDEBUG_ENABLED, 1, [enable libcfs CDEBUG, CWARN])
59 else
60    AC_DEFINE(CDEBUG_ENABLED, 0, [disable libcfs CDEBUG, CWARN])
61 fi
62
63 AC_MSG_CHECKING([whether to enable ENTRY/EXIT])
64 AC_ARG_ENABLE([libcfs_trace],
65         AC_HELP_STRING([--disable-libcfs-trace],
66                         [disable libcfs ENTRY/EXIT]),
67         [],[enable_libcfs_trace='yes'])
68 AC_MSG_RESULT([$enable_libcfs_trace])
69 if test x$enable_libcfs_trace = xyes; then
70    AC_DEFINE(CDEBUG_ENTRY_EXIT, 1, [enable libcfs ENTRY/EXIT])
71 else
72    AC_DEFINE(CDEBUG_ENTRY_EXIT, 0, [disable libcfs ENTRY/EXIT])
73 fi
74
75 AC_MSG_CHECKING([whether to enable LASSERT, LASSERTF])
76 AC_ARG_ENABLE([libcfs_assert],
77         AC_HELP_STRING([--disable-libcfs-assert],
78                         [disable libcfs LASSERT, LASSERTF]),
79         [],[enable_libcfs_assert='yes'])
80 AC_MSG_RESULT([$enable_libcfs_assert])
81 if test x$enable_libcfs_assert = xyes; then
82    AC_DEFINE(LIBCFS_DEBUG, 1, [enable libcfs LASSERT, LASSERTF])
83 fi
84 ])
85
86 #
87 # LN_CONFIG_AFFINITY
88 #
89 # check if cpu affinity is available/wanted
90 #
91 AC_DEFUN([LN_CONFIG_AFFINITY],
92 [AC_ARG_ENABLE([affinity],
93         AC_HELP_STRING([--disable-affinity],
94                        [disable process/irq affinity]),
95         [],[enable_affinity='yes'])
96
97 AC_MSG_CHECKING([for CPU affinity support])
98 if test x$enable_affinity = xno ; then
99         AC_MSG_RESULT([no (by request)])
100 else
101         LB_LINUX_TRY_COMPILE([
102                 #include <linux/sched.h>
103         ],[
104                 struct task_struct t;
105                 #if HAVE_CPUMASK_T
106                 cpumask_t     m;
107                 #else
108                 unsigned long m;
109                 #endif
110                 set_cpus_allowed(&t, m);
111         ],[
112                 AC_DEFINE(CPU_AFFINITY, 1, [kernel has cpu affinity support])
113                 AC_MSG_RESULT([yes])
114         ],[
115                 AC_MSG_RESULT([no (no kernel support)])
116         ])
117 fi
118 ])
119
120 #
121 # LN_CONFIG_PORTALS
122 #
123 # configure support for Portals
124 #
125 AC_DEFUN([LN_CONFIG_PORTALS],
126 [AC_MSG_CHECKING([for portals])
127 AC_ARG_WITH([portals],
128         AC_HELP_STRING([--with-portals=path],
129                        [set path to portals]),
130         [
131                 case $with_portals in
132                         no)     ENABLEPORTALS=0
133                                 ;;
134                         *)      PORTALS="${with_portals}"
135                                 ENABLEPORTALS=1
136                                 ;;
137                 esac
138         ], [
139                 ENABLEPORTALS=0
140         ])
141 PTLLNDCPPFLAGS=""
142 if test $ENABLEPORTALS -eq 0; then
143         AC_MSG_RESULT([no])
144 elif test ! \( -f ${PORTALS}/include/portals/p30.h \); then
145         AC_MSG_RESULT([no])
146         AC_MSG_ERROR([bad --with-portals path])
147 else
148         AC_MSG_RESULT([$PORTALS])
149         PTLLNDCPPFLAGS="-I${PORTALS}/include"
150 fi
151 AC_SUBST(PTLLNDCPPFLAGS)
152 ])
153
154 #
155 # LN_CONFIG_BACKOFF
156 #
157 # check if tunable tcp backoff is available/wanted
158 #
159 AC_DEFUN([LN_CONFIG_BACKOFF],
160 [AC_MSG_CHECKING([for tunable backoff TCP support])
161 AC_ARG_ENABLE([backoff],
162        AC_HELP_STRING([--disable-backoff],
163                       [disable socknal tunable backoff]),
164        [],[enable_backoff='yes'])
165 if test x$enable_backoff = xno ; then
166        AC_MSG_RESULT([no (by request)])
167 else
168        BOCD="`grep -c TCP_BACKOFF $LINUX/include/linux/tcp.h`"
169        if test "$BOCD" != 0 ; then
170                AC_DEFINE(SOCKNAL_BACKOFF, 1, [use tunable backoff TCP])
171                AC_MSG_RESULT(yes)
172                if grep rto_max $LINUX/include/linux/tcp.h|grep -q __u16; then
173                    AC_DEFINE(SOCKNAL_BACKOFF_MS, 1, [tunable backoff TCP in ms])
174                fi
175        else
176                AC_MSG_RESULT([no (no kernel support)])
177        fi
178 fi
179 ])
180
181 #
182 # LN_CONFIG_PANIC_DUMPLOG
183 #
184 # check if tunable panic_dumplog is wanted
185 #
186 AC_DEFUN([LN_CONFIG_PANIC_DUMPLOG],
187 [AC_MSG_CHECKING([for tunable panic_dumplog support])
188 AC_ARG_ENABLE([panic_dumplog],
189        AC_HELP_STRING([--enable-panic_dumplog],
190                       [enable panic_dumplog]),
191        [],[enable_panic_dumplog='no'])
192 if test x$enable_panic_dumplog = xyes ; then
193        AC_DEFINE(LNET_DUMP_ON_PANIC, 1, [use dumplog on panic])
194        AC_MSG_RESULT([yes (by request)])
195 else
196        AC_MSG_RESULT([no])
197 fi
198 ])
199
200 #
201 # LN_CONFIG_PTLLND
202 #
203 # configure support for Portals LND
204 #
205 AC_DEFUN([LN_CONFIG_PTLLND],
206 [
207 if test -z "$ENABLEPORTALS"; then
208         LN_CONFIG_PORTALS
209 fi
210
211 AC_MSG_CHECKING([whether to build the kernel portals LND])
212
213 PTLLND=""
214 if test $ENABLEPORTALS -ne 0; then
215         AC_MSG_RESULT([yes])
216         PTLLND="ptllnd"
217 else
218         AC_MSG_RESULT([no])
219 fi
220 AC_SUBST(PTLLND)
221 ])
222
223 #
224 # LN_CONFIG_UPTLLND
225 #
226 # configure support for Portals LND
227 #
228 AC_DEFUN([LN_CONFIG_UPTLLND],
229 [
230 if test -z "$ENABLEPORTALS"; then
231         LN_CONFIG_PORTALS
232 fi
233
234 AC_MSG_CHECKING([whether to build the userspace portals LND])
235
236 UPTLLND=""
237 if test $ENABLEPORTALS -ne 0; then
238         AC_MSG_RESULT([yes])
239         UPTLLND="ptllnd"
240 else
241         AC_MSG_RESULT([no])
242 fi
243 AC_SUBST(UPTLLND)
244 ])
245
246 #
247 # LN_CONFIG_USOCKLND
248 #
249 # configure support for userspace TCP/IP LND
250 #
251 AC_DEFUN([LN_CONFIG_USOCKLND],
252 [AC_MSG_CHECKING([whether to build usocklnd])
253 AC_ARG_ENABLE([usocklnd],
254         AC_HELP_STRING([--disable-usocklnd],
255                         [disable usocklnd]),
256         [],[enable_usocklnd='yes'])
257
258 if test x$enable_usocklnd = xyes ; then
259         if test "$ENABLE_LIBPTHREAD" = "yes" ; then
260                 AC_MSG_RESULT([yes])
261                 USOCKLND="usocklnd"
262         else
263                 AC_MSG_RESULT([no (libpthread not present or disabled)])
264                 USOCKLND=""
265         fi
266 else
267         AC_MSG_RESULT([no (disabled explicitly)])
268         USOCKLND=""
269 fi
270 AC_SUBST(USOCKLND)
271 ])
272
273 #
274 # LN_CONFIG_QUADRICS
275 #
276 # check if quadrics support is in this kernel
277 #
278 AC_DEFUN([LN_CONFIG_QUADRICS],
279 [AC_MSG_CHECKING([for QsNet sources])
280 AC_ARG_WITH([qsnet],
281         AC_HELP_STRING([--with-qsnet=path],
282                        [set path to qsnet source (default=$LINUX)]),
283         [QSNET=$with_qsnet],
284         [QSNET=$LINUX])
285 AC_MSG_RESULT([$QSNET])
286
287 AC_MSG_CHECKING([if quadrics kernel headers are present])
288 if test -d $QSNET/drivers/net/qsnet ; then
289         AC_MSG_RESULT([yes])
290         QSWLND="qswlnd"
291         AC_MSG_CHECKING([for multirail EKC])
292         if test -f $QSNET/include/elan/epcomms.h; then
293                 AC_MSG_RESULT([supported])
294                 QSWCPPFLAGS="-I$QSNET/include -DMULTIRAIL_EKC=1"
295         else
296                 AC_MSG_RESULT([not supported])
297                 AC_MSG_ERROR([Need multirail EKC])
298         fi
299
300         if test x$QSNET = x$LINUX ; then
301                 LB_LINUX_CONFIG([QSNET],[],[
302                         LB_LINUX_CONFIG([QSNET_MODULE],[],[
303                                 AC_MSG_WARN([QSNET is not enabled in this kernel; not building qswlnd.])
304                                 QSWLND=""
305                                 QSWCPPFLAGS=""
306                         ])
307                 ])
308         fi
309 else
310         AC_MSG_RESULT([no])
311         QSWLND=""
312         QSWCPPFLAGS=""
313 fi
314 AC_SUBST(QSWCPPFLAGS)
315 AC_SUBST(QSWLND)
316 ])
317
318 #
319 # LN_CONFIG_GM
320 #
321 # check if GM support is available
322 #
323 AC_DEFUN([LN_CONFIG_GM],[
324 AC_MSG_CHECKING([whether to enable GM support])
325 AC_ARG_WITH([gm],
326         AC_HELP_STRING([--with-gm=path-to-gm-source-tree],
327                        [build gmlnd against path]),
328         [
329                 case $with_gm in
330                 no)    ENABLE_GM=0
331                        ;;
332                 *)     ENABLE_GM=1
333                        GM_SRC="$with_gm"
334                        ;;
335                 esac
336         ],[
337                 ENABLE_GM=0
338         ])
339 AC_ARG_WITH([gm-install],
340         AC_HELP_STRING([--with-gm-install=path-to-gm-install-tree],
341                        [say where GM has been installed]),
342         [
343                 GM_INSTALL=$with_gm_install
344         ],[
345                 GM_INSTALL="/opt/gm"
346         ])
347 if test $ENABLE_GM -eq 0; then
348         AC_MSG_RESULT([no])
349 else
350         AC_MSG_RESULT([yes])
351
352         GMLND="gmlnd"
353         GMCPPFLAGS="-I$GM_SRC/include -I$GM_SRC/drivers -I$GM_SRC/drivers/linux/gm"
354
355         if test -f $GM_INSTALL/lib/libgm.a -o \
356                 -f $GM_INSTALL/lib64/libgm.a; then
357                 GMLIBS="-L$GM_INSTALL/lib -L$GM_INSTALL/lib64"
358         else
359                 AC_MSG_ERROR([Cant find GM libraries under $GM_INSTALL])
360         fi
361
362         EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
363         EXTRA_KCFLAGS="$GMCPPFLAGS -DGM_KERNEL $EXTRA_KCFLAGS"
364
365         AC_MSG_CHECKING([that code using GM compiles with given path])
366         LB_LINUX_TRY_COMPILE([
367                 #define GM_STRONG_TYPES 1
368                 #ifdef VERSION
369                 #undef VERSION
370                 #endif
371                 #include "gm.h"
372                 #include "gm_internal.h"
373         ],[
374                 struct gm_port *port = NULL;
375                 gm_recv_event_t *rxevent = gm_blocking_receive_no_spin(port);
376                 return 0;
377         ],[
378                 AC_MSG_RESULT([yes])
379         ],[
380                 AC_MSG_RESULT([no])
381                 AC_MSG_ERROR([Bad --with-gm path])
382         ])
383
384         AC_MSG_CHECKING([that GM has gm_register_memory_ex_phys()])
385         LB_LINUX_TRY_COMPILE([
386                 #define GM_STRONG_TYPES 1
387                 #ifdef VERSION
388                 #undef VERSION
389                 #endif
390                 #include "gm.h"
391                 #include "gm_internal.h"
392         ],[
393                 gm_status_t     gmrc;
394                 struct gm_port *port = NULL;
395                 gm_u64_t        phys = 0;
396                 gm_up_t         pvma = 0;
397
398                 gmrc = gm_register_memory_ex_phys(port, phys, 100, pvma);
399                 return 0;
400         ],[
401                 AC_MSG_RESULT([yes])
402         ],[
403                 AC_MSG_RESULT([no.
404 Please patch the GM sources as follows...
405     cd $GM_SRC
406     patch -p0 < $PWD/lnet/klnds/gmlnd/gm-reg-phys.patch
407 ...then rebuild and re-install them])
408                 AC_MSG_ERROR([Can't build GM without gm_register_memory_ex_phys()])
409         ])
410
411         EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
412 fi
413 AC_SUBST(GMCPPFLAGS)
414 AC_SUBST(GMLIBS)
415 AC_SUBST(GMLND)
416 ])
417
418
419 #
420 # LN_CONFIG_MX
421 #
422 AC_DEFUN([LN_CONFIG_MX],
423 [AC_MSG_CHECKING([whether to enable Myrinet MX support])
424 # set default
425 MXPATH="/opt/mx"
426 AC_ARG_WITH([mx],
427        AC_HELP_STRING([--with-mx=path],
428                       [build mxlnd against path]),
429        [
430                case $with_mx in
431                yes)    ENABLEMX=2
432                        ;;
433                no)     ENABLEMX=0
434                        ;;
435                *)      MXPATH=$with_mx
436                        ENABLEMX=3
437                        ;;
438                esac
439        ],[
440                ENABLEMX=1
441        ])
442 if test $ENABLEMX -eq 0; then
443        AC_MSG_RESULT([disabled])
444 elif test ! \( -f ${MXPATH}/include/myriexpress.h -a \
445               -f ${MXPATH}/include/mx_kernel_api.h -a \
446               -f ${MXPATH}/include/mx_pin.h \); then
447        AC_MSG_RESULT([no])
448        case $ENABLEMX in
449        1) ;;
450        2) AC_MSG_ERROR([Myrinet MX kernel headers not present]);;
451        3) AC_MSG_ERROR([bad --with-mx path]);;
452        *) AC_MSG_ERROR([internal error]);;
453        esac
454 else
455        MXCPPFLAGS="-I$MXPATH/include"
456        EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
457        EXTRA_KCFLAGS="$EXTRA_KCFLAGS $MXCPPFLAGS"
458        MXLIBS="-L$MXPATH/lib"
459        LB_LINUX_TRY_COMPILE([
460                #define MX_KERNEL 1
461                #include <mx_extensions.h>
462                #include <myriexpress.h>
463        ],[
464                mx_endpoint_t   end;
465                mx_status_t     status;
466                mx_request_t    request;
467                int             result;
468
469                mx_init();
470                mx_open_endpoint(MX_ANY_NIC, MX_ANY_ENDPOINT, 0, NULL, 0, &end);
471                mx_register_unexp_handler(end, (mx_unexp_handler_t) NULL, NULL);
472                mx_wait_any(end, MX_INFINITE, 0LL, 0LL, &status, &result);
473                mx_iconnect(end, 0LL, 0, 0, 0, NULL, &request);
474                return 0;
475        ],[
476                AC_MSG_RESULT([yes])
477                MXLND="mxlnd"
478        ],[
479                AC_MSG_RESULT([no])
480                case $ENABLEMX in
481                1) ;;
482                2) AC_MSG_ERROR([can't compile with Myrinet MX kernel headers]);;
483                3) AC_MSG_ERROR([can't compile with Myrinet MX headers under $MXPATH]);;
484                *) AC_MSG_ERROR([internal error]);;
485                esac
486                MXLND=""
487                MXCPPFLAGS=""
488        ])
489        EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
490 fi
491 AC_SUBST(MXCPPFLAGS)
492 AC_SUBST(MXLIBS)
493 AC_SUBST(MXLND)
494 ])
495
496
497
498 #
499 # LN_CONFIG_O2IB
500 #
501 AC_DEFUN([LN_CONFIG_O2IB],[
502 AC_MSG_CHECKING([whether to enable OpenIB gen2 support])
503 # set default
504 AC_ARG_WITH([o2ib],
505         AC_HELP_STRING([--with-o2ib=path],
506                        [build o2iblnd against path]),
507         [
508                 case $with_o2ib in
509                 yes)    O2IBPATHS="$LINUX $LINUX/drivers/infiniband"
510                         ENABLEO2IB=2
511                         ;;
512                 no)     ENABLEO2IB=0
513                         ;;
514                 *)      O2IBPATHS=$with_o2ib
515                         ENABLEO2IB=3
516                         ;;
517                 esac
518         ],[
519                 O2IBPATHS="$LINUX $LINUX/drivers/infiniband"
520                 ENABLEO2IB=1
521         ])
522 if test $ENABLEO2IB -eq 0; then
523         AC_MSG_RESULT([disabled])
524 else
525         o2ib_found=false
526
527         for O2IBPATH in $O2IBPATHS; do
528                 if test \( -f ${O2IBPATH}/include/rdma/rdma_cm.h -a \
529                            -f ${O2IBPATH}/include/rdma/ib_cm.h -a \
530                            -f ${O2IBPATH}/include/rdma/ib_verbs.h -a \
531                            -f ${O2IBPATH}/include/rdma/ib_fmr_pool.h \); then
532                         if test \( -d ${O2IBPATH}/kernel_patches -a \
533                                    -f ${O2IBPATH}/Makefile \); then
534                                 AC_MSG_RESULT([no])
535                                 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%-*}])
536                         fi
537                         o2ib_found=true
538                         break
539                 fi
540         done
541
542         if ! $o2ib_found; then
543                 AC_MSG_RESULT([no])
544                 case $ENABLEO2IB in
545                         1) ;;
546                         2) AC_MSG_ERROR([kernel OpenIB gen2 headers not present]);;
547                         3) AC_MSG_ERROR([bad --with-o2ib path]);;
548                         *) AC_MSG_ERROR([internal error]);;
549                 esac
550         else
551                 O2IBCPPFLAGS="-I$O2IBPATH/include"
552                 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
553                 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $O2IBCPPFLAGS"
554                 EXTRA_LNET_INCLUDE="$EXTRA_LNET_INCLUDE $O2IBCPPFLAGS"
555
556                 LB_LINUX_TRY_COMPILE([
557                         #include <linux/version.h>
558                         #include <linux/pci.h>
559                         #if !HAVE_GFP_T
560                         typedef int gfp_t;
561                         #endif
562                         #include <rdma/rdma_cm.h>
563                         #include <rdma/ib_cm.h>
564                         #include <rdma/ib_verbs.h>
565                         #include <rdma/ib_fmr_pool.h>
566                 ],[
567                         struct rdma_cm_id          *cm_id;
568                         struct rdma_conn_param      conn_param;
569                         struct ib_device_attr       device_attr;
570                         struct ib_qp_attr           qp_attr;
571                         struct ib_pool_fmr          pool_fmr;
572                         enum   ib_cm_rej_reason     rej_reason;
573
574                         cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP);
575                         return PTR_ERR(cm_id);
576                 ],[
577                         AC_MSG_RESULT([yes])
578                         O2IBLND="o2iblnd"
579                 ],[
580                         AC_MSG_RESULT([no])
581                         case $ENABLEO2IB in
582                         1) ;;
583                         2) AC_MSG_ERROR([can't compile with kernel OpenIB gen2 headers]);;
584                         3) AC_MSG_ERROR([can't compile with OpenIB gen2 headers under $O2IBPATH]);;
585                         *) AC_MSG_ERROR([internal error]);;
586                         esac
587                         O2IBLND=""
588                         O2IBCPPFLAGS=""
589                 ])
590                 # we know at this point that the found OFED source is good
591                 O2IB_SYMVER=""
592                 if test $ENABLEO2IB -eq 3 ; then
593                         # OFED default rpm not handle sles10 Modules.symvers name
594                         for name in Module.symvers Modules.symvers; do
595                                 if test -f $O2IBPATH/$name; then
596                                         O2IB_SYMVER=$name;
597                                         break;
598                                 fi
599                         done
600                         if test -n "$O2IB_SYMVER"; then
601                                 AC_MSG_NOTICE([adding $O2IBPATH/Module.symvers to $PWD/$SYMVERFILE])
602                                 # strip out the existing symbols versions first
603                                 if test -f $PWD/$SYMVERFILE; then
604                                     egrep -v $(echo $(awk '{ print $2 }' $O2IBPATH/$O2IB_SYMVER) | tr ' ' '|') $PWD/$SYMVERFILE > $PWD/$SYMVERFILE.old
605                                 else
606                                     touch $PWD/$SYMVERFILE.old
607                                 fi
608                                 cat $PWD/$SYMVERFILE.old $O2IBPATH/$O2IB_SYMVER > $PWD/$SYMVERFILE
609                                 rm $PWD/$SYMVERFILE.old
610                         else
611                                 AC_MSG_ERROR([an external source tree was specified for o2iblnd however I could not find a $O2IBPATH/Module.symvers there])
612                         fi
613                 fi
614
615                 LN_CONFIG_OFED_SPEC
616                 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
617         fi
618 fi
619
620 AC_SUBST(EXTRA_LNET_INCLUDE)
621 AC_SUBST(O2IBCPPFLAGS)
622 AC_SUBST(O2IBLND)
623 ])
624
625 #
626 # LN_CONFIG_OPENIB
627 #
628 # check for OpenIB in the kernel
629 AC_DEFUN([LN_CONFIG_OPENIB],[
630 AC_MSG_CHECKING([whether to enable OpenIB support])
631 # set default
632 OPENIBPATH="$LINUX/drivers/infiniband"
633 AC_ARG_WITH([openib],
634         AC_HELP_STRING([--with-openib=path],
635                        [build openiblnd against path]),
636         [
637                 case $with_openib in
638                 yes)    ENABLEOPENIB=2
639                         ;;
640                 no)     ENABLEOPENIB=0
641                         ;;
642                 *)      OPENIBPATH="$with_openib"
643                         ENABLEOPENIB=3
644                         ;;
645                 esac
646         ],[
647                 ENABLEOPENIB=1
648         ])
649 if test $ENABLEOPENIB -eq 0; then
650         AC_MSG_RESULT([disabled])
651 elif test ! \( -f ${OPENIBPATH}/include/ts_ib_core.h -a \
652                -f ${OPENIBPATH}/include/ts_ib_cm.h -a \
653                -f ${OPENIBPATH}/include/ts_ib_sa_client.h \); then
654         AC_MSG_RESULT([no])
655         case $ENABLEOPENIB in
656         1) ;;
657         2) AC_MSG_ERROR([kernel OpenIB headers not present]);;
658         3) AC_MSG_ERROR([bad --with-openib path]);;
659         *) AC_MSG_ERROR([internal error]);;
660         esac
661 else
662         case $ENABLEOPENIB in
663         1|2) OPENIBCPPFLAGS="-I$OPENIBPATH/include -DIN_TREE_BUILD";;
664         3)   OPENIBCPPFLAGS="-I$OPENIBPATH/include";;
665         *)   AC_MSG_RESULT([no])
666              AC_MSG_ERROR([internal error]);;
667         esac
668         OPENIBCPPFLAGS="$OPENIBCPPFLAGS -DIB_NTXRXPARAMS=4"
669         EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
670         EXTRA_KCFLAGS="$EXTRA_KCFLAGS $OPENIBCPPFLAGS"
671         LB_LINUX_TRY_COMPILE([
672                 #include <ts_ib_core.h>
673                 #include <ts_ib_cm.h>
674                 #include <ts_ib_sa_client.h>
675         ],[
676                 struct ib_device_properties dev_props;
677                 struct ib_cm_active_param   cm_active_params;
678                 tTS_IB_CLIENT_QUERY_TID     tid;
679                 int                         enum1 = IB_QP_ATTRIBUTE_STATE;
680                 int                         enum2 = IB_ACCESS_LOCAL_WRITE;
681                 int                         enum3 = IB_CQ_CALLBACK_INTERRUPT;
682                 int                         enum4 = IB_CQ_PROVIDER_REARM;
683                 return 0;
684         ],[
685                 AC_MSG_RESULT([yes])
686                 OPENIBLND="openiblnd"
687         ],[
688                 AC_MSG_RESULT([no])
689                 case $ENABLEOPENIB in
690                 1) ;;
691                 2) AC_MSG_ERROR([can't compile with kernel OpenIB headers]);;
692                 3) AC_MSG_ERROR([can't compile with OpenIB headers under $OPENIBPATH]);;
693                 *) AC_MSG_ERROR([internal error]);;
694                 esac
695                 OPENIBLND=""
696                 OPENIBCPPFLAGS=""
697         ])
698         EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
699 fi
700 AC_SUBST(OPENIBCPPFLAGS)
701 AC_SUBST(OPENIBLND)
702 ])
703
704 #
705 # LN_CONFIG_CIBLND
706 #
707 AC_DEFUN([LN_CONFIG_CIB],[
708 AC_MSG_CHECKING([whether to enable Cisco/TopSpin IB support])
709 # set default
710 CIBPATH=""
711 CIBLND=""
712 AC_ARG_WITH([cib],
713         AC_HELP_STRING([--with-cib=path],
714                        [build ciblnd against path]),
715         [
716                 case $with_cib in
717                 no)     AC_MSG_RESULT([no]);;
718                 *)      CIBPATH="$with_cib"
719                         if test -d "$CIBPATH"; then
720                                 AC_MSG_RESULT([yes])
721                         else
722                                 AC_MSG_RESULT([no])
723                                 AC_MSG_ERROR([No directory $CIBPATH])
724                         fi;;
725                 esac
726         ],[
727                 AC_MSG_RESULT([no])
728         ])
729 if test -n "$CIBPATH"; then
730         CIBCPPFLAGS="-I${CIBPATH}/ib/ts_api_ng/include -I${CIBPATH}/all/kernel_services/include -DUSING_TSAPI"
731         CIBCPPFLAGS="$CIBCPPFLAGS -DIB_NTXRXPARAMS=3"
732         EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
733         EXTRA_KCFLAGS="$EXTRA_KCFLAGS $CIBCPPFLAGS"
734         LB_LINUX_TRY_COMPILE([
735                 #include <ts_ib_core.h>
736                 #include <ts_ib_cm.h>
737                 #include <ts_ib_sa_client.h>
738         ],[
739                 struct ib_device_properties dev_props;
740                 struct ib_cm_active_param   cm_active_params;
741                 tTS_IB_CLIENT_QUERY_TID     tid;
742                 int                         enum1 = TS_IB_QP_ATTRIBUTE_STATE;
743                 int                         enum2 = TS_IB_ACCESS_LOCAL_WRITE;
744                 int                         enum3 = TS_IB_CQ_CALLBACK_INTERRUPT;
745                 int                         enum4 = TS_IB_CQ_PROVIDER_REARM;
746                 return 0;
747         ],[
748                 CIBLND="ciblnd"
749         ],[
750                 AC_MSG_ERROR([can't compile ciblnd with given path])
751                 CIBCPPFLAGS=""
752         ])
753         EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
754 fi
755 AC_SUBST(CIBCPPFLAGS)
756 AC_SUBST(CIBLND)
757 ])
758
759 #
760 # LN_CONFIG_IIB
761 #
762 # check for infinicon infiniband support
763 #
764 AC_DEFUN([LN_CONFIG_IIB],[
765 AC_MSG_CHECKING([whether to enable Infinicon support])
766 # set default
767 IIBPATH="/usr/include"
768 AC_ARG_WITH([iib],
769         AC_HELP_STRING([--with-iib=path],
770                        [build iiblnd against path]),
771         [
772                 case $with_iib in
773                 yes)    ENABLEIIB=2
774                         ;;
775                 no)     ENABLEIIB=0
776                         ;;
777                 *)      IIBPATH="${with_iib}/include"
778                         ENABLEIIB=3
779                         ;;
780                 esac
781         ],[
782                 ENABLEIIB=1
783         ])
784 if test $ENABLEIIB -eq 0; then
785         AC_MSG_RESULT([disabled])
786 elif test ! \( -f ${IIBPATH}/linux/iba/ibt.h \); then
787         AC_MSG_RESULT([no])
788         case $ENABLEIIB in
789         1) ;;
790         2) AC_MSG_ERROR([default Infinicon headers not present]);;
791         3) AC_MSG_ERROR([bad --with-iib path]);;
792         *) AC_MSG_ERROR([internal error]);;
793         esac
794 else
795         IIBCPPFLAGS="-I$IIBPATH"
796         if test $IIBPATH != "/usr/include"; then
797                 # we need /usr/include come what may
798                 IIBCPPFLAGS="$IIBCPPFLAGS -I/usr/include"
799         fi
800         EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
801         EXTRA_KCFLAGS="$EXTRA_KCFLAGS $IIBCPPFLAGS"
802         LB_LINUX_TRY_COMPILE([
803                 #include <linux/iba/ibt.h>
804         ],[
805                 IBT_INTERFACE_UNION interfaces;
806                 FSTATUS             rc;
807
808                  rc = IbtGetInterfaceByVersion(IBT_INTERFACE_VERSION_2,
809                                                &interfaces);
810
811                 return rc == FSUCCESS ? 0 : 1;
812         ],[
813                 AC_MSG_RESULT([yes])
814                 IIBLND="iiblnd"
815         ],[
816                 AC_MSG_RESULT([no])
817                 case $ENABLEIIB in
818                 1) ;;
819                 2) AC_MSG_ERROR([can't compile with default Infinicon headers]);;
820                 3) AC_MSG_ERROR([can't compile with Infinicon headers under $IIBPATH]);;
821                 *) AC_MSG_ERROR([internal error]);;
822                 esac
823                 IIBLND=""
824                 IIBCPPFLAGS=""
825         ])
826         EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
827 fi
828 AC_SUBST(IIBCPPFLAGS)
829 AC_SUBST(IIBLND)
830 ])
831
832 #
833 # LN_CONFIG_VIB
834 #
835 # check for Voltaire infiniband support
836 #
837 AC_DEFUN([LN_CONFIG_VIB],
838 [AC_MSG_CHECKING([whether to enable Voltaire IB support])
839 VIBPATH=""
840 AC_ARG_WITH([vib],
841         AC_HELP_STRING([--with-vib=path],
842                        [build viblnd against path]),
843         [
844                 case $with_vib in
845                 no)     AC_MSG_RESULT([no]);;
846                 *)      VIBPATH="${with_vib}/src/nvigor/ib-code"
847                         if test -d "$with_vib" -a -d "$VIBPATH"; then
848                                 AC_MSG_RESULT([yes])
849                         else
850                                 AC_MSG_RESULT([no])
851                                 AC_MSG_ERROR([No directory $VIBPATH])
852                         fi;;
853                 esac
854         ],[
855                 AC_MSG_RESULT([no])
856         ])
857 if test -z "$VIBPATH"; then
858         VIBLND=""
859 else
860         VIBCPPFLAGS="-I${VIBPATH}/include -I${VIBPATH}/cm"
861         EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
862         EXTRA_KCFLAGS="$EXTRA_KCFLAGS $VIBCPPFLAGS"
863         LB_LINUX_TRY_COMPILE([
864                 #include <linux/list.h>
865                 #include <asm/byteorder.h>
866                 #ifdef __BIG_ENDIAN
867                 # define CPU_BE 1
868                 # define CPU_LE 0
869                 #endif
870                 #ifdef __LITTLE_ENDIAN
871                 # define CPU_BE 0
872                 # define CPU_LE 1
873                 #endif
874                 #include <vverbs.h>
875                 #include <ib-cm.h>
876                 #include <ibat.h>
877         ],[
878                 vv_hca_h_t       kib_hca;
879                 vv_return_t      vvrc;
880                 cm_cep_handle_t  cep;
881                 ibat_arp_data_t  arp_data;
882                 ibat_stat_t      ibatrc;
883
884                 vvrc = vv_hca_open("ANY_HCA", NULL, &kib_hca);
885                 cep = cm_create_cep(cm_cep_transp_rc);
886                 ibatrc = ibat_get_ib_data((uint32_t)0, (uint32_t)0,
887                                           ibat_paths_primary, &arp_data,
888                                           (ibat_get_ib_data_reply_fn_t)NULL,
889                                           NULL, 0);
890                 return 0;
891         ],[
892                 VIBLND="viblnd"
893         ],[
894                 AC_MSG_ERROR([can't compile viblnd with given path])
895         ])
896         EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
897 fi
898 if test -n "$VIBLND"; then
899         EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
900         EXTRA_KCFLAGS="$EXTRA_KCFLAGS $VIBCPPFLAGS"
901         AC_MSG_CHECKING([if Voltaire still uses void * sg addresses])
902         LB_LINUX_TRY_COMPILE([
903                 #include <linux/list.h>
904                 #include <asm/byteorder.h>
905                 #ifdef __BIG_ENDIAN
906                 # define CPU_BE 1
907                 # define CPU_LE 0
908                 #endif
909                 #ifdef __LITTLE_ENDIAN
910                 # define CPU_BE 0
911                 # define CPU_LE 1
912                 #endif
913                 #include <vverbs.h>
914                 #include <ib-cm.h>
915                 #include <ibat.h>
916         ],[
917                 vv_scatgat_t  sg;
918
919                 return &sg.v_address[3] == NULL;
920         ],[
921                 AC_MSG_RESULT([yes])
922                 VIBCPPFLAGS="$VIBCPPFLAGS -DIBNAL_VOIDSTAR_SGADDR=1"
923         ],[
924                 AC_MSG_RESULT([no])
925         ])
926         EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
927 fi
928 AC_SUBST(VIBCPPFLAGS)
929 AC_SUBST(VIBLND)
930 ])
931
932 #
933 # LN_CONFIG_RALND
934 #
935 # check whether to use the RapidArray lnd
936 #
937 AC_DEFUN([LN_CONFIG_RALND],
938 [#### Rapid Array
939 AC_MSG_CHECKING([if RapidArray kernel headers are present])
940 # placeholder
941 RACPPFLAGS="-I${LINUX}/drivers/xd1/include"
942 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
943 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $RACPPFLAGS"
944 LB_LINUX_TRY_COMPILE([
945         #include <linux/types.h>
946         #include <rapl.h>
947 ],[
948         RAP_RETURN          rc;
949         RAP_PVOID           dev_handle;
950
951         rc = RapkGetDeviceByIndex(0, NULL, &dev_handle);
952
953         return rc == RAP_SUCCESS ? 0 : 1;
954 ],[
955         AC_MSG_RESULT([yes])
956         RALND="ralnd"
957 ],[
958         AC_MSG_RESULT([no])
959         RALND=""
960         RACPPFLAGS=""
961 ])
962 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
963 AC_SUBST(RACPPFLAGS)
964 AC_SUBST(RALND)
965 ])
966
967 #
968 # LN_STRUCT_PAGE_LIST
969 #
970 # 2.6.4 no longer has page->list
971 #
972 AC_DEFUN([LN_STRUCT_PAGE_LIST],
973 [AC_MSG_CHECKING([if struct page has a list field])
974 LB_LINUX_TRY_COMPILE([
975         #include <linux/mm.h>
976 ],[
977         struct page page;
978         &page.list;
979 ],[
980         AC_MSG_RESULT([yes])
981         AC_DEFINE(HAVE_PAGE_LIST, 1, [struct page has a list field])
982 ],[
983         AC_MSG_RESULT([no])
984 ])
985 ])
986
987 #
988 # LN_STRUCT_SIGHAND
989 #
990 # red hat 2.4 adds sighand to struct task_struct
991 #
992 AC_DEFUN([LN_STRUCT_SIGHAND],
993 [AC_MSG_CHECKING([if task_struct has a sighand field])
994 LB_LINUX_TRY_COMPILE([
995         #include <linux/sched.h>
996 ],[
997         struct task_struct p;
998         p.sighand = NULL;
999 ],[
1000         AC_DEFINE(CONFIG_RH_2_4_20, 1, [this kernel contains Red Hat 2.4.20 patches])
1001         AC_MSG_RESULT([yes])
1002 ],[
1003         AC_MSG_RESULT([no])
1004 ])
1005 ])
1006
1007 #
1008 # LN_FUNC_CPU_ONLINE
1009 #
1010 # cpu_online is different in rh 2.4, vanilla 2.4, and 2.6
1011 #
1012 AC_DEFUN([LN_FUNC_CPU_ONLINE],
1013 [AC_MSG_CHECKING([if kernel defines cpu_online()])
1014 LB_LINUX_TRY_COMPILE([
1015         #include <linux/sched.h>
1016 ],[
1017         cpu_online(0);
1018 ],[
1019         AC_MSG_RESULT([yes])
1020         AC_DEFINE(HAVE_CPU_ONLINE, 1, [cpu_online found])
1021 ],[
1022         AC_MSG_RESULT([no])
1023 ])
1024 ])
1025
1026 #
1027 # LN_TYPE_GFP_T
1028 #
1029 # check if gfp_t is typedef-ed
1030 #
1031 AC_DEFUN([LN_TYPE_GFP_T],
1032 [AC_MSG_CHECKING([if kernel defines gfp_t])
1033 LB_LINUX_TRY_COMPILE([
1034         #include <linux/gfp.h>
1035 ],[
1036         return sizeof(gfp_t);
1037 ],[
1038         AC_MSG_RESULT([yes])
1039         AC_DEFINE(HAVE_GFP_T, 1, [gfp_t found])
1040 ],[
1041         AC_MSG_RESULT([no])
1042 ])
1043 ])
1044
1045 #
1046 # LN_TYPE_CPUMASK_T
1047 #
1048 # same goes for cpumask_t
1049 #
1050 AC_DEFUN([LN_TYPE_CPUMASK_T],
1051 [AC_MSG_CHECKING([if kernel defines cpumask_t])
1052 LB_LINUX_TRY_COMPILE([
1053         #include <linux/sched.h>
1054 ],[
1055         return sizeof (cpumask_t);
1056 ],[
1057         AC_MSG_RESULT([yes])
1058         AC_DEFINE(HAVE_CPUMASK_T, 1, [cpumask_t found])
1059 ],[
1060         AC_MSG_RESULT([no])
1061 ])
1062 ])
1063
1064 #
1065 # LN_FUNC_SHOW_TASK
1066 #
1067 # we export show_task(), but not all kernels have it (yet)
1068 # also check sched_show_task() in here, since 2.6.27.
1069 #
1070 AC_DEFUN([LN_FUNC_SHOW_TASK],
1071 [LB_CHECK_SYMBOL_EXPORT([show_task],
1072 [kernel/ksyms.c kernel/sched.c],[
1073 AC_DEFINE(HAVE_SHOW_TASK, 1, [show_task is exported])
1074 ],[
1075         LB_CHECK_SYMBOL_EXPORT([sched_show_task],
1076         [kernel/ksyms.c kernel/sched.c],[
1077         AC_DEFINE(HAVE_SCHED_SHOW_TASK, 1, [sched_show_task is exported])
1078         ],[])
1079 ])
1080 ])
1081
1082 # check kernel __u64 type
1083 AC_DEFUN([LN_KERN__U64_LONG_LONG],
1084 [AC_MSG_CHECKING([kernel __u64 is long long type])
1085 tmp_flags="$EXTRA_KCFLAGS"
1086 EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Werror"
1087 LB_LINUX_TRY_COMPILE([
1088         #include <linux/types.h>
1089         #include <linux/stddef.h>
1090 ],[
1091         unsigned long long *data1;
1092         __u64 *data2 = NULL;
1093                 
1094         data1 = data2;
1095 ],[
1096         AC_MSG_RESULT([yes])
1097         AC_DEFINE(HAVE_KERN__U64_LONG_LONG, 1,
1098                   [kernel __u64 is long long type])
1099 ],[
1100         AC_MSG_RESULT([no])
1101 ])
1102 EXTRA_KCFLAGS="$tmp_flags"
1103 ])
1104
1105 # check userland __u64 type
1106 AC_DEFUN([LN_USER__U64_LONG_LONG],
1107 [AC_MSG_CHECKING([userspace __u64 is long long type])
1108 tmp_flags="$CFLAGS"
1109 CFLAGS="$CFLAGS -Werror"
1110 AC_COMPILE_IFELSE([
1111         #include <stdio.h>
1112         #include <linux/types.h>
1113         #include <linux/stddef.h>
1114         int main(void) {
1115                 unsigned long long *data1;
1116                 __u64 *data2 = NULL;
1117                 
1118                 data1 = data2;
1119                 return 0;
1120         }
1121 ],[
1122         AC_MSG_RESULT([yes])
1123         AC_DEFINE(HAVE_USER__U64_LONG_LONG, 1,
1124                   [userspace __u64 is long long type])
1125 ],[
1126         AC_MSG_RESULT([no])
1127 ])
1128 CFLAGS="$tmp_flags"
1129 ])
1130
1131 # check kernel __le16, __le32 types
1132 AC_DEFUN([LN_LE_TYPES],
1133 [AC_MSG_CHECKING([__le16 and __le32 types are defined])
1134 LB_LINUX_TRY_COMPILE([
1135         #include <linux/types.h>
1136 ],[
1137         __le16 a;
1138         __le32 b;
1139 ],[
1140         AC_MSG_RESULT([yes])
1141         AC_DEFINE(HAVE_LE_TYPES, 1,
1142                   [__le16 and __le32 types are defined])
1143 ],[
1144         AC_MSG_RESULT([no])
1145 ])
1146 ])
1147
1148
1149 # check if task_struct with rcu memeber
1150 AC_DEFUN([LN_TASK_RCU],
1151 [AC_MSG_CHECKING([if task_struct has a rcu field])
1152 LB_LINUX_TRY_COMPILE([
1153         #include <linux/sched.h>
1154 ],[
1155         struct task_struct tsk;
1156
1157         tsk.rcu.next = NULL;
1158 ],[
1159         AC_MSG_RESULT([yes])
1160         AC_DEFINE(HAVE_TASK_RCU, 1,
1161                   [task_struct has rcu field])
1162 ],[
1163         AC_MSG_RESULT([no])
1164 ])
1165 ])
1166
1167 # LN_TASKLIST_LOCK
1168 # 2.6.18 remove tasklist_lock export
1169 AC_DEFUN([LN_TASKLIST_LOCK],
1170 [LB_CHECK_SYMBOL_EXPORT([tasklist_lock],
1171 [kernel/fork.c],[
1172 AC_DEFINE(HAVE_TASKLIST_LOCK, 1,
1173          [tasklist_lock exported])
1174 ],[
1175 ])
1176 ])
1177
1178 # 2.6.19 API changes
1179 # kmem_cache_destroy(cachep) return void instead of
1180 # int
1181 AC_DEFUN([LN_KMEM_CACHE_DESTROY_INT],
1182 [AC_MSG_CHECKING([kmem_cache_destroy(cachep) return int])
1183 LB_LINUX_TRY_COMPILE([
1184         #include <linux/slab.h>
1185 ],[
1186         int i = kmem_cache_destroy(NULL);
1187 ],[
1188         AC_MSG_RESULT(yes)
1189         AC_DEFINE(HAVE_KMEM_CACHE_DESTROY_INT, 1,
1190                 [kmem_cache_destroy(cachep) return int])
1191 ],[
1192         AC_MSG_RESULT(no)
1193 ])
1194 ])
1195
1196 # 2.6.19 API change
1197 #panic_notifier_list use atomic_notifier operations
1198 #
1199 AC_DEFUN([LN_ATOMIC_PANIC_NOTIFIER],
1200 [AC_MSG_CHECKING([panic_notifier_list is atomic])
1201 LB_LINUX_TRY_COMPILE([
1202         #include <linux/notifier.h>
1203         #include <linux/kernel.h>
1204 ],[
1205         struct atomic_notifier_head panic_notifier_list;
1206 ],[
1207         AC_MSG_RESULT(yes)
1208         AC_DEFINE(HAVE_ATOMIC_PANIC_NOTIFIER, 1,
1209                 [panic_notifier_list is atomic_notifier_head])
1210 ],[
1211         AC_MSG_RESULT(no)
1212 ])
1213 ])
1214
1215 # 2.6.20 API change INIT_WORK use 2 args and not
1216 # store data inside
1217 AC_DEFUN([LN_3ARGS_INIT_WORK],
1218 [AC_MSG_CHECKING([check INIT_WORK want 3 args])
1219 LB_LINUX_TRY_COMPILE([
1220         #include <linux/workqueue.h>
1221 ],[
1222         struct work_struct work;
1223
1224         INIT_WORK(&work, NULL, NULL);
1225 ],[
1226         AC_MSG_RESULT(yes)
1227         AC_DEFINE(HAVE_3ARGS_INIT_WORK, 1,
1228                   [INIT_WORK use 3 args and store data inside])
1229 ],[
1230         AC_MSG_RESULT(no)
1231 ])
1232 ])
1233
1234 # 2.6.21 api change. 'register_sysctl_table' use only one argument,
1235 # instead of more old which need two.
1236 AC_DEFUN([LN_2ARGS_REGISTER_SYSCTL],
1237 [AC_MSG_CHECKING([check register_sysctl_table want 2 args])
1238 LB_LINUX_TRY_COMPILE([
1239         #include <linux/sysctl.h>
1240 ],[
1241         return register_sysctl_table(NULL,0);
1242 ],[
1243         AC_MSG_RESULT(yes)
1244         AC_DEFINE(HAVE_2ARGS_REGISTER_SYSCTL, 1,
1245                   [register_sysctl_table want 2 args])
1246 ],[
1247         AC_MSG_RESULT(no)
1248 ])
1249 ])
1250
1251 # 2.6.21 marks kmem_cache_t deprecated and uses struct kmem_cache
1252 # instead
1253 AC_DEFUN([LN_KMEM_CACHE],
1254 [AC_MSG_CHECKING([check kernel has struct kmem_cache])
1255 tmp_flags="$EXTRA_KCFLAGS"
1256 EXTRA_KCFLAGS="-Werror"
1257 LB_LINUX_TRY_COMPILE([
1258         #include <linux/slab.h>
1259         typedef struct kmem_cache cache_t;
1260 ],[
1261         cache_t *cachep = NULL;
1262
1263         kmem_cache_alloc(cachep, 0);
1264 ],[
1265         AC_MSG_RESULT(yes)
1266         AC_DEFINE(HAVE_KMEM_CACHE, 1,
1267                   [kernel has struct kmem_cache])
1268 ],[
1269         AC_MSG_RESULT(no)
1270 ])
1271 EXTRA_KCFLAGS="$tmp_flags"
1272 ])
1273
1274 # 2.6.23 lost dtor argument
1275 AC_DEFUN([LN_KMEM_CACHE_CREATE_DTOR],
1276 [AC_MSG_CHECKING([check kmem_cache_create has dtor argument])
1277 LB_LINUX_TRY_COMPILE([
1278         #include <linux/slab.h>
1279 ],[
1280         kmem_cache_create(NULL, 0, 0, 0, NULL, NULL);
1281 ],[
1282         AC_MSG_RESULT(yes)
1283         AC_DEFINE(HAVE_KMEM_CACHE_CREATE_DTOR, 1,
1284                   [kmem_cache_create has dtor argument])
1285 ],[
1286         AC_MSG_RESULT(no)
1287 ])
1288 ])
1289
1290 #
1291 # LN_FUNC_DUMP_TRACE
1292 #
1293 # 2.6.23 exports dump_trace() so we can dump_stack() on any task
1294 # 2.6.24 has stacktrace_ops.address with "reliable" parameter
1295 #
1296 AC_DEFUN([LN_FUNC_DUMP_TRACE],
1297 [LB_CHECK_SYMBOL_EXPORT([dump_trace],
1298 [kernel/ksyms.c arch/${LINUX_ARCH%_64}/kernel/traps_64.c arch/x86/kernel/dumpstack_32.c arch/x86/kernel/dumpstack_64.c],[
1299         tmp_flags="$EXTRA_KCFLAGS"
1300         EXTRA_KCFLAGS="-Werror"
1301         AC_MSG_CHECKING([whether we can really use dump_trace])
1302         LB_LINUX_TRY_COMPILE([
1303                 struct task_struct;
1304                 struct pt_regs;
1305                 #include <asm/stacktrace.h>
1306         ],[
1307         ],[
1308                 AC_MSG_RESULT(yes)
1309                 AC_DEFINE(HAVE_DUMP_TRACE, 1, [dump_trace is exported])
1310         ],[
1311                 AC_MSG_RESULT(no)
1312         ],[
1313         ])
1314         AC_MSG_CHECKING([whether print_trace_address has reliable argument])
1315         LB_LINUX_TRY_COMPILE([
1316                 struct task_struct;
1317                 struct pt_regs;
1318                 void print_addr(void *data, unsigned long addr, int reliable);
1319                 #include <asm/stacktrace.h>
1320         ],[
1321                 struct stacktrace_ops ops;
1322
1323                 ops.address = print_addr;
1324         ],[
1325                 AC_MSG_RESULT(yes)
1326                 AC_DEFINE(HAVE_TRACE_ADDRESS_RELIABLE, 1,
1327                           [print_trace_address has reliable argument])
1328         ],[
1329                 AC_MSG_RESULT(no)
1330         ],[
1331         ])
1332         AC_MSG_CHECKING([dump_trace want address])
1333         LB_LINUX_TRY_COMPILE([
1334                 struct task_struct;
1335                 struct pt_regs;
1336                 #include <asm/stacktrace.h>
1337         ],[
1338                 dump_trace(NULL, NULL, NULL, 0, NULL, NULL);
1339         ],[
1340                 AC_MSG_RESULT(yes)
1341                 AC_DEFINE(HAVE_DUMP_TRACE_ADDRESS, 1,
1342                           [dump_trace want address argument])
1343         ],[
1344                 AC_MSG_RESULT(no)
1345         ],[
1346         ])
1347 EXTRA_KCFLAGS="$tmp_flags"
1348 ])
1349 ])
1350
1351 # 2.6.24 request not use real numbers for ctl_name
1352 AC_DEFUN([LN_SYSCTL_UNNUMBERED],
1353 [AC_MSG_CHECKING([for CTL_UNNUMBERED])
1354 LB_LINUX_TRY_COMPILE([
1355         #include <linux/sysctl.h>
1356 ],[
1357         #ifndef CTL_UNNUMBERED
1358         #error CTL_UNNUMBERED not exist in kernel
1359         #endif
1360 ],[
1361         AC_MSG_RESULT(yes)
1362         AC_DEFINE(HAVE_SYSCTL_UNNUMBERED, 1,
1363                   [sysctl has CTL_UNNUMBERED])
1364 ],[
1365         AC_MSG_RESULT(no)
1366 ])
1367 ])
1368
1369 # 2.6.24 lost scatterlist->page
1370 AC_DEFUN([LN_SCATTERLIST_SETPAGE],
1371 [AC_MSG_CHECKING([for exist sg_set_page])
1372 LB_LINUX_TRY_COMPILE([
1373         #include <asm/types.h>
1374         #include <linux/scatterlist.h>
1375 ],[
1376         sg_set_page(NULL,NULL,0,0);
1377 ],[
1378         AC_MSG_RESULT(yes)
1379         AC_DEFINE(HAVE_SCATTERLIST_SETPAGE, 1,
1380                   [struct scatterlist has page member])
1381 ],[
1382         AC_MSG_RESULT(no)
1383 ])
1384 ])
1385
1386 # 2.6.26 use int instead of atomic for sem.count
1387 AC_DEFUN([LN_SEM_COUNT],
1388 [AC_MSG_CHECKING([atomic sem.count])
1389 LB_LINUX_TRY_COMPILE([
1390         #include <asm/semaphore.h>
1391 ],[
1392         struct semaphore s;
1393         
1394         atomic_read(&s.count);
1395 ],[
1396         AC_MSG_RESULT(yes)
1397         AC_DEFINE(HAVE_SEM_COUNT_ATOMIC, 1,
1398                   [semaphore counter is atomic])
1399 ],[
1400         AC_MSG_RESULT(no)
1401 ])
1402 ])
1403
1404 # 2.6.27 have second argument to sock_map_fd
1405 AC_DEFUN([LN_SOCK_MAP_FD_2ARG],
1406 [AC_MSG_CHECKING([sock_map_fd have second argument])
1407 LB_LINUX_TRY_COMPILE([
1408         #include <linux/net.h>
1409 ],[
1410         sock_map_fd(NULL, 0);
1411 ],[
1412         AC_MSG_RESULT(yes)
1413         AC_DEFINE(HAVE_SOCK_MAP_FD_2ARG, 1,
1414                   [sock_map_fd have second argument])
1415 ],[
1416         AC_MSG_RESULT(no)
1417 ])
1418 ])
1419
1420 # since 2.6.27 have linux/cred.h defined current_* macro
1421 AC_DEFUN([LN_HAVE_LINUX_CRED_H],
1422 [LB_CHECK_FILE([$LINUX/include/linux/cred.h],[
1423         AC_DEFINE(HAVE_LINUX_CRED_H, 1,
1424                 [kernel has include/linux/cred.h])
1425 ],[
1426         AC_MSG_RESULT([no])
1427 ])
1428 ])
1429
1430 #
1431 #
1432 # LN_CONFIG_USERSPACE
1433 #
1434 #
1435 AC_DEFUN([LN_CONFIG_USERSPACE],
1436 [
1437 LN_USER__U64_LONG_LONG
1438 ])
1439
1440 #
1441 # LN_STRUCT_CRED_IN_TASK
1442 #
1443 # struct cred was introduced in 2.6.29 to streamline credentials in task struct
1444 #
1445 AC_DEFUN([LN_STRUCT_CRED_IN_TASK],
1446 [AC_MSG_CHECKING([if kernel has struct cred])
1447 LB_LINUX_TRY_COMPILE([
1448         #include <linux/sched.h>
1449 ],[
1450         struct task_struct *tsk = NULL;
1451         tsk->real_cred = NULL;
1452 ],[
1453         AC_MSG_RESULT([yes])
1454         AC_DEFINE(HAVE_STRUCT_CRED, 1, [struct cred found])
1455 ],[
1456         AC_MSG_RESULT([no])
1457 ])
1458 ])
1459
1460 #
1461 # LN_FUNC_UNSHARE_FS_STRUCT
1462 #
1463 # unshare_fs_struct was introduced in 2.6.30 to prevent others to directly
1464 # mess with copy_fs_struct
1465 #
1466 AC_DEFUN([LN_FUNC_UNSHARE_FS_STRUCT],
1467 [AC_MSG_CHECKING([if kernel defines unshare_fs_struct()])
1468 tmp_flags="$EXTRA_KCFLAGS"
1469 EXTRA_KCFLAGS="-Werror"
1470 LB_LINUX_TRY_COMPILE([
1471         #include <linux/sched.h>
1472         #include <linux/fs_struct.h>
1473 ],[
1474         unshare_fs_struct();
1475 ],[
1476         AC_MSG_RESULT([yes])
1477         AC_DEFINE(HAVE_UNSHARE_FS_STRUCT, 1, [unshare_fs_struct found])
1478 ],[
1479         AC_MSG_RESULT([no])
1480 ])
1481 EXTRA_KCFLAGS="$tmp_flags"
1482 ])
1483
1484 # See if sysctl proc_handler wants only 5 arguments (since 2.6.32)
1485 AC_DEFUN([LN_5ARGS_SYSCTL_PROC_HANDLER],
1486 [AC_MSG_CHECKING([if sysctl proc_handler wants 5 args])
1487 LB_LINUX_TRY_COMPILE([
1488         #include <linux/sysctl.h>
1489 ],[
1490         struct ctl_table *table = NULL;
1491         int write = 1;
1492         void __user *buffer = NULL;
1493         size_t *lenp = NULL;
1494         loff_t *ppos = NULL;
1495
1496         proc_handler *proc_handler;
1497         proc_handler(table, write, buffer, lenp, ppos);
1498
1499 ],[
1500         AC_MSG_RESULT(yes)
1501         AC_DEFINE(HAVE_5ARGS_SYSCTL_PROC_HANDLER, 1,
1502                   [sysctl proc_handler wants 5 args])
1503 ],[
1504         AC_MSG_RESULT(no)
1505 ])
1506 ])
1507
1508 #
1509 # LN_HAVE_IS_COMPAT_TASK
1510 #
1511 # Added in 2.6.17, it wasn't until 2.6.29 that all
1512 # Linux architectures have is_compat_task()
1513 #
1514 AC_DEFUN([LN_HAVE_IS_COMPAT_TASK],
1515 [AC_MSG_CHECKING([if is_compat_task() is declared])
1516 LB_LINUX_TRY_COMPILE([
1517         #include <linux/compat.h>
1518 ],[
1519         int i = is_compat_task();
1520 ],[
1521         AC_MSG_RESULT([yes])
1522         AC_DEFINE(HAVE_IS_COMPAT_TASK, 1, [is_compat_task() is available])
1523 ],[
1524         AC_MSG_RESULT([no])
1525 ])
1526 ])
1527
1528 #
1529 # LN_PROG_LINUX
1530 #
1531 # LNet linux kernel checks
1532 #
1533 AC_DEFUN([LN_PROG_LINUX],
1534 [
1535 LN_FUNC_CPU_ONLINE
1536 LN_TYPE_GFP_T
1537 LN_TYPE_CPUMASK_T
1538 LN_CONFIG_AFFINITY
1539 LN_CONFIG_BACKOFF
1540 LN_CONFIG_PANIC_DUMPLOG
1541 LN_CONFIG_QUADRICS
1542 LN_CONFIG_GM
1543 LN_CONFIG_OPENIB
1544 LN_CONFIG_CIB
1545 LN_CONFIG_VIB
1546 LN_CONFIG_IIB
1547 LN_CONFIG_O2IB
1548 LN_CONFIG_RALND
1549 LN_CONFIG_PTLLND
1550 LN_CONFIG_MX
1551
1552 LN_STRUCT_PAGE_LIST
1553 LN_STRUCT_SIGHAND
1554 LN_FUNC_SHOW_TASK
1555 LN_KERN__U64_LONG_LONG
1556 LN_LE_TYPES
1557 LN_TASK_RCU
1558 # 2.6.18
1559 LN_TASKLIST_LOCK
1560 LN_HAVE_IS_COMPAT_TASK
1561 # 2.6.19
1562 LN_KMEM_CACHE_DESTROY_INT
1563 LN_ATOMIC_PANIC_NOTIFIER
1564 # 2.6.20
1565 LN_3ARGS_INIT_WORK
1566 # 2.6.21
1567 LN_2ARGS_REGISTER_SYSCTL
1568 LN_KMEM_CACHE
1569 # 2.6.23
1570 LN_KMEM_CACHE_CREATE_DTOR
1571 # 2.6.24
1572 LN_SYSCTL_UNNUMBERED
1573 LN_SCATTERLIST_SETPAGE
1574 # 2.6.26
1575 LN_SEM_COUNT
1576 # 2.6.27
1577 LN_SOCK_MAP_FD_2ARG
1578 LN_FUNC_DUMP_TRACE
1579 LN_HAVE_LINUX_CRED_H
1580 #2.6.29
1581 LN_STRUCT_CRED_IN_TASK
1582 # 2.6.30
1583 LN_FUNC_UNSHARE_FS_STRUCT
1584 # 2.6.32
1585 LN_5ARGS_SYSCTL_PROC_HANDLER
1586 ])
1587
1588 #
1589 # LN_PROG_DARWIN
1590 #
1591 # Darwin checks
1592 #
1593 AC_DEFUN([LN_PROG_DARWIN],
1594 [LB_DARWIN_CHECK_FUNCS([get_preemption_level])
1595 ])
1596
1597 #
1598 # LN_PATH_DEFAULTS
1599 #
1600 # default paths for installed files
1601 #
1602 AC_DEFUN([LN_PATH_DEFAULTS],
1603 [
1604 ])
1605
1606 #
1607 # LN_CONFIGURE
1608 #
1609 # other configure checks
1610 #
1611 AC_DEFUN([LN_CONFIGURE],
1612 [# lnet/utils/portals.c
1613 AC_CHECK_HEADERS([netdb.h netinet/tcp.h asm/types.h endian.h sys/ioctl.h])
1614 AC_CHECK_FUNCS([gethostbyname socket connect])
1615
1616 # lnet/utils/debug.c
1617 AC_CHECK_HEADERS([linux/version.h])
1618
1619 AC_CHECK_TYPE([spinlock_t],
1620         [AC_DEFINE(HAVE_SPINLOCK_T, 1, [spinlock_t is defined])],
1621         [],
1622         [#include <linux/spinlock.h>])
1623
1624 # lnet/utils/wirecheck.c
1625 AC_CHECK_FUNCS([strnlen])
1626
1627 # --------  Check for required packages  --------------
1628
1629 #
1630 # LC_CONFIG_READLINE
1631 #
1632 # Build with readline
1633 #
1634 AC_MSG_CHECKING([whether to enable readline support])
1635 AC_ARG_ENABLE(readline,
1636         AC_HELP_STRING([--disable-readline],
1637                         [disable readline support]),
1638         [],[enable_readline='yes'])
1639 AC_MSG_RESULT([$enable_readline])
1640
1641 # -------- check for readline if enabled ----
1642 if test x$enable_readline = xyes ; then
1643         LIBS_save="$LIBS"
1644         LIBS="-lncurses $LIBS"
1645         AC_CHECK_LIB([readline],[readline],[
1646         LIBREADLINE="-lreadline -lncurses"
1647         AC_DEFINE(HAVE_LIBREADLINE, 1, [readline library is available])
1648         ],[
1649         LIBREADLINE=""
1650         ])
1651         LIBS="$LIBS_save"
1652 else
1653         LIBREADLINE=""
1654 fi
1655 AC_SUBST(LIBREADLINE)
1656
1657 AC_MSG_CHECKING([if efence debugging support is requested])
1658 AC_ARG_ENABLE(efence,
1659         AC_HELP_STRING([--enable-efence],
1660                         [use efence library]),
1661         [],[enable_efence='no'])
1662 AC_MSG_RESULT([$enable_efence])
1663 if test "$enable_efence" = "yes" ; then
1664         LIBEFENCE="-lefence"
1665         AC_DEFINE(HAVE_LIBEFENCE, 1, [libefence support is requested])
1666 else
1667         LIBEFENCE=""
1668 fi
1669 AC_SUBST(LIBEFENCE)
1670
1671 # -------- enable acceptor libwrap (TCP wrappers) support? -------
1672 AC_MSG_CHECKING([if libwrap support is requested])
1673 AC_ARG_ENABLE([libwrap],
1674         AC_HELP_STRING([--enable-libwrap], [use TCP wrappers]),
1675         [case "${enableval}" in
1676                 yes) enable_libwrap=yes ;;
1677                 no) enable_libwrap=no ;;
1678                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libwrap) ;;
1679         esac],[enable_libwrap=no])
1680 AC_MSG_RESULT([$enable_libwrap])
1681 if test x$enable_libwrap = xyes ; then
1682         LIBWRAP="-lwrap"
1683         AC_DEFINE(HAVE_LIBWRAP, 1, [libwrap support is requested])
1684 else
1685         LIBWRAP=""
1686 fi
1687 AC_SUBST(LIBWRAP)
1688
1689 # -------- check for -lpthread support ----
1690 AC_MSG_CHECKING([whether to use libpthread for lnet library])
1691 AC_ARG_ENABLE([libpthread],
1692         AC_HELP_STRING([--disable-libpthread],
1693                 [disable libpthread]),
1694         [],[enable_libpthread=yes])
1695 if test "$enable_libpthread" = "yes" ; then
1696         AC_CHECK_LIB([pthread], [pthread_create],
1697                 [ENABLE_LIBPTHREAD="yes"],
1698                 [ENABLE_LIBPTHREAD="no"])
1699         if test "$ENABLE_LIBPTHREAD" = "yes" ; then
1700                 AC_MSG_RESULT([$ENABLE_LIBPTHREAD])
1701                 PTHREAD_LIBS="-lpthread"
1702                 AC_DEFINE([HAVE_LIBPTHREAD], 1, [use libpthread])
1703         else
1704                 PTHREAD_LIBS=""
1705                 AC_MSG_RESULT([no libpthread is found])
1706         fi
1707         AC_SUBST(PTHREAD_LIBS)
1708 else
1709         AC_MSG_RESULT([no (disabled explicitly)])
1710         ENABLE_LIBPTHREAD="no"
1711 fi
1712 AC_SUBST(ENABLE_LIBPTHREAD)
1713
1714 # ----------------------------------------
1715 # some tests for catamount-like systems
1716 # ----------------------------------------
1717 AC_ARG_ENABLE([sysio_init],
1718         AC_HELP_STRING([--disable-sysio-init],
1719                 [call sysio init functions when initializing liblustre]),
1720         [],[enable_sysio_init=yes])
1721 AC_MSG_CHECKING([whether to initialize libsysio])
1722 AC_MSG_RESULT([$enable_sysio_init])
1723 if test x$enable_sysio_init != xno ; then
1724         AC_DEFINE([INIT_SYSIO], 1, [call sysio init functions])
1725 fi
1726
1727 AC_ARG_ENABLE([urandom],
1728         AC_HELP_STRING([--disable-urandom],
1729                 [disable use of /dev/urandom for liblustre]),
1730         [],[enable_urandom=yes])
1731 AC_MSG_CHECKING([whether to use /dev/urandom for liblustre])
1732 AC_MSG_RESULT([$enable_urandom])
1733 if test x$enable_urandom != xno ; then
1734         AC_DEFINE([LIBLUSTRE_USE_URANDOM], 1, [use /dev/urandom for random data])
1735 fi
1736
1737 # -------- check for -lcap support ----
1738 if test x$enable_liblustre = xyes ; then
1739         AC_CHECK_LIB([cap], [cap_get_proc],
1740                 [
1741                         CAP_LIBS="-lcap"
1742                         AC_DEFINE([HAVE_LIBCAP], 1, [use libcap])
1743                 ],
1744                 [
1745                         CAP_LIBS=""
1746                 ])
1747         AC_SUBST(CAP_LIBS)
1748
1749 fi
1750
1751 LN_CONFIG_MAX_PAYLOAD
1752 LN_CONFIG_UPTLLND
1753 LN_CONFIG_USOCKLND
1754 ])
1755
1756 #
1757 # LN_CONDITIONALS
1758 #
1759 # AM_CONDITOINAL defines for lnet
1760 #
1761 AC_DEFUN([LN_CONDITIONALS],
1762 [AM_CONDITIONAL(BUILD_QSWLND, test x$QSWLND = "xqswlnd")
1763 AM_CONDITIONAL(BUILD_GMLND, test x$GMLND = "xgmlnd")
1764 AM_CONDITIONAL(BUILD_MXLND, test x$MXLND = "xmxlnd")
1765 AM_CONDITIONAL(BUILD_O2IBLND, test x$O2IBLND = "xo2iblnd")
1766 AM_CONDITIONAL(BUILD_OPENIBLND, test x$OPENIBLND = "xopeniblnd")
1767 AM_CONDITIONAL(BUILD_CIBLND, test x$CIBLND = "xciblnd")
1768 AM_CONDITIONAL(BUILD_IIBLND, test x$IIBLND = "xiiblnd")
1769 AM_CONDITIONAL(BUILD_VIBLND, test x$VIBLND = "xviblnd")
1770 AM_CONDITIONAL(BUILD_RALND, test x$RALND = "xralnd")
1771 AM_CONDITIONAL(BUILD_PTLLND, test x$PTLLND = "xptllnd")
1772 AM_CONDITIONAL(BUILD_UPTLLND, test x$UPTLLND = "xptllnd")
1773 AM_CONDITIONAL(BUILD_USOCKLND, test x$USOCKLND = "xusocklnd")
1774 ])
1775
1776 #
1777 # LN_CONFIG_FILES
1778 #
1779 # files that should be generated with AC_OUTPUT
1780 #
1781 AC_DEFUN([LN_CONFIG_FILES],
1782 [AC_CONFIG_FILES([
1783 lnet/Kernelenv
1784 lnet/Makefile
1785 lnet/autoMakefile
1786 lnet/autoconf/Makefile
1787 lnet/doc/Makefile
1788 lnet/include/Makefile
1789 lnet/include/libcfs/Makefile
1790 lnet/include/libcfs/linux/Makefile
1791 lnet/include/lnet/Makefile
1792 lnet/include/lnet/linux/Makefile
1793 lnet/klnds/Makefile
1794 lnet/klnds/autoMakefile
1795 lnet/klnds/gmlnd/Makefile
1796 lnet/klnds/mxlnd/autoMakefile
1797 lnet/klnds/mxlnd/Makefile
1798 lnet/klnds/gmlnd/autoMakefile
1799 lnet/klnds/openiblnd/Makefile
1800 lnet/klnds/openiblnd/autoMakefile
1801 lnet/klnds/o2iblnd/Makefile
1802 lnet/klnds/o2iblnd/autoMakefile
1803 lnet/klnds/ciblnd/Makefile
1804 lnet/klnds/ciblnd/autoMakefile
1805 lnet/klnds/iiblnd/Makefile
1806 lnet/klnds/iiblnd/autoMakefile
1807 lnet/klnds/viblnd/Makefile
1808 lnet/klnds/viblnd/autoMakefile
1809 lnet/klnds/qswlnd/Makefile
1810 lnet/klnds/qswlnd/autoMakefile
1811 lnet/klnds/ralnd/Makefile
1812 lnet/klnds/ralnd/autoMakefile
1813 lnet/klnds/socklnd/Makefile
1814 lnet/klnds/socklnd/autoMakefile
1815 lnet/klnds/ptllnd/Makefile
1816 lnet/klnds/ptllnd/autoMakefile
1817 lnet/libcfs/Makefile
1818 lnet/libcfs/autoMakefile
1819 lnet/libcfs/linux/Makefile
1820 lnet/lnet/Makefile
1821 lnet/lnet/autoMakefile
1822 lnet/selftest/Makefile
1823 lnet/selftest/autoMakefile
1824 lnet/ulnds/Makefile
1825 lnet/ulnds/autoMakefile
1826 lnet/ulnds/socklnd/Makefile
1827 lnet/ulnds/ptllnd/Makefile
1828 lnet/utils/Makefile
1829 lnet/include/libcfs/darwin/Makefile
1830 lnet/include/libcfs/winnt/Makefile
1831 lnet/include/lnet/darwin/Makefile
1832 lnet/libcfs/darwin/Makefile
1833 ])
1834 ])
1835
1836 #
1837 # LIBCFS stub macros. (These are defined in the libcfs module on HEAD))
1838 #
1839 AC_DEFUN([LIBCFS_PATH_DEFAULTS], [])
1840 AC_DEFUN([LIBCFS_PROG_LINUX], [])
1841 AC_DEFUN([LIBCFS_CONDITIONALS], [])
1842 AC_DEFUN([LIBCFS_CONFIGURE], [])
1843 AC_DEFUN([LIBCFS_CONFIG_FILES], [])