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