Whamcloud - gitweb
LU-16035 kfilnd: Initial kfilnd implementation
[fs/lustre-release.git] / lnet / autoconf / lustre-lnet.m4
1 # LN_CONFIG_BACKOFF
2 #
3 # check if tunable tcp backoff is available/wanted
4 #
5 AC_DEFUN([LN_CONFIG_BACKOFF], [
6 AC_MSG_CHECKING([whether to enable tunable backoff TCP support])
7 AC_ARG_ENABLE([backoff],
8         AS_HELP_STRING([--disable-backoff],
9                 [disable socknal tunable backoff]),
10         [], [enable_backoff="yes"])
11 AC_MSG_RESULT([$enable_backoff])
12 AS_IF([test "x$enable_backoff" = xyes], [
13         AC_MSG_CHECKING([if Linux kernel has tunable backoff TCP support])
14         AS_IF([grep -c TCP_BACKOFF $LINUX/include/linux/tcp.h >/dev/null], [
15                 AC_MSG_RESULT([yes])
16                 AC_DEFINE(SOCKNAL_BACKOFF, 1, [use tunable backoff TCP])
17                 AS_IF([grep rto_max $LINUX/include/linux/tcp.h | grep -q __u16 >/dev/null],
18                         [AC_DEFINE(SOCKNAL_BACKOFF_MS, 1,
19                                 [tunable backoff TCP in ms])])
20         ], [
21                 AC_MSG_RESULT([no])
22         ])
23 ])
24 ]) # LN_CONFIG_BACKOFF
25
26 #
27 # LN_CONFIG_DLC
28 #
29 # Configure dlc
30 #
31 # fail to build if libyaml is not installed
32 #
33 AC_DEFUN([LN_CONFIG_DLC], [
34         AS_IF([test "x$enable_dist" = xno], [
35                 AC_CHECK_LIB([yaml], [yaml_parser_initialize],
36                              [LIBYAML="libyaml"],
37                              [AC_MSG_ERROR([YAML development libraries not not installed])],
38                              [-lm])
39         ])
40 ])
41
42 #
43 # LN_CONFIG_O2IB
44 #
45 # If current OFED installed (assume with "ofed_info") and devel
46 # headers are not found, error because we assume OFED infiniband
47 # driver needs to be used and we must configure/build with it.
48 # Current OFED headers detection mechanism allow for non-standard
49 # prefix but relies on "ofed_info" command and on "%prefix/openib"
50 # link (both are ok for 1.5.x and 3.x versions), and should work
51 # for both source and DKMS builds.
52 #
53 AC_DEFUN([LN_CONFIG_O2IB], [
54 AC_MSG_CHECKING([whether to use Compat RDMA])
55 AC_ARG_WITH([o2ib],
56         AS_HELP_STRING([--with-o2ib=[yes|no|<path>]],
57                 [build o2iblnd against path]),
58         [], [with_o2ib="yes"])
59
60 case $with_o2ib in
61         yes)    AS_IF([which ofed_info 2>/dev/null], [
62                         AS_IF([test x$uses_dpkg = xyes], [
63                                 OFED_INFO="ofed_info | awk '{print \[$]2}'"
64                                 LSPKG="dpkg --listfiles"
65                         ], [
66                                 OFED_INFO="ofed_info"
67                                 LSPKG="rpm -ql"
68                         ])
69                         O2IBPATHS=$(eval $OFED_INFO |
70                                     egrep -w 'mlnx-ofed-kernel-dkms|mlnx-ofa_kernel-devel|compat-rdma-devel|kernel-ib-devel|ofa_kernel-devel' |
71                                     xargs $LSPKG | grep -v 'ofa_kernel-' | grep rdma_cm.h | sed 's/\/include\/rdma\/rdma_cm.h//')
72                         AS_IF([test -z "$O2IBPATHS"], [
73                                 AC_MSG_ERROR([
74 You seem to have an OFED installed but have not installed it's devel package.
75 If you still want to build Lustre for your OFED I/B stack, you need to install its devel headers RPM.
76 Instead, if you want to build Lustre for your kernel's built-in I/B stack rather than your installed OFED stack, either remove the OFED package(s) or use --with-o2ib=no.
77                                              ])
78                         ])
79                         AS_IF([test $(echo $O2IBPATHS | wc -w) -ge 2], [
80                                 AC_MSG_ERROR([
81 It appears that you have multiple OFED versions installed.
82 If you still want to build Lustre for your OFED I/B stack, you need to install a single version with its devel headers RPM.
83 Instead, if you want to build Lustre for your in-kernel I/B stack rather than your installed external OFED stack, either remove the OFED package(s) or use --with-o2ib=no.
84                                              ])
85                         ])
86                         if test -e $O2IBPATHS/${LINUXRELEASE}; then
87                             O2IBPATHS=$O2IBPATHS/${LINUXRELEASE}
88                         elif test -e $O2IBPATHS/default; then
89                             O2IBPATHS=$O2IBPATHS/default
90                         fi
91                         OFED="yes"
92                 ], [
93                         O2IBPATHS="$LINUX $LINUX/drivers/infiniband"
94                 ])
95                 ENABLEO2IB="yes"
96                 ;;
97         no)     ENABLEO2IB="no"
98                 ;;
99         *)      O2IBPATHS=$with_o2ib
100                 ENABLEO2IB="withpath"
101                 OFED="yes"
102                 ;;
103 esac
104
105 AS_IF([test $ENABLEO2IB = "no"], [
106         AC_MSG_RESULT([no])
107         AC_DEFUN([LN_CONFIG_O2IB_SRC], [])
108         AC_DEFUN([LN_CONFIG_O2IB_RESULTS], [])
109 ], [
110         o2ib_found=false
111         for O2IBPATH in $O2IBPATHS; do
112                 AS_IF([test \( -f ${O2IBPATH}/include/rdma/rdma_cm.h -a \
113                            -f ${O2IBPATH}/include/rdma/ib_cm.h -a \
114                            -f ${O2IBPATH}/include/rdma/ib_verbs.h \)], [
115                         o2ib_found=true
116                         break
117                 ])
118         done
119         if ! $o2ib_found; then
120                 AC_MSG_RESULT([no])
121                 case $ENABLEO2IB in
122                         "yes") AC_MSG_ERROR([no OFED nor kernel OpenIB gen2 headers present]) ;;
123                         "withpath") AC_MSG_ERROR([bad --with-o2ib path]) ;;
124                         *) AC_MSG_ERROR([internal error]) ;;
125                 esac
126         else
127                 COMPAT_AUTOCONF=""
128                 compatrdma_found=false
129                 if test -f ${O2IBPATH}/include/linux/compat-2.6.h; then
130                         AC_MSG_RESULT([yes])
131                         compatrdma_found=true
132                         AC_DEFINE(HAVE_COMPAT_RDMA, 1, [compat rdma found])
133                         EXTRA_OFED_CONFIG="$EXTRA_OFED_CONFIG -include ${O2IBPATH}/include/linux/compat-2.6.h"
134                         if test -f "$O2IBPATH/include/linux/compat_autoconf.h"; then
135                                 COMPAT_AUTOCONF="$O2IBPATH/include/linux/compat_autoconf.h"
136                         fi
137                 else
138                         AC_MSG_RESULT([no])
139                 fi
140                 if ! $compatrdma_found; then
141                         if test -f "$O2IBPATH/config.mk"; then
142                                 . "$O2IBPATH/config.mk"
143                         elif test -f "$O2IBPATH/ofed_patch.mk"; then
144                                 . "$O2IBPATH/ofed_patch.mk"
145                         fi
146                 elif test -z "$COMPAT_AUTOCONF"; then
147                         # Depreciated checks
148                         if test "x$RHEL_KERNEL" = xyes; then
149                                 RHEL_MAJOR=$(awk '/ RHEL_MAJOR / { print [$]3 }' $LINUX_OBJ/include/$VERSION_HDIR/version.h)
150                                 I=$(awk '/ RHEL_MINOR / { print [$]3 }' $LINUX_OBJ/include/$VERSION_HDIR/version.h)
151                                 while test "$I" -ge 0; do
152                                         EXTRA_OFED_INCLUDE="$EXTRA_OFED_INCLUDE -DCONFIG_COMPAT_RHEL_${RHEL_MAJOR}_$I"
153                                         I=$(($I-1))
154                                 done
155                         elif test "x$SUSE_KERNEL" = xyes; then
156                                 SP=$(grep PATCHLEVEL /etc/SuSE-release | sed -e 's/.*= *//')
157                                 EXTRA_OFED_INCLUDE="$EXTRA_OFED_INCLUDE -DCONFIG_COMPAT_SLES_11_$SP"
158                         fi
159                 fi
160
161                 AC_MSG_CHECKING([whether to use any OFED backport headers])
162                 if test -n "$BACKPORT_INCLUDES"; then
163                         AC_MSG_RESULT([yes])
164                         OFED_BACKPORT_PATH="$O2IBPATH/${BACKPORT_INCLUDES/*\/kernel_addons/kernel_addons}/"
165                         EXTRA_OFED_INCLUDE="-I$OFED_BACKPORT_PATH $EXTRA_OFED_INCLUDE"
166                 else
167                         AC_MSG_RESULT([no])
168                 fi
169
170                 O2IBLND=""
171                 O2IBPATH=$(readlink --canonicalize $O2IBPATH)
172                 EXTRA_OFED_INCLUDE="$EXTRA_OFED_INCLUDE -I$O2IBPATH/include -I$O2IBPATH/include/uapi"
173                 EXTRA_CHECK_INCLUDE="$EXTRA_OFED_CONFIG $EXTRA_OFED_INCLUDE"
174                 LB_CHECK_COMPILE([whether to enable OpenIB gen2 support],
175                 openib_gen2_support, [
176                         #ifdef HAVE_COMPAT_RDMA
177                         #undef PACKAGE_NAME
178                         #undef PACKAGE_TARNAME
179                         #undef PACKAGE_VERSION
180                         #undef PACKAGE_STRING
181                         #undef PACKAGE_BUGREPORT
182                         #undef PACKAGE_URL
183                         #include <linux/compat-2.6.h>
184                         #endif
185                         #include <linux/version.h>
186                         #include <linux/pci.h>
187                         #include <linux/gfp.h>
188                         #include <rdma/rdma_cm.h>
189                         #include <rdma/ib_cm.h>
190                         #include <rdma/ib_verbs.h>
191                 ],[
192                         struct rdma_cm_id      *cm_idi __attribute__ ((unused));
193                         struct rdma_conn_param  conn_param __attribute__ ((unused));
194                         struct ib_device_attr   device_attr __attribute__ ((unused));
195                         struct ib_qp_attr       qp_attr __attribute__ ((unused));
196                         enum   ib_cm_rej_reason rej_reason __attribute__ ((unused));
197                         rdma_destroy_id(NULL);
198                 ],[
199                         O2IBLND="o2iblnd"
200                 ],[
201                         case $ENABLEO2IB in
202                         "yes") AC_MSG_ERROR([can't compile with OpenIB gen2 headers]) ;;
203                         "withpath") AC_MSG_ERROR([can't compile with OpenIB gen2 headers under $O2IBPATH]) ;;
204                         *) AC_MSG_ERROR([internal error]) ;;
205                         esac
206                 ])
207                 # we know at this point that the found OFED source is good
208                 O2IB_SYMVER=""
209                 if test -f $O2IBPATH/Module.symvers; then
210                         O2IB_SYMVER=$O2IBPATH/Module.symvers
211                 elif test "x$SUSE_KERNEL" = "xyes"; then
212                         O2IB_SYMVER=$(find ${O2IBPATH}* -name Module.symvers)
213                 elif test -f $LINUX_OBJ/Module.symvers; then
214                         # Debian symvers is in the arch tree
215                         O2IB_SYMVER=$LINUX_OBJ/Module.symvers
216                 fi
217                 if test -n "$O2IB_SYMVER"; then
218                         AC_MSG_NOTICE([adding $O2IB_SYMVER to Symbol Path])
219                         EXTRA_SYMBOLS="$EXTRA_SYMBOLS $O2IB_SYMVER"
220                         AC_SUBST(EXTRA_SYMBOLS)
221                 else
222                         AC_MSG_ERROR([an external source tree was, either specified or detected, for o2iblnd however I could not find a $O2IBPATH/Module.symvers there])
223                 fi
224
225                 LB_CHECK_COMPILE([if Linux kernel has kthread_worker],
226                 linux_kthread_worker, [
227                         #ifdef HAVE_COMPAT_RDMA
228                         #undef PACKAGE_NAME
229                         #undef PACKAGE_TARNAME
230                         #undef PACKAGE_VERSION
231                         #undef PACKAGE_STRING
232                         #undef PACKAGE_BUGREPORT
233                         #undef PACKAGE_URL
234                         #include <linux/compat-2.6.h>
235                         #endif
236                         #include <linux/kthread.h>
237                 ],[
238                         struct kthread_work *kth_wrk = NULL;
239                         flush_kthread_work(kth_wrk);
240                 ],[
241                         AC_DEFINE(HAVE_KTHREAD_WORK, 1, [kthread_worker found])
242                         if test -z "$COMPAT_AUTOCONF"; then
243                                 EXTRA_OFED_INCLUDE="$EXTRA_OFED_INCLUDE -DCONFIG_COMPAT_IS_KTHREAD"
244                         fi
245                 ])
246                 EXTRA_CHECK_INCLUDE=""
247         fi
248 ])
249 AC_SUBST(EXTRA_OFED_CONFIG)
250 AC_SUBST(EXTRA_OFED_INCLUDE)
251 AC_SUBST(O2IBLND)
252 AC_SUBST(O2IBPATH)
253 AC_SUBST(ENABLEO2IB)
254
255 AS_IF([test $ENABLEO2IB != "no"], [
256         EXTRA_CHECK_INCLUDE="$EXTRA_OFED_CONFIG $EXTRA_OFED_INCLUDE"
257         KBUILD_EXTRA_SYMBOLS="$KBUILD_EXTRA_SYMBOLS $O2IBPATH/Module.symvers"
258
259         # In RHEL 6.2, rdma_create_id() takes the queue-pair type as a fourth argument
260         LB_CHECK_COMPILE([if 'rdma_create_id' wants four args],
261         rdma_create_id_4args, [
262                 #ifdef HAVE_COMPAT_RDMA
263                 #undef PACKAGE_NAME
264                 #undef PACKAGE_TARNAME
265                 #undef PACKAGE_VERSION
266                 #undef PACKAGE_STRING
267                 #undef PACKAGE_BUGREPORT
268                 #undef PACKAGE_URL
269                 #include <linux/compat-2.6.h>
270                 #endif
271                 #include <rdma/rdma_cm.h>
272         ],[
273                 rdma_create_id(NULL, NULL, 0, 0);
274         ],[
275                 AC_DEFINE(HAVE_RDMA_CREATE_ID_4ARG, 1,
276                         [rdma_create_id wants 4 args])
277         ])
278
279         # 4.4 added network namespace parameter for rdma_create_id()
280         LB_CHECK_COMPILE([if 'rdma_create_id' wants five args],
281         rdma_create_id_5args, [
282                 #ifdef HAVE_COMPAT_RDMA
283                 #undef PACKAGE_NAME
284                 #undef PACKAGE_TARNAME
285                 #undef PACKAGE_VERSION
286                 #undef PACKAGE_STRING
287                 #undef PACKAGE_BUGREPORT
288                 #undef PACKAGE_URL
289                 #include <linux/compat-2.6.h>
290                 #endif
291                 #include <rdma/rdma_cm.h>
292         ],[
293                 rdma_create_id(NULL, NULL, NULL, 0, 0);
294         ],[
295                 AC_DEFINE(HAVE_RDMA_CREATE_ID_5ARG, 1,
296                         [rdma_create_id wants 5 args])
297         ])
298
299         # 4.2 introduced struct ib_cq_init_attr which is used
300         # by ib_create_cq(). Note some OFED stacks only keep
301         # their headers in sync with latest kernels but not
302         # the functionality which means for infiniband testing
303         # we need to always test functionality testings.
304         LB_CHECK_COMPILE([if 'struct ib_cq_init_attr' is used],
305         ib_cq_init_attr, [
306                 #ifdef HAVE_COMPAT_RDMA
307                 #undef PACKAGE_NAME
308                 #undef PACKAGE_TARNAME
309                 #undef PACKAGE_VERSION
310                 #undef PACKAGE_STRING
311                 #undef PACKAGE_BUGREPORT
312                 #undef PACKAGE_URL
313                 #include <linux/compat-2.6.h>
314                 #endif
315                 #include <rdma/ib_verbs.h>
316         ],[
317                 struct ib_cq_init_attr cq_attr;
318
319                 ib_create_cq(NULL, NULL, NULL, NULL, &cq_attr);
320         ],[
321                 AC_DEFINE(HAVE_IB_CQ_INIT_ATTR, 1,
322                         [struct ib_cq_init_attr is used by ib_create_cq])
323         ])
324
325         # 4.3 removed ib_alloc_fast_reg_mr()
326         LB_CHECK_COMPILE([if 'ib_alloc_fast_reg_mr' exists],
327         ib_alloc_fast_reg_mr, [
328                 #ifdef HAVE_COMPAT_RDMA
329                 #undef PACKAGE_NAME
330                 #undef PACKAGE_TARNAME
331                 #undef PACKAGE_VERSION
332                 #undef PACKAGE_STRING
333                 #undef PACKAGE_BUGREPORT
334                 #undef PACKAGE_URL
335                 #include <linux/compat-2.6.h>
336                 #endif
337                 #include <rdma/ib_verbs.h>
338         ],[
339                 ib_alloc_fast_reg_mr(NULL, 0);
340         ],[
341                 AC_DEFINE(HAVE_IB_ALLOC_FAST_REG_MR, 1,
342                         [ib_alloc_fast_reg_mr is defined])
343         ])
344
345         # 4.9 must stop using ib_get_dma_mr and the global MR
346         # We then have to use FMR/Fastreg for all RDMA.
347         LB_CHECK_COMPILE([if 'ib_get_dma_mr' exists],
348         ib_get_dma_mr, [
349                 #ifdef HAVE_COMPAT_RDMA
350                 #undef PACKAGE_NAME
351                 #undef PACKAGE_TARNAME
352                 #undef PACKAGE_VERSION
353                 #undef PACKAGE_STRING
354                 #undef PACKAGE_BUGREPORT
355                 #undef PACKAGE_URL
356                 #include <linux/compat-2.6.h>
357                 #endif
358                 #include <rdma/ib_verbs.h>
359         ],[
360                 ib_get_dma_mr(NULL, 0);
361         ],[
362                 AC_DEFINE(HAVE_IB_GET_DMA_MR, 1,
363                         [ib_get_dma_mr is defined])
364         ])
365
366         # In v4.4 Linux kernel,
367         # commit e622f2f4ad2142d2a613a57fb85f8cf737935ef5
368         # split up struct ib_send_wr so that all non-trivial verbs
369         # use their own structure which embedds struct ib_send_wr.
370         LB_CHECK_COMPILE([if 'struct ib_rdma_wr' is defined],
371         ib_rdma_wr, [
372                 #ifdef HAVE_COMPAT_RDMA
373                 #undef PACKAGE_NAME
374                 #undef PACKAGE_TARNAME
375                 #undef PACKAGE_VERSION
376                 #undef PACKAGE_STRING
377                 #undef PACKAGE_BUGREPORT
378                 #undef PACKAGE_URL
379                 #include <linux/compat-2.6.h>
380                 #endif
381                 #include <rdma/ib_verbs.h>
382         ],[
383                 struct ib_rdma_wr *wr __attribute__ ((unused));
384
385                 wr = rdma_wr(NULL);
386         ],[
387                 AC_DEFINE(HAVE_IB_RDMA_WR, 1,
388                         [struct ib_rdma_wr is defined])
389         ])
390
391         # new fast registration API introduced in 4.4
392         LB_CHECK_COMPILE([if 4arg 'ib_map_mr_sg' exists],
393         ib_map_mr_sg_4args, [
394                 #ifdef HAVE_COMPAT_RDMA
395                 #undef PACKAGE_NAME
396                 #undef PACKAGE_TARNAME
397                 #undef PACKAGE_VERSION
398                 #undef PACKAGE_STRING
399                 #undef PACKAGE_BUGREPORT
400                 #undef PACKAGE_URL
401                 #include <linux/compat-2.6.h>
402                 #endif
403                 #include <rdma/ib_verbs.h>
404         ],[
405                 ib_map_mr_sg(NULL, NULL, 0, 0);
406         ],[
407                 AC_DEFINE(HAVE_IB_MAP_MR_SG, 1,
408                         [ib_map_mr_sg exists])
409         ])
410
411         # ib_map_mr_sg changes from 4 to 5 args (adding sg_offset_p)
412         # in kernel 4.7 (and RHEL 7.3)
413         LB_CHECK_COMPILE([if 5arg 'ib_map_mr_sg' exists],
414         ib_map_mr_sg_5args, [
415                 #ifdef HAVE_COMPAT_RDMA
416                 #undef PACKAGE_NAME
417                 #undef PACKAGE_TARNAME
418                 #undef PACKAGE_VERSION
419                 #undef PACKAGE_STRING
420                 #undef PACKAGE_BUGREPORT
421                 #undef PACKAGE_URL
422                 #include <linux/compat-2.6.h>
423                 #endif
424                 #include <rdma/ib_verbs.h>
425         ],[
426                 ib_map_mr_sg(NULL, NULL, 0, NULL, 0);
427         ],[
428                 AC_DEFINE(HAVE_IB_MAP_MR_SG, 1,
429                         [ib_map_mr_sg exists])
430                 AC_DEFINE(HAVE_IB_MAP_MR_SG_5ARGS, 1,
431                         [ib_map_mr_sg has 5 arguments])
432         ])
433
434         # ib_query_device() removed in 4.5
435         LB_CHECK_COMPILE([if 'struct ib_device' has member 'attrs'],
436         ib_device.attrs, [
437                 #ifdef HAVE_COMPAT_RDMA
438                 #undef PACKAGE_NAME
439                 #undef PACKAGE_TARNAME
440                 #undef PACKAGE_VERSION
441                 #undef PACKAGE_STRING
442                 #undef PACKAGE_BUGREPORT
443                 #undef PACKAGE_URL
444                 #include <linux/compat-2.6.h>
445                 #endif
446                 #include <rdma/ib_verbs.h>
447         ],[
448                 struct ib_device dev;
449                 struct ib_device_attr dev_attr = {};
450                 dev.attrs = dev_attr;
451         ],[
452                 AC_DEFINE(HAVE_IB_DEVICE_ATTRS, 1,
453                         [struct ib_device.attrs is defined])
454         ])
455
456         # A flags argument was added to ib_alloc_pd() in Linux 4.9,
457         # commit ed082d36a7b2c27d1cda55fdfb28af18040c4a89
458         LB_CHECK_COMPILE([if 2arg 'ib_alloc_pd' exists],
459         ib_alloc_pd, [
460                 #ifdef HAVE_COMPAT_RDMA
461                 #undef PACKAGE_NAME
462                 #undef PACKAGE_TARNAME
463                 #undef PACKAGE_VERSION
464                 #undef PACKAGE_STRING
465                 #undef PACKAGE_BUGREPORT
466                 #undef PACKAGE_URL
467                 #include <linux/compat-2.6.h>
468                 #endif
469                 #include <rdma/ib_verbs.h>
470         ],[
471                 ib_alloc_pd(NULL, 0);
472         ],[
473                 AC_DEFINE(HAVE_IB_ALLOC_PD_2ARGS, 1,
474                         [ib_alloc_pd has 2 arguments])
475         ])
476
477         LB_CHECK_COMPILE([if function 'ib_inc_rkey' is defined],
478         ib_inc_rkey, [
479                 #ifdef HAVE_COMPAT_RDMA
480                 #undef PACKAGE_NAME
481                 #undef PACKAGE_TARNAME
482                 #undef PACKAGE_VERSION
483                 #undef PACKAGE_STRING
484                 #undef PACKAGE_BUGREPORT
485                 #undef PACKAGE_URL
486                 #include <linux/compat-2.6.h>
487                 #endif
488                 #include <rdma/ib_verbs.h>
489         ],[
490                 (void)ib_inc_rkey(0);
491         ],[
492                 AC_DEFINE(HAVE_IB_INC_RKEY, 1,
493                           [function ib_inc_rkey exist])
494         ])
495
496         # In MOFED 4.6, the second and third parameters for
497         # ib_post_send() and ib_post_recv() are declared with
498         # 'const'.
499         tmp_flags="$EXTRA_KCFLAGS"
500         EXTRA_KCFLAGS="-Werror"
501         LB_CHECK_COMPILE([if 'ib_post_send() and ib_post_recv()' have const parameters],
502         ib_post_send_recv_const, [
503                 #ifdef HAVE_COMPAT_RDMA
504                 #undef PACKAGE_NAME
505                 #undef PACKAGE_TARNAME
506                 #undef PACKAGE_VERSION
507                 #undef PACKAGE_STRING
508                 #undef PACKAGE_BUGREPORT
509                 #undef PACKAGE_URL
510                 #include <linux/compat-2.6.h>
511                 #endif
512                 #include <rdma/ib_verbs.h>
513         ],[
514                 ib_post_send(NULL, (const struct ib_send_wr *)NULL,
515                              (const struct ib_send_wr **)NULL);
516         ],[
517                 AC_DEFINE(HAVE_IB_POST_SEND_RECV_CONST, 1,
518                         [ib_post_send and ib_post_recv have const parameters])
519         ])
520         EXTRA_KCFLAGS="$tmp_flags"
521
522         # 5.0
523         LN_IB_DEVICE_OPS_EXISTS
524         # 5.1
525         LN_IB_SG_DMA_ADDRESS_EXISTS
526
527         # A reason argument was added to rdma_reject() in Linux 5.8,
528         # commit 8094ba0ace7f6cd1e31ea8b151fba3594cadfa9a
529         LB_CHECK_COMPILE([if 4arg 'rdma_reject' exists],
530         rdma_reject, [
531                 #ifdef HAVE_COMPAT_RDMA
532                 #undef PACKAGE_NAME
533                 #undef PACKAGE_TARNAME
534                 #undef PACKAGE_VERSION
535                 #undef PACKAGE_STRING
536                 #undef PACKAGE_BUGREPORT
537                 #undef PACKAGE_URL
538                 #include <linux/compat-2.6.h>
539                 #endif
540                 #include <rdma/ib_verbs.h>
541                 #include <rdma/ib_cm.h>
542                 #include <rdma/rdma_cm.h>
543         ],[
544                 rdma_reject(NULL, NULL, 0, 0);
545         ],[
546                 AC_DEFINE(HAVE_RDMA_REJECT_4ARGS, 1,
547                         [rdma_reject has 4 arguments])
548         ])
549
550         # The FMR pool API was removed in Linux 5.8,
551         # commit 4e373d5417ecbb4f438a8500f0379a2fc29c2643
552         LB_CHECK_COMPILE([if FMR pools API available],
553         ib_fmr, [
554                 #include <rdma/ib_verbs.h>
555         ],[
556                 struct ib_fmr fmr = {};
557         ],[
558                 AC_DEFINE(HAVE_FMR_POOL_API, 1,
559                         [FMR pool API is available])
560         ])
561
562         # rdma_connect_locked() was added in Linux 5.10,
563         # commit 071ba4cc559de47160761b9500b72e8fa09d923d
564         # and in MOFED-5.2-2. rdma_connect_locked() must
565         # be called instead of rdma_connect() in
566         # RDMA_CM_EVENT_ROUTE_RESOLVED handler.
567         LB_CHECK_COMPILE([if 'rdma_connect_locked' exists],
568         rdma_connect_locked, [
569                 #include <rdma/rdma_cm.h>
570         ],[
571                 rdma_connect_locked(NULL, NULL);
572         ],[
573                 AC_DEFINE(HAVE_RDMA_CONNECT_LOCKED, 1,
574                         [rdma_connect_locked is defined])
575         ])
576
577         # ethtool_link_settings was added in Linux 4.6
578         LB_CHECK_COMPILE([if 'ethtool_link_settings' exists],
579         ethtool_link_settings, [
580                 #include <linux/ethtool.h>
581         ],[
582                 struct ethtool_link_ksettings cmd;
583         ],[
584                 AC_DEFINE(HAVE_ETHTOOL_LINK_SETTINGS, 1,
585                         [ethtool_link_settings is defined])
586         ])
587
588         EXTRA_CHECK_INCLUDE=""
589         AC_DEFUN([LN_CONFIG_O2IB_SRC], [])
590         AC_DEFUN([LN_CONFIG_O2IB_RESULTS], [])
591 ]) # ENABLEO2IB != "no"
592 ]) # LN_CONFIG_O2IB
593
594 #
595 # LN_CONFIG_GNILND
596 #
597 # check whether to use the Gemini Network Interface lnd
598 #
599 AC_DEFUN([LN_CONFIG_GNILND], [
600 AC_MSG_CHECKING([whether to enable GNI lnd])
601 AC_ARG_ENABLE([gni],
602         AS_HELP_STRING([--enable-gni],
603                 [enable GNI lnd]),
604         [], [enable_gni="no"])
605 AC_MSG_RESULT([$enable_gni])
606
607 AS_IF([test "x$enable_gni" = xyes], [
608         # GNICPPFLAGS was set in spec file
609         EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
610         EXTRA_KCFLAGS="$EXTRA_KCFLAGS $GNICPPFLAGS"
611         LB_CHECK_COMPILE([if GNI kernel headers are present],
612         GNI_header, [
613                 #include <linux/types.h>
614                 #include <gni_pub.h>
615         ],[
616                 gni_cdm_handle_t kgni_domain;
617                 gni_return_t     rc;
618                 int              rrc;
619                 rc = gni_cdm_create(0, 1, 1, 0, &kgni_domain);
620                 rrc = (rc == GNI_RC_SUCCESS) ? 0 : 1;
621                 return rrc;
622         ],[
623                 GNILND="gnilnd"
624         ],[
625                 AC_MSG_ERROR([cannot compile gnilnd with given GNICPPFLAGS: $GNICPPFLAGS])
626         ])
627         # at this point, we have gnilnd basic support,
628         # now check for extra features
629         LB_CHECK_COMPILE([to use RCA in gnilnd],
630         RCA_gnilnd, [
631                 #include <linux/types.h>
632                 #include <gni_pub.h>
633                 #include <krca_lib.h>
634         ],[
635                 gni_cdm_handle_t kgni_domain;
636                 gni_return_t     rc;
637                 krca_ticket_t    ticket = KRCA_NULL_TICKET;
638                 int              rrc;
639                 __u32            nid = 0, nic_addr;
640                 rc = gni_cdm_create(0, 1, 1, 0, &kgni_domain);
641                 rrc = (rc == GNI_RC_SUCCESS) ? 0 : 1;
642                 rrc += krca_nid_to_nicaddrs(nid, 1, &nic_addr);
643                 rrc += krca_register(&ticket, RCA_MAKE_SERVICE_INDEX(RCA_IO_CLASS, 9), 99, 0);
644                 return rrc;
645         ],[
646                 GNICPPFLAGS="$GNICPPFLAGS -DGNILND_USE_RCA=1"
647         ])
648         EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
649 ])
650 AC_SUBST(GNICPPFLAGS)
651 AC_SUBST(GNILND)
652 ]) # LN_CONFIG_GNILND
653
654 #
655 # LN_CONFIG_KFILND
656 #
657 # check whether to use the kfabric Network Interface lnd
658 #
659 AC_DEFUN([LN_CONFIG_KFILND], [
660 AC_ARG_WITH([kfi],
661         AC_HELP_STRING([--with-kfi=<path>], [Kfabric build path for kfilnd]),
662         [
663                 AC_CHECK_FILE([$with_kfi/Module.symvers],
664                 [
665                         # KFICPPFLAGS was set in spec file
666                         KFICPPFLAGS="-I$with_kfi/include"
667                         EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
668                         EXTRA_KCFLAGS="$EXTRA_KCFLAGS $KFICPPFLAGS"
669                         KBUILD_EXTRA_SYMBOLS="$KBUILD_EXTRA_SYMBOLS $with_kfi/Module.symvers"
670                         LB_CHECK_COMPILE([if kfabric headers are present], KFI_header,
671                         [
672                                 #include <kfi_endpoint.h>
673                         ],[
674                                 struct kfi_info *hints;
675                                 hints = kfi_allocinfo();
676                         ],[
677                                 KFILND="kfilnd"
678                                 AC_MSG_NOTICE([adding $with_kfi/Module.symvers to Symbol Path])
679                                 EXTRA_SYMBOLS="$EXTRA_SYMBOLS $with_kfi/Module.symvers"
680                         ],[
681                                 AC_MSG_ERROR([can't compile kfilnd with given KFICPPFLAGS: $KFICPPFLAGS])
682                         ])
683                 ],[
684                         AC_MSG_ERROR(["$with_kfi/Module.symvers does not exist"])
685                 ])
686         ],[])
687 AC_SUBST(KFICPPFLAGS)
688 AC_SUBST(KFILND)
689 AC_SUBST(EXTRA_SYMBOLS)
690 ]) # LN_CONFIG_KFILND
691
692 # LN_CONFIG_STRSCPY_EXISTS
693 #
694 # If strscpy exists, prefer it over strlcpy
695 #
696 AC_DEFUN([LN_CONFIG_STRSCPY_EXISTS], [
697 tmp_flags="$EXTRA_KCFLAGS"
698 EXTRA_KCFLAGS="-Werror"
699 LB_CHECK_COMPILE([kernel strscpy is available],
700 strscpy_exists, [
701         #include <linux/string.h>
702 ],[
703         strscpy((char *)NULL, (const char *)NULL, 0);
704 ],[
705         AC_DEFINE(HAVE_STRSCPY, 1,
706                 [kernel strscpy is available])
707 ])
708 EXTRA_KCFLAGS="$tmp_flags"
709 ]) # LN_CONFIG_STRSCPY_EXISTS
710
711 # LN_CONFIG_SOCK_CREATE_KERN
712 #
713 # 4.x sock_create_kern() added a first parameter as 'struct net *'
714 # instead of int.
715 #
716 AC_DEFUN([LN_CONFIG_SOCK_CREATE_KERN], [
717 tmp_flags="$EXTRA_KCFLAGS"
718 EXTRA_KCFLAGS="-Werror"
719 LB_CHECK_COMPILE([if 'sock_create_kern' first parameter is net],
720 sock_create_kern_net, [
721         #include <linux/net.h>
722         #include <net/net_namespace.h>
723 ],[
724         sock_create_kern((struct net*)0, 0, 0, 0, NULL);
725 ],[
726         AC_DEFINE(HAVE_SOCK_CREATE_KERN_USE_NET, 1,
727                 [sock_create_kern use net as first parameter])
728 ])
729 EXTRA_KCFLAGS="$tmp_flags"
730 ]) # LN_CONFIG_SOCK_CREATE_KERN
731
732 #
733 # LN_CONFIG_SK_DATA_READY
734 #
735 # 3.15 for struct sock the *sk_data_ready() field only takes one argument now
736 #
737 AC_DEFUN([LN_CONFIG_SK_DATA_READY], [
738 tmp_flags="$EXTRA_KCFLAGS"
739 EXTRA_KCFLAGS="-Werror"
740 LB_CHECK_COMPILE([if 'sk_data_ready' takes only one argument],
741 sk_data_ready, [
742         #include <linux/net.h>
743         #include <net/sock.h>
744 ],[
745         ((struct sock *)0)->sk_data_ready(NULL);
746 ],[
747         AC_DEFINE(HAVE_SK_DATA_READY_ONE_ARG, 1,
748                 [sk_data_ready uses only one argument])
749 ])
750 EXTRA_KCFLAGS="$tmp_flags"
751 ]) # LN_CONFIG_SK_DATA_READY
752
753 #
754 # LN_EXPORT_KMAP_TO_PAGE
755 #
756 # 3.10 Export kmap_to_page
757 #
758 AC_DEFUN([LN_EXPORT_KMAP_TO_PAGE], [
759 LB_CHECK_EXPORT([kmap_to_page], [mm/highmem.c],
760         [AC_DEFINE(HAVE_KMAP_TO_PAGE, 1,
761                 [kmap_to_page is exported by the kernel])])
762 ]) # LN_EXPORT_KMAP_TO_PAG
763
764 #
765 # LN_HAVE_HYPERVISOR_IS_TYPE
766 #
767 # 4.14 commit 79cc74155218316b9a5d28577c7077b2adba8e58
768 # x86/paravirt: Provide a way to check for hypervisors
769 #
770 AC_DEFUN([LN_HAVE_HYPERVISOR_IS_TYPE], [
771 tmp_flags="$EXTRA_KCFLAGS"
772 EXTRA_KCFLAGS="-Werror"
773 LB_CHECK_COMPILE([if hypervisor_is_type function is available],
774 hypervisor_is_type_exists, [
775         #include <asm/hypervisor.h>
776 ],[
777         (void)hypervisor_is_type(X86_HYPER_NATIVE);
778 ],[
779         AC_DEFINE(HAVE_HYPERVISOR_IS_TYPE, 1,
780                 [hypervisor_is_type function exists])
781 ])
782 EXTRA_KCFLAGS="$tmp_flags"
783 ]) # LN_HAVE_HYPERVISOR_IS_TYPE
784
785 #
786 # LN_HAVE_ORACLE_OFED_EXTENSIONS
787 #
788 # Oracle UEK 5
789 #
790 AC_DEFUN([LN_HAVE_ORACLE_OFED_EXTENSIONS], [
791 LB_CHECK_COMPILE([if Oracle OFED Extensions are enabled],
792 oracle_ofed_ext, [
793         #include <rdma/ib_fmr_pool.h>
794 ],[
795         struct ib_fmr_pool_param param = {
796                 .relaxed           = 0
797         };
798         (void)param;
799 ],[
800         AC_DEFINE(HAVE_ORACLE_OFED_EXTENSIONS, 1,
801                 [if Oracle OFED Extensions are enabled])
802 ])
803 ]) # LN_HAVE_ORACLE_OFED_EXTENSIONS
804
805 #
806 # LN_CONFIG_SOCK_GETNAME
807 #
808 # 4.17 commit 9b2c45d479d0fb8647c9e83359df69162b5fbe5f getname()
809 # does not take the length *int argument and returns the length
810 #
811 AC_DEFUN([LN_CONFIG_SOCK_GETNAME], [
812 tmp_flags="$EXTRA_KCFLAGS"
813 EXTRA_KCFLAGS="-Werror"
814 LB_CHECK_COMPILE([if 'getname' has two args],
815 kern_sock_getname_2args, [
816         #include <linux/net.h>
817 ],[
818         kernel_getsockname(NULL, NULL);
819 ],[
820         AC_DEFINE(HAVE_KERN_SOCK_GETNAME_2ARGS, 1,
821                 ['getname' has two args])
822 ])
823 EXTRA_KCFLAGS="$tmp_flags"
824 ]) # LN_CONFIG_SOCK_GETNAME
825
826 #
827 # LN_HAVE_IN_DEV_FOR_EACH_IFA_RTNL
828 #
829 # kernel 5.3 commit ef11db3310e272d3d8dbe8739e0770820dd20e52
830 # and kernel 4.18.0-193.el8:
831 # added in_dev_for_each_ifa_rtnl and in_dev_for_each_ifa_rcu
832 # and removed for_ifa and endfor_ifa.
833 # Use the _rntl variant as the current locking is rtnl.
834 #
835 AC_DEFUN([LN_HAVE_IN_DEV_FOR_EACH_IFA_RTNL], [
836 tmp_flags="$EXTRA_KCFLAGS"
837 EXTRA_KCFLAGS="-Werror"
838 LB_CHECK_COMPILE([if 'in_dev_for_each_ifa_rtnl' is defined],
839 in_dev_for_each_ifa_rtnl_test, [
840         #include <linux/inetdevice.h>
841 ],[
842         const struct in_ifaddr *ifa = NULL;
843         struct in_device *in_dev = NULL;
844
845         in_dev_for_each_ifa_rtnl(ifa, in_dev) {}
846 ],[
847         AC_DEFINE(HAVE_IN_DEV_FOR_EACH_IFA_RTNL, 1,
848                 ['in_dev_for_each_ifa_rtnl' is defined])
849 ])
850 EXTRA_KCFLAGS="$tmp_flags"
851 ]) # LN_HAVE_IN_DEV_FOR_EACH_IFA_RTNL
852
853 #
854 # LN_IB_DEVICE_OPS_EXISTS
855 #
856 # kernel 5.0 commit 521ed0d92ab0db3edd17a5f4716b7f698f4fce61
857 # RDMA/core: Introduce ib_device_ops
858 # ... introduces the ib_device_ops structure that defines all the
859 # InfiniBand device operations in one place ...
860 #
861 AC_DEFUN([LN_IB_DEVICE_OPS_EXISTS], [
862 tmp_flags="$EXTRA_KCFLAGS"
863 EXTRA_KCFLAGS="-Werror"
864 LB_CHECK_COMPILE([if struct ib_device_ops is defined],
865 ib_device_ops_test, [
866         #include <rdma/ib_verbs.h>
867 ],[
868         int x = offsetof(struct ib_device_ops, unmap_fmr);
869         x = x;
870         (void)x;
871 ],[
872         AC_DEFINE(HAVE_IB_DEVICE_OPS, 1,
873                 [if struct ib_device_ops is defined])
874 ])
875 EXTRA_KCFLAGS="$tmp_flags"
876 ]) # LN_IB_DEVICE_OPS_EXISTS
877
878 #
879 # LN_IB_SG_DMA_ADDRESS_EXISTS
880 #
881 # kernel 5.1 commit a163afc88556e099271a7b423295bc5176fcecce
882 # IB/core: Remove ib_sg_dma_address() and ib_sg_dma_len()
883 # ... when dma_ops existed (3.6) ib_sg_dma_address() was not trivial ...
884 #
885 AC_DEFUN([LN_IB_SG_DMA_ADDRESS_EXISTS], [
886 tmp_flags="$EXTRA_KCFLAGS"
887 EXTRA_KCFLAGS="-Werror"
888 LB_CHECK_COMPILE([if ib_sg_dma_address wrapper exists],
889 ib_sg_dma_address_test, [
890         #include <rdma/ib_verbs.h>
891 ],[
892         u64 x = ib_sg_dma_address(NULL, NULL);
893         x = x;
894         (void)x;
895 ],[
896         AC_DEFINE(HAVE_IB_SG_DMA_ADDRESS, 1,
897                 [if ib_sg_dma_address wrapper exists])
898 ])
899 EXTRA_KCFLAGS="$tmp_flags"
900 ]) # LN_IB_SG_DMA_ADDRESS_EXISTS
901
902 #
903 # LN_USR_RDMA
904 #
905 #
906 AC_DEFUN([LN_USR_RDMA], [
907 AC_MSG_CHECKING([if RDMA_PS_TCP exists])
908 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
909         #include <rdma/rdma_user_cm.h>
910
911         int main(void) {
912                 int x = (int)RDMA_PS_TCP;
913                 return x;
914         }
915 ])],[
916         AC_DEFINE(HAVE_USRSPC_RDMA_PS_TCP, 1,
917                 [RDMA_PS_TCP exists])
918 ])
919 ]) # LN_USR_RDMA
920
921
922 AC_DEFUN([LN_PROG_LINUX_SRC], [])
923 AC_DEFUN([LN_PROG_LINUX_RESULTS], [])
924
925 #
926 # LN_PROG_LINUX
927 #
928 # LNet linux kernel checks
929 #
930 AC_DEFUN([LN_PROG_LINUX], [
931 AC_MSG_NOTICE([LNet kernel checks
932 ==============================================================================])
933
934 LN_CONFIG_BACKOFF
935 LN_CONFIG_O2IB
936 LN_CONFIG_GNILND
937 LN_CONFIG_STRSCPY_EXISTS
938 LN_CONFIG_KFILND
939 # 3.10
940 LN_EXPORT_KMAP_TO_PAGE
941 # 3.15
942 LN_CONFIG_SK_DATA_READY
943 # 4.x
944 LN_CONFIG_SOCK_CREATE_KERN
945 # 4.14
946 LN_HAVE_HYPERVISOR_IS_TYPE
947 LN_HAVE_ORACLE_OFED_EXTENSIONS
948 # 4.17
949 LN_CONFIG_SOCK_GETNAME
950 # 5.3 and 4.18.0-193.el8
951 LN_HAVE_IN_DEV_FOR_EACH_IFA_RTNL
952 ]) # LN_PROG_LINUX
953
954 #
955 # LN_PATH_DEFAULTS
956 #
957 # default paths for installed files
958 #
959 AC_DEFUN([LN_PATH_DEFAULTS], [
960 ]) # LN_PATH_DEFAULTS
961
962 #
963 # LN_CONFIGURE
964 #
965 # other configure checks
966 #
967 AC_DEFUN([LN_CONFIGURE], [
968 AC_MSG_NOTICE([LNet core checks
969 ==============================================================================])
970
971 AC_ARG_WITH([cuda],
972         AS_HELP_STRING([--with-cuda=path],
973                         [Use a CUDA sources.]),
974         [LB_ARG_CANON_PATH([cuda], [CUDA_PATH])],
975         [CUDA_PATH=`ls -d1 /usr/src/nvidia-*/nvidia/ | tail -1`]
976 )
977
978 AC_ARG_WITH([gds],
979         AS_HELP_STRING([--with-gds=path],
980                         [Use a gds sources.]),
981         [LB_ARG_CANON_PATH([gds], [GDS_PATH])],
982         [GDS_PATH=`ls -d1 /usr/src/nvidia-fs* | tail -1`]
983 )
984
985 AS_IF([test -n "${CUDA_PATH}" && test -n "${GDS_PATH}"],[
986 LB_CHECK_FILE([$CUDA_PATH/nv-p2p.h],
987         [
988         AC_MSG_RESULT([CUDA path is $CUDA_PATH])
989         AC_SUBST(CUDA_PATH)
990         ],
991         [AC_MSG_ERROR([CUDA sources don't found. nv-p2p.h don't exit])]
992 )
993
994 LB_CHECK_FILE([$GDS_PATH/nvfs-dma.h],
995         [
996         LB_CHECK_FILE([$GDS_PATH/config-host.h], [
997         AC_MSG_RESULT([GDS path is $GDS_PATH])
998         AC_SUBST(GDS_PATH)
999         AC_DEFINE(WITH_GDS, 1, "GDS build enabled")
1000         ], [])
1001         ],
1002         [])
1003 ],[
1004         AC_MSG_WARN([CUDA or GDS sources not found. GDS support disabled])
1005 ]
1006 )
1007
1008 # lnet/utils/lnetconfig/liblnetconfig_netlink.c
1009 AS_IF([test "x$enable_dist" = xno], [
1010         PKG_CHECK_MODULES(LIBNL3, [libnl-genl-3.0 >= 3.1])
1011 ])
1012
1013 AC_CHECK_LIB([nl-3], [nla_get_s32], [
1014         AC_DEFINE(HAVE_NLA_GET_S32, 1,
1015                 [libnl3 supports nla_get_s32])
1016         ], [
1017 ])
1018
1019 AC_CHECK_LIB([nl-3], [nla_get_s64], [
1020         AC_DEFINE(HAVE_NLA_GET_S64, 1,
1021                 [libnl3 supports nla_get_s64])
1022         ], [
1023 ])
1024
1025 #
1026 # LN_USR_NLMSGERR
1027 #
1028 AC_DEFUN([LN_USR_NLMSGERR], [
1029 AC_MSG_CHECKING([if 'enum nlmsgerr_attrs' exists])
1030 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
1031         #include <linux/netlink.h>
1032
1033         int main(void) {
1034                 int x = (int)NLMSGERR_ATTR_MAX;
1035                 return x;
1036         }
1037 ])],[
1038         AC_DEFINE(HAVE_USRSPC_NLMSGERR, 1,
1039                 ['enum nlmsgerr_attrs' exists])
1040 ])
1041 ]) # LN_USR_NLMGSERR
1042
1043 # lnet/utils/portals.c
1044 AC_CHECK_HEADERS([netdb.h])
1045 AC_CHECK_FUNCS([gethostbyname])
1046
1047 # lnet/utils/wirecheck.c
1048 AC_CHECK_FUNCS([strnlen])
1049
1050 # --------  Check for required packages  --------------
1051
1052 AC_MSG_CHECKING([whether to enable 'efence' debugging support])
1053 AC_ARG_ENABLE(efence,
1054         AS_HELP_STRING([--enable-efence],
1055                 [use efence library]),
1056         [], [enable_efence="no"])
1057 AC_MSG_RESULT([$enable_efence])
1058
1059 LIBEFENCE=""
1060 AS_IF([test "$enable_efence" = yes], [
1061         LIBEFENCE="-lefence"
1062         AC_DEFINE(HAVE_LIBEFENCE, 1,
1063                 [libefence support is requested])
1064 ])
1065 AC_SUBST(LIBEFENCE)
1066
1067 LN_CONFIG_DLC
1068 LN_USR_RDMA
1069 LN_USR_NLMSGERR
1070 ]) # LN_CONFIGURE
1071
1072 #
1073 # LN_CONDITIONALS
1074 #
1075 # AM_CONDITIONAL defines for lnet
1076 #
1077 AC_DEFUN([LN_CONDITIONALS], [
1078 AM_CONDITIONAL(BUILD_O2IBLND,    test x$O2IBLND = "xo2iblnd")
1079 AM_CONDITIONAL(BUILD_GNILND,     test x$GNILND  = "xgnilnd")
1080 AM_CONDITIONAL(BUILD_KFILND,     test x$KFILND  = "xkfilnd")
1081 ]) # LN_CONDITIONALS
1082
1083 #
1084 # LN_CONFIG_FILES
1085 #
1086 # files that should be generated with AC_OUTPUT
1087 #
1088 AC_DEFUN([LN_CONFIG_FILES], [
1089 AC_CONFIG_FILES([
1090 lnet/Makefile
1091 lnet/autoMakefile
1092 lnet/autoconf/Makefile
1093 lnet/doc/Makefile
1094 lnet/include/Makefile
1095 lnet/include/lnet/Makefile
1096 lnet/include/uapi/linux/lnet/Makefile
1097 lnet/klnds/Makefile
1098 lnet/klnds/autoMakefile
1099 lnet/klnds/o2iblnd/Makefile
1100 lnet/klnds/o2iblnd/autoMakefile
1101 lnet/klnds/gnilnd/Makefile
1102 lnet/klnds/gnilnd/autoMakefile
1103 lnet/klnds/socklnd/Makefile
1104 lnet/klnds/socklnd/autoMakefile
1105 lnet/klnds/kfilnd/Makefile
1106 lnet/klnds/kfilnd/autoMakefile
1107 lnet/lnet/Makefile
1108 lnet/lnet/autoMakefile
1109 lnet/selftest/Makefile
1110 lnet/selftest/autoMakefile
1111 lnet/utils/Makefile
1112 lnet/utils/lnetconfig/Makefile
1113 ])
1114 ]) # LN_CONFIG_FILES