Whamcloud - gitweb
LU-50 ldiskfs: pdirops patch for ldiskfs
[fs/lustre-release.git] / ldiskfs / configure.ac
1 # Process this file with autoconf to produce a configure script.
2
3 AC_INIT([Lustre ldiskfs], 3.3.0, [http://bugs.whamcloud.com/])
4 AC_CONFIG_SRCDIR([lustre-ldiskfs.spec.in])
5
6 # Don't look for install-sh, etc. in ..
7 AC_CONFIG_AUX_DIR([.])
8
9 AC_CANONICAL_SYSTEM
10
11 AM_INIT_AUTOMAKE([1.9 tar-ustar])
12
13 AC_PROG_CC
14
15 LB_CANONICAL_SYSTEM
16
17 LB_DOWNSTREAM_RELEASE
18
19 LB_BUILDID
20
21 LB_INCLUDE_RULES
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 #
34 # LC_TARGET_SUPPORTED
35 #
36 # is the target os supported?
37 #
38 AC_DEFUN([LC_TARGET_SUPPORTED],
39 [case $target_os in
40         linux* | darwin*)
41 $1
42                 ;;
43         *)
44 $2
45                 ;;
46 esac
47 ])
48
49 AC_MSG_CHECKING([whether to build kernel modules])
50 AC_ARG_ENABLE([modules],
51               AC_HELP_STRING([--disable-modules],
52                              [disable building of Lustre kernel modules]),[],
53                              [LC_TARGET_SUPPORTED([enable_modules='yes'],
54                              [enable_modules='no'])])
55 AC_MSG_RESULT([$enable_modules])
56
57 if test x$enable_modules = xyes ; then
58         LB_PROG_LINUX
59 if test x$linux25 = xyes ; then
60         LB_LINUX_MODPOST
61 fi
62 fi
63
64 LB_LDISKFS_SERIES([test x$enable_dist = xno])
65
66 AC_MSG_CHECKING([whether to build Lustre server support])
67 AC_ARG_ENABLE([server],
68         AC_HELP_STRING([--disable-server],
69                        [disable Lustre server support]),
70         [],[
71                 if test -n "$LDISKFS_SERIES"; then
72                         enable_server='yes'
73                 else
74                         enable_server='no'
75                 fi
76         ])
77 AC_MSG_RESULT([$enable_server])
78
79 LB_CONFIG_HEADERS
80
81 # These allow Lustre Makefiles and autoMakefiles to be used unchanged.
82 AM_CONDITIONAL(MODULES, true)
83 AM_CONDITIONAL(LINUX, true)
84 AM_CONDITIONAL(DARWIN, true)
85 AM_CONDITIONAL(LINUX25, true)
86
87 LDISKFSDIR="$PWD/ldiskfs"
88 AC_SUBST(LDISKFSDIR)
89
90 AC_MSG_CHECKING([whether to enable quilt for making ldiskfs])
91 AC_ARG_ENABLE([quilt],
92               AC_HELP_STRING([--disable-quilt],
93                              [disable use of quilt for ldiskfs]),[],
94                              [enable_quilt='yes'])
95 AC_MSG_RESULT([$enable_quilt])
96
97 AC_PATH_PROG(PATCH, patch, [no])
98
99 if test x$enable_quilt = xno ; then
100     QUILT="no"
101 else
102     AC_PATH_PROG(QUILT, quilt, [no])
103 fi
104
105 if test x$enable_server$PATCH$QUILT = xyesnono ; then
106         AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module])
107 fi
108
109 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
110 AM_CONDITIONAL(USE_EXT4, test x$enable_ext4 = xyes)
111
112 if test x$enable_server$enable_dist = xyesno ; then
113 LB_LDISKFS_EXT_RELEASE
114 LB_LDISKFS_EXT_DIR
115 LB_LDISKFS_EXT_SOURCE
116 LB_LDISKFS_DEFINE_OPTIONS
117
118 BACKFS=$LDISKFS_BACKFS
119 AC_SUBST(BACKFS)
120 BACKFSU=${BACKFS/ext/EXT}
121 AC_SUBST(BACKFSU) # We need a Upper string
122 fi
123
124 AM_CONDITIONAL(LDISKFS_PDO, test x$with_ldiskfs_pdo = xyes)
125
126 AC_SUBST(ac_configure_args)
127
128 LB_CONFIG_FILES
129 AC_CONFIG_FILES([ldiskfs/autoMakefile ldiskfs/Makefile])
130
131 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
132 AC_SUBST(MOSTLYCLEANFILES)
133
134 AC_OUTPUT