Whamcloud - gitweb
* Added lonal (loopback NAL)
[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, 1.3.9.1)
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 # SuSE gets ldiskfs
65 AC_MSG_CHECKING([whether to enable ldiskfs])
66 AC_ARG_ENABLE([ldiskfs],
67         AC_HELP_STRING([--enable-ldiskfs],
68                         [use ldiskfs for the Lustre backing FS]),
69         [BACKINGFS='ldiskfs'],[enable_ldiskfs='no'])
70 AC_MSG_RESULT([$enable_ldiskfs])
71
72 AC_MSG_CHECKING([which backing filesystem to use])
73 AC_MSG_RESULT([$BACKINGFS])
74 AC_SUBST(BACKINGFS)
75
76 # the pinger is temporary, until we have the recovery node in place
77 AC_MSG_CHECKING([whether to enable pinger support])
78 AC_ARG_ENABLE([pinger],
79         AC_HELP_STRING([--disable-pinger],
80                         [disable recovery pinger support]),
81         [],[enable_pinger='yes'])
82 AC_MSG_RESULT([$enable_pinger])
83 if test x$enable_pinger != xno ; then
84   AC_DEFINE(ENABLE_PINGER, 1, Use the Pinger)
85 fi
86
87 AC_MSG_CHECKING([maximum OBD ioctl size])
88 AC_ARG_WITH([obd-buffer-size],
89         AC_HELP_STRING([--with-obd-buffer-size=[size]],
90                         [set lctl ioctl maximum bytes (default=8192)]),
91         [
92                 OBD_BUFFER_SIZE=$with_obd_buffer_size
93         ],[
94                 OBD_BUFFER_SIZE=8192
95         ])
96 AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes])
97 AC_DEFINE_UNQUOTED(OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size])
98
99 # specify location of libsysio tree
100 AC_MSG_CHECKING([location of libsysio])
101 AC_ARG_WITH([sysio],
102         AC_HELP_STRING([--with-sysio=[path]],
103                         [set path to libsysio source (default=../libsysio)]),
104         [
105                 SYSIO=$with_sysio
106                 SYSIO_PATH=$SYSIO
107         ],[
108                 SYSIO='$(top_srcdir)/../libsysio'
109                 SYSIO_PATH='../libsysio'
110         ])
111 AC_MSG_RESULT([$SYSIO_PATH])
112
113 AC_CHECK_FILE([$SYSIO_PATH/lib/libsysio.a],[],
114         [
115                 if test x$enable_liblustre = xyes ; then
116                    AC_MSG_ERROR([A built libsysio tree is required for building liblustre.])
117                 fi
118         ])
119 AC_SUBST(SYSIO)
120
121 #build mpi-tests 
122 AC_MSG_CHECKING([whether to build mpitests])
123 AC_ARG_ENABLE([mpitests],
124         AC_HELP_STRING([--enable-mpitests],
125                         [build liblustre mpi tests]),
126         [],[enable_mpitests=no])
127 AC_MSG_RESULT([$enable_mpitests])
128 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
129
130 # snap compilation
131 AC_MSG_CHECKING([whether to enable snapfs support])
132 AC_ARG_ENABLE([snapfs],
133         AC_HELP_STRING([--enable-snapfs],
134                         [build snapfs]),
135         [],[enable_snapfs='no'])
136 AC_MSG_RESULT([$enable_snapfs])
137 AM_CONDITIONAL(SNAPFS, test x$enable_snapfs = xyes)
138
139 # smfs compilation
140 AC_MSG_CHECKING([whether to enable smfs support])
141 AC_ARG_ENABLE([smfs],
142         AC_HELP_STRING([--enable-smfs],
143                         [build smfs]),
144         [],[enable_smfs='no'])
145 AC_MSG_RESULT([$enable_smfs])
146 AM_CONDITIONAL(SMFS, test x$enable_smfs = xyes)
147
148 sinclude(portals/build.m4)
149 sinclude(portals/archdep.m4)
150
151 AM_CONDITIONAL(LDISKFS, test x$enable_ldiskfs = xyes)
152
153 if test x$enable_inkernel = xyes ; then
154         find . -name Makefile.mk | sed 's/.mk$//' | xargs -n 1 \
155                 sh -e -x -c '(cp -f $0.mk $0.in)'
156 fi
157
158 # we need to pass a full path here for kernel makefiles
159 INCLUDE_RULES="include $PWD/Rules"
160 AC_SUBST(INCLUDE_RULES)
161
162 # ptlrpc kernel build requires this
163 LUSTRE="$PWD"
164 AC_SUBST(LUSTRE)
165
166 #
167 AM_CONDITIONAL(UTILS, test x$enable_utils = xyes)
168 AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
169
170 AM_CONFIG_HEADER(include/config.h)
171
172 AC_OUTPUT([
173 Makefile
174 Rules
175 autoMakefile
176 cobd/Makefile
177 cobd/autoMakefile
178 conf/Makefile
179 doc/Makefile
180 include/Makefile
181 include/linux/Makefile
182 include/lustre/Makefile
183 ldiskfs/Makefile
184 ldiskfs/autoMakefile
185 ldlm/Makefile
186 liblustre/Makefile
187 liblustre/tests/Makefile
188 llite/Makefile
189 llite/autoMakefile
190 lov/Makefile
191 lov/autoMakefile
192 lmv/Makefile
193 lmv/autoMakefile
194 lvfs/Makefile
195 lvfs/autoMakefile
196 mdc/Makefile
197 mdc/autoMakefile
198 mds/Makefile
199 mds/autoMakefile
200 obdclass/Makefile
201 obdclass/autoMakefile
202 obdecho/Makefile
203 obdecho/autoMakefile
204 obdfilter/Makefile
205 obdfilter/autoMakefile
206 osc/Makefile
207 osc/autoMakefile
208 ost/Makefile
209 ost/autoMakefile
210 portals/Kernelenv
211 portals/Makefile
212 portals/autoMakefile
213 portals/doc/Makefile
214 portals/include/Makefile
215 portals/include/linux/Makefile
216 portals/include/portals/Makefile
217 portals/knals/Makefile
218 portals/knals/autoMakefile
219 portals/knals/gmnal/Makefile
220 portals/knals/gmnal/autoMakefile
221 portals/knals/iibnal/Makefile
222 portals/knals/iibnal/autoMakefile
223 portals/knals/openibnal/Makefile
224 portals/knals/openibnal/autoMakefile
225 portals/knals/qswnal/Makefile
226 portals/knals/qswnal/autoMakefile
227 portals/knals/socknal/Makefile
228 portals/knals/socknal/autoMakefile
229 portals/knals/lonal/Makefile
230 portals/knals/lonal/autoMakefile
231 portals/libcfs/Makefile
232 portals/libcfs/autoMakefile
233 portals/portals/Makefile
234 portals/portals/autoMakefile
235 portals/router/Makefile
236 portals/router/autoMakefile
237 portals/tests/Makefile
238 portals/tests/autoMakefile
239 portals/unals/Makefile
240 portals/utils/Makefile
241 ptlbd/Makefile
242 ptlbd/autoMakefile
243 ptlrpc/Makefile
244 ptlrpc/autoMakefile
245 scripts/Makefile
246 scripts/lustre.spec
247 scripts/version_tag.pl
248 smfs/Makefile
249 smfs/autoMakefile
250 cmobd/Makefile
251 cmobd/autoMakefile
252 snapfs/Makefile
253 snapfs/autoMakefile
254 snapfs/utils/Makefile
255 tests/Makefile
256 utils/Lustre/Makefile
257 utils/Makefile
258 ])