Whamcloud - gitweb
LU-3865 build: support of new MPSS version 3.x
[fs/lustre-release.git] / config / 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                 ;;
28 esac
29 AC_SUBST(lb_target_os)
30 ])
31
32 #
33 # LB_DOWNSTREAM_RELEASE
34 #
35 AC_DEFUN([LB_DOWNSTREAM_RELEASE],
36 [AC_ARG_WITH([downstream-release],
37         AC_HELP_STRING([--with-downstream-release=string],
38                        [set a string in the BUILD_VERSION and RPM Release: (default is nothing)]),
39         [DOWNSTREAM_RELEASE=$with_downstream_release],
40         [
41         # if not specified, see if it's in the META file
42         if test -f META; then
43                 DOWNSTREAM_RELEASE=$(sed -ne '/^LOCAL_VERSION =/s/.*= *//p' META)
44         fi
45         ])
46 AC_SUBST(DOWNSTREAM_RELEASE)
47 ])
48
49 #
50 # LB_BUILDID
51 #
52 # Check if the source is a GA release and if not, set a "BUILDID"
53 #
54 # Currently there are at least two ways/modes of/for doing this.  One
55 # is if we are in a valid git repository, the other is if we are in a
56 # non-git source tree of some form.  Building the latter from the former
57 # will be handled here.
58 AC_DEFUN([LB_BUILDID],
59 [
60 AC_MSG_CHECKING([for buildid])
61 BUILDID=""
62 if git branch >/dev/null 2>&1; then
63         ffw=0
64         hash=""
65         ver=$(git describe --match v[[0-9]]_*_[[0-9]]* --tags)
66         if [[[ $ver = *-*-* ]]]; then
67                 hash=${ver##*-}
68                 ffw=${ver#*-}
69                 ffw=${ffw%-*}
70                 ver=${ver%%-*}
71         fi
72         # it's tempting to use [[ $ver =~ ^v([0-9]+_)+([0-9]+|RC[0-9]+)$ ]]
73         # here but the portability of the regex on the right is dismal
74         # (thanx suse)
75         if echo "$ver" | egrep -q "^v([[0-9]]+_)+([[0-9]]+|RC[[0-9]]+)$"; then
76                 ver=$(echo $ver | sed -e 's/^v\(.*\)/\1/' \
77                                       -e 's/_RC[[0-9]].*$//' -e 's/_/./g')
78         fi
79
80         # a "lustre fix" value of .0 should be truncated
81         if [[[ $ver = *.*.*.0 ]]]; then
82                 ver=${ver%.0}
83         fi
84         # ditto for a "lustre fix" value of _0
85         if [[[ $ver = v*_*_*_0 ]]]; then
86                 ver=${ver%_0}
87         fi
88         if [[[ $ver = v*_*_* ]]]; then
89                 ver=${ver#v}
90                 ver=${ver//_/.}
91         fi
92
93         if test "$ver" != "$VERSION"; then
94                 AC_MSG_WARN([most recent tag found: $ver does not match current version $VERSION.])
95         fi
96
97         if test "$ffw" != "0"; then
98                 BUILDID="$hash"
99                 msg="$BUILDID (ahead by $ffw commits)"
100                 AC_MSG_RESULT([$msg])
101         else
102                 AC_MSG_RESULT([none... congratulations, you must be on a tag])
103         fi
104 elif test -f META; then
105         BUILDID=$(sed -ne '/^BUILDID =/s/.*= *//p' META)
106         msg="$BUILDID (from META file)"
107         AC_MSG_RESULT([$msg])
108 else
109         AC_MSG_WARN([FIXME: I don't know how to deal with source trees outside of git that don't have a META file.  Not setting a buildid.])
110 fi
111 AC_SUBST(BUILDID)
112 ])
113
114 #
115 # LB_CHECK_FILE
116 #
117 # Check for file existance even when cross compiling
118 #
119 AC_DEFUN([LB_CHECK_FILE],
120 [AS_VAR_PUSHDEF([lb_File], [lb_cv_file_$1])dnl
121 AC_CACHE_CHECK([for $1], lb_File,
122 [if test -r "$1"; then
123         AS_VAR_SET(lb_File, yes)
124 else
125         AS_VAR_SET(lb_File, no)
126 fi])
127 AS_IF([test AS_VAR_GET(lb_File) = yes], [$2], [$3])[]dnl
128 AS_VAR_POPDEF([lb_File])dnl
129 ])# LB_CHECK_FILE
130
131
132 #
133 # LB_ARG_LIBS_INCLUDES
134 #
135 # support for --with-foo, --with-foo-includes, and --with-foo-libs in
136 # a single magical macro
137 #
138 AC_DEFUN([LB_ARG_LIBS_INCLUDES],
139 [lb_pathvar="m4_bpatsubst([$2], -, _)"
140 AC_MSG_CHECKING([for $1])
141 AC_ARG_WITH([$2],
142         AC_HELP_STRING([--with-$2=path],
143                 [path to $1]),
144         [],[withval=$4])
145
146 if test x$withval = xyes ; then
147         eval "$lb_pathvar='$3'"
148 else
149         eval "$lb_pathvar='$withval'"
150 fi
151 AC_MSG_RESULT([${!lb_pathvar:-no}])
152
153 if test x${!lb_pathvar} != x -a x${!lb_pathvar} != xno ; then
154         AC_MSG_CHECKING([for $1 includes])
155         AC_ARG_WITH([$2-includes],
156                 AC_HELP_STRING([--with-$2-includes=path],
157                         [path to $1 includes]),
158                 [],[withval='yes'])
159
160         lb_includevar="${lb_pathvar}_includes"
161         if test x$withval = xyes ; then
162                 eval "${lb_includevar}='${!lb_pathvar}/include'"
163         else
164                 eval "${lb_includevar}='$withval'"
165         fi
166         AC_MSG_RESULT([${!lb_includevar}])
167
168         AC_MSG_CHECKING([for $1 libs])
169         AC_ARG_WITH([$2-libs],
170                 AC_HELP_STRING([--with-$2-libs=path],
171                         [path to $1 libs]),
172                 [],[withval='yes'])
173
174         lb_libvar="${lb_pathvar}_libs"
175         if test x$withval = xyes ; then
176                 eval "${lb_libvar}='${!lb_pathvar}/lib'"
177         else
178                 eval "${lb_libvar}='$withval'"
179         fi
180         AC_MSG_RESULT([${!lb_libvar}])
181 fi
182 ])
183 ])
184
185 #
186 # LB_PATH_LIBSYSIO
187 #
188 # Handle internal/external libsysio
189 #
190 AC_DEFUN([LB_PATH_LIBSYSIO],
191 [AC_ARG_WITH([sysio],
192         AC_HELP_STRING([--with-sysio=path],
193                         [set path to libsysio source (default is included libsysio)]),
194         [],[
195                 case $lb_target_os in
196                         linux)
197                                 with_sysio='yes'
198                                 ;;
199                         *)
200                                 with_sysio='no'
201                                 ;;
202                 esac
203         ])
204 AC_MSG_CHECKING([location of libsysio])
205 enable_sysio="$with_sysio"
206 case x$with_sysio in
207         xyes)
208                 AC_MSG_RESULT([internal])
209                 LB_CHECK_FILE([$srcdir/libsysio/src/rmdir.c],[],[
210                         AC_MSG_ERROR([A complete internal libsysio was not found.])
211                 ])
212                 LIBSYSIO_SUBDIR="libsysio"
213                 SYSIO="$PWD/libsysio"
214                 ;;
215         xno)
216                 AC_MSG_RESULT([disabled])
217                 ;;
218         *)
219                 AC_MSG_RESULT([$with_sysio])
220                 LB_CHECK_FILE([$with_sysio/lib/libsysio.a],[],[
221                         AC_MSG_ERROR([A complete (built) external libsysio was not found.])
222                 ])
223                 SYSIO=$with_sysio
224                 with_sysio="yes"
225                 ;;
226 esac
227
228 # We have to configure even if we don't build here for make dist to work
229 AC_CONFIG_SUBDIRS([libsysio])
230 ])
231
232 #
233 # LB_PATH_LUSTREIOKIT
234 #
235 # Handle internal/external lustre-iokit
236 #
237 AC_DEFUN([LB_PATH_LUSTREIOKIT],
238 [AC_ARG_WITH([lustre-iokit],
239         AC_HELP_STRING([--with-lustre-iokit=path],
240                         [set path to lustre-iokit source (default is included lustre-iokit)]),
241         [],[
242                         with_lustre_iokit='yes'
243         ])
244 AC_MSG_CHECKING([location of lustre-iokit])
245 enable_lustre_iokit="$with_lustre_iokit"
246 case x$with_lustre_iokit in
247         xyes)
248                 AC_MSG_RESULT([internal])
249                 LB_CHECK_FILE([$srcdir/lustre-iokit/ior-survey/ior-survey],[],[
250                         AC_MSG_ERROR([A complete internal lustre-iokit was not found.])
251                 ])
252                 LUSTREIOKIT_SUBDIR="lustre-iokit"
253                 LUSTREIOKIT="$PWD/lustre-iokit"
254                 ;;
255         xno)
256                 AC_MSG_RESULT([disabled])
257                 ;;
258         *)
259                 AC_MSG_RESULT([$with_lustre_iokit])
260                 LB_CHECK_FILE([$with_lustre_iokit/ior-survey/ior_survey],[],[
261                         AC_MSG_ERROR([A complete (built) external lustre-iokit was not found.])
262                 ])
263                 LUSTREIOKIT="$with_lustre_iokit"
264                 ;;
265 esac
266 AC_SUBST(LUSTREIOKIT_SUBDIR)
267 # We have to configure even if we don't build here for make dist to work
268 AC_CONFIG_SUBDIRS([lustre-iokit])
269 AM_CONDITIONAL(BUILD_LUSTREIOKIT, [test "x$with_lustre_iokit" != xno])
270 ])
271
272 # Define no libcfs by default.
273 AC_DEFUN([LB_LIBCFS_DIR],
274 [
275 case x$libcfs_is_module in
276         xyes)
277           LIBCFS_INCLUDE_DIR="libcfs/include"
278           LIBCFS_SUBDIR="libcfs"
279           ;;
280         x*)
281           LIBCFS_INCLUDE_DIR="lnet/include"
282           LIBCFS_SUBDIR=""
283           ;;
284 esac
285 AC_SUBST(LIBCFS_SUBDIR)
286 AC_SUBST(LIBCFS_INCLUDE_DIR)
287 ])
288
289 #
290 # LB_PATH_SNMP
291 #
292 # check for in-tree snmp support
293 #
294 AC_DEFUN([LB_PATH_SNMP],
295 [LB_CHECK_FILE([$srcdir/snmp/lustre-snmp.c],[SNMP_DIST_SUBDIR="snmp"])
296 AC_SUBST(SNMP_DIST_SUBDIR)
297 AC_SUBST(SNMP_SUBDIR)
298 ])
299
300 #
301 # LB_CONFIG_MODULES
302 #
303 # Build kernel modules?
304 #
305 AC_DEFUN([LB_CONFIG_MODULES],
306 [AC_MSG_CHECKING([whether to build kernel modules])
307 AC_ARG_ENABLE([modules],
308         AC_HELP_STRING([--disable-modules],
309                         [disable building of Lustre kernel modules]),
310         [],[
311                 LC_TARGET_SUPPORTED([
312                         enable_modules='yes'
313                 ],[
314                         enable_modules='no'
315                 ])
316         ])
317 AC_MSG_RESULT([$enable_modules ($target_os)])
318
319 if test x$enable_modules = xyes ; then
320         case $target_os in
321                 linux*)
322                         LB_PROG_LINUX
323                         LIBCFS_PROG_LINUX
324                         LN_PROG_LINUX
325                         LC_PROG_LINUX
326                         ;;
327                 darwin*)
328                         LB_PROG_DARWIN
329                         LIBCFS_PROG_DARWIN
330                         ;;
331                 *)
332                         # This is strange - Lustre supports a target we don't
333                         AC_MSG_ERROR([Modules are not supported on $target_os])
334                         ;;
335         esac
336 fi
337 ])
338
339 #
340 # LB_CONFIG_UTILS
341 #
342 # Build utils?
343 #
344 AC_DEFUN([LB_CONFIG_UTILS],
345 [AC_MSG_CHECKING([whether to build utilities])
346 AC_ARG_ENABLE([utils],
347         AC_HELP_STRING([--disable-utils],
348                         [disable building of Lustre utility programs]),
349         [],[enable_utils='yes'])
350 AC_MSG_RESULT([$enable_utils])
351 if test x$enable_utils = xyes ; then 
352         LB_CONFIG_INIT_SCRIPTS
353 fi
354 ])
355
356 #
357 # LB_CONFIG_TESTS
358 #
359 # Build tests?
360 #
361 AC_DEFUN([LB_CONFIG_TESTS],
362 [AC_MSG_CHECKING([whether to build Lustre tests])
363 AC_ARG_ENABLE([tests],
364         AC_HELP_STRING([--disable-tests],
365                         [disable building of Lustre tests]),
366         [],
367         [
368                 enable_tests='yes'
369         ])
370 AC_MSG_RESULT([$enable_tests])
371 ])
372
373 #
374 # LB_CONFIG_DIST
375 #
376 # Just enough configure so that "make dist" is useful
377 #
378 # this simply re-adjusts some defaults, which of course can be overridden
379 # on the configure line after the --for-dist option
380 #
381 AC_DEFUN([LB_CONFIG_DIST],
382 [AC_MSG_CHECKING([whether to configure just enough for make dist])
383 AC_ARG_ENABLE([dist],
384         AC_HELP_STRING([--enable-dist],
385                         [only configure enough for make dist]),
386         [enable_dist='yes'],[enable_dist='no'])
387 AC_MSG_RESULT([$enable_dist])
388 if test x$enable_dist != xno; then
389         enable_modules='no'
390         enable_utils='no'
391         enable_liblustre='no'
392         enable_doc='no'
393         enable_tests='no'
394 fi
395 ])
396
397 #
398 # LB_CONFIG_DOCS
399 #
400 # Build docs?
401 #
402 AC_DEFUN([LB_CONFIG_DOCS],
403 [AC_MSG_CHECKING([whether to build docs])
404 AC_ARG_ENABLE(doc,
405         AC_HELP_STRING([--disable-doc],
406                         [skip creation of pdf documentation]),
407         [
408                 if test x$enable_doc = xyes ; then
409                     ENABLE_DOC=1
410                 else
411                     ENABLE_DOC=0
412                 fi
413         ],[
414                 ENABLE_DOC=0
415                 enable_doc='no'
416         ])
417 AC_MSG_RESULT([$enable_doc])
418 AC_SUBST(ENABLE_DOC)
419 ])
420
421 #
422 # LB_CONFIG_INIT_SCRIPTS
423 #
424 # our init scripts only work on red hat linux
425 #
426 AC_DEFUN([LB_CONFIG_INIT_SCRIPTS],
427 [ENABLE_INIT_SCRIPTS=0
428 if test x$enable_utils = xyes ; then
429         AC_MSG_CHECKING([whether to install init scripts])
430         # our scripts only work on red hat systems
431         if test -f /etc/init.d/functions -a -f /etc/sysconfig/network ; then
432                 ENABLE_INIT_SCRIPTS=1
433                 AC_MSG_RESULT([yes])
434         else
435                 AC_MSG_RESULT([no])
436         fi
437 fi
438 AC_SUBST(ENABLE_INIT_SCRIPTS)
439 ])
440
441 #
442 # LB_CONFIG_HEADERS
443 #
444 # add -include config.h
445 #
446 AC_DEFUN([LB_CONFIG_HEADERS],[
447         AC_CONFIG_HEADERS([config.h])
448         CPPFLAGS="-include $PWD/config.h $CPPFLAGS"
449         EXTRA_KCFLAGS="-include $PWD/config.h $EXTRA_KCFLAGS"
450         AC_SUBST(EXTRA_KCFLAGS)
451 ])
452
453 #
454 # LB_INCLUDE_RULES
455 #
456 # defines for including the toplevel Rules
457 #
458 AC_DEFUN([LB_INCLUDE_RULES],[
459         INCLUDE_RULES="include $PWD/Rules"
460         AC_SUBST(INCLUDE_RULES)
461 ])
462
463 #
464 # LB_PATH_DEFAULTS
465 #
466 # 'fixup' default paths
467 #
468 AC_DEFUN([LB_PATH_DEFAULTS],
469 [# directories for binaries
470 AC_PREFIX_DEFAULT([/usr])
471
472 sysconfdir='$(CROSS_PATH)/etc'
473 AC_SUBST(sysconfdir)
474
475 # Directories for documentation and demos.
476 docdir='$(datadir)/doc/$(PACKAGE)'
477 AC_SUBST(docdir)
478
479 LIBCFS_PATH_DEFAULTS
480 LN_PATH_DEFAULTS
481 LC_PATH_DEFAULTS
482
483 ])
484
485 #
486 # LB_PROG_CC
487 #
488 # checks on the C compiler
489 #
490 AC_DEFUN([LB_PROG_CC],
491 [AC_PROG_RANLIB
492 AC_CHECK_TOOL(LD, ld, [no])
493 AC_CHECK_TOOL(OBJDUMP, objdump, [no])
494 AC_CHECK_TOOL(STRIP, strip, [no])
495
496 # ---------  unsigned long long sane? -------
497 AC_CHECK_SIZEOF(unsigned long long, 0)
498 echo "---> size SIZEOF $SIZEOF_unsigned_long_long"
499 echo "---> size SIZEOF $ac_cv_sizeof_unsigned_long_long"
500 if test $ac_cv_sizeof_unsigned_long_long != 8 ; then
501         AC_MSG_ERROR([** we assume that sizeof(long long) == 8.])
502 fi
503
504 if test $target_cpu == "powerpc64"; then
505         AC_MSG_WARN([set compiler with -m64])
506         CFLAGS="$CFLAGS -m64"
507         CC="$CC -m64"
508 fi
509
510 CPPFLAGS="-I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include $CPPFLAGS"
511
512 LLCPPFLAGS="-D__arch_lib__ -D_LARGEFILE64_SOURCE=1"
513 AC_SUBST(LLCPPFLAGS)
514
515 # Add _GNU_SOURCE for strnlen on linux
516 LLCFLAGS="-g -Wall -fPIC -D_GNU_SOURCE"
517 AC_SUBST(LLCFLAGS)
518
519 CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE"
520 AC_SUBST(CCASFLAGS)
521
522 # everyone builds against lnet and lustre
523 EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include"
524 AC_SUBST(EXTRA_KCFLAGS)
525 ])
526
527 #
528 # LB_CONTITIONALS
529 #
530 # AM_CONDITIONAL instances for everything
531 # (so that portals/lustre can disable some if needed)
532 AC_DEFUN([LB_CONDITIONALS],
533 [AM_CONDITIONAL(MODULES, test x$enable_modules = xyes)
534 AM_CONDITIONAL(UTILS, test x$enable_utils = xyes)
535 AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
536 AM_CONDITIONAL(DOC, test x$ENABLE_DOC = x1)
537 AM_CONDITIONAL(INIT_SCRIPTS, test x$ENABLE_INIT_SCRIPTS = "x1")
538 AM_CONDITIONAL(LINUX, test x$lb_target_os = "xlinux")
539 AM_CONDITIONAL(DARWIN, test x$lb_target_os = "xdarwin")
540 AM_CONDITIONAL(SUNOS, test x$lb_target_os = "xSunOS")
541 AM_CONDITIONAL(USES_DPKG, test x$uses_dpkg = "xyes")
542 AM_CONDITIONAL([USE_QUILT], [test x$use_quilt = xyes])
543
544 # Sanity check for PCLMULQDQ instruction availability
545 # PCLMULQDQ instruction is a new instruction available beginning with
546 # the all new Core processor family based on the 32nm microarchitecture
547 # codename Westmere. So, $target_cpu = x86_64 should have this instruction
548 # except MIC microarchitecture (k1om).
549 AM_CONDITIONAL(HAVE_PCLMULQDQ, test x$target_cpu = "xx86_64" -a x$target_vendor != "xk1om")
550 if test x$target_cpu = "xx86_64" -a x$target_vendor != "xk1om" ; then
551         AC_DEFINE(HAVE_PCLMULQDQ, 1, [have PCLMULQDQ instruction])
552 fi
553
554 # this lets lustre cancel libsysio, per-branch or if liblustre is
555 # disabled
556 if test "x$LIBSYSIO_SUBDIR" = xlibsysio ; then
557         if test "x$with_sysio" != xyes ; then
558                 SYSIO=""
559                 LIBSYSIO_SUBDIR=""
560         fi
561 fi
562 AC_SUBST(LIBSYSIO_SUBDIR)
563 AC_SUBST(SYSIO)
564
565 LB_DARWIN_CONDITIONALS
566
567 LIBCFS_CONDITIONALS
568 LN_CONDITIONALS
569 LC_CONDITIONALS
570 ])
571
572 #
573 # LB_CONFIG_FILES
574 #
575 # build-specific config files
576 #
577 AC_DEFUN([LB_CONFIG_FILES],
578 [
579         AC_CONFIG_FILES([
580                 Makefile
581                 autoMakefile]
582                 config/Makefile
583                 [Rules:build/Rules.in]
584                 AC_PACKAGE_TARNAME[.spec]
585                 contrib/Makefile
586                 contrib/lbuild/Makefile
587                 contrib/scripts/Makefile
588                 ldiskfs/Makefile
589                 ldiskfs/autoMakefile
590         )
591 ])
592
593 #
594 # LB_CONFIG_SERVERS
595 #
596 AC_DEFUN([LB_CONFIG_SERVERS],
597 [
598 AC_ARG_ENABLE([server],
599         AC_HELP_STRING([--disable-server],
600                         [disable Lustre server support]),
601         [AS_IF([test x$enable_server != xyes -a x$enable_server != xno],
602                 [AC_MSG_ERROR([server valid options are "yes" or "no"])])
603         AS_IF([test x$enable_server = xyes -a x$enable_dist = xyes],
604                 [AC_MSG_ERROR([--enable-server cannot be used with --enable-dist])])
605         ],
606         [AS_IF([test x$enable_dist = xyes],
607                      [enable_server=no],
608                      [enable_server=maybe])
609         ]
610 )
611
612 # There are at least two good reasons why we should really run
613 # LB_CONFIG_MODULES elsewhere before the call to LB_CONFIG_SERVERS:
614 # LB_CONFIG_MODULES needs to be run for client support even when
615 # servers are disabled, and because module support is actually a
616 # prerequisite of server support.  However, some things under
617 # LB_CONFIG_MODULES need us to already have checked for --disable-server,
618 # before running, so until LB_CONFIG_MODULES can be reorganized, we
619 # call it here.
620 LB_CONFIG_MODULES
621 AS_IF([test x$enable_modules = xno],[enable_server=no])
622 LB_CONFIG_LDISKFS
623 LB_CONFIG_ZFS
624
625 # If no backends were configured, and the user did not explicitly
626 # require servers to be enabled, we just disable servers.
627 AS_IF([test x$enable_ldiskfs = xno -a x$enable_zfs = xno],
628         [AS_CASE([$enable_server],
629                 [maybe], [enable_server=no],
630                 [yes], [AC_MSG_ERROR([cannot enable servers, no backends were configured])])
631         ],
632         [AS_IF([test x$enable_server = xmaybe], [enable_server=yes])]
633 )
634
635 AC_MSG_CHECKING([whether to build Lustre server support])
636 AC_MSG_RESULT([$enable_server])
637 AS_IF([test x$enable_server = xyes],
638         [AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server])]
639 )
640 ])
641
642 #
643 # LB_CONFIGURE
644 #
645 # main configure steps
646 #
647 AC_DEFUN([LB_CONFIGURE],
648 [LB_CANONICAL_SYSTEM
649
650 LB_CONFIG_DIST
651
652 LB_DOWNSTREAM_RELEASE
653 LB_USES_DPKG
654 LB_BUILDID
655
656 LB_LIBCFS_DIR
657
658 LB_INCLUDE_RULES
659
660 LB_PATH_DEFAULTS
661
662 LB_PROG_CC
663
664 LC_OSD_ADDON
665
666 LB_CONFIG_DOCS
667 LB_CONFIG_UTILS
668 LB_CONFIG_TESTS
669 LC_CONFIG_CLIENT
670 LB_CONFIG_SERVERS
671
672 # two macros for cmd3
673 m4_ifdef([LC_CONFIG_SPLIT], [LC_CONFIG_SPLIT])
674 LN_CONFIG_CDEBUG
675 LC_QUOTA
676
677 LN_CONFIG_USERSPACE
678
679 LB_PATH_LIBSYSIO
680 LB_PATH_SNMP
681 LB_PATH_LUSTREIOKIT
682
683 LB_DEFINE_E2FSPROGS_NAMES
684
685 LC_CONFIG_LIBLUSTRE
686 LIBCFS_CONFIGURE
687 LN_CONFIGURE
688
689 LC_CONFIGURE
690
691 if test "$SNMP_DIST_SUBDIR" ; then
692         LS_CONFIGURE
693 fi
694
695
696 LB_CONDITIONALS
697 LB_CONFIG_HEADERS
698
699 LIBCFS_CONFIG_FILES
700 LB_CONFIG_FILES
701 LN_CONFIG_FILES
702 LC_CONFIG_FILES
703 if test "$SNMP_DIST_SUBDIR" ; then
704         LS_CONFIG_FILES
705 fi
706
707 AC_SUBST(ac_configure_args)
708
709 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
710 AC_SUBST(MOSTLYCLEANFILES)
711
712 AC_OUTPUT
713
714 cat <<_ACEOF
715
716 CC:            $CC
717 LD:            $LD
718 CPPFLAGS:      $CPPFLAGS
719 LLCPPFLAGS:    $LLCPPFLAGS
720 CFLAGS:        $CFLAGS
721 EXTRA_KCFLAGS: $EXTRA_KCFLAGS
722 LLCFLAGS:      $LLCFLAGS
723
724 Type 'make' to build Lustre.
725 _ACEOF
726 ])