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
50 # LB_ARG_LIBS_INCLUDES
52 # support for --with-foo, --with-foo-includes, and --with-foo-libs in
53 # a single magical macro
55 AC_DEFUN([LB_ARG_LIBS_INCLUDES],
56 [lb_pathvar="m4_bpatsubst([$2], -, _)"
57 AC_MSG_CHECKING([for $1])
59 AC_HELP_STRING([--with-$2=path],
63 if test x$withval = xyes ; then
64 eval "$lb_pathvar='$3'"
66 eval "$lb_pathvar='$withval'"
68 AC_MSG_RESULT([${!lb_pathvar:-no}])
70 if test x${!lb_pathvar} != x -a x${!lb_pathvar} != xno ; then
71 AC_MSG_CHECKING([for $1 includes])
72 AC_ARG_WITH([$2-includes],
73 AC_HELP_STRING([--with-$2-includes=path],
74 [path to $1 includes]),
77 lb_includevar="${lb_pathvar}_includes"
78 if test x$withval = xyes ; then
79 eval "${lb_includevar}='${!lb_pathvar}/include'"
81 eval "${lb_includevar}='$withval'"
83 AC_MSG_RESULT([${!lb_includevar}])
85 AC_MSG_CHECKING([for $1 libs])
86 AC_ARG_WITH([$2-libs],
87 AC_HELP_STRING([--with-$2-libs=path],
91 lb_libvar="${lb_pathvar}_libs"
92 if test x$withval = xyes ; then
93 eval "${lb_libvar}='${!lb_pathvar}/lib'"
95 eval "${lb_libvar}='$withval'"
97 AC_MSG_RESULT([${!lb_libvar}])
105 # Handle internal/external libsysio
107 AC_DEFUN([LB_PATH_LIBSYSIO],
108 [AC_ARG_WITH([sysio],
109 AC_HELP_STRING([--with-sysio=path],
110 [set path to libsysio source (default is included libsysio)]),
112 case $lb_target_os in
121 AC_MSG_CHECKING([location of libsysio])
122 enable_sysio="$with_sysio"
125 AC_MSG_RESULT([internal])
126 LB_CHECK_FILE([$srcdir/libsysio/src/rmdir.c],[],[
127 AC_MSG_ERROR([A complete internal libsysio was not found.])
129 LIBSYSIO_SUBDIR="libsysio"
130 SYSIO="$PWD/libsysio"
133 AC_MSG_RESULT([disabled])
136 AC_MSG_RESULT([$with_sysio])
137 LB_CHECK_FILE([$with_sysio/lib/libsysio.a],[],[
138 AC_MSG_ERROR([A complete (built) external libsysio was not found.])
145 # We have to configure even if we don't build here for make dist to work
146 AC_CONFIG_SUBDIRS(libsysio)
150 # LB_PATH_LUSTREIOKIT
152 # Handle internal/external lustre-iokit
154 AC_DEFUN([LB_PATH_LUSTREIOKIT],
156 AC_HELP_STRING([--with-lustre-iokit=path],
157 [set path to lustre-iokit source (default is included lustre-iokit)]),
159 with_lustre_iokit='yes'
161 AC_MSG_CHECKING([location of lustre-iokit])
162 enable_lustre_iokit="$with_lustre_iokit"
163 case x$with_lustre_iokit in
165 AC_MSG_RESULT([internal])
166 LB_CHECK_FILE([$srcdir/lustre-iokit/ior-survey/ior-survey],[],[
167 AC_MSG_ERROR([A complete internal lustre-iokit was not found.])
169 LUSTREIOKIT_SUBDIR="lustre-iokit"
170 LUSTREIOKIT="$PWD/lustre-iokit"
173 AC_MSG_RESULT([disabled])
176 AC_MSG_RESULT([$with_lustre_iokit])
177 LB_CHECK_FILE([$with_lustre_iokit/ior-survey/ior_survey],[],[
178 AC_MSG_ERROR([A complete (built) external lustre-iokit was not found.])
180 LUSTREIOKIT="$with_lustre_iokit"
181 with_lustre_iokit="yes"
184 AC_SUBST(LUSTREIOKIT_SUBDIR)
185 # We have to configure even if we don't build here for make dist to work
186 AC_CONFIG_SUBDIRS(lustre-iokit)
192 # Handle internal/external ldiskfs
194 AC_DEFUN([LB_PATH_LDISKFS],
195 [AC_ARG_WITH([ldiskfs],
196 AC_HELP_STRING([--with-ldiskfs=path],
197 [set path to ldiskfs source (default is included ldiskfs)]),
199 if test x$linux25$enable_server = xyesyes ; then
205 AC_MSG_CHECKING([location of ldiskfs])
206 case x$with_ldiskfs in
208 AC_MSG_RESULT([internal])
209 LB_CHECK_FILE([$srcdir/ldiskfs/lustre-ldiskfs.spec.in],[],[
210 AC_MSG_ERROR([A complete internal ldiskfs was not found.])
212 LDISKFS_SUBDIR="ldiskfs"
213 LDISKFS_DIR="$PWD/ldiskfs"
216 AC_MSG_RESULT([disabled])
219 AC_MSG_RESULT([$with_ldiskfs])
220 LB_CHECK_FILE([$with_ldiskfs/ldiskfs/linux/ldiskfs_fs.h],[],[
221 AC_MSG_ERROR([A complete (built) external ldiskfs was not found.])
223 LDISKFS_DIR=$with_ldiskfs
226 AC_SUBST(LDISKFS_DIR)
227 AC_SUBST(LDISKFS_SUBDIR)
228 AM_CONDITIONAL(LDISKFS_ENABLED, test x$with_ldiskfs != xno)
230 if test x$enable_ext4 = xyes ; then
231 AC_DEFINE(HAVE_EXT4_LDISKFS, 1, [build ext4 based ldiskfs])
234 # We have to configure even if we don't build here for make dist to work
235 AC_CONFIG_SUBDIRS(ldiskfs)
238 # Define no libcfs by default.
239 AC_DEFUN([LB_LIBCFS_DIR],
241 case x$libcfs_is_module in
243 LIBCFS_INCLUDE_DIR="libcfs/include"
244 LIBCFS_SUBDIR="libcfs"
247 LIBCFS_INCLUDE_DIR="lnet/include"
251 AC_SUBST(LIBCFS_SUBDIR)
252 AC_SUBST(LIBCFS_INCLUDE_DIR)
256 # LB_DEFINE_LDISKFS_OPTIONS
258 # Enable config options related to ldiskfs. These are used both by ldiskfs
259 # and lvfs (which includes ldiskfs headers.)
261 AC_DEFUN([LB_DEFINE_LDISKFS_OPTIONS],
263 AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module])
264 AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs])
265 AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls for ldiskfs])
266 AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security for ldiskfs])
267 AC_DEFINE(CONFIG_LDISKFSDEV_FS_POSIX_ACL, 1, [enable posix acls for ldiskfs])
268 AC_DEFINE(CONFIG_LDISKFSDEV_FS_XATTR, 1, [enable extented attributes for ldiskfs])
269 AC_DEFINE(CONFIG_LDISKFSDEV_FS_SECURITY, 1, [enable fs security for ldiskfs])
273 # LB_DEFINE_E2FSPROGS_NAMES
275 # Enable the use of alternate naming of ldiskfs-enabled e2fsprogs package.
277 AC_DEFUN([LB_DEFINE_E2FSPROGS_NAMES],
278 [AC_ARG_WITH([ldiskfsprogs],
279 AC_HELP_STRING([--with-ldiskfsprogs],
280 [use alternate names for ldiskfs-enabled e2fsprogs]),
283 if test x$withval = xyes ; then
284 AC_DEFINE(HAVE_LDISKFSPROGS, 1, [enable use of ldiskfsprogs package])
285 E2FSPROGS="ldiskfsprogs"
286 MKE2FS="mkfs.ldiskfs"
287 DEBUGFS="debug.ldiskfs"
288 TUNE2FS="tune.ldiskfs"
289 E2LABEL="label.ldiskfs"
290 DUMPE2FS="dump.ldiskfs"
291 E2FSCK="fsck.ldiskfs"
292 AC_MSG_RESULT([enabled])
294 E2FSPROGS="e2fsprogs"
301 AC_MSG_RESULT([disabled])
303 AC_DEFINE_UNQUOTED(E2FSPROGS, "$E2FSPROGS", [name of ldiskfs e2fsprogs package])
304 AC_DEFINE_UNQUOTED(MKE2FS, "$MKE2FS", [name of ldiskfs mkfs program])
305 AC_DEFINE_UNQUOTED(DEBUGFS, "$DEBUGFS", [name of ldiskfs debug program])
306 AC_DEFINE_UNQUOTED(TUNE2FS, "$TUNE2FS", [name of ldiskfs tune program])
307 AC_DEFINE_UNQUOTED(E2LABEL, "$E2LABEL", [name of ldiskfs label program])
308 AC_DEFINE_UNQUOTED(DUMPE2FS,"$DUMPE2FS", [name of ldiskfs dump program])
309 AC_DEFINE_UNQUOTED(E2FSCK, "$E2FSCK", [name of ldiskfs fsck program])
313 # LB_DEFINE_E2FSPROGS_NAMES
315 # Enable the use of alternate naming of ldiskfs-enabled e2fsprogs package.
317 AC_DEFUN([LB_DEFINE_E2FSPROGS_NAMES],
318 [AC_ARG_WITH([ldiskfsprogs],
319 AC_HELP_STRING([--with-ldiskfsprogs],
320 [use alternate names for ldiskfs-enabled e2fsprogs]),
323 if test x$withval = xyes ; then
324 AC_DEFINE(HAVE_LDISKFSPROGS, 1, [enable use of ldiskfsprogs package])
325 E2FSPROGS="ldiskfsprogs"
326 MKE2FS="mkfs.ldiskfs"
327 DEBUGFS="debug.ldiskfs"
328 TUNE2FS="tune.ldiskfs"
329 E2LABEL="label.ldiskfs"
330 DUMPE2FS="dump.ldiskfs"
331 E2FSCK="fsck.ldiskfs"
332 AC_MSG_RESULT([enabled])
334 E2FSPROGS="e2fsprogs"
341 AC_MSG_RESULT([disabled])
343 AC_DEFINE_UNQUOTED(E2FSPROGS, "$E2FSPROGS", [name of ldiskfs e2fsprogs package])
344 AC_DEFINE_UNQUOTED(MKE2FS, "$MKE2FS", [name of ldiskfs mkfs program])
345 AC_DEFINE_UNQUOTED(DEBUGFS, "$DEBUGFS", [name of ldiskfs debug program])
346 AC_DEFINE_UNQUOTED(TUNE2FS, "$TUNE2FS", [name of ldiskfs tune program])
347 AC_DEFINE_UNQUOTED(E2LABEL, "$E2LABEL", [name of ldiskfs label program])
348 AC_DEFINE_UNQUOTED(DUMPE2FS,"$DUMPE2FS", [name of ldiskfs dump program])
349 AC_DEFINE_UNQUOTED(E2FSCK, "$E2FSCK", [name of ldiskfs fsck program])
353 # LB_DEFINE_E2FSPROGS_NAMES
355 # Enable the use of alternate naming of ldiskfs-enabled e2fsprogs package.
357 AC_DEFUN([LB_DEFINE_E2FSPROGS_NAMES],
358 [AC_ARG_WITH([ldiskfsprogs],
359 AC_HELP_STRING([--with-ldiskfsprogs],
360 [use alternate names for ldiskfs-enabled e2fsprogs]),
363 if test x$withval = xyes ; then
364 AC_DEFINE(HAVE_LDISKFSPROGS, 1, [enable use of ldiskfsprogs package])
365 E2FSPROGS="ldiskfsprogs"
366 MKE2FS="mkfs.ldiskfs"
367 DEBUGFS="debug.ldiskfs"
368 TUNE2FS="tune.ldiskfs"
369 E2LABEL="label.ldiskfs"
370 DUMPE2FS="dump.ldiskfs"
371 E2FSCK="fsck.ldiskfs"
372 AC_MSG_RESULT([enabled])
374 E2FSPROGS="e2fsprogs"
381 AC_MSG_RESULT([disabled])
383 AC_DEFINE_UNQUOTED(E2FSPROGS, "$E2FSPROGS", [name of ldiskfs e2fsprogs package])
384 AC_DEFINE_UNQUOTED(MKE2FS, "$MKE2FS", [name of ldiskfs mkfs program])
385 AC_DEFINE_UNQUOTED(DEBUGFS, "$DEBUGFS", [name of ldiskfs debug program])
386 AC_DEFINE_UNQUOTED(TUNE2FS, "$TUNE2FS", [name of ldiskfs tune program])
387 AC_DEFINE_UNQUOTED(E2LABEL, "$E2LABEL", [name of ldiskfs label program])
388 AC_DEFINE_UNQUOTED(DUMPE2FS,"$DUMPE2FS", [name of ldiskfs dump program])
389 AC_DEFINE_UNQUOTED(E2FSCK, "$E2FSCK", [name of ldiskfs fsck program])
395 # Enable Cray XT3 features
397 AC_DEFUN([LB_CONFIG_CRAY_XT3],
398 [AC_MSG_CHECKING([whether to build Cray XT3 features])
399 AC_ARG_ENABLE([cray_xt3],
400 AC_HELP_STRING([--enable-cray-xt3],
401 [enable building of Cray XT3 features]),
402 [enable_cray_xt3='yes'],[enable_cray_xt3='no'])
403 AC_MSG_RESULT([$enable_cray_xt3])
404 if test x$enable_cray_xt3 != xno; then
405 AC_DEFINE(CRAY_XT3, 1, Enable Cray XT3 Features)
412 # Enable BGL features
414 AC_DEFUN([LB_CONFIG_BGL],
415 [AC_MSG_CHECKING([whether to build BGL features])
417 AC_HELP_STRING([--enable-bgl],
418 [enable building of BGL features]),
419 [enable_bgl='yes'],[enable_bgl='no'])
420 AC_MSG_RESULT([$enable_bgl])
421 if test x$enable_bgl != xno; then
422 AC_DEFINE(HAVE_BGL_SUPPORT, 1, Enable BGL Features)
426 enable_liblustre='no'
427 enable_libreadline='no'
432 # Support for --enable-uoss
435 [AC_MSG_CHECKING([whether to enable uoss])
436 AC_ARG_ENABLE([uoss],
437 AC_HELP_STRING([--enable-uoss],
438 [enable userspace OSS]),
439 [enable_uoss='yes'],[enable_uoss='no'])
440 AC_MSG_RESULT([$enable_uoss])
441 if test x$enable_uoss = xyes; then
442 AC_DEFINE(UOSS_SUPPORT, 1, Enable user-level OSS)
443 AC_DEFINE(LUSTRE_ULEVEL_MT, 1, Multi-threaded user-level lustre port)
445 enable_ulevel_mt='yes'
449 enable_liblustre='no'
452 AC_SUBST(enable_uoss)
456 # Support for --enable-posix-osd
458 AC_DEFUN([LB_POSIX_OSD],
459 [AC_MSG_CHECKING([whether to enable posix osd])
460 AC_ARG_ENABLE([posix-osd],
461 AC_HELP_STRING([--enable-posix-osd],
462 [enable using of posix osd]),
463 [enable_posix_osd='yes'],[enable_posix_osd='no'])
464 AC_MSG_RESULT([$enable_posix_osd])
465 if test x$enable_uoss = xyes -a x$enable_posix_osd = xyes ; then
466 AC_DEFINE(POSIX_OSD, 1, Enable POSIX OSD)
469 AM_CONDITIONAL(POSIX_OSD_ENABLED, test x$posix_osd = xyes)
475 AC_DEFUN([LB_PATH_DMU],
476 [AC_ARG_ENABLE([dmu],
477 AC_HELP_STRING([--enable-dmu],
478 [enable the DMU backend]),
479 [],[with_dmu='default'])
480 AC_MSG_CHECKING([whether to enable DMU])
489 if test x$enable_uoss = xyes -a x$posix_osd != xyes; then
490 # Enable the DMU if we're configuring a userspace server
493 # Enable the DMU by default on the b_hd_kdmu branch
494 if test -d $PWD/zfs -a x$linux25$enable_server = xyesyes; then
505 AC_MSG_RESULT([$dmu_osd])
506 if test x$dmu_osd = xyes; then
507 AC_DEFINE(DMU_OSD, 1, Enable DMU OSD)
508 if test x$enable_uoss = xyes; then
510 DMU_SRC="$PWD/lustre/zfs-lustre"
512 LB_CHECK_FILE([$DMU_SRC/src/.patched],[],[
513 AC_MSG_ERROR([A complete (patched) DMU tree was not found.])
515 AC_CONFIG_SUBDIRS(lustre/zfs-lustre)
521 SPL_DIR="$PWD/$SPL_SUBDIR"
522 ZFS_DIR="$PWD/$ZFS_SUBDIR"
524 LB_CHECK_FILE([$SPL_DIR/module/spl/spl-generic.c],[],[
525 AC_MSG_ERROR([A complete SPL tree was not found in $SPL_DIR.])
528 LB_CHECK_FILE([$ZFS_DIR/module/zfs/dmu.c],[],[
529 AC_MSG_ERROR([A complete kernel DMU tree was not found in $ZFS_DIR.])
532 AC_CONFIG_SUBDIRS(spl)
533 ac_configure_args="$ac_configure_args --with-spl=$SPL_DIR"
534 AC_CONFIG_SUBDIRS(zfs)
541 AM_CONDITIONAL(DMU_OSD_ENABLED, test x$dmu_osd = xyes)
542 AM_CONDITIONAL(KDMU, test x$dmu_osd$enable_uoss = xyesno)
548 # check for in-tree snmp support
550 AC_DEFUN([LB_PATH_SNMP],
551 [LB_CHECK_FILE([$srcdir/snmp/lustre-snmp.c],[SNMP_DIST_SUBDIR="snmp"])
552 AC_SUBST(SNMP_DIST_SUBDIR)
553 AC_SUBST(SNMP_SUBDIR)
559 # Build kernel modules?
561 AC_DEFUN([LB_CONFIG_MODULES],
562 [AC_MSG_CHECKING([whether to build kernel modules])
563 AC_ARG_ENABLE([modules],
564 AC_HELP_STRING([--disable-modules],
565 [disable building of Lustre kernel modules]),
567 LC_TARGET_SUPPORTED([
573 AC_MSG_RESULT([$enable_modules ($target_os)])
575 if test x$enable_modules = xyes ; then
588 # This is strange - Lustre supports a target we don't
589 AC_MSG_ERROR([Modules are not supported on $target_os])
600 AC_DEFUN([LB_CONFIG_UTILS],
601 [AC_MSG_CHECKING([whether to build utilities])
602 AC_ARG_ENABLE([utils],
603 AC_HELP_STRING([--disable-utils],
604 [disable building of Lustre utility programs]),
605 [],[enable_utils='yes'])
606 AC_MSG_RESULT([$enable_utils])
607 if test x$enable_utils = xyes ; then
608 LB_CONFIG_INIT_SCRIPTS
617 AC_DEFUN([LB_CONFIG_TESTS],
618 [AC_MSG_CHECKING([whether to build Lustre tests])
619 AC_ARG_ENABLE([tests],
620 AC_HELP_STRING([--disable-tests],
621 [disable building of Lustre tests]),
626 AC_MSG_RESULT([$enable_tests])
634 AC_DEFUN([LB_CONFIG_DOCS],
635 [AC_MSG_CHECKING([whether to build docs])
637 AC_HELP_STRING([--disable-doc],
638 [skip creation of pdf documentation]),
640 if test x$enable_doc = xyes ; then
649 AC_MSG_RESULT([$enable_doc])
654 # LB_CONFIG_INIT_SCRIPTS
656 # our init scripts only work on red hat linux
658 AC_DEFUN([LB_CONFIG_INIT_SCRIPTS],
659 [ENABLE_INIT_SCRIPTS=0
660 if test x$enable_utils = xyes ; then
661 AC_MSG_CHECKING([whether to install init scripts])
662 # our scripts only work on red hat systems
663 if test -f /etc/init.d/functions -a -f /etc/sysconfig/network ; then
664 ENABLE_INIT_SCRIPTS=1
670 AC_SUBST(ENABLE_INIT_SCRIPTS)
676 # add -include config.h
678 AC_DEFUN([LB_CONFIG_HEADERS],
679 [AC_CONFIG_HEADERS([config.h])
680 CPPFLAGS="-include \$(top_builddir)/config.h $CPPFLAGS"
681 EXTRA_KCFLAGS="-include $PWD/config.h $EXTRA_KCFLAGS"
682 AC_SUBST(EXTRA_KCFLAGS)
688 # defines for including the toplevel Rules
690 AC_DEFUN([LB_INCLUDE_RULES],
691 [INCLUDE_RULES="include $PWD/Rules"
692 AC_SUBST(INCLUDE_RULES)
698 # 'fixup' default paths
700 AC_DEFUN([LB_PATH_DEFAULTS],
701 [# directories for binaries
702 AC_PREFIX_DEFAULT([/usr])
707 # Directories for documentation and demos.
708 docdir='${datadir}/doc/$(PACKAGE)'
720 # checks on the C compiler
722 AC_DEFUN([LB_PROG_CC],
724 AC_MSG_CHECKING([for buggy compiler])
725 CC_VERSION=`$CC -v 2>&1 | grep "^gcc version"`
727 AC_MSG_RESULT([buggy compiler found!])
729 echo " '$CC_VERSION'"
730 echo " has been known to generate bad code, "
731 echo " please get an updated compiler."
732 AC_MSG_ERROR([sorry])
734 case "$CC_VERSION" in
738 # ost_pack_niobuf putting 64bit NTOH temporaries on the stack
739 # without "sub $0xc,%esp" to protect the stack from being
740 # stomped on by interrupts (bug 606)
741 "gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)")
744 # mandrake's similar sub 0xc compiler bug
745 # http://marc.theaimsgroup.com/?l=linux-kernel&m=104748366226348&w=2
746 "gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)")
750 AC_MSG_RESULT([no known problems])
754 # --------- unsigned long long sane? -------
755 AC_CHECK_SIZEOF(unsigned long long, 0)
756 echo "---> size SIZEOF $SIZEOF_unsigned_long_long"
757 echo "---> size SIZEOF $ac_cv_sizeof_unsigned_long_long"
758 if test $ac_cv_sizeof_unsigned_long_long != 8 ; then
759 AC_MSG_ERROR([** we assume that sizeof(long long) == 8. Tell phil@clusterfs.com])
762 if test $target_cpu == "powerpc64"; then
763 AC_MSG_WARN([set compiler with -m64])
764 CFLAGS="$CFLAGS -m64"
768 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"
770 LLCPPFLAGS="-D__arch_lib__ -D_LARGEFILE64_SOURCE=1"
773 # Add _GNU_SOURCE for strnlen on linux
774 LLCFLAGS="-g -Wall -fPIC -D_GNU_SOURCE"
777 # everyone builds against lnet and lustre
778 EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include"
779 AC_SUBST(EXTRA_KCFLAGS)
785 # AM_CONDITIONAL instances for everything
786 # (so that portals/lustre can disable some if needed)
787 AC_DEFUN([LB_CONDITIONALS],
788 [AM_CONDITIONAL(MODULES, test x$enable_modules = xyes)
789 AM_CONDITIONAL(UTILS, test x$enable_utils = xyes)
790 AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
791 AM_CONDITIONAL(DOC, test x$ENABLE_DOC = x1)
792 AM_CONDITIONAL(INIT_SCRIPTS, test x$ENABLE_INIT_SCRIPTS = "x1")
793 AM_CONDITIONAL(LINUX, test x$lb_target_os = "xlinux")
794 AM_CONDITIONAL(DARWIN, test x$lb_target_os = "xdarwin")
795 AM_CONDITIONAL(CRAY_XT3, test x$enable_cray_xt3 = "xyes")
796 AM_CONDITIONAL(SUNOS, test x$lb_target_os = "xSunOS")
798 # this lets lustre cancel libsysio, per-branch or if liblustre is
800 if test "x$LIBSYSIO_SUBDIR" = xlibsysio ; then
801 if test "x$with_sysio" != xyes ; then
806 AC_SUBST(LIBSYSIO_SUBDIR)
809 LB_LINUX_CONDITIONALS
810 LB_DARWIN_CONDITIONALS
820 # build-specific config files
822 AC_DEFUN([LB_CONFIG_FILES],
828 [Rules:build/Rules.in]
829 AC_PACKAGE_TARNAME[.spec]
836 # main configure steps
838 AC_DEFUN([LB_CONFIGURE],
857 LC_CONFIG_CLIENT_SERVER
859 # two macros for cmd3
860 m4_ifdef([LC_CONFIG_SPLIT], [LC_CONFIG_SPLIT])
874 LB_DEFINE_E2FSPROGS_NAMES
876 LB_DEFINE_E2FSPROGS_NAMES
878 LB_DEFINE_E2FSPROGS_NAMES
886 if test "$SNMP_DIST_SUBDIR" ; then
898 if test "$SNMP_DIST_SUBDIR" ; then
902 AC_SUBST(ac_configure_args)
904 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
905 AC_SUBST(MOSTLYCLEANFILES)
914 LLCPPFLAGS: $LLCPPFLAGS
916 EXTRA_KCFLAGS: $EXTRA_KCFLAGS
919 Type 'make' to build Lustre.