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