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