Whamcloud - gitweb
LU-17662 osd-zfs: Support for ZFS 2.2.3
[fs/lustre-release.git] / config / lustre-build.m4
1 # SPDX-License-Identifier: GPL-2.0
2
3 #
4 # This file is part of Lustre, http://www.lustre.org/
5 #
6 # config/lustre-build.m4
7 #
8 # Generic Lustre configuration options
9 #
10
11 #
12 # LB_CANONICAL_SYSTEM
13 #
14 # fixup $target_os for use in other places
15 #
16 AC_DEFUN([LB_CANONICAL_SYSTEM], [
17 case $target_os in
18         linux*)
19                 lb_target_os="linux"
20                 ;;
21 esac
22 AC_SUBST(lb_target_os)
23 ]) # LB_CANONICAL_SYSTEM
24
25 #
26 # LB_DOWNSTREAM_RELEASE (DEPRECATED)
27 #
28 AC_DEFUN([LB_DOWNSTREAM_RELEASE],
29 [AC_ARG_WITH([downstream-release],,
30         AC_MSG_ERROR([--downstream-release was deprecated.  Please read Documentation/versioning.txt.])
31 )]) # LB_DOWNSTREAM_RELEASE
32
33 #
34 # LB_CHECK_FILE
35 #
36 # Check for file existence even when cross compiling
37 # $1 - file to check
38 # $2 - do 'yes'
39 # $3 - do 'no'
40 #
41 AC_DEFUN([LB_CHECK_FILE], [
42 AS_VAR_PUSHDEF([lb_file], [lb_cv_file_$1])dnl
43 AC_CACHE_CHECK([for $1], lb_file, [
44 AS_IF([test -r "$1"],
45         [AS_VAR_SET(lb_file, [yes])],
46         [AS_VAR_SET(lb_file, [no])])
47 ])
48 AS_VAR_IF([lb_file], [yes], [$2], [$3])[]dnl
49 AS_VAR_POPDEF([lb_file])dnl
50 ]) # LB_CHECK_FILE
51
52 #
53 # LB_ARG_LIBS_INCLUDES
54 #
55 # support for --with-foo, --with-foo-includes, and --with-foo-libs in
56 # a single magical macro
57 #
58 AC_DEFUN([LB_ARG_LIBS_INCLUDES], [
59 lb_pathvar="m4_bpatsubst([$2], -, _)"
60 AC_MSG_CHECKING([for $1])
61 AC_ARG_WITH([$2],
62         AS_HELP_STRING([--with-$2=path],
63                 [path to $1]),
64         [], [withval=$4])
65 AS_IF([test "x$withval" = xyes],
66         [eval "$lb_pathvar='$3'"],
67         [eval "$lb_pathvar='$withval'"])
68 AC_MSG_RESULT([${!lb_pathvar:-no}])
69
70 AS_IF([test "x${!lb_pathvar}" != x -a "x${!lb_pathvar}" != xno], [
71         AC_MSG_CHECKING([for $1 includes])
72         AC_ARG_WITH([$2-includes],
73                 AS_HELP_STRING([--with-$2-includes=path],
74                         [path to $1 includes]),
75                 [], [withval="yes"])
76
77         lb_includevar="${lb_pathvar}_includes"
78         AS_IF([test "x$withval" = xyes],
79                 [eval "${lb_includevar}='${!lb_pathvar}/include'"],
80                 [eval "${lb_includevar}='$withval'"])
81         AC_MSG_RESULT([${!lb_includevar}])
82
83         AC_MSG_CHECKING([for $1 libs])
84         AC_ARG_WITH([$2-libs],
85                 AS_HELP_STRING([--with-$2-libs=path],
86                         [path to $1 libs]),
87                 [], [withval="yes"])
88
89         lb_libvar="${lb_pathvar}_libs"
90         AS_IF([test "x$withval" = xyes],
91                 [eval "${lb_libvar}='${!lb_pathvar}/lib'"],
92                 [eval "${lb_libvar}='$withval'"])
93         AC_MSG_RESULT([${!lb_libvar}])
94 ])
95 ]) # LB_ARG_LIBS_INCLUDES
96
97 #
98 # LB_PATH_LUSTREIOKIT
99 #
100 # We no longer handle external lustre-iokit
101 #
102 AC_DEFUN([LB_PATH_LUSTREIOKIT], [
103 AC_MSG_CHECKING([whether to build iokit])
104 AC_ARG_ENABLE([iokit],
105         AS_HELP_STRING([--disable-iokit],
106                 [disable iokit (default is enable)]),
107         [], [enable_iokit="yes"])
108 AC_MSG_RESULT([$enable_iokit])
109 AS_IF([test "x$enable_iokit" = xyes],
110         [LUSTREIOKIT_SUBDIR="lustre-iokit"],
111         [LUSTREIOKIT_SUBDIR=""])
112 AC_SUBST(LUSTREIOKIT_SUBDIR)
113 AM_CONDITIONAL([BUILD_LUSTREIOKIT], [test "x$enable_iokit" = xyes])
114 ]) # LB_PATH_LUSTREIOKIT
115
116 #
117 # LB_LIBMOUNT
118 #
119 # Check whether build with libmount for mount.lustre.
120 # libmount is part of the util-linux since v2.18.
121 # We need it to manipulate utab file.
122 #
123 AC_DEFUN([LB_LIBMOUNT], [
124 AC_CHECK_HEADER([libmount/libmount.h], [
125         AC_CHECK_LIB([mount], [mnt_update_set_fs], [
126                 LDLIBMOUNT="-lmount"
127                 AC_SUBST(LDLIBMOUNT)
128                 with_libmount="yes"
129         ],[with_libmount="no"])
130 ], [with_libmount="no"])
131 AC_MSG_CHECKING([whether to build with libmount])
132 AS_IF([test "x$with_libmount" = xyes], [
133         AC_MSG_RESULT([yes])
134 ], [
135         AC_MSG_RESULT([no])
136         AC_MSG_ERROR([libmount development package is required])
137 ])
138 ]) # LB_LIBMOUNT
139
140 #
141 # LB_CONFIG_MODULES
142 #
143 # Build kernel modules?
144 #
145 AC_DEFUN([LB_CONFIG_MODULES], [
146 AC_MSG_CHECKING([whether to build Linux kernel modules])
147 AC_ARG_ENABLE([modules],
148         AS_HELP_STRING([--disable-modules],
149                 [disable building of Lustre kernel modules]),
150         [ AC_DEFINE(HAVE_NATIVE_LINUX_CLIENT, 1, [support native Linux client])], [
151                 LC_TARGET_SUPPORTED([enable_modules="yes"],
152                                     [enable_modules="no"])
153         ])
154         AC_MSG_RESULT([$enable_modules ($target_os)])
155         AS_IF([test "x$enable_modules" = xyes], [
156                 AS_IF([test "x$FLEX" = "x"], [AC_MSG_ERROR(
157                         [flex package is required to build kernel modules])])
158                 AS_IF([test "x$BISON" = "x"], [AC_MSG_ERROR(
159                         [bison package is required to build kernel modules])])
160         AS_CASE([$target_os], [linux*], [
161                         # Ensure SUBARCH is defined
162                         SUBARCH=$(echo $target_cpu | sed -e 's/powerpc.*/powerpc/' -e 's/ppc.*/powerpc/' -e 's/x86_64/x86/' -e 's/i.86/x86/' -e 's/k1om/x86/' -e 's/aarch64.*/arm64/' -e 's/armv7.*/arm/')
163                         LB_PROG_LINUX
164                         AS_IF([test "x$enable_server" != xno],
165                                 [LB_EXT4_SOURCE_PATH])
166                 ], [*], [
167                         # This is strange - Lustre supports a target we don't
168                         AC_MSG_ERROR([Modules are not supported on $target_os])
169         ])
170 ])
171
172 AC_DEFUN([LB_KABI_CHECKS], [
173         AS_CASE([$target_os],
174                 [linux*], [
175                         # Ensure SUBARCH is defined
176                         SUBARCH=$(echo $target_cpu | sed -e 's/powerpc.*/powerpc/' -e 's/ppc.*/powerpc/' -e 's/x86_64/x86/' -e 's/i.86/x86/' -e 's/k1om/x86/' -e 's/aarch64.*/arm64/' -e 's/armv7.*/arm/')
177
178                         # Run serial tests
179                         LIBCFS_PROG_LINUX
180                         LN_PROG_LINUX
181                         LC_PROG_LINUX
182                         AS_IF([test "x$enable_zfs" = xyes],
183                                 [LZ_ZFS_KABI_SERIAL])
184
185                         # Run 'early' checks. The results of these are used in
186                         # other configure tests:
187                         LIBCFS_SRC_LOCKDEP_IS_HELD
188                         LIBCFS_SRC_HAVE_WAIT_BIT_HEADER
189                         LIBCFS_SRC_LINUX_BLK_INTEGRITY_HEADER
190                         LIBCFS_SRC_HAVE_MMAP_LOCK
191
192                         LB2_LINUX_TEST_COMPILE_ALL([early],
193                                 [for available lustre kapi interfaces])
194
195                         LIBCFS_LOCKDEP_IS_HELD
196                         LIBCFS_HAVE_WAIT_BIT_HEADER
197                         LIBCFS_LINUX_BLK_INTEGRITY_HEADER
198                         LIBCFS_HAVE_MMAP_LOCK
199
200                         # Run any parallel compile tests
201                         LB_PROG_LINUX_SRC
202                         LIBCFS_PROG_LINUX_SRC
203                         LN_PROG_LINUX_SRC
204                         AS_IF([test "x$enable_server" != xno],
205                                 [LB_EXT4_LDISKFS_TESTS])
206                         LC_PROG_LINUX_SRC
207                         AS_IF([test "x$enable_zfs" = xyes],
208                                 [LZ_KABI_ZFS_TESTS])
209
210                         LB2_LINUX_TEST_COMPILE_ALL([lustre],
211                                 [for available lustre kapi interfaces])
212
213                         # Collect parallel compile tests results
214                         LB_PROG_LINUX_RESULTS
215                         LIBCFS_PROG_LINUX_RESULTS
216                         LN_PROG_LINUX_RESULTS
217                         AS_IF([test "x$enable_server" != xno],
218                                 [LB_EXT4_LDISKFS_CHECKS])
219                         LC_PROG_LINUX_RESULTS
220                         AS_IF([test "x$enable_zfs" = xyes],
221                                 [LZ_KABI_ZFS_CHECKS])
222
223                 ], [*], [
224                         # This is strange - Lustre supports a target we don't
225                         AC_MSG_ERROR([Modules are not supported on $target_os])
226         ])
227         # Use OpenSFS UAPI header path instead of linux kernel
228         CPPFLAGS="-I$PWD/lnet/include/uapi -I$PWD/lustre/include/uapi $CPPFLAGS"
229 ])
230 ]) # LB_CONFIG_MODULES
231
232 #
233 # LB_CONFIG_UTILS
234 #
235 # Build utils?
236 #
237 AC_DEFUN([LB_CONFIG_UTILS], [
238 AC_MSG_CHECKING([whether to build Lustre utilities])
239 AC_ARG_ENABLE([utils],
240         AS_HELP_STRING([--disable-utils],
241                 [disable building of Lustre utility programs]),
242         [], [enable_utils="yes"])
243 AC_MSG_RESULT([$enable_utils])
244 ]) # LB_CONFIG_UTILS
245
246 #
247 # LB_CONFIG_LUTF
248 #
249 # Build LNet Unit Test Framework?
250 #
251 AC_DEFUN([LB_CONFIG_LUTF], [
252 AX_PYTHON_DEVEL()
253 AS_IF([test "x$enable_dist" != xno], [
254         enable_lutf="yes"
255 ], [
256   AS_IF([test "x$PYTHON_VERSION_CHECK" = xno], [
257         enable_lutf="no"
258   ], [
259         AX_PKG_SWIG(2.0, [ enable_lutf="yes" ],
260                          [ enable_lutf="no" ])
261   ])
262 ])
263 AC_ARG_ENABLE([lutf],
264         AS_HELP_STRING([--disable-lutf],
265                 [disable building of LUTF]),
266         [], [enable_lutf="yes"])
267 AC_MSG_CHECKING([whether to build LUTF (LNet Unit Test Framework)])
268 AC_MSG_RESULT([$enable_lutf])
269 ]) # LB_CONFIG_LUTF
270
271 #
272 # LB_CONFIG_TESTS
273 #
274 # Build Lustre/LNet regression tests?
275 #
276 AC_DEFUN([LB_CONFIG_TESTS], [
277 AC_MSG_CHECKING([whether to build Lustre tests])
278 AC_ARG_ENABLE([tests],
279         AS_HELP_STRING([--disable-tests],
280                 [disable building of Lustre tests]),
281         [], [enable_tests="yes"])
282 AC_MSG_RESULT([$enable_tests])
283 ]) # LB_CONFIG_TESTS
284
285 #
286 # LB_CONFIG_DIST
287 #
288 # Just enough configure so that "make dist" is useful
289 #
290 # this simply re-adjusts some defaults, which of course can be overridden
291 # on the configure line after the --for-dist option
292 #
293 AC_DEFUN([LB_CONFIG_DIST], [
294 AC_MSG_CHECKING([whether to configure just enough for make dist])
295 AC_ARG_ENABLE([dist],
296         AS_HELP_STRING([--enable-dist],
297                         [only configure enough for make dist]),
298         [], [enable_dist="no"])
299 AC_MSG_RESULT([$enable_dist])
300 AS_IF([test "x$enable_dist" != xno], [
301         enable_doc="no"
302         enable_utils="no"
303         enable_tests="no"
304         enable_modules="no"
305 ])
306 ]) # LB_CONFIG_DIST
307
308 #
309 # LB_CONFIG_DOCS
310 #
311 # Build docs?
312 #
313 AC_DEFUN([LB_CONFIG_DOCS], [
314 AC_MSG_CHECKING([whether to build Lustre docs])
315 AC_ARG_ENABLE([doc],
316         AS_HELP_STRING([--disable-doc],
317                         [skip creation of pdf documentation]),
318         [], [enable_doc="no"])
319 AC_MSG_RESULT([$enable_doc])
320 AS_IF([test "x$enable_doc" = xyes],
321         [ENABLE_DOC=1], [ENABLE_DOC=0])
322 AC_SUBST(ENABLE_DOC)
323 ]) # LB_CONFIG_DOCS
324
325 #
326 # LB_CONFIG_MANPAGES
327 #
328 # Build manpages?
329 #
330 AC_DEFUN([LB_CONFIG_MANPAGES], [
331 AC_MSG_CHECKING([whether to build Lustre manpages])
332 AC_ARG_ENABLE([manpages],
333         AS_HELP_STRING([--disable-manpages],
334                         [skip creation and inclusion of man pages (default is enable)]),
335         [], [enable_manpages="yes"])
336 AC_MSG_RESULT([$enable_manpages])
337 ]) # LB_CONFIG_MANPAGES
338
339 #
340 # LB_CONFIG_HEADERS
341 #
342 # add -include config.h
343 #
344 AC_DEFUN([LB_CONFIG_HEADERS], [
345 AC_CONFIG_HEADERS([config.h])
346 CPPFLAGS="-include $PWD/undef.h -include $PWD/config.h $CPPFLAGS"
347 EXTRA_KCFLAGS="-include $PWD/undef.h -include $PWD/config.h $EXTRA_KCFLAGS"
348 AC_SUBST(EXTRA_KCFLAGS)
349 ]) # LB_CONFIG_HEADERS
350
351 #
352 # LB_INCLUDE_RULES
353 #
354 # defines for including the toplevel Rules
355 #
356 AC_DEFUN([LB_INCLUDE_RULES], [
357 INCLUDE_RULES="include $PWD/Rules"
358 AC_SUBST(INCLUDE_RULES)
359 ]) # LB_INCLUDE_RULES
360
361 #
362 # LB_PATH_DEFAULTS
363 #
364 # 'fixup' default paths
365 #
366 AC_DEFUN([LB_PATH_DEFAULTS], [
367 # directories for binaries
368 AC_PREFIX_DEFAULT([/usr])
369
370 sysconfdir='/etc'
371 AC_SUBST(sysconfdir)
372
373 # Directories for documentation and demos.
374 docdir='${datadir}/doc/$(PACKAGE)'
375 AC_SUBST(docdir)
376
377 LIBCFS_PATH_DEFAULTS
378 LN_PATH_DEFAULTS
379 LC_PATH_DEFAULTS
380 ]) # LB_PATH_DEFAULTS
381
382 #
383 # LB_CONDITIONALS
384 #
385 # AM_CONDITIONAL instances for everything
386 # (so that portals/lustre can disable some if needed)
387 #
388 AC_DEFUN([LB_CONDITIONALS], [
389 AM_CONDITIONAL([PLUGINS], [test x$enable_shared = xyes])
390 AM_CONDITIONAL([MODULES], [test x$enable_modules = xyes])
391 AM_CONDITIONAL([UTILS], [test x$enable_utils = xyes])
392 AM_CONDITIONAL([TESTS], [test x$enable_tests = xyes])
393 AM_CONDITIONAL([DOC], [test x$ENABLE_DOC = x1])
394 AM_CONDITIONAL([MANPAGES], [test x$enable_manpages = xyes])
395 AM_CONDITIONAL([LINUX], [test x$lb_target_os = xlinux])
396 AM_CONDITIONAL([USE_QUILT], [test x$use_quilt = xyes])
397 AM_CONDITIONAL([RHEL], [test -f /etc/redhat-release -o -f /etc/openEuler-release])
398 AM_CONDITIONAL([SUSE], [test -f /etc/SUSE-brand -o -f /etc/SuSE-release])
399 AM_CONDITIONAL([UBUNTU], [test x$UBUNTU_KERNEL = xyes])
400 AM_CONDITIONAL([BUILD_LUTF], [test x$enable_lutf = xyes])
401 AM_CONDITIONAL([DEQUOTE_CC_VERSION_TEXT], [test x$lb_cv_dequote_CC_VERSION_TEXT = xyes])
402
403 LN_CONDITIONALS
404 LC_CONDITIONALS
405 ]) # LB_CONDITIONALS
406
407 #
408 # LB_CONFIG_FILES
409 #
410 # build-specific config files
411 #
412 AC_DEFUN([LB_CONFIG_FILES], [
413         AC_CONFIG_FILES([
414                 Makefile
415                 autoMakefile]
416                 config/Makefile
417                 [Rules:build/Rules.in]
418                 AC_PACKAGE_TARNAME[.spec]
419                 AC_PACKAGE_TARNAME[-dkms.spec]
420                 ldiskfs/Makefile
421                 ldiskfs/autoMakefile
422                 lustre/utils/lustre.pc
423                 lustre-iokit/Makefile
424                 lustre-iokit/obdfilter-survey/Makefile
425                 lustre-iokit/ost-survey/Makefile
426                 lustre-iokit/sgpdd-survey/Makefile
427                 lustre-iokit/mds-survey/Makefile
428                 lustre-iokit/ior-survey/Makefile
429                 lustre-iokit/stats-collect/Makefile
430                 lustre-iokit/lst-survey/Makefile
431         )
432 ])
433
434 #
435 # LB_CONFIG_SERVERS
436 #
437 AC_DEFUN([LB_CONFIG_SERVERS], [
438 AC_ARG_ENABLE([server],
439         AS_HELP_STRING([--disable-server],
440                         [disable Lustre server support]), [
441                 AS_IF([test x$enable_server != xyes -a x$enable_server != xno],
442                         [AC_MSG_ERROR([server valid options are "yes" or "no"])])
443                 AS_IF([test x$enable_server = xyes -a x$enable_dist = xyes],
444                         [AC_MSG_ERROR([--enable-server cannot be used with --enable-dist])])
445         ], [
446                 AS_IF([test x$enable_dist = xyes],
447                         [enable_server=no], [enable_server=maybe])
448         ])
449
450 # There are at least two good reasons why we should really run
451 # LB_CONFIG_MODULES elsewhere before the call to LB_CONFIG_SERVERS:
452 # LB_CONFIG_MODULES needs to be run for client support even when
453 # servers are disabled, and because module support is actually a
454 # prerequisite of server support.  However, some things under
455 # LB_CONFIG_MODULES need us to already have checked for --disable-server,
456 # before running, so until LB_CONFIG_MODULES can be reorganized, we
457 # call it here.
458 LB_CONFIG_MODULES
459 AS_IF([test x$enable_modules = xno], [enable_server=no])
460 LB_CONFIG_LDISKFS
461 LB_CONFIG_ZFS
462 AS_IF([test "x$enable_dist" = xno], [
463         LB_KABI_LDISKFS
464         LZ_KABI_ZFS
465         LB_KABI_CHECKS
466 ])
467
468 # If no backends were configured, and the user did not explicitly
469 # require servers to be enabled, we just disable servers.
470 AS_IF([test x$enable_ldiskfs = xno -a x$enable_zfs = xno], [
471         AS_CASE([$enable_server],
472                 [maybe], [enable_server=no],
473                 [yes], [AC_MSG_ERROR([cannot enable servers, no backends were configured])])
474         ], [
475                 AS_IF([test x$enable_server = xmaybe], [enable_server=yes])
476         ])
477
478 AC_MSG_CHECKING([whether to build Lustre server support])
479 AC_MSG_RESULT([$enable_server])
480 AS_IF([test x$enable_server = xyes], [
481         AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server])
482         AC_SUBST(ENABLE_SERVER, yes)
483 ], [
484         AC_SUBST(ENABLE_SERVER, no)
485 ])
486 ]) # LB_CONFIG_SERVERS
487
488 #
489 # LB_CONFIG_RPMBUILD_OPTIONS
490 #
491 # The purpose of this function is to assemble command line options
492 # for the rpmbuild command based on the options passed to the configure
493 # script, and also upon the decisions that configure makes based on
494 # the tests that it runs.
495 # These strings can be passed to rpmbuild on the command line
496 # in the Make targets named "rpms" and "srpm".
497 #
498 AC_DEFUN([LB_CONFIG_RPMBUILD_OPTIONS], [
499 RPMBINARGS=
500 CONFIGURE_ARGS=
501 eval set -- $ac_configure_args
502 for arg; do
503         case $arg in
504                 --*dir=* ) ;;
505                 -C | --cache-file=* ) ;;
506                 --prefix=* | --*-prefix=* ) ;;
507                 --enable-dist ) ;;
508                 --with-kmp-moddir=* ) ;;
509                 --with-linux=* | --with-linux-obj=* ) ;;
510                 --enable-shared | --disable-shared ) ;;
511                 --enable-static | --disable-static ) ;;
512                 --enable-ldiskfs | --disable-ldiskfs ) ;;
513                 --enable-modules | --disable-modules ) ;;
514                 --enable-server | --disable-server ) ;;
515                 --enable-tests | --disable-tests ) ;;
516                 --enable-utils | --disable-utils ) ;;
517                 --enable-iokit | --disable-iokit ) ;;
518                 --enable-manpages | --disable-manpages ) ;;
519                 * ) CONFIGURE_ARGS="$CONFIGURE_ARGS '$arg'" ;;
520         esac
521 done
522 if test -n "$CONFIGURE_ARGS" ; then
523         RPMBINARGS="$RPMBINARGS --define \"configure_args $CONFIGURE_ARGS\""
524 fi
525 if test -n "$LINUX" ; then
526         RPMBINARGS="$RPMBINARGS --define \"kdir $LINUX\""
527         if test -n "$LINUX_OBJ" -a "$LINUX_OBJ" != x"$LINUX" ; then
528                 RPMBINARGS="$RPMBINARGS --define \"kobjdir $LINUX_OBJ\""
529         fi
530 fi
531 if test x$enable_modules != xyes ; then
532         RPMBINARGS="$RPMBINARGS --without lustre_modules"
533 fi
534 if test x$enable_tests != xyes ; then
535         RPMBINARGS="$RPMBINARGS --without lustre_tests"
536 fi
537 if test x$enable_lutf != xyes ; then
538         RPMBINARGS="$RPMBINARGS --without lustre_tests_lutf"
539 fi
540 if test x$enable_utils != xyes ; then
541         RPMBINARGS="$RPMBINARGS --without lustre_utils"
542 fi
543 if test x$enable_server != xyes ; then
544         RPMBINARGS="$RPMBINARGS --without servers"
545 fi
546 if test x$enable_ldiskfs != xyes ; then
547         RPMBINARGS="$RPMBINARGS --without ldiskfs"
548 fi
549 if test x$enable_zfs = xyes ; then
550         RPMBINARGS="$RPMBINARGS --with zfs"
551 fi
552 if test x$enable_gss_keyring = xyes ; then
553         RPMBINARGS="$RPMBINARGS --with gss_keyring --with gss"
554 fi
555 if test x$enable_gss = xyes ; then
556         RPMBINARGS="$RPMBINARGS --with gss"
557         AC_SUBST(ENABLE_GSS, yes)
558 elif test x$enable_gss = xno ; then
559         RPMBINARGS="$RPMBINARGS --without gss"
560         AC_SUBST(ENABLE_GSS, no)
561 fi
562 if test x$enable_crypto = xyes ; then
563         RPMBINARGS="$RPMBINARGS --with crypto"
564         AC_SUBST(ENABLE_CRYPTO, yes)
565 elif test x$enable_crypto = xno ; then
566         RPMBINARGS="$RPMBINARGS --without crypto"
567         AC_SUBST(ENABLE_CRYPTO, no)
568 fi
569 if test x$enable_multiple_lnds = xyes ; then
570         RPMBINARGS="$RPMBINARGS --with multiple_lnds"
571 else
572         RPMBINARGS="$RPMBINARGS --without multiple_lnds"
573 fi
574 if test x$EXTERNAL_KO2IBLND = xyes ; then
575         RPMBINARGS="$RPMBINARGS --with mofed"
576 else
577         RPMBINARGS="$RPMBINARGS --without mofed"
578 fi
579 if test x$BUILT_IN_KO2IBLND = xyes ; then
580         RPMBINARGS="$RPMBINARGS --with o2ib"
581 else
582         RPMBINARGS="$RPMBINARGS --without o2ib"
583 fi
584 if test x$KFILND = xkfilnd ; then
585         RPMBINARGS="$RPMBINARGS --with kfi"
586 else
587         RPMBINARGS="$RPMBINARGS --without kfi"
588 fi
589 if test x$ENABLE_GNI = xyes ; then
590         RPMBINARGS="$RPMBINARGS --with gni"
591 else
592         RPMBINARGS="$RPMBINARGS --without gni"
593 fi
594 if test x$enable_iokit != xyes ; then
595         RPMBINARGS="$RPMBINARGS --without lustre_iokit"
596 fi
597 if test x$enable_manpages != xyes ; then
598         RPMBINARGS="$RPMBINARGS --without manpages"
599 fi
600 if test x$enable_shared != xyes ; then
601         RPMBINARGS="$RPMBINARGS --without shared"
602 fi
603 if test x$enable_static != xyes ; then
604         RPMBINARGS="$RPMBINARGS --without static"
605 fi
606 if test x$enable_mpitests != xyes ; then
607         RPMBINARGS="$RPMBINARGS --without mpi"
608 fi
609
610 RPMBUILD_BINARY_ARGS=$RPMBINARGS
611
612 AC_SUBST(RPMBUILD_BINARY_ARGS)
613 ]) # LB_CONFIG_RPMBUILD_OPTIONS
614
615 #
616 # LB_CONFIG_CACHE_OPTIONS
617 #
618 # Propagate config cache option
619 #
620 AC_DEFUN([LB_CONFIG_CACHE_OPTIONS], [
621 CONFIG_CACHE_FILE=
622 if test -f "$cache_file"; then
623         CONFIG_CACHE_FILE=$(readlink --canonicalize "$cache_file")
624 fi
625 AC_SUBST(CONFIG_CACHE_FILE)
626 ]) # LB_CONFIG_CACHE_OPTIONS
627
628 #
629 # LB_CONFIGURE
630 #
631 # main configure steps
632 #
633 AC_DEFUN([LB_CONFIGURE], [
634 AC_MSG_NOTICE([Lustre base checks
635 ==============================================================================])
636 LB_CANONICAL_SYSTEM
637
638 LB_CONFIG_DIST
639
640 LB_DOWNSTREAM_RELEASE
641 LB_USES_DPKG
642
643 LB_INCLUDE_RULES
644
645 LB_PATH_DEFAULTS
646
647 LC_OSD_ADDON
648
649 LB_CONFIG_DOCS
650 LB_CONFIG_MANPAGES
651 LB_CONFIG_UTILS
652 LB_CONFIG_TESTS
653 LB_CONFIG_LUTF
654 LC_CONFIG_CLIENT
655 LB_CONFIG_MPITESTS
656 LB_CONFIG_SERVERS
657 LC_CONFIG_CRYPTO
658 LC_GLIBC_SUPPORT_COPY_FILE_RANGE
659 LC_OPENSSL_SSK
660
661 # Tests depends from utils (multiop from liblustreapi)
662 AS_IF([test "x$enable_utils" = xno], [enable_tests="no"])
663
664 AS_IF([test "x$enable_utils" = xyes], [
665         LC_OPENSSL_GETSEPOL
666         LC_CONFIG_GETSEPOL
667         LC_FID2PATH_ANON_UNION
668 ])
669 AS_IF([test "x$enable_tests" = xyes], [
670         LC_HAVE_LIBAIO
671         LC_GLIBC_SUPPORT_FHANDLES
672 ])
673
674 LIBCFS_CONFIG_CDEBUG
675 LC_QUOTA
676
677 AS_IF([test "x$enable_dist" != xno], [],[LB_LIBMOUNT])
678 LB_PATH_LUSTREIOKIT
679
680 LB_DEFINE_E2FSPROGS_NAMES
681
682 LIBCFS_CONFIGURE
683 LN_CONFIGURE
684 LC_CONFIGURE
685
686 LB_CONDITIONALS
687 LB_CONFIG_HEADERS
688
689 LPLUG_CONFIGURE
690 LIBCFS_CONFIG_FILES
691 LB_CONFIG_FILES
692 LN_CONFIG_FILES
693 LC_CONFIG_FILES
694 LPLUG_CONFIG_FILES
695
696 AC_SUBST(ac_configure_args)
697
698 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
699 AC_SUBST(MOSTLYCLEANFILES)
700
701 LB_CONFIG_RPMBUILD_OPTIONS
702 LB_CONFIG_CACHE_OPTIONS
703
704 AS_IF([test -d $TEST_DIR -a "x${PARALLEL_BUILD_OPT}" != "xdebug"], [
705         AC_MSG_NOTICE([remove temporary parallel configure dir $TEST_DIR])
706         rm -rf $TEST_DIR
707 ])
708
709 AC_OUTPUT
710 ]) # LB_CONFIGURE