Whamcloud - gitweb
Update snapfs
[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, b1_4)
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
147 AC_MSG_RESULT([$enable_snapfs])
148 AM_CONDITIONAL(SNAPFS, test x$enable_snapfs = xyes)
149 if test x$enable_snapfs = xyes ; then
150         AC_DEFINE(CONFIG_SNAPFS, 1, [enable snap support])
151 fi
152
153 sinclude(portals/build.m4)
154 sinclude(portals/archdep.m4)
155
156 if test x$enable_inkernel = xyes ; then
157         find . -name Makefile.mk | sed 's/.mk$//' | xargs -n 1 \
158                 sh -e -x -c '(cp -f $0.mk $0.in)'
159 fi
160
161 # we need to pass a full path here for kernel makefiles
162 INCLUDE_RULES="include $PWD/Rules"
163 AC_SUBST(INCLUDE_RULES)
164
165 # ptlrpc kernel build requires this
166 LUSTRE="$PWD"
167 AC_SUBST(LUSTRE)
168
169 #
170 AM_CONDITIONAL(UTILS, test x$enable_utils = xyes)
171 AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
172
173 AM_CONFIG_HEADER(include/config.h)
174
175 AC_OUTPUT([
176 Makefile
177 Rules
178 autoMakefile
179 cobd/Makefile
180 cobd/autoMakefile
181 conf/Makefile
182 doc/Makefile
183 include/Makefile
184 include/linux/Makefile
185 include/lustre/Makefile
186 ldiskfs/Makefile
187 ldiskfs/autoMakefile
188 ldlm/Makefile
189 liblustre/Makefile
190 liblustre/tests/Makefile
191 llite/Makefile
192 llite/autoMakefile
193 lov/Makefile
194 lov/autoMakefile
195 lmv/Makefile
196 lmv/autoMakefile
197 lvfs/Makefile
198 lvfs/autoMakefile
199 mdc/Makefile
200 mdc/autoMakefile
201 mds/Makefile
202 mds/autoMakefile
203 obdclass/Makefile
204 obdclass/autoMakefile
205 obdecho/Makefile
206 obdecho/autoMakefile
207 obdfilter/Makefile
208 obdfilter/autoMakefile
209 osc/Makefile
210 osc/autoMakefile
211 ost/Makefile
212 ost/autoMakefile
213 portals/Kernelenv
214 portals/Makefile
215 portals/autoMakefile
216 portals/doc/Makefile
217 portals/knals/Makefile
218 portals/knals/autoMakefile
219 portals/knals/gmnal/Makefile
220 portals/knals/gmnal/autoMakefile
221 portals/knals/ibnal/Makefile
222 portals/knals/ibnal/autoMakefile
223 portals/knals/qswnal/Makefile
224 portals/knals/qswnal/autoMakefile
225 portals/knals/socknal/Makefile
226 portals/knals/socknal/autoMakefile
227 portals/libcfs/Makefile
228 portals/libcfs/autoMakefile
229 portals/portals/Makefile
230 portals/portals/autoMakefile
231 portals/router/Makefile
232 portals/router/autoMakefile
233 portals/tests/Makefile
234 portals/tests/autoMakefile
235 portals/unals/Makefile
236 portals/utils/Makefile
237 ptlbd/Makefile
238 ptlbd/autoMakefile
239 ptlrpc/Makefile
240 ptlrpc/autoMakefile
241 scripts/Makefile
242 scripts/lustre.spec
243 scripts/version_tag.pl
244 smfs/Makefile
245 smfs/autoMakefile
246 cmobd/Makefile
247 cmobd/autoMakefile
248 tests/Makefile
249 utils/Lustre/Makefile
250 utils/Makefile
251 ])