Whamcloud - gitweb
LU-3712 lmv: choose right MDT for open by FID
[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], 4.1.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 -Wno-portability])
15 AM_MAINTAINER_MODE([enable])
16
17 AC_PROG_CC
18
19 LB_DOWNSTREAM_RELEASE
20
21 LB_BUILDID
22
23 LB_PROG_CC
24
25 AC_ARG_ENABLE([dist],
26         AC_HELP_STRING([--enable-dist],
27                         [only configure enough for make dist]),
28         [enable_dist='yes'],[enable_dist='no'])
29 AC_MSG_RESULT([$enable_dist])
30 if test x$enable_dist != xno; then
31         enable_modules='no'
32 fi
33
34 AC_MSG_CHECKING([whether to build kernel modules])
35 AC_ARG_ENABLE([modules],
36               AC_HELP_STRING([--disable-modules],
37                              [disable building of Lustre kernel modules]),[],
38                              [enable_modules='yes'],
39                              [enable_modules='no'])
40 AC_MSG_RESULT([$enable_modules])
41
42 if test x$enable_modules = xyes ; then
43         LB_LINUX_PATH
44         LB_LINUX_SYMVERFILE
45         LB_LINUX_CONFIG([MODULES],[],[
46                 AC_MSG_ERROR([module support is required to build ldiskfs kernel module.])
47         ])
48         LB_LINUX_CONFIG([MODVERSIONS])
49         LB_LINUX_CONFIG([KALLSYMS],[],[
50                 AC_MSG_ERROR([ldiskfs requires that CONFIG_KALLSYMS is enabled in your kernel.])
51         ])
52 fi
53
54 LB_LDISKFS_SERIES([test x$enable_dist = xno])
55
56 AC_MSG_CHECKING([whether to build Lustre server support])
57 AC_ARG_ENABLE([server],
58         AC_HELP_STRING([--disable-server],
59                        [disable Lustre server support]),
60         [],[
61                 if test -n "$LDISKFS_SERIES"; then
62                         enable_server='yes'
63                 else
64                         enable_server='no'
65                 fi
66         ])
67 AC_MSG_RESULT([$enable_server])
68
69 LDISKFSDIR="$PWD/ldiskfs"
70 AC_SUBST(LDISKFSDIR)
71
72 LDISKFS_AC_PATCH_PROGRAM
73
74 if test x$enable_server$enable_dist = xyesno ; then
75 LB_LDISKFS_EXT_DIR
76 LB_LDISKFS_EXT_SOURCE
77 LB_EXT_FREE_BLOCKS_WITH_BUFFER_HEAD
78 LB_EXT_PBLOCK
79 fi
80
81 LB_CONFIG_HEADERS
82
83 AC_SUBST(ac_configure_args)
84
85 AC_CONFIG_FILES([Makefile ldiskfs/Makefile]
86                 AC_PACKAGE_TARNAME[.spec])
87
88 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
89 AC_SUBST(MOSTLYCLEANFILES)
90
91 AC_OUTPUT