]>
Commit | Line | Data |
---|---|---|
795ca3e5 AK |
1 | ## |
2 | ## Copyright 1999-2000 Sistina Software, Inc. | |
3 | ## | |
4 | ## This is free software released under the GNU General Public License. | |
5 | ## There is no warranty for this software. See the file COPYING for | |
6 | ## details. | |
7 | ## | |
8 | ## See the file CONTRIBUTORS for a list of contributors. | |
9 | ## | |
10 | ## This file is maintained by: | |
11 | ## AJ Lewis <lewis@sistina.com> | |
12 | ## | |
13 | ## File name: configure.in | |
14 | ## | |
15 | ## Description: Input file for autoconf. Generates the configure script | |
16 | ## that tries to keep everything nice and portable. It also | |
17 | ## simplifies distribution package building considerably. | |
18 | ################################################################################ | |
19 | ||
80992638 | 20 | ################################################################################ |
8ce0cbda | 21 | dnl -- Process this file with autoconf to produce a configure script. |
13c7b701 | 22 | AC_INIT(lib/device/dev-cache.h) |
795ca3e5 | 23 | |
80992638 | 24 | ################################################################################ |
8ce0cbda | 25 | dnl -- setup the directory where autoconf has auxilary files |
795ca3e5 AK |
26 | AC_CONFIG_AUX_DIR(autoconf) |
27 | ||
80992638 | 28 | ################################################################################ |
8ce0cbda | 29 | dnl -- Get system type |
b896caa1 AK |
30 | AC_CANONICAL_SYSTEM |
31 | ||
32 | case "$host_os" in | |
33 | linux*) | |
80992638 | 34 | CFLAGS="$CFLAGS" |
8ce0cbda | 35 | COPTIMISE_FLAG="-O2" |
80992638 | 36 | CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" |
8106cdd5 AK |
37 | CLDWHOLEARCHIVE="-Wl,-whole-archive" |
38 | CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" | |
80992638 AK |
39 | LDDEPS="$LDDEPS .export.sym" |
40 | LDFLAGS="$LDFLAGS -Wl,--export-dynamic" | |
8106cdd5 AK |
41 | SOFLAG="-shared" |
42 | DEVMAPPER=yes | |
1a9ea74d | 43 | ODIRECT=yes |
80992638 | 44 | SELINUX=yes |
d3c8211f | 45 | CLUSTER=internal |
809fae91 | 46 | FSADM=no ;; |
8106cdd5 | 47 | darwin*) |
80992638 | 48 | CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" |
8ce0cbda | 49 | COPTIMISE_FLAG="-O2" |
80992638 | 50 | CLDFLAGS="$CLDFLAGS" |
8106cdd5 AK |
51 | CLDWHOLEARCHIVE="-all_load" |
52 | CLDNOWHOLEARCHIVE= | |
80992638 AK |
53 | LDDEPS="$LDDEPS" |
54 | LDFLAGS="$LDFLAGS" | |
8106cdd5 AK |
55 | SOFLAG="-dynamiclib" |
56 | DEVMAPPER=no | |
1a9ea74d | 57 | ODIRECT=no |
80992638 | 58 | SELINUX=no |
d3c8211f | 59 | CLUSTER=none |
1a9ea74d | 60 | FSADM=no ;; |
b896caa1 AK |
61 | esac |
62 | ||
80992638 | 63 | ################################################################################ |
8ce0cbda AK |
64 | dnl -- Checks for programs. |
65 | AC_PROG_AWK | |
66 | AC_PROG_CC | |
67 | AC_PROG_INSTALL | |
68 | AC_PROG_LN_S | |
69 | AC_PROG_MAKE_SET | |
70 | AC_PROG_RANLIB | |
71 | ||
72 | ################################################################################ | |
73 | dnl -- Checks for header files. | |
80992638 AK |
74 | AC_HEADER_DIRENT |
75 | AC_HEADER_STDC | |
76 | AC_CHECK_HEADERS(fcntl.h malloc.h sys/ioctl.h unistd.h) | |
77 | ||
78 | ################################################################################ | |
8ce0cbda | 79 | dnl -- Checks for typedefs, structures, and compiler characteristics. |
80992638 AK |
80 | AC_C_CONST |
81 | AC_C_INLINE | |
82 | AC_TYPE_OFF_T | |
83 | AC_TYPE_PID_T | |
84 | AC_TYPE_SIZE_T | |
85 | AC_STRUCT_ST_RDEV | |
86 | AC_HEADER_TIME | |
87 | ||
88 | ################################################################################ | |
8ce0cbda | 89 | dnl -- Prefix is /usr by default, the exec_prefix default is setup later |
795ca3e5 AK |
90 | AC_PREFIX_DEFAULT(/usr) |
91 | ||
80992638 AK |
92 | ################################################################################ |
93 | dnl -- Parallel make jobs? | |
94 | AC_ARG_ENABLE(jobs, [ --enable-jobs=NUM Number of jobs to run simultaneously], JOBS=-j$enableval, JOBS=-j2) | |
a38df97f | 95 | |
80992638 | 96 | ################################################################################ |
8ce0cbda | 97 | dnl -- Setup the ownership of the files |
80992638 AK |
98 | echo $ac_n "Setting file owner to""... $ac_c" 1>&6 |
99 | OWNER="root" | |
100 | ||
795ca3e5 AK |
101 | AC_ARG_WITH(user, |
102 | [ --with-user=USER Set the owner of installed files ], | |
a38df97f | 103 | [ OWNER="$withval" ]) |
80992638 | 104 | echo "$ac_t""$OWNER" 1>&6 |
a38df97f AK |
105 | |
106 | if test x$OWNER != x; then | |
107 | OWNER="-o $OWNER" | |
108 | fi | |
795ca3e5 | 109 | |
80992638 | 110 | ################################################################################ |
8ce0cbda | 111 | dnl -- Setup the group ownership of the files |
80992638 AK |
112 | echo $ac_n "Setting group owner to""... $ac_c" 1>&6 |
113 | GROUP="root" | |
795ca3e5 AK |
114 | AC_ARG_WITH(group, |
115 | [ --with-group=GROUP Set the group owner of installed files ], | |
a38df97f | 116 | [ GROUP="$withval" ]) |
80992638 | 117 | echo "$ac_t""$GROUP" 1>&6 |
a38df97f AK |
118 | |
119 | if test x$GROUP != x; then | |
120 | GROUP="-g $GROUP" | |
121 | fi | |
795ca3e5 | 122 | |
80992638 | 123 | ################################################################################ |
7d1552c9 | 124 | dnl -- LVM1 tool fallback option |
80992638 | 125 | echo $ac_n "checking whether to enable lvm1 fallback""... $ac_c" 1>&6 |
7d1552c9 AK |
126 | AC_ARG_ENABLE(lvm1_fallback, [ --enable-lvm1_fallback Use this to fall back and use LVM1 binaries if |
127 | device-mapper is missing from the kernel], LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no) | |
80992638 | 128 | echo "$ac_t""$LVM1_FALLBACK" 1>&6 |
7d1552c9 AK |
129 | |
130 | if test x$LVM1_FALLBACK = xyes; then | |
131 | CFLAGS="$CFLAGS -DLVM1_FALLBACK" | |
132 | fi | |
133 | ||
80992638 | 134 | ################################################################################ |
5a52dca9 | 135 | dnl -- format1 inclusion type |
80992638 | 136 | echo $ac_n "checking whether to include support for lvm1 metadata""... $ac_c" 1>&6 |
5a52dca9 AK |
137 | AC_ARG_WITH(lvm1, |
138 | [ --with-lvm1=TYPE LVM1 metadata support: internal/shared/none | |
139 | [TYPE=internal] ], | |
140 | [ LVM1="$withval" ], | |
141 | [ LVM1="internal" ]) | |
80992638 | 142 | echo "$ac_t""$LVM1" 1>&6 |
5a52dca9 AK |
143 | |
144 | if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]]; | |
145 | then AC_MSG_ERROR( | |
146 | --with-lvm1 parameter invalid | |
147 | ) | |
148 | exit | |
149 | fi; | |
150 | ||
b896caa1 AK |
151 | if test x$LVM1 = xinternal; then |
152 | CFLAGS="$CFLAGS -DLVM1_INTERNAL" | |
153 | fi | |
154 | ||
80992638 | 155 | ################################################################################ |
d8ac0fbc | 156 | dnl -- format_pool inclusion type |
80992638 | 157 | echo $ac_n "checking whether to include support for GFS pool metadata""... $ac_c" 1>&6 |
d8ac0fbc | 158 | AC_ARG_WITH(pool, |
60329273 | 159 | [ --with-pool=TYPE GFS pool read-only support: internal/shared/none |
d8ac0fbc AK |
160 | [TYPE=internal] ], |
161 | [ POOL="$withval" ], | |
162 | [ POOL="internal" ]) | |
80992638 | 163 | echo "$ac_t""$POOL" 1>&6 |
d8ac0fbc AK |
164 | |
165 | if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]]; | |
166 | then AC_MSG_ERROR( | |
167 | --with-pool parameter invalid | |
168 | ) | |
169 | exit | |
170 | fi; | |
171 | ||
172 | if test x$POOL = xinternal; then | |
173 | CFLAGS="$CFLAGS -DPOOL_INTERNAL" | |
174 | fi | |
175 | ||
80992638 | 176 | ################################################################################ |
d3c8211f | 177 | dnl -- cluster_locking inclusion type |
80992638 | 178 | echo $ac_n "checking whether to include support for cluster locking""... $ac_c" 1>&6 |
d3c8211f AK |
179 | AC_ARG_WITH(cluster, |
180 | [ --with-cluster=TYPE Cluster LVM locking support: internal/shared/none | |
181 | [TYPE=internal] ], | |
182 | [ CLUSTER="$withval" ]) | |
80992638 | 183 | echo "$ac_t""$CLUSTER" 1>&6 |
d3c8211f AK |
184 | |
185 | if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]]; | |
186 | then AC_MSG_ERROR( | |
187 | --with-cluster parameter invalid | |
188 | ) | |
189 | exit | |
190 | fi; | |
191 | ||
192 | if test x$CLUSTER = xinternal; then | |
193 | CFLAGS="$CFLAGS -DCLUSTER_LOCKING_INTERNAL" | |
194 | fi | |
d8ac0fbc | 195 | |
80992638 | 196 | ################################################################################ |
4922197a | 197 | dnl -- snapshots inclusion type |
80992638 | 198 | echo $ac_n "checking whether to include snapshots""... $ac_c" 1>&6 |
4922197a AK |
199 | AC_ARG_WITH(snapshots, |
200 | [ --with-snapshots=TYPE Snapshot support: internal/shared/none | |
201 | [TYPE=internal] ], | |
202 | [ SNAPSHOTS="$withval" ], | |
203 | [ SNAPSHOTS="internal" ]) | |
80992638 | 204 | echo "$ac_t""$SNAPSHOTS" 1>&6 |
4922197a AK |
205 | |
206 | if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]]; | |
207 | then AC_MSG_ERROR( | |
208 | --with-snapshots parameter invalid | |
209 | ) | |
210 | exit | |
211 | fi; | |
212 | ||
213 | if test x$SNAPSHOTS = xinternal; then | |
214 | CFLAGS="$CFLAGS -DSNAPSHOT_INTERNAL" | |
215 | fi | |
216 | ||
80992638 | 217 | ################################################################################ |
4922197a | 218 | dnl -- mirrors inclusion type |
80992638 | 219 | echo $ac_n "checking whether to include mirrors""... $ac_c" 1>&6 |
4922197a AK |
220 | AC_ARG_WITH(mirrors, |
221 | [ --with-mirrors=TYPE Mirror support: internal/shared/none | |
222 | [TYPE=internal] ], | |
223 | [ MIRRORS="$withval" ], | |
224 | [ MIRRORS="internal" ]) | |
80992638 | 225 | echo "$ac_t""$MIRRORS" 1>&6 |
4922197a AK |
226 | |
227 | if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]]; | |
228 | then AC_MSG_ERROR( | |
229 | --with-mirrors parameter invalid | |
230 | ) | |
231 | exit | |
232 | fi; | |
233 | ||
234 | if test x$MIRRORS = xinternal; then | |
235 | CFLAGS="$CFLAGS -DMIRRORED_INTERNAL" | |
236 | fi | |
237 | ||
80992638 | 238 | ################################################################################ |
8ce0cbda | 239 | dnl -- Enables staticly-linked tools |
80992638 | 240 | echo $ac_n "checking whether to use static linking""... $ac_c" 1>&6 |
8106cdd5 | 241 | AC_ARG_ENABLE(static_link, [ --enable-static_link Use this to link the tools to their libraries |
795ca3e5 | 242 | statically. Default is dynamic linking], STATIC_LINK=$enableval, STATIC_LINK=no) |
80992638 | 243 | echo "$ac_t""$STATIC_LINK" 1>&6 |
795ca3e5 | 244 | |
80992638 | 245 | ################################################################################ |
8ce0cbda | 246 | dnl -- Enable readline |
80992638 | 247 | echo $ac_n "checking whether to enable readline""... $ac_c" 1>&6 |
5a52dca9 AK |
248 | AC_ARG_ENABLE(readline, [ --enable-readline Enable readline support], \ |
249 | READLINE=$enableval, READLINE=no) | |
80992638 | 250 | echo "$ac_t""$READLINE" 1>&6 |
795ca3e5 | 251 | |
b896caa1 AK |
252 | if test x$READLINE = xyes; then |
253 | CFLAGS="$CFLAGS -DREADLINE_SUPPORT" | |
254 | fi | |
255 | ||
80992638 | 256 | ################################################################################ |
8ce0cbda | 257 | dnl -- Disable selinux |
80992638 AK |
258 | echo $ac_n "checking whether to enable selinux support""... $ac_c" 1>&6 |
259 | AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support], \ | |
260 | SELINUX=$enableval) | |
261 | echo "$ac_t""$SELINUX" 1>&6 | |
262 | ||
263 | ################################################################################ | |
8ce0cbda | 264 | dnl -- Build cluster LVM daemon |
80992638 | 265 | echo $ac_n "checking whether to build cluster LVM daemon""... $ac_c" 1>&6 |
d3c8211f AK |
266 | AC_ARG_WITH(clvmd, [ --with-clvmd Build cluster LVM Daemon], \ |
267 | CLVMD=$withval, CLVMD=no) | |
80992638 AK |
268 | echo "$ac_t""$CLVMD" 1>&6 |
269 | ||
8ce0cbda | 270 | dnl -- If clvmd enabled without cluster locking, automagically include it |
d3c8211f AK |
271 | if test x$CLVMD = xyes && test x$CLUSTER = xnone; then |
272 | CLUSTER=internal | |
273 | fi | |
d3c8211f | 274 | |
80992638 | 275 | ################################################################################ |
8ce0cbda | 276 | dnl -- Enable debugging |
80992638 | 277 | echo $ac_n "checking whether to enable debugging""... $ac_c" 1>&6 |
8ef2b021 AK |
278 | AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging], \ |
279 | DEBUG=yes, DEBUG=no) | |
69792976 | 280 | echo "$ac_t""$DEBUG" 1>&6 |
8ef2b021 | 281 | |
8ce0cbda AK |
282 | dnl -- Normally turn off optimisation for debug builds |
283 | if test x$DEBUG = xyes; then | |
284 | COPTIMISE_FLAG= | |
285 | fi | |
286 | ||
287 | ################################################################################ | |
288 | dnl -- Override optimisation | |
289 | echo $ac_n "checking for C optimisation flag""... $ac_c" 1>&6 | |
290 | AC_ARG_WITH(optimisation, | |
291 | [ --with-optimisation=OPT C optimisation flag [OPT=-O2] ], | |
292 | [ COPTIMISE_FLAG="$withval" ]) | |
293 | echo "$ac_t""$COPTIMISE_FLAG" 1>&6 | |
294 | ||
80992638 | 295 | ################################################################################ |
8ce0cbda | 296 | dnl -- Disable devmapper |
80992638 | 297 | echo $ac_n "checking whether to use device-mapper""... $ac_c" 1>&6 |
199e490e | 298 | AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable device-mapper interaction], \ |
8106cdd5 | 299 | DEVMAPPER=no) |
69792976 | 300 | echo "$ac_t""$DEVMAPPER" 1>&6 |
199e490e | 301 | |
b896caa1 AK |
302 | if test x$DEVMAPPER = xyes; then |
303 | CFLAGS="$CFLAGS -DDEVMAPPER_SUPPORT" | |
304 | fi | |
305 | ||
80992638 | 306 | ################################################################################ |
8ce0cbda | 307 | dnl -- Disable O_DIRECT |
80992638 | 308 | echo $ac_n "checking whether to enable O_DIRECT""... $ac_c" 1>&6 |
2dc95e1c | 309 | AC_ARG_ENABLE(o_direct, [ --disable-o_direct Disable O_DIRECT], \ |
8106cdd5 | 310 | ODIRECT=no) |
69792976 | 311 | echo "$ac_t""$ODIRECT" 1>&6 |
2dc95e1c AK |
312 | |
313 | if test x$ODIRECT = xyes; then | |
314 | CFLAGS="$CFLAGS -DO_DIRECT_SUPPORT" | |
315 | fi | |
316 | ||
80992638 | 317 | ################################################################################ |
8ce0cbda | 318 | dnl -- Enable cmdlib |
80992638 | 319 | echo $ac_n "checking whether to compile liblvm2cmd.so""... $ac_c" 1>&6 |
8106cdd5 AK |
320 | AC_ARG_ENABLE(cmdlib, [ --enable-cmdlib Build shared command library], \ |
321 | CMDLIB=yes, CMDLIB=no) | |
322 | echo "$ac_t""$CMDLIB" 1>&6 | |
323 | ||
324 | if test x$CMDLIB = xyes; then | |
325 | CFLAGS="$CFLAGS -DCMDLIB" | |
326 | fi | |
327 | ||
80992638 | 328 | ################################################################################ |
8ce0cbda | 329 | dnl -- Enable fsadm |
80992638 | 330 | echo $ac_n "checking whether to build fsadm""... $ac_c" 1>&6 |
809fae91 AK |
331 | AC_ARG_ENABLE(fsadm, [ --enable-fsadm Enable fsadm], FSADM=yes) |
332 | echo "$ac_t""$FSADM" 1>&6 | |
333 | ||
80992638 | 334 | ################################################################################ |
8ce0cbda | 335 | dnl -- Mess with default exec_prefix |
795ca3e5 AK |
336 | if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]]; |
337 | then exec_prefix=""; | |
338 | fi; | |
339 | ||
80992638 | 340 | ################################################################################ |
8ce0cbda | 341 | dnl -- Checks for library functions. |
795ca3e5 AK |
342 | AC_PROG_GCC_TRADITIONAL |
343 | AC_TYPE_SIGNAL | |
344 | AC_FUNC_VPRINTF | |
345 | AC_CHECK_FUNCS(mkdir rmdir uname) | |
346 | ||
80992638 | 347 | ################################################################################ |
8ce0cbda | 348 | dnl -- Check for termcap (Shamelessly copied from parted 1.4.17) |
795ca3e5 AK |
349 | if test x$READLINE = xyes; then |
350 | AC_SEARCH_LIBS(tgetent, ncurses curses termcap termlib, , | |
351 | AC_MSG_ERROR( | |
352 | termcap could not be found which is required for the | |
353 | --enable-readline option (which is enabled by default). Either disable readline | |
354 | support with --disable-readline or download and install termcap from: | |
355 | ftp.gnu.org/gnu/termcap | |
356 | Note: if you are using precompiled packages you will also need the development | |
357 | package as well (which may be called termcap-devel or something similar). | |
358 | Note: (n)curses also seems to work as a substitute for termcap. This was | |
359 | not found either - but you could try installing that as well. | |
360 | ) | |
361 | exit | |
362 | ) | |
363 | fi | |
364 | ||
80992638 | 365 | ################################################################################ |
8ce0cbda | 366 | dnl -- Check for dlopen |
26e7f2e0 AK |
367 | AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no) |
368 | ||
74583a91 | 369 | if [[ "x$HAVE_LIBDL" = xyes -a "x$STATIC_LINK" = xno ]]; then |
b896caa1 | 370 | CFLAGS="$CFLAGS -DHAVE_LIBDL" |
26e7f2e0 | 371 | LIBS="-ldl $LIBS" |
d68a82ec AK |
372 | else |
373 | HAVE_LIBDL=no | |
26e7f2e0 AK |
374 | fi |
375 | ||
80992638 | 376 | ################################################################################ |
8ce0cbda | 377 | dnl -- Check for shared/static conflicts |
80992638 AK |
378 | if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \ |
379 | -o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \ | |
4922197a | 380 | \) -a "x$STATIC_LINK" = xyes ]]; |
d68a82ec | 381 | then AC_MSG_ERROR( |
036f273a | 382 | Features cannot be 'shared' when building statically |
d68a82ec AK |
383 | ) |
384 | exit | |
036f273a AK |
385 | fi |
386 | ||
80992638 | 387 | ################################################################################ |
8ce0cbda | 388 | dnl -- Check for is_selinux_enabled |
80992638 AK |
389 | if test x$SELINUX = xyes; then |
390 | AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes, HAVE_SELINUX=no) | |
391 | ||
392 | if test x$HAVE_SELINUX = xyes; then | |
393 | CFLAGS="$CFLAGS -DHAVE_SELINUX" | |
394 | LIBS="-lselinux $LIBS" | |
395 | else | |
396 | echo "Disabling selinux" 1>&6 | |
397 | fi | |
036f273a | 398 | fi |
d68a82ec | 399 | |
80992638 | 400 | ################################################################################ |
8ce0cbda | 401 | dnl -- Check for getopt |
b896caa1 AK |
402 | AC_CHECK_HEADERS(getopt.h, CFLAGS="$CFLAGS -DHAVE_GETOPTLONG") |
403 | ||
80992638 | 404 | ################################################################################ |
8ce0cbda | 405 | dnl -- Check for readline (Shamelessly copied from parted 1.4.17) |
795ca3e5 AK |
406 | if test x$READLINE = xyes; then |
407 | AC_CHECK_LIB(readline, readline, , | |
408 | AC_MSG_ERROR( | |
409 | GNU Readline could not be found which is required for the | |
410 | --enable-readline option (which is enabled by default). Either disable readline | |
411 | support with --disable-readline or download and install readline from: | |
412 | ftp.gnu.org/gnu/readline | |
413 | Note: if you are using precompiled packages you will also need the development | |
414 | package as well (which may be called readline-devel or something similar). | |
415 | ) | |
416 | exit | |
417 | ) | |
b896caa1 AK |
418 | AC_CHECK_FUNC(rl_completion_matches, CFLAGS="$CFLAGS -DHAVE_RL_COMPLETION_MATCHES") |
419 | ||
795ca3e5 AK |
420 | fi |
421 | ||
80992638 | 422 | ################################################################################ |
8ce0cbda | 423 | dnl -- Internationalisation stuff |
69792976 | 424 | echo $ac_n "checking whether to enable internationalisation""... $ac_c" 1>&6 |
69792976 AK |
425 | AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],\ |
426 | INTL=yes, INTL=no) | |
427 | echo "$ac_t""$INTL" 1>&6 | |
428 | ||
429 | if test x$INTL = xyes; then | |
430 | INTL_PACKAGE="lvm2" | |
431 | AC_PATH_PROG(MSGFMT, msgfmt) | |
432 | if [[ "x$MSGFMT" == x ]]; | |
433 | then AC_MSG_ERROR( | |
434 | msgfmt not found in path $PATH | |
435 | ) | |
436 | exit | |
437 | fi; | |
438 | ||
439 | AC_ARG_WITH(localedir, | |
440 | [ --with-localedir=DIR Translation files in DIR [PREFIX/share/locale]], | |
441 | [ LOCALEDIR="$withval" ], | |
442 | [ LOCALEDIR='${prefix}/share/locale' ]) | |
443 | fi | |
444 | ||
80992638 | 445 | ################################################################################ |
4a7f3eb2 | 446 | AC_ARG_WITH(confdir, |
0a62c911 | 447 | [ --with-confdir=DIR Configuration files in DIR [/etc]], |
4a7f3eb2 | 448 | [ CONFDIR="$withval" ], |
0a62c911 AK |
449 | [ CONFDIR='/etc' ]) |
450 | ||
451 | AC_ARG_WITH(staticdir, | |
452 | [ --with-staticdir=DIR Static binary in DIR [EXEC_PREFIX/sbin]], | |
453 | [ STATICDIR="$withval" ], | |
454 | [ STATICDIR='${exec_prefix}/sbin' ]) | |
455 | ||
4a7f3eb2 | 456 | |
80992638 | 457 | ################################################################################ |
fae0c576 AK |
458 | if test "-f VERSION"; then |
459 | LVM_VERSION="\"`cat VERSION`\"" | |
460 | else | |
461 | LVM_VERSION="Unknown" | |
462 | fi | |
463 | ||
80992638 | 464 | ################################################################################ |
795ca3e5 AK |
465 | AC_SUBST(JOBS) |
466 | AC_SUBST(STATIC_LINK) | |
5a52dca9 | 467 | AC_SUBST(LVM1) |
d8ac0fbc | 468 | AC_SUBST(POOL) |
4922197a AK |
469 | AC_SUBST(SNAPSHOTS) |
470 | AC_SUBST(MIRRORS) | |
795ca3e5 AK |
471 | AC_SUBST(OWNER) |
472 | AC_SUBST(GROUP) | |
b896caa1 | 473 | AC_SUBST(CFLAGS) |
8ce0cbda | 474 | AC_SUBST(COPTIMISE_FLAG) |
8106cdd5 AK |
475 | AC_SUBST(CLDFLAGS) |
476 | AC_SUBST(CLDWHOLEARCHIVE) | |
477 | AC_SUBST(CLDNOWHOLEARCHIVE) | |
80992638 AK |
478 | AC_SUBST(LDDEPS) |
479 | AC_SUBST(LDFLAGS) | |
8106cdd5 | 480 | AC_SUBST(SOFLAG) |
5f68d858 | 481 | AC_SUBST(LIBS) |
fae0c576 | 482 | AC_SUBST(LVM_VERSION) |
7d1552c9 | 483 | AC_SUBST(LVM1_FALLBACK) |
8ef2b021 | 484 | AC_SUBST(DEBUG) |
199e490e | 485 | AC_SUBST(DEVMAPPER) |
26e7f2e0 | 486 | AC_SUBST(HAVE_LIBDL) |
036f273a | 487 | AC_SUBST(HAVE_SELINUX) |
8106cdd5 | 488 | AC_SUBST(CMDLIB) |
69792976 AK |
489 | AC_SUBST(MSGFMT) |
490 | AC_SUBST(LOCALEDIR) | |
4a7f3eb2 | 491 | AC_SUBST(CONFDIR) |
0a62c911 | 492 | AC_SUBST(STATICDIR) |
69792976 AK |
493 | AC_SUBST(INTL_PACKAGE) |
494 | AC_SUBST(INTL) | |
d3c8211f AK |
495 | AC_SUBST(CLVMD) |
496 | AC_SUBST(CLUSTER) | |
1a9ea74d | 497 | AC_SUBST(FSADM) |
8106cdd5 | 498 | |
80992638 | 499 | ################################################################################ |
8ce0cbda AK |
500 | dnl -- First and last lines should not contain files to generate in order to |
501 | dnl -- keep utility scripts running properly | |
795ca3e5 AK |
502 | AC_OUTPUT( \ |
503 | Makefile \ | |
80992638 | 504 | make.tmpl \ |
d3c8211f AK |
505 | daemons/Makefile \ |
506 | daemons/clvmd/Makefile \ | |
4a7f3eb2 | 507 | doc/Makefile \ |
fa42e649 | 508 | include/Makefile \ |
795ca3e5 | 509 | lib/Makefile \ |
5a52dca9 | 510 | lib/format1/Makefile \ |
d8ac0fbc | 511 | lib/format_pool/Makefile \ |
d3c8211f | 512 | lib/locking/Makefile \ |
4922197a AK |
513 | lib/mirror/Makefile \ |
514 | lib/snapshot/Makefile \ | |
795ca3e5 | 515 | man/Makefile \ |
69792976 | 516 | po/Makefile \ |
795ca3e5 | 517 | tools/Makefile \ |
fae0c576 | 518 | tools/version.h \ |
1a9ea74d | 519 | tools/fsadm/Makefile \ |
e6efb2b0 | 520 | test/mm/Makefile \ |
43b7b8cf | 521 | test/device/Makefile \ |
e0304b58 | 522 | test/format1/Makefile \ |
d1b28647 | 523 | test/regex/Makefile \ |
291ec3b6 | 524 | test/filters/Makefile \ |
795ca3e5 | 525 | ) |
2dc95e1c AK |
526 | |
527 | if test x$ODIRECT != xyes; then | |
528 | echo | |
529 | echo Warning: O_DIRECT disabled. | |
530 | echo Use of pvmove may cause machine to lock up under low memory conditions. | |
531 | echo | |
532 | fi | |
809fae91 AK |
533 | |
534 | if test x$FSADM == xyes; then | |
535 | echo | |
536 | echo Warning: fsadm support is untested. | |
537 | echo | |
538 | fi |