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 # check if cpu affinity is available/wanted
49 AC_DEFUN([LN_CONFIG_AFFINITY],
50 [AC_ARG_ENABLE([affinity],
51 AC_HELP_STRING([--disable-affinity],
52 [disable process/irq affinity]),
53 [],[enable_affinity='yes'])
55 AC_MSG_CHECKING([for CPU affinity support])
56 if test x$enable_affinity = xno ; then
57 AC_MSG_RESULT([no (by request)])
59 LB_LINUX_TRY_COMPILE([
60 #include <linux/sched.h>
68 set_cpus_allowed(&t, m);
70 AC_DEFINE(CPU_AFFINITY, 1, [kernel has cpu affinity support])
73 AC_MSG_RESULT([no (no kernel support)])
81 # configure support for Portals
83 AC_DEFUN([LN_CONFIG_PORTALS],
84 [AC_MSG_CHECKING([for portals])
85 AC_ARG_WITH([portals],
86 AC_HELP_STRING([--with-portals=path],
87 [set path to portals]),
92 *) PORTALS="${with_portals}"
100 if test $ENABLEPORTALS -eq 0; then
102 elif test ! \( -f ${PORTALS}/include/portals/p30.h \); then
104 AC_MSG_ERROR([bad --with-portals path])
106 AC_MSG_RESULT([$PORTALS])
107 PTLLNDCPPFLAGS="-I${PORTALS}/include"
109 AC_SUBST(PTLLNDCPPFLAGS)
115 # check if tunable tcp backoff is available/wanted
117 AC_DEFUN([LN_CONFIG_BACKOFF],
118 [AC_MSG_CHECKING([for tunable backoff TCP support])
119 AC_ARG_ENABLE([backoff],
120 AC_HELP_STRING([--disable-backoff],
121 [disable socknal tunable backoff]),
122 [],[enable_backoff='yes'])
123 if test x$enable_backoff = xno ; then
124 AC_MSG_RESULT([no (by request)])
126 BOCD="`grep -c TCP_BACKOFF $LINUX/include/linux/tcp.h`"
127 if test "$BOCD" != 0 ; then
128 AC_DEFINE(SOCKNAL_BACKOFF, 1, [use tunable backoff TCP])
130 if grep rto_max $LINUX/include/linux/tcp.h|grep -q __u16; then
131 AC_DEFINE(SOCKNAL_BACKOFF_MS, 1, [tunable backoff TCP in ms])
134 AC_MSG_RESULT([no (no kernel support)])
143 # configure support for Portals LND
145 AC_DEFUN([LN_CONFIG_PTLLND],
147 if test -z "$ENABLEPORTALS"; then
151 AC_MSG_CHECKING([whether to build the kernel portals LND])
154 if test $ENABLEPORTALS -ne 0; then
166 # configure support for Portals LND
168 AC_DEFUN([LN_CONFIG_UPTLLND],
170 if test -z "$ENABLEPORTALS"; then
174 AC_MSG_CHECKING([whether to build the userspace portals LND])
177 if test $ENABLEPORTALS -ne 0; then
189 # configure support for userspace TCP/IP LND
191 AC_DEFUN([LN_CONFIG_USOCKLND],
192 [AC_MSG_CHECKING([whether to build usocklnd])
193 AC_ARG_ENABLE([usocklnd],
194 AC_HELP_STRING([--disable-usocklnd],
196 [],[enable_usocklnd='yes'])
198 if test x$enable_usocklnd = xyes ; then
199 if test "$ENABLE_LIBPTHREAD" = "yes" ; then
203 AC_MSG_RESULT([no (libpthread not present or disabled)])
207 AC_MSG_RESULT([no (disabled explicitly)])
216 # check if quadrics support is in this kernel
218 AC_DEFUN([LN_CONFIG_QUADRICS],
219 [AC_MSG_CHECKING([for QsNet sources])
221 AC_HELP_STRING([--with-qsnet=path],
222 [set path to qsnet source (default=$LINUX)]),
225 AC_MSG_RESULT([$QSNET])
227 AC_MSG_CHECKING([if quadrics kernel headers are present])
228 if test -d $QSNET/drivers/net/qsnet ; then
231 AC_MSG_CHECKING([for multirail EKC])
232 if test -f $QSNET/include/elan/epcomms.h; then
233 AC_MSG_RESULT([supported])
234 QSWCPPFLAGS="-I$QSNET/include -DMULTIRAIL_EKC=1"
236 AC_MSG_RESULT([not supported])
237 AC_MSG_ERROR([Need multirail EKC])
240 if test x$QSNET = x$LINUX ; then
241 LB_LINUX_CONFIG([QSNET],[],[
242 LB_LINUX_CONFIG([QSNET_MODULE],[],[
243 AC_MSG_WARN([QSNET is not enabled in this kernel; not building qswlnd.])
254 AC_SUBST(QSWCPPFLAGS)
261 # check if GM support is available
263 AC_DEFUN([LN_CONFIG_GM],[
264 AC_MSG_CHECKING([whether to enable GM support])
266 AC_HELP_STRING([--with-gm=path-to-gm-source-tree],
267 [build gmlnd against path]),
279 AC_ARG_WITH([gm-install],
280 AC_HELP_STRING([--with-gm-install=path-to-gm-install-tree],
281 [say where GM has been installed]),
283 GM_INSTALL=$with_gm_install
287 if test $ENABLE_GM -eq 0; then
293 GMCPPFLAGS="-I$GM_SRC/include -I$GM_SRC/drivers -I$GM_SRC/drivers/linux/gm"
295 if test -f $GM_INSTALL/lib/libgm.a -o \
296 -f $GM_INSTALL/lib64/libgm.a; then
297 GMLIBS="-L$GM_INSTALL/lib -L$GM_INSTALL/lib64"
299 AC_MSG_ERROR([Cant find GM libraries under $GM_INSTALL])
302 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
303 EXTRA_KCFLAGS="$GMCPPFLAGS -DGM_KERNEL $EXTRA_KCFLAGS"
305 AC_MSG_CHECKING([that code using GM compiles with given path])
306 LB_LINUX_TRY_COMPILE([
307 #define GM_STRONG_TYPES 1
312 #include "gm_internal.h"
314 struct gm_port *port = NULL;
315 gm_recv_event_t *rxevent = gm_blocking_receive_no_spin(port);
321 AC_MSG_ERROR([Bad --with-gm path])
324 AC_MSG_CHECKING([that GM has gm_register_memory_ex_phys()])
325 LB_LINUX_TRY_COMPILE([
326 #define GM_STRONG_TYPES 1
331 #include "gm_internal.h"
334 struct gm_port *port = NULL;
338 gmrc = gm_register_memory_ex_phys(port, phys, 100, pvma);
344 Please patch the GM sources as follows...
346 patch -p0 < $PWD/lnet/klnds/gmlnd/gm-reg-phys.patch
347 ...then rebuild and re-install them])
348 AC_MSG_ERROR([Can't build GM without gm_register_memory_ex_phys()])
351 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
362 AC_DEFUN([LN_CONFIG_MX],
363 [AC_MSG_CHECKING([whether to enable Myrinet MX support])
367 AC_HELP_STRING([--with-mx=path],
368 [build mxlnd against path]),
382 if test $ENABLEMX -eq 0; then
383 AC_MSG_RESULT([disabled])
384 elif test ! \( -f ${MXPATH}/include/myriexpress.h -a \
385 -f ${MXPATH}/include/mx_kernel_api.h -a \
386 -f ${MXPATH}/include/mx_pin.h \); then
390 2) AC_MSG_ERROR([Myrinet MX kernel headers not present]);;
391 3) AC_MSG_ERROR([bad --with-mx path]);;
392 *) AC_MSG_ERROR([internal error]);;
395 MXCPPFLAGS="-I$MXPATH/include"
396 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
397 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $MXCPPFLAGS"
398 MXLIBS="-L$MXPATH/lib"
399 LB_LINUX_TRY_COMPILE([
401 #include <mx_extensions.h>
402 #include <myriexpress.h>
406 mx_request_t request;
410 mx_open_endpoint(MX_ANY_NIC, MX_ANY_ENDPOINT, 0, NULL, 0, &end);
411 mx_register_unexp_handler(end, (mx_unexp_handler_t) NULL, NULL);
412 mx_wait_any(end, MX_INFINITE, 0LL, 0LL, &status, &result);
413 mx_iconnect(end, 0LL, 0, 0, 0, NULL, &request);
422 2) AC_MSG_ERROR([can't compile with Myrinet MX kernel headers]);;
423 3) AC_MSG_ERROR([can't compile with Myrinet MX headers under $MXPATH]);;
424 *) AC_MSG_ERROR([internal error]);;
429 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
441 AC_DEFUN([LN_CONFIG_O2IB],[
442 AC_MSG_CHECKING([whether to enable OpenIB gen2 support])
445 AC_HELP_STRING([--with-o2ib=path],
446 [build o2iblnd against path]),
449 yes) O2IBPATHS="$LINUX $LINUX/drivers/infiniband"
454 *) O2IBPATHS=$with_o2ib
459 O2IBPATHS="$LINUX $LINUX/drivers/infiniband"
462 if test $ENABLEO2IB -eq 0; then
463 AC_MSG_RESULT([disabled])
466 for O2IBPATH in $O2IBPATHS; do
467 if test \( -f ${O2IBPATH}/include/rdma/rdma_cm.h -a \
468 -f ${O2IBPATH}/include/rdma/ib_cm.h -a \
469 -f ${O2IBPATH}/include/rdma/ib_verbs.h -a \
470 -f ${O2IBPATH}/include/rdma/ib_fmr_pool.h \); then
475 if ! $o2ib_found; then
479 2) AC_MSG_ERROR([kernel OpenIB gen2 headers not present]);;
480 3) AC_MSG_ERROR([bad --with-o2ib path]);;
481 *) AC_MSG_ERROR([internal error]);;
484 O2IBCPPFLAGS="-I$O2IBPATH/include"
485 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
486 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $O2IBCPPFLAGS"
487 EXTRA_LNET_INCLUDE="$EXTRA_LNET_INCLUDE $O2IBCPPFLAGS"
489 LB_LINUX_TRY_COMPILE([
490 #include <linux/version.h>
491 #include <linux/pci.h>
495 #include <rdma/rdma_cm.h>
496 #include <rdma/ib_cm.h>
497 #include <rdma/ib_verbs.h>
498 #include <rdma/ib_fmr_pool.h>
500 struct rdma_cm_id *cm_id;
501 struct rdma_conn_param conn_param;
502 struct ib_device_attr device_attr;
503 struct ib_qp_attr qp_attr;
504 struct ib_pool_fmr pool_fmr;
505 enum ib_cm_rej_reason rej_reason;
507 cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP);
508 return PTR_ERR(cm_id);
516 2) AC_MSG_ERROR([can't compile with kernel OpenIB gen2 headers]);;
517 3) AC_MSG_ERROR([can't compile with OpenIB gen2 headers under $O2IBPATH]);;
518 *) AC_MSG_ERROR([internal error]);;
523 # we know at this point that the found OFED source is good
525 if test $ENABLEO2IB -eq 3 ; then
526 # OFED default rpm not handle sles10 Modules.symvers name
527 for name in Module.symvers Modules.symvers; do
528 if test -f $O2IBPATH/$name; then
533 if test -n "$O2IB_SYMVER"; then
534 AC_MSG_NOTICE([adding $O2IBPATH/$O2IB_SYMVER to $PWD/$SYMVERFILE])
535 # strip out the existing symbols versions first
536 if test -f $PWD/$SYMVERFILE; then
537 egrep -v $(echo $(awk '{ print $2 }' $O2IBPATH/$O2IB_SYMVER) | tr ' ' '|') $PWD/$SYMVERFILE > $PWD/$SYMVERFILE.old
539 touch $PWD/$SYMVERFILE.old
541 cat $PWD/$SYMVERFILE.old $O2IBPATH/$O2IB_SYMVER > $PWD/$SYMVERFILE
542 rm $PWD/$SYMVERFILE.old
544 AC_MSG_ERROR([an external source tree was specified for o2iblnd however I could not find a $O2IBPATH/Module.symvers there])
549 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
553 AC_SUBST(EXTRA_LNET_INCLUDE)
554 AC_SUBST(O2IBCPPFLAGS)
561 # check for OpenIB in the kernel
562 AC_DEFUN([LN_CONFIG_OPENIB],[
563 AC_MSG_CHECKING([whether to enable OpenIB support])
565 OPENIBPATH="$LINUX/drivers/infiniband"
566 AC_ARG_WITH([openib],
567 AC_HELP_STRING([--with-openib=path],
568 [build openiblnd against path]),
575 *) OPENIBPATH="$with_openib"
582 if test $ENABLEOPENIB -eq 0; then
583 AC_MSG_RESULT([disabled])
584 elif test ! \( -f ${OPENIBPATH}/include/ts_ib_core.h -a \
585 -f ${OPENIBPATH}/include/ts_ib_cm.h -a \
586 -f ${OPENIBPATH}/include/ts_ib_sa_client.h \); then
588 case $ENABLEOPENIB in
590 2) AC_MSG_ERROR([kernel OpenIB headers not present]);;
591 3) AC_MSG_ERROR([bad --with-openib path]);;
592 *) AC_MSG_ERROR([internal error]);;
595 case $ENABLEOPENIB in
596 1|2) OPENIBCPPFLAGS="-I$OPENIBPATH/include -DIN_TREE_BUILD";;
597 3) OPENIBCPPFLAGS="-I$OPENIBPATH/include";;
598 *) AC_MSG_RESULT([no])
599 AC_MSG_ERROR([internal error]);;
601 OPENIBCPPFLAGS="$OPENIBCPPFLAGS -DIB_NTXRXPARAMS=4"
602 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
603 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $OPENIBCPPFLAGS"
604 LB_LINUX_TRY_COMPILE([
605 #include <ts_ib_core.h>
606 #include <ts_ib_cm.h>
607 #include <ts_ib_sa_client.h>
609 struct ib_device_properties dev_props;
610 struct ib_cm_active_param cm_active_params;
611 tTS_IB_CLIENT_QUERY_TID tid;
612 int enum1 = IB_QP_ATTRIBUTE_STATE;
613 int enum2 = IB_ACCESS_LOCAL_WRITE;
614 int enum3 = IB_CQ_CALLBACK_INTERRUPT;
615 int enum4 = IB_CQ_PROVIDER_REARM;
619 OPENIBLND="openiblnd"
622 case $ENABLEOPENIB in
624 2) AC_MSG_ERROR([can't compile with kernel OpenIB headers]);;
625 3) AC_MSG_ERROR([can't compile with OpenIB headers under $OPENIBPATH]);;
626 *) AC_MSG_ERROR([internal error]);;
631 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
633 AC_SUBST(OPENIBCPPFLAGS)
640 AC_DEFUN([LN_CONFIG_CIB],[
641 AC_MSG_CHECKING([whether to enable Cisco/TopSpin IB support])
646 AC_HELP_STRING([--with-cib=path],
647 [build ciblnd against path]),
650 no) AC_MSG_RESULT([no]);;
651 *) CIBPATH="$with_cib"
652 if test -d "$CIBPATH"; then
656 AC_MSG_ERROR([No directory $CIBPATH])
662 if test -n "$CIBPATH"; then
663 CIBCPPFLAGS="-I${CIBPATH}/ib/ts_api_ng/include -I${CIBPATH}/all/kernel_services/include -DUSING_TSAPI"
664 CIBCPPFLAGS="$CIBCPPFLAGS -DIB_NTXRXPARAMS=3"
665 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
666 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $CIBCPPFLAGS"
667 LB_LINUX_TRY_COMPILE([
668 #include <ts_ib_core.h>
669 #include <ts_ib_cm.h>
670 #include <ts_ib_sa_client.h>
672 struct ib_device_properties dev_props;
673 struct ib_cm_active_param cm_active_params;
674 tTS_IB_CLIENT_QUERY_TID tid;
675 int enum1 = TS_IB_QP_ATTRIBUTE_STATE;
676 int enum2 = TS_IB_ACCESS_LOCAL_WRITE;
677 int enum3 = TS_IB_CQ_CALLBACK_INTERRUPT;
678 int enum4 = TS_IB_CQ_PROVIDER_REARM;
683 AC_MSG_ERROR([can't compile ciblnd with given path])
686 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
688 AC_SUBST(CIBCPPFLAGS)
695 # check for infinicon infiniband support
697 AC_DEFUN([LN_CONFIG_IIB],[
698 AC_MSG_CHECKING([whether to enable Infinicon support])
700 IIBPATH="/usr/include"
702 AC_HELP_STRING([--with-iib=path],
703 [build iiblnd against path]),
710 *) IIBPATH="${with_iib}/include"
717 if test $ENABLEIIB -eq 0; then
718 AC_MSG_RESULT([disabled])
719 elif test ! \( -f ${IIBPATH}/linux/iba/ibt.h \); then
723 2) AC_MSG_ERROR([default Infinicon headers not present]);;
724 3) AC_MSG_ERROR([bad --with-iib path]);;
725 *) AC_MSG_ERROR([internal error]);;
728 IIBCPPFLAGS="-I$IIBPATH"
729 if test $IIBPATH != "/usr/include"; then
730 # we need /usr/include come what may
731 IIBCPPFLAGS="$IIBCPPFLAGS -I/usr/include"
733 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
734 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $IIBCPPFLAGS"
735 LB_LINUX_TRY_COMPILE([
736 #include <linux/iba/ibt.h>
738 IBT_INTERFACE_UNION interfaces;
741 rc = IbtGetInterfaceByVersion(IBT_INTERFACE_VERSION_2,
744 return rc == FSUCCESS ? 0 : 1;
752 2) AC_MSG_ERROR([can't compile with default Infinicon headers]);;
753 3) AC_MSG_ERROR([can't compile with Infinicon headers under $IIBPATH]);;
754 *) AC_MSG_ERROR([internal error]);;
759 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
761 AC_SUBST(IIBCPPFLAGS)
768 # check for Voltaire infiniband support
770 AC_DEFUN([LN_CONFIG_VIB],
771 [AC_MSG_CHECKING([whether to enable Voltaire IB support])
774 AC_HELP_STRING([--with-vib=path],
775 [build viblnd against path]),
778 no) AC_MSG_RESULT([no]);;
779 *) VIBPATH="${with_vib}/src/nvigor/ib-code"
780 if test -d "$with_vib" -a -d "$VIBPATH"; then
784 AC_MSG_ERROR([No directory $VIBPATH])
790 if test -z "$VIBPATH"; then
793 VIBCPPFLAGS="-I${VIBPATH}/include -I${VIBPATH}/cm"
794 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
795 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $VIBCPPFLAGS"
796 LB_LINUX_TRY_COMPILE([
797 #include <linux/list.h>
798 #include <asm/byteorder.h>
803 #ifdef __LITTLE_ENDIAN
814 ibat_arp_data_t arp_data;
817 vvrc = vv_hca_open("ANY_HCA", NULL, &kib_hca);
818 cep = cm_create_cep(cm_cep_transp_rc);
819 ibatrc = ibat_get_ib_data((uint32_t)0, (uint32_t)0,
820 ibat_paths_primary, &arp_data,
821 (ibat_get_ib_data_reply_fn_t)NULL,
827 AC_MSG_ERROR([can't compile viblnd with given path])
829 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
831 if test -n "$VIBLND"; then
832 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
833 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $VIBCPPFLAGS"
834 AC_MSG_CHECKING([if Voltaire still uses void * sg addresses])
835 LB_LINUX_TRY_COMPILE([
836 #include <linux/list.h>
837 #include <asm/byteorder.h>
842 #ifdef __LITTLE_ENDIAN
852 return &sg.v_address[3] == NULL;
855 VIBCPPFLAGS="$VIBCPPFLAGS -DIBNAL_VOIDSTAR_SGADDR=1"
859 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
861 AC_SUBST(VIBCPPFLAGS)
868 # check whether to use the RapidArray lnd
870 AC_DEFUN([LN_CONFIG_RALND],
872 AC_MSG_CHECKING([if RapidArray kernel headers are present])
874 RACPPFLAGS="-I${LINUX}/drivers/xd1/include"
875 EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
876 EXTRA_KCFLAGS="$EXTRA_KCFLAGS $RACPPFLAGS"
877 LB_LINUX_TRY_COMPILE([
878 #include <linux/types.h>
882 RAP_PVOID dev_handle;
884 rc = RapkGetDeviceByIndex(0, NULL, &dev_handle);
886 return rc == RAP_SUCCESS ? 0 : 1;
895 EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
904 # LN_CONFIG_USERSPACE
906 # This is defined but empty because it is called from
907 # build/autconf/lustre-build.m4 which is shared by all branches.
909 AC_DEFUN([LN_CONFIG_USERSPACE],
916 # LNet linux kernel checks
918 AC_DEFUN([LN_PROG_LINUX],
939 AC_DEFUN([LN_PROG_DARWIN],
940 [LB_DARWIN_CHECK_FUNCS([get_preemption_level])
946 # default paths for installed files
948 AC_DEFUN([LN_PATH_DEFAULTS],
955 # other configure checks
957 AC_DEFUN([LN_CONFIGURE],
958 [# lnet/utils/portals.c
959 AC_CHECK_HEADERS([netdb.h netinet/tcp.h asm/types.h endian.h sys/ioctl.h])
960 AC_CHECK_FUNCS([gethostbyname socket connect])
963 AC_CHECK_HEADERS([linux/version.h])
965 AC_CHECK_TYPE([spinlock_t],
966 [AC_DEFINE(HAVE_SPINLOCK_T, 1, [spinlock_t is defined])],
968 [#include <linux/spinlock.h>])
970 # lnet/utils/wirecheck.c
971 AC_CHECK_FUNCS([strnlen])
973 # -------- Check for required packages --------------
978 # Build with readline
980 AC_MSG_CHECKING([whether to enable readline support])
981 AC_ARG_ENABLE(readline,
982 AC_HELP_STRING([--disable-readline],
983 [disable readline support]),
984 [],[enable_readline='yes'])
985 AC_MSG_RESULT([$enable_readline])
987 # -------- check for readline if enabled ----
988 if test x$enable_readline = xyes ; then
990 LIBS="-lncurses $LIBS"
991 AC_CHECK_LIB([readline],[readline],[
992 LIBREADLINE="-lreadline -lncurses"
993 AC_DEFINE(HAVE_LIBREADLINE, 1, [readline library is available])
1001 AC_SUBST(LIBREADLINE)
1003 # -------- enable acceptor libwrap (TCP wrappers) support? -------
1004 AC_MSG_CHECKING([if libwrap support is requested])
1005 AC_ARG_ENABLE([libwrap],
1006 AC_HELP_STRING([--enable-libwrap], [use TCP wrappers]),
1007 [case "${enableval}" in
1008 yes) enable_libwrap=yes ;;
1009 no) enable_libwrap=no ;;
1010 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libwrap) ;;
1011 esac],[enable_libwrap=no])
1012 AC_MSG_RESULT([$enable_libwrap])
1013 if test x$enable_libwrap = xyes ; then
1015 AC_DEFINE(HAVE_LIBWRAP, 1, [libwrap support is requested])
1021 # ----------------------------------------
1022 # some tests for catamount-like systems
1023 # ----------------------------------------
1024 AC_ARG_ENABLE([sysio_init],
1025 AC_HELP_STRING([--disable-sysio-init],
1026 [call sysio init functions when initializing liblustre]),
1027 [],[enable_sysio_init=yes])
1028 AC_MSG_CHECKING([whether to initialize libsysio])
1029 AC_MSG_RESULT([$enable_sysio_init])
1030 if test x$enable_sysio_init != xno ; then
1031 AC_DEFINE([INIT_SYSIO], 1, [call sysio init functions])
1034 AC_ARG_ENABLE([urandom],
1035 AC_HELP_STRING([--disable-urandom],
1036 [disable use of /dev/urandom for liblustre]),
1037 [],[enable_urandom=yes])
1038 AC_MSG_CHECKING([whether to use /dev/urandom for liblustre])
1039 AC_MSG_RESULT([$enable_urandom])
1040 if test x$enable_urandom != xno ; then
1041 AC_DEFINE([LIBLUSTRE_USE_URANDOM], 1, [use /dev/urandom for random data])
1044 # -------- check for -lcap support ----
1045 if test x$enable_liblustre = xyes ; then
1046 AC_CHECK_LIB([cap], [cap_get_proc],
1049 AC_DEFINE([HAVE_LIBCAP], 1, [use libcap])
1058 LN_CONFIG_MAX_PAYLOAD
1066 # AM_CONDITOINAL defines for lnet
1068 AC_DEFUN([LN_CONDITIONALS],
1069 [AM_CONDITIONAL(BUILD_QSWLND, test x$QSWLND = "xqswlnd")
1070 AM_CONDITIONAL(BUILD_GMLND, test x$GMLND = "xgmlnd")
1071 AM_CONDITIONAL(BUILD_MXLND, test x$MXLND = "xmxlnd")
1072 AM_CONDITIONAL(BUILD_O2IBLND, test x$O2IBLND = "xo2iblnd")
1073 AM_CONDITIONAL(BUILD_OPENIBLND, test x$OPENIBLND = "xopeniblnd")
1074 AM_CONDITIONAL(BUILD_CIBLND, test x$CIBLND = "xciblnd")
1075 AM_CONDITIONAL(BUILD_IIBLND, test x$IIBLND = "xiiblnd")
1076 AM_CONDITIONAL(BUILD_VIBLND, test x$VIBLND = "xviblnd")
1077 AM_CONDITIONAL(BUILD_RALND, test x$RALND = "xralnd")
1078 AM_CONDITIONAL(BUILD_PTLLND, test x$PTLLND = "xptllnd")
1079 AM_CONDITIONAL(BUILD_UPTLLND, test x$UPTLLND = "xptllnd")
1080 AM_CONDITIONAL(BUILD_USOCKLND, test x$USOCKLND = "xusocklnd")
1086 # files that should be generated with AC_OUTPUT
1088 AC_DEFUN([LN_CONFIG_FILES],
1093 lnet/autoconf/Makefile
1095 lnet/include/Makefile
1096 lnet/include/lnet/Makefile
1097 lnet/include/lnet/linux/Makefile
1099 lnet/klnds/autoMakefile
1100 lnet/klnds/gmlnd/Makefile
1101 lnet/klnds/mxlnd/autoMakefile
1102 lnet/klnds/mxlnd/Makefile
1103 lnet/klnds/gmlnd/autoMakefile
1104 lnet/klnds/openiblnd/Makefile
1105 lnet/klnds/openiblnd/autoMakefile
1106 lnet/klnds/o2iblnd/Makefile
1107 lnet/klnds/o2iblnd/autoMakefile
1108 lnet/klnds/ciblnd/Makefile
1109 lnet/klnds/ciblnd/autoMakefile
1110 lnet/klnds/iiblnd/Makefile
1111 lnet/klnds/iiblnd/autoMakefile
1112 lnet/klnds/viblnd/Makefile
1113 lnet/klnds/viblnd/autoMakefile
1114 lnet/klnds/qswlnd/Makefile
1115 lnet/klnds/qswlnd/autoMakefile
1116 lnet/klnds/ralnd/Makefile
1117 lnet/klnds/ralnd/autoMakefile
1118 lnet/klnds/socklnd/Makefile
1119 lnet/klnds/socklnd/autoMakefile
1120 lnet/klnds/ptllnd/Makefile
1121 lnet/klnds/ptllnd/autoMakefile
1123 lnet/lnet/autoMakefile
1124 lnet/selftest/Makefile
1125 lnet/selftest/autoMakefile
1127 lnet/ulnds/autoMakefile
1128 lnet/ulnds/socklnd/Makefile
1129 lnet/ulnds/ptllnd/Makefile
1132 case $lb_target_os in
1135 lnet/include/lnet/darwin/Makefile