2 # LN_CONFIG_MAX_PAYLOAD
4 # configure maximum payload
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]),
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)"
17 LNET_MAX_PAYLOAD="LNET_MTU"
19 AC_DEFINE_UNQUOTED(LNET_MAX_PAYLOAD, $LNET_MAX_PAYLOAD,
24 # LN_CHECK_GCC_VERSION
26 # Check compiler version
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"
33 awk -F. '{printf "%d\n", (($ 1)*100+($ 2))*100+($ 3)}'
35 if test -z "$PTL_CC_VERSION" -o \
36 `echo $PTL_CC_VERSION | v2n` -ge `echo $PTL_MIN_CC_VERSION | v2n`; then
39 AC_MSG_RESULT([Buggy compiler found])
40 AC_MSG_ERROR([Need gcc version >= $PTL_MIN_CC_VERSION])
47 # whether to enable various libcfs debugs (CDEBUG, ENTRY/EXIT, LASSERT, etc.)
49 AC_DEFUN([LN_CONFIG_CDEBUG],
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])
60 AC_DEFINE(CDEBUG_ENABLED, 0, [disable libcfs CDEBUG, CWARN])
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])
72 AC_DEFINE(CDEBUG_ENTRY_EXIT, 0, [disable libcfs ENTRY/EXIT])
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])
89 # check if cpu affinity is available/wanted
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'])
97 AC_MSG_CHECKING([for CPU affinity support])
98 if test x$enable_affinity = xno ; then
99 AC_MSG_RESULT([no (by request)])
101 LB_LINUX_TRY_COMPILE([
102 #include <linux/sched.h>
104 struct task_struct t;
110 set_cpus_allowed(&t, m);
112 AC_DEFINE(CPU_AFFINITY, 1, [kernel has cpu affinity support])
115 AC_MSG_RESULT([no (no kernel support)])
123 # configure support for Portals
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]),
131 case $with_portals in
134 *) PORTALS="${with_portals}"
142 if test $ENABLEPORTALS -eq 0; then
144 elif test ! \( -f ${PORTALS}/include/portals/p30.h \); then
146 AC_MSG_ERROR([bad --with-portals path])
148 AC_MSG_RESULT([$PORTALS])
149 PTLLNDCPPFLAGS="-I${PORTALS}/include"
151 AC_SUBST(PTLLNDCPPFLAGS)
157 # check if tunable tcp backoff is available/wanted
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)])
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])
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])
176 AC_MSG_RESULT([no (no kernel support)])
182 # LN_CONFIG_PANIC_DUMPLOG
184 # check if tunable panic_dumplog is wanted
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)])
203 # configure support for Portals LND
205 AC_DEFUN([LN_CONFIG_PTLLND],
207 if test -z "$ENABLEPORTALS"; then
211 AC_MSG_CHECKING([whether to build the kernel portals LND])
214 if test $ENABLEPORTALS -ne 0; then
226 # configure support for Portals LND
228 AC_DEFUN([LN_CONFIG_UPTLLND],
230 if test -z "$ENABLEPORTALS"; then
234 AC_MSG_CHECKING([whether to build the userspace portals LND])
237 if test $ENABLEPORTALS -ne 0; then
249 # configure support for userspace TCP/IP LND
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],
256 [],[enable_usocklnd='yes'])
258 if test x$enable_usocklnd = xyes ; then
259 if test "$ENABLE_LIBPTHREAD" = "yes" ; then
263 AC_MSG_RESULT([no (libpthread not present or disabled)])
267 AC_MSG_RESULT([no (disabled explicitly)])
276 # check if quadrics support is in this kernel
278 AC_DEFUN([LN_CONFIG_QUADRICS],
279 [AC_MSG_CHECKING([for QsNet sources])
281 AC_HELP_STRING([--with-qsnet=path],
282 [set path to qsnet source (default=$LINUX)]),
285 AC_MSG_RESULT([$QSNET])
287 AC_MSG_CHECKING([if quadrics kernel headers are present])
288 if test -d $QSNET/drivers/net/qsnet ; then
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"
296 AC_MSG_RESULT([not supported])
297 AC_MSG_ERROR([Need multirail EKC])
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.])
314 AC_SUBST(QSWCPPFLAGS)
321 # check if GM support is available
323 AC_DEFUN([LN_CONFIG_GM],[
324 AC_MSG_CHECKING([whether to enable GM support])
326 AC_HELP_STRING([--with-gm=path-to-gm-source-tree],
327 [build gmlnd against path]),
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]),
343 GM_INSTALL=$with_gm_install
347 if test $ENABLE_GM -eq 0; then
353 GMCPPFLAGS="-I$GM_SRC/include -I$GM_SRC/drivers -I$GM_SRC/drivers/linux/gm"
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"
359 AC_MSG_ERROR([Cant find GM libraries under $GM_INSTALL])
362 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
363 EXTRA_KCFLAGS="$GMCPPFLAGS -DGM_KERNEL $EXTRA_KCFLAGS"
365 AC_MSG_CHECKING([that code using GM compiles with given path])
366 LB_LINUX_TRY_COMPILE([
367 #define GM_STRONG_TYPES 1
372 #include "gm_internal.h"
374 struct gm_port *port = NULL;
375 gm_recv_event_t *rxevent = gm_blocking_receive_no_spin(port);
381 AC_MSG_ERROR([Bad --with-gm path])
384 AC_MSG_CHECKING([that GM has gm_register_memory_ex_phys()])
385 LB_LINUX_TRY_COMPILE([
386 #define GM_STRONG_TYPES 1
391 #include "gm_internal.h"
394 struct gm_port *port = NULL;
398 gmrc = gm_register_memory_ex_phys(port, phys, 100, pvma);
404 Please patch the GM sources as follows...
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()])
411 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
422 AC_DEFUN([LN_CONFIG_MX],
423 [AC_MSG_CHECKING([whether to enable Myrinet MX support])
427 AC_HELP_STRING([--with-mx=path],
428 [build mxlnd against path]),
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
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]);;
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([
461 #include <mx_extensions.h>
462 #include <myriexpress.h>
466 mx_request_t request;
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);
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]);;
489 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
501 AC_DEFUN([LN_CONFIG_O2IB],[
502 AC_MSG_CHECKING([whether to enable OpenIB gen2 support])
505 AC_HELP_STRING([--with-o2ib=path],
506 [build o2iblnd against path]),
509 yes) O2IBPATHS="$LINUX $LINUX/drivers/infiniband"
514 *) O2IBPATHS=$with_o2ib
519 O2IBPATHS="$LINUX $LINUX/drivers/infiniband"
522 if test $ENABLEO2IB -eq 0; then
523 AC_MSG_RESULT([disabled])
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
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%-*}])
542 if ! $o2ib_found; then
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]);;
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"
556 LB_LINUX_TRY_COMPILE([
557 #include <linux/version.h>
558 #include <linux/pci.h>
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>
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;
574 cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP);
575 return PTR_ERR(cm_id);
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]);;
590 # we know at this point that the found OFED source is good
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
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
606 touch $PWD/$SYMVERFILE.old
608 cat $PWD/$SYMVERFILE.old $O2IBPATH/$O2IB_SYMVER > $PWD/$SYMVERFILE
609 rm $PWD/$SYMVERFILE.old
611 AC_MSG_ERROR([an external source tree was specified for o2iblnd however I could not find a $O2IBPATH/Module.symvers there])
616 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
620 AC_SUBST(EXTRA_LNET_INCLUDE)
621 AC_SUBST(O2IBCPPFLAGS)
628 # check for OpenIB in the kernel
629 AC_DEFUN([LN_CONFIG_OPENIB],[
630 AC_MSG_CHECKING([whether to enable OpenIB support])
632 OPENIBPATH="$LINUX/drivers/infiniband"
633 AC_ARG_WITH([openib],
634 AC_HELP_STRING([--with-openib=path],
635 [build openiblnd against path]),
642 *) OPENIBPATH="$with_openib"
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
655 case $ENABLEOPENIB in
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]);;
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]);;
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>
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;
686 OPENIBLND="openiblnd"
689 case $ENABLEOPENIB in
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]);;
698 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
700 AC_SUBST(OPENIBCPPFLAGS)
707 AC_DEFUN([LN_CONFIG_CIB],[
708 AC_MSG_CHECKING([whether to enable Cisco/TopSpin IB support])
713 AC_HELP_STRING([--with-cib=path],
714 [build ciblnd against path]),
717 no) AC_MSG_RESULT([no]);;
718 *) CIBPATH="$with_cib"
719 if test -d "$CIBPATH"; then
723 AC_MSG_ERROR([No directory $CIBPATH])
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>
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;
750 AC_MSG_ERROR([can't compile ciblnd with given path])
753 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
755 AC_SUBST(CIBCPPFLAGS)
762 # check for infinicon infiniband support
764 AC_DEFUN([LN_CONFIG_IIB],[
765 AC_MSG_CHECKING([whether to enable Infinicon support])
767 IIBPATH="/usr/include"
769 AC_HELP_STRING([--with-iib=path],
770 [build iiblnd against path]),
777 *) IIBPATH="${with_iib}/include"
784 if test $ENABLEIIB -eq 0; then
785 AC_MSG_RESULT([disabled])
786 elif test ! \( -f ${IIBPATH}/linux/iba/ibt.h \); then
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]);;
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"
800 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
801 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $IIBCPPFLAGS"
802 LB_LINUX_TRY_COMPILE([
803 #include <linux/iba/ibt.h>
805 IBT_INTERFACE_UNION interfaces;
808 rc = IbtGetInterfaceByVersion(IBT_INTERFACE_VERSION_2,
811 return rc == FSUCCESS ? 0 : 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]);;
826 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
828 AC_SUBST(IIBCPPFLAGS)
835 # check for Voltaire infiniband support
837 AC_DEFUN([LN_CONFIG_VIB],
838 [AC_MSG_CHECKING([whether to enable Voltaire IB support])
841 AC_HELP_STRING([--with-vib=path],
842 [build viblnd against path]),
845 no) AC_MSG_RESULT([no]);;
846 *) VIBPATH="${with_vib}/src/nvigor/ib-code"
847 if test -d "$with_vib" -a -d "$VIBPATH"; then
851 AC_MSG_ERROR([No directory $VIBPATH])
857 if test -z "$VIBPATH"; then
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>
870 #ifdef __LITTLE_ENDIAN
881 ibat_arp_data_t arp_data;
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,
894 AC_MSG_ERROR([can't compile viblnd with given path])
896 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
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>
909 #ifdef __LITTLE_ENDIAN
919 return &sg.v_address[3] == NULL;
922 VIBCPPFLAGS="$VIBCPPFLAGS -DIBNAL_VOIDSTAR_SGADDR=1"
926 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
928 AC_SUBST(VIBCPPFLAGS)
935 # check whether to use the RapidArray lnd
937 AC_DEFUN([LN_CONFIG_RALND],
939 AC_MSG_CHECKING([if RapidArray kernel headers are present])
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>
949 RAP_PVOID dev_handle;
951 rc = RapkGetDeviceByIndex(0, NULL, &dev_handle);
953 return rc == RAP_SUCCESS ? 0 : 1;
962 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
968 # LN_STRUCT_PAGE_LIST
970 # 2.6.4 no longer has page->list
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>
981 AC_DEFINE(HAVE_PAGE_LIST, 1, [struct page has a list field])
990 # red hat 2.4 adds sighand to struct task_struct
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>
997 struct task_struct p;
1000 AC_DEFINE(CONFIG_RH_2_4_20, 1, [this kernel contains Red Hat 2.4.20 patches])
1001 AC_MSG_RESULT([yes])
1008 # LN_FUNC_CPU_ONLINE
1010 # cpu_online is different in rh 2.4, vanilla 2.4, and 2.6
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>
1019 AC_MSG_RESULT([yes])
1020 AC_DEFINE(HAVE_CPU_ONLINE, 1, [cpu_online found])
1029 # check if gfp_t is typedef-ed
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>
1036 return sizeof(gfp_t);
1038 AC_MSG_RESULT([yes])
1039 AC_DEFINE(HAVE_GFP_T, 1, [gfp_t found])
1048 # same goes for cpumask_t
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>
1055 return sizeof (cpumask_t);
1057 AC_MSG_RESULT([yes])
1058 AC_DEFINE(HAVE_CPUMASK_T, 1, [cpumask_t found])
1067 # we export show_task(), but not all kernels have it (yet)
1068 # also check sched_show_task() in here, since 2.6.27.
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])
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])
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>
1091 unsigned long long *data1;
1092 __u64 *data2 = NULL;
1096 AC_MSG_RESULT([yes])
1097 AC_DEFINE(HAVE_KERN__U64_LONG_LONG, 1,
1098 [kernel __u64 is long long type])
1102 EXTRA_KCFLAGS="$tmp_flags"
1105 # check userland __u64 type
1106 AC_DEFUN([LN_USER__U64_LONG_LONG],
1107 [AC_MSG_CHECKING([userspace __u64 is long long type])
1109 CFLAGS="$CFLAGS -Werror"
1112 #include <linux/types.h>
1113 #include <linux/stddef.h>
1115 unsigned long long *data1;
1116 __u64 *data2 = NULL;
1122 AC_MSG_RESULT([yes])
1123 AC_DEFINE(HAVE_USER__U64_LONG_LONG, 1,
1124 [userspace __u64 is long long type])
1131 # check userland size_t type
1132 AC_DEFUN([LN_SIZE_T_LONG],
1133 [AC_MSG_CHECKING([size_t is unsigned long type])
1135 CFLAGS="$CFLAGS -Werror"
1138 #include <linux/types.h>
1139 #include <linux/stddef.h>
1141 unsigned long *data1;
1142 size_t *data2 = NULL;
1148 AC_MSG_RESULT([yes])
1149 AC_DEFINE(HAVE_SIZE_T_LONG, 1,
1150 [size_t is long type])
1157 AC_DEFUN([LN_SSIZE_T_LONG],
1158 [AC_MSG_CHECKING([ssize_t is signed long type])
1160 CFLAGS="$CFLAGS -Werror"
1163 #include <linux/types.h>
1164 #include <linux/stddef.h>
1167 ssize_t *data2 = NULL;
1173 AC_MSG_RESULT([yes])
1174 AC_DEFINE(HAVE_SSIZE_T_LONG, 1,
1175 [ssize_t is long type])
1183 # check kernel __le16, __le32 types
1184 AC_DEFUN([LN_LE_TYPES],
1185 [AC_MSG_CHECKING([__le16 and __le32 types are defined])
1186 LB_LINUX_TRY_COMPILE([
1187 #include <linux/types.h>
1192 AC_MSG_RESULT([yes])
1193 AC_DEFINE(HAVE_LE_TYPES, 1,
1194 [__le16 and __le32 types are defined])
1201 # check if task_struct with rcu memeber
1202 AC_DEFUN([LN_TASK_RCU],
1203 [AC_MSG_CHECKING([if task_struct has a rcu field])
1204 LB_LINUX_TRY_COMPILE([
1205 #include <linux/sched.h>
1207 struct task_struct tsk;
1209 tsk.rcu.next = NULL;
1211 AC_MSG_RESULT([yes])
1212 AC_DEFINE(HAVE_TASK_RCU, 1,
1213 [task_struct has rcu field])
1220 # 2.6.18 remove tasklist_lock export
1221 AC_DEFUN([LN_TASKLIST_LOCK],
1222 [LB_CHECK_SYMBOL_EXPORT([tasklist_lock],
1224 AC_DEFINE(HAVE_TASKLIST_LOCK, 1,
1225 [tasklist_lock exported])
1230 # 2.6.19 API changes
1231 # kmem_cache_destroy(cachep) return void instead of
1233 AC_DEFUN([LN_KMEM_CACHE_DESTROY_INT],
1234 [AC_MSG_CHECKING([kmem_cache_destroy(cachep) return int])
1235 LB_LINUX_TRY_COMPILE([
1236 #include <linux/slab.h>
1238 int i = kmem_cache_destroy(NULL);
1241 AC_DEFINE(HAVE_KMEM_CACHE_DESTROY_INT, 1,
1242 [kmem_cache_destroy(cachep) return int])
1249 #panic_notifier_list use atomic_notifier operations
1251 AC_DEFUN([LN_ATOMIC_PANIC_NOTIFIER],
1252 [AC_MSG_CHECKING([panic_notifier_list is atomic])
1253 LB_LINUX_TRY_COMPILE([
1254 #include <linux/notifier.h>
1255 #include <linux/kernel.h>
1257 struct atomic_notifier_head panic_notifier_list;
1260 AC_DEFINE(HAVE_ATOMIC_PANIC_NOTIFIER, 1,
1261 [panic_notifier_list is atomic_notifier_head])
1267 # 2.6.20 API change INIT_WORK use 2 args and not
1269 AC_DEFUN([LN_3ARGS_INIT_WORK],
1270 [AC_MSG_CHECKING([check INIT_WORK want 3 args])
1271 LB_LINUX_TRY_COMPILE([
1272 #include <linux/workqueue.h>
1274 struct work_struct work;
1276 INIT_WORK(&work, NULL, NULL);
1279 AC_DEFINE(HAVE_3ARGS_INIT_WORK, 1,
1280 [INIT_WORK use 3 args and store data inside])
1286 # 2.6.21 api change. 'register_sysctl_table' use only one argument,
1287 # instead of more old which need two.
1288 AC_DEFUN([LN_2ARGS_REGISTER_SYSCTL],
1289 [AC_MSG_CHECKING([check register_sysctl_table want 2 args])
1290 LB_LINUX_TRY_COMPILE([
1291 #include <linux/sysctl.h>
1293 return register_sysctl_table(NULL,0);
1296 AC_DEFINE(HAVE_2ARGS_REGISTER_SYSCTL, 1,
1297 [register_sysctl_table want 2 args])
1303 # 2.6.21 marks kmem_cache_t deprecated and uses struct kmem_cache
1305 AC_DEFUN([LN_KMEM_CACHE],
1306 [AC_MSG_CHECKING([check kernel has struct kmem_cache])
1307 tmp_flags="$EXTRA_KCFLAGS"
1308 EXTRA_KCFLAGS="-Werror"
1309 LB_LINUX_TRY_COMPILE([
1310 #include <linux/slab.h>
1311 typedef struct kmem_cache cache_t;
1313 cache_t *cachep = NULL;
1315 kmem_cache_alloc(cachep, 0);
1318 AC_DEFINE(HAVE_KMEM_CACHE, 1,
1319 [kernel has struct kmem_cache])
1323 EXTRA_KCFLAGS="$tmp_flags"
1326 # 2.6.23 lost dtor argument
1327 AC_DEFUN([LN_KMEM_CACHE_CREATE_DTOR],
1328 [AC_MSG_CHECKING([check kmem_cache_create has dtor argument])
1329 LB_LINUX_TRY_COMPILE([
1330 #include <linux/slab.h>
1332 kmem_cache_create(NULL, 0, 0, 0, NULL, NULL);
1335 AC_DEFINE(HAVE_KMEM_CACHE_CREATE_DTOR, 1,
1336 [kmem_cache_create has dtor argument])
1343 # LN_FUNC_DUMP_TRACE
1345 # 2.6.23 exports dump_trace() so we can dump_stack() on any task
1346 # 2.6.24 has stacktrace_ops.address with "reliable" parameter
1348 AC_DEFUN([LN_FUNC_DUMP_TRACE],
1349 [LB_CHECK_SYMBOL_EXPORT([dump_trace],
1350 [kernel/ksyms.c arch/${LINUX_ARCH%_64}/kernel/traps_64.c arch/x86/kernel/dumpstack_32.c arch/x86/kernel/dumpstack_64.c],[
1351 tmp_flags="$EXTRA_KCFLAGS"
1352 EXTRA_KCFLAGS="-Werror"
1353 AC_MSG_CHECKING([whether we can really use dump_trace])
1354 LB_LINUX_TRY_COMPILE([
1357 #include <asm/stacktrace.h>
1361 AC_DEFINE(HAVE_DUMP_TRACE, 1, [dump_trace is exported])
1366 AC_MSG_CHECKING([whether print_trace_address has reliable argument])
1367 LB_LINUX_TRY_COMPILE([
1370 void print_addr(void *data, unsigned long addr, int reliable);
1371 #include <asm/stacktrace.h>
1373 struct stacktrace_ops ops;
1375 ops.address = print_addr;
1378 AC_DEFINE(HAVE_TRACE_ADDRESS_RELIABLE, 1,
1379 [print_trace_address has reliable argument])
1384 EXTRA_KCFLAGS="$tmp_flags"
1388 # 2.6.24 request not use real numbers for ctl_name
1389 AC_DEFUN([LN_SYSCTL_UNNUMBERED],
1390 [AC_MSG_CHECKING([for CTL_UNNUMBERED])
1391 LB_LINUX_TRY_COMPILE([
1392 #include <linux/sysctl.h>
1394 #ifndef CTL_UNNUMBERED
1395 #error CTL_UNNUMBERED not exist in kernel
1399 AC_DEFINE(HAVE_SYSCTL_UNNUMBERED, 1,
1400 [sysctl has CTL_UNNUMBERED])
1406 # 2.6.24 lost scatterlist->page
1407 AC_DEFUN([LN_SCATTERLIST_SETPAGE],
1408 [AC_MSG_CHECKING([for exist sg_set_page])
1409 LB_LINUX_TRY_COMPILE([
1410 #include <asm/types.h>
1411 #include <linux/scatterlist.h>
1413 sg_set_page(NULL,NULL,0,0);
1416 AC_DEFINE(HAVE_SCATTERLIST_SETPAGE, 1,
1417 [struct scatterlist has page member])
1423 # 2.6.26 use int instead of atomic for sem.count
1424 AC_DEFUN([LN_SEM_COUNT],
1425 [AC_MSG_CHECKING([atomic sem.count])
1426 LB_LINUX_TRY_COMPILE([
1427 #include <asm/semaphore.h>
1431 atomic_read(&s.count);
1434 AC_DEFINE(HAVE_SEM_COUNT_ATOMIC, 1,
1435 [semaphore counter is atomic])
1441 # 2.6.27 have second argument to sock_map_fd
1442 AC_DEFUN([LN_SOCK_MAP_FD_2ARG],
1443 [AC_MSG_CHECKING([sock_map_fd have second argument])
1444 LB_LINUX_TRY_COMPILE([
1445 #include <linux/net.h>
1447 sock_map_fd(NULL, 0);
1450 AC_DEFINE(HAVE_SOCK_MAP_FD_2ARG, 1,
1451 [sock_map_fd have second argument])
1457 # since 2.6.27 have linux/cred.h defined current_* macro
1458 AC_DEFUN([LN_HAVE_LINUX_CRED_H],
1459 [LB_CHECK_FILE([$LINUX/include/linux/cred.h],[
1460 AC_DEFINE(HAVE_LINUX_CRED_H, 1,
1461 [kernel has include/linux/cred.h])
1469 # LN_CONFIG_USERSPACE
1472 AC_DEFUN([LN_CONFIG_USERSPACE],
1474 LN_USER__U64_LONG_LONG
1478 # LN_STRUCT_CRED_IN_TASK
1480 # struct cred was introduced in 2.6.29 to streamline credentials in task struct
1482 AC_DEFUN([LN_STRUCT_CRED_IN_TASK],
1483 [AC_MSG_CHECKING([if kernel has struct cred])
1484 LB_LINUX_TRY_COMPILE([
1485 #include <linux/sched.h>
1487 struct task_struct *tsk = NULL;
1488 tsk->real_cred = NULL;
1490 AC_MSG_RESULT([yes])
1491 AC_DEFINE(HAVE_STRUCT_CRED, 1, [struct cred found])
1498 # LN_FUNC_UNSHARE_FS_STRUCT
1500 # unshare_fs_struct was introduced in 2.6.30 to prevent others to directly
1501 # mess with copy_fs_struct
1503 AC_DEFUN([LN_FUNC_UNSHARE_FS_STRUCT],
1504 [AC_MSG_CHECKING([if kernel defines unshare_fs_struct()])
1505 tmp_flags="$EXTRA_KCFLAGS"
1506 EXTRA_KCFLAGS="-Werror"
1507 LB_LINUX_TRY_COMPILE([
1508 #include <linux/sched.h>
1509 #include <linux/fs_struct.h>
1511 unshare_fs_struct();
1513 AC_MSG_RESULT([yes])
1514 AC_DEFINE(HAVE_UNSHARE_FS_STRUCT, 1, [unshare_fs_struct found])
1518 EXTRA_KCFLAGS="$tmp_flags"
1521 # See if sysctl proc_handler wants only 5 arguments (since 2.6.32)
1522 AC_DEFUN([LN_5ARGS_SYSCTL_PROC_HANDLER],
1523 [AC_MSG_CHECKING([if sysctl proc_handler wants 5 args])
1524 LB_LINUX_TRY_COMPILE([
1525 #include <linux/sysctl.h>
1527 struct ctl_table *table = NULL;
1529 void __user *buffer = NULL;
1530 size_t *lenp = NULL;
1531 loff_t *ppos = NULL;
1533 proc_handler *proc_handler;
1534 proc_handler(table, write, buffer, lenp, ppos);
1538 AC_DEFINE(HAVE_5ARGS_SYSCTL_PROC_HANDLER, 1,
1539 [sysctl proc_handler wants 5 args])
1546 # LN_HAVE_IS_COMPAT_TASK
1548 # Added in 2.6.17, it wasn't until 2.6.29 that all
1549 # Linux architectures have is_compat_task()
1551 AC_DEFUN([LN_HAVE_IS_COMPAT_TASK],
1552 [AC_MSG_CHECKING([if is_compat_task() is declared])
1553 LB_LINUX_TRY_COMPILE([
1554 #include <linux/compat.h>
1556 int i = is_compat_task();
1558 AC_MSG_RESULT([yes])
1559 AC_DEFINE(HAVE_IS_COMPAT_TASK, 1, [is_compat_task() is available])
1568 # LNet linux kernel checks
1570 AC_DEFUN([LN_PROG_LINUX],
1577 LN_CONFIG_PANIC_DUMPLOG
1592 LN_KERN__U64_LONG_LONG
1599 LN_HAVE_IS_COMPAT_TASK
1601 LN_KMEM_CACHE_DESTROY_INT
1602 LN_ATOMIC_PANIC_NOTIFIER
1606 LN_2ARGS_REGISTER_SYSCTL
1609 LN_KMEM_CACHE_CREATE_DTOR
1611 LN_SYSCTL_UNNUMBERED
1612 LN_SCATTERLIST_SETPAGE
1618 LN_HAVE_LINUX_CRED_H
1620 LN_STRUCT_CRED_IN_TASK
1622 LN_FUNC_UNSHARE_FS_STRUCT
1624 LN_5ARGS_SYSCTL_PROC_HANDLER
1632 AC_DEFUN([LN_PROG_DARWIN],
1633 [LB_DARWIN_CHECK_FUNCS([get_preemption_level])
1639 # default paths for installed files
1641 AC_DEFUN([LN_PATH_DEFAULTS],
1648 # other configure checks
1650 AC_DEFUN([LN_CONFIGURE],
1651 [# lnet/utils/portals.c
1652 AC_CHECK_HEADERS([netdb.h netinet/tcp.h asm/types.h endian.h sys/ioctl.h])
1653 AC_CHECK_FUNCS([gethostbyname socket connect])
1655 # lnet/utils/debug.c
1656 AC_CHECK_HEADERS([linux/version.h])
1658 AC_CHECK_TYPE([spinlock_t],
1659 [AC_DEFINE(HAVE_SPINLOCK_T, 1, [spinlock_t is defined])],
1661 [#include <linux/spinlock.h>])
1663 # lnet/utils/wirecheck.c
1664 AC_CHECK_FUNCS([strnlen])
1666 # -------- Check for required packages --------------
1669 # LC_CONFIG_READLINE
1671 # Build with readline
1673 AC_MSG_CHECKING([whether to enable readline support])
1674 AC_ARG_ENABLE(readline,
1675 AC_HELP_STRING([--disable-readline],
1676 [disable readline support]),
1677 [],[enable_readline='yes'])
1678 AC_MSG_RESULT([$enable_readline])
1680 # -------- check for readline if enabled ----
1681 if test x$enable_readline = xyes ; then
1683 LIBS="-lncurses $LIBS"
1684 AC_CHECK_LIB([readline],[readline],[
1685 LIBREADLINE="-lreadline -lncurses"
1686 AC_DEFINE(HAVE_LIBREADLINE, 1, [readline library is available])
1694 AC_SUBST(LIBREADLINE)
1696 AC_MSG_CHECKING([if efence debugging support is requested])
1697 AC_ARG_ENABLE(efence,
1698 AC_HELP_STRING([--enable-efence],
1699 [use efence library]),
1700 [],[enable_efence='no'])
1701 AC_MSG_RESULT([$enable_efence])
1702 if test "$enable_efence" = "yes" ; then
1703 LIBEFENCE="-lefence"
1704 AC_DEFINE(HAVE_LIBEFENCE, 1, [libefence support is requested])
1710 # -------- enable acceptor libwrap (TCP wrappers) support? -------
1711 AC_MSG_CHECKING([if libwrap support is requested])
1712 AC_ARG_ENABLE([libwrap],
1713 AC_HELP_STRING([--enable-libwrap], [use TCP wrappers]),
1714 [case "${enableval}" in
1715 yes) enable_libwrap=yes ;;
1716 no) enable_libwrap=no ;;
1717 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libwrap) ;;
1718 esac],[enable_libwrap=no])
1719 AC_MSG_RESULT([$enable_libwrap])
1720 if test x$enable_libwrap = xyes ; then
1722 AC_DEFINE(HAVE_LIBWRAP, 1, [libwrap support is requested])
1728 # -------- check for -lpthread support ----
1729 AC_MSG_CHECKING([whether to use libpthread for lnet library])
1730 AC_ARG_ENABLE([libpthread],
1731 AC_HELP_STRING([--disable-libpthread],
1732 [disable libpthread]),
1733 [],[enable_libpthread=yes])
1734 if test "$enable_libpthread" = "yes" ; then
1735 AC_CHECK_LIB([pthread], [pthread_create],
1736 [ENABLE_LIBPTHREAD="yes"],
1737 [ENABLE_LIBPTHREAD="no"])
1738 if test "$ENABLE_LIBPTHREAD" = "yes" ; then
1739 AC_MSG_RESULT([$ENABLE_LIBPTHREAD])
1740 PTHREAD_LIBS="-lpthread"
1741 AC_DEFINE([HAVE_LIBPTHREAD], 1, [use libpthread])
1744 AC_MSG_RESULT([no libpthread is found])
1746 AC_SUBST(PTHREAD_LIBS)
1748 AC_MSG_RESULT([no (disabled explicitly)])
1749 ENABLE_LIBPTHREAD="no"
1751 AC_SUBST(ENABLE_LIBPTHREAD)
1753 # ----------------------------------------
1754 # some tests for catamount-like systems
1755 # ----------------------------------------
1756 AC_ARG_ENABLE([sysio_init],
1757 AC_HELP_STRING([--disable-sysio-init],
1758 [call sysio init functions when initializing liblustre]),
1759 [],[enable_sysio_init=yes])
1760 AC_MSG_CHECKING([whether to initialize libsysio])
1761 AC_MSG_RESULT([$enable_sysio_init])
1762 if test x$enable_sysio_init != xno ; then
1763 AC_DEFINE([INIT_SYSIO], 1, [call sysio init functions])
1766 AC_ARG_ENABLE([urandom],
1767 AC_HELP_STRING([--disable-urandom],
1768 [disable use of /dev/urandom for liblustre]),
1769 [],[enable_urandom=yes])
1770 AC_MSG_CHECKING([whether to use /dev/urandom for liblustre])
1771 AC_MSG_RESULT([$enable_urandom])
1772 if test x$enable_urandom != xno ; then
1773 AC_DEFINE([LIBLUSTRE_USE_URANDOM], 1, [use /dev/urandom for random data])
1776 # -------- check for -lcap support ----
1777 if test x$enable_liblustre = xyes ; then
1778 AC_CHECK_LIB([cap], [cap_get_proc],
1781 AC_DEFINE([HAVE_LIBCAP], 1, [use libcap])
1790 LN_CONFIG_MAX_PAYLOAD
1798 # AM_CONDITOINAL defines for lnet
1800 AC_DEFUN([LN_CONDITIONALS],
1801 [AM_CONDITIONAL(BUILD_QSWLND, test x$QSWLND = "xqswlnd")
1802 AM_CONDITIONAL(BUILD_GMLND, test x$GMLND = "xgmlnd")
1803 AM_CONDITIONAL(BUILD_MXLND, test x$MXLND = "xmxlnd")
1804 AM_CONDITIONAL(BUILD_O2IBLND, test x$O2IBLND = "xo2iblnd")
1805 AM_CONDITIONAL(BUILD_OPENIBLND, test x$OPENIBLND = "xopeniblnd")
1806 AM_CONDITIONAL(BUILD_CIBLND, test x$CIBLND = "xciblnd")
1807 AM_CONDITIONAL(BUILD_IIBLND, test x$IIBLND = "xiiblnd")
1808 AM_CONDITIONAL(BUILD_VIBLND, test x$VIBLND = "xviblnd")
1809 AM_CONDITIONAL(BUILD_RALND, test x$RALND = "xralnd")
1810 AM_CONDITIONAL(BUILD_PTLLND, test x$PTLLND = "xptllnd")
1811 AM_CONDITIONAL(BUILD_UPTLLND, test x$UPTLLND = "xptllnd")
1812 AM_CONDITIONAL(BUILD_USOCKLND, test x$USOCKLND = "xusocklnd")
1818 # files that should be generated with AC_OUTPUT
1820 AC_DEFUN([LN_CONFIG_FILES],
1825 lnet/autoconf/Makefile
1827 lnet/include/Makefile
1828 lnet/include/libcfs/Makefile
1829 lnet/include/libcfs/linux/Makefile
1830 lnet/include/lnet/Makefile
1831 lnet/include/lnet/linux/Makefile
1833 lnet/klnds/autoMakefile
1834 lnet/klnds/gmlnd/Makefile
1835 lnet/klnds/mxlnd/autoMakefile
1836 lnet/klnds/mxlnd/Makefile
1837 lnet/klnds/gmlnd/autoMakefile
1838 lnet/klnds/openiblnd/Makefile
1839 lnet/klnds/openiblnd/autoMakefile
1840 lnet/klnds/o2iblnd/Makefile
1841 lnet/klnds/o2iblnd/autoMakefile
1842 lnet/klnds/ciblnd/Makefile
1843 lnet/klnds/ciblnd/autoMakefile
1844 lnet/klnds/iiblnd/Makefile
1845 lnet/klnds/iiblnd/autoMakefile
1846 lnet/klnds/viblnd/Makefile
1847 lnet/klnds/viblnd/autoMakefile
1848 lnet/klnds/qswlnd/Makefile
1849 lnet/klnds/qswlnd/autoMakefile
1850 lnet/klnds/ralnd/Makefile
1851 lnet/klnds/ralnd/autoMakefile
1852 lnet/klnds/socklnd/Makefile
1853 lnet/klnds/socklnd/autoMakefile
1854 lnet/klnds/ptllnd/Makefile
1855 lnet/klnds/ptllnd/autoMakefile
1856 lnet/libcfs/Makefile
1857 lnet/libcfs/autoMakefile
1858 lnet/libcfs/linux/Makefile
1860 lnet/lnet/autoMakefile
1861 lnet/selftest/Makefile
1862 lnet/selftest/autoMakefile
1864 lnet/ulnds/autoMakefile
1865 lnet/ulnds/socklnd/Makefile
1866 lnet/ulnds/ptllnd/Makefile
1868 lnet/include/libcfs/darwin/Makefile
1869 lnet/include/lnet/darwin/Makefile
1870 lnet/libcfs/darwin/Makefile
1875 # LIBCFS stub macros. (These are defined in the libcfs module on HEAD))
1877 AC_DEFUN([LIBCFS_PATH_DEFAULTS], [])
1878 AC_DEFUN([LIBCFS_PROG_LINUX], [])
1879 AC_DEFUN([LIBCFS_CONDITIONALS], [])
1880 AC_DEFUN([LIBCFS_CONFIGURE], [])
1881 AC_DEFUN([LIBCFS_CONFIG_FILES], [])