Whamcloud - gitweb
LU-1187 lmv: Locate right MDT in lmv.
[fs/lustre-release.git] / ldiskfs / configure.ac
1 # Process this file with autoconf to produce a configure script.
2
3 AC_PREREQ([2.57])
4 AC_INIT([Lustre ldiskfs], 3.3.0, [http://bugs.whamcloud.com/])
5 AC_CONFIG_SRCDIR([lustre-ldiskfs.spec.in])
6
7 # Don't look for install-sh, etc. in ..
8 AC_CONFIG_AUX_DIR([config])
9
10 AC_CONFIG_MACRO_DIR([config])
11
12 AC_CANONICAL_SYSTEM
13
14 AM_INIT_AUTOMAKE([1.10 tar-ustar])
15
16 AC_PROG_CC
17
18 LB_DOWNSTREAM_RELEASE
19
20 LB_BUILDID
21
22 LB_PROG_CC
23
24 AC_ARG_ENABLE([dist],
25         AC_HELP_STRING([--enable-dist],
26                         [only configure enough for make dist]),
27         [enable_dist='yes'],[enable_dist='no'])
28 AC_MSG_RESULT([$enable_dist])
29 if test x$enable_dist != xno; then
30         enable_modules='no'
31 fi
32
33 AC_MSG_CHECKING([whether to build kernel modules])
34 AC_ARG_ENABLE([modules],
35               AC_HELP_STRING([--disable-modules],
36                              [disable building of Lustre kernel modules]),[],
37                              [enable_modules='yes'],
38                              [enable_modules='no'])
39 AC_MSG_RESULT([$enable_modules])
40
41 if test x$enable_modules = xyes ; then
42         LB_LINUX_PATH
43         LB_LINUX_SYMVERFILE
44         LB_LINUX_CONFIG([MODULES],[],[
45                 AC_MSG_ERROR([module support is required to build ldiskfs kernel module.])
46         ])
47         LB_LINUX_CONFIG([MODVERSIONS])
48         LB_LINUX_CONFIG([KALLSYMS],[],[
49                 if test "x$ARCH_UM" = "x" ; then
50                         AC_MSG_ERROR([ldiskfs requires that CONFIG_KALLSYMS is enabled in your kernel.])
51                 fi
52         ])
53         LB_LINUX_MODPOST
54 fi
55
56 LB_LDISKFS_SERIES([test x$enable_dist = xno])
57
58 AC_MSG_CHECKING([whether to build Lustre server support])
59 AC_ARG_ENABLE([server],
60         AC_HELP_STRING([--disable-server],
61                        [disable Lustre server support]),
62         [],[
63                 if test -n "$LDISKFS_SERIES"; then
64                         enable_server='yes'
65                 else
66                         enable_server='no'
67                 fi
68         ])
69 AC_MSG_RESULT([$enable_server])
70
71 LB_CONFIG_HEADERS
72
73 LDISKFSDIR="$PWD/ldiskfs"
74 AC_SUBST(LDISKFSDIR)
75
76 LDISKFS_AC_PATCH_PROGRAM
77
78 if test x$enable_server$enable_dist = xyesno ; then
79 LB_LDISKFS_EXT_DIR
80 LB_LDISKFS_EXT_SOURCE
81 LB_LDISKFS_DEFINE_OPTIONS
82 fi
83
84 AM_CONDITIONAL(LDISKFS_PDO, test x$with_ldiskfs_pdo = xyes)
85
86 AC_SUBST(ac_configure_args)
87
88 AC_CONFIG_FILES([Makefile ldiskfs/Makefile]
89                 AC_PACKAGE_TARNAME[.spec])
90
91 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
92 AC_SUBST(MOSTLYCLEANFILES)
93
94 AC_OUTPUT