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