1
###############################################################################
2
## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
3
## Copyright (C) 2004-2011 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_CHECK_FUNCS([ftruncate gethostname getpagesize \
129
gettimeofday memset mkdir mkfifo rmdir munmap nl_langinfo setenv setlocale \
130
strcasecmp strchr strcspn strspn strdup strncasecmp strerror strrchr \
131
strstr strtol strtoul uname], , [AC_MSG_ERROR(bailing out)])
132
AC_CHECK_FUNCS(siginterrupt)
134
AC_FUNC_CLOSEDIR_VOID
146
################################################################################
147
dnl -- Enables statically-linked tools
148
AC_MSG_CHECKING(whether to use static linking)
149
AC_ARG_ENABLE(static_link,
150
AC_HELP_STRING([--enable-static_link],
151
[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)
156
################################################################################
157
dnl -- Prefix is /usr by default, the exec_prefix default is setup later
158
AC_PREFIX_DEFAULT(/usr)
160
################################################################################
161
dnl -- Setup the ownership of the files
162
AC_MSG_CHECKING(file owner)
164
AC_HELP_STRING([--with-user=USER],
165
[set the owner of installed files [[USER=]]]),
167
AC_MSG_RESULT($OWNER)
169
if test x$OWNER != x; then
170
INSTALL="$INSTALL -o $OWNER"
173
################################################################################
174
dnl -- Setup the group ownership of the files
175
AC_MSG_CHECKING(group owner)
177
AC_HELP_STRING([--with-group=GROUP],
178
[set the group owner of installed files [[GROUP=]]]),
180
AC_MSG_RESULT($GROUP)
182
if test x$GROUP != x; then
183
INSTALL="$INSTALL -g $GROUP"
186
################################################################################
187
dnl -- Setup device node ownership
188
AC_MSG_CHECKING(device node uid)
190
AC_ARG_WITH(device-uid,
191
AC_HELP_STRING([--with-device-uid=UID],
192
[set the owner used for new device nodes [[UID=0]]]),
193
DM_DEVICE_UID=$withval, DM_DEVICE_UID=0)
194
AC_MSG_RESULT($DM_DEVICE_UID)
196
################################################################################
197
dnl -- Setup device group ownership
198
AC_MSG_CHECKING(device node gid)
200
AC_ARG_WITH(device-gid,
201
AC_HELP_STRING([--with-device-gid=GID],
202
[set the group used for new device nodes [[GID=0]]]),
203
DM_DEVICE_GID=$withval, DM_DEVICE_GID=0)
204
AC_MSG_RESULT($DM_DEVICE_GID)
206
################################################################################
207
dnl -- Setup device mode
208
AC_MSG_CHECKING(device node mode)
210
AC_ARG_WITH(device-mode,
211
AC_HELP_STRING([--with-device-mode=MODE],
212
[set the mode used for new device nodes [[MODE=0600]]]),
213
DM_DEVICE_MODE=$withval, DM_DEVICE_MODE=0600)
214
AC_MSG_RESULT($DM_DEVICE_MODE)
216
AC_MSG_CHECKING(when to create device nodes)
217
AC_ARG_WITH(device-nodes-on,
218
AC_HELP_STRING([--with-device-nodes-on=ON],
219
[create nodes on resume or create [[ON=resume]]]),
220
ADD_NODE=$withval, ADD_NODE=resume)
222
resume) add_on=DM_ADD_NODE_ON_RESUME;;
223
create) add_on=DM_ADD_NODE_ON_CREATE;;
224
*) AC_MSG_ERROR([--with-device-nodes-on parameter invalid]);;
226
AC_MSG_RESULT(on $ADD_NODE)
227
AC_DEFINE_UNQUOTED([DEFAULT_DM_ADD_NODE], $add_on, [Define default node creation behavior with dmsetup create])
229
################################################################################
230
dnl -- LVM1 tool fallback option
231
AC_MSG_CHECKING(whether to enable lvm1 fallback)
232
AC_ARG_ENABLE(lvm1_fallback,
233
AC_HELP_STRING([--enable-lvm1_fallback],
234
[use this to fall back and use LVM1 binaries if
235
device-mapper is missing from the kernel]),
236
LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no)
237
AC_MSG_RESULT($LVM1_FALLBACK)
239
if test x$LVM1_FALLBACK = xyes; then
240
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])
243
################################################################################
244
dnl -- format1 inclusion type
245
AC_MSG_CHECKING(whether to include support for lvm1 metadata)
247
AC_HELP_STRING([--with-lvm1=TYPE],
248
[LVM1 metadata support: internal/shared/none
250
LVM1=$withval, LVM1=internal)
253
if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]];
255
--with-lvm1 parameter invalid
259
if test x$LVM1 = xinternal; then
260
AC_DEFINE([LVM1_INTERNAL], 1, [Define to 1 to include built-in support for LVM1 metadata.])
263
################################################################################
264
dnl -- format_pool inclusion type
265
AC_MSG_CHECKING(whether to include support for GFS pool metadata)
267
AC_HELP_STRING([--with-pool=TYPE],
268
[GFS pool read-only support: internal/shared/none
270
POOL=$withval, POOL=internal)
273
if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]];
275
--with-pool parameter invalid
279
if test x$POOL = xinternal; then
280
AC_DEFINE([POOL_INTERNAL], 1, [Define to 1 to include built-in support for GFS pool metadata.])
283
################################################################################
284
dnl -- cluster_locking inclusion type
285
AC_MSG_CHECKING(whether to include support for cluster locking)
287
AC_HELP_STRING([--with-cluster=TYPE],
288
[cluster LVM locking support: internal/shared/none
291
AC_MSG_RESULT($CLUSTER)
293
if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]];
295
--with-cluster parameter invalid
299
if test x$CLUSTER = xinternal; then
300
AC_DEFINE([CLUSTER_LOCKING_INTERNAL], 1, [Define to 1 to include built-in support for clustered LVM locking.])
303
################################################################################
304
dnl -- snapshots inclusion type
305
AC_MSG_CHECKING(whether to include snapshots)
306
AC_ARG_WITH(snapshots,
307
AC_HELP_STRING([--with-snapshots=TYPE],
308
[snapshot support: internal/shared/none
310
SNAPSHOTS=$withval, SNAPSHOTS=internal)
311
AC_MSG_RESULT($SNAPSHOTS)
313
if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]];
315
--with-snapshots parameter invalid
319
if test x$SNAPSHOTS = xinternal; then
320
AC_DEFINE([SNAPSHOT_INTERNAL], 1, [Define to 1 to include built-in support for snapshots.])
323
################################################################################
324
dnl -- mirrors inclusion type
325
AC_MSG_CHECKING(whether to include mirrors)
327
AC_HELP_STRING([--with-mirrors=TYPE],
328
[mirror support: internal/shared/none
330
MIRRORS=$withval, MIRRORS=internal)
331
AC_MSG_RESULT($MIRRORS)
333
if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]];
335
--with-mirrors parameter invalid
339
if test x$MIRRORS = xinternal; then
340
AC_DEFINE([MIRRORED_INTERNAL], 1, [Define to 1 to include built-in support for mirrors.])
343
################################################################################
344
dnl -- raid inclusion type
345
AC_MSG_CHECKING(whether to include raid)
347
AC_HELP_STRING([--with-raid=TYPE],
348
[mirror support: internal/shared/none
350
RAID=$withval, RAID=internal)
353
if [[ "x$RAID" != xnone -a "x$RAID" != xinternal -a "x$RAID" != xshared ]];
355
--with-raid parameter invalid
359
if test x$RAID = xinternal; then
360
AC_DEFINE([RAID_INTERNAL], 1, [Define to 1 to include built-in support for raid.])
363
################################################################################
364
dnl -- asynchronous volume replicator inclusion type
365
AC_MSG_CHECKING(whether to include replicators)
366
AC_ARG_WITH(replicators,
367
AC_HELP_STRING([--with-replicators=TYPE],
368
[replicator support: internal/shared/none
370
REPLICATORS=$withval, REPLICATORS=none)
371
AC_MSG_RESULT($REPLICATORS)
373
case "$REPLICATORS" in
375
internal) AC_DEFINE([REPLICATOR_INTERNAL], 1,
376
[Define to 1 to include built-in support for replicators.]) ;;
377
*) AC_MSG_ERROR([--with-replicators parameter invalid ($REPLICATORS)]) ;;
380
################################################################################
381
dnl -- Disable readline
382
AC_MSG_CHECKING(whether to enable readline)
383
AC_ARG_ENABLE([readline],
384
AC_HELP_STRING([--disable-readline], [disable readline support]),
385
READLINE=$enableval, READLINE=maybe)
386
AC_MSG_RESULT($READLINE)
388
################################################################################
389
dnl -- Disable realtime clock support
390
AC_MSG_CHECKING(whether to enable realtime support)
391
AC_ARG_ENABLE(realtime,
392
AC_HELP_STRING([--enable-realtime], [enable realtime clock support]),
394
AC_MSG_RESULT($REALTIME)
396
################################################################################
397
dnl -- disable OCF resource agents
398
AC_MSG_CHECKING(whether to enable OCF resource agents)
400
AC_HELP_STRING([--enable-ocf],
401
[enable Open Cluster Framework (OCF) compliant resource agents]),
402
OCF=$enableval, OCF=no)
405
AC_HELP_STRING([--with-ocfdir=DIR],
406
[install OCF files in DIR [[PREFIX/lib/ocf/resource.d/lvm2]]]),
407
OCFDIR=$withval, OCFDIR='${prefix}/lib/ocf/resource.d/lvm2')
409
################################################################################
410
dnl -- Init pkg-config with dummy invokation:
411
dnl -- this is required because PKG_CHECK_MODULES macro is expanded
412
dnl -- to initialize the pkg-config environment only at the first invokation,
413
dnl -- that would be conditional in this configure.in.
415
PKG_CHECK_MODULES(PKGCONFIGINIT, pkgconfiginit, [],
416
[AC_MSG_RESULT([pkg-config initialized])])
420
################################################################################
421
dnl -- Build cluster LVM daemon
422
AC_MSG_CHECKING(whether to build cluster LVM daemon)
424
[ --with-clvmd=TYPE build cluster LVM Daemon
425
The following cluster manager combinations are valid:
426
* cman (RHEL5 or equivalent)
427
* cman,corosync,openais (or selection of them)
428
* singlenode (localhost only)
430
* none (disable build)
432
CLVMD=$withval, CLVMD=none)
433
if test x$CLVMD = xyes; then
436
AC_MSG_RESULT($CLVMD)
438
dnl -- If clvmd enabled without cluster locking, automagically include it
439
if test x$CLVMD != xnone && test x$CLUSTER = xnone; then
443
dnl -- init pkgconfig if required
444
if test x$CLVMD != xnone && test x$PKGCONFIG_INIT != x1; then
448
dnl -- Express clvmd init script Required-Start / Required-Stop
450
dnl -- On RHEL4/RHEL5, qdiskd is started from a separate init script.
451
dnl -- Enable if we are build for cman.
452
CLVMD_NEEDS_QDISKD=no
454
dnl -- define build types
455
if [[ `expr x"$CLVMD" : '.*gulm.*'` != 0 ]]; then
456
AC_MSG_ERROR([Since version 2.02.87 GULM locking is no longer supported.]);
458
if [[ `expr x"$CLVMD" : '.*cman.*'` != 0 ]]; then
460
CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman"
461
CLVMD_NEEDS_QDISKD=yes
463
if [[ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then
465
CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync"
467
if [[ `expr x"$CLVMD" : '.*openais.*'` != 0 ]]; then
469
CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais"
471
if test x$CLVMD_NEEDS_QDISKD != xno; then
472
CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd"
475
dnl -- define a soft bailout if we are autodetecting
481
AC_MSG_ERROR([bailing out])
484
dnl -- if clvmd=all then set soft_bailout (we don't want to error)
485
dnl -- and set all builds to yes. We need to do this here
486
dnl -- to skip the openais|corosync sanity check above.
487
if test x$CLVMD = xall; then
496
dnl -- helper macro to check libs without adding them to LIBS
497
check_lib_no_libs() {
503
AC_CHECK_LIB([$lib_no_libs_arg1],
504
[$lib_no_libs_arg2],,
507
LIBS=$ac_check_lib_save_LIBS
510
dnl -- Look for cman libraries if required.
511
if test x$BUILDCMAN = xyes; then
512
PKG_CHECK_MODULES(CMAN, libcman, [HAVE_CMAN=yes],
514
AC_CHECK_HEADERS(libcman.h,,$bailout)
515
check_lib_no_libs cman cman_init
516
if test $NOTFOUND = 0; then
517
AC_MSG_RESULT([no pkg for libcman, using -lcman])
525
dnl -- Look for corosync that's required also for openais build
526
dnl -- only enough recent version of corosync ship pkg-config files.
527
dnl -- We can safely rely on that to detect the correct bits.
528
if test x$BUILDCOROSYNC = xyes || \
529
test x$BUILDOPENAIS = xyes; then
530
PKG_CHECK_MODULES(COROSYNC, corosync, [HAVE_COROSYNC=yes], $bailout)
534
dnl -- Look for corosync libraries if required.
535
if test x$BUILDCOROSYNC = xyes; then
536
PKG_CHECK_MODULES(QUORUM, libquorum, [HAVE_QUORUM=yes], $bailout)
541
dnl -- Look for openais libraries if required.
542
if test x$BUILDOPENAIS = xyes; then
543
PKG_CHECK_MODULES(SALCK, libSaLck, [HAVE_SALCK=yes], $bailout)
547
dnl -- Below are checks for libraries common to more than one build.
549
dnl -- Check confdb library.
550
dnl -- mandatory for corosync build.
551
dnl -- optional for openais/cman build.
553
if test x$CHECKCONFDB = xyes; then
554
PKG_CHECK_MODULES(CONFDB, libconfdb,
558
AC_CHECK_HEADERS(corosync/confdb.h,
562
if test x$HAVE_CONFDB != xyes && \
563
test x$HAVE_CONFDB_H = xyes; then
564
check_lib_no_libs confdb confdb_initialize
565
AC_MSG_RESULT([no pkg for confdb, using -lconfdb])
566
CONFDB_LIBS="-lconfdb"
570
if test x$BUILDCOROSYNC = xyes && \
571
test x$HAVE_CONFDB != xyes &&
572
test x$CLVMD != xall; then
573
AC_MSG_ERROR([bailing out... confdb library is required])
577
dnl -- Check cpg library.
578
if test x$CHECKCPG = xyes; then
579
PKG_CHECK_MODULES(CPG, libcpg, [HAVE_CPG=yes], $bailout)
582
dnl -- Check dlm library.
583
if test x$CHECKDLM = xyes; then
584
PKG_CHECK_MODULES(DLM, libdlm, [HAVE_DLM=yes],
586
AC_CHECK_HEADERS(libdlm.h,,$bailout)
587
check_lib_no_libs dlm dlm_lock -lpthread
588
if test $NOTFOUND = 0; then
589
AC_MSG_RESULT([no pkg for libdlm, using -ldlm])
590
DLM_LIBS="-ldlm -lpthread"
595
dnl -- If we are autodetecting, we need to re-create
596
dnl -- the depedencies checks and set a proper CLVMD,
597
dnl -- together with init script Required-Start/Stop entries.
598
if test x$CLVMD = xall; then
601
CLVMD_NEEDS_QDISKD=no
602
if test x$HAVE_CMAN = xyes && \
603
test x$HAVE_DLM = xyes; then
604
AC_MSG_RESULT([Enabling clvmd cman cluster manager])
606
CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman"
607
CLVMD_NEEDS_QDISKD=yes
609
if test x$HAVE_COROSYNC = xyes && \
610
test x$HAVE_QUORUM = xyes && \
611
test x$HAVE_CPG = xyes && \
612
test x$HAVE_DLM = xyes && \
613
test x$HAVE_CONFDB = xyes; then
614
AC_MSG_RESULT([Enabling clvmd corosync cluster manager])
615
CLVMD="$CLVMD,corosync"
616
CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync"
618
if test x$HAVE_COROSYNC = xyes && \
619
test x$HAVE_CPG = xyes && \
620
test x$HAVE_SALCK = xyes; then
621
AC_MSG_RESULT([Enabling clvmd openais cluster manager])
622
CLVMD="$CLVMD,openais"
623
CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais"
625
if test x$CLVMD_NEEDS_QDISKD != xno; then
626
CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd"
628
if test x$CLVMD = xnone; then
629
AC_MSG_RESULT([Disabling clvmd build. No cluster manager detected.])
633
################################################################################
635
if test "x$CLVMD" != xnone; then
636
AC_ARG_WITH(clvmd-pidfile,
637
AC_HELP_STRING([--with-clvmd-pidfile=PATH],
638
[clvmd pidfile [[/var/run/clvmd.pid]]]),
639
CLVMD_PIDFILE=$withval,
640
CLVMD_PIDFILE="/var/run/clvmd.pid")
641
AC_DEFINE_UNQUOTED(CLVMD_PIDFILE, ["$CLVMD_PIDFILE"],
642
[Path to clvmd pidfile.])
645
################################################################################
646
dnl -- Build cluster mirror log daemon
647
AC_MSG_CHECKING(whether to build cluster mirror log daemon)
648
AC_ARG_ENABLE(cmirrord,
649
AC_HELP_STRING([--enable-cmirrord],
650
[enable the cluster mirror log daemon]),
651
CMIRRORD=$enableval, CMIRRORD=no)
652
AC_MSG_RESULT($CMIRRORD)
654
BUILD_CMIRRORD=$CMIRRORD
656
################################################################################
657
dnl -- cmirrord pidfile
658
if test "x$BUILD_CMIRRORD" = xyes; then
659
AC_ARG_WITH(cmirrord-pidfile,
660
AC_HELP_STRING([--with-cmirrord-pidfile=PATH],
661
[cmirrord pidfile [[/var/run/cmirrord.pid]]]),
662
CMIRRORD_PIDFILE=$withval,
663
CMIRRORD_PIDFILE="/var/run/cmirrord.pid")
664
AC_DEFINE_UNQUOTED(CMIRRORD_PIDFILE, ["$CMIRRORD_PIDFILE"],
665
[Path to cmirrord pidfile.])
668
################################################################################
669
dnl -- Look for corosync libraries if required.
670
if [[ "x$BUILD_CMIRRORD" = xyes ]]; then
671
dnl -- init pkgconfig if required
672
if test x$PKGCONFIG_INIT != x1; then
675
PKG_CHECK_MODULES(SACKPT, libSaCkpt)
676
if test x$HAVE_CPG != xyes; then
677
PKG_CHECK_MODULES(CPG, libcpg)
681
################################################################################
682
dnl -- Enable debugging
683
AC_MSG_CHECKING(whether to enable debugging)
684
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable debugging]),
685
DEBUG=$enableval, DEBUG=no)
686
AC_MSG_RESULT($DEBUG)
688
dnl -- Normally turn off optimisation for debug builds
689
if test x$DEBUG = xyes; then
695
################################################################################
696
dnl -- Override optimisation
697
AC_MSG_CHECKING(for C optimisation flag)
698
AC_ARG_WITH(optimisation,
699
AC_HELP_STRING([--with-optimisation=OPT],
700
[C optimisation flag [[OPT=-O2]]]),
701
COPTIMISE_FLAG=$withval)
702
AC_MSG_RESULT($COPTIMISE_FLAG)
704
################################################################################
705
dnl -- Enable profiling
706
AC_MSG_CHECKING(whether to gather gcov profiling data)
707
AC_ARG_ENABLE(profiling,
708
AC_HELP_STRING(--enable-profiling, [gather gcov profiling data]),
709
PROFILING=$enableval, PROFILING=no)
710
AC_MSG_RESULT($PROFILING)
712
if test "x$PROFILING" = xyes; then
713
COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage"
714
AC_PATH_PROG(LCOV, lcov)
715
AC_PATH_PROG(GENHTML, genhtml)
716
if test -z "$LCOV" -o -z "$GENHTML"; then
717
AC_MSG_ERROR([lcov and genhtml are required for profiling])
719
AC_PATH_PROG(GENPNG, genpng)
720
if test -n "$GENPNG"; then
721
AC_MSG_CHECKING([whether $GENPNG has all required modules])
722
if $GENPNG --help > /dev/null 2>&1 ; then
724
GENHTML="$GENHTML --frames"
726
AC_MSG_RESULT(not supported)
727
AC_MSG_WARN([GD.pm perl module is not installed])
733
################################################################################
734
dnl -- Enable testing
735
AC_MSG_CHECKING(whether to enable unit testing)
736
AC_ARG_ENABLE(testing,
737
AC_HELP_STRING(--enable-testing, [enable testing targets in the makefile]),
738
TESTING=$enableval, TESTING=no)
739
AC_MSG_RESULT($TESTING)
741
if test "$TESTING" = yes; then
742
AC_PATH_PROG(RUBY19, ruby1.9)
743
AC_PATH_PROG(VALGRIND, valgrind)
744
if test -z "$RUBY19" -o -z "$VALGRIND"; then
745
AC_MSG_ERROR([ruby1.9 and valgrind are required for testing])
749
################################################################################
750
dnl -- Enable valgrind awareness of memory pools
751
AC_MSG_CHECKING(whether to enable valgrind awareness of pools)
752
AC_ARG_ENABLE(valgrind_pool,
753
AC_HELP_STRING(--enable-valgrind-pool, [enable valgrind awareness of pools]),
754
VALGRIND_POOL=$enableval, VALGRIND_POOL=no)
755
AC_MSG_RESULT($VALGRIND_POOL)
757
if test "$VALGRIND_POOL" = yes; then
758
AC_CHECK_HEADERS([valgrind/memcheck.h], , [AC_MSG_ERROR(bailing out)])
759
AC_DEFINE([VALGRIND_POOL], 1, [Enable a valgrind aware build of pool])
762
################################################################################
763
dnl -- Disable devmapper
764
AC_MSG_CHECKING(whether to use device-mapper)
765
AC_ARG_ENABLE(devmapper,
766
AC_HELP_STRING([--disable-devmapper],
767
[disable LVM2 device-mapper interaction]),
768
DEVMAPPER=$enableval)
769
AC_MSG_RESULT($DEVMAPPER)
771
if test x$DEVMAPPER = xyes; then
772
AC_DEFINE([DEVMAPPER_SUPPORT], 1, [Define to 1 to enable LVM2 device-mapper interaction.])
775
################################################################################
776
dnl -- Enable udev synchronisation
777
AC_MSG_CHECKING(whether to enable synchronisation with udev processing)
778
AC_ARG_ENABLE(udev_sync,
779
AC_HELP_STRING([--enable-udev_sync],
780
[enable synchronisation with udev processing]),
781
UDEV_SYNC=$enableval, UDEV_SYNC=no)
782
AC_MSG_RESULT($UDEV_SYNC)
784
if test x$UDEV_SYNC = xyes; then
785
dnl -- init pkgconfig if required
786
if test x$PKGCONFIG_INIT != x1; then
789
PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
790
AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
793
dnl -- Enable udev rules
794
AC_MSG_CHECKING(whether to enable installation of udev rules required for synchronisation)
795
AC_ARG_ENABLE(udev_rules,
796
AC_HELP_STRING([--enable-udev_rules],
797
[install rule files needed for udev synchronisation]),
798
UDEV_RULES=$enableval, UDEV_RULES=$UDEV_SYNC)
799
AC_MSG_RESULT($UDEV_RULES)
801
################################################################################
802
dnl -- Compatibility mode
803
AC_ARG_ENABLE(compat,
804
AC_HELP_STRING([--enable-compat],
805
[enable support for old device-mapper versions]),
806
DM_COMPAT=$enableval, DM_COMPAT=no)
808
if test x$DM_COMPAT = xyes; then
810
[--enable-compat is not currently supported.
811
Since device-mapper version 1.02.66, only one version (4) of the device-mapper
812
ioctl protocol is supported.]
816
################################################################################
817
dnl -- Compatible units suffix mode
818
AC_ARG_ENABLE(units-compat,
819
AC_HELP_STRING([--enable-units-compat],
820
[enable output compatibility with old versions that
821
that do not use KiB-style unit suffixes]),
822
UNITS_COMPAT=$enableval, UNITS_COMPAT=no)
824
if test x$UNITS_COMPAT = xyes; then
825
AC_DEFINE([DEFAULT_SI_UNIT_CONSISTENCY], 0, [Define to 0 to reinstate the pre-2.02.54 handling of unit suffixes.])
828
################################################################################
831
AC_HELP_STRING([--disable-driver],
832
[disable calls to device-mapper in the kernel]),
833
DM_IOCTLS=$enableval)
835
################################################################################
836
dnl -- Disable O_DIRECT
837
AC_MSG_CHECKING(whether to enable O_DIRECT)
838
AC_ARG_ENABLE(o_direct,
839
AC_HELP_STRING([--disable-o_direct], [disable O_DIRECT]),
841
AC_MSG_RESULT($ODIRECT)
843
if test x$ODIRECT = xyes; then
844
AC_DEFINE([O_DIRECT_SUPPORT], 1, [Define to 1 to enable O_DIRECT support.])
847
################################################################################
848
dnl -- Enable liblvm2app.so
849
AC_MSG_CHECKING(whether to build liblvm2app.so application library)
850
AC_ARG_ENABLE(applib,
851
AC_HELP_STRING([--enable-applib], [build application library]),
852
APPLIB=$enableval, APPLIB=no)
853
AC_MSG_RESULT($APPLIB)
854
AC_SUBST([LVM2APP_LIB])
855
test x$APPLIB = xyes \
856
&& LVM2APP_LIB=-llvm2app \
859
################################################################################
861
AC_MSG_CHECKING(whether to compile liblvm2cmd.so)
862
AC_ARG_ENABLE(cmdlib,
863
AC_HELP_STRING([--enable-cmdlib], [build shared command library]),
864
CMDLIB=$enableval, CMDLIB=no)
865
AC_MSG_RESULT($CMDLIB)
866
AC_SUBST([LVM2CMD_LIB])
867
test x$CMDLIB = xyes \
868
&& LVM2CMD_LIB=-llvm2cmd \
871
################################################################################
872
dnl -- Enable pkg-config
873
AC_ARG_ENABLE(pkgconfig,
874
AC_HELP_STRING([--enable-pkgconfig], [install pkgconfig support]),
875
PKGCONFIG=$enableval, PKGCONFIG=no)
877
################################################################################
878
dnl -- Enable installation of writable files by user
879
AC_ARG_ENABLE(write_install,
880
AC_HELP_STRING([--enable-write_install],
881
[install user writable files]),
882
WRITE_INSTALL=$enableval, WRITE_INSTALL=no)
884
################################################################################
886
AC_MSG_CHECKING(whether to install fsadm)
887
AC_ARG_ENABLE(fsadm, AC_HELP_STRING([--disable-fsadm], [disable fsadm]),
889
AC_MSG_RESULT($FSADM)
891
################################################################################
892
dnl -- enable dmeventd handling
893
AC_MSG_CHECKING(whether to use dmeventd)
894
AC_ARG_ENABLE(dmeventd, AC_HELP_STRING([--enable-dmeventd],
895
[enable the device-mapper event daemon]),
897
AC_MSG_RESULT($DMEVENTD)
899
BUILD_DMEVENTD=$DMEVENTD
901
dnl -- dmeventd currently requires internal mirror support
902
if test x$DMEVENTD = xyes; then
903
if test x$MIRRORS != xinternal; then
905
--enable-dmeventd currently requires --with-mirrors=internal
908
if test x$CMDLIB = xno; then
910
--enable-dmeventd requires --enable-cmdlib to be used as well
915
if test x$DMEVENTD = xyes; then
916
AC_DEFINE([DMEVENTD], 1, [Define to 1 to enable the device-mapper event daemon.])
919
################################################################################
920
dnl -- getline included in recent libc
922
AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1,
923
[Define to 1 if getline is available.]))
925
################################################################################
926
dnl -- canonicalize_file_name included in recent libc
928
AC_CHECK_LIB(c, canonicalize_file_name,
929
AC_DEFINE([HAVE_CANONICALIZE_FILE_NAME], 1,
930
[Define to 1 if canonicalize_file_name is available.]))
932
################################################################################
933
dnl -- Clear default exec_prefix - install into /sbin rather than /usr/sbin
934
if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
938
################################################################################
939
dnl -- Check for dlopen
940
AC_CHECK_LIB(dl, dlopen, [
941
AC_DEFINE([HAVE_LIBDL], 1, [Define to 1 if dynamic libraries are available.])
947
################################################################################
948
dnl -- Check for shared/static conflicts
949
if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \
950
-o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \
951
-o "x$RAID" = xshared \
952
\) -a "x$STATIC_LINK" = xyes ]];
954
Features cannot be 'shared' when building statically
958
################################################################################
959
if [[ "$DMEVENTD" = yes -o "$CLVMD" != none ]] ; then
960
AC_CHECK_LIB([pthread], [pthread_mutex_lock],
961
[PTHREAD_LIBS="-lpthread"], hard_bailout)
964
################################################################################
965
dnl -- Disable selinux
966
AC_MSG_CHECKING(whether to enable selinux support)
967
AC_ARG_ENABLE(selinux,
968
AC_HELP_STRING([--disable-selinux], [disable selinux support]),
970
AC_MSG_RESULT($SELINUX)
972
################################################################################
973
dnl -- Check for selinux
974
if test x$SELINUX = xyes; then
975
AC_CHECK_LIB([sepol], [sepol_check_context], [
976
AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
977
SELINUX_LIBS="-lsepol"])
979
AC_CHECK_LIB([selinux], [is_selinux_enabled], [
980
AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
981
AC_CHECK_HEADERS([selinux/label.h])
982
AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
983
SELINUX_LIBS="-lselinux $SELINUX_LIBS"
984
SELINUX_PC="libselinux"
985
HAVE_SELINUX=yes ], [
986
AC_MSG_WARN(Disabling selinux)
992
################################################################################
993
dnl -- Check for realtime clock support
994
if test x$REALTIME = xyes; then
995
AC_CHECK_LIB(rt, clock_gettime, HAVE_REALTIME=yes, HAVE_REALTIME=no)
997
if test x$HAVE_REALTIME = xyes; then
998
AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.])
1001
AC_MSG_WARN(Disabling realtime clock)
1005
################################################################################
1006
dnl -- Check for getopt
1007
AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.]))
1009
################################################################################
1010
dnl -- Check for readline (Shamelessly copied from parted 1.4.17)
1011
if test x$READLINE != xno; then
1012
lvm_saved_libs=$LIBS
1013
AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib],
1014
READLINE_LIBS=$ac_cv_search_tgetent, [
1015
if test "$READLINE" = yes; then
1017
[termcap could not be found which is required for the
1018
--enable-readline option (which is enabled by default). Either disable readline
1019
support with --disable-readline or download and install termcap from:
1020
ftp.gnu.org/gnu/termcap
1021
Note: if you are using precompiled packages you will also need the development
1022
package as well (which may be called termcap-devel or something similar).
1023
Note: (n)curses also seems to work as a substitute for termcap. This was
1024
not found either - but you could try installing that as well.])
1026
dnl -- Old systems may need extra termcap dependency explicitly in LIBS
1027
AC_CHECK_LIB([readline], [readline], [
1028
AC_DEFINE([READLINE_SUPPORT], 1,
1029
[Define to 1 to include the LVM readline shell.])
1030
dnl -- Try only with -lreadline and check for different symbol
1031
LIBS=$lvm_saved_libs
1032
AC_CHECK_LIB([readline], [rl_line_buffer],
1033
[ READLINE_LIBS="-lreadline" ], [
1034
AC_MSG_RESULT([linking -lreadline with $READLINE_LIBS needed])
1035
READLINE_LIBS="-lreadline $READLINE_LIBS"
1038
if test "$READLINE" = yes; then
1040
[GNU Readline could not be found which is required for the
1041
--enable-readline option (which is enabled by default). Either disable readline
1042
support with --disable-readline or download and install readline from:
1043
ftp.gnu.org/gnu/readline
1044
Note: if you are using precompiled packages you will also need the development
1045
package as well (which may be called readline-devel or something similar).])
1047
LIBS="$READLINE_LIBS $lvm_saved_libs"
1048
AC_CHECK_FUNCS([rl_completion_matches])
1049
LIBS=$lvm_saved_libs
1052
################################################################################
1053
dnl -- Internationalisation stuff
1054
AC_MSG_CHECKING(whether to enable internationalisation)
1056
AC_HELP_STRING([--enable-nls], [enable Native Language Support]),
1057
INTL=$enableval, INTL=no)
1058
AC_MSG_RESULT($INTL)
1060
if test x$INTL = xyes; then
1061
# FIXME - Move this - can be device-mapper too
1063
AC_PATH_PROG(MSGFMT, msgfmt)
1064
if [[ "x$MSGFMT" == x ]];
1066
msgfmt not found in path $PATH
1070
AC_ARG_WITH(localedir,
1071
AC_HELP_STRING([--with-localedir=DIR],
1072
[translation files in DIR
1073
[[PREFIX/share/locale]]]),
1074
LOCALEDIR=$withval, LOCALEDIR='${prefix}/share/locale')
1077
################################################################################
1078
AC_ARG_WITH(confdir,
1079
AC_HELP_STRING([--with-confdir=DIR],
1080
[configuration files in DIR [[/etc]]]),
1081
CONFDIR=$withval, CONFDIR="/etc")
1083
AC_ARG_WITH(staticdir,
1084
AC_HELP_STRING([--with-staticdir=DIR],
1085
[static binaries in DIR [[EPREFIX/sbin]]]),
1086
STATICDIR=$withval, STATICDIR='${exec_prefix}/sbin')
1088
AC_ARG_WITH(usrlibdir,
1089
AC_HELP_STRING([--with-usrlibdir=DIR],
1090
[usrlib in DIR [[PREFIX/lib]]]),
1091
usrlibdir=$withval, usrlibdir='${prefix}/lib')
1093
AC_ARG_WITH(usrsbindir,
1094
AC_HELP_STRING([--with-usrsbindir=DIR],
1095
[usrsbin executables in DIR [[PREFIX/sbin]]]),
1096
usrsbindir=$withval, usrsbindir='${prefix}/sbin')
1098
################################################################################
1099
AC_ARG_WITH(udev_prefix,
1100
AC_HELP_STRING([--with-udev-prefix=UPREFIX],
1101
[install udev rule files in UPREFIX [[EPREFIX]]]),
1102
udev_prefix=$withval, udev_prefix='${exec_prefix}')
1104
AC_ARG_WITH(udevdir,
1105
AC_HELP_STRING([--with-udevdir=DIR],
1106
[udev rules in DIR [[UPREFIX/lib/udev/rules.d]]]),
1107
udevdir=$withval, udevdir='${udev_prefix}/lib/udev/rules.d')
1109
################################################################################
1110
dnl -- Ensure additional headers required
1111
if test x$READLINE = xyes; then
1112
AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out))
1115
if test x$CLVMD != xnone; then
1116
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))
1117
AC_CHECK_FUNCS(dup2 getmntent memmove select socket,,AC_MSG_ERROR(bailing out))
1119
AC_FUNC_SELECT_ARGTYPES
1122
if test x$CLUSTER != xnone; then
1123
AC_CHECK_HEADERS(sys/socket.h sys/un.h,,AC_MSG_ERROR(bailing out))
1124
AC_CHECK_FUNCS(socket,,AC_MSG_ERROR(bailing out))
1127
if test x$DMEVENTD = xyes; then
1128
AC_CHECK_HEADERS(arpa/inet.h,,AC_MSG_ERROR(bailing out))
1131
if test x$HAVE_LIBDL = xyes; then
1132
AC_CHECK_HEADERS(dlfcn.h,,AC_MSG_ERROR(bailing out))
1135
if test x$INTL = xyes; then
1136
AC_CHECK_HEADERS(libintl.h,,AC_MSG_ERROR(bailing out))
1139
if test x$UDEV_SYNC = xyes; then
1140
AC_CHECK_HEADERS(sys/ipc.h sys/sem.h,,AC_MSG_ERROR(bailing out))
1143
################################################################################
1144
AC_PATH_PROG(MODPROBE_CMD, modprobe)
1146
if test x$MODPROBE_CMD != x; then
1147
AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
1151
lvm_exec_prefix=$exec_prefix
1152
test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$prefix
1153
test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$ac_default_prefix
1154
AC_DEFINE_UNQUOTED(LVM_PATH, ["$lvm_exec_prefix/sbin/lvm"], [Path to lvm binary.])
1156
if test "$CLVMD" != none; then
1157
clvmd_prefix=$ac_default_prefix
1158
test "$prefix" != NONE && clvmd_prefix=$prefix
1159
AC_DEFINE_UNQUOTED(CLVMD_PATH, ["$clvmd_prefix/sbin/clvmd"],
1160
[Path to clvmd binary.])
1163
################################################################################
1164
dnl -- dmeventd pidfile and executable path
1165
if test "$BUILD_DMEVENTD" = yes; then
1166
AC_ARG_WITH(dmeventd-pidfile,
1167
AC_HELP_STRING([--with-dmeventd-pidfile=PATH],
1168
[dmeventd pidfile [[/var/run/dmeventd.pid]]]),
1169
DMEVENTD_PIDFILE=$withval,
1170
DMEVENTD_PIDFILE="/var/run/dmeventd.pid")
1171
AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE, ["$DMEVENTD_PIDFILE"],
1172
[Path to dmeventd pidfile.])
1175
if test "$BUILD_DMEVENTD" = yes; then
1176
AC_ARG_WITH(dmeventd-path,
1177
AC_HELP_STRING([--with-dmeventd-path=PATH],
1178
[dmeventd path [[EPREFIX/sbin/dmeventd]]]),
1179
DMEVENTD_PATH=$withval,
1180
DMEVENTD_PATH="$lvm_exec_prefix/sbin/dmeventd")
1181
AC_DEFINE_UNQUOTED(DMEVENTD_PATH, ["$DMEVENTD_PATH"],
1182
[Path to dmeventd binary.])
1185
AH_TEMPLATE(DEFAULT_RUN_DIR, [Name of default run directory.])
1186
AC_ARG_WITH(default-run-dir,
1187
[ --with-default-run-dir=DIR Default run directory [[/var/run/lvm]] ],
1188
[ DEFAULT_RUN_DIR="$withval" ],
1189
[ DEFAULT_RUN_DIR="/var/run/lvm" ])
1190
AC_DEFINE_UNQUOTED(DEFAULT_RUN_DIR,["$DEFAULT_RUN_DIR"] )
1192
################################################################################
1193
dnl -- various defaults
1194
AC_ARG_WITH(default-system-dir,
1195
AC_HELP_STRING([--with-default-system-dir=DIR],
1196
[default LVM system directory [[/etc/lvm]]]),
1197
DEFAULT_SYS_DIR=$withval, DEFAULT_SYS_DIR="/etc/lvm")
1198
AC_DEFINE_UNQUOTED(DEFAULT_SYS_DIR, ["$DEFAULT_SYS_DIR"],
1199
[Path to LVM system directory.])
1201
AC_ARG_WITH(default-archive-subdir,
1202
AC_HELP_STRING([--with-default-archive-subdir=SUBDIR],
1203
[default metadata archive subdir [[archive]]]),
1204
DEFAULT_ARCHIVE_SUBDIR=$withval, DEFAULT_ARCHIVE_SUBDIR=archive)
1205
AC_DEFINE_UNQUOTED(DEFAULT_ARCHIVE_SUBDIR, ["$DEFAULT_ARCHIVE_SUBDIR"],
1206
[Name of default metadata archive subdirectory.])
1208
AC_ARG_WITH(default-backup-subdir,
1209
AC_HELP_STRING([--with-default-backup-subdir=SUBDIR],
1210
[default metadata backup subdir [[backup]]]),
1211
DEFAULT_BACKUP_SUBDIR=$withval, DEFAULT_BACKUP_SUBDIR=backup)
1212
AC_DEFINE_UNQUOTED(DEFAULT_BACKUP_SUBDIR, ["$DEFAULT_BACKUP_SUBDIR"],
1213
[Name of default metadata backup subdirectory.])
1215
AC_ARG_WITH(default-cache-subdir,
1216
AC_HELP_STRING([--with-default-cache-subdir=SUBDIR],
1217
[default metadata cache subdir [[cache]]]),
1218
DEFAULT_CACHE_SUBDIR=$withval, DEFAULT_CACHE_SUBDIR=cache)
1219
AC_DEFINE_UNQUOTED(DEFAULT_CACHE_SUBDIR, ["$DEFAULT_CACHE_SUBDIR"],
1220
[Name of default metadata cache subdirectory.])
1222
AC_ARG_WITH(default-locking-dir,
1223
AC_HELP_STRING([--with-default-locking-dir=DIR],
1224
[default locking directory [[/var/lock/lvm]]]),
1225
DEFAULT_LOCK_DIR=$withval, DEFAULT_LOCK_DIR="/var/lock/lvm")
1226
AC_DEFINE_UNQUOTED(DEFAULT_LOCK_DIR, ["$DEFAULT_LOCK_DIR"],
1227
[Name of default locking directory.])
1229
################################################################################
1230
dnl -- Setup default data alignment
1231
AC_ARG_WITH(default-data-alignment,
1232
AC_HELP_STRING([--with-default-data-alignment=NUM],
1233
[set the default data alignment in MiB [[1]]]),
1234
DEFAULT_DATA_ALIGNMENT=$withval, DEFAULT_DATA_ALIGNMENT=1)
1235
AC_DEFINE_UNQUOTED(DEFAULT_DATA_ALIGNMENT, [$DEFAULT_DATA_ALIGNMENT],
1236
[Default data alignment.])
1238
################################################################################
1239
dnl -- which kernel interface to use (ioctl only)
1240
AC_MSG_CHECKING(for kernel interface choice)
1241
AC_ARG_WITH(interface,
1242
AC_HELP_STRING([--with-interface=IFACE],
1243
[choose kernel interface (ioctl) [[ioctl]]]),
1244
interface=$withval, interface=ioctl)
1245
if [[ "x$interface" != xioctl ]];
1247
AC_MSG_ERROR(--with-interface=ioctl required. fs no longer supported.)
1249
AC_MSG_RESULT($interface)
1251
################################################################################
1252
DM_LIB_VERSION="\"`cat "$srcdir"/VERSION_DM 2>/dev/null || echo Unknown`\""
1253
AC_DEFINE_UNQUOTED(DM_LIB_VERSION, $DM_LIB_VERSION, [Library version])
1255
DM_LIB_PATCHLEVEL=`cat "$srcdir"/VERSION_DM | $AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}'`
1257
LVM_VERSION="\"`cat "$srcdir"/VERSION 2>/dev/null || echo Unknown`\""
1259
VER=`cat "$srcdir"/VERSION`
1260
LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.* (//;s/).*//'`\""
1261
VER=`echo "$VER" | $AWK '{print $1}'`
1262
LVM_RELEASE="\"`echo "$VER" | $AWK -F '-' '{print $2}'`\""
1263
VER=`echo "$VER" | $AWK -F '-' '{print $1}'`
1264
LVM_MAJOR=`echo "$VER" | $AWK -F '.' '{print $1}'`
1265
LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'`
1266
LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[[(.]]' '{print $3}'`
1267
LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'`
1269
################################################################################
1272
AC_SUBST(BUILD_CMIRRORD)
1273
AC_SUBST(BUILD_DMEVENTD)
1277
AC_SUBST(CLDNOWHOLEARCHIVE)
1278
AC_SUBST(CLDWHOLEARCHIVE)
1281
AC_SUBST(CLVMD_CMANAGERS)
1282
AC_SUBST(CMAN_CFLAGS)
1285
AC_SUBST(CONFDB_CFLAGS)
1286
AC_SUBST(CONFDB_LIBS)
1288
AC_SUBST(COPTIMISE_FLAG)
1289
AC_SUBST(CPG_CFLAGS)
1291
AC_SUBST(CSCOPE_CMD)
1293
AC_SUBST(DEFAULT_SYS_DIR)
1294
AC_SUBST(DEFAULT_ARCHIVE_SUBDIR)
1295
AC_SUBST(DEFAULT_BACKUP_SUBDIR)
1296
AC_SUBST(DEFAULT_CACHE_SUBDIR)
1297
AC_SUBST(DEFAULT_DATA_ALIGNMENT)
1298
AC_SUBST(DEFAULT_LOCK_DIR)
1299
AC_SUBST(DEFAULT_RUN_DIR)
1301
AC_SUBST(DLM_CFLAGS)
1305
AC_SUBST(DMEVENTD_PATH)
1307
AC_SUBST(DM_DEVICE_GID)
1308
AC_SUBST(DM_DEVICE_MODE)
1309
AC_SUBST(DM_DEVICE_UID)
1311
AC_SUBST(DM_LIB_VERSION)
1312
AC_SUBST(DM_LIB_PATCHLEVEL)
1314
AC_SUBST(HAVE_LIBDL)
1315
AC_SUBST(HAVE_REALTIME)
1317
AC_SUBST(INTL_PACKAGE)
1321
AC_SUBST(LIB_SUFFIX)
1324
AC_SUBST(LVM1_FALLBACK)
1325
AC_SUBST(LVM_VERSION)
1326
AC_SUBST(LVM_LIBAPI)
1329
AC_SUBST(LVM_PATCHLEVEL)
1330
AC_SUBST(LVM_RELEASE)
1331
AC_SUBST(LVM_RELEASE_DATE)
1338
AC_SUBST(PTHREAD_LIBS)
1339
AC_SUBST(QUORUM_CFLAGS)
1340
AC_SUBST(QUORUM_LIBS)
1342
AC_SUBST(READLINE_LIBS)
1343
AC_SUBST(REPLICATORS)
1344
AC_SUBST(SACKPT_CFLAGS)
1345
AC_SUBST(SACKPT_LIBS)
1346
AC_SUBST(SALCK_CFLAGS)
1347
AC_SUBST(SALCK_LIBS)
1348
AC_SUBST(SELINUX_LIBS)
1349
AC_SUBST(SELINUX_PC)
1352
AC_SUBST(STATIC_LINK)
1356
AC_SUBST(UDEV_RULES)
1358
AC_SUBST(WRITE_INSTALL)
1359
AC_SUBST(DMEVENTD_PIDFILE)
1362
AC_SUBST(missingkernel)
1365
AC_SUBST(udev_prefix)
1368
AC_SUBST(usrsbindir)
1370
################################################################################
1371
dnl -- First and last lines should not contain files to generate in order to
1372
dnl -- keep utility scripts running properly
1377
daemons/clvmd/Makefile
1378
daemons/cmirrord/Makefile
1379
daemons/dmeventd/Makefile
1380
daemons/dmeventd/libdevmapper-event.pc
1381
daemons/dmeventd/plugins/Makefile
1382
daemons/dmeventd/plugins/lvm2/Makefile
1383
daemons/dmeventd/plugins/raid/Makefile
1384
daemons/dmeventd/plugins/mirror/Makefile
1385
daemons/dmeventd/plugins/snapshot/Makefile
1391
lib/format1/Makefile
1392
lib/format_pool/Makefile
1393
lib/locking/Makefile
1395
lib/replicator/Makefile
1396
lib/misc/lvm-version.h
1398
lib/snapshot/Makefile
1400
libdm/libdevmapper.pc
1402
liblvm/liblvm2app.pc
1405
scripts/clvmd_init_red_hat
1406
scripts/cmirrord_init_red_hat
1407
scripts/lvm2_monitoring_init_red_hat
1408
scripts/dm_event_systemd_red_hat.service
1409
scripts/lvm2_monitoring_systemd_red_hat.service
1415
unit-tests/datastruct/Makefile
1416
unit-tests/regex/Makefile
1417
unit-tests/mm/Makefile
1421
if test x$ODIRECT != xyes; then
1422
AC_MSG_WARN(Warning: O_DIRECT disabled: low-memory pvmove may lock up)