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