4 # Verify that LUSTRE_VERSION was defined properly
6 AC_DEFUN([LB_CHECK_VERSION],
7 [if test "LUSTRE_VERSION" = "LUSTRE""_VERSION" ; then
8 AC_MSG_ERROR([This script was not built with a version number.])
15 # fixup $target_os for use in other places
17 AC_DEFUN([LB_CANONICAL_SYSTEM],
28 AC_SUBST(lb_target_os)
34 # Check for file existance even when cross compiling
36 AC_DEFUN([LB_CHECK_FILE],
37 [AS_VAR_PUSHDEF([lb_File], [lb_cv_file_$1])dnl
38 AC_CACHE_CHECK([for $1], lb_File,
39 [if test -r "$1"; then
40 AS_VAR_SET(lb_File, yes)
42 AS_VAR_SET(lb_File, no)
44 AS_IF([test AS_VAR_GET(lb_File) = yes], [$2], [$3])[]dnl
45 AS_VAR_POPDEF([lb_File])dnl
51 # LB_CHECK_FILE over multiple files
53 AC_DEFUN([LB_CHECK_FILES],
54 [AC_FOREACH([AC_FILE_NAME], [$1],
55 [LB_CHECK_FILE(AC_FILE_NAME,
56 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
57 [Define to 1 if you have the
63 # LB_ARG_LIBS_INCLUDES
65 # support for --with-foo, --with-foo-includes, and --with-foo-libs in
66 # a single magical macro
68 AC_DEFUN([LB_ARG_LIBS_INCLUDES],
69 [lb_pathvar="m4_bpatsubst([$2], -, _)"
70 AC_MSG_CHECKING([for $1])
72 AC_HELP_STRING([--with-$2=path],
76 if test x$withval = xyes ; then
77 eval "$lb_pathvar='$3'"
79 eval "$lb_pathvar='$withval'"
81 AC_MSG_RESULT([${!lb_pathvar:-no}])
83 if test x${!lb_pathvar} != x -a x${!lb_pathvar} != xno ; then
84 AC_MSG_CHECKING([for $1 includes])
85 AC_ARG_WITH([$2-includes],
86 AC_HELP_STRING([--with-$2-includes=path],
87 [path to $1 includes]),
90 lb_includevar="${lb_pathvar}_includes"
91 if test x$withval = xyes ; then
92 eval "${lb_includevar}='${!lb_pathvar}/include'"
94 eval "${lb_includevar}='$withval'"
96 AC_MSG_RESULT([${!lb_includevar}])
98 AC_MSG_CHECKING([for $1 libs])
99 AC_ARG_WITH([$2-libs],
100 AC_HELP_STRING([--with-$2-libs=path],
104 lb_libvar="${lb_pathvar}_libs"
105 if test x$withval = xyes ; then
106 eval "${lb_libvar}='${!lb_pathvar}/lib'"
108 eval "${lb_libvar}='$withval'"
110 AC_MSG_RESULT([${!lb_libvar}])
118 # Handle internal/external libsysio
120 AC_DEFUN([LB_PATH_LIBSYSIO],
121 [AC_ARG_WITH([sysio],
122 AC_HELP_STRING([--with-sysio=path],
123 [set path to libsysio source (default is included libsysio)]),
125 case $lb_target_os in
134 AC_MSG_CHECKING([location of libsysio])
135 enable_sysio="$with_sysio"
138 AC_MSG_RESULT([internal])
139 LB_CHECK_FILE([$srcdir/libsysio/src/rmdir.c],[],[
140 AC_MSG_ERROR([A complete internal libsysio was not found.])
142 LIBSYSIO_SUBDIR="libsysio"
143 SYSIO="$PWD/libsysio"
146 AC_MSG_RESULT([disabled])
149 AC_MSG_RESULT([$with_sysio])
150 LB_CHECK_FILE([$with_sysio/lib/libsysio.a],[],[
151 AC_MSG_ERROR([A complete (built) external libsysio was not found.])
158 # We have to configure even if we don't build here for make dist to work
159 AC_CONFIG_SUBDIRS(libsysio)
163 # LB_PATH_LUSTREIOKIT
165 # Handle internal/external lustre-iokit
167 AC_DEFUN([LB_PATH_LUSTREIOKIT],
169 AC_HELP_STRING([--with-lustre-iokit=path],
170 [set path to lustre-iokit source (default is included lustre-iokit)]),
172 with_lustre_iokit='yes'
174 AC_MSG_CHECKING([location of lustre-iokit])
175 enable_lustre_iokit="$with_lustre_iokit"
176 case x$with_lustre_iokit in
178 AC_MSG_RESULT([internal])
179 LB_CHECK_FILE([$srcdir/lustre-iokit/ior-survey/ior-survey],[],[
180 AC_MSG_ERROR([A complete internal lustre-iokit was not found.])
182 LUSTREIOKIT_SUBDIR="lustre-iokit"
183 LUSTREIOKIT="$PWD/lustre-iokit"
186 AC_MSG_RESULT([disabled])
189 AC_MSG_RESULT([$with_lustre_iokit])
190 LB_CHECK_FILE([$with_lustre_iokit/ior-survey/ior_survey],[],[
191 AC_MSG_ERROR([A complete (built) external lustre-iokit was not found.])
193 LUSTREIOKIT="$with_lustre_iokit"
194 with_lustre_iokit="yes"
197 AC_SUBST(LUSTREIOKIT_SUBDIR)
198 # We have to configure even if we don't build here for make dist to work
199 AC_CONFIG_SUBDIRS(lustre-iokit)
205 # Handle internal/external ldiskfs
207 AC_DEFUN([LB_PATH_LDISKFS],
208 [AC_ARG_WITH([ldiskfs],
209 AC_HELP_STRING([--with-ldiskfs=path],
210 [set path to ldiskfs source (default is included ldiskfs)]),
212 if test x$linux25$enable_server = xyesyes ; then
218 AC_MSG_CHECKING([location of ldiskfs])
219 case x$with_ldiskfs in
221 AC_MSG_RESULT([internal])
222 LB_CHECK_FILE([$srcdir/ldiskfs/lustre-ldiskfs.spec.in],[],[
223 AC_MSG_ERROR([A complete internal ldiskfs was not found.])
225 LDISKFS_SUBDIR="ldiskfs"
226 LDISKFS_DIR="$PWD/ldiskfs"
229 AC_MSG_RESULT([disabled])
232 AC_MSG_RESULT([$with_ldiskfs])
233 LB_CHECK_FILE([$with_ldiskfs/ldiskfs/linux/ldiskfs_fs.h],[],[
234 AC_MSG_ERROR([A complete (built) external ldiskfs was not found.])
236 LDISKFS_DIR=$with_ldiskfs
239 AC_SUBST(LDISKFS_DIR)
240 AC_SUBST(LDISKFS_SUBDIR)
241 AM_CONDITIONAL(LDISKFS_ENABLED, test x$with_ldiskfs != xno)
243 # We have to configure even if we don't build here for make dist to work
244 AC_CONFIG_SUBDIRS(ldiskfs)
247 # Define no libcfs by default.
248 AC_DEFUN([LB_LIBCFS_DIR],
250 case x$libcfs_is_module in
252 LIBCFS_INCLUDE_DIR="libcfs/include"
253 LIBCFS_SUBDIR="libcfs"
256 LIBCFS_INCLUDE_DIR="lnet/include"
260 AC_SUBST(LIBCFS_SUBDIR)
261 AC_SUBST(LIBCFS_INCLUDE_DIR)
265 # LB_DEFINE_LDISKFS_OPTIONS
267 # Enable config options related to ldiskfs. These are used both by ldiskfs
268 # and lvfs (which includes ldiskfs headers.)
270 AC_DEFUN([LB_DEFINE_LDISKFS_OPTIONS],
272 AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module])
273 AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs])
274 AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls for ldiskfs])
275 AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security for ldiskfs])
279 # LB_DEFINE_E2FSPROGS_NAMES
281 # Enable the use of alternate naming of ldiskfs-enabled e2fsprogs package.
283 AC_DEFUN([LB_DEFINE_E2FSPROGS_NAMES],
284 [AC_ARG_WITH([ldiskfsprogs],
285 AC_HELP_STRING([--with-ldiskfsprogs],
286 [use alternate names for ldiskfs-enabled e2fsprogs]),
289 if test x$withval = xyes ; then
290 AC_DEFINE(HAVE_LDISKFSPROGS, 1, [enable use of ldiskfsprogs package])
291 E2FSPROGS="ldiskfsprogs"
292 MKE2FS="mkfs.ldiskfs"
293 DEBUGFS="debug.ldiskfs"
294 TUNE2FS="tune.ldiskfs"
295 E2LABEL="label.ldiskfs"
296 DUMPE2FS="dump.ldiskfs"
297 E2FSCK="fsck.ldiskfs"
298 AC_MSG_RESULT([enabled])
300 E2FSPROGS="e2fsprogs"
307 AC_MSG_RESULT([disabled])
309 AC_DEFINE_UNQUOTED(E2FSPROGS, "$E2FSPROGS", [name of ldiskfs e2fsprogs package])
310 AC_DEFINE_UNQUOTED(MKE2FS, "$MKE2FS", [name of ldiskfs mkfs program])
311 AC_DEFINE_UNQUOTED(DEBUGFS, "$DEBUGFS", [name of ldiskfs debug program])
312 AC_DEFINE_UNQUOTED(TUNE2FS, "$TUNE2FS", [name of ldiskfs tune program])
313 AC_DEFINE_UNQUOTED(E2LABEL, "$E2LABEL", [name of ldiskfs label program])
314 AC_DEFINE_UNQUOTED(DUMPE2FS,"$DUMPE2FS", [name of ldiskfs dump program])
315 AC_DEFINE_UNQUOTED(E2FSCK, "$E2FSCK", [name of ldiskfs fsck program])
319 # LB_DEFINE_E2FSPROGS_NAMES
321 # Enable the use of alternate naming of ldiskfs-enabled e2fsprogs package.
323 AC_DEFUN([LB_DEFINE_E2FSPROGS_NAMES],
324 [AC_ARG_WITH([ldiskfsprogs],
325 AC_HELP_STRING([--with-ldiskfsprogs],
326 [use alternate names for ldiskfs-enabled e2fsprogs]),
329 if test x$withval = xyes ; then
330 AC_DEFINE(HAVE_LDISKFSPROGS, 1, [enable use of ldiskfsprogs package])
331 E2FSPROGS="ldiskfsprogs"
332 MKE2FS="mkfs.ldiskfs"
333 DEBUGFS="debug.ldiskfs"
334 TUNE2FS="tune.ldiskfs"
335 E2LABEL="label.ldiskfs"
336 DUMPE2FS="dump.ldiskfs"
337 E2FSCK="fsck.ldiskfs"
338 AC_MSG_RESULT([enabled])
340 E2FSPROGS="e2fsprogs"
347 AC_MSG_RESULT([disabled])
349 AC_DEFINE_UNQUOTED(E2FSPROGS, "$E2FSPROGS", [name of ldiskfs e2fsprogs package])
350 AC_DEFINE_UNQUOTED(MKE2FS, "$MKE2FS", [name of ldiskfs mkfs program])
351 AC_DEFINE_UNQUOTED(DEBUGFS, "$DEBUGFS", [name of ldiskfs debug program])
352 AC_DEFINE_UNQUOTED(TUNE2FS, "$TUNE2FS", [name of ldiskfs tune program])
353 AC_DEFINE_UNQUOTED(E2LABEL, "$E2LABEL", [name of ldiskfs label program])
354 AC_DEFINE_UNQUOTED(DUMPE2FS,"$DUMPE2FS", [name of ldiskfs dump program])
355 AC_DEFINE_UNQUOTED(E2FSCK, "$E2FSCK", [name of ldiskfs fsck program])
359 # LB_DEFINE_E2FSPROGS_NAMES
361 # Enable the use of alternate naming of ldiskfs-enabled e2fsprogs package.
363 AC_DEFUN([LB_DEFINE_E2FSPROGS_NAMES],
364 [AC_ARG_WITH([ldiskfsprogs],
365 AC_HELP_STRING([--with-ldiskfsprogs],
366 [use alternate names for ldiskfs-enabled e2fsprogs]),
369 if test x$withval = xyes ; then
370 AC_DEFINE(HAVE_LDISKFSPROGS, 1, [enable use of ldiskfsprogs package])
371 E2FSPROGS="ldiskfsprogs"
372 MKE2FS="mkfs.ldiskfs"
373 DEBUGFS="debug.ldiskfs"
374 TUNE2FS="tune.ldiskfs"
375 E2LABEL="label.ldiskfs"
376 DUMPE2FS="dump.ldiskfs"
377 E2FSCK="fsck.ldiskfs"
378 AC_MSG_RESULT([enabled])
380 E2FSPROGS="e2fsprogs"
387 AC_MSG_RESULT([disabled])
389 AC_DEFINE_UNQUOTED(E2FSPROGS, "$E2FSPROGS", [name of ldiskfs e2fsprogs package])
390 AC_DEFINE_UNQUOTED(MKE2FS, "$MKE2FS", [name of ldiskfs mkfs program])
391 AC_DEFINE_UNQUOTED(DEBUGFS, "$DEBUGFS", [name of ldiskfs debug program])
392 AC_DEFINE_UNQUOTED(TUNE2FS, "$TUNE2FS", [name of ldiskfs tune program])
393 AC_DEFINE_UNQUOTED(E2LABEL, "$E2LABEL", [name of ldiskfs label program])
394 AC_DEFINE_UNQUOTED(DUMPE2FS,"$DUMPE2FS", [name of ldiskfs dump program])
395 AC_DEFINE_UNQUOTED(E2FSCK, "$E2FSCK", [name of ldiskfs fsck program])
401 # Enable Cray XT3 features
403 AC_DEFUN([LB_CONFIG_CRAY_XT3],
404 [AC_MSG_CHECKING([whether to build Cray XT3 features])
405 AC_ARG_ENABLE([cray_xt3],
406 AC_HELP_STRING([--enable-cray-xt3],
407 [enable building of Cray XT3 features]),
408 [enable_cray_xt3='yes'],[enable_cray_xt3='no'])
409 AC_MSG_RESULT([$enable_cray_xt3])
410 if test x$enable_cray_xt3 != xno; then
411 AC_DEFINE(CRAY_XT3, 1, Enable Cray XT3 Features)
418 # Enable BGL features
420 AC_DEFUN([LB_CONFIG_BGL],
421 [AC_MSG_CHECKING([whether to build BGL features])
423 AC_HELP_STRING([--enable-bgl],
424 [enable building of BGL features]),
425 [enable_bgl='yes'],[enable_bgl='no'])
426 AC_MSG_RESULT([$enable_bgl])
427 if test x$enable_bgl != xno; then
428 AC_DEFINE(HAVE_BGL_SUPPORT, 1, Enable BGL Features)
432 enable_liblustre='no'
433 enable_libreadline='no'
438 # Support for --enable-uoss
441 [AC_MSG_CHECKING([whether to enable uoss])
442 AC_ARG_ENABLE([uoss],
443 AC_HELP_STRING([--enable-uoss],
444 [enable userspace OSS]),
445 [enable_uoss='yes'],[enable_uoss='no'])
446 AC_MSG_RESULT([$enable_uoss])
447 if test x$enable_uoss = xyes; then
448 AC_DEFINE(UOSS_SUPPORT, 1, Enable user-level OSS)
449 AC_DEFINE(LUSTRE_ULEVEL_MT, 1, Multi-threaded user-level lustre port)
451 enable_ulevel_mt='yes'
455 enable_liblustre='no'
458 AC_SUBST(enable_uoss)
462 # Support for --enable-posix-osd
464 AC_DEFUN([LB_POSIX_OSD],
465 [AC_MSG_CHECKING([whether to enable posix osd])
466 AC_ARG_ENABLE([posix-osd],
467 AC_HELP_STRING([--enable-posix-osd],
468 [enable using of posix osd]),
469 [enable_posix_osd='yes'],[enable_posix_osd='no'])
470 AC_MSG_RESULT([$enable_posix_osd])
471 if test x$enable_uoss = xyes -a x$enable_posix_osd = xyes ; then
472 AC_DEFINE(POSIX_OSD, 1, Enable POSIX OSD)
475 AM_CONDITIONAL(POSIX_OSD_ENABLED, test x$posix_osd = xyes)
481 AC_DEFUN([LB_PATH_DMU],
482 [AC_ARG_ENABLE([dmu],
483 AC_HELP_STRING([--enable-dmu],
484 [enable the DMU backend]),
485 [],[with_dmu='default'])
486 AC_MSG_CHECKING([whether to enable DMU])
495 if test x$enable_uoss = xyes -a x$posix_osd != xyes; then
496 # Enable the DMU if we're configuring a userspace server
499 # Enable the DMU by default on the b_hd_kdmu branch
500 if test -d $PWD/zfs -a x$linux25$enable_server = xyesyes; then
511 AC_MSG_RESULT([$dmu_osd])
512 if test x$dmu_osd = xyes; then
513 AC_DEFINE(DMU_OSD, 1, Enable DMU OSD)
514 if test x$enable_uoss = xyes; then
516 DMU_SRC="$PWD/lustre/zfs-lustre"
518 LB_CHECK_FILE([$DMU_SRC/src/.patched],[],[
519 AC_MSG_ERROR([A complete (patched) DMU tree was not found.])
521 AC_CONFIG_SUBDIRS(lustre/zfs-lustre)
531 LB_CHECK_FILE([$SPL_DIR/modules/spl/spl-generic.c],[],[
532 AC_MSG_ERROR([A complete SPL tree was not found in $SPL_DIR.])
535 LB_CHECK_FILE([$ZFS_DIR/zfs/lib/libzpool/dmu.c],[],[
536 AC_MSG_ERROR([A complete kernel DMU tree was not found in $ZFS_DIR.])
539 AC_CONFIG_SUBDIRS(spl)
540 ac_configure_args="$ac_configure_args --with-spl=$SPL_DIR"
541 AC_CONFIG_SUBDIRS(zfs)
544 AM_CONDITIONAL(DMU_OSD_ENABLED, test x$dmu_osd = xyes)
545 AM_CONDITIONAL(KDMU, test x$dmu_osd$enable_uoss = xyesno)
551 # check for in-tree snmp support
553 AC_DEFUN([LB_PATH_SNMP],
554 [LB_CHECK_FILE([$srcdir/snmp/lustre-snmp.c],[SNMP_DIST_SUBDIR="snmp"])
555 AC_SUBST(SNMP_DIST_SUBDIR)
556 AC_SUBST(SNMP_SUBDIR)
562 # Build kernel modules?
564 AC_DEFUN([LB_CONFIG_MODULES],
565 [AC_MSG_CHECKING([whether to build kernel modules])
566 AC_ARG_ENABLE([modules],
567 AC_HELP_STRING([--disable-modules],
568 [disable building of Lustre kernel modules]),
570 LC_TARGET_SUPPORTED([
576 AC_MSG_RESULT([$enable_modules ($target_os)])
578 if test x$enable_modules = xyes ; then
591 # This is strange - Lustre supports a target we don't
592 AC_MSG_ERROR([Modules are not supported on $target_os])
603 AC_DEFUN([LB_CONFIG_UTILS],
604 [AC_MSG_CHECKING([whether to build utilities])
605 AC_ARG_ENABLE([utils],
606 AC_HELP_STRING([--disable-utils],
607 [disable building of Lustre utility programs]),
608 [],[enable_utils='yes'])
609 AC_MSG_RESULT([$enable_utils])
610 if test x$enable_utils = xyes ; then
611 LB_CONFIG_INIT_SCRIPTS
620 AC_DEFUN([LB_CONFIG_TESTS],
621 [AC_MSG_CHECKING([whether to build Lustre tests])
622 AC_ARG_ENABLE([tests],
623 AC_HELP_STRING([--disable-tests],
624 [disable building of Lustre tests]),
629 AC_MSG_RESULT([$enable_tests])
637 AC_DEFUN([LB_CONFIG_DOCS],
638 [AC_MSG_CHECKING([whether to build docs])
640 AC_HELP_STRING([--disable-doc],
641 [skip creation of pdf documentation]),
643 if test x$enable_doc = xyes ; then
652 AC_MSG_RESULT([$enable_doc])
657 # LB_CONFIG_INIT_SCRIPTS
659 # our init scripts only work on red hat linux
661 AC_DEFUN([LB_CONFIG_INIT_SCRIPTS],
662 [ENABLE_INIT_SCRIPTS=0
663 if test x$enable_utils = xyes ; then
664 AC_MSG_CHECKING([whether to install init scripts])
665 # our scripts only work on red hat systems
666 if test -f /etc/init.d/functions -a -f /etc/sysconfig/network ; then
667 ENABLE_INIT_SCRIPTS=1
673 AC_SUBST(ENABLE_INIT_SCRIPTS)
679 # add -include config.h
681 AC_DEFUN([LB_CONFIG_HEADERS],
682 [AC_CONFIG_HEADERS([config.h])
683 CPPFLAGS="-include \$(top_builddir)/config.h $CPPFLAGS"
684 EXTRA_KCFLAGS="-include $PWD/config.h $EXTRA_KCFLAGS"
685 AC_SUBST(EXTRA_KCFLAGS)
691 # defines for including the toplevel Rules
693 AC_DEFUN([LB_INCLUDE_RULES],
694 [INCLUDE_RULES="include $PWD/Rules"
695 AC_SUBST(INCLUDE_RULES)
701 # 'fixup' default paths
703 AC_DEFUN([LB_PATH_DEFAULTS],
704 [# directories for binaries
705 AC_PREFIX_DEFAULT([/usr])
710 # Directories for documentation and demos.
711 docdir='${datadir}/doc/$(PACKAGE)'
723 # checks on the C compiler
725 AC_DEFUN([LB_PROG_CC],
727 AC_MSG_CHECKING([for buggy compiler])
728 CC_VERSION=`$CC -v 2>&1 | grep "^gcc version"`
730 AC_MSG_RESULT([buggy compiler found!])
732 echo " '$CC_VERSION'"
733 echo " has been known to generate bad code, "
734 echo " please get an updated compiler."
735 AC_MSG_ERROR([sorry])
737 case "$CC_VERSION" in
741 # ost_pack_niobuf putting 64bit NTOH temporaries on the stack
742 # without "sub $0xc,%esp" to protect the stack from being
743 # stomped on by interrupts (bug 606)
744 "gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)")
747 # mandrake's similar sub 0xc compiler bug
748 # http://marc.theaimsgroup.com/?l=linux-kernel&m=104748366226348&w=2
749 "gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)")
753 AC_MSG_RESULT([no known problems])
757 # --------- unsigned long long sane? -------
758 AC_CHECK_SIZEOF(unsigned long long, 0)
759 echo "---> size SIZEOF $SIZEOF_unsigned_long_long"
760 echo "---> size SIZEOF $ac_cv_sizeof_unsigned_long_long"
761 if test $ac_cv_sizeof_unsigned_long_long != 8 ; then
762 AC_MSG_ERROR([** we assume that sizeof(long long) == 8. Tell phil@clusterfs.com])
765 if test $target_cpu == "powerpc64"; then
766 AC_MSG_WARN([set compiler with -m64])
767 CFLAGS="$CFLAGS -m64"
771 CPPFLAGS="-I\$(top_builddir)/$LIBCFS_INCLUDE_DIR -I\$(top_srcdir)/$LIBCFS_INCLUDE_DIR-I\$(top_builddir)/lnet/include -I\$(top_srcdir)/lnet/include -I\$(top_builddir)/lustre/include -I\$(top_srcdir)/lustre/include $CPPFLAGS"
773 LLCPPFLAGS="-D__arch_lib__ -D_LARGEFILE64_SOURCE=1"
776 # Add _GNU_SOURCE for strnlen on linux
777 LLCFLAGS="-g -Wall -fPIC -D_GNU_SOURCE"
780 # everyone builds against lnet and lustre
781 EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include"
782 AC_SUBST(EXTRA_KCFLAGS)
788 # AM_CONDITIONAL instances for everything
789 # (so that portals/lustre can disable some if needed)
790 AC_DEFUN([LB_CONDITIONALS],
791 [AM_CONDITIONAL(MODULES, test x$enable_modules = xyes)
792 AM_CONDITIONAL(UTILS, test x$enable_utils = xyes)
793 AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
794 AM_CONDITIONAL(DOC, test x$ENABLE_DOC = x1)
795 AM_CONDITIONAL(INIT_SCRIPTS, test x$ENABLE_INIT_SCRIPTS = "x1")
796 AM_CONDITIONAL(LINUX, test x$lb_target_os = "xlinux")
797 AM_CONDITIONAL(DARWIN, test x$lb_target_os = "xdarwin")
798 AM_CONDITIONAL(CRAY_XT3, test x$enable_cray_xt3 = "xyes")
799 AM_CONDITIONAL(SUNOS, test x$lb_target_os = "xSunOS")
801 # this lets lustre cancel libsysio, per-branch or if liblustre is
803 if test "x$LIBSYSIO_SUBDIR" = xlibsysio ; then
804 if test "x$with_sysio" != xyes ; then
809 AC_SUBST(LIBSYSIO_SUBDIR)
812 LB_LINUX_CONDITIONALS
813 LB_DARWIN_CONDITIONALS
823 # build-specific config files
825 AC_DEFUN([LB_CONFIG_FILES],
831 [Rules:build/Rules.in]
832 AC_PACKAGE_TARNAME[.spec]
839 # main configure steps
841 AC_DEFUN([LB_CONFIGURE],
860 LC_CONFIG_CLIENT_SERVER
862 # two macros for cmd3
863 m4_ifdef([LC_CONFIG_SPLIT], [LC_CONFIG_SPLIT])
875 LB_DEFINE_E2FSPROGS_NAMES
877 LB_DEFINE_E2FSPROGS_NAMES
879 LB_DEFINE_E2FSPROGS_NAMES
887 if test "$SNMP_DIST_SUBDIR" ; then
899 if test "$SNMP_DIST_SUBDIR" ; then
903 AC_SUBST(ac_configure_args)
905 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
906 AC_SUBST(MOSTLYCLEANFILES)
915 LLCPPFLAGS: $LLCPPFLAGS
917 EXTRA_KCFLAGS: $EXTRA_KCFLAGS
920 Type 'make' to build Lustre.