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