Whamcloud - gitweb
LU-15743 utils: add --xattr option to lfs find
[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
156 AS_IF([test "x$enable_modules" = xyes], [
157         AS_IF([test "x$FLEX" = "x"], [AC_MSG_ERROR([flex package is required to build kernel modules])])
158         AS_IF([test "x$BISON" = "x"], [AC_MSG_ERROR([bison package is required to build kernel modules])])
159         AS_CASE([$target_os],
160                 [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
164                         # Run serial tests
165                         LB_PROG_LINUX
166                         LIBCFS_PROG_LINUX
167                         LN_PROG_LINUX
168                         AS_IF([test "x$enable_server" != xno], [LB_EXT4_SRC_DIR])
169                         LC_PROG_LINUX
170
171                         # Run 'early' checks. The results of these are used in
172                         # other configure tests:
173                         LIBCFS_SRC_LOCKDEP_IS_HELD
174                         LIBCFS_SRC_HAVE_WAIT_BIT_HEADER
175                         LIBCFS_SRC_LINUX_BLK_INTEGRITY_HEADER
176
177                         LB2_LINUX_TEST_COMPILE_ALL([early],
178                                 [for available lustre kapi interfaces])
179
180                         LIBCFS_LOCKDEP_IS_HELD
181                         LIBCFS_HAVE_WAIT_BIT_HEADER
182                         LIBCFS_LINUX_BLK_INTEGRITY_HEADER
183
184                         # Run any parallel compile tests
185                         LB_PROG_LINUX_SRC
186                         LIBCFS_PROG_LINUX_SRC
187                         LN_PROG_LINUX_SRC
188                         AS_IF([test "x$enable_server" != xno], [LB_EXT4_SRC_DIR_SRC])
189                         LC_PROG_LINUX_SRC
190
191                         LB2_LINUX_TEST_COMPILE_ALL([lustre],
192                                 [for available lustre kapi interfaces])
193
194                         # Collect parallel compile tests results
195                         LB_PROG_LINUX_RESULTS
196                         LIBCFS_PROG_LINUX_RESULTS
197                         LN_PROG_LINUX_RESULTS
198                         AS_IF([test "x$enable_server" != xno], [LB_EXT4_SRC_DIR_RESULTS])
199                         LC_PROG_LINUX_RESULTS
200
201                 ], [*], [
202                         # This is strange - Lustre supports a target we don't
203                         AC_MSG_ERROR([Modules are not supported on $target_os])
204         ])
205         # Use OpenSFS UAPI header path instead of linux kernel
206         CPPFLAGS="-I$PWD/lnet/include/uapi -I$PWD/lustre/include/uapi $CPPFLAGS"
207 ])
208 ]) # LB_CONFIG_MODULES
209
210 #
211 # LB_CONFIG_UTILS
212 #
213 # Build utils?
214 #
215 AC_DEFUN([LB_CONFIG_UTILS], [
216 AC_MSG_CHECKING([whether to build Lustre utilities])
217 AC_ARG_ENABLE([utils],
218         AS_HELP_STRING([--disable-utils],
219                 [disable building of Lustre utility programs]),
220         [], [enable_utils="yes"])
221 AC_MSG_RESULT([$enable_utils])
222 ]) # LB_CONFIG_UTILS
223
224 #
225 # LB_CONFIG_LUTF
226 #
227 # Build LNet Unit Test Framework?
228 #
229 AC_DEFUN([LB_CONFIG_LUTF], [
230 AX_PYTHON_DEVEL()
231 AS_IF([test "x$enable_dist" != xno], [
232         enable_lutf="yes"
233 ], [
234   AS_IF([test "x$PYTHON_VERSION_CHECK" = xno], [
235         enable_lutf="no"
236   ], [
237         AX_PKG_SWIG(2.0, [ enable_lutf="yes" ],
238                          [ enable_lutf="no" ])
239   ])
240 ])
241 AC_ARG_ENABLE([lutf],
242         AS_HELP_STRING([--disable-lutf],
243                 [disable building of LUTF]),
244         [], [enable_lutf="yes"])
245 AC_MSG_CHECKING([whether to build LUTF (LNet Unit Test Framework)])
246 AC_MSG_RESULT([$enable_lutf])
247 ]) # LB_CONFIG_LUTF
248
249 #
250 # LB_CONFIG_TESTS
251 #
252 # Build Lustre/LNet regression tests?
253 #
254 AC_DEFUN([LB_CONFIG_TESTS], [
255 AC_MSG_CHECKING([whether to build Lustre tests])
256 AC_ARG_ENABLE([tests],
257         AS_HELP_STRING([--disable-tests],
258                 [disable building of Lustre tests]),
259         [], [enable_tests="yes"])
260 AC_MSG_RESULT([$enable_tests])
261 ]) # LB_CONFIG_TESTS
262
263 #
264 # LB_CONFIG_DIST
265 #
266 # Just enough configure so that "make dist" is useful
267 #
268 # this simply re-adjusts some defaults, which of course can be overridden
269 # on the configure line after the --for-dist option
270 #
271 AC_DEFUN([LB_CONFIG_DIST], [
272 AC_MSG_CHECKING([whether to configure just enough for make dist])
273 AC_ARG_ENABLE([dist],
274         AS_HELP_STRING([--enable-dist],
275                         [only configure enough for make dist]),
276         [], [enable_dist="no"])
277 AC_MSG_RESULT([$enable_dist])
278 AS_IF([test "x$enable_dist" != xno], [
279         enable_doc="no"
280         enable_utils="no"
281         enable_tests="no"
282         enable_modules="no"
283 ])
284 ]) # LB_CONFIG_DIST
285
286 #
287 # LB_CONFIG_DOCS
288 #
289 # Build docs?
290 #
291 AC_DEFUN([LB_CONFIG_DOCS], [
292 AC_MSG_CHECKING([whether to build Lustre docs])
293 AC_ARG_ENABLE([doc],
294         AS_HELP_STRING([--disable-doc],
295                         [skip creation of pdf documentation]),
296         [], [enable_doc="no"])
297 AC_MSG_RESULT([$enable_doc])
298 AS_IF([test "x$enable_doc" = xyes],
299         [ENABLE_DOC=1], [ENABLE_DOC=0])
300 AC_SUBST(ENABLE_DOC)
301 ]) # LB_CONFIG_DOCS
302
303 #
304 # LB_CONFIG_MANPAGES
305 #
306 # Build manpages?
307 #
308 AC_DEFUN([LB_CONFIG_MANPAGES], [
309 AC_MSG_CHECKING([whether to build Lustre manpages])
310 AC_ARG_ENABLE([manpages],
311         AS_HELP_STRING([--disable-manpages],
312                         [skip creation and inclusion of man pages (default is enable)]),
313         [], [enable_manpages="yes"])
314 AC_MSG_RESULT([$enable_manpages])
315 ]) # LB_CONFIG_MANPAGES
316
317 #
318 # LB_CONFIG_HEADERS
319 #
320 # add -include config.h
321 #
322 AC_DEFUN([LB_CONFIG_HEADERS], [
323 AC_CONFIG_HEADERS([config.h])
324 CPPFLAGS="-include $PWD/undef.h -include $PWD/config.h $CPPFLAGS"
325 EXTRA_KCFLAGS="-include $PWD/undef.h -include $PWD/config.h $EXTRA_KCFLAGS"
326 AC_SUBST(EXTRA_KCFLAGS)
327 ]) # LB_CONFIG_HEADERS
328
329 #
330 # LB_INCLUDE_RULES
331 #
332 # defines for including the toplevel Rules
333 #
334 AC_DEFUN([LB_INCLUDE_RULES], [
335 INCLUDE_RULES="include $PWD/Rules"
336 AC_SUBST(INCLUDE_RULES)
337 ]) # LB_INCLUDE_RULES
338
339 #
340 # LB_PATH_DEFAULTS
341 #
342 # 'fixup' default paths
343 #
344 AC_DEFUN([LB_PATH_DEFAULTS], [
345 # directories for binaries
346 AC_PREFIX_DEFAULT([/usr])
347
348 sysconfdir='/etc'
349 AC_SUBST(sysconfdir)
350
351 # Directories for documentation and demos.
352 docdir='${datadir}/doc/$(PACKAGE)'
353 AC_SUBST(docdir)
354
355 LIBCFS_PATH_DEFAULTS
356 LN_PATH_DEFAULTS
357 LC_PATH_DEFAULTS
358 ]) # LB_PATH_DEFAULTS
359
360 #
361 # LB_CONDITIONALS
362 #
363 # AM_CONDITIONAL instances for everything
364 # (so that portals/lustre can disable some if needed)
365 #
366 AC_DEFUN([LB_CONDITIONALS], [
367 AM_CONDITIONAL([PLUGINS], [test x$enable_shared = xyes])
368 AM_CONDITIONAL([MODULES], [test x$enable_modules = xyes])
369 AM_CONDITIONAL([UTILS], [test x$enable_utils = xyes])
370 AM_CONDITIONAL([TESTS], [test x$enable_tests = xyes])
371 AM_CONDITIONAL([DOC], [test x$ENABLE_DOC = x1])
372 AM_CONDITIONAL([MANPAGES], [test x$enable_manpages = xyes])
373 AM_CONDITIONAL([LINUX], [test x$lb_target_os = xlinux])
374 AM_CONDITIONAL([USE_QUILT], [test x$use_quilt = xyes])
375 AM_CONDITIONAL([RHEL], [test -f /etc/redhat-release -o -f /etc/openEuler-release])
376 AM_CONDITIONAL([SUSE], [test -f /etc/SUSE-brand -o -f /etc/SuSE-release])
377 AM_CONDITIONAL([UBUNTU], [test x$UBUNTU_KERNEL = xyes])
378 AM_CONDITIONAL([BUILD_LUTF], [test x$enable_lutf = xyes])
379 AM_CONDITIONAL([DEQUOTE_CC_VERSION_TEXT], [test x$lb_cv_dequote_CC_VERSION_TEXT = xyes])
380
381 LN_CONDITIONALS
382 LC_CONDITIONALS
383 ]) # LB_CONDITIONALS
384
385 #
386 # LB_CONFIG_FILES
387 #
388 # build-specific config files
389 #
390 AC_DEFUN([LB_CONFIG_FILES], [
391         AC_CONFIG_FILES([
392                 Makefile
393                 autoMakefile]
394                 config/Makefile
395                 [Rules:build/Rules.in]
396                 AC_PACKAGE_TARNAME[.spec]
397                 AC_PACKAGE_TARNAME[-dkms.spec]
398                 ldiskfs/Makefile
399                 ldiskfs/autoMakefile
400                 lustre/utils/lustre.pc
401                 lustre-iokit/Makefile
402                 lustre-iokit/obdfilter-survey/Makefile
403                 lustre-iokit/ost-survey/Makefile
404                 lustre-iokit/sgpdd-survey/Makefile
405                 lustre-iokit/mds-survey/Makefile
406                 lustre-iokit/ior-survey/Makefile
407                 lustre-iokit/stats-collect/Makefile
408                 lustre-iokit/lst-survey/Makefile
409         )
410 ])
411
412 #
413 # LB_CONFIG_SERVERS
414 #
415 AC_DEFUN([LB_CONFIG_SERVERS], [
416 AC_ARG_ENABLE([server],
417         AS_HELP_STRING([--disable-server],
418                         [disable Lustre server support]), [
419                 AS_IF([test x$enable_server != xyes -a x$enable_server != xno],
420                         [AC_MSG_ERROR([server valid options are "yes" or "no"])])
421                 AS_IF([test x$enable_server = xyes -a x$enable_dist = xyes],
422                         [AC_MSG_ERROR([--enable-server cannot be used with --enable-dist])])
423         ], [
424                 AS_IF([test x$enable_dist = xyes],
425                         [enable_server=no], [enable_server=maybe])
426         ])
427
428 # There are at least two good reasons why we should really run
429 # LB_CONFIG_MODULES elsewhere before the call to LB_CONFIG_SERVERS:
430 # LB_CONFIG_MODULES needs to be run for client support even when
431 # servers are disabled, and because module support is actually a
432 # prerequisite of server support.  However, some things under
433 # LB_CONFIG_MODULES need us to already have checked for --disable-server,
434 # before running, so until LB_CONFIG_MODULES can be reorganized, we
435 # call it here.
436 LB_CONFIG_MODULES
437 AS_IF([test x$enable_modules = xno], [enable_server=no])
438 LB_CONFIG_LDISKFS
439 LB_CONFIG_ZFS
440
441 # If no backends were configured, and the user did not explicitly
442 # require servers to be enabled, we just disable servers.
443 AS_IF([test x$enable_ldiskfs = xno -a x$enable_zfs = xno], [
444         AS_CASE([$enable_server],
445                 [maybe], [enable_server=no],
446                 [yes], [AC_MSG_ERROR([cannot enable servers, no backends were configured])])
447         ], [
448                 AS_IF([test x$enable_server = xmaybe], [enable_server=yes])
449         ])
450
451 AC_MSG_CHECKING([whether to build Lustre server support])
452 AC_MSG_RESULT([$enable_server])
453 AS_IF([test x$enable_server = xyes], [
454         AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server])
455         AC_SUBST(ENABLE_SERVER, yes)
456 ], [
457         AC_SUBST(ENABLE_SERVER, no)
458 ])
459 ]) # LB_CONFIG_SERVERS
460
461 #
462 # LB_CONFIG_RPMBUILD_OPTIONS
463 #
464 # The purpose of this function is to assemble command line options
465 # for the rpmbuild command based on the options passed to the configure
466 # script, and also upon the decisions that configure makes based on
467 # the tests that it runs.
468 # These strings can be passed to rpmbuild on the command line
469 # in the Make targets named "rpms" and "srpm".
470 #
471 AC_DEFUN([LB_CONFIG_RPMBUILD_OPTIONS], [
472 RPMBINARGS=
473 CONFIGURE_ARGS=
474 eval set -- $ac_configure_args
475 for arg; do
476         case $arg in
477                 --*dir=* ) ;;
478                 -C | --cache-file=* ) ;;
479                 --prefix=* | --*-prefix=* ) ;;
480                 --enable-dist ) ;;
481                 --with-kmp-moddir=* ) ;;
482                 --with-linux=* | --with-linux-obj=* ) ;;
483                 --enable-shared | --disable-shared ) ;;
484                 --enable-static | --disable-static ) ;;
485                 --enable-ldiskfs | --disable-ldiskfs ) ;;
486                 --enable-modules | --disable-modules ) ;;
487                 --enable-server | --disable-server ) ;;
488                 --enable-tests | --disable-tests ) ;;
489                 --enable-utils | --disable-utils ) ;;
490                 --enable-iokit | --disable-iokit ) ;;
491                 --enable-manpages | --disable-manpages ) ;;
492                 * ) CONFIGURE_ARGS="$CONFIGURE_ARGS '$arg'" ;;
493         esac
494 done
495 if test -n "$CONFIGURE_ARGS" ; then
496         RPMBINARGS="$RPMBINARGS --define \"configure_args $CONFIGURE_ARGS\""
497 fi
498 if test -n "$LINUX" ; then
499         RPMBINARGS="$RPMBINARGS --define \"kdir $LINUX\""
500         if test -n "$LINUX_OBJ" -a "$LINUX_OBJ" != x"$LINUX" ; then
501                 RPMBINARGS="$RPMBINARGS --define \"kobjdir $LINUX_OBJ\""
502         fi
503 fi
504 if test x$enable_modules != xyes ; then
505         RPMBINARGS="$RPMBINARGS --without lustre_modules"
506 fi
507 if test x$enable_tests != xyes ; then
508         RPMBINARGS="$RPMBINARGS --without lustre_tests"
509 fi
510 if test x$enable_lutf != xyes ; then
511         RPMBINARGS="$RPMBINARGS --without lustre_tests_lutf"
512 fi
513 if test x$enable_utils != xyes ; then
514         RPMBINARGS="$RPMBINARGS --without lustre_utils"
515 fi
516 if test x$enable_server != xyes ; then
517         RPMBINARGS="$RPMBINARGS --without servers"
518 fi
519 if test x$enable_ldiskfs != xyes ; then
520         RPMBINARGS="$RPMBINARGS --without ldiskfs"
521 fi
522 if test x$enable_zfs = xyes ; then
523         RPMBINARGS="$RPMBINARGS --with zfs"
524 fi
525 if test x$enable_gss_keyring = xyes ; then
526         RPMBINARGS="$RPMBINARGS --with gss_keyring --with gss"
527 fi
528 if test x$enable_gss = xyes ; then
529         RPMBINARGS="$RPMBINARGS --with gss"
530         AC_SUBST(ENABLE_GSS, yes)
531 elif test x$enable_gss = xno ; then
532         RPMBINARGS="$RPMBINARGS --without gss"
533         AC_SUBST(ENABLE_GSS, no)
534 fi
535 if test x$enable_crypto = xyes ; then
536         RPMBINARGS="$RPMBINARGS --with crypto"
537         AC_SUBST(ENABLE_CRYPTO, yes)
538 elif test x$enable_crypto = xno ; then
539         RPMBINARGS="$RPMBINARGS --without crypto"
540         AC_SUBST(ENABLE_CRYPTO, no)
541 fi
542 if test x$enable_multiple_lnds = xyes ; then
543         RPMBINARGS="$RPMBINARGS --with multiple_lnds"
544 else
545         RPMBINARGS="$RPMBINARGS --without multiple_lnds"
546 fi
547 if test x$EXTERNAL_KO2IBLND = xyes ; then
548         RPMBINARGS="$RPMBINARGS --with mofed"
549 else
550         RPMBINARGS="$RPMBINARGS --without mofed"
551 fi
552 if test x$BUILT_IN_KO2IBLND = xyes ; then
553         RPMBINARGS="$RPMBINARGS --with o2ib"
554 else
555         RPMBINARGS="$RPMBINARGS --without o2ib"
556 fi
557 if test x$KFILND = xkfilnd ; then
558         RPMBINARGS="$RPMBINARGS --with kfi"
559 else
560         RPMBINARGS="$RPMBINARGS --without kfi"
561 fi
562 if test x$ENABLE_GNI = xyes ; then
563         RPMBINARGS="$RPMBINARGS --with gni"
564 else
565         RPMBINARGS="$RPMBINARGS --without gni"
566 fi
567 if test x$enable_iokit != xyes ; then
568         RPMBINARGS="$RPMBINARGS --without lustre_iokit"
569 fi
570 if test x$enable_manpages != xyes ; then
571         RPMBINARGS="$RPMBINARGS --without manpages"
572 fi
573 if test x$enable_shared != xyes ; then
574         RPMBINARGS="$RPMBINARGS --without shared"
575 fi
576 if test x$enable_static != xyes ; then
577         RPMBINARGS="$RPMBINARGS --without static"
578 fi
579 if test x$enable_mpitests != xyes ; then
580         RPMBINARGS="$RPMBINARGS --without mpi"
581 fi
582
583 RPMBUILD_BINARY_ARGS=$RPMBINARGS
584
585 AC_SUBST(RPMBUILD_BINARY_ARGS)
586 ]) # LB_CONFIG_RPMBUILD_OPTIONS
587
588 #
589 # LB_CONFIG_CACHE_OPTIONS
590 #
591 # Propagate config cache option
592 #
593 AC_DEFUN([LB_CONFIG_CACHE_OPTIONS], [
594 CONFIG_CACHE_FILE=
595 if test -f "$cache_file"; then
596         CONFIG_CACHE_FILE=$(readlink --canonicalize "$cache_file")
597 fi
598 AC_SUBST(CONFIG_CACHE_FILE)
599 ]) # LB_CONFIG_CACHE_OPTIONS
600
601 #
602 # LB_CONFIGURE
603 #
604 # main configure steps
605 #
606 AC_DEFUN([LB_CONFIGURE], [
607 AC_MSG_NOTICE([Lustre base checks
608 ==============================================================================])
609 LB_CANONICAL_SYSTEM
610
611 LB_CONFIG_DIST
612
613 LB_DOWNSTREAM_RELEASE
614 LB_USES_DPKG
615
616 LB_INCLUDE_RULES
617
618 LB_PATH_DEFAULTS
619
620 LC_OSD_ADDON
621
622 LB_CONFIG_DOCS
623 LB_CONFIG_MANPAGES
624 LB_CONFIG_UTILS
625 LB_CONFIG_TESTS
626 LB_CONFIG_LUTF
627 LC_CONFIG_CLIENT
628 LB_CONFIG_MPITESTS
629 LB_CONFIG_SERVERS
630 LC_CONFIG_CRYPTO
631 LC_GLIBC_SUPPORT_COPY_FILE_RANGE
632 LC_OPENSSL_SSK
633
634 # Tests depends from utils (multiop from liblustreapi)
635 AS_IF([test "x$enable_utils" = xno], [enable_tests="no"])
636
637 AS_IF([test "x$enable_utils" = xyes], [
638         LC_OPENSSL_GETSEPOL
639         LC_FID2PATH_ANON_UNION
640 ])
641 AS_IF([test "x$enable_tests" = xyes], [
642         LC_HAVE_LIBAIO
643         LC_GLIBC_SUPPORT_FHANDLES
644 ])
645
646 LIBCFS_CONFIG_CDEBUG
647 LC_QUOTA
648
649 AS_IF([test "x$enable_dist" != xno], [],[LB_LIBMOUNT])
650 LB_PATH_LUSTREIOKIT
651
652 LB_DEFINE_E2FSPROGS_NAMES
653
654 LIBCFS_CONFIGURE
655 LN_CONFIGURE
656 LC_CONFIGURE
657
658 LB_CONDITIONALS
659 LB_CONFIG_HEADERS
660
661 LPLUG_CONFIGURE
662 LIBCFS_CONFIG_FILES
663 LB_CONFIG_FILES
664 LN_CONFIG_FILES
665 LC_CONFIG_FILES
666 LPLUG_CONFIG_FILES
667
668 AC_SUBST(ac_configure_args)
669
670 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
671 AC_SUBST(MOSTLYCLEANFILES)
672
673 LB_CONFIG_RPMBUILD_OPTIONS
674 LB_CONFIG_CACHE_OPTIONS
675
676 AS_IF([test -d $TEST_DIR -a "x${PARALLEL_BUILD_OPT}" != "xdebug"], [
677         AC_MSG_NOTICE([remove temporary parallel configure dir $TEST_DIR])
678         rm -rf $TEST_DIR
679 ])
680
681 AC_OUTPUT
682 ]) # LB_CONFIGURE