Whamcloud - gitweb
Branch b1_6
[fs/lustre-release.git] / build / autoconf / lustre-build.m4
1 #
2 # LB_CHECK_VERSION
3 #
4 # Verify that LUSTRE_VERSION was defined properly
5 #
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.])
9 fi
10 ])
11
12 #
13 # LB_CANONICAL_SYSTEM
14 #
15 # fixup $target_os for use in other places
16 #
17 AC_DEFUN([LB_CANONICAL_SYSTEM],
18 [case $target_os in
19         linux*)
20                 lb_target_os="linux"
21                 ;;
22         darwin*)
23                 lb_target_os="darwin"
24                 ;;
25         solaris*)
26                 lb_target_os="SunOS"
27                 ;;esac
28 AC_SUBST(lb_target_os)
29 ])
30
31 #
32 # LB_CHECK_FILE
33 #
34 # Check for file existance even when cross compiling
35 #
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)
41 else
42   AS_VAR_SET(lb_File, no)
43 fi])
44 AS_IF([test AS_VAR_GET(lb_File) = yes], [$2], [$3])[]dnl
45 AS_VAR_POPDEF([lb_File])dnl
46 ])# LB_CHECK_FILE
47
48 #
49 # LB_CHECK_FILES
50 #
51 # LB_CHECK_FILE over multiple files
52 #
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
58                                      file `]AC_File['.])
59 $2],
60                  [$3])])])
61
62 #
63 # LB_ARG_LIBS_INCLUDES
64 #
65 # support for --with-foo, --with-foo-includes, and --with-foo-libs in
66 # a single magical macro
67 #
68 AC_DEFUN([LB_ARG_LIBS_INCLUDES],
69 [lb_pathvar="m4_bpatsubst([$2], -, _)"
70 AC_MSG_CHECKING([for $1])
71 AC_ARG_WITH([$2],
72         AC_HELP_STRING([--with-$2=path],
73                 [path to $1]),
74         [],[withval=$4])
75
76 if test x$withval = xyes ; then
77         eval "$lb_pathvar='$3'"
78 else
79         eval "$lb_pathvar='$withval'"
80 fi
81 AC_MSG_RESULT([${!lb_pathvar:-no}])
82
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]),
88                 [],[withval='yes'])
89
90         lb_includevar="${lb_pathvar}_includes"
91         if test x$withval = xyes ; then
92                 eval "${lb_includevar}='${!lb_pathvar}/include'"
93         else
94                 eval "${lb_includevar}='$withval'"
95         fi
96         AC_MSG_RESULT([${!lb_includevar}])
97
98         AC_MSG_CHECKING([for $1 libs])
99         AC_ARG_WITH([$2-libs],
100                 AC_HELP_STRING([--with-$2-libs=path],
101                         [path to $1 libs]),
102                 [],[withval='yes'])
103
104         lb_libvar="${lb_pathvar}_libs"
105         if test x$withval = xyes ; then
106                 eval "${lb_libvar}='${!lb_pathvar}/lib'"
107         else
108                 eval "${lb_libvar}='$withval'"
109         fi
110         AC_MSG_RESULT([${!lb_libvar}])
111 fi
112 ])
113 ])
114
115 #
116 # LB_PATH_LIBSYSIO
117 #
118 # Handle internal/external libsysio
119 #
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)]),
124         [],[
125                 case $lb_target_os in
126                         linux)
127                                 with_sysio='yes'
128                                 ;;
129                         *)
130                                 with_sysio='no'
131                                 ;;
132                 esac
133         ])
134 AC_MSG_CHECKING([location of libsysio])
135 enable_sysio="$with_sysio"
136 case x$with_sysio in
137         xyes)
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.])
141                 ])
142                 LIBSYSIO_SUBDIR="libsysio"
143                 SYSIO="$PWD/libsysio"
144                 ;;
145         xno)
146                 AC_MSG_RESULT([disabled])
147                 ;;
148         *)
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.])
152                 ])
153                 SYSIO=$with_sysio
154                 with_sysio="yes"
155                 ;;
156 esac
157
158 # We have to configure even if we don't build here for make dist to work
159 AC_CONFIG_SUBDIRS(libsysio)
160 ])
161
162 #
163 # LB_PATH_LUSTREIOKIT
164 #
165 # Handle internal/external lustre-iokit
166 #
167 AC_DEFUN([LB_PATH_LUSTREIOKIT],
168 [AC_ARG_WITH([],
169         AC_HELP_STRING([--with-lustre-iokit=path],
170                         [set path to lustre-iokit source (default is included lustre-iokit)]),
171         [],[
172                         with_lustre_iokit='yes'
173         ])
174 AC_MSG_CHECKING([location of lustre-iokit])
175 enable_lustre_iokit="$with_lustre_iokit"
176 case x$with_lustre_iokit in
177         xyes)
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.])
181                 ])
182                 LUSTREIOKIT_SUBDIR="lustre-iokit"
183                 LUSTREIOKIT="$PWD/lustre-iokit"
184                 ;;
185         xno)
186                 AC_MSG_RESULT([disabled])
187                 ;;
188         *)
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.])
192                 ])
193                 LUSTREIOKIT="$with_lustre_iokit"
194                 with_lustre_iokit="yes"
195                 ;;
196 esac
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)
200 ])
201
202 #
203 # LB_PATH_LDISKFS
204 #
205 # Handle internal/external ldiskfs
206 #
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)]),
211         [],[
212                 if test x$linux25$enable_server = xyesyes ; then
213                         with_ldiskfs=yes
214                 else
215                         with_ldiskfs=no
216                 fi
217         ])
218 AC_MSG_CHECKING([location of ldiskfs])
219 case x$with_ldiskfs in
220         xyes)
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.])
224                 ])
225                 LDISKFS_SUBDIR="ldiskfs"
226                 LDISKFS_DIR="$PWD/ldiskfs"
227                 ;;
228         xno)
229                 AC_MSG_RESULT([disabled])
230                 ;;
231         *)
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.])
235                 ])
236                 LDISKFS_DIR=$with_ldiskfs
237                 ;;
238 esac
239 AC_SUBST(LDISKFS_DIR)
240 AC_SUBST(LDISKFS_SUBDIR)
241 AM_CONDITIONAL(LDISKFS_ENABLED, test x$with_ldiskfs != xno)
242
243 # We have to configure even if we don't build here for make dist to work
244 AC_CONFIG_SUBDIRS(ldiskfs)
245 ])
246
247 # Define no libcfs by default.
248 AC_DEFUN([LB_LIBCFS_DIR],
249 [
250 case x$libcfs_is_module in
251         xyes)
252           LIBCFS_INCLUDE_DIR="libcfs/include"
253           LIBCFS_SUBDIR="libcfs"
254           ;;
255         x*)
256           LIBCFS_INCLUDE_DIR="lnet/include"
257           LIBCFS_SUBDIR=""
258           ;;
259 esac
260 AC_SUBST(LIBCFS_SUBDIR)
261 AC_SUBST(LIBCFS_INCLUDE_DIR)
262 ])
263
264 #
265 # LB_DEFINE_LDISKFS_OPTIONS
266 #
267 # Enable config options related to ldiskfs.  These are used both by ldiskfs
268 # and lvfs (which includes ldiskfs headers.)
269 #
270 AC_DEFUN([LB_DEFINE_LDISKFS_OPTIONS],
271 [
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])
276 ])
277
278 #
279 # LB_CONFIG_CRAY_XT3
280 #
281 # Enable Cray XT3 features
282 #
283 AC_DEFUN([LB_CONFIG_CRAY_XT3],
284 [AC_MSG_CHECKING([whether to build Cray XT3 features])
285 AC_ARG_ENABLE([cray_xt3],
286         AC_HELP_STRING([--enable-cray-xt3],
287                         [enable building of Cray XT3 features]),
288         [enable_cray_xt3='yes'],[enable_cray_xt3='no'])
289 AC_MSG_RESULT([$enable_cray_xt3])
290 if test x$enable_cray_xt3 != xno; then
291         AC_DEFINE(CRAY_XT3, 1, Enable Cray XT3 Features)
292 fi
293 ])
294
295 #
296 # LB_CONFIG_BGL
297 #
298 # Enable BGL features
299 #
300 AC_DEFUN([LB_CONFIG_BGL],
301 [AC_MSG_CHECKING([whether to build BGL features])
302 AC_ARG_ENABLE([bgl],
303         AC_HELP_STRING([--enable-bgl],
304                         [enable building of BGL features]),
305         [enable_bgl='yes'],[enable_bgl='no'])
306 AC_MSG_RESULT([$enable_bgl])
307 if test x$enable_bgl != xno; then
308         AC_DEFINE(BGL_SUPPORT, 1, Enable BGL Features)
309         enable_doc='no'
310         enable_tests='no'
311         enable_server='no'
312         enable_liblustre='no'
313         enable_libreadline='no'
314 fi
315 ])
316
317 #
318 # Support for --enable-uoss
319 #
320 AC_DEFUN([LB_UOSS],
321 [AC_MSG_CHECKING([whether to enable uoss])
322 AC_ARG_ENABLE([uoss],
323         AC_HELP_STRING([--enable-uoss],
324                         [enable userspace OSS]),
325         [enable_uoss='yes'],[enable_uoss='no'])
326 AC_MSG_RESULT([$enable_uoss])
327 if test x$enable_uoss = xyes; then
328         AC_DEFINE(UOSS_SUPPORT, 1, Enable user-level OSS)
329         AC_DEFINE(LUSTRE_ULEVEL_MT, 1, Multi-threaded user-level lustre port)
330         enable_uoss='yes'
331         enable_ulevel_mt='yes'
332         enable_modules='no'
333         enable_client='no'
334         enable_tests='no'
335         enable_liblustre='no'
336         with_ldiskfs='no'
337 fi
338 AC_SUBST(enable_uoss)
339 ])
340
341 #
342 # Support for --enable-posix-osd
343 #
344 AC_DEFUN([LB_POSIX_OSD],
345 [AC_MSG_CHECKING([whether to enable posix osd])
346 AC_ARG_ENABLE([posix-osd],
347         AC_HELP_STRING([--enable-posix-osd],
348                         [enable using of posix osd]),
349         [enable_posix_osd='yes'],[enable_posix_osd='no'])
350 AC_MSG_RESULT([$enable_posix_osd])
351 if test x$enable_uoss = xyes -a x$enable_posix_osd = xyes ; then
352         AC_DEFINE(POSIX_OSD, 1, Enable POSIX OSD)
353         posix_osd='yes'
354 fi
355 AM_CONDITIONAL(POSIX_OSD_ENABLED, test x$posix_osd = xyes)
356 ])
357
358 #
359 # LB_PATH_DMU
360 #
361 AC_DEFUN([LB_PATH_DMU],
362 [AC_MSG_CHECKING([whether to enable DMU])
363 if test x$enable_uoss = xyes -a x$enable_posix_osd != xyes; then
364         DMU_SRC="$PWD/lustre/zfs-lustre"
365         AC_DEFINE(DMU_OSD, 1, Enable DMU OSD)
366         AC_MSG_RESULT([yes])
367         LB_CHECK_FILE([$DMU_SRC/src/.patched],[],[
368                 AC_MSG_ERROR([A complete (patched) DMU tree was not found.])
369         ])
370         AC_CONFIG_SUBDIRS(lustre/zfs-lustre)
371         dmu_osd='yes'
372 else
373         AC_MSG_RESULT([no])
374 fi
375 AC_SUBST(DMU_SRC)
376 AM_CONDITIONAL(DMU_OSD_ENABLED, test x$dmu_osd = xyes)
377 ])
378
379 #
380 # LB_PATH_SNMP
381 #
382 # check for in-tree snmp support
383 #
384 AC_DEFUN([LB_PATH_SNMP],
385 [LB_CHECK_FILE([$srcdir/snmp/lustre-snmp.c],[SNMP_DIST_SUBDIR="snmp"])
386 AC_SUBST(SNMP_DIST_SUBDIR)
387 AC_SUBST(SNMP_SUBDIR)
388 ])
389
390 #
391 # LB_CONFIG_MODULES
392 #
393 # Build kernel modules?
394 #
395 AC_DEFUN([LB_CONFIG_MODULES],
396 [AC_MSG_CHECKING([whether to build kernel modules])
397 AC_ARG_ENABLE([modules],
398         AC_HELP_STRING([--disable-modules],
399                         [disable building of Lustre kernel modules]),
400         [],[
401                 LC_TARGET_SUPPORTED([
402                         enable_modules='yes'
403                 ],[
404                         enable_modules='no'
405                 ])
406         ])
407 AC_MSG_RESULT([$enable_modules ($target_os)])
408
409 if test x$enable_modules = xyes ; then
410         case $target_os in
411                 linux*)
412                         LB_PROG_LINUX
413                         LIBCFS_PROG_LINUX
414                         LN_PROG_LINUX
415                         LC_PROG_LINUX
416                         ;;
417                 darwin*)
418                         LB_PROG_DARWIN
419                         LIBCFS_PROG_DARWIN
420                         ;;
421                 *)
422                         # This is strange - Lustre supports a target we don't
423                         AC_MSG_ERROR([Modules are not supported on $target_os])
424                         ;;
425         esac
426 fi
427 ])
428
429 #
430 # LB_CONFIG_UTILS
431 #
432 # Build utils?
433 #
434 AC_DEFUN([LB_CONFIG_UTILS],
435 [AC_MSG_CHECKING([whether to build utilities])
436 AC_ARG_ENABLE([utils],
437         AC_HELP_STRING([--disable-utils],
438                         [disable building of Lustre utility programs]),
439         [],[enable_utils='yes'])
440 AC_MSG_RESULT([$enable_utils])
441 if test x$enable_utils = xyes ; then 
442         LB_CONFIG_INIT_SCRIPTS
443 fi
444 ])
445
446 #
447 # LB_CONFIG_TESTS
448 #
449 # Build tests?
450 #
451 AC_DEFUN([LB_CONFIG_TESTS],
452 [AC_MSG_CHECKING([whether to build Lustre tests])
453 AC_ARG_ENABLE([tests],
454         AC_HELP_STRING([--disable-tests],
455                         [disable building of Lustre tests]),
456         [],
457         [
458                 enable_tests='yes'
459         ])
460 AC_MSG_RESULT([$enable_tests])
461 ])
462
463 #
464 # LB_CONFIG_DOCS
465 #
466 # Build docs?
467 #
468 AC_DEFUN([LB_CONFIG_DOCS],
469 [AC_MSG_CHECKING([whether to build docs])
470 AC_ARG_ENABLE(doc,
471         AC_HELP_STRING([--disable-doc],
472                         [skip creation of pdf documentation]),
473         [
474                 if test x$enable_doc = xyes ; then
475                     ENABLE_DOC=1           
476                 else
477                     ENABLE_DOC=0
478                 fi
479         ],[
480                 ENABLE_DOC=0
481                 enable_doc='no'
482         ])
483 AC_MSG_RESULT([$enable_doc])
484 AC_SUBST(ENABLE_DOC)
485 ])
486
487 #
488 # LB_CONFIG_INIT_SCRIPTS
489 #
490 # our init scripts only work on red hat linux
491 #
492 AC_DEFUN([LB_CONFIG_INIT_SCRIPTS],
493 [ENABLE_INIT_SCRIPTS=0
494 if test x$enable_utils = xyes ; then
495         AC_MSG_CHECKING([whether to install init scripts])
496         # our scripts only work on red hat systems
497         if test -f /etc/init.d/functions -a -f /etc/sysconfig/network ; then
498                 ENABLE_INIT_SCRIPTS=1
499                 AC_MSG_RESULT([yes])
500         else
501                 AC_MSG_RESULT([no])
502         fi
503 fi
504 AC_SUBST(ENABLE_INIT_SCRIPTS)
505 ])
506
507 #
508 # LB_CONFIG_HEADERS
509 #
510 # add -include config.h
511 #
512 AC_DEFUN([LB_CONFIG_HEADERS],
513 [AC_CONFIG_HEADERS([config.h])
514 CPPFLAGS="-include \$(top_builddir)/config.h $CPPFLAGS"
515 EXTRA_KCFLAGS="-include $PWD/config.h $EXTRA_KCFLAGS"
516 AC_SUBST(EXTRA_KCFLAGS)
517 ])
518
519 #
520 # LB_INCLUDE_RULES
521 #
522 # defines for including the toplevel Rules
523 #
524 AC_DEFUN([LB_INCLUDE_RULES],
525 [INCLUDE_RULES="include $PWD/Rules"
526 AC_SUBST(INCLUDE_RULES)
527 ])
528
529 #
530 # LB_PATH_DEFAULTS
531 #
532 # 'fixup' default paths
533 #
534 AC_DEFUN([LB_PATH_DEFAULTS],
535 [# directories for binaries
536 AC_PREFIX_DEFAULT([/usr])
537
538 sysconfdir='/etc'
539 AC_SUBST(sysconfdir)
540
541 # Directories for documentation and demos.
542 docdir='${datadir}/doc/$(PACKAGE)'
543 AC_SUBST(docdir)
544
545 LIBCFS_PATH_DEFAULTS
546 LN_PATH_DEFAULTS
547 LC_PATH_DEFAULTS
548
549 ])
550
551 #
552 # LB_PROG_CC
553 #
554 # checks on the C compiler
555 #
556 AC_DEFUN([LB_PROG_CC],
557 [AC_PROG_RANLIB
558 AC_MSG_CHECKING([for buggy compiler])
559 CC_VERSION=`$CC -v 2>&1 | grep "^gcc version"`
560 bad_cc() {
561         AC_MSG_RESULT([buggy compiler found!])
562         echo
563         echo "   '$CC_VERSION'"
564         echo "  has been known to generate bad code, "
565         echo "  please get an updated compiler."
566         AC_MSG_ERROR([sorry])
567 }
568 case "$CC_VERSION" in
569         "gcc version 2.95"*)
570                 bad_cc
571                 ;;
572         # ost_pack_niobuf putting 64bit NTOH temporaries on the stack
573         # without "sub    $0xc,%esp" to protect the stack from being
574         # stomped on by interrupts (bug 606)
575         "gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)")
576                 bad_cc
577                 ;;
578         # mandrake's similar sub 0xc compiler bug
579         # http://marc.theaimsgroup.com/?l=linux-kernel&m=104748366226348&w=2
580         "gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)")
581                 bad_cc
582                 ;;
583         *)
584                 AC_MSG_RESULT([no known problems])
585                 ;;
586 esac
587
588 # ---------  unsigned long long sane? -------
589 AC_CHECK_SIZEOF(unsigned long long, 0)
590 echo "---> size SIZEOF $SIZEOF_unsigned_long_long"
591 echo "---> size SIZEOF $ac_cv_sizeof_unsigned_long_long"
592 if test $ac_cv_sizeof_unsigned_long_long != 8 ; then
593         AC_MSG_ERROR([** we assume that sizeof(long long) == 8.  Tell phil@clusterfs.com])
594 fi
595
596 if test $target_cpu == "powerpc64"; then
597         AC_MSG_WARN([set compiler with -m64])
598         CFLAGS="$CFLAGS -m64"
599         CC="$CC -m64"
600 fi
601
602 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"
603
604 LLCPPFLAGS="-D__arch_lib__ -D_LARGEFILE64_SOURCE=1"
605 AC_SUBST(LLCPPFLAGS)
606
607 # Add _GNU_SOURCE for strnlen on linux
608 LLCFLAGS="-g -Wall -fPIC -D_GNU_SOURCE"
609 AC_SUBST(LLCFLAGS)
610
611 # everyone builds against lnet and lustre
612 EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include"
613 AC_SUBST(EXTRA_KCFLAGS)
614 ])
615
616 #
617 # LB_CONTITIONALS
618 #
619 # AM_CONDITIONAL instances for everything
620 # (so that portals/lustre can disable some if needed)
621 AC_DEFUN([LB_CONDITIONALS],
622 [AM_CONDITIONAL(MODULES, test x$enable_modules = xyes)
623 AM_CONDITIONAL(UTILS, test x$enable_utils = xyes)
624 AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
625 AM_CONDITIONAL(DOC, test x$ENABLE_DOC = x1)
626 AM_CONDITIONAL(INIT_SCRIPTS, test x$ENABLE_INIT_SCRIPTS = "x1")
627 AM_CONDITIONAL(LINUX, test x$lb_target_os = "xlinux")
628 AM_CONDITIONAL(DARWIN, test x$lb_target_os = "xdarwin")
629 AM_CONDITIONAL(CRAY_XT3, test x$enable_cray_xt3 = "xyes")
630 AM_CONDITIONAL(SUNOS, test x$lb_target_os = "xSunOS")
631
632 # this lets lustre cancel libsysio, per-branch or if liblustre is
633 # disabled
634 if test "x$LIBSYSIO_SUBDIR" = xlibsysio ; then
635         if test "x$with_sysio" != xyes ; then
636                 SYSIO=""
637                 LIBSYSIO_SUBDIR=""
638         fi
639 fi
640 AC_SUBST(LIBSYSIO_SUBDIR)
641 AC_SUBST(SYSIO)
642
643 LB_LINUX_CONDITIONALS
644 LB_DARWIN_CONDITIONALS
645
646 LIBCFS_CONDITIONALS
647 LN_CONDITIONALS
648 LC_CONDITIONALS
649 ])
650
651 #
652 # LB_CONFIG_FILES
653 #
654 # build-specific config files
655 #
656 AC_DEFUN([LB_CONFIG_FILES],
657 [
658 AC_CONFIG_FILES(
659 [Makefile
660 autoMakefile
661 ]
662 [Rules:build/Rules.in]
663 AC_PACKAGE_TARNAME[.spec]
664 )
665 ])
666
667 #
668 # LB_CONFIGURE
669 #
670 # main configure steps
671 #
672 AC_DEFUN([LB_CONFIGURE],
673 [LB_CANONICAL_SYSTEM
674
675 LB_LIBCFS_DIR
676
677 LB_INCLUDE_RULES
678
679 LB_CONFIG_CRAY_XT3
680 LB_CONFIG_BGL
681 LB_PATH_DEFAULTS
682
683 LB_PROG_CC
684
685 LB_UOSS
686 LB_POSIX_OSD
687 LB_PATH_DMU
688
689 LB_CONFIG_DOCS
690 LB_CONFIG_UTILS
691 LB_CONFIG_TESTS
692 LC_CONFIG_CLIENT_SERVER
693
694 # three macros for cmd3 
695 LC_CONFIG_SPLIT
696 LC_CONFIG_LDISKFS
697 LN_CONFIG_CDEBUG
698
699 LB_CONFIG_MODULES
700
701 LB_PATH_LIBSYSIO
702 LB_PATH_SNMP
703 LB_PATH_LDISKFS
704 LB_PATH_LUSTREIOKIT
705
706 LC_CONFIG_LIBLUSTRE
707 LIBCFS_CONFIGURE
708 LN_CONFIGURE
709
710 LC_CONFIGURE
711
712 if test "$SNMP_DIST_SUBDIR" ; then
713         LS_CONFIGURE
714 fi
715
716
717 LB_CONDITIONALS
718 LB_CONFIG_HEADERS
719
720 LIBCFS_CONFIG_FILES
721 LB_CONFIG_FILES
722 LN_CONFIG_FILES
723 LC_CONFIG_FILES
724 if test "$SNMP_DIST_SUBDIR" ; then
725         LS_CONFIG_FILES
726 fi
727
728 AC_SUBST(ac_configure_args)
729
730 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
731 AC_SUBST(MOSTLYCLEANFILES)
732
733 AC_OUTPUT
734
735 cat <<_ACEOF
736
737 CC:            $CC
738 LD:            $LD
739 CPPFLAGS:      $CPPFLAGS
740 LLCPPFLAGS:    $LLCPPFLAGS
741 CFLAGS:        $CFLAGS
742 EXTRA_KCFLAGS: $EXTRA_KCFLAGS
743 LLCFLAGS:      $LLCFLAGS
744
745 Type 'make' to build Lustre.
746 _ACEOF
747 ])