]> sourceware.org Git - lvm2.git/blame - configure.in
.
[lvm2.git] / configure.in
CommitLineData
d0191583 1###############################################################################
ad6254c5 2## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
b6d7a484 3## Copyright (C) 2004-2012 Red Hat, Inc. All rights reserved.
795ca3e5 4##
ad6254c5
AK
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.
795ca3e5 8##
ad6254c5
AK
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
795ca3e5
AK
12################################################################################
13
e24fb506 14AC_PREREQ(2.61)
80992638 15################################################################################
8ce0cbda 16dnl -- Process this file with autoconf to produce a configure script.
7a197a62
AK
17AC_INIT
18AC_CONFIG_SRCDIR([lib/device/dev-cache.h])
d0191583 19AC_CONFIG_HEADERS([lib/misc/configure.h])
72b2cb61 20
80992638 21################################################################################
ad6254c5 22dnl -- Setup the directory where autoconf has auxilary files
d3a356b4 23AC_CONFIG_AUX_DIR(autoconf)
795ca3e5 24
80992638 25################################################################################
8ce0cbda 26dnl -- Get system type
7a197a62 27AC_CANONICAL_TARGET([])
b896caa1
AK
28
29case "$host_os" in
30 linux*)
7f54ef36 31 CFLAGS="$CFLAGS"
8ce0cbda 32 COPTIMISE_FLAG="-O2"
80992638 33 CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
bf09a320
AK
34 ELDFLAGS="-Wl,--export-dynamic"
35 # FIXME Generate list and use --dynamic-list=.dlopen.sym
8106cdd5
AK
36 CLDWHOLEARCHIVE="-Wl,-whole-archive"
37 CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
80992638 38 LDDEPS="$LDDEPS .export.sym"
d0191583 39 LIB_SUFFIX=so
8106cdd5 40 DEVMAPPER=yes
615534d3 41 LVMETAD=no
1a9ea74d 42 ODIRECT=yes
d0191583 43 DM_IOCTLS=yes
80992638 44 SELINUX=yes
d3c8211f 45 CLUSTER=internal
f6fc418d 46 FSADM=yes
d0191583 47 ;;
8106cdd5 48 darwin*)
80992638 49 CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
8ce0cbda 50 COPTIMISE_FLAG="-O2"
80992638 51 CLDFLAGS="$CLDFLAGS"
bf09a320 52 ELDFLAGS=
8106cdd5
AK
53 CLDWHOLEARCHIVE="-all_load"
54 CLDNOWHOLEARCHIVE=
d0191583 55 LIB_SUFFIX=dylib
a653923f 56 DEVMAPPER=yes
1a9ea74d 57 ODIRECT=no
d0191583 58 DM_IOCTLS=no
80992638 59 SELINUX=no
d3c8211f 60 CLUSTER=none
d0191583
JM
61 FSADM=no
62 ;;
b896caa1
AK
63esac
64
80992638 65################################################################################
8ce0cbda 66dnl -- Checks for programs.
162aefe8 67AC_PROG_SED
8ce0cbda
AK
68AC_PROG_AWK
69AC_PROG_CC
d0191583
JM
70
71dnl probably no longer needed in 2008, but...
72AC_PROG_GCC_TRADITIONAL
8ce0cbda
AK
73AC_PROG_INSTALL
74AC_PROG_LN_S
75AC_PROG_MAKE_SET
162aefe8 76AC_PROG_MKDIR_P
5556819a 77AC_PROG_RANLIB
8a2fc586
AK
78AC_PATH_PROG(CFLOW_CMD, cflow)
79AC_PATH_PROG(CSCOPE_CMD, cscope)
8ce0cbda
AK
80
81################################################################################
d0191583 82dnl -- Check for header files.
80992638 83AC_HEADER_DIRENT
d911ec67 84AC_HEADER_MAJOR
80992638 85AC_HEADER_STDC
ad6254c5
AK
86AC_HEADER_SYS_WAIT
87AC_HEADER_TIME
88
d0191583 89AC_CHECK_HEADERS([locale.h stddef.h syslog.h sys/file.h sys/time.h assert.h \
d911ec67
AK
90 langinfo.h libgen.h signal.h sys/mman.h sys/resource.h sys/utsname.h \
91 sys/wait.h time.h], ,
d0191583 92 [AC_MSG_ERROR(bailing out)])
ad6254c5
AK
93
94case "$host_os" in
95 linux*)
96 AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;;
97 darwin*)
98 AC_CHECK_HEADERS(machine/endian.h sys/disk.h,,AC_MSG_ERROR(bailing out)) ;;
99esac
80992638 100
d0191583
JM
101AC_CHECK_HEADERS([ctype.h dirent.h errno.h fcntl.h getopt.h inttypes.h limits.h \
102 stdarg.h stdio.h stdlib.h string.h sys/ioctl.h sys/param.h sys/stat.h \
103 sys/types.h unistd.h], , [AC_MSG_ERROR(bailing out)])
104AC_CHECK_HEADERS(termios.h sys/statvfs.h)
105
80992638 106################################################################################
d0191583 107dnl -- Check for typedefs, structures, and compiler characteristics.
80992638
AK
108AC_C_CONST
109AC_C_INLINE
d0191583 110AC_CHECK_MEMBERS([struct stat.st_rdev])
80992638
AK
111AC_TYPE_OFF_T
112AC_TYPE_PID_T
d0191583 113AC_TYPE_SIGNAL
80992638 114AC_TYPE_SIZE_T
ad6254c5 115AC_TYPE_MODE_T
d911ec67
AK
116AC_TYPE_INT8_T
117AC_TYPE_INT16_T
118AC_TYPE_INT32_T
119AC_TYPE_INT64_T
120AC_TYPE_SSIZE_T
121AC_TYPE_UID_T
122AC_TYPE_UINT8_T
123AC_TYPE_UINT16_T
124AC_TYPE_UINT32_T
125AC_TYPE_UINT64_T
7a197a62 126AC_CHECK_MEMBERS([struct stat.st_rdev])
ad6254c5
AK
127AC_STRUCT_TM
128
129################################################################################
130dnl -- Check for functions
7c9fd3ea 131AC_CHECK_FUNCS([ftruncate gethostname getpagesize \
d911ec67
AK
132 gettimeofday memset mkdir mkfifo rmdir munmap nl_langinfo setenv setlocale \
133 strcasecmp strchr strcspn strspn strdup strncasecmp strerror strrchr \
134 strstr strtol strtoul uname], , [AC_MSG_ERROR(bailing out)])
a0f9708e 135AC_CHECK_FUNCS(siginterrupt)
ad6254c5
AK
136AC_FUNC_ALLOCA
137AC_FUNC_CLOSEDIR_VOID
d911ec67 138AC_FUNC_CHOWN
ad6254c5
AK
139AC_FUNC_FORK
140AC_FUNC_LSTAT
141AC_FUNC_MALLOC
142AC_FUNC_MEMCMP
143AC_FUNC_MMAP
d911ec67 144AC_FUNC_REALLOC
ad6254c5
AK
145AC_FUNC_STAT
146AC_FUNC_STRTOD
d0191583 147AC_FUNC_VPRINTF
80992638 148
9c961554
MB
149################################################################################
150dnl -- Enables statically-linked tools
151AC_MSG_CHECKING(whether to use static linking)
152AC_ARG_ENABLE(static_link,
71082be4
ZK
153 AC_HELP_STRING([--enable-static_link],
154 [use this to link the tools to their libraries
155 statically (default is dynamic linking]),
156 STATIC_LINK=$enableval, STATIC_LINK=no)
9c961554
MB
157AC_MSG_RESULT($STATIC_LINK)
158
80992638 159################################################################################
8ce0cbda 160dnl -- Prefix is /usr by default, the exec_prefix default is setup later
795ca3e5
AK
161AC_PREFIX_DEFAULT(/usr)
162
80992638 163################################################################################
8ce0cbda 164dnl -- Setup the ownership of the files
ad6254c5 165AC_MSG_CHECKING(file owner)
795ca3e5 166AC_ARG_WITH(user,
71082be4
ZK
167 AC_HELP_STRING([--with-user=USER],
168 [set the owner of installed files [[USER=]]]),
169 OWNER=$withval)
ad6254c5 170AC_MSG_RESULT($OWNER)
a38df97f
AK
171
172if test x$OWNER != x; then
23b059e7 173 INSTALL="$INSTALL -o $OWNER"
a38df97f 174fi
795ca3e5 175
80992638 176################################################################################
8ce0cbda 177dnl -- Setup the group ownership of the files
ad6254c5 178AC_MSG_CHECKING(group owner)
795ca3e5 179AC_ARG_WITH(group,
71082be4
ZK
180 AC_HELP_STRING([--with-group=GROUP],
181 [set the group owner of installed files [[GROUP=]]]),
182 GROUP=$withval)
ad6254c5 183AC_MSG_RESULT($GROUP)
a38df97f
AK
184
185if test x$GROUP != x; then
23b059e7 186 INSTALL="$INSTALL -g $GROUP"
a38df97f 187fi
795ca3e5 188
0782ad50
AK
189################################################################################
190dnl -- Setup device node ownership
191AC_MSG_CHECKING(device node uid)
192
193AC_ARG_WITH(device-uid,
71082be4
ZK
194 AC_HELP_STRING([--with-device-uid=UID],
195 [set the owner used for new device nodes [[UID=0]]]),
196 DM_DEVICE_UID=$withval, DM_DEVICE_UID=0)
0782ad50
AK
197AC_MSG_RESULT($DM_DEVICE_UID)
198
199################################################################################
200dnl -- Setup device group ownership
201AC_MSG_CHECKING(device node gid)
202
203AC_ARG_WITH(device-gid,
71082be4
ZK
204 AC_HELP_STRING([--with-device-gid=GID],
205 [set the group used for new device nodes [[GID=0]]]),
206 DM_DEVICE_GID=$withval, DM_DEVICE_GID=0)
0782ad50
AK
207AC_MSG_RESULT($DM_DEVICE_GID)
208
f6fc418d
AK
209################################################################################
210dnl -- Setup device mode
211AC_MSG_CHECKING(device node mode)
212
213AC_ARG_WITH(device-mode,
71082be4
ZK
214 AC_HELP_STRING([--with-device-mode=MODE],
215 [set the mode used for new device nodes [[MODE=0600]]]),
216 DM_DEVICE_MODE=$withval, DM_DEVICE_MODE=0600)
f6fc418d
AK
217AC_MSG_RESULT($DM_DEVICE_MODE)
218
d0df875d
ZK
219AC_MSG_CHECKING(when to create device nodes)
220AC_ARG_WITH(device-nodes-on,
221 AC_HELP_STRING([--with-device-nodes-on=ON],
222 [create nodes on resume or create [[ON=resume]]]),
223 ADD_NODE=$withval, ADD_NODE=resume)
224case "$ADD_NODE" in
225 resume) add_on=DM_ADD_NODE_ON_RESUME;;
226 create) add_on=DM_ADD_NODE_ON_CREATE;;
227 *) AC_MSG_ERROR([--with-device-nodes-on parameter invalid]);;
228esac
229AC_MSG_RESULT(on $ADD_NODE)
230AC_DEFINE_UNQUOTED([DEFAULT_DM_ADD_NODE], $add_on, [Define default node creation behavior with dmsetup create])
231
53f3ebce
PR
232AC_MSG_CHECKING(default name mangling)
233AC_ARG_WITH(default-name-mangling,
234 AC_HELP_STRING([--with-default-name-mangling=MANGLING],
235 [default name mangling: auto/none/hex [[MANGLING=auto]]]),
236 MANGLING=$withval, MANGLING=auto)
237case "$MANGLING" in
238 auto) mangling=DM_STRING_MANGLING_AUTO;;
239 disabled) mangling=DM_STRING_MANGLING_NONE;;
240 hex) mangling=DM_STRING_MANGLING_HEX;;
241 *) AC_MSG_ERROR([--with-default-name-mangling parameter invalid]);;
242esac
243AC_MSG_RESULT($MANGLING)
244AC_DEFINE_UNQUOTED([DEFAULT_DM_NAME_MANGLING], $mangling, [Define default name mangling behaviour])
245
80992638 246################################################################################
7d1552c9 247dnl -- LVM1 tool fallback option
ad6254c5 248AC_MSG_CHECKING(whether to enable lvm1 fallback)
71082be4
ZK
249AC_ARG_ENABLE(lvm1_fallback,
250 AC_HELP_STRING([--enable-lvm1_fallback],
251 [use this to fall back and use LVM1 binaries if
252 device-mapper is missing from the kernel]),
253 LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no)
ad6254c5 254AC_MSG_RESULT($LVM1_FALLBACK)
7d1552c9
AK
255
256if test x$LVM1_FALLBACK = xyes; then
72b2cb61 257 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])
7d1552c9
AK
258fi
259
80992638 260################################################################################
5a52dca9 261dnl -- format1 inclusion type
ad6254c5 262AC_MSG_CHECKING(whether to include support for lvm1 metadata)
5a52dca9 263AC_ARG_WITH(lvm1,
71082be4
ZK
264 AC_HELP_STRING([--with-lvm1=TYPE],
265 [LVM1 metadata support: internal/shared/none
266 [[TYPE=internal]]]),
267 LVM1=$withval, LVM1=internal)
ad6254c5 268AC_MSG_RESULT($LVM1)
5a52dca9
AK
269
270if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]];
271 then AC_MSG_ERROR(
272--with-lvm1 parameter invalid
273)
5a52dca9
AK
274fi;
275
b896caa1 276if test x$LVM1 = xinternal; then
72b2cb61 277 AC_DEFINE([LVM1_INTERNAL], 1, [Define to 1 to include built-in support for LVM1 metadata.])
b896caa1
AK
278fi
279
80992638 280################################################################################
d8ac0fbc 281dnl -- format_pool inclusion type
ad6254c5 282AC_MSG_CHECKING(whether to include support for GFS pool metadata)
d8ac0fbc 283AC_ARG_WITH(pool,
71082be4
ZK
284 AC_HELP_STRING([--with-pool=TYPE],
285 [GFS pool read-only support: internal/shared/none
286 [[TYPE=internal]]]),
287 POOL=$withval, POOL=internal)
ad6254c5 288AC_MSG_RESULT($POOL)
d8ac0fbc
AK
289
290if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]];
291 then AC_MSG_ERROR(
292--with-pool parameter invalid
293)
d8ac0fbc
AK
294fi;
295
296if test x$POOL = xinternal; then
72b2cb61 297 AC_DEFINE([POOL_INTERNAL], 1, [Define to 1 to include built-in support for GFS pool metadata.])
d8ac0fbc
AK
298fi
299
80992638 300################################################################################
d3c8211f 301dnl -- cluster_locking inclusion type
ad6254c5 302AC_MSG_CHECKING(whether to include support for cluster locking)
d3c8211f 303AC_ARG_WITH(cluster,
71082be4
ZK
304 AC_HELP_STRING([--with-cluster=TYPE],
305 [cluster LVM locking support: internal/shared/none
306 [[TYPE=internal]]]),
307 CLUSTER=$withval)
ad6254c5 308AC_MSG_RESULT($CLUSTER)
d3c8211f
AK
309
310if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]];
311 then AC_MSG_ERROR(
312--with-cluster parameter invalid
313)
d3c8211f
AK
314fi;
315
316if test x$CLUSTER = xinternal; then
72b2cb61 317 AC_DEFINE([CLUSTER_LOCKING_INTERNAL], 1, [Define to 1 to include built-in support for clustered LVM locking.])
d3c8211f 318fi
d8ac0fbc 319
80992638 320################################################################################
4922197a 321dnl -- snapshots inclusion type
ad6254c5 322AC_MSG_CHECKING(whether to include snapshots)
4922197a 323AC_ARG_WITH(snapshots,
71082be4
ZK
324 AC_HELP_STRING([--with-snapshots=TYPE],
325 [snapshot support: internal/shared/none
326 [[TYPE=internal]]]),
327 SNAPSHOTS=$withval, SNAPSHOTS=internal)
ad6254c5 328AC_MSG_RESULT($SNAPSHOTS)
4922197a
AK
329
330if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]];
331 then AC_MSG_ERROR(
332--with-snapshots parameter invalid
333)
4922197a
AK
334fi;
335
336if test x$SNAPSHOTS = xinternal; then
72b2cb61 337 AC_DEFINE([SNAPSHOT_INTERNAL], 1, [Define to 1 to include built-in support for snapshots.])
4922197a
AK
338fi
339
80992638 340################################################################################
4922197a 341dnl -- mirrors inclusion type
ad6254c5 342AC_MSG_CHECKING(whether to include mirrors)
4922197a 343AC_ARG_WITH(mirrors,
71082be4
ZK
344 AC_HELP_STRING([--with-mirrors=TYPE],
345 [mirror support: internal/shared/none
346 [[TYPE=internal]]]),
347 MIRRORS=$withval, MIRRORS=internal)
ad6254c5 348AC_MSG_RESULT($MIRRORS)
4922197a
AK
349
350if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]];
351 then AC_MSG_ERROR(
352--with-mirrors parameter invalid
353)
4922197a
AK
354fi;
355
356if test x$MIRRORS = xinternal; then
72b2cb61 357 AC_DEFINE([MIRRORED_INTERNAL], 1, [Define to 1 to include built-in support for mirrors.])
4922197a
AK
358fi
359
cac52ca4
JEB
360################################################################################
361dnl -- raid inclusion type
362AC_MSG_CHECKING(whether to include raid)
363AC_ARG_WITH(raid,
364 AC_HELP_STRING([--with-raid=TYPE],
365 [mirror support: internal/shared/none
366 [[TYPE=internal]]]),
367 RAID=$withval, RAID=internal)
368AC_MSG_RESULT($RAID)
369
370if [[ "x$RAID" != xnone -a "x$RAID" != xinternal -a "x$RAID" != xshared ]];
371 then AC_MSG_ERROR(
372--with-raid parameter invalid
373)
374fi;
375
376if test x$RAID = xinternal; then
377 AC_DEFINE([RAID_INTERNAL], 1, [Define to 1 to include built-in support for raid.])
378fi
379
8fea97b7
ZK
380################################################################################
381dnl -- asynchronous volume replicator inclusion type
382AC_MSG_CHECKING(whether to include replicators)
71082be4
ZK
383AC_ARG_WITH(replicators,
384 AC_HELP_STRING([--with-replicators=TYPE],
385 [replicator support: internal/shared/none
386 [[TYPE=none]]]),
387 REPLICATORS=$withval, REPLICATORS=none)
8fea97b7
ZK
388AC_MSG_RESULT($REPLICATORS)
389
390case "$REPLICATORS" in
391 none|shared) ;;
392 internal) AC_DEFINE([REPLICATOR_INTERNAL], 1,
393 [Define to 1 to include built-in support for replicators.]) ;;
394 *) AC_MSG_ERROR([--with-replicators parameter invalid ($REPLICATORS)]) ;;
395esac
396
3ba4a195
ZK
397################################################################################
398dnl -- thin provisioning
399AC_MSG_CHECKING(whether to include thin provisioning)
400AC_ARG_WITH(thin,
401 AC_HELP_STRING([--with-thin=TYPE],
402 [thin provisioning support: internal/shared/none
403 [[TYPE=none]]]),
404 THIN=$withval, THIN=none)
405AC_MSG_RESULT($THIN)
406
407case "$THIN" in
408 none|shared) ;;
409 internal) AC_DEFINE([THIN_INTERNAL], 1,
410 [Define to 1 to include built-in support for thin provisioning.]) ;;
411 *) AC_MSG_ERROR([--with-thin parameter invalid ($THIN)]) ;;
412esac
413
80992638 414################################################################################
1b523347 415dnl -- Disable readline
ad6254c5 416AC_MSG_CHECKING(whether to enable readline)
2c189a57 417AC_ARG_ENABLE([readline],
71082be4
ZK
418 AC_HELP_STRING([--disable-readline], [disable readline support]),
419 READLINE=$enableval, READLINE=maybe)
ad6254c5 420AC_MSG_RESULT($READLINE)
795ca3e5 421
8b1a3214
AK
422################################################################################
423dnl -- Disable realtime clock support
424AC_MSG_CHECKING(whether to enable realtime support)
71082be4
ZK
425AC_ARG_ENABLE(realtime,
426 AC_HELP_STRING([--enable-realtime], [enable realtime clock support]),
427 REALTIME=$enableval)
8b1a3214
AK
428AC_MSG_RESULT($REALTIME)
429
e40d44be
ZK
430################################################################################
431dnl -- disable OCF resource agents
432AC_MSG_CHECKING(whether to enable OCF resource agents)
433AC_ARG_ENABLE(ocf,
434 AC_HELP_STRING([--enable-ocf],
435 [enable Open Cluster Framework (OCF) compliant resource agents]),
436 OCF=$enableval, OCF=no)
437AC_MSG_RESULT($OCF)
349da06c
ZK
438AC_ARG_WITH(ocfdir,
439 AC_HELP_STRING([--with-ocfdir=DIR],
440 [install OCF files in DIR [[PREFIX/lib/ocf/resource.d/lvm2]]]),
441 OCFDIR=$withval, OCFDIR='${prefix}/lib/ocf/resource.d/lvm2')
e40d44be 442
90c80887
AK
443################################################################################
444dnl -- Init pkg-config with dummy invokation:
445dnl -- this is required because PKG_CHECK_MODULES macro is expanded
446dnl -- to initialize the pkg-config environment only at the first invokation,
447dnl -- that would be conditional in this configure.in.
448pkg_config_init() {
449 PKG_CHECK_MODULES(PKGCONFIGINIT, pkgconfiginit, [],
450 [AC_MSG_RESULT([pkg-config initialized])])
451 PKGCONFIG_INIT=1
452}
453
80992638 454################################################################################
8ce0cbda 455dnl -- Build cluster LVM daemon
ad6254c5 456AC_MSG_CHECKING(whether to build cluster LVM daemon)
a266258f 457AC_ARG_WITH(clvmd,
71082be4 458 [ --with-clvmd=TYPE build cluster LVM Daemon
8c222979 459 The following cluster manager combinations are valid:
a946372e
AK
460 * cman (RHEL5 or equivalent)
461 * cman,corosync,openais (or selection of them)
649c4507 462 * singlenode (localhost only)
a946372e
AK
463 * all (autodetect)
464 * none (disable build)
71082be4
ZK
465 [[TYPE=none]]],
466 CLVMD=$withval, CLVMD=none)
a266258f 467if test x$CLVMD = xyes; then
5c7fc7c4 468 CLVMD=all
b1098701 469fi
ad6254c5 470AC_MSG_RESULT($CLVMD)
80992638 471
8ce0cbda 472dnl -- If clvmd enabled without cluster locking, automagically include it
a266258f 473if test x$CLVMD != xnone && test x$CLUSTER = xnone; then
d3c8211f
AK
474 CLUSTER=internal
475fi
d3c8211f 476
90c80887 477dnl -- init pkgconfig if required
34b6075d 478if test x$CLVMD != xnone && test x$PKGCONFIG_INIT != x1; then
90c80887
AK
479 pkg_config_init
480fi
481
34b6075d
FDN
482dnl -- Express clvmd init script Required-Start / Required-Stop
483CLVMD_CMANAGERS=""
484dnl -- On RHEL4/RHEL5, qdiskd is started from a separate init script.
7cf60770 485dnl -- Enable if we are build for cman.
34b6075d 486CLVMD_NEEDS_QDISKD=no
90c80887 487
a946372e
AK
488dnl -- define build types
489if [[ `expr x"$CLVMD" : '.*gulm.*'` != 0 ]]; then
7cf60770 490 AC_MSG_ERROR([Since version 2.02.87 GULM locking is no longer supported.]);
34b6075d
FDN
491fi
492if [[ `expr x"$CLVMD" : '.*cman.*'` != 0 ]]; then
493 BUILDCMAN=yes
494 CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman"
495 CLVMD_NEEDS_QDISKD=yes
a946372e
AK
496fi
497if [[ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then
498 BUILDCOROSYNC=yes
34b6075d 499 CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync"
a946372e
AK
500fi
501if [[ `expr x"$CLVMD" : '.*openais.*'` != 0 ]]; then
502 BUILDOPENAIS=yes
34b6075d 503 CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais"
a946372e 504fi
34b6075d
FDN
505if test x$CLVMD_NEEDS_QDISKD != xno; then
506 CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd"
a946372e
AK
507fi
508
a946372e
AK
509dnl -- define a soft bailout if we are autodetecting
510soft_bailout() {
511 NOTFOUND=1
512}
513
514hard_bailout() {
515 AC_MSG_ERROR([bailing out])
516}
517
518dnl -- if clvmd=all then set soft_bailout (we don't want to error)
519dnl -- and set all builds to yes. We need to do this here
7cf60770 520dnl -- to skip the openais|corosync sanity check above.
a946372e
AK
521if test x$CLVMD = xall; then
522 bailout=soft_bailout
a946372e
AK
523 BUILDCMAN=yes
524 BUILDCOROSYNC=yes
525 BUILDOPENAIS=yes
526else
527 bailout=hard_bailout
528fi
529
530dnl -- helper macro to check libs without adding them to LIBS
531check_lib_no_libs() {
532 lib_no_libs_arg1=$1
533 shift
534 lib_no_libs_arg2=$1
535 shift
536 lib_no_libs_args=$@
537 AC_CHECK_LIB([$lib_no_libs_arg1],
538 [$lib_no_libs_arg2],,
539 [$bailout],
540 [$lib_no_libs_args])
541 LIBS=$ac_check_lib_save_LIBS
542}
543
a946372e
AK
544dnl -- Look for cman libraries if required.
545if test x$BUILDCMAN = xyes; then
546 PKG_CHECK_MODULES(CMAN, libcman, [HAVE_CMAN=yes],
547 [NOTFOUND=0
548 AC_CHECK_HEADERS(libcman.h,,$bailout)
549 check_lib_no_libs cman cman_init
550 if test $NOTFOUND = 0; then
551 AC_MSG_RESULT([no pkg for libcman, using -lcman])
552 CMAN_LIBS="-lcman"
553 HAVE_CMAN=yes
554 fi])
555 CHECKCONFDB=yes
556 CHECKDLM=yes
557fi
558
559dnl -- Look for corosync that's required also for openais build
560dnl -- only enough recent version of corosync ship pkg-config files.
561dnl -- We can safely rely on that to detect the correct bits.
562if test x$BUILDCOROSYNC = xyes || \
563 test x$BUILDOPENAIS = xyes; then
564 PKG_CHECK_MODULES(COROSYNC, corosync, [HAVE_COROSYNC=yes], $bailout)
565 CHECKCONFDB=yes
b6d7a484 566 CHECKCMAP=yes
a946372e
AK
567fi
568
edf47283 569dnl -- Look for corosync libraries if required.
a946372e
AK
570if test x$BUILDCOROSYNC = xyes; then
571 PKG_CHECK_MODULES(QUORUM, libquorum, [HAVE_QUORUM=yes], $bailout)
572 CHECKCPG=yes
573 CHECKDLM=yes
574fi
575
576dnl -- Look for openais libraries if required.
577if test x$BUILDOPENAIS = xyes; then
578 PKG_CHECK_MODULES(SALCK, libSaLck, [HAVE_SALCK=yes], $bailout)
579 CHECKCPG=yes
580fi
581
582dnl -- Below are checks for libraries common to more than one build.
583
584dnl -- Check confdb library.
b6d7a484 585dnl -- mandatory for corosync < 2.0 build.
a946372e
AK
586dnl -- optional for openais/cman build.
587
588if test x$CHECKCONFDB = xyes; then
589 PKG_CHECK_MODULES(CONFDB, libconfdb,
590 [HAVE_CONFDB=yes],
591 [HAVE_CONFDB=no])
592
593 AC_CHECK_HEADERS(corosync/confdb.h,
594 [HAVE_CONFDB_H=yes],
595 [HAVE_CONFDB_H=no])
596
597 if test x$HAVE_CONFDB != xyes && \
598 test x$HAVE_CONFDB_H = xyes; then
599 check_lib_no_libs confdb confdb_initialize
600 AC_MSG_RESULT([no pkg for confdb, using -lconfdb])
601 CONFDB_LIBS="-lconfdb"
602 HAVE_CONFDB=yes
603 fi
b6d7a484
AK
604fi
605
606dnl -- Check cmap library
607dnl -- mandatory for corosync >= 2.0 build.
608
609if test x$CHECKCMAP = xyes; then
610 PKG_CHECK_MODULES(CMAP, libcmap,
611 [HAVE_CMAP=yes],
612 [HAVE_CMAP=no])
a946372e 613
b6d7a484
AK
614 AC_CHECK_HEADERS(corosync/cmap.h,
615 [HAVE_CMAP_H=yes],
616 [HAVE_CMAP_H=no])
617
618 if test x$HAVE_CMAP != xyes && \
619 test x$HAVE_CMAP_H = xyes; then
620 check_lib_no_libs cmap cmap_initialize
621 AC_MSG_RESULT([no pkg for cmap, using -lcmap])
622 CMAP_LIBS="-lcmap"
623 HAVE_CMAP=yes
624 fi
625fi
626
627if test x$BUILDCOROSYNC = xyes; then
628 if test x$HAVE_CMAP != xyes && \
629 test x$HAVE_CONFDB != xyes && \
a946372e 630 test x$CLVMD != xall; then
b6d7a484 631 AC_MSG_ERROR([bailing out... cmap (corosync >= 2.0) or confdb (corosync < 2.0) library is required])
a946372e
AK
632 fi
633fi
634
635dnl -- Check cpg library.
636if test x$CHECKCPG = xyes; then
637 PKG_CHECK_MODULES(CPG, libcpg, [HAVE_CPG=yes], $bailout)
638fi
639
640dnl -- Check dlm library.
641if test x$CHECKDLM = xyes; then
642 PKG_CHECK_MODULES(DLM, libdlm, [HAVE_DLM=yes],
643 [NOTFOUND=0
644 AC_CHECK_HEADERS(libdlm.h,,$bailout)
645 check_lib_no_libs dlm dlm_lock -lpthread
646 if test $NOTFOUND = 0; then
647 AC_MSG_RESULT([no pkg for libdlm, using -ldlm])
648 DLM_LIBS="-ldlm -lpthread"
649 HAVE_DLM=yes
650 fi])
651fi
652
653dnl -- If we are autodetecting, we need to re-create
34b6075d
FDN
654dnl -- the depedencies checks and set a proper CLVMD,
655dnl -- together with init script Required-Start/Stop entries.
a946372e 656if test x$CLVMD = xall; then
8c222979 657 CLVMD=none
34b6075d
FDN
658 CLVMD_CMANAGERS=""
659 CLVMD_NEEDS_QDISKD=no
a946372e
AK
660 if test x$HAVE_CMAN = xyes && \
661 test x$HAVE_DLM = xyes; then
8c222979
FDN
662 AC_MSG_RESULT([Enabling clvmd cman cluster manager])
663 CLVMD="$CLVMD,cman"
34b6075d
FDN
664 CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman"
665 CLVMD_NEEDS_QDISKD=yes
a946372e
AK
666 fi
667 if test x$HAVE_COROSYNC = xyes && \
668 test x$HAVE_QUORUM = xyes && \
669 test x$HAVE_CPG = xyes && \
b6d7a484
AK
670 test x$HAVE_DLM = xyes; then
671 if test x$HAVE_CONFDB = xyes || test x$HAVE_CMAP = xyes; then
8c222979
FDN
672 AC_MSG_RESULT([Enabling clvmd corosync cluster manager])
673 CLVMD="$CLVMD,corosync"
34b6075d 674 CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync"
b6d7a484 675 fi
a946372e
AK
676 fi
677 if test x$HAVE_COROSYNC = xyes && \
678 test x$HAVE_CPG = xyes && \
679 test x$HAVE_SALCK = xyes; then
8c222979
FDN
680 AC_MSG_RESULT([Enabling clvmd openais cluster manager])
681 CLVMD="$CLVMD,openais"
34b6075d
FDN
682 CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais"
683 fi
684 if test x$CLVMD_NEEDS_QDISKD != xno; then
685 CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd"
8c222979
FDN
686 fi
687 if test x$CLVMD = xnone; then
688 AC_MSG_RESULT([Disabling clvmd build. No cluster manager detected.])
a946372e 689 fi
edf47283
AK
690fi
691
94424fab
FDN
692dnl -- Fixup CLVMD_CMANAGERS with new corosync
693dnl -- clvmd built with corosync >= 2.0 needs dlm (either init or systemd service)
694dnl -- to be started.
695if [[ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then
696 if test x$HAVE_CMAP = xyes; then
697 CLVMD_CMANAGERS="$CLVMD_CMANAGERS dlm"
698 fi
699fi
700
8c4e8a18
FDN
701################################################################################
702dnl -- clvmd pidfile
703if test "x$CLVMD" != xnone; then
704 AC_ARG_WITH(clvmd-pidfile,
705 AC_HELP_STRING([--with-clvmd-pidfile=PATH],
706 [clvmd pidfile [[/var/run/clvmd.pid]]]),
707 CLVMD_PIDFILE=$withval,
708 CLVMD_PIDFILE="/var/run/clvmd.pid")
709 AC_DEFINE_UNQUOTED(CLVMD_PIDFILE, ["$CLVMD_PIDFILE"],
710 [Path to clvmd pidfile.])
711fi
712
3c14bcca 713################################################################################
66fd4529
AK
714dnl -- Build cluster mirror log daemon
715AC_MSG_CHECKING(whether to build cluster mirror log daemon)
71082be4
ZK
716AC_ARG_ENABLE(cmirrord,
717 AC_HELP_STRING([--enable-cmirrord],
718 [enable the cluster mirror log daemon]),
719 CMIRRORD=$enableval, CMIRRORD=no)
66fd4529 720AC_MSG_RESULT($CMIRRORD)
3c14bcca 721
66fd4529
AK
722BUILD_CMIRRORD=$CMIRRORD
723
724################################################################################
725dnl -- cmirrord pidfile
66fd4529
AK
726if test "x$BUILD_CMIRRORD" = xyes; then
727 AC_ARG_WITH(cmirrord-pidfile,
71082be4
ZK
728 AC_HELP_STRING([--with-cmirrord-pidfile=PATH],
729 [cmirrord pidfile [[/var/run/cmirrord.pid]]]),
730 CMIRRORD_PIDFILE=$withval,
731 CMIRRORD_PIDFILE="/var/run/cmirrord.pid")
732 AC_DEFINE_UNQUOTED(CMIRRORD_PIDFILE, ["$CMIRRORD_PIDFILE"],
733 [Path to cmirrord pidfile.])
66fd4529
AK
734fi
735
736################################################################################
3c14bcca 737dnl -- Look for corosync libraries if required.
66fd4529 738if [[ "x$BUILD_CMIRRORD" = xyes ]]; then
90c80887
AK
739 dnl -- init pkgconfig if required
740 if test x$PKGCONFIG_INIT != x1; then
741 pkg_config_init
742 fi
62e38da1
JEB
743
744 AC_DEFINE([CMIRROR_HAS_CHECKPOINT], 1, [Define to 1 to include libSaCkpt.])
745 PKG_CHECK_MODULES(SACKPT, libSaCkpt, [HAVE_SACKPT=yes],
746 [AC_MSG_RESULT([no libSaCkpt, compiling without it])
747 AC_DEFINE([CMIRROR_HAS_CHECKPOINT], 0, [Define to 0 to exclude libSaCkpt.])])
748
90c80887
AK
749 if test x$HAVE_CPG != xyes; then
750 PKG_CHECK_MODULES(CPG, libcpg)
751 fi
3c14bcca
JEB
752fi
753
80992638 754################################################################################
8ce0cbda 755dnl -- Enable debugging
ad6254c5 756AC_MSG_CHECKING(whether to enable debugging)
71082be4
ZK
757AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable debugging]),
758 DEBUG=$enableval, DEBUG=no)
ad6254c5 759AC_MSG_RESULT($DEBUG)
8ef2b021 760
8ce0cbda
AK
761dnl -- Normally turn off optimisation for debug builds
762if test x$DEBUG = xyes; then
763 COPTIMISE_FLAG=
8a2fc586
AK
764else
765 CSCOPE_CMD=
8ce0cbda
AK
766fi
767
768################################################################################
769dnl -- Override optimisation
ad6254c5 770AC_MSG_CHECKING(for C optimisation flag)
8ce0cbda 771AC_ARG_WITH(optimisation,
71082be4
ZK
772 AC_HELP_STRING([--with-optimisation=OPT],
773 [C optimisation flag [[OPT=-O2]]]),
774 COPTIMISE_FLAG=$withval)
ad6254c5 775AC_MSG_RESULT($COPTIMISE_FLAG)
8ce0cbda 776
fddafd51
ZK
777################################################################################
778dnl -- Enable profiling
5556819a 779AC_MSG_CHECKING(whether to gather gcov profiling data)
fddafd51 780AC_ARG_ENABLE(profiling,
71082be4
ZK
781 AC_HELP_STRING(--enable-profiling, [gather gcov profiling data]),
782 PROFILING=$enableval, PROFILING=no)
5556819a
AK
783AC_MSG_RESULT($PROFILING)
784
785if test "x$PROFILING" = xyes; then
786 COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage"
fd4728e1
ZK
787 AC_PATH_PROG(LCOV, lcov)
788 AC_PATH_PROG(GENHTML, genhtml)
789 if test -z "$LCOV" -o -z "$GENHTML"; then
b145d876
ZK
790 AC_MSG_ERROR([lcov and genhtml are required for profiling])
791 fi
fd4728e1
ZK
792 AC_PATH_PROG(GENPNG, genpng)
793 if test -n "$GENPNG"; then
794 AC_MSG_CHECKING([whether $GENPNG has all required modules])
795 if $GENPNG --help > /dev/null 2>&1 ; then
796 AC_MSG_RESULT(ok)
797 GENHTML="$GENHTML --frames"
798 else
799 AC_MSG_RESULT(not supported)
800 AC_MSG_WARN([GD.pm perl module is not installed])
801 GENPNG=
802 fi
803 fi
5556819a 804fi
fddafd51 805
1033d120
JT
806################################################################################
807dnl -- Enable testing
808AC_MSG_CHECKING(whether to enable unit testing)
809AC_ARG_ENABLE(testing,
810 AC_HELP_STRING(--enable-testing, [enable testing targets in the makefile]),
811 TESTING=$enableval, TESTING=no)
812AC_MSG_RESULT($TESTING)
813
814if test "$TESTING" = yes; then
5da88e5b 815 PKG_CHECK_MODULES(CUNIT, cunit >= 2.0)
1033d120
JT
816fi
817
52e1564f
JT
818################################################################################
819dnl -- Enable valgrind awareness of memory pools
820AC_MSG_CHECKING(whether to enable valgrind awareness of pools)
821AC_ARG_ENABLE(valgrind_pool,
822 AC_HELP_STRING(--enable-valgrind-pool, [enable valgrind awareness of pools]),
823 VALGRIND_POOL=$enableval, VALGRIND_POOL=no)
824AC_MSG_RESULT($VALGRIND_POOL)
825
826if test "$VALGRIND_POOL" = yes; then
827 AC_CHECK_HEADERS([valgrind/memcheck.h], , [AC_MSG_ERROR(bailing out)])
828 AC_DEFINE([VALGRIND_POOL], 1, [Enable a valgrind aware build of pool])
829fi
830
80992638 831################################################################################
8ce0cbda 832dnl -- Disable devmapper
ad6254c5 833AC_MSG_CHECKING(whether to use device-mapper)
71082be4
ZK
834AC_ARG_ENABLE(devmapper,
835 AC_HELP_STRING([--disable-devmapper],
836 [disable LVM2 device-mapper interaction]),
837 DEVMAPPER=$enableval)
ad6254c5 838AC_MSG_RESULT($DEVMAPPER)
199e490e 839
b896caa1 840if test x$DEVMAPPER = xyes; then
f6fc418d 841 AC_DEFINE([DEVMAPPER_SUPPORT], 1, [Define to 1 to enable LVM2 device-mapper interaction.])
b896caa1
AK
842fi
843
615534d3
PR
844################################################################################
845dnl -- Build lvmetad
846AC_MSG_CHECKING(whether to build LVMetaD)
847AC_ARG_ENABLE(lvmetad,
d38de32b
AK
848 AC_HELP_STRING([--enable-lvmetad],
849 [enable the LVM Metadata Daemon]),
615534d3
PR
850 LVMETAD=$enableval)
851AC_MSG_RESULT($LVMETAD)
852
853BUILD_LVMETAD=$LVMETAD
854
832a1e73
AK
855if test x$BUILD_LVMETAD = xyes; then
856 AC_DEFINE([LVMETAD_SUPPORT], 1, [Define to 1 to include code that uses lvmetad.])
857fi
858
5d518f1f
AK
859################################################################################
860dnl -- Enable udev synchronisation
861AC_MSG_CHECKING(whether to enable synchronisation with udev processing)
71082be4
ZK
862AC_ARG_ENABLE(udev_sync,
863 AC_HELP_STRING([--enable-udev_sync],
864 [enable synchronisation with udev processing]),
865 UDEV_SYNC=$enableval, UDEV_SYNC=no)
5d518f1f
AK
866AC_MSG_RESULT($UDEV_SYNC)
867
868if test x$UDEV_SYNC = xyes; then
86ba564a
AK
869 dnl -- init pkgconfig if required
870 if test x$PKGCONFIG_INIT != x1; then
871 pkg_config_init
872 fi
71b29ddc 873 PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
5d518f1f
AK
874 AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
875fi
876
877dnl -- Enable udev rules
878AC_MSG_CHECKING(whether to enable installation of udev rules required for synchronisation)
71082be4
ZK
879AC_ARG_ENABLE(udev_rules,
880 AC_HELP_STRING([--enable-udev_rules],
881 [install rule files needed for udev synchronisation]),
882 UDEV_RULES=$enableval, UDEV_RULES=$UDEV_SYNC)
5d518f1f
AK
883AC_MSG_RESULT($UDEV_RULES)
884
b559a1e6
PR
885if test x$UDEV_RULES = xyes; then
886 AC_MSG_CHECKING(whether udev supports builtin blkid)
887 udev_version=$(udevadm info --version 2>/dev/null)
888 if test -n "$udev_version" && test "$udev_version" -ge 176; then
889 UDEV_HAS_BUILTIN_BLKID=yes
890 else
891 UDEV_HAS_BUILTIN_BLKID=no
892 fi
893 AC_MSG_RESULT($UDEV_HAS_BUILTIN_BLKID)
894fi
895
f6fc418d
AK
896################################################################################
897dnl -- Compatibility mode
71082be4
ZK
898AC_ARG_ENABLE(compat,
899 AC_HELP_STRING([--enable-compat],
900 [enable support for old device-mapper versions]),
901 DM_COMPAT=$enableval, DM_COMPAT=no)
f6fc418d 902
2061c0ec
AK
903if test x$DM_COMPAT = xyes; then
904 AC_MSG_ERROR(
905 [--enable-compat is not currently supported.
906Since device-mapper version 1.02.66, only one version (4) of the device-mapper
907ioctl protocol is supported.]
908 )
909fi
910
95eaa683
AK
911################################################################################
912dnl -- Compatible units suffix mode
913AC_ARG_ENABLE(units-compat,
71082be4
ZK
914 AC_HELP_STRING([--enable-units-compat],
915 [enable output compatibility with old versions that
916 that do not use KiB-style unit suffixes]),
917 UNITS_COMPAT=$enableval, UNITS_COMPAT=no)
95eaa683
AK
918
919if test x$UNITS_COMPAT = xyes; then
920 AC_DEFINE([DEFAULT_SI_UNIT_CONSISTENCY], 0, [Define to 0 to reinstate the pre-2.02.54 handling of unit suffixes.])
921fi
922
f6fc418d
AK
923################################################################################
924dnl -- Disable ioctl
71082be4
ZK
925AC_ARG_ENABLE(ioctl,
926 AC_HELP_STRING([--disable-driver],
927 [disable calls to device-mapper in the kernel]),
928 DM_IOCTLS=$enableval)
f6fc418d 929
80992638 930################################################################################
8ce0cbda 931dnl -- Disable O_DIRECT
ad6254c5 932AC_MSG_CHECKING(whether to enable O_DIRECT)
71082be4
ZK
933AC_ARG_ENABLE(o_direct,
934 AC_HELP_STRING([--disable-o_direct], [disable O_DIRECT]),
935 ODIRECT=$enableval)
ad6254c5 936AC_MSG_RESULT($ODIRECT)
2dc95e1c
AK
937
938if test x$ODIRECT = xyes; then
72b2cb61 939 AC_DEFINE([O_DIRECT_SUPPORT], 1, [Define to 1 to enable O_DIRECT support.])
2dc95e1c
AK
940fi
941
572fefeb
AK
942################################################################################
943dnl -- Enable liblvm2app.so
944AC_MSG_CHECKING(whether to build liblvm2app.so application library)
945AC_ARG_ENABLE(applib,
71082be4
ZK
946 AC_HELP_STRING([--enable-applib], [build application library]),
947 APPLIB=$enableval, APPLIB=no)
572fefeb
AK
948AC_MSG_RESULT($APPLIB)
949AC_SUBST([LVM2APP_LIB])
950test x$APPLIB = xyes \
951 && LVM2APP_LIB=-llvm2app \
952 || LVM2APP_LIB=
953
80992638 954################################################################################
8ce0cbda 955dnl -- Enable cmdlib
ad6254c5 956AC_MSG_CHECKING(whether to compile liblvm2cmd.so)
71082be4
ZK
957AC_ARG_ENABLE(cmdlib,
958 AC_HELP_STRING([--enable-cmdlib], [build shared command library]),
959 CMDLIB=$enableval, CMDLIB=no)
ad6254c5 960AC_MSG_RESULT($CMDLIB)
aa4d1e31 961AC_SUBST([LVM2CMD_LIB])
2a9a80c9 962test x$CMDLIB = xyes \
aa4d1e31
JM
963 && LVM2CMD_LIB=-llvm2cmd \
964 || LVM2CMD_LIB=
8106cdd5 965
f6fc418d
AK
966################################################################################
967dnl -- Enable pkg-config
71082be4
ZK
968AC_ARG_ENABLE(pkgconfig,
969 AC_HELP_STRING([--enable-pkgconfig], [install pkgconfig support]),
970 PKGCONFIG=$enableval, PKGCONFIG=no)
2a9a80c9 971
23b059e7
ZK
972################################################################################
973dnl -- Enable installation of writable files by user
71082be4
ZK
974AC_ARG_ENABLE(write_install,
975 AC_HELP_STRING([--enable-write_install],
976 [install user writable files]),
977 WRITE_INSTALL=$enableval, WRITE_INSTALL=no)
23b059e7 978
80992638 979################################################################################
8ce0cbda 980dnl -- Enable fsadm
1995c9ff 981AC_MSG_CHECKING(whether to install fsadm)
71082be4
ZK
982AC_ARG_ENABLE(fsadm, AC_HELP_STRING([--disable-fsadm], [disable fsadm]),
983 FSADM=$enableval)
ad6254c5 984AC_MSG_RESULT($FSADM)
809fae91 985
06f62ad1
AK
986################################################################################
987dnl -- enable dmeventd handling
988AC_MSG_CHECKING(whether to use dmeventd)
71082be4
ZK
989AC_ARG_ENABLE(dmeventd, AC_HELP_STRING([--enable-dmeventd],
990 [enable the device-mapper event daemon]),
991 DMEVENTD=$enableval)
06f62ad1
AK
992AC_MSG_RESULT($DMEVENTD)
993
f6fc418d
AK
994BUILD_DMEVENTD=$DMEVENTD
995
06f62ad1 996dnl -- dmeventd currently requires internal mirror support
2a9a80c9
PR
997if test x$DMEVENTD = xyes; then
998 if test x$MIRRORS != xinternal; then
999 AC_MSG_ERROR(
1000 --enable-dmeventd currently requires --with-mirrors=internal
1001 )
1002 fi
1003 if test x$CMDLIB = xno; then
1004 AC_MSG_ERROR(
1005 --enable-dmeventd requires --enable-cmdlib to be used as well
1006 )
1007 fi
06f62ad1
AK
1008fi
1009
15d91f5a 1010if test x$DMEVENTD = xyes; then
72b2cb61 1011 AC_DEFINE([DMEVENTD], 1, [Define to 1 to enable the device-mapper event daemon.])
15d91f5a 1012fi
f6fc418d
AK
1013
1014################################################################################
1015dnl -- getline included in recent libc
1016
1017AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1,
1018 [Define to 1 if getline is available.]))
1019
1020################################################################################
1021dnl -- canonicalize_file_name included in recent libc
1022
1023AC_CHECK_LIB(c, canonicalize_file_name,
1024 AC_DEFINE([HAVE_CANONICALIZE_FILE_NAME], 1,
1025 [Define to 1 if canonicalize_file_name is available.]))
1026
80992638 1027################################################################################
d0191583 1028dnl -- Clear default exec_prefix - install into /sbin rather than /usr/sbin
795ca3e5
AK
1029if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
1030 then exec_prefix="";
1031fi;
1032
80992638 1033################################################################################
8ce0cbda 1034dnl -- Check for dlopen
19a2c6e0 1035AC_CHECK_LIB(dl, dlopen, [
72b2cb61 1036 AC_DEFINE([HAVE_LIBDL], 1, [Define to 1 if dynamic libraries are available.])
19a2c6e0
ZK
1037 DL_LIBS="-ldl"
1038 HAVE_LIBDL=yes ], [
1039 DL_LIBS=
1040 HAVE_LIBDL=no ])
26e7f2e0 1041
80992638 1042################################################################################
8ce0cbda 1043dnl -- Check for shared/static conflicts
80992638
AK
1044if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \
1045 -o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \
cac52ca4 1046 -o "x$RAID" = xshared \
4922197a 1047 \) -a "x$STATIC_LINK" = xyes ]];
d68a82ec 1048 then AC_MSG_ERROR(
036f273a 1049Features cannot be 'shared' when building statically
d68a82ec 1050)
036f273a
AK
1051fi
1052
f30875db
ZK
1053################################################################################
1054if [[ "$DMEVENTD" = yes -o "$CLVMD" != none ]] ; then
1055 AC_CHECK_LIB([pthread], [pthread_mutex_lock],
1056 [PTHREAD_LIBS="-lpthread"], hard_bailout)
1057fi
1058
d0191583
JM
1059################################################################################
1060dnl -- Disable selinux
1061AC_MSG_CHECKING(whether to enable selinux support)
71082be4
ZK
1062AC_ARG_ENABLE(selinux,
1063 AC_HELP_STRING([--disable-selinux], [disable selinux support]),
1064 SELINUX=$enableval)
d0191583
JM
1065AC_MSG_RESULT($SELINUX)
1066
80992638 1067################################################################################
8a2fc586 1068dnl -- Check for selinux
80992638 1069if test x$SELINUX = xyes; then
f8f6ec92
ZK
1070 AC_CHECK_LIB([sepol], [sepol_check_context], [
1071 AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
1072 SELINUX_LIBS="-lsepol"])
8a2fc586 1073
f8f6ec92
ZK
1074 AC_CHECK_LIB([selinux], [is_selinux_enabled], [
1075 AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
7dfce0e4 1076 AC_CHECK_HEADERS([selinux/label.h])
72b2cb61 1077 AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
e1b8a236 1078 SELINUX_LIBS="-lselinux $SELINUX_LIBS"
f7f0854e 1079 SELINUX_PC="libselinux"
f8f6ec92 1080 HAVE_SELINUX=yes ], [
ad6254c5 1081 AC_MSG_WARN(Disabling selinux)
f8f6ec92 1082 SELINUX_LIBS=
f7f0854e 1083 SELINUX_PC=
f8f6ec92 1084 HAVE_SELINUX=no ])
036f273a 1085fi
d68a82ec 1086
8b1a3214
AK
1087################################################################################
1088dnl -- Check for realtime clock support
1089if test x$REALTIME = xyes; then
8b1a3214 1090 AC_CHECK_LIB(rt, clock_gettime, HAVE_REALTIME=yes, HAVE_REALTIME=no)
8b1a3214
AK
1091
1092 if test x$HAVE_REALTIME = xyes; then
1093 AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.])
1094 LIBS="-lrt $LIBS"
1095 else
1096 AC_MSG_WARN(Disabling realtime clock)
1097 fi
1098fi
1099
80992638 1100################################################################################
8ce0cbda 1101dnl -- Check for getopt
d0191583 1102AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.]))
b896caa1 1103
80992638 1104################################################################################
8ce0cbda 1105dnl -- Check for readline (Shamelessly copied from parted 1.4.17)
ea7cfb00 1106if test x$READLINE != xno; then
539f4a77
ZK
1107 lvm_saved_libs=$LIBS
1108 AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib],
1109 READLINE_LIBS=$ac_cv_search_tgetent, [
1110 if test "$READLINE" = yes; then
1111 AC_MSG_ERROR(
1112[termcap could not be found which is required for the
1113--enable-readline option (which is enabled by default). Either disable readline
1114support with --disable-readline or download and install termcap from:
1115 ftp.gnu.org/gnu/termcap
1116Note: if you are using precompiled packages you will also need the development
1117 package as well (which may be called termcap-devel or something similar).
1118Note: (n)curses also seems to work as a substitute for termcap. This was
1119 not found either - but you could try installing that as well.])
1120 fi])
1121 dnl -- Old systems may need extra termcap dependency explicitly in LIBS
1122 AC_CHECK_LIB([readline], [readline], [
1123 AC_DEFINE([READLINE_SUPPORT], 1,
1124 [Define to 1 to include the LVM readline shell.])
1125 dnl -- Try only with -lreadline and check for different symbol
1126 LIBS=$lvm_saved_libs
1127 AC_CHECK_LIB([readline], [rl_line_buffer],
1128 [ READLINE_LIBS="-lreadline" ], [
1129 AC_MSG_RESULT([linking -lreadline with $READLINE_LIBS needed])
1130 READLINE_LIBS="-lreadline $READLINE_LIBS"
1131 ]) ], [
1132 READLINE_LIBS=
1133 if test "$READLINE" = yes; then
1134 AC_MSG_ERROR(
1135[GNU Readline could not be found which is required for the
795ca3e5
AK
1136--enable-readline option (which is enabled by default). Either disable readline
1137support with --disable-readline or download and install readline from:
1138 ftp.gnu.org/gnu/readline
1139Note: if you are using precompiled packages you will also need the development
539f4a77
ZK
1140package as well (which may be called readline-devel or something similar).])
1141 fi ])
1142 LIBS="$READLINE_LIBS $lvm_saved_libs"
1143 AC_CHECK_FUNCS([rl_completion_matches])
1144 LIBS=$lvm_saved_libs
795ca3e5
AK
1145fi
1146
80992638 1147################################################################################
8ce0cbda 1148dnl -- Internationalisation stuff
ad6254c5 1149AC_MSG_CHECKING(whether to enable internationalisation)
71082be4
ZK
1150AC_ARG_ENABLE(nls,
1151 AC_HELP_STRING([--enable-nls], [enable Native Language Support]),
1152 INTL=$enableval, INTL=no)
ad6254c5 1153AC_MSG_RESULT($INTL)
69792976
AK
1154
1155if test x$INTL = xyes; then
f6fc418d 1156# FIXME - Move this - can be device-mapper too
69792976
AK
1157 INTL_PACKAGE="lvm2"
1158 AC_PATH_PROG(MSGFMT, msgfmt)
1159 if [[ "x$MSGFMT" == x ]];
1160 then AC_MSG_ERROR(
1161 msgfmt not found in path $PATH
1162 )
69792976
AK
1163 fi;
1164
1165 AC_ARG_WITH(localedir,
71082be4
ZK
1166 AC_HELP_STRING([--with-localedir=DIR],
1167 [translation files in DIR
1168 [[PREFIX/share/locale]]]),
1169 LOCALEDIR=$withval, LOCALEDIR='${prefix}/share/locale')
69792976
AK
1170fi
1171
80992638 1172################################################################################
4a7f3eb2 1173AC_ARG_WITH(confdir,
71082be4
ZK
1174 AC_HELP_STRING([--with-confdir=DIR],
1175 [configuration files in DIR [[/etc]]]),
1176 CONFDIR=$withval, CONFDIR="/etc")
0a62c911
AK
1177
1178AC_ARG_WITH(staticdir,
71082be4
ZK
1179 AC_HELP_STRING([--with-staticdir=DIR],
1180 [static binaries in DIR [[EPREFIX/sbin]]]),
1181 STATICDIR=$withval, STATICDIR='${exec_prefix}/sbin')
0a62c911 1182
68f2de6d 1183AC_ARG_WITH(usrlibdir,
71082be4
ZK
1184 AC_HELP_STRING([--with-usrlibdir=DIR],
1185 [usrlib in DIR [[PREFIX/lib]]]),
1186 usrlibdir=$withval, usrlibdir='${prefix}/lib')
68f2de6d
AK
1187
1188AC_ARG_WITH(usrsbindir,
71082be4
ZK
1189 AC_HELP_STRING([--with-usrsbindir=DIR],
1190 [usrsbin executables in DIR [[PREFIX/sbin]]]),
1191 usrsbindir=$withval, usrsbindir='${prefix}/sbin')
68f2de6d 1192
5d518f1f
AK
1193################################################################################
1194AC_ARG_WITH(udev_prefix,
71082be4
ZK
1195 AC_HELP_STRING([--with-udev-prefix=UPREFIX],
1196 [install udev rule files in UPREFIX [[EPREFIX]]]),
1197 udev_prefix=$withval, udev_prefix='${exec_prefix}')
5d518f1f 1198
78ce7acc 1199AC_ARG_WITH(udevdir,
71082be4
ZK
1200 AC_HELP_STRING([--with-udevdir=DIR],
1201 [udev rules in DIR [[UPREFIX/lib/udev/rules.d]]]),
1202 udevdir=$withval, udevdir='${udev_prefix}/lib/udev/rules.d')
5d518f1f 1203
e587cb6a
PR
1204################################################################################
1205dnl -- Get the systemd system unit dir value from pkg_config automatically if value not given explicitly.
1206dnl -- This follows the recommendation for systemd integration best practices mentioned in daemon(7) manpage.
1207AC_ARG_WITH(systemdsystemunitdir,
1208 AC_HELP_STRING([--with-systemdsystemunitdir=DIR],
1209 [systemd service files in DIR]),
1210 systemdsystemunitdir=$withval,
1211 pkg_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd))
1212
1213if test -n "$pkg_systemdsystemunitdir"; then
1214 systemdsystemunitdir=$pkg_systemdsystemunitdir;
1215fi
1216
1217if test -z "$systemdsystemunitdir"; then
1218 systemdsystemunitdir='/lib/systemd/system';
1219fi
ad6254c5 1220################################################################################
4417a8bd
PR
1221AC_ARG_WITH(tmpfilesdir,
1222 AC_HELP_STRING([--with-tmpfilesdir=DIR],
1223 [install configuration files for management of volatile files and directories in DIR [[SYSCONFDIR/tmpfiles.d]]]),
1224 tmpfilesdir=$withval, tmpfilesdir='${sysconfdir}/tmpfiles.d')
1225################################################################################
ad6254c5
AK
1226dnl -- Ensure additional headers required
1227if test x$READLINE = xyes; then
1228 AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out))
1229fi
1230
5c7fc7c4 1231if test x$CLVMD != xnone; then
ad6254c5
AK
1232 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))
1233 AC_CHECK_FUNCS(dup2 getmntent memmove select socket,,AC_MSG_ERROR(bailing out))
1234 AC_FUNC_GETMNTENT
ad6254c5
AK
1235 AC_FUNC_SELECT_ARGTYPES
1236fi
1237
ad6254c5
AK
1238if test x$CLUSTER != xnone; then
1239 AC_CHECK_HEADERS(sys/socket.h sys/un.h,,AC_MSG_ERROR(bailing out))
1240 AC_CHECK_FUNCS(socket,,AC_MSG_ERROR(bailing out))
1241fi
1242
d911ec67
AK
1243if test x$DMEVENTD = xyes; then
1244 AC_CHECK_HEADERS(arpa/inet.h,,AC_MSG_ERROR(bailing out))
1245fi
1246
ad6254c5
AK
1247if test x$HAVE_LIBDL = xyes; then
1248 AC_CHECK_HEADERS(dlfcn.h,,AC_MSG_ERROR(bailing out))
1249fi
1250
1251if test x$INTL = xyes; then
1252 AC_CHECK_HEADERS(libintl.h,,AC_MSG_ERROR(bailing out))
1253fi
1254
5d518f1f
AK
1255if test x$UDEV_SYNC = xyes; then
1256 AC_CHECK_HEADERS(sys/ipc.h sys/sem.h,,AC_MSG_ERROR(bailing out))
1257fi
1258
a653923f
AK
1259################################################################################
1260AC_PATH_PROG(MODPROBE_CMD, modprobe)
1261
1262if test x$MODPROBE_CMD != x; then
72b2cb61 1263 AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
a653923f
AK
1264fi
1265
a9b601e2
ZK
1266
1267lvm_exec_prefix=$exec_prefix
1268test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$prefix
1269test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$ac_default_prefix
d2c11605
ZK
1270LVM_PATH="$lvm_exec_prefix/sbin/lvm"
1271AC_DEFINE_UNQUOTED(LVM_PATH, ["$LVM_PATH"], [Path to lvm binary.])
b5c2529b
ZK
1272
1273if test "$CLVMD" != none; then
1274 clvmd_prefix=$ac_default_prefix
d2c11605 1275 CLVMD_PATH="$clvmd_prefix/sbin/clvmd"
b5c2529b 1276 test "$prefix" != NONE && clvmd_prefix=$prefix
d2c11605 1277 AC_DEFINE_UNQUOTED(CLVMD_PATH, ["$CLVMD_PATH"], [Path to clvmd binary.])
b5c2529b
ZK
1278fi
1279
80992638 1280################################################################################
f6fc418d 1281dnl -- dmeventd pidfile and executable path
f6fc418d
AK
1282if test "$BUILD_DMEVENTD" = yes; then
1283 AC_ARG_WITH(dmeventd-pidfile,
71082be4
ZK
1284 AC_HELP_STRING([--with-dmeventd-pidfile=PATH],
1285 [dmeventd pidfile [[/var/run/dmeventd.pid]]]),
1286 DMEVENTD_PIDFILE=$withval,
1287 DMEVENTD_PIDFILE="/var/run/dmeventd.pid")
1288 AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE, ["$DMEVENTD_PIDFILE"],
1289 [Path to dmeventd pidfile.])
f6fc418d
AK
1290fi
1291
f6fc418d 1292if test "$BUILD_DMEVENTD" = yes; then
f6fc418d 1293 AC_ARG_WITH(dmeventd-path,
71082be4
ZK
1294 AC_HELP_STRING([--with-dmeventd-path=PATH],
1295 [dmeventd path [[EPREFIX/sbin/dmeventd]]]),
1296 DMEVENTD_PATH=$withval,
1297 DMEVENTD_PATH="$lvm_exec_prefix/sbin/dmeventd")
1298 AC_DEFINE_UNQUOTED(DMEVENTD_PATH, ["$DMEVENTD_PATH"],
1299 [Path to dmeventd binary.])
f6fc418d
AK
1300fi
1301
8bae0a1e
AK
1302AH_TEMPLATE(DEFAULT_RUN_DIR, [Name of default run directory.])
1303AC_ARG_WITH(default-run-dir,
1304 [ --with-default-run-dir=DIR Default run directory [[/var/run/lvm]] ],
1305 [ DEFAULT_RUN_DIR="$withval" ],
1306 [ DEFAULT_RUN_DIR="/var/run/lvm" ])
1307AC_DEFINE_UNQUOTED(DEFAULT_RUN_DIR,["$DEFAULT_RUN_DIR"] )
1308
3399ae32
AK
1309################################################################################
1310dnl -- various defaults
3399ae32 1311AC_ARG_WITH(default-system-dir,
71082be4
ZK
1312 AC_HELP_STRING([--with-default-system-dir=DIR],
1313 [default LVM system directory [[/etc/lvm]]]),
1314 DEFAULT_SYS_DIR=$withval, DEFAULT_SYS_DIR="/etc/lvm")
1315AC_DEFINE_UNQUOTED(DEFAULT_SYS_DIR, ["$DEFAULT_SYS_DIR"],
1316 [Path to LVM system directory.])
3399ae32 1317
3399ae32 1318AC_ARG_WITH(default-archive-subdir,
71082be4
ZK
1319 AC_HELP_STRING([--with-default-archive-subdir=SUBDIR],
1320 [default metadata archive subdir [[archive]]]),
1321 DEFAULT_ARCHIVE_SUBDIR=$withval, DEFAULT_ARCHIVE_SUBDIR=archive)
1322AC_DEFINE_UNQUOTED(DEFAULT_ARCHIVE_SUBDIR, ["$DEFAULT_ARCHIVE_SUBDIR"],
1323 [Name of default metadata archive subdirectory.])
3399ae32 1324
3399ae32 1325AC_ARG_WITH(default-backup-subdir,
71082be4
ZK
1326 AC_HELP_STRING([--with-default-backup-subdir=SUBDIR],
1327 [default metadata backup subdir [[backup]]]),
1328 DEFAULT_BACKUP_SUBDIR=$withval, DEFAULT_BACKUP_SUBDIR=backup)
1329AC_DEFINE_UNQUOTED(DEFAULT_BACKUP_SUBDIR, ["$DEFAULT_BACKUP_SUBDIR"],
1330 [Name of default metadata backup subdirectory.])
3399ae32 1331
3399ae32 1332AC_ARG_WITH(default-cache-subdir,
71082be4
ZK
1333 AC_HELP_STRING([--with-default-cache-subdir=SUBDIR],
1334 [default metadata cache subdir [[cache]]]),
1335 DEFAULT_CACHE_SUBDIR=$withval, DEFAULT_CACHE_SUBDIR=cache)
1336AC_DEFINE_UNQUOTED(DEFAULT_CACHE_SUBDIR, ["$DEFAULT_CACHE_SUBDIR"],
1337 [Name of default metadata cache subdirectory.])
3399ae32 1338
3399ae32 1339AC_ARG_WITH(default-locking-dir,
71082be4
ZK
1340 AC_HELP_STRING([--with-default-locking-dir=DIR],
1341 [default locking directory [[/var/lock/lvm]]]),
1342 DEFAULT_LOCK_DIR=$withval, DEFAULT_LOCK_DIR="/var/lock/lvm")
1343AC_DEFINE_UNQUOTED(DEFAULT_LOCK_DIR, ["$DEFAULT_LOCK_DIR"],
1344 [Name of default locking directory.])
3399ae32 1345
7063efe1
MS
1346################################################################################
1347dnl -- Setup default data alignment
1348AC_ARG_WITH(default-data-alignment,
1349 AC_HELP_STRING([--with-default-data-alignment=NUM],
1350 [set the default data alignment in MiB [[1]]]),
1351 DEFAULT_DATA_ALIGNMENT=$withval, DEFAULT_DATA_ALIGNMENT=1)
1352AC_DEFINE_UNQUOTED(DEFAULT_DATA_ALIGNMENT, [$DEFAULT_DATA_ALIGNMENT],
1353 [Default data alignment.])
1354
f6fc418d
AK
1355################################################################################
1356dnl -- which kernel interface to use (ioctl only)
1357AC_MSG_CHECKING(for kernel interface choice)
1358AC_ARG_WITH(interface,
71082be4
ZK
1359 AC_HELP_STRING([--with-interface=IFACE],
1360 [choose kernel interface (ioctl) [[ioctl]]]),
1361 interface=$withval, interface=ioctl)
f6fc418d
AK
1362if [[ "x$interface" != xioctl ]];
1363then
1364 AC_MSG_ERROR(--with-interface=ioctl required. fs no longer supported.)
1365fi
1366AC_MSG_RESULT($interface)
1367
1368################################################################################
db8b5af9 1369DM_LIB_VERSION="\"`cat "$srcdir"/VERSION_DM 2>/dev/null || echo Unknown`\""
f58b35b5
AK
1370AC_DEFINE_UNQUOTED(DM_LIB_VERSION, $DM_LIB_VERSION, [Library version])
1371
db8b5af9 1372DM_LIB_PATCHLEVEL=`cat "$srcdir"/VERSION_DM | $AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}'`
597c3f8e 1373
db8b5af9 1374LVM_VERSION="\"`cat "$srcdir"/VERSION 2>/dev/null || echo Unknown`\""
fae0c576 1375
db8b5af9 1376VER=`cat "$srcdir"/VERSION`
bf456146 1377LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.* (//;s/).*//'`\""
ec6a6fbe
AK
1378VER=`echo "$VER" | $AWK '{print $1}'`
1379LVM_RELEASE="\"`echo "$VER" | $AWK -F '-' '{print $2}'`\""
1380VER=`echo "$VER" | $AWK -F '-' '{print $1}'`
1381LVM_MAJOR=`echo "$VER" | $AWK -F '.' '{print $1}'`
1382LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'`
bf456146
AK
1383LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[[(.]]' '{print $3}'`
1384LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'`
ec6a6fbe 1385
80992638 1386################################################################################
572fefeb 1387AC_SUBST(APPLIB)
aaa2e046 1388AC_SUBST(AWK)
66fd4529 1389AC_SUBST(BUILD_CMIRRORD)
d0191583 1390AC_SUBST(BUILD_DMEVENTD)
615534d3 1391AC_SUBST(BUILD_LVMETAD)
b896caa1 1392AC_SUBST(CFLAGS)
d0191583 1393AC_SUBST(CFLOW_CMD)
8106cdd5 1394AC_SUBST(CLDFLAGS)
8106cdd5 1395AC_SUBST(CLDNOWHOLEARCHIVE)
d0191583
JM
1396AC_SUBST(CLDWHOLEARCHIVE)
1397AC_SUBST(CLUSTER)
1398AC_SUBST(CLVMD)
34b6075d 1399AC_SUBST(CLVMD_CMANAGERS)
d2c11605 1400AC_SUBST(CLVMD_PATH)
a946372e
AK
1401AC_SUBST(CMAN_CFLAGS)
1402AC_SUBST(CMAN_LIBS)
b6d7a484
AK
1403AC_SUBST(CMAP_CFLAGS)
1404AC_SUBST(CMAP_LIBS)
d0191583 1405AC_SUBST(CMDLIB)
edf47283
AK
1406AC_SUBST(CONFDB_CFLAGS)
1407AC_SUBST(CONFDB_LIBS)
1408AC_SUBST(CONFDIR)
d0191583 1409AC_SUBST(COPTIMISE_FLAG)
edf47283
AK
1410AC_SUBST(CPG_CFLAGS)
1411AC_SUBST(CPG_LIBS)
d0191583 1412AC_SUBST(CSCOPE_CMD)
8ef2b021 1413AC_SUBST(DEBUG)
3399ae32
AK
1414AC_SUBST(DEFAULT_SYS_DIR)
1415AC_SUBST(DEFAULT_ARCHIVE_SUBDIR)
1416AC_SUBST(DEFAULT_BACKUP_SUBDIR)
1417AC_SUBST(DEFAULT_CACHE_SUBDIR)
7063efe1 1418AC_SUBST(DEFAULT_DATA_ALIGNMENT)
3399ae32 1419AC_SUBST(DEFAULT_LOCK_DIR)
b1f08e51 1420AC_SUBST(DEFAULT_RUN_DIR)
199e490e 1421AC_SUBST(DEVMAPPER)
a946372e
AK
1422AC_SUBST(DLM_CFLAGS)
1423AC_SUBST(DLM_LIBS)
19a2c6e0 1424AC_SUBST(DL_LIBS)
d0191583 1425AC_SUBST(DMEVENTD)
d1e8046f 1426AC_SUBST(DMEVENTD_PATH)
d0191583
JM
1427AC_SUBST(DM_COMPAT)
1428AC_SUBST(DM_DEVICE_GID)
1429AC_SUBST(DM_DEVICE_MODE)
1430AC_SUBST(DM_DEVICE_UID)
1431AC_SUBST(DM_IOCTLS)
1432AC_SUBST(DM_LIB_VERSION)
597c3f8e 1433AC_SUBST(DM_LIB_PATCHLEVEL)
bf09a320 1434AC_SUBST(ELDFLAGS)
d0191583 1435AC_SUBST(FSADM)
26e7f2e0 1436AC_SUBST(HAVE_LIBDL)
8b1a3214 1437AC_SUBST(HAVE_REALTIME)
d0191583
JM
1438AC_SUBST(INTL)
1439AC_SUBST(INTL_PACKAGE)
1440AC_SUBST(JOBS)
1441AC_SUBST(LDDEPS)
1442AC_SUBST(LIBS)
1443AC_SUBST(LIB_SUFFIX)
69792976 1444AC_SUBST(LOCALEDIR)
d0191583
JM
1445AC_SUBST(LVM1)
1446AC_SUBST(LVM1_FALLBACK)
d0191583 1447AC_SUBST(LVM_VERSION)
bf456146 1448AC_SUBST(LVM_LIBAPI)
ec6a6fbe
AK
1449AC_SUBST(LVM_MAJOR)
1450AC_SUBST(LVM_MINOR)
1451AC_SUBST(LVM_PATCHLEVEL)
d2c11605 1452AC_SUBST(LVM_PATH)
ec6a6fbe
AK
1453AC_SUBST(LVM_RELEASE)
1454AC_SUBST(LVM_RELEASE_DATE)
d0191583 1455AC_SUBST(MIRRORS)
cac52ca4 1456AC_SUBST(MSGFMT)
e40d44be 1457AC_SUBST(OCF)
349da06c 1458AC_SUBST(OCFDIR)
d0191583
JM
1459AC_SUBST(PKGCONFIG)
1460AC_SUBST(POOL)
f30875db 1461AC_SUBST(PTHREAD_LIBS)
edf47283
AK
1462AC_SUBST(QUORUM_CFLAGS)
1463AC_SUBST(QUORUM_LIBS)
cac52ca4 1464AC_SUBST(RAID)
539f4a77 1465AC_SUBST(READLINE_LIBS)
cac52ca4 1466AC_SUBST(REPLICATORS)
90c80887
AK
1467AC_SUBST(SACKPT_CFLAGS)
1468AC_SUBST(SACKPT_LIBS)
a946372e
AK
1469AC_SUBST(SALCK_CFLAGS)
1470AC_SUBST(SALCK_LIBS)
e1b8a236 1471AC_SUBST(SELINUX_LIBS)
f7f0854e 1472AC_SUBST(SELINUX_PC)
d0191583 1473AC_SUBST(SNAPSHOTS)
0a62c911 1474AC_SUBST(STATICDIR)
d0191583 1475AC_SUBST(STATIC_LINK)
1033d120 1476AC_SUBST(TESTING)
3ba4a195 1477AC_SUBST(THIN)
db724a44 1478AC_SUBST(UDEV_LIBS)
f7f0854e 1479AC_SUBST(UDEV_PC)
5d518f1f 1480AC_SUBST(UDEV_RULES)
4df024c4 1481AC_SUBST(UDEV_SYNC)
b559a1e6 1482AC_SUBST(UDEV_HAS_BUILTIN_BLKID)
5da88e5b
PR
1483AC_SUBST(CUNIT_LIBS)
1484AC_SUBST(CUNIT_CFLAGS)
23b059e7 1485AC_SUBST(WRITE_INSTALL)
395d204d 1486AC_SUBST(DMEVENTD_PIDFILE)
f6fc418d
AK
1487AC_SUBST(interface)
1488AC_SUBST(kerneldir)
1489AC_SUBST(missingkernel)
1490AC_SUBST(kernelvsn)
1491AC_SUBST(tmpdir)
5d518f1f
AK
1492AC_SUBST(udev_prefix)
1493AC_SUBST(udevdir)
e587cb6a 1494AC_SUBST(systemdsystemunitdir)
4417a8bd 1495AC_SUBST(tmpfilesdir)
68f2de6d
AK
1496AC_SUBST(usrlibdir)
1497AC_SUBST(usrsbindir)
8106cdd5 1498
80992638 1499################################################################################
d3a356b4 1500dnl -- First and last lines should not contain files to generate in order to
8ce0cbda 1501dnl -- keep utility scripts running properly
d3a356b4
JM
1502AC_CONFIG_FILES([
1503Makefile
1504make.tmpl
1505daemons/Makefile
1506daemons/clvmd/Makefile
5d311afb 1507daemons/cmirrord/Makefile
f6fc418d
AK
1508daemons/dmeventd/Makefile
1509daemons/dmeventd/libdevmapper-event.pc
b7edb5bf 1510daemons/dmeventd/plugins/Makefile
d3d98fdc 1511daemons/dmeventd/plugins/lvm2/Makefile
3041b72f 1512daemons/dmeventd/plugins/raid/Makefile
f6fc418d
AK
1513daemons/dmeventd/plugins/mirror/Makefile
1514daemons/dmeventd/plugins/snapshot/Makefile
2bc1d759 1515daemons/dmeventd/plugins/thin/Makefile
615534d3 1516daemons/lvmetad/Makefile
d3a356b4 1517doc/Makefile
da05c479 1518doc/example.conf
db8b5af9 1519include/.symlinks
f6fc418d
AK
1520include/Makefile
1521lib/Makefile
d3a356b4
JM
1522lib/format1/Makefile
1523lib/format_pool/Makefile
1524lib/locking/Makefile
1525lib/mirror/Makefile
8fea97b7 1526lib/replicator/Makefile
ec6a6fbe 1527lib/misc/lvm-version.h
40dbaac8 1528lib/raid/Makefile
d3a356b4 1529lib/snapshot/Makefile
3ba4a195 1530lib/thin/Makefile
832a1e73
AK
1531libdaemon/Makefile
1532libdaemon/client/Makefile
1533libdaemon/server/Makefile
f6fc418d
AK
1534libdm/Makefile
1535libdm/libdevmapper.pc
e0c64c6c 1536liblvm/Makefile
70046623 1537liblvm/liblvm2app.pc
f6fc418d
AK
1538man/Makefile
1539po/Makefile
2de38033 1540scripts/clvmd_init_red_hat
81410c8f 1541scripts/cmirrord_init_red_hat
a30491b2 1542scripts/lvm2_lvmetad_init_red_hat
dac3c36f 1543scripts/lvm2_lvmetad_systemd_red_hat.socket
da532741 1544scripts/lvm2_lvmetad_systemd_red_hat.service
595eaf92 1545scripts/lvm2_monitoring_init_red_hat
395d204d
PR
1546scripts/dm_event_systemd_red_hat.service
1547scripts/lvm2_monitoring_systemd_red_hat.service
4417a8bd 1548scripts/lvm2_tmpfiles_red_hat.conf
d3a356b4 1549scripts/Makefile
f6fc418d 1550test/Makefile
c7e363f9 1551test/api/Makefile
d4fed285 1552test/unit/Makefile
d3a356b4 1553tools/Makefile
5d518f1f 1554udev/Makefile
66392e66 1555unit-tests/datastruct/Makefile
15106c50 1556unit-tests/regex/Makefile
52e1564f 1557unit-tests/mm/Makefile
7a197a62
AK
1558])
1559AC_OUTPUT
2dc95e1c
AK
1560
1561if test x$ODIRECT != xyes; then
ad6254c5 1562 AC_MSG_WARN(Warning: O_DIRECT disabled: low-memory pvmove may lock up)
2dc95e1c 1563fi
This page took 0.279446 seconds and 5 git commands to generate.