]> sourceware.org Git - lvm2.git/blob - configure.in
Randomly select which mdas to use or ignore.
[lvm2.git] / configure.in
1 ###############################################################################
2 ## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
3 ## Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
4 ##
5 ## This copyrighted material is made available to anyone wishing to use,
6 ## modify, copy, or redistribute it subject to the terms and conditions
7 ## of the GNU General Public License v.2.
8 ##
9 ## You should have received a copy of the GNU General Public License
10 ## along with this program; if not, write to the Free Software Foundation,
11 ## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
12 ################################################################################
13
14 AC_PREREQ(2.61)
15 ################################################################################
16 dnl -- Process this file with autoconf to produce a configure script.
17 AC_INIT
18 AC_CONFIG_SRCDIR([lib/device/dev-cache.h])
19 AC_CONFIG_HEADERS([lib/misc/configure.h])
20
21 ################################################################################
22 dnl -- Setup the directory where autoconf has auxilary files
23 AC_CONFIG_AUX_DIR(autoconf)
24
25 ################################################################################
26 dnl -- Get system type
27 AC_CANONICAL_TARGET([])
28
29 case "$host_os" in
30 linux*)
31 CFLAGS="$CFLAGS"
32 COPTIMISE_FLAG="-O2"
33 CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
34 CLDWHOLEARCHIVE="-Wl,-whole-archive"
35 CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
36 LDDEPS="$LDDEPS .export.sym"
37 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
38 LIB_SUFFIX=so
39 DEVMAPPER=yes
40 ODIRECT=yes
41 DM_IOCTLS=yes
42 SELINUX=yes
43 CLUSTER=internal
44 FSADM=yes
45 ;;
46 darwin*)
47 CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
48 COPTIMISE_FLAG="-O2"
49 CLDFLAGS="$CLDFLAGS"
50 CLDWHOLEARCHIVE="-all_load"
51 CLDNOWHOLEARCHIVE=
52 LIB_SUFFIX=dylib
53 DEVMAPPER=yes
54 ODIRECT=no
55 DM_IOCTLS=no
56 SELINUX=no
57 CLUSTER=none
58 FSADM=no
59 ;;
60 esac
61
62 ################################################################################
63 dnl -- Checks for programs.
64 AC_PROG_SED
65 AC_PROG_AWK
66 AC_PROG_CC
67
68 dnl probably no longer needed in 2008, but...
69 AC_PROG_GCC_TRADITIONAL
70 AC_PROG_INSTALL
71 AC_PROG_LN_S
72 AC_PROG_MAKE_SET
73 AC_PROG_MKDIR_P
74 AC_PROG_RANLIB
75 AC_PATH_PROG(CFLOW_CMD, cflow)
76 AC_PATH_PROG(CSCOPE_CMD, cscope)
77
78 ################################################################################
79 dnl -- Check for header files.
80 AC_HEADER_DIRENT
81 AC_HEADER_MAJOR
82 AC_HEADER_STDC
83 AC_HEADER_SYS_WAIT
84 AC_HEADER_TIME
85
86 AC_CHECK_HEADERS([locale.h stddef.h syslog.h sys/file.h sys/time.h assert.h \
87 langinfo.h libgen.h signal.h sys/mman.h sys/resource.h sys/utsname.h \
88 sys/wait.h time.h], ,
89 [AC_MSG_ERROR(bailing out)])
90
91 case "$host_os" in
92 linux*)
93 AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;;
94 darwin*)
95 AC_CHECK_HEADERS(machine/endian.h sys/disk.h,,AC_MSG_ERROR(bailing out)) ;;
96 esac
97
98 AC_CHECK_HEADERS([ctype.h dirent.h errno.h fcntl.h getopt.h inttypes.h limits.h \
99 stdarg.h stdio.h stdlib.h string.h sys/ioctl.h sys/param.h sys/stat.h \
100 sys/types.h unistd.h], , [AC_MSG_ERROR(bailing out)])
101 AC_CHECK_HEADERS(termios.h sys/statvfs.h)
102
103 ################################################################################
104 dnl -- Check for typedefs, structures, and compiler characteristics.
105 AC_C_CONST
106 AC_C_INLINE
107 AC_CHECK_MEMBERS([struct stat.st_rdev])
108 AC_TYPE_OFF_T
109 AC_TYPE_PID_T
110 AC_TYPE_SIGNAL
111 AC_TYPE_SIZE_T
112 AC_TYPE_MODE_T
113 AC_TYPE_INT8_T
114 AC_TYPE_INT16_T
115 AC_TYPE_INT32_T
116 AC_TYPE_INT64_T
117 AC_TYPE_SSIZE_T
118 AC_TYPE_UID_T
119 AC_TYPE_UINT8_T
120 AC_TYPE_UINT16_T
121 AC_TYPE_UINT32_T
122 AC_TYPE_UINT64_T
123 AC_CHECK_MEMBERS([struct stat.st_rdev])
124 AC_STRUCT_TM
125
126 ################################################################################
127 dnl -- Check for functions
128 AC_SEARCH_LIBS([floor], [m], , [AC_MSG_ERROR(bailing out)])
129 AC_CHECK_FUNCS([floor ftruncate gethostname getpagesize \
130 gettimeofday memset mkdir mkfifo rmdir munmap nl_langinfo setenv setlocale \
131 strcasecmp strchr strcspn strspn strdup strncasecmp strerror strrchr \
132 strstr strtol strtoul uname], , [AC_MSG_ERROR(bailing out)])
133 AC_CHECK_FUNCS(siginterrupt)
134 AC_FUNC_ALLOCA
135 AC_FUNC_CLOSEDIR_VOID
136 AC_FUNC_CHOWN
137 AC_FUNC_FORK
138 AC_FUNC_LSTAT
139 AC_FUNC_MALLOC
140 AC_FUNC_MEMCMP
141 AC_FUNC_MMAP
142 AC_FUNC_REALLOC
143 AC_FUNC_STAT
144 AC_FUNC_STRTOD
145 AC_FUNC_VPRINTF
146
147 ################################################################################
148 dnl -- Enables statically-linked tools
149 AC_MSG_CHECKING(whether to use static linking)
150 AC_ARG_ENABLE(static_link,
151 [ --enable-static_link Use this to link the tools to their libraries
152 statically. Default is dynamic linking],
153 STATIC_LINK=$enableval, STATIC_LINK=no)
154 AC_MSG_RESULT($STATIC_LINK)
155
156 ################################################################################
157 dnl -- Prefix is /usr by default, the exec_prefix default is setup later
158 AC_PREFIX_DEFAULT(/usr)
159
160 ################################################################################
161 dnl -- Setup the ownership of the files
162 AC_MSG_CHECKING(file owner)
163 AC_ARG_WITH(user,
164 [ --with-user=USER Set the owner of installed files [[USER=]] ],
165 [ OWNER="$withval" ])
166 AC_MSG_RESULT($OWNER)
167
168 if test x$OWNER != x; then
169 INSTALL="$INSTALL -o $OWNER"
170 fi
171
172 ################################################################################
173 dnl -- Setup the group ownership of the files
174 AC_MSG_CHECKING(group owner)
175 AC_ARG_WITH(group,
176 [ --with-group=GROUP Set the group owner of installed files [[GROUP=]] ],
177 [ GROUP="$withval" ])
178 AC_MSG_RESULT($GROUP)
179
180 if test x$GROUP != x; then
181 INSTALL="$INSTALL -g $GROUP"
182 fi
183
184 ################################################################################
185 dnl -- Setup device node ownership
186 AC_MSG_CHECKING(device node uid)
187
188 AC_ARG_WITH(device-uid,
189 [ --with-device-uid=UID Set the owner used for new device nodes [[UID=0]] ],
190 [ DM_DEVICE_UID="$withval" ], [ DM_DEVICE_UID="0" ] )
191 AC_MSG_RESULT($DM_DEVICE_UID)
192
193 ################################################################################
194 dnl -- Setup device group ownership
195 AC_MSG_CHECKING(device node gid)
196
197 AC_ARG_WITH(device-gid,
198 [ --with-device-gid=UID Set the group used for new device nodes [[GID=0]] ],
199 [ DM_DEVICE_GID="$withval" ], [ DM_DEVICE_GID="0" ] )
200 AC_MSG_RESULT($DM_DEVICE_GID)
201
202 ################################################################################
203 dnl -- Setup device mode
204 AC_MSG_CHECKING(device node mode)
205
206 AC_ARG_WITH(device-mode,
207 [ --with-device-mode=MODE Set the mode used for new device nodes [[MODE=0600]] ],
208 [ DM_DEVICE_MODE="$withval" ], [ DM_DEVICE_MODE="0600" ] )
209 AC_MSG_RESULT($DM_DEVICE_MODE)
210
211 ################################################################################
212 dnl -- LVM1 tool fallback option
213 AC_MSG_CHECKING(whether to enable lvm1 fallback)
214 AC_ARG_ENABLE(lvm1_fallback, [ --enable-lvm1_fallback Use this to fall back and use LVM1 binaries if
215 device-mapper is missing from the kernel], LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no)
216 AC_MSG_RESULT($LVM1_FALLBACK)
217
218 if test x$LVM1_FALLBACK = xyes; then
219 AC_DEFINE([LVM1_FALLBACK], 1, [Define to 1 if 'lvm' should fall back to using LVM1 binaries if device-mapper is missing from the kernel])
220 fi
221
222 ################################################################################
223 dnl -- format1 inclusion type
224 AC_MSG_CHECKING(whether to include support for lvm1 metadata)
225 AC_ARG_WITH(lvm1,
226 [ --with-lvm1=TYPE LVM1 metadata support: internal/shared/none
227 [TYPE=internal] ],
228 [ LVM1="$withval" ],
229 [ LVM1="internal" ])
230 AC_MSG_RESULT($LVM1)
231
232 if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]];
233 then AC_MSG_ERROR(
234 --with-lvm1 parameter invalid
235 )
236 fi;
237
238 if test x$LVM1 = xinternal; then
239 AC_DEFINE([LVM1_INTERNAL], 1, [Define to 1 to include built-in support for LVM1 metadata.])
240 fi
241
242 ################################################################################
243 dnl -- format_pool inclusion type
244 AC_MSG_CHECKING(whether to include support for GFS pool metadata)
245 AC_ARG_WITH(pool,
246 [ --with-pool=TYPE GFS pool read-only support: internal/shared/none
247 [TYPE=internal] ],
248 [ POOL="$withval" ],
249 [ POOL="internal" ])
250 AC_MSG_RESULT($POOL)
251
252 if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]];
253 then AC_MSG_ERROR(
254 --with-pool parameter invalid
255 )
256 fi;
257
258 if test x$POOL = xinternal; then
259 AC_DEFINE([POOL_INTERNAL], 1, [Define to 1 to include built-in support for GFS pool metadata.])
260 fi
261
262 ################################################################################
263 dnl -- cluster_locking inclusion type
264 AC_MSG_CHECKING(whether to include support for cluster locking)
265 AC_ARG_WITH(cluster,
266 [ --with-cluster=TYPE Cluster LVM locking support: internal/shared/none
267 [TYPE=internal] ],
268 [ CLUSTER="$withval" ])
269 AC_MSG_RESULT($CLUSTER)
270
271 if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]];
272 then AC_MSG_ERROR(
273 --with-cluster parameter invalid
274 )
275 fi;
276
277 if test x$CLUSTER = xinternal; then
278 AC_DEFINE([CLUSTER_LOCKING_INTERNAL], 1, [Define to 1 to include built-in support for clustered LVM locking.])
279 fi
280
281 ################################################################################
282 dnl -- snapshots inclusion type
283 AC_MSG_CHECKING(whether to include snapshots)
284 AC_ARG_WITH(snapshots,
285 [ --with-snapshots=TYPE Snapshot support: internal/shared/none
286 [TYPE=internal] ],
287 [ SNAPSHOTS="$withval" ],
288 [ SNAPSHOTS="internal" ])
289 AC_MSG_RESULT($SNAPSHOTS)
290
291 if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]];
292 then AC_MSG_ERROR(
293 --with-snapshots parameter invalid
294 )
295 fi;
296
297 if test x$SNAPSHOTS = xinternal; then
298 AC_DEFINE([SNAPSHOT_INTERNAL], 1, [Define to 1 to include built-in support for snapshots.])
299 fi
300
301 ################################################################################
302 dnl -- mirrors inclusion type
303 AC_MSG_CHECKING(whether to include mirrors)
304 AC_ARG_WITH(mirrors,
305 [ --with-mirrors=TYPE Mirror support: internal/shared/none
306 [TYPE=internal] ],
307 [ MIRRORS="$withval" ],
308 [ MIRRORS="internal" ])
309 AC_MSG_RESULT($MIRRORS)
310
311 if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]];
312 then AC_MSG_ERROR(
313 --with-mirrors parameter invalid
314 )
315 fi;
316
317 if test x$MIRRORS = xinternal; then
318 AC_DEFINE([MIRRORED_INTERNAL], 1, [Define to 1 to include built-in support for mirrors.])
319 fi
320
321 ################################################################################
322 dnl -- asynchronous volume replicator inclusion type
323 AC_MSG_CHECKING(whether to include replicators)
324 AC_ARG_WITH(replicators, AC_HELP_STRING([--with-replicators=TYPE],
325 [Replicator support: internal/shared/none [TYPE=none] ]),
326 [REPLICATORS=$withval], [REPLICATORS="none"])
327 AC_MSG_RESULT($REPLICATORS)
328
329 case "$REPLICATORS" in
330 none|shared) ;;
331 internal) AC_DEFINE([REPLICATOR_INTERNAL], 1,
332 [Define to 1 to include built-in support for replicators.]) ;;
333 *) AC_MSG_ERROR([--with-replicators parameter invalid ($REPLICATORS)]) ;;
334 esac
335
336 ################################################################################
337 dnl -- Disable readline
338 AC_MSG_CHECKING(whether to enable readline)
339 AC_ARG_ENABLE([readline],
340 [ --disable-readline Disable readline support],
341 [READLINE=$enableval], [READLINE=maybe])
342 AC_MSG_RESULT($READLINE)
343
344 ################################################################################
345 dnl -- Disable realtime clock support
346 AC_MSG_CHECKING(whether to enable realtime support)
347 AC_ARG_ENABLE(realtime, [ --enable-realtime Enable realtime clock support],
348 REALTIME=$enableval)
349 AC_MSG_RESULT($REALTIME)
350
351 ################################################################################
352 dnl -- Init pkg-config with dummy invokation:
353 dnl -- this is required because PKG_CHECK_MODULES macro is expanded
354 dnl -- to initialize the pkg-config environment only at the first invokation,
355 dnl -- that would be conditional in this configure.in.
356 pkg_config_init() {
357 PKG_CHECK_MODULES(PKGCONFIGINIT, pkgconfiginit, [],
358 [AC_MSG_RESULT([pkg-config initialized])])
359 PKGCONFIG_INIT=1
360 }
361
362 ################################################################################
363 dnl -- Build cluster LVM daemon
364 AC_MSG_CHECKING(whether to build cluster LVM daemon)
365 AC_ARG_WITH(clvmd,
366 [ --with-clvmd=TYPE Build cluster LVM Daemon.
367 The following cluster manager combinations are valid:
368 * cman,gulm (RHEL4 or equivalent)
369 * cman (RHEL5 or equivalent)
370 * cman,corosync,openais (or selection of them)
371 * singlenode (localhost only)
372 * all (autodetect)
373 * none (disable build)
374 [TYPE=none] ],
375 [ CLVMD="$withval" ],
376 [ CLVMD="none" ])
377 if test x$CLVMD = xyes; then
378 CLVMD=all
379 fi
380 AC_MSG_RESULT($CLVMD)
381
382 dnl -- If clvmd enabled without cluster locking, automagically include it
383 if test x$CLVMD != xnone && test x$CLUSTER = xnone; then
384 CLUSTER=internal
385 fi
386
387 dnl -- init pkgconfig if required
388 if test x$CLVMD != xnone && test x$PKGCONFIG_INIT != x1; then
389 pkg_config_init
390 fi
391
392
393 dnl -- define build types
394 if [[ `expr x"$CLVMD" : '.*gulm.*'` != 0 ]]; then
395 BUILDGULM=yes
396 fi
397 if [[ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then
398 BUILDCOROSYNC=yes
399 fi
400 if [[ `expr x"$CLVMD" : '.*openais.*'` != 0 ]]; then
401 BUILDOPENAIS=yes
402 fi
403 if [[ `expr x"$CLVMD" : '.*cman.*'` != 0 ]]; then
404 BUILDCMAN=yes
405 fi
406
407 dnl -- sanity check around user selection
408 if test x$BUILDGULM = xyes; then
409 if test x$BUILDCOROSYNC = xyes || \
410 test x$BUILDOPENAIS = xyes; then
411 AC_MSG_ERROR([requested clvmd configuration is not valid])
412 fi
413 fi
414
415 dnl -- define a soft bailout if we are autodetecting
416 soft_bailout() {
417 NOTFOUND=1
418 }
419
420 hard_bailout() {
421 AC_MSG_ERROR([bailing out])
422 }
423
424 dnl -- if clvmd=all then set soft_bailout (we don't want to error)
425 dnl -- and set all builds to yes. We need to do this here
426 dnl -- to skip the gulm + openais|corosync sanity check above.
427 if test x$CLVMD = xall; then
428 bailout=soft_bailout
429 BUILDGULM=yes
430 BUILDCMAN=yes
431 BUILDCOROSYNC=yes
432 BUILDOPENAIS=yes
433 else
434 bailout=hard_bailout
435 fi
436
437 dnl -- helper macro to check libs without adding them to LIBS
438 check_lib_no_libs() {
439 lib_no_libs_arg1=$1
440 shift
441 lib_no_libs_arg2=$1
442 shift
443 lib_no_libs_args=$@
444 AC_CHECK_LIB([$lib_no_libs_arg1],
445 [$lib_no_libs_arg2],,
446 [$bailout],
447 [$lib_no_libs_args])
448 LIBS=$ac_check_lib_save_LIBS
449 }
450
451 dnl -- Look for gulm libraries if required.
452 if test x$BUILDGULM = xyes; then
453 PKG_CHECK_MODULES(CCS, libccs, [HAVE_CCS=yes],
454 [NOTFOUND=0
455 AC_CHECK_HEADERS(ccs.h,,$bailout)
456 check_lib_no_libs ccs ccs_connect
457 if test $NOTFOUND = 0; then
458 AC_MSG_RESULT([no pkg for libccs, using -lccs])
459 CCS_LIBS="-lccs"
460 HAVE_CCS=yes
461 fi])
462 PKG_CHECK_MODULES(GULM, libgulm, [HAVE_GULM=yes],
463 [NOTFOUND=0
464 AC_CHECK_HEADERS(libgulm.h,,$bailout)
465 check_lib_no_libs gulm lg_core_login
466 if test $NOTFOUND = 0; then
467 AC_MSG_RESULT([no pkg for libgulm, using -lgulm])
468 GULM_LIBS="-lgulm"
469 HAVE_GULM=yes
470 fi])
471 fi
472
473 dnl -- Look for cman libraries if required.
474 if test x$BUILDCMAN = xyes; then
475 PKG_CHECK_MODULES(CMAN, libcman, [HAVE_CMAN=yes],
476 [NOTFOUND=0
477 AC_CHECK_HEADERS(libcman.h,,$bailout)
478 check_lib_no_libs cman cman_init
479 if test $NOTFOUND = 0; then
480 AC_MSG_RESULT([no pkg for libcman, using -lcman])
481 CMAN_LIBS="-lcman"
482 HAVE_CMAN=yes
483 fi])
484 CHECKCONFDB=yes
485 CHECKDLM=yes
486 fi
487
488 dnl -- Look for corosync that's required also for openais build
489 dnl -- only enough recent version of corosync ship pkg-config files.
490 dnl -- We can safely rely on that to detect the correct bits.
491 if test x$BUILDCOROSYNC = xyes || \
492 test x$BUILDOPENAIS = xyes; then
493 PKG_CHECK_MODULES(COROSYNC, corosync, [HAVE_COROSYNC=yes], $bailout)
494 CHECKCONFDB=yes
495 fi
496
497 dnl -- Look for corosync libraries if required.
498 if test x$BUILDCOROSYNC = xyes; then
499 PKG_CHECK_MODULES(QUORUM, libquorum, [HAVE_QUORUM=yes], $bailout)
500 CHECKCPG=yes
501 CHECKDLM=yes
502 fi
503
504 dnl -- Look for openais libraries if required.
505 if test x$BUILDOPENAIS = xyes; then
506 PKG_CHECK_MODULES(SALCK, libSaLck, [HAVE_SALCK=yes], $bailout)
507 CHECKCPG=yes
508 fi
509
510 dnl -- Below are checks for libraries common to more than one build.
511
512 dnl -- Check confdb library.
513 dnl -- mandatory for corosync build.
514 dnl -- optional for openais/cman build.
515
516 if test x$CHECKCONFDB = xyes; then
517 PKG_CHECK_MODULES(CONFDB, libconfdb,
518 [HAVE_CONFDB=yes],
519 [HAVE_CONFDB=no])
520
521 AC_CHECK_HEADERS(corosync/confdb.h,
522 [HAVE_CONFDB_H=yes],
523 [HAVE_CONFDB_H=no])
524
525 if test x$HAVE_CONFDB != xyes && \
526 test x$HAVE_CONFDB_H = xyes; then
527 check_lib_no_libs confdb confdb_initialize
528 AC_MSG_RESULT([no pkg for confdb, using -lconfdb])
529 CONFDB_LIBS="-lconfdb"
530 HAVE_CONFDB=yes
531 fi
532
533 if test x$BUILDCOROSYNC = xyes && \
534 test x$HAVE_CONFDB != xyes &&
535 test x$CLVMD != xall; then
536 AC_MSG_ERROR([bailing out... confdb library is required])
537 fi
538 fi
539
540 dnl -- Check cpg library.
541 if test x$CHECKCPG = xyes; then
542 PKG_CHECK_MODULES(CPG, libcpg, [HAVE_CPG=yes], $bailout)
543 fi
544
545 dnl -- Check dlm library.
546 if test x$CHECKDLM = xyes; then
547 PKG_CHECK_MODULES(DLM, libdlm, [HAVE_DLM=yes],
548 [NOTFOUND=0
549 AC_CHECK_HEADERS(libdlm.h,,$bailout)
550 check_lib_no_libs dlm dlm_lock -lpthread
551 if test $NOTFOUND = 0; then
552 AC_MSG_RESULT([no pkg for libdlm, using -ldlm])
553 DLM_LIBS="-ldlm -lpthread"
554 HAVE_DLM=yes
555 fi])
556 fi
557
558 dnl -- If we are autodetecting, we need to re-create
559 dnl -- the depedencies checks and set a proper CLVMD.
560 if test x$CLVMD = xall; then
561 CLVMD=none
562 if test x$HAVE_CCS = xyes && \
563 test x$HAVE_GULM = xyes; then
564 AC_MSG_RESULT([Enabling clvmd gulm cluster manager])
565 CLVMD="$CLVMD,gulm"
566 fi
567 if test x$HAVE_CMAN = xyes && \
568 test x$HAVE_DLM = xyes; then
569 AC_MSG_RESULT([Enabling clvmd cman cluster manager])
570 CLVMD="$CLVMD,cman"
571 fi
572 if test x$HAVE_COROSYNC = xyes && \
573 test x$HAVE_QUORUM = xyes && \
574 test x$HAVE_CPG = xyes && \
575 test x$HAVE_DLM = xyes && \
576 test x$HAVE_CONFDB = xyes; then
577 AC_MSG_RESULT([Enabling clvmd corosync cluster manager])
578 CLVMD="$CLVMD,corosync"
579 fi
580 if test x$HAVE_COROSYNC = xyes && \
581 test x$HAVE_CPG = xyes && \
582 test x$HAVE_SALCK = xyes; then
583 AC_MSG_RESULT([Enabling clvmd openais cluster manager])
584 CLVMD="$CLVMD,openais"
585 fi
586 if test x$CLVMD = xnone; then
587 AC_MSG_RESULT([Disabling clvmd build. No cluster manager detected.])
588 fi
589 fi
590
591 ################################################################################
592 dnl -- Build cluster mirror log daemon
593 AC_MSG_CHECKING(whether to build cluster mirror log daemon)
594 AC_ARG_ENABLE(cmirrord, [ --enable-cmirrord Enable the cluster mirror log daemon],
595 CMIRRORD=$enableval, CMIRRORD=no)
596 AC_MSG_RESULT($CMIRRORD)
597
598 BUILD_CMIRRORD=$CMIRRORD
599
600 ################################################################################
601 dnl -- cmirrord pidfile
602 AH_TEMPLATE(CMIRRORD_PIDFILE, [Path to cmirrord pidfile.])
603 if test "x$BUILD_CMIRRORD" = xyes; then
604 AC_ARG_WITH(cmirrord-pidfile,
605 [ --with-cmirrord-pidfile=PATH cmirrord pidfile [[/var/run/cmirrord.pid]] ],
606 [ AC_DEFINE_UNQUOTED(CMIRRORD_PIDFILE,"$withval") ],
607 [ AC_DEFINE_UNQUOTED(CMIRRORD_PIDFILE,"/var/run/cmirrord.pid") ])
608 fi
609
610 ################################################################################
611 dnl -- Look for corosync libraries if required.
612 if [[ "x$BUILD_CMIRRORD" = xyes ]]; then
613 dnl -- init pkgconfig if required
614 if test x$PKGCONFIG_INIT != x1; then
615 pkg_config_init
616 fi
617 PKG_CHECK_MODULES(SACKPT, libSaCkpt)
618 if test x$HAVE_CPG != xyes; then
619 PKG_CHECK_MODULES(CPG, libcpg)
620 fi
621 fi
622
623 ################################################################################
624 dnl -- Enable debugging
625 AC_MSG_CHECKING(whether to enable debugging)
626 AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging],
627 DEBUG=$enableval, DEBUG=no)
628 AC_MSG_RESULT($DEBUG)
629
630 dnl -- Normally turn off optimisation for debug builds
631 if test x$DEBUG = xyes; then
632 COPTIMISE_FLAG=
633 else
634 CSCOPE_CMD=
635 fi
636
637 ################################################################################
638 dnl -- Override optimisation
639 AC_MSG_CHECKING(for C optimisation flag)
640 AC_ARG_WITH(optimisation,
641 [ --with-optimisation=OPT C optimisation flag [[OPT=-O2]] ],
642 [ COPTIMISE_FLAG="$withval" ])
643 AC_MSG_RESULT($COPTIMISE_FLAG)
644
645 ################################################################################
646 dnl -- Enable profiling
647 AC_MSG_CHECKING(whether to gather gcov profiling data)
648 AC_ARG_ENABLE(profiling,
649 AC_HELP_STRING(--enable-profiling, [Gather gcov profiling data]),
650 PROFILING=$enableval, PROFILING=no)
651 AC_MSG_RESULT($PROFILING)
652
653 if test "x$PROFILING" = xyes; then
654 COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage"
655 AC_PATH_PROG(LCOV, lcov)
656 AC_PATH_PROG(GENHTML, genhtml)
657 if test -z "$LCOV" -o -z "$GENHTML"; then
658 AC_MSG_ERROR([lcov and genhtml are required for profiling])
659 fi
660 AC_PATH_PROG(GENPNG, genpng)
661 if test -n "$GENPNG"; then
662 AC_MSG_CHECKING([whether $GENPNG has all required modules])
663 if $GENPNG --help > /dev/null 2>&1 ; then
664 AC_MSG_RESULT(ok)
665 GENHTML="$GENHTML --frames"
666 else
667 AC_MSG_RESULT(not supported)
668 AC_MSG_WARN([GD.pm perl module is not installed])
669 GENPNG=
670 fi
671 fi
672 fi
673
674 ################################################################################
675 dnl -- Disable devmapper
676 AC_MSG_CHECKING(whether to use device-mapper)
677 AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable LVM2 device-mapper interaction],
678 DEVMAPPER=$enableval)
679 AC_MSG_RESULT($DEVMAPPER)
680
681 if test x$DEVMAPPER = xyes; then
682 AC_DEFINE([DEVMAPPER_SUPPORT], 1, [Define to 1 to enable LVM2 device-mapper interaction.])
683 fi
684
685 ################################################################################
686 dnl -- Enable udev synchronisation
687 AC_MSG_CHECKING(whether to enable synchronisation with udev processing)
688 AC_ARG_ENABLE(udev_sync, [ --enable-udev_sync Enable synchronisation with udev processing],
689 UDEV_SYNC=$enableval, UDEV_SYNC=no)
690 AC_MSG_RESULT($UDEV_SYNC)
691
692 if test x$UDEV_SYNC = xyes; then
693 AC_CHECK_LIB(udev, udev_queue_get_udev_is_active,
694 [UDEV_PC="libudev"; UDEV_LIBS="-ludev"],
695 [AC_MSG_ERROR([bailing out... libudev library is required])])
696 AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
697 fi
698
699 dnl -- Enable udev rules
700 AC_MSG_CHECKING(whether to enable installation of udev rules required for synchronisation)
701 AC_ARG_ENABLE(udev_rules, [ --enable-udev_rules Install rule files needed for udev synchronisation],
702 UDEV_RULES=$enableval, UDEV_RULES=$UDEV_SYNC)
703 AC_MSG_RESULT($UDEV_RULES)
704
705 ################################################################################
706 dnl -- Compatibility mode
707 AC_ARG_ENABLE(compat, [ --enable-compat Enable support for old device-mapper versions],
708 DM_COMPAT=$enableval, DM_COMPAT=no)
709
710 ################################################################################
711 dnl -- Compatible units suffix mode
712 AC_ARG_ENABLE(units-compat,
713 [ --enable-units-compat Enable output compatibility with old versions that
714 that don't use KiB-style unit suffixes],
715 UNITS_COMPAT=$enableval, UNITS_COMPAT=no)
716
717 if test x$UNITS_COMPAT = xyes; then
718 AC_DEFINE([DEFAULT_SI_UNIT_CONSISTENCY], 0, [Define to 0 to reinstate the pre-2.02.54 handling of unit suffixes.])
719 fi
720
721 ################################################################################
722 dnl -- Disable ioctl
723 AC_ARG_ENABLE(ioctl, [ --disable-driver Disable calls to device-mapper in the kernel],
724 DM_IOCTLS=$enableval)
725
726 ################################################################################
727 dnl -- Disable O_DIRECT
728 AC_MSG_CHECKING(whether to enable O_DIRECT)
729 AC_ARG_ENABLE(o_direct, [ --disable-o_direct Disable O_DIRECT],
730 ODIRECT=$enableval)
731 AC_MSG_RESULT($ODIRECT)
732
733 if test x$ODIRECT = xyes; then
734 AC_DEFINE([O_DIRECT_SUPPORT], 1, [Define to 1 to enable O_DIRECT support.])
735 fi
736
737 ################################################################################
738 dnl -- Enable liblvm2app.so
739 AC_MSG_CHECKING(whether to build liblvm2app.so application library)
740 AC_ARG_ENABLE(applib,
741 [ --enable-applib Build application library],
742 APPLIB=$enableval, APPLIB=no)
743 AC_MSG_RESULT($APPLIB)
744 AC_SUBST([LVM2APP_LIB])
745 test x$APPLIB = xyes \
746 && LVM2APP_LIB=-llvm2app \
747 || LVM2APP_LIB=
748
749 ################################################################################
750 dnl -- Enable cmdlib
751 AC_MSG_CHECKING(whether to compile liblvm2cmd.so)
752 AC_ARG_ENABLE(cmdlib, [ --enable-cmdlib Build shared command library],
753 CMDLIB=$enableval, CMDLIB=no)
754 AC_MSG_RESULT($CMDLIB)
755 AC_SUBST([LVM2CMD_LIB])
756 test x$CMDLIB = xyes \
757 && LVM2CMD_LIB=-llvm2cmd \
758 || LVM2CMD_LIB=
759
760 ################################################################################
761 dnl -- Enable pkg-config
762 AC_ARG_ENABLE(pkgconfig, [ --enable-pkgconfig Install pkgconfig support],
763 PKGCONFIG=$enableval, PKGCONFIG=no)
764
765 ################################################################################
766 dnl -- Enable installation of writable files by user
767 AC_ARG_ENABLE(write_install, AC_HELP_STRING([--enable-write_install],
768 [Install user writable files]),
769 [WRITE_INSTALL=$enableval], [WRITE_INSTALL=no])
770
771 ################################################################################
772 dnl -- Enable fsadm
773 AC_MSG_CHECKING(whether to install fsadm)
774 AC_ARG_ENABLE(fsadm, [AC_HELP_STRING([--disable-fsadm], [Disable fsadm])],
775 FSADM=$enableval)
776 AC_MSG_RESULT($FSADM)
777
778 ################################################################################
779 dnl -- enable dmeventd handling
780 AC_MSG_CHECKING(whether to use dmeventd)
781 AC_ARG_ENABLE(dmeventd, [ --enable-dmeventd Enable the device-mapper event daemon],
782 DMEVENTD=$enableval)
783 AC_MSG_RESULT($DMEVENTD)
784
785 BUILD_DMEVENTD=$DMEVENTD
786
787 dnl -- dmeventd currently requires internal mirror support
788 if test x$DMEVENTD = xyes; then
789 if test x$MIRRORS != xinternal; then
790 AC_MSG_ERROR(
791 --enable-dmeventd currently requires --with-mirrors=internal
792 )
793 fi
794 if test x$CMDLIB = xno; then
795 AC_MSG_ERROR(
796 --enable-dmeventd requires --enable-cmdlib to be used as well
797 )
798 fi
799 fi
800
801 if test x$DMEVENTD = xyes; then
802 AC_DEFINE([DMEVENTD], 1, [Define to 1 to enable the device-mapper event daemon.])
803 fi
804
805 ################################################################################
806 dnl -- getline included in recent libc
807
808 AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1,
809 [Define to 1 if getline is available.]))
810
811 ################################################################################
812 dnl -- canonicalize_file_name included in recent libc
813
814 AC_CHECK_LIB(c, canonicalize_file_name,
815 AC_DEFINE([HAVE_CANONICALIZE_FILE_NAME], 1,
816 [Define to 1 if canonicalize_file_name is available.]))
817
818 ################################################################################
819 dnl -- Clear default exec_prefix - install into /sbin rather than /usr/sbin
820 if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
821 then exec_prefix="";
822 fi;
823
824 ################################################################################
825 dnl -- Check for dlopen
826 AC_CHECK_LIB(dl, dlopen, [
827 AC_DEFINE([HAVE_LIBDL], 1, [Define to 1 if dynamic libraries are available.])
828 DL_LIBS="-ldl"
829 HAVE_LIBDL=yes ], [
830 DL_LIBS=
831 HAVE_LIBDL=no ])
832
833 ################################################################################
834 dnl -- Check for shared/static conflicts
835 if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \
836 -o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \
837 \) -a "x$STATIC_LINK" = xyes ]];
838 then AC_MSG_ERROR(
839 Features cannot be 'shared' when building statically
840 )
841 fi
842
843 ################################################################################
844 if [[ "$DMEVENTD" = yes -o "$CLVMD" != none ]] ; then
845 AC_CHECK_LIB([pthread], [pthread_mutex_lock],
846 [PTHREAD_LIBS="-lpthread"], hard_bailout)
847 fi
848
849 ################################################################################
850 dnl -- Disable selinux
851 AC_MSG_CHECKING(whether to enable selinux support)
852 AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support],
853 SELINUX=$enableval)
854 AC_MSG_RESULT($SELINUX)
855
856 ################################################################################
857 dnl -- Check for selinux
858 if test x$SELINUX = xyes; then
859 AC_CHECK_LIB([sepol], [sepol_check_context], [
860 AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
861 SELINUX_LIBS="-lsepol"])
862
863 AC_CHECK_LIB([selinux], [is_selinux_enabled], [
864 AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
865 AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
866 SELINUX_LIBS="-lselinux $SELINUX_LIBS"
867 SELINUX_PC="libselinux"
868 HAVE_SELINUX=yes ], [
869 AC_MSG_WARN(Disabling selinux)
870 SELINUX_LIBS=
871 SELINUX_PC=
872 HAVE_SELINUX=no ])
873 fi
874
875 ################################################################################
876 dnl -- Check for realtime clock support
877 if test x$REALTIME = xyes; then
878 AC_CHECK_LIB(rt, clock_gettime, HAVE_REALTIME=yes, HAVE_REALTIME=no)
879
880 if test x$HAVE_REALTIME = xyes; then
881 AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.])
882 LIBS="-lrt $LIBS"
883 else
884 AC_MSG_WARN(Disabling realtime clock)
885 fi
886 fi
887
888 ################################################################################
889 dnl -- Check for getopt
890 AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.]))
891
892 ################################################################################
893 dnl -- Check for readline (Shamelessly copied from parted 1.4.17)
894 if test x$READLINE != xno; then
895 lvm_saved_libs=$LIBS
896 AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib],
897 READLINE_LIBS=$ac_cv_search_tgetent, [
898 if test "$READLINE" = yes; then
899 AC_MSG_ERROR(
900 [termcap could not be found which is required for the
901 --enable-readline option (which is enabled by default). Either disable readline
902 support with --disable-readline or download and install termcap from:
903 ftp.gnu.org/gnu/termcap
904 Note: if you are using precompiled packages you will also need the development
905 package as well (which may be called termcap-devel or something similar).
906 Note: (n)curses also seems to work as a substitute for termcap. This was
907 not found either - but you could try installing that as well.])
908 fi])
909 dnl -- Old systems may need extra termcap dependency explicitly in LIBS
910 AC_CHECK_LIB([readline], [readline], [
911 AC_DEFINE([READLINE_SUPPORT], 1,
912 [Define to 1 to include the LVM readline shell.])
913 dnl -- Try only with -lreadline and check for different symbol
914 LIBS=$lvm_saved_libs
915 AC_CHECK_LIB([readline], [rl_line_buffer],
916 [ READLINE_LIBS="-lreadline" ], [
917 AC_MSG_RESULT([linking -lreadline with $READLINE_LIBS needed])
918 READLINE_LIBS="-lreadline $READLINE_LIBS"
919 ]) ], [
920 READLINE_LIBS=
921 if test "$READLINE" = yes; then
922 AC_MSG_ERROR(
923 [GNU Readline could not be found which is required for the
924 --enable-readline option (which is enabled by default). Either disable readline
925 support with --disable-readline or download and install readline from:
926 ftp.gnu.org/gnu/readline
927 Note: if you are using precompiled packages you will also need the development
928 package as well (which may be called readline-devel or something similar).])
929 fi ])
930 LIBS="$READLINE_LIBS $lvm_saved_libs"
931 AC_CHECK_FUNCS([rl_completion_matches])
932 LIBS=$lvm_saved_libs
933 fi
934
935 ################################################################################
936 dnl -- Internationalisation stuff
937 AC_MSG_CHECKING(whether to enable internationalisation)
938 AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],
939 INTL=$enableval, INTL=no)
940 AC_MSG_RESULT($INTL)
941
942 if test x$INTL = xyes; then
943 # FIXME - Move this - can be device-mapper too
944 INTL_PACKAGE="lvm2"
945 AC_PATH_PROG(MSGFMT, msgfmt)
946 if [[ "x$MSGFMT" == x ]];
947 then AC_MSG_ERROR(
948 msgfmt not found in path $PATH
949 )
950 fi;
951
952 AC_ARG_WITH(localedir,
953 [ --with-localedir=DIR Translation files in DIR [[PREFIX/share/locale]] ],
954 [ LOCALEDIR="$withval" ],
955 [ LOCALEDIR='${prefix}/share/locale' ])
956 fi
957
958 ################################################################################
959 AC_ARG_WITH(confdir,
960 [ --with-confdir=DIR Configuration files in DIR [[/etc]]],
961 [ CONFDIR="$withval" ],
962 [ CONFDIR='/etc' ])
963
964 AC_ARG_WITH(staticdir,
965 [ --with-staticdir=DIR Static binary in DIR [[EPREFIX/sbin]]],
966 [ STATICDIR="$withval" ],
967 [ STATICDIR='${exec_prefix}/sbin' ])
968
969 AC_ARG_WITH(usrlibdir,
970 [ --with-usrlibdir=DIR],
971 [ usrlibdir="$withval"],
972 [ usrlibdir='${prefix}/lib' ])
973
974 AC_ARG_WITH(usrsbindir,
975 [ --with-usrsbindir=DIR],
976 [ usrsbindir="$withval"],
977 [ usrsbindir='${prefix}/sbin' ])
978
979 ################################################################################
980 AC_ARG_WITH(udev_prefix,
981 [ --with-udev-prefix=UPREFIX Install udev rule files in UPREFIX [[EPREFIX]]],
982 [ udev_prefix="$withval"],
983 [ udev_prefix='${exec_prefix}' ])
984
985 AC_ARG_WITH(udevdir,
986 [ --with-udevdir=DIR udev rules in DIR [[UPREFIX/lib/udev/rules.d]]],
987 [ udevdir="$withval"],
988 [ udevdir='${udev_prefix}/lib/udev/rules.d' ])
989
990 ################################################################################
991 dnl -- Ensure additional headers required
992 if test x$READLINE = xyes; then
993 AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out))
994 fi
995
996 if test x$CLVMD != xnone; then
997 AC_CHECK_HEADERS(mntent.h netdb.h netinet/in.h pthread.h search.h sys/mount.h sys/socket.h sys/uio.h sys/un.h utmpx.h,,AC_MSG_ERROR(bailing out))
998 AC_CHECK_FUNCS(dup2 getmntent memmove select socket,,AC_MSG_ERROR(bailing out))
999 AC_FUNC_GETMNTENT
1000 AC_FUNC_SELECT_ARGTYPES
1001 fi
1002
1003 if test x$CLUSTER != xnone; then
1004 AC_CHECK_HEADERS(sys/socket.h sys/un.h,,AC_MSG_ERROR(bailing out))
1005 AC_CHECK_FUNCS(socket,,AC_MSG_ERROR(bailing out))
1006 fi
1007
1008 if test x$DMEVENTD = xyes; then
1009 AC_CHECK_HEADERS(arpa/inet.h,,AC_MSG_ERROR(bailing out))
1010 fi
1011
1012 if test x$HAVE_LIBDL = xyes; then
1013 AC_CHECK_HEADERS(dlfcn.h,,AC_MSG_ERROR(bailing out))
1014 fi
1015
1016 if test x$INTL = xyes; then
1017 AC_CHECK_HEADERS(libintl.h,,AC_MSG_ERROR(bailing out))
1018 fi
1019
1020 if test x$UDEV_SYNC = xyes; then
1021 AC_CHECK_HEADERS(sys/ipc.h sys/sem.h,,AC_MSG_ERROR(bailing out))
1022 fi
1023
1024 ################################################################################
1025 AC_PATH_PROG(MODPROBE_CMD, modprobe)
1026
1027 if test x$MODPROBE_CMD != x; then
1028 AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
1029 fi
1030
1031
1032 lvm_exec_prefix=$exec_prefix
1033 test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$prefix
1034 test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$ac_default_prefix
1035 AC_DEFINE_UNQUOTED(LVM_PATH, ["$lvm_exec_prefix/sbin/lvm"], [Path to lvm binary.])
1036
1037 if test "$CLVMD" != none; then
1038 clvmd_prefix=$ac_default_prefix
1039 test "$prefix" != NONE && clvmd_prefix=$prefix
1040 AC_DEFINE_UNQUOTED(CLVMD_PATH, ["$clvmd_prefix/sbin/clvmd"], [Path to clvmd binary.])
1041 fi
1042
1043 ################################################################################
1044 dnl -- dmeventd pidfile and executable path
1045 AH_TEMPLATE(DMEVENTD_PIDFILE, [Path to dmeventd pidfile.])
1046 if test "$BUILD_DMEVENTD" = yes; then
1047 AC_ARG_WITH(dmeventd-pidfile,
1048 [ --with-dmeventd-pidfile=PATH dmeventd pidfile [[/var/run/dmeventd.pid]] ],
1049 [ AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE,"$withval") ],
1050 [ AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE,"/var/run/dmeventd.pid") ])
1051 fi
1052
1053 AH_TEMPLATE(DMEVENTD_PATH, [Path to dmeventd binary.])
1054 if test "$BUILD_DMEVENTD" = yes; then
1055 AC_ARG_WITH(dmeventd-path,
1056 [ --with-dmeventd-path=PATH dmeventd path [[EPREFIX/sbin/dmeventd]] ],
1057 [ AC_DEFINE_UNQUOTED(DMEVENTD_PATH,"$withval") ],
1058 [ AC_DEFINE_UNQUOTED(DMEVENTD_PATH,"$lvm_exec_prefix/sbin/dmeventd") ])
1059 fi
1060
1061 ################################################################################
1062 dnl -- various defaults
1063 AH_TEMPLATE(DEFAULT_SYS_DIR, [Path to LVM system directory.])
1064 AC_ARG_WITH(default-system-dir,
1065 [ --with-default-system-dir=DIR Default LVM system directory [[/etc/lvm]] ],
1066 [ DEFAULT_SYS_DIR="$withval" ],
1067 [ DEFAULT_SYS_DIR="/etc/lvm" ])
1068 AC_DEFINE_UNQUOTED(DEFAULT_SYS_DIR,["$DEFAULT_SYS_DIR"] )
1069
1070 AH_TEMPLATE(DEFAULT_ARCHIVE_SUBDIR, [Name of default metadata archive subdirectory.])
1071 AC_ARG_WITH(default-archive-subdir,
1072 [ --with-default-archive-subdir=SUBDIR Default metadata archive subdir [[archive]] ],
1073 [ DEFAULT_ARCHIVE_SUBDIR="$withval" ],
1074 [ DEFAULT_ARCHIVE_SUBDIR="archive" ])
1075 AC_DEFINE_UNQUOTED(DEFAULT_ARCHIVE_SUBDIR,["$DEFAULT_ARCHIVE_SUBDIR"])
1076
1077 AH_TEMPLATE(DEFAULT_BACKUP_SUBDIR, [Name of default metadata backup subdirectory.])
1078 AC_ARG_WITH(default-backup-subdir,
1079 [ --with-default-backup-subdir=SUBDIR Default metadata backup subdir [[backup]] ],
1080 [ DEFAULT_BACKUP_SUBDIR="$withval" ],
1081 [ DEFAULT_BACKUP_SUBDIR="backup" ])
1082 AC_DEFINE_UNQUOTED(DEFAULT_BACKUP_SUBDIR,["$DEFAULT_BACKUP_SUBDIR"] )
1083
1084 AH_TEMPLATE(DEFAULT_CACHE_SUBDIR, [Name of default metadata cache subdirectory.])
1085 AC_ARG_WITH(default-cache-subdir,
1086 [ --with-default-cache-subdir=SUBDIR Default metadata cache subdir [[cache]] ],
1087 [ DEFAULT_CACHE_SUBDIR="$withval" ],
1088 [ DEFAULT_CACHE_SUBDIR="cache" ])
1089 AC_DEFINE_UNQUOTED(DEFAULT_CACHE_SUBDIR,["$DEFAULT_CACHE_SUBDIR"] )
1090
1091 AH_TEMPLATE(DEFAULT_LOCK_DIR, [Name of default locking directory.])
1092 AC_ARG_WITH(default-locking-dir,
1093 [ --with-default-locking-dir=DIR Default locking directory [[/var/lock/lvm]] ],
1094 [ DEFAULT_LOCK_DIR="$withval" ],
1095 [ DEFAULT_LOCK_DIR="/var/lock/lvm" ])
1096 AC_DEFINE_UNQUOTED(DEFAULT_LOCK_DIR,["$DEFAULT_LOCK_DIR"] )
1097
1098 ################################################################################
1099 dnl -- which kernel interface to use (ioctl only)
1100 AC_MSG_CHECKING(for kernel interface choice)
1101 AC_ARG_WITH(interface,
1102 [ --with-interface=IFACE Choose kernel interface (ioctl) [[ioctl]] ],
1103 [ interface="$withval" ],
1104 [ interface=ioctl ])
1105 if [[ "x$interface" != xioctl ]];
1106 then
1107 AC_MSG_ERROR(--with-interface=ioctl required. fs no longer supported.)
1108 fi
1109 AC_MSG_RESULT($interface)
1110
1111 ################################################################################
1112 DM_LIB_VERSION="\"`cat "$srcdir"/VERSION_DM 2>/dev/null || echo Unknown`\""
1113 AC_DEFINE_UNQUOTED(DM_LIB_VERSION, $DM_LIB_VERSION, [Library version])
1114
1115 DM_LIB_PATCHLEVEL=`cat "$srcdir"/VERSION_DM | $AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}'`
1116
1117 LVM_VERSION="\"`cat "$srcdir"/VERSION 2>/dev/null || echo Unknown`\""
1118
1119 VER=`cat "$srcdir"/VERSION`
1120 LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.* (//;s/).*//'`\""
1121 VER=`echo "$VER" | $AWK '{print $1}'`
1122 LVM_RELEASE="\"`echo "$VER" | $AWK -F '-' '{print $2}'`\""
1123 VER=`echo "$VER" | $AWK -F '-' '{print $1}'`
1124 LVM_MAJOR=`echo "$VER" | $AWK -F '.' '{print $1}'`
1125 LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'`
1126 LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[[(.]]' '{print $3}'`
1127 LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'`
1128
1129 ################################################################################
1130 AC_SUBST(APPLIB)
1131 AC_SUBST(AWK)
1132 AC_SUBST(BUILD_CMIRRORD)
1133 AC_SUBST(BUILD_DMEVENTD)
1134 AC_SUBST(CCS_CFLAGS)
1135 AC_SUBST(CCS_LIBS)
1136 AC_SUBST(CFLAGS)
1137 AC_SUBST(CFLOW_CMD)
1138 AC_SUBST(CLDFLAGS)
1139 AC_SUBST(CLDNOWHOLEARCHIVE)
1140 AC_SUBST(CLDWHOLEARCHIVE)
1141 AC_SUBST(CLUSTER)
1142 AC_SUBST(CLVMD)
1143 AC_SUBST(CMAN_CFLAGS)
1144 AC_SUBST(CMAN_LIBS)
1145 AC_SUBST(CMDLIB)
1146 AC_SUBST(CONFDB_CFLAGS)
1147 AC_SUBST(CONFDB_LIBS)
1148 AC_SUBST(CONFDIR)
1149 AC_SUBST(COPTIMISE_FLAG)
1150 AC_SUBST(CPG_CFLAGS)
1151 AC_SUBST(CPG_LIBS)
1152 AC_SUBST(CSCOPE_CMD)
1153 AC_SUBST(DEBUG)
1154 AC_SUBST(DEFAULT_SYS_DIR)
1155 AC_SUBST(DEFAULT_ARCHIVE_SUBDIR)
1156 AC_SUBST(DEFAULT_BACKUP_SUBDIR)
1157 AC_SUBST(DEFAULT_CACHE_SUBDIR)
1158 AC_SUBST(DEFAULT_LOCK_DIR)
1159 AC_SUBST(DEVMAPPER)
1160 AC_SUBST(DLM_CFLAGS)
1161 AC_SUBST(DLM_LIBS)
1162 AC_SUBST(DL_LIBS)
1163 AC_SUBST(DMEVENTD)
1164 AC_SUBST(DM_COMPAT)
1165 AC_SUBST(DM_DEVICE_GID)
1166 AC_SUBST(DM_DEVICE_MODE)
1167 AC_SUBST(DM_DEVICE_UID)
1168 AC_SUBST(DM_IOCTLS)
1169 AC_SUBST(DM_LIB_VERSION)
1170 AC_SUBST(DM_LIB_PATCHLEVEL)
1171 AC_SUBST(FSADM)
1172 AC_SUBST(GULM_CFLAGS)
1173 AC_SUBST(GULM_LIBS)
1174 AC_SUBST(HAVE_LIBDL)
1175 AC_SUBST(HAVE_REALTIME)
1176 AC_SUBST(INTL)
1177 AC_SUBST(INTL_PACKAGE)
1178 AC_SUBST(JOBS)
1179 AC_SUBST(LDDEPS)
1180 AC_SUBST(LIBS)
1181 AC_SUBST(LIB_SUFFIX)
1182 AC_SUBST(LOCALEDIR)
1183 AC_SUBST(LVM1)
1184 AC_SUBST(LVM1_FALLBACK)
1185 AC_SUBST(LVM_VERSION)
1186 AC_SUBST(LVM_LIBAPI)
1187 AC_SUBST(LVM_MAJOR)
1188 AC_SUBST(LVM_MINOR)
1189 AC_SUBST(LVM_PATCHLEVEL)
1190 AC_SUBST(LVM_RELEASE)
1191 AC_SUBST(LVM_RELEASE_DATE)
1192 AC_SUBST(MIRRORS)
1193 AC_SUBST(REPLICATORS)
1194 AC_SUBST(MSGFMT)
1195 AC_SUBST(PKGCONFIG)
1196 AC_SUBST(POOL)
1197 AC_SUBST(PTHREAD_LIBS)
1198 AC_SUBST(QUORUM_CFLAGS)
1199 AC_SUBST(QUORUM_LIBS)
1200 AC_SUBST(READLINE_LIBS)
1201 AC_SUBST(SACKPT_CFLAGS)
1202 AC_SUBST(SACKPT_LIBS)
1203 AC_SUBST(SALCK_CFLAGS)
1204 AC_SUBST(SALCK_LIBS)
1205 AC_SUBST(SELINUX_LIBS)
1206 AC_SUBST(SELINUX_PC)
1207 AC_SUBST(SNAPSHOTS)
1208 AC_SUBST(STATICDIR)
1209 AC_SUBST(STATIC_LINK)
1210 AC_SUBST(UDEV_LIBS)
1211 AC_SUBST(UDEV_PC)
1212 AC_SUBST(UDEV_RULES)
1213 AC_SUBST(UDEV_SYNC)
1214 AC_SUBST(WRITE_INSTALL)
1215 AC_SUBST(interface)
1216 AC_SUBST(kerneldir)
1217 AC_SUBST(missingkernel)
1218 AC_SUBST(kernelvsn)
1219 AC_SUBST(tmpdir)
1220 AC_SUBST(udev_prefix)
1221 AC_SUBST(udevdir)
1222 AC_SUBST(usrlibdir)
1223 AC_SUBST(usrsbindir)
1224
1225 ################################################################################
1226 dnl -- First and last lines should not contain files to generate in order to
1227 dnl -- keep utility scripts running properly
1228 AC_CONFIG_FILES([
1229 Makefile
1230 make.tmpl
1231 daemons/Makefile
1232 daemons/clvmd/Makefile
1233 daemons/cmirrord/Makefile
1234 daemons/dmeventd/Makefile
1235 daemons/dmeventd/libdevmapper-event.pc
1236 daemons/dmeventd/plugins/Makefile
1237 daemons/dmeventd/plugins/lvm2/Makefile
1238 daemons/dmeventd/plugins/mirror/Makefile
1239 daemons/dmeventd/plugins/snapshot/Makefile
1240 doc/Makefile
1241 doc/example.conf
1242 include/.symlinks
1243 include/Makefile
1244 lib/Makefile
1245 lib/format1/Makefile
1246 lib/format_pool/Makefile
1247 lib/locking/Makefile
1248 lib/mirror/Makefile
1249 lib/replicator/Makefile
1250 lib/misc/lvm-version.h
1251 lib/snapshot/Makefile
1252 libdm/Makefile
1253 libdm/libdevmapper.pc
1254 liblvm/Makefile
1255 liblvm/liblvm2app.pc
1256 man/Makefile
1257 po/Makefile
1258 scripts/clvmd_init_red_hat
1259 scripts/cmirrord_init_red_hat
1260 scripts/lvm2_monitoring_init_red_hat
1261 scripts/Makefile
1262 test/Makefile
1263 test/api/Makefile
1264 tools/Makefile
1265 udev/Makefile
1266 ])
1267 AC_OUTPUT
1268
1269 if test x$ODIRECT != xyes; then
1270 AC_MSG_WARN(Warning: O_DIRECT disabled: low-memory pvmove may lock up)
1271 fi
This page took 0.089984 seconds and 6 git commands to generate.