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