1 ###############################################################################
2 ## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
3 ## Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
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.
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 ################################################################################
15 ################################################################################
16 dnl -- Process this file with autoconf to produce a configure script.
18 AC_CONFIG_SRCDIR([lib/device/dev-cache.h])
19 AC_CONFIG_HEADERS([lib/misc/configure.h])
21 ################################################################################
22 dnl -- Setup the directory where autoconf has auxilary files
23 AC_CONFIG_AUX_DIR(autoconf)
25 ################################################################################
26 dnl -- Get system type
27 AC_CANONICAL_TARGET([])
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"
47 CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
50 CLDWHOLEARCHIVE="-all_load"
62 ################################################################################
63 dnl -- Checks for programs.
68 dnl probably no longer needed in 2008, but...
69 AC_PROG_GCC_TRADITIONAL
75 AC_PATH_PROG(CFLOW_CMD, cflow)
76 AC_PATH_PROG(CSCOPE_CMD, cscope)
78 ################################################################################
79 dnl -- Check for header files.
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 \
89 [AC_MSG_ERROR(bailing out)])
93 AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;;
95 AC_CHECK_HEADERS(machine/endian.h sys/disk.h,,AC_MSG_ERROR(bailing out)) ;;
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)
103 ################################################################################
104 dnl -- Check for typedefs, structures, and compiler characteristics.
107 AC_CHECK_MEMBERS([struct stat.st_rdev])
123 AC_CHECK_MEMBERS([struct stat.st_rdev])
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)
135 AC_FUNC_CLOSEDIR_VOID
147 ################################################################################
148 dnl -- Enables statically-linked tools
149 AC_MSG_CHECKING(whether to use static linking)
150 AC_ARG_ENABLE(static_link,
151 AC_HELP_STRING([--enable-static_link],
152 [use this to link the tools to their libraries
153 statically (default is dynamic linking]),
154 STATIC_LINK=$enableval, STATIC_LINK=no)
155 AC_MSG_RESULT($STATIC_LINK)
157 ################################################################################
158 dnl -- Prefix is /usr by default, the exec_prefix default is setup later
159 AC_PREFIX_DEFAULT(/usr)
161 ################################################################################
162 dnl -- Setup the ownership of the files
163 AC_MSG_CHECKING(file owner)
165 AC_HELP_STRING([--with-user=USER],
166 [set the owner of installed files [[USER=]]]),
168 AC_MSG_RESULT($OWNER)
170 if test x$OWNER != x; then
171 INSTALL="$INSTALL -o $OWNER"
174 ################################################################################
175 dnl -- Setup the group ownership of the files
176 AC_MSG_CHECKING(group owner)
178 AC_HELP_STRING([--with-group=GROUP],
179 [set the group owner of installed files [[GROUP=]]]),
181 AC_MSG_RESULT($GROUP)
183 if test x$GROUP != x; then
184 INSTALL="$INSTALL -g $GROUP"
187 ################################################################################
188 dnl -- Setup device node ownership
189 AC_MSG_CHECKING(device node uid)
191 AC_ARG_WITH(device-uid,
192 AC_HELP_STRING([--with-device-uid=UID],
193 [set the owner used for new device nodes [[UID=0]]]),
194 DM_DEVICE_UID=$withval, DM_DEVICE_UID=0)
195 AC_MSG_RESULT($DM_DEVICE_UID)
197 ################################################################################
198 dnl -- Setup device group ownership
199 AC_MSG_CHECKING(device node gid)
201 AC_ARG_WITH(device-gid,
202 AC_HELP_STRING([--with-device-gid=GID],
203 [set the group used for new device nodes [[GID=0]]]),
204 DM_DEVICE_GID=$withval, DM_DEVICE_GID=0)
205 AC_MSG_RESULT($DM_DEVICE_GID)
207 ################################################################################
208 dnl -- Setup device mode
209 AC_MSG_CHECKING(device node mode)
211 AC_ARG_WITH(device-mode,
212 AC_HELP_STRING([--with-device-mode=MODE],
213 [set the mode used for new device nodes [[MODE=0600]]]),
214 DM_DEVICE_MODE=$withval, DM_DEVICE_MODE=0600)
215 AC_MSG_RESULT($DM_DEVICE_MODE)
217 ################################################################################
218 dnl -- LVM1 tool fallback option
219 AC_MSG_CHECKING(whether to enable lvm1 fallback)
220 AC_ARG_ENABLE(lvm1_fallback,
221 AC_HELP_STRING([--enable-lvm1_fallback],
222 [use this to fall back and use LVM1 binaries if
223 device-mapper is missing from the kernel]),
224 LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no)
225 AC_MSG_RESULT($LVM1_FALLBACK)
227 if test x$LVM1_FALLBACK = xyes; then
228 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])
231 ################################################################################
232 dnl -- format1 inclusion type
233 AC_MSG_CHECKING(whether to include support for lvm1 metadata)
235 AC_HELP_STRING([--with-lvm1=TYPE],
236 [LVM1 metadata support: internal/shared/none
238 LVM1=$withval, LVM1=internal)
241 if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]];
243 --with-lvm1 parameter invalid
247 if test x$LVM1 = xinternal; then
248 AC_DEFINE([LVM1_INTERNAL], 1, [Define to 1 to include built-in support for LVM1 metadata.])
251 ################################################################################
252 dnl -- format_pool inclusion type
253 AC_MSG_CHECKING(whether to include support for GFS pool metadata)
255 AC_HELP_STRING([--with-pool=TYPE],
256 [GFS pool read-only support: internal/shared/none
258 POOL=$withval, POOL=internal)
261 if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]];
263 --with-pool parameter invalid
267 if test x$POOL = xinternal; then
268 AC_DEFINE([POOL_INTERNAL], 1, [Define to 1 to include built-in support for GFS pool metadata.])
271 ################################################################################
272 dnl -- cluster_locking inclusion type
273 AC_MSG_CHECKING(whether to include support for cluster locking)
275 AC_HELP_STRING([--with-cluster=TYPE],
276 [cluster LVM locking support: internal/shared/none
279 AC_MSG_RESULT($CLUSTER)
281 if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]];
283 --with-cluster parameter invalid
287 if test x$CLUSTER = xinternal; then
288 AC_DEFINE([CLUSTER_LOCKING_INTERNAL], 1, [Define to 1 to include built-in support for clustered LVM locking.])
291 ################################################################################
292 dnl -- snapshots inclusion type
293 AC_MSG_CHECKING(whether to include snapshots)
294 AC_ARG_WITH(snapshots,
295 AC_HELP_STRING([--with-snapshots=TYPE],
296 [snapshot support: internal/shared/none
298 SNAPSHOTS=$withval, SNAPSHOTS=internal)
299 AC_MSG_RESULT($SNAPSHOTS)
301 if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]];
303 --with-snapshots parameter invalid
307 if test x$SNAPSHOTS = xinternal; then
308 AC_DEFINE([SNAPSHOT_INTERNAL], 1, [Define to 1 to include built-in support for snapshots.])
311 ################################################################################
312 dnl -- mirrors inclusion type
313 AC_MSG_CHECKING(whether to include mirrors)
315 AC_HELP_STRING([--with-mirrors=TYPE],
316 [mirror support: internal/shared/none
318 MIRRORS=$withval, MIRRORS=internal)
319 AC_MSG_RESULT($MIRRORS)
321 if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]];
323 --with-mirrors parameter invalid
327 if test x$MIRRORS = xinternal; then
328 AC_DEFINE([MIRRORED_INTERNAL], 1, [Define to 1 to include built-in support for mirrors.])
331 ################################################################################
332 dnl -- asynchronous volume replicator inclusion type
333 AC_MSG_CHECKING(whether to include replicators)
334 AC_ARG_WITH(replicators,
335 AC_HELP_STRING([--with-replicators=TYPE],
336 [replicator support: internal/shared/none
338 REPLICATORS=$withval, REPLICATORS=none)
339 AC_MSG_RESULT($REPLICATORS)
341 case "$REPLICATORS" in
343 internal) AC_DEFINE([REPLICATOR_INTERNAL], 1,
344 [Define to 1 to include built-in support for replicators.]) ;;
345 *) AC_MSG_ERROR([--with-replicators parameter invalid ($REPLICATORS)]) ;;
348 ################################################################################
349 dnl -- Disable readline
350 AC_MSG_CHECKING(whether to enable readline)
351 AC_ARG_ENABLE([readline],
352 AC_HELP_STRING([--disable-readline], [disable readline support]),
353 READLINE=$enableval, READLINE=maybe)
354 AC_MSG_RESULT($READLINE)
356 ################################################################################
357 dnl -- Disable realtime clock support
358 AC_MSG_CHECKING(whether to enable realtime support)
359 AC_ARG_ENABLE(realtime,
360 AC_HELP_STRING([--enable-realtime], [enable realtime clock support]),
362 AC_MSG_RESULT($REALTIME)
364 ################################################################################
365 dnl -- Init pkg-config with dummy invokation:
366 dnl -- this is required because PKG_CHECK_MODULES macro is expanded
367 dnl -- to initialize the pkg-config environment only at the first invokation,
368 dnl -- that would be conditional in this configure.in.
370 PKG_CHECK_MODULES(PKGCONFIGINIT, pkgconfiginit, [],
371 [AC_MSG_RESULT([pkg-config initialized])])
375 ################################################################################
376 dnl -- Build cluster LVM daemon
377 AC_MSG_CHECKING(whether to build cluster LVM daemon)
379 [ --with-clvmd=TYPE build cluster LVM Daemon
380 The following cluster manager combinations are valid:
381 * cman,gulm (RHEL4 or equivalent)
382 * cman (RHEL5 or equivalent)
383 * cman,corosync,openais (or selection of them)
384 * singlenode (localhost only)
386 * none (disable build)
388 CLVMD=$withval, CLVMD=none)
389 if test x$CLVMD = xyes; then
392 AC_MSG_RESULT($CLVMD)
394 dnl -- If clvmd enabled without cluster locking, automagically include it
395 if test x$CLVMD != xnone && test x$CLUSTER = xnone; then
399 dnl -- init pkgconfig if required
400 if test x$CLVMD != xnone && test x$PKGCONFIG_INIT != x1; then
404 dnl -- Express clvmd init script Required-Start / Required-Stop
406 dnl -- On RHEL4/RHEL5, qdiskd is started from a separate init script.
407 dnl -- Enable if we are build for either cman or gulm.
408 CLVMD_NEEDS_QDISKD=no
410 dnl -- define build types
411 if [[ `expr x"$CLVMD" : '.*gulm.*'` != 0 ]]; then
413 CLVMD_CMANAGERS="$CLVMD_CMANAGERS lock_gulmd"
414 CLVMD_NEEDS_QDISKD=yes
416 if [[ `expr x"$CLVMD" : '.*cman.*'` != 0 ]]; then
418 CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman"
419 CLVMD_NEEDS_QDISKD=yes
421 if [[ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then
423 CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync"
425 if [[ `expr x"$CLVMD" : '.*openais.*'` != 0 ]]; then
427 CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais"
429 if test x$CLVMD_NEEDS_QDISKD != xno; then
430 CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd"
433 dnl -- sanity check around user selection
434 if test x$BUILDGULM = xyes; then
435 if test x$BUILDCOROSYNC = xyes || \
436 test x$BUILDOPENAIS = xyes; then
437 AC_MSG_ERROR([requested clvmd configuration is not valid])
441 dnl -- define a soft bailout if we are autodetecting
447 AC_MSG_ERROR([bailing out])
450 dnl -- if clvmd=all then set soft_bailout (we don't want to error)
451 dnl -- and set all builds to yes. We need to do this here
452 dnl -- to skip the gulm + openais|corosync sanity check above.
453 if test x$CLVMD = xall; then
463 dnl -- helper macro to check libs without adding them to LIBS
464 check_lib_no_libs() {
470 AC_CHECK_LIB([$lib_no_libs_arg1],
471 [$lib_no_libs_arg2],,
474 LIBS=$ac_check_lib_save_LIBS
477 dnl -- Look for gulm libraries if required.
478 if test x$BUILDGULM = xyes; then
479 PKG_CHECK_MODULES(CCS, libccs, [HAVE_CCS=yes],
481 AC_CHECK_HEADERS(ccs.h,,$bailout)
482 check_lib_no_libs ccs ccs_connect
483 if test $NOTFOUND = 0; then
484 AC_MSG_RESULT([no pkg for libccs, using -lccs])
488 PKG_CHECK_MODULES(GULM, libgulm, [HAVE_GULM=yes],
490 AC_CHECK_HEADERS(libgulm.h,,$bailout)
491 check_lib_no_libs gulm lg_core_login
492 if test $NOTFOUND = 0; then
493 AC_MSG_RESULT([no pkg for libgulm, using -lgulm])
499 dnl -- Look for cman libraries if required.
500 if test x$BUILDCMAN = xyes; then
501 PKG_CHECK_MODULES(CMAN, libcman, [HAVE_CMAN=yes],
503 AC_CHECK_HEADERS(libcman.h,,$bailout)
504 check_lib_no_libs cman cman_init
505 if test $NOTFOUND = 0; then
506 AC_MSG_RESULT([no pkg for libcman, using -lcman])
514 dnl -- Look for corosync that's required also for openais build
515 dnl -- only enough recent version of corosync ship pkg-config files.
516 dnl -- We can safely rely on that to detect the correct bits.
517 if test x$BUILDCOROSYNC = xyes || \
518 test x$BUILDOPENAIS = xyes; then
519 PKG_CHECK_MODULES(COROSYNC, corosync, [HAVE_COROSYNC=yes], $bailout)
523 dnl -- Look for corosync libraries if required.
524 if test x$BUILDCOROSYNC = xyes; then
525 PKG_CHECK_MODULES(QUORUM, libquorum, [HAVE_QUORUM=yes], $bailout)
530 dnl -- Look for openais libraries if required.
531 if test x$BUILDOPENAIS = xyes; then
532 PKG_CHECK_MODULES(SALCK, libSaLck, [HAVE_SALCK=yes], $bailout)
536 dnl -- Below are checks for libraries common to more than one build.
538 dnl -- Check confdb library.
539 dnl -- mandatory for corosync build.
540 dnl -- optional for openais/cman build.
542 if test x$CHECKCONFDB = xyes; then
543 PKG_CHECK_MODULES(CONFDB, libconfdb,
547 AC_CHECK_HEADERS(corosync/confdb.h,
551 if test x$HAVE_CONFDB != xyes && \
552 test x$HAVE_CONFDB_H = xyes; then
553 check_lib_no_libs confdb confdb_initialize
554 AC_MSG_RESULT([no pkg for confdb, using -lconfdb])
555 CONFDB_LIBS="-lconfdb"
559 if test x$BUILDCOROSYNC = xyes && \
560 test x$HAVE_CONFDB != xyes &&
561 test x$CLVMD != xall; then
562 AC_MSG_ERROR([bailing out... confdb library is required])
566 dnl -- Check cpg library.
567 if test x$CHECKCPG = xyes; then
568 PKG_CHECK_MODULES(CPG, libcpg, [HAVE_CPG=yes], $bailout)
571 dnl -- Check dlm library.
572 if test x$CHECKDLM = xyes; then
573 PKG_CHECK_MODULES(DLM, libdlm, [HAVE_DLM=yes],
575 AC_CHECK_HEADERS(libdlm.h,,$bailout)
576 check_lib_no_libs dlm dlm_lock -lpthread
577 if test $NOTFOUND = 0; then
578 AC_MSG_RESULT([no pkg for libdlm, using -ldlm])
579 DLM_LIBS="-ldlm -lpthread"
584 dnl -- If we are autodetecting, we need to re-create
585 dnl -- the depedencies checks and set a proper CLVMD,
586 dnl -- together with init script Required-Start/Stop entries.
587 if test x$CLVMD = xall; then
590 CLVMD_NEEDS_QDISKD=no
591 if test x$HAVE_CCS = xyes && \
592 test x$HAVE_GULM = xyes; then
593 AC_MSG_RESULT([Enabling clvmd gulm cluster manager])
595 CLVMD_CMANAGERS="$CLVMD_CMANAGERS lock_gulmd"
596 CLVMD_NEEDS_QDISKD=yes
598 if test x$HAVE_CMAN = xyes && \
599 test x$HAVE_DLM = xyes; then
600 AC_MSG_RESULT([Enabling clvmd cman cluster manager])
602 CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman"
603 CLVMD_NEEDS_QDISKD=yes
605 if test x$HAVE_COROSYNC = xyes && \
606 test x$HAVE_QUORUM = xyes && \
607 test x$HAVE_CPG = xyes && \
608 test x$HAVE_DLM = xyes && \
609 test x$HAVE_CONFDB = xyes; then
610 AC_MSG_RESULT([Enabling clvmd corosync cluster manager])
611 CLVMD="$CLVMD,corosync"
612 CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync"
614 if test x$HAVE_COROSYNC = xyes && \
615 test x$HAVE_CPG = xyes && \
616 test x$HAVE_SALCK = xyes; then
617 AC_MSG_RESULT([Enabling clvmd openais cluster manager])
618 CLVMD="$CLVMD,openais"
619 CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais"
621 if test x$CLVMD_NEEDS_QDISKD != xno; then
622 CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd"
624 if test x$CLVMD = xnone; then
625 AC_MSG_RESULT([Disabling clvmd build. No cluster manager detected.])
629 ################################################################################
631 if test "x$CLVMD" != xnone; then
632 AC_ARG_WITH(clvmd-pidfile,
633 AC_HELP_STRING([--with-clvmd-pidfile=PATH],
634 [clvmd pidfile [[/var/run/clvmd.pid]]]),
635 CLVMD_PIDFILE=$withval,
636 CLVMD_PIDFILE="/var/run/clvmd.pid")
637 AC_DEFINE_UNQUOTED(CLVMD_PIDFILE, ["$CLVMD_PIDFILE"],
638 [Path to clvmd pidfile.])
641 ################################################################################
642 dnl -- Build cluster mirror log daemon
643 AC_MSG_CHECKING(whether to build cluster mirror log daemon)
644 AC_ARG_ENABLE(cmirrord,
645 AC_HELP_STRING([--enable-cmirrord],
646 [enable the cluster mirror log daemon]),
647 CMIRRORD=$enableval, CMIRRORD=no)
648 AC_MSG_RESULT($CMIRRORD)
650 BUILD_CMIRRORD=$CMIRRORD
652 ################################################################################
653 dnl -- cmirrord pidfile
654 if test "x$BUILD_CMIRRORD" = xyes; then
655 AC_ARG_WITH(cmirrord-pidfile,
656 AC_HELP_STRING([--with-cmirrord-pidfile=PATH],
657 [cmirrord pidfile [[/var/run/cmirrord.pid]]]),
658 CMIRRORD_PIDFILE=$withval,
659 CMIRRORD_PIDFILE="/var/run/cmirrord.pid")
660 AC_DEFINE_UNQUOTED(CMIRRORD_PIDFILE, ["$CMIRRORD_PIDFILE"],
661 [Path to cmirrord pidfile.])
664 ################################################################################
665 dnl -- Look for corosync libraries if required.
666 if [[ "x$BUILD_CMIRRORD" = xyes ]]; then
667 dnl -- init pkgconfig if required
668 if test x$PKGCONFIG_INIT != x1; then
671 PKG_CHECK_MODULES(SACKPT, libSaCkpt)
672 if test x$HAVE_CPG != xyes; then
673 PKG_CHECK_MODULES(CPG, libcpg)
677 ################################################################################
678 dnl -- Enable debugging
679 AC_MSG_CHECKING(whether to enable debugging)
680 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable debugging]),
681 DEBUG=$enableval, DEBUG=no)
682 AC_MSG_RESULT($DEBUG)
684 dnl -- Normally turn off optimisation for debug builds
685 if test x$DEBUG = xyes; then
691 ################################################################################
692 dnl -- Override optimisation
693 AC_MSG_CHECKING(for C optimisation flag)
694 AC_ARG_WITH(optimisation,
695 AC_HELP_STRING([--with-optimisation=OPT],
696 [C optimisation flag [[OPT=-O2]]]),
697 COPTIMISE_FLAG=$withval)
698 AC_MSG_RESULT($COPTIMISE_FLAG)
700 ################################################################################
701 dnl -- Enable profiling
702 AC_MSG_CHECKING(whether to gather gcov profiling data)
703 AC_ARG_ENABLE(profiling,
704 AC_HELP_STRING(--enable-profiling, [gather gcov profiling data]),
705 PROFILING=$enableval, PROFILING=no)
706 AC_MSG_RESULT($PROFILING)
708 if test "x$PROFILING" = xyes; then
709 COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage"
710 AC_PATH_PROG(LCOV, lcov)
711 AC_PATH_PROG(GENHTML, genhtml)
712 if test -z "$LCOV" -o -z "$GENHTML"; then
713 AC_MSG_ERROR([lcov and genhtml are required for profiling])
715 AC_PATH_PROG(GENPNG, genpng)
716 if test -n "$GENPNG"; then
717 AC_MSG_CHECKING([whether $GENPNG has all required modules])
718 if $GENPNG --help > /dev/null 2>&1 ; then
720 GENHTML="$GENHTML --frames"
722 AC_MSG_RESULT(not supported)
723 AC_MSG_WARN([GD.pm perl module is not installed])
729 ################################################################################
730 dnl -- Enable testing
731 AC_MSG_CHECKING(whether to enable unit testing)
732 AC_ARG_ENABLE(testing,
733 AC_HELP_STRING(--enable-testing, [enable testing targets in the makefile]),
734 TESTING=$enableval, TESTING=no)
735 AC_MSG_RESULT($TESTING)
737 if test "$TESTING" = yes; then
738 AC_PATH_PROG(RUBY19, ruby1.9)
739 AC_PATH_PROG(VALGRIND, valgrind)
740 if test -z "$RUBY19" -o -z "$VALGRIND"; then
741 AC_MSG_ERROR([ruby1.9 and valgrind are required for testing])
745 ################################################################################
746 dnl -- Enable valgrind awareness of memory pools
747 AC_MSG_CHECKING(whether to enable valgrind awareness of pools)
748 AC_ARG_ENABLE(valgrind_pool,
749 AC_HELP_STRING(--enable-valgrind-pool, [enable valgrind awareness of pools]),
750 VALGRIND_POOL=$enableval, VALGRIND_POOL=no)
751 AC_MSG_RESULT($VALGRIND_POOL)
753 if test "$VALGRIND_POOL" = yes; then
754 AC_CHECK_HEADERS([valgrind/memcheck.h], , [AC_MSG_ERROR(bailing out)])
755 AC_DEFINE([VALGRIND_POOL], 1, [Enable a valgrind aware build of pool])
758 ################################################################################
759 dnl -- Disable devmapper
760 AC_MSG_CHECKING(whether to use device-mapper)
761 AC_ARG_ENABLE(devmapper,
762 AC_HELP_STRING([--disable-devmapper],
763 [disable LVM2 device-mapper interaction]),
764 DEVMAPPER=$enableval)
765 AC_MSG_RESULT($DEVMAPPER)
767 if test x$DEVMAPPER = xyes; then
768 AC_DEFINE([DEVMAPPER_SUPPORT], 1, [Define to 1 to enable LVM2 device-mapper interaction.])
771 ################################################################################
772 dnl -- Enable udev synchronisation
773 AC_MSG_CHECKING(whether to enable synchronisation with udev processing)
774 AC_ARG_ENABLE(udev_sync,
775 AC_HELP_STRING([--enable-udev_sync],
776 [enable synchronisation with udev processing]),
777 UDEV_SYNC=$enableval, UDEV_SYNC=no)
778 AC_MSG_RESULT($UDEV_SYNC)
780 if test x$UDEV_SYNC = xyes; then
781 AC_CHECK_LIB(udev, udev_queue_get_udev_is_active,
782 [UDEV_PC="libudev"; UDEV_LIBS="-ludev"],
783 [AC_MSG_ERROR([bailing out... libudev library is required])])
784 AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
787 dnl -- Enable udev rules
788 AC_MSG_CHECKING(whether to enable installation of udev rules required for synchronisation)
789 AC_ARG_ENABLE(udev_rules,
790 AC_HELP_STRING([--enable-udev_rules],
791 [install rule files needed for udev synchronisation]),
792 UDEV_RULES=$enableval, UDEV_RULES=$UDEV_SYNC)
793 AC_MSG_RESULT($UDEV_RULES)
795 ################################################################################
796 dnl -- Compatibility mode
797 AC_ARG_ENABLE(compat,
798 AC_HELP_STRING([--enable-compat],
799 [enable support for old device-mapper versions]),
800 DM_COMPAT=$enableval, DM_COMPAT=no)
802 ################################################################################
803 dnl -- Compatible units suffix mode
804 AC_ARG_ENABLE(units-compat,
805 AC_HELP_STRING([--enable-units-compat],
806 [enable output compatibility with old versions that
807 that do not use KiB-style unit suffixes]),
808 UNITS_COMPAT=$enableval, UNITS_COMPAT=no)
810 if test x$UNITS_COMPAT = xyes; then
811 AC_DEFINE([DEFAULT_SI_UNIT_CONSISTENCY], 0, [Define to 0 to reinstate the pre-2.02.54 handling of unit suffixes.])
814 ################################################################################
817 AC_HELP_STRING([--disable-driver],
818 [disable calls to device-mapper in the kernel]),
819 DM_IOCTLS=$enableval)
821 ################################################################################
822 dnl -- Disable O_DIRECT
823 AC_MSG_CHECKING(whether to enable O_DIRECT)
824 AC_ARG_ENABLE(o_direct,
825 AC_HELP_STRING([--disable-o_direct], [disable O_DIRECT]),
827 AC_MSG_RESULT($ODIRECT)
829 if test x$ODIRECT = xyes; then
830 AC_DEFINE([O_DIRECT_SUPPORT], 1, [Define to 1 to enable O_DIRECT support.])
833 ################################################################################
834 dnl -- Enable liblvm2app.so
835 AC_MSG_CHECKING(whether to build liblvm2app.so application library)
836 AC_ARG_ENABLE(applib,
837 AC_HELP_STRING([--enable-applib], [build application library]),
838 APPLIB=$enableval, APPLIB=no)
839 AC_MSG_RESULT($APPLIB)
840 AC_SUBST([LVM2APP_LIB])
841 test x$APPLIB = xyes \
842 && LVM2APP_LIB=-llvm2app \
845 ################################################################################
847 AC_MSG_CHECKING(whether to compile liblvm2cmd.so)
848 AC_ARG_ENABLE(cmdlib,
849 AC_HELP_STRING([--enable-cmdlib], [build shared command library]),
850 CMDLIB=$enableval, CMDLIB=no)
851 AC_MSG_RESULT($CMDLIB)
852 AC_SUBST([LVM2CMD_LIB])
853 test x$CMDLIB = xyes \
854 && LVM2CMD_LIB=-llvm2cmd \
857 ################################################################################
858 dnl -- Enable pkg-config
859 AC_ARG_ENABLE(pkgconfig,
860 AC_HELP_STRING([--enable-pkgconfig], [install pkgconfig support]),
861 PKGCONFIG=$enableval, PKGCONFIG=no)
863 ################################################################################
864 dnl -- Enable installation of writable files by user
865 AC_ARG_ENABLE(write_install,
866 AC_HELP_STRING([--enable-write_install],
867 [install user writable files]),
868 WRITE_INSTALL=$enableval, WRITE_INSTALL=no)
870 ################################################################################
872 AC_MSG_CHECKING(whether to install fsadm)
873 AC_ARG_ENABLE(fsadm, AC_HELP_STRING([--disable-fsadm], [disable fsadm]),
875 AC_MSG_RESULT($FSADM)
877 ################################################################################
878 dnl -- enable dmeventd handling
879 AC_MSG_CHECKING(whether to use dmeventd)
880 AC_ARG_ENABLE(dmeventd, AC_HELP_STRING([--enable-dmeventd],
881 [enable the device-mapper event daemon]),
883 AC_MSG_RESULT($DMEVENTD)
885 BUILD_DMEVENTD=$DMEVENTD
887 dnl -- dmeventd currently requires internal mirror support
888 if test x$DMEVENTD = xyes; then
889 if test x$MIRRORS != xinternal; then
891 --enable-dmeventd currently requires --with-mirrors=internal
894 if test x$CMDLIB = xno; then
896 --enable-dmeventd requires --enable-cmdlib to be used as well
901 if test x$DMEVENTD = xyes; then
902 AC_DEFINE([DMEVENTD], 1, [Define to 1 to enable the device-mapper event daemon.])
905 ################################################################################
906 dnl -- getline included in recent libc
908 AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1,
909 [Define to 1 if getline is available.]))
911 ################################################################################
912 dnl -- canonicalize_file_name included in recent libc
914 AC_CHECK_LIB(c, canonicalize_file_name,
915 AC_DEFINE([HAVE_CANONICALIZE_FILE_NAME], 1,
916 [Define to 1 if canonicalize_file_name is available.]))
918 ################################################################################
919 dnl -- Clear default exec_prefix - install into /sbin rather than /usr/sbin
920 if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
924 ################################################################################
925 dnl -- Check for dlopen
926 AC_CHECK_LIB(dl, dlopen, [
927 AC_DEFINE([HAVE_LIBDL], 1, [Define to 1 if dynamic libraries are available.])
933 ################################################################################
934 dnl -- Check for shared/static conflicts
935 if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \
936 -o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \
937 \) -a "x$STATIC_LINK" = xyes ]];
939 Features cannot be 'shared' when building statically
943 ################################################################################
944 if [[ "$DMEVENTD" = yes -o "$CLVMD" != none ]] ; then
945 AC_CHECK_LIB([pthread], [pthread_mutex_lock],
946 [PTHREAD_LIBS="-lpthread"], hard_bailout)
949 ################################################################################
950 dnl -- Disable selinux
951 AC_MSG_CHECKING(whether to enable selinux support)
952 AC_ARG_ENABLE(selinux,
953 AC_HELP_STRING([--disable-selinux], [disable selinux support]),
955 AC_MSG_RESULT($SELINUX)
957 ################################################################################
958 dnl -- Check for selinux
959 if test x$SELINUX = xyes; then
960 AC_CHECK_LIB([sepol], [sepol_check_context], [
961 AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
962 SELINUX_LIBS="-lsepol"])
964 AC_CHECK_LIB([selinux], [is_selinux_enabled], [
965 AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
966 AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
967 SELINUX_LIBS="-lselinux $SELINUX_LIBS"
968 SELINUX_PC="libselinux"
969 HAVE_SELINUX=yes ], [
970 AC_MSG_WARN(Disabling selinux)
976 ################################################################################
977 dnl -- Check for realtime clock support
978 if test x$REALTIME = xyes; then
979 AC_CHECK_LIB(rt, clock_gettime, HAVE_REALTIME=yes, HAVE_REALTIME=no)
981 if test x$HAVE_REALTIME = xyes; then
982 AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.])
985 AC_MSG_WARN(Disabling realtime clock)
989 ################################################################################
990 dnl -- Check for getopt
991 AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.]))
993 ################################################################################
994 dnl -- Check for readline (Shamelessly copied from parted 1.4.17)
995 if test x$READLINE != xno; then
997 AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib],
998 READLINE_LIBS=$ac_cv_search_tgetent, [
999 if test "$READLINE" = yes; then
1001 [termcap could not be found which is required for the
1002 --enable-readline option (which is enabled by default). Either disable readline
1003 support with --disable-readline or download and install termcap from:
1004 ftp.gnu.org/gnu/termcap
1005 Note: if you are using precompiled packages you will also need the development
1006 package as well (which may be called termcap-devel or something similar).
1007 Note: (n)curses also seems to work as a substitute for termcap. This was
1008 not found either - but you could try installing that as well.])
1010 dnl -- Old systems may need extra termcap dependency explicitly in LIBS
1011 AC_CHECK_LIB([readline], [readline], [
1012 AC_DEFINE([READLINE_SUPPORT], 1,
1013 [Define to 1 to include the LVM readline shell.])
1014 dnl -- Try only with -lreadline and check for different symbol
1015 LIBS=$lvm_saved_libs
1016 AC_CHECK_LIB([readline], [rl_line_buffer],
1017 [ READLINE_LIBS="-lreadline" ], [
1018 AC_MSG_RESULT([linking -lreadline with $READLINE_LIBS needed])
1019 READLINE_LIBS="-lreadline $READLINE_LIBS"
1022 if test "$READLINE" = yes; then
1024 [GNU Readline could not be found which is required for the
1025 --enable-readline option (which is enabled by default). Either disable readline
1026 support with --disable-readline or download and install readline from:
1027 ftp.gnu.org/gnu/readline
1028 Note: if you are using precompiled packages you will also need the development
1029 package as well (which may be called readline-devel or something similar).])
1031 LIBS="$READLINE_LIBS $lvm_saved_libs"
1032 AC_CHECK_FUNCS([rl_completion_matches])
1033 LIBS=$lvm_saved_libs
1036 ################################################################################
1037 dnl -- Internationalisation stuff
1038 AC_MSG_CHECKING(whether to enable internationalisation)
1040 AC_HELP_STRING([--enable-nls], [enable Native Language Support]),
1041 INTL=$enableval, INTL=no)
1042 AC_MSG_RESULT($INTL)
1044 if test x$INTL = xyes; then
1045 # FIXME - Move this - can be device-mapper too
1047 AC_PATH_PROG(MSGFMT, msgfmt)
1048 if [[ "x$MSGFMT" == x ]];
1050 msgfmt not found in path $PATH
1054 AC_ARG_WITH(localedir,
1055 AC_HELP_STRING([--with-localedir=DIR],
1056 [translation files in DIR
1057 [[PREFIX/share/locale]]]),
1058 LOCALEDIR=$withval, LOCALEDIR='${prefix}/share/locale')
1061 ################################################################################
1062 AC_ARG_WITH(confdir,
1063 AC_HELP_STRING([--with-confdir=DIR],
1064 [configuration files in DIR [[/etc]]]),
1065 CONFDIR=$withval, CONFDIR="/etc")
1067 AC_ARG_WITH(staticdir,
1068 AC_HELP_STRING([--with-staticdir=DIR],
1069 [static binaries in DIR [[EPREFIX/sbin]]]),
1070 STATICDIR=$withval, STATICDIR='${exec_prefix}/sbin')
1072 AC_ARG_WITH(usrlibdir,
1073 AC_HELP_STRING([--with-usrlibdir=DIR],
1074 [usrlib in DIR [[PREFIX/lib]]]),
1075 usrlibdir=$withval, usrlibdir='${prefix}/lib')
1077 AC_ARG_WITH(usrsbindir,
1078 AC_HELP_STRING([--with-usrsbindir=DIR],
1079 [usrsbin executables in DIR [[PREFIX/sbin]]]),
1080 usrsbindir=$withval, usrsbindir='${prefix}/sbin')
1082 ################################################################################
1083 AC_ARG_WITH(udev_prefix,
1084 AC_HELP_STRING([--with-udev-prefix=UPREFIX],
1085 [install udev rule files in UPREFIX [[EPREFIX]]]),
1086 udev_prefix=$withval, udev_prefix='${exec_prefix}')
1088 AC_ARG_WITH(udevdir,
1089 AC_HELP_STRING([--with-udevdir=DIR],
1090 [udev rules in DIR [[UPREFIX/lib/udev/rules.d]]]),
1091 udevdir=$withval, udevdir='${udev_prefix}/lib/udev/rules.d')
1093 ################################################################################
1094 dnl -- Ensure additional headers required
1095 if test x$READLINE = xyes; then
1096 AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out))
1099 if test x$CLVMD != xnone; then
1100 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))
1101 AC_CHECK_FUNCS(dup2 getmntent memmove select socket,,AC_MSG_ERROR(bailing out))
1103 AC_FUNC_SELECT_ARGTYPES
1106 if test x$CLUSTER != xnone; then
1107 AC_CHECK_HEADERS(sys/socket.h sys/un.h,,AC_MSG_ERROR(bailing out))
1108 AC_CHECK_FUNCS(socket,,AC_MSG_ERROR(bailing out))
1111 if test x$DMEVENTD = xyes; then
1112 AC_CHECK_HEADERS(arpa/inet.h,,AC_MSG_ERROR(bailing out))
1115 if test x$HAVE_LIBDL = xyes; then
1116 AC_CHECK_HEADERS(dlfcn.h,,AC_MSG_ERROR(bailing out))
1119 if test x$INTL = xyes; then
1120 AC_CHECK_HEADERS(libintl.h,,AC_MSG_ERROR(bailing out))
1123 if test x$UDEV_SYNC = xyes; then
1124 AC_CHECK_HEADERS(sys/ipc.h sys/sem.h,,AC_MSG_ERROR(bailing out))
1127 ################################################################################
1128 AC_PATH_PROG(MODPROBE_CMD, modprobe)
1130 if test x$MODPROBE_CMD != x; then
1131 AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
1135 lvm_exec_prefix=$exec_prefix
1136 test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$prefix
1137 test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$ac_default_prefix
1138 AC_DEFINE_UNQUOTED(LVM_PATH, ["$lvm_exec_prefix/sbin/lvm"], [Path to lvm binary.])
1140 if test "$CLVMD" != none; then
1141 clvmd_prefix=$ac_default_prefix
1142 test "$prefix" != NONE && clvmd_prefix=$prefix
1143 AC_DEFINE_UNQUOTED(CLVMD_PATH, ["$clvmd_prefix/sbin/clvmd"],
1144 [Path to clvmd binary.])
1147 ################################################################################
1148 dnl -- dmeventd pidfile and executable path
1149 if test "$BUILD_DMEVENTD" = yes; then
1150 AC_ARG_WITH(dmeventd-pidfile,
1151 AC_HELP_STRING([--with-dmeventd-pidfile=PATH],
1152 [dmeventd pidfile [[/var/run/dmeventd.pid]]]),
1153 DMEVENTD_PIDFILE=$withval,
1154 DMEVENTD_PIDFILE="/var/run/dmeventd.pid")
1155 AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE, ["$DMEVENTD_PIDFILE"],
1156 [Path to dmeventd pidfile.])
1159 if test "$BUILD_DMEVENTD" = yes; then
1160 AC_ARG_WITH(dmeventd-path,
1161 AC_HELP_STRING([--with-dmeventd-path=PATH],
1162 [dmeventd path [[EPREFIX/sbin/dmeventd]]]),
1163 DMEVENTD_PATH=$withval,
1164 DMEVENTD_PATH="$lvm_exec_prefix/sbin/dmeventd")
1165 AC_DEFINE_UNQUOTED(DMEVENTD_PATH, ["$DMEVENTD_PATH"],
1166 [Path to dmeventd binary.])
1169 AH_TEMPLATE(DEFAULT_RUN_DIR, [Name of default run directory.])
1170 AC_ARG_WITH(default-run-dir,
1171 [ --with-default-run-dir=DIR Default run directory [[/var/run/lvm]] ],
1172 [ DEFAULT_RUN_DIR="$withval" ],
1173 [ DEFAULT_RUN_DIR="/var/run/lvm" ])
1174 AC_DEFINE_UNQUOTED(DEFAULT_RUN_DIR,["$DEFAULT_RUN_DIR"] )
1176 ################################################################################
1177 dnl -- various defaults
1178 AC_ARG_WITH(default-system-dir,
1179 AC_HELP_STRING([--with-default-system-dir=DIR],
1180 [default LVM system directory [[/etc/lvm]]]),
1181 DEFAULT_SYS_DIR=$withval, DEFAULT_SYS_DIR="/etc/lvm")
1182 AC_DEFINE_UNQUOTED(DEFAULT_SYS_DIR, ["$DEFAULT_SYS_DIR"],
1183 [Path to LVM system directory.])
1185 AC_ARG_WITH(default-archive-subdir,
1186 AC_HELP_STRING([--with-default-archive-subdir=SUBDIR],
1187 [default metadata archive subdir [[archive]]]),
1188 DEFAULT_ARCHIVE_SUBDIR=$withval, DEFAULT_ARCHIVE_SUBDIR=archive)
1189 AC_DEFINE_UNQUOTED(DEFAULT_ARCHIVE_SUBDIR, ["$DEFAULT_ARCHIVE_SUBDIR"],
1190 [Name of default metadata archive subdirectory.])
1192 AC_ARG_WITH(default-backup-subdir,
1193 AC_HELP_STRING([--with-default-backup-subdir=SUBDIR],
1194 [default metadata backup subdir [[backup]]]),
1195 DEFAULT_BACKUP_SUBDIR=$withval, DEFAULT_BACKUP_SUBDIR=backup)
1196 AC_DEFINE_UNQUOTED(DEFAULT_BACKUP_SUBDIR, ["$DEFAULT_BACKUP_SUBDIR"],
1197 [Name of default metadata backup subdirectory.])
1199 AC_ARG_WITH(default-cache-subdir,
1200 AC_HELP_STRING([--with-default-cache-subdir=SUBDIR],
1201 [default metadata cache subdir [[cache]]]),
1202 DEFAULT_CACHE_SUBDIR=$withval, DEFAULT_CACHE_SUBDIR=cache)
1203 AC_DEFINE_UNQUOTED(DEFAULT_CACHE_SUBDIR, ["$DEFAULT_CACHE_SUBDIR"],
1204 [Name of default metadata cache subdirectory.])
1206 AC_ARG_WITH(default-locking-dir,
1207 AC_HELP_STRING([--with-default-locking-dir=DIR],
1208 [default locking directory [[/var/lock/lvm]]]),
1209 DEFAULT_LOCK_DIR=$withval, DEFAULT_LOCK_DIR="/var/lock/lvm")
1210 AC_DEFINE_UNQUOTED(DEFAULT_LOCK_DIR, ["$DEFAULT_LOCK_DIR"],
1211 [Name of default locking directory.])
1213 ################################################################################
1214 dnl -- Setup default data alignment
1215 AC_ARG_WITH(default-data-alignment,
1216 AC_HELP_STRING([--with-default-data-alignment=NUM],
1217 [set the default data alignment in MiB [[1]]]),
1218 DEFAULT_DATA_ALIGNMENT=$withval, DEFAULT_DATA_ALIGNMENT=1)
1219 AC_DEFINE_UNQUOTED(DEFAULT_DATA_ALIGNMENT, [$DEFAULT_DATA_ALIGNMENT],
1220 [Default data alignment.])
1222 ################################################################################
1223 dnl -- which kernel interface to use (ioctl only)
1224 AC_MSG_CHECKING(for kernel interface choice)
1225 AC_ARG_WITH(interface,
1226 AC_HELP_STRING([--with-interface=IFACE],
1227 [choose kernel interface (ioctl) [[ioctl]]]),
1228 interface=$withval, interface=ioctl)
1229 if [[ "x$interface" != xioctl ]];
1231 AC_MSG_ERROR(--with-interface=ioctl required. fs no longer supported.)
1233 AC_MSG_RESULT($interface)
1235 ################################################################################
1236 DM_LIB_VERSION="\"`cat "$srcdir"/VERSION_DM 2>/dev/null || echo Unknown`\""
1237 AC_DEFINE_UNQUOTED(DM_LIB_VERSION, $DM_LIB_VERSION, [Library version])
1239 DM_LIB_PATCHLEVEL=`cat "$srcdir"/VERSION_DM | $AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}'`
1241 LVM_VERSION="\"`cat "$srcdir"/VERSION 2>/dev/null || echo Unknown`\""
1243 VER=`cat "$srcdir"/VERSION`
1244 LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.* (//;s/).*//'`\""
1245 VER=`echo "$VER" | $AWK '{print $1}'`
1246 LVM_RELEASE="\"`echo "$VER" | $AWK -F '-' '{print $2}'`\""
1247 VER=`echo "$VER" | $AWK -F '-' '{print $1}'`
1248 LVM_MAJOR=`echo "$VER" | $AWK -F '.' '{print $1}'`
1249 LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'`
1250 LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[[(.]]' '{print $3}'`
1251 LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'`
1253 ################################################################################
1256 AC_SUBST(BUILD_CMIRRORD)
1257 AC_SUBST(BUILD_DMEVENTD)
1258 AC_SUBST(CCS_CFLAGS)
1263 AC_SUBST(CLDNOWHOLEARCHIVE)
1264 AC_SUBST(CLDWHOLEARCHIVE)
1267 AC_SUBST(CLVMD_CMANAGERS)
1268 AC_SUBST(CMAN_CFLAGS)
1271 AC_SUBST(CONFDB_CFLAGS)
1272 AC_SUBST(CONFDB_LIBS)
1274 AC_SUBST(COPTIMISE_FLAG)
1275 AC_SUBST(CPG_CFLAGS)
1277 AC_SUBST(CSCOPE_CMD)
1279 AC_SUBST(DEFAULT_SYS_DIR)
1280 AC_SUBST(DEFAULT_ARCHIVE_SUBDIR)
1281 AC_SUBST(DEFAULT_BACKUP_SUBDIR)
1282 AC_SUBST(DEFAULT_CACHE_SUBDIR)
1283 AC_SUBST(DEFAULT_DATA_ALIGNMENT)
1284 AC_SUBST(DEFAULT_LOCK_DIR)
1285 AC_SUBST(DEFAULT_RUN_DIR)
1287 AC_SUBST(DLM_CFLAGS)
1291 AC_SUBST(DMEVENTD_PATH)
1293 AC_SUBST(DM_DEVICE_GID)
1294 AC_SUBST(DM_DEVICE_MODE)
1295 AC_SUBST(DM_DEVICE_UID)
1297 AC_SUBST(DM_LIB_VERSION)
1298 AC_SUBST(DM_LIB_PATCHLEVEL)
1300 AC_SUBST(GULM_CFLAGS)
1302 AC_SUBST(HAVE_LIBDL)
1303 AC_SUBST(HAVE_REALTIME)
1305 AC_SUBST(INTL_PACKAGE)
1309 AC_SUBST(LIB_SUFFIX)
1312 AC_SUBST(LVM1_FALLBACK)
1313 AC_SUBST(LVM_VERSION)
1314 AC_SUBST(LVM_LIBAPI)
1317 AC_SUBST(LVM_PATCHLEVEL)
1318 AC_SUBST(LVM_RELEASE)
1319 AC_SUBST(LVM_RELEASE_DATE)
1321 AC_SUBST(REPLICATORS)
1325 AC_SUBST(PTHREAD_LIBS)
1326 AC_SUBST(QUORUM_CFLAGS)
1327 AC_SUBST(QUORUM_LIBS)
1328 AC_SUBST(READLINE_LIBS)
1329 AC_SUBST(SACKPT_CFLAGS)
1330 AC_SUBST(SACKPT_LIBS)
1331 AC_SUBST(SALCK_CFLAGS)
1332 AC_SUBST(SALCK_LIBS)
1333 AC_SUBST(SELINUX_LIBS)
1334 AC_SUBST(SELINUX_PC)
1337 AC_SUBST(STATIC_LINK)
1341 AC_SUBST(UDEV_RULES)
1343 AC_SUBST(WRITE_INSTALL)
1346 AC_SUBST(missingkernel)
1349 AC_SUBST(udev_prefix)
1352 AC_SUBST(usrsbindir)
1354 ################################################################################
1355 dnl -- First and last lines should not contain files to generate in order to
1356 dnl -- keep utility scripts running properly
1361 daemons/clvmd/Makefile
1362 daemons/cmirrord/Makefile
1363 daemons/dmeventd/Makefile
1364 daemons/dmeventd/libdevmapper-event.pc
1365 daemons/dmeventd/plugins/Makefile
1366 daemons/dmeventd/plugins/lvm2/Makefile
1367 daemons/dmeventd/plugins/mirror/Makefile
1368 daemons/dmeventd/plugins/snapshot/Makefile
1374 lib/format1/Makefile
1375 lib/format_pool/Makefile
1376 lib/locking/Makefile
1378 lib/replicator/Makefile
1379 lib/misc/lvm-version.h
1380 lib/snapshot/Makefile
1382 libdm/libdevmapper.pc
1384 liblvm/liblvm2app.pc
1387 scripts/clvmd_init_red_hat
1388 scripts/cmirrord_init_red_hat
1389 scripts/lvm2_monitoring_init_red_hat
1395 unit-tests/datastruct/Makefile
1396 unit-tests/regex/Makefile
1397 unit-tests/mm/Makefile
1401 if test x$ODIRECT != xyes; then
1402 AC_MSG_WARN(Warning: O_DIRECT disabled: low-memory pvmove may lock up)