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