Whamcloud - gitweb
New files for vanilla 2.6.6 linux kernel. also a new ldiskfs for 2.6.6
[fs/lustre-release.git] / lustre / configure.in
1 # Copyright (C) 2001-2003 Cluster File Systems, Inc.
2 #
3 # This code is issued under the GNU General Public License.
4 # See the file COPYING in this distribution
5
6 AC_INIT
7 AC_CANONICAL_SYSTEM
8 AM_INIT_AUTOMAKE(lustre, HEAD)
9 # AM_MAINTAINER_MODE
10
11 # Four main targets: lustre kernel modules, utilities, tests, and liblustre
12 AC_MSG_CHECKING([whether to build kernel modules])
13 AC_ARG_ENABLE([modules],
14         AC_HELP_STRING([--disable-modules],
15                         [disable building of Lustre kernel modules]),
16         [],[enable_modules='yes'])
17 AC_MSG_RESULT([$enable_modules])
18 AM_CONDITIONAL(MODULES, test x$enable_modules = xyes)
19
20 AC_MSG_CHECKING([whether to build Lustre library])
21 AC_ARG_ENABLE([liblustre],
22         AC_HELP_STRING([--disable-liblustre],
23                         [disable building of Lustre library]),
24         [],[enable_liblustre='yes'])
25 AC_MSG_RESULT([$enable_liblustre])
26 AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)
27
28 AC_MSG_CHECKING([whether to build utilities])
29 AC_ARG_ENABLE([utils],
30         AC_HELP_STRING([--disable-utils],
31                         [disable building of Lustre utility programs]),
32         [],[enable_utils='yes'])
33 AC_MSG_RESULT([$enable_utils])
34
35 AC_MSG_CHECKING([whether to build Lustre tests])
36 AC_ARG_ENABLE([tests],
37         AC_HELP_STRING([--disable-tests],
38                         [disable building of Lustre tests]),
39         [],[enable_tests='yes'])
40 AC_MSG_RESULT([$enable_tests])
41
42 # specify wether to build doc or not
43 AC_MSG_CHECKING([whether to build docs])
44 AC_ARG_ENABLE(doc,
45         AC_HELP_STRING([--disable-doc],
46                         [skip creation of pdf documentation]),
47         [
48                 if test x$enable_doc = xyes ; then
49                     ENABLE_DOC=1           
50                 else
51                     ENABLE_DOC=0
52                 fi
53         ],[
54                 ENABLE_DOC=0
55                 enable_doc='no'
56         ])
57 AC_MSG_RESULT([$enable_doc])
58 AM_CONDITIONAL(DOC, test x$ENABLE_DOC = x1)
59 AC_SUBST(ENABLE_DOC)
60
61 # default backing fs is ext3
62 BACKINGFS='ext3'
63
64 # LLNL patches their ext3 and calls it extN
65 AC_MSG_CHECKING([whether to use extN])
66 AC_ARG_ENABLE([extN],
67         AC_HELP_STRING([--enable-extN],
68                         [use extN instead of ext3 for lustre backend]),
69         [BACKINGFS='extN'],[enable_extN='no'])
70 AC_MSG_RESULT([$enable_extN])
71 AM_CONDITIONAL(EXTN, test x$enable_extN = xyes)
72
73 # SuSE gets ldiskfs
74 AC_MSG_CHECKING([whether to enable ldiskfs])
75 AC_ARG_ENABLE([ldiskfs],
76         AC_HELP_STRING([--enable-ldiskfs],
77                         [use ldiskfs for the Lustre backing FS]),
78         [BACKINGFS='ldiskfs'],[enable_ldiskfs='no'])
79 AC_MSG_RESULT([$enable_ldiskfs])
80 AM_CONDITIONAL(LDISKFS, test x$enable_ldiskfs = xyes)
81
82 AC_MSG_CHECKING([which backing filesystem to use])
83 AC_MSG_RESULT([$BACKINGFS])
84 AC_SUBST(BACKINGFS)
85
86 # the pinger is temporary, until we have the recovery node in place
87 AC_MSG_CHECKING([whether to enable pinger support])
88 AC_ARG_ENABLE([pinger],
89         AC_HELP_STRING([--disable-pinger],
90                         [disable recovery pinger support]),
91         [],[enable_pinger='yes'])
92 AC_MSG_RESULT([$enable_pinger])
93 if test x$enable_pinger != xno ; then
94   AC_DEFINE(ENABLE_PINGER, 1, Use the Pinger)
95 fi
96
97 AC_MSG_CHECKING([maximum OBD ioctl size])
98 AC_ARG_WITH([obd-buffer-size],
99         AC_HELP_STRING([--with-obd-buffer-size=[size]],
100                         [set lctl ioctl maximum bytes (default=8192)]),
101         [
102                 OBD_BUFFER_SIZE=$with_obd_buffer_size
103         ],[
104                 OBD_BUFFER_SIZE=8192
105         ])
106 AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes])
107 AC_DEFINE_UNQUOTED(OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size])
108
109 # specify location of libsysio tree
110 AC_MSG_CHECKING([location of libsysio])
111 AC_ARG_WITH([sysio],
112         AC_HELP_STRING([--with-sysio=[path]],
113                         [set path to libsysio source (default=../libsysio)]),
114         [
115                 SYSIO=$with_sysio
116                 SYSIO_PATH=$SYSIO
117         ],[
118                 SYSIO='$(top_srcdir)/../libsysio'
119                 SYSIO_PATH='../libsysio'
120         ])
121 AC_MSG_RESULT([$SYSIO_PATH])
122
123 AC_CHECK_FILE([$SYSIO_PATH/src/libsysio.a],[],
124         [
125                 if test x$enable_liblustre = xyes ; then
126                    AC_MSG_ERROR([A built libsysio tree is required for building liblustre.])
127                 fi
128         ])
129 AC_SUBST(SYSIO)
130
131 #build mpi-tests 
132 AC_MSG_CHECKING([whether to build mpitests])
133 AC_ARG_ENABLE([mpitests],
134         AC_HELP_STRING([--enable-mpitests],
135                         [build liblustre mpi tests]),
136         [],[enable_mpitests=no])
137 AC_MSG_RESULT([$enable_mpitests])
138 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
139
140 # snap compilation
141 AC_MSG_CHECKING([whether to enable snapfs support])
142 AC_ARG_ENABLE([snapfs],
143         AC_HELP_STRING([--enable-snapfs],
144                         [build snapfs]),
145         [],[enable_snapfs='no'])
146 AC_MSG_RESULT([$enable_snapfs])
147 AM_CONDITIONAL(SNAPFS, test x$enable_snapfs = xyes)
148
149 # smfs compilation
150 AC_MSG_CHECKING([whether to enable smfs support])
151 AC_ARG_ENABLE([smfs],
152         AC_HELP_STRING([--enable-smfs],
153                         [build smfs]),
154         [],[enable_smfs='no'])
155 AC_MSG_RESULT([$enable_smfs])
156 AM_CONDITIONAL(SMFS, test x$enable_smfs = xyes)
157
158 sinclude(portals/build.m4)
159 sinclude(portals/archdep.m4)
160
161 if test x$enable_inkernel = xyes ; then
162         find . -name Makefile.mk | sed 's/.mk$//' | xargs -n 1 \
163                 sh -e -x -c '(cp -f $0.mk $0.in)'
164 fi
165
166 # we need to pass a full path here for kernel makefiles
167 INCLUDE_RULES="include $PWD/Rules"
168 AC_SUBST(INCLUDE_RULES)
169
170 # ptlrpc kernel build requires this
171 LUSTRE="$PWD"
172 AC_SUBST(LUSTRE)
173
174 #
175 AM_CONDITIONAL(UTILS, test x$enable_utils = xyes)
176 AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
177
178 AM_CONFIG_HEADER(include/config.h)
179
180 AC_OUTPUT([
181 Makefile
182 Rules
183 autoMakefile
184 cobd/Makefile
185 cobd/autoMakefile
186 conf/Makefile
187 doc/Makefile
188 include/Makefile
189 include/linux/Makefile
190 include/lustre/Makefile
191 ldiskfs/Makefile
192 ldiskfs/autoMakefile
193 ldlm/Makefile
194 liblustre/Makefile
195 liblustre/tests/Makefile
196 llite/Makefile
197 llite/autoMakefile
198 lov/Makefile
199 lov/autoMakefile
200 lvfs/Makefile
201 lvfs/autoMakefile
202 mdc/Makefile
203 mdc/autoMakefile
204 mds/Makefile
205 mds/autoMakefile
206 obdclass/Makefile
207 obdclass/autoMakefile
208 obdecho/Makefile
209 obdecho/autoMakefile
210 obdfilter/Makefile
211 obdfilter/autoMakefile
212 osc/Makefile
213 osc/autoMakefile
214 ost/Makefile
215 ost/autoMakefile
216 portals/Kernelenv
217 portals/Makefile
218 portals/autoMakefile
219 portals/doc/Makefile
220 portals/knals/Makefile
221 portals/knals/autoMakefile
222 portals/knals/gmnal/Makefile
223 portals/knals/gmnal/autoMakefile
224 portals/knals/ibnal/Makefile
225 portals/knals/ibnal/autoMakefile
226 portals/knals/qswnal/Makefile
227 portals/knals/qswnal/autoMakefile
228 portals/knals/socknal/Makefile
229 portals/knals/socknal/autoMakefile
230 portals/libcfs/Makefile
231 portals/libcfs/autoMakefile
232 portals/portals/Makefile
233 portals/portals/autoMakefile
234 portals/router/Makefile
235 portals/router/autoMakefile
236 portals/tests/Makefile
237 portals/tests/autoMakefile
238 portals/unals/Makefile
239 portals/utils/Makefile
240 ptlbd/Makefile
241 ptlbd/autoMakefile
242 ptlrpc/Makefile
243 ptlrpc/autoMakefile
244 scripts/Makefile
245 scripts/lustre.spec
246 scripts/version_tag.pl
247 smfs/Makefile
248 smfs/autoMakefile
249 snapfs/Makefile
250 snapfs/autoMakefile
251 snapfs/utils/Makefile
252 tests/Makefile
253 utils/Lustre/Makefile
254 utils/Makefile
255 ])