1 ###############################################################################
2 ## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
3 ## Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
5 ## This copyrighted material is made available to anyone wishing to use,
6 ## modify, copy, or redistribute it subject to the terms and conditions
7 ## of the GNU General Public License v.2.
9 ## You should have received a copy of the GNU General Public License
10 ## along with this program; if not, write to the Free Software Foundation,
11 ## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
12 ################################################################################
15 ################################################################################
16 dnl -- Process this file with autoconf to produce a configure script.
18 AC_CONFIG_SRCDIR([lib/device/dev-cache.h])
19 AC_CONFIG_HEADERS([lib/misc/configure.h])
21 ################################################################################
22 dnl -- Setup the directory where autoconf has auxilary files
23 AC_CONFIG_AUX_DIR(autoconf)
25 ################################################################################
26 dnl -- Get system type
27 AC_CANONICAL_TARGET([])
32 CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
33 CLDWHOLEARCHIVE="-Wl,-whole-archive"
34 CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
35 LDDEPS="$LDDEPS .export.sym"
36 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
47 CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
50 CLDWHOLEARCHIVE="-all_load"
63 ################################################################################
64 dnl -- Checks for programs.
69 dnl probably no longer needed in 2008, but...
70 AC_PROG_GCC_TRADITIONAL
76 AC_PATH_PROG(CFLOW_CMD, cflow)
77 AC_PATH_PROG(CSCOPE_CMD, cscope)
79 ################################################################################
80 dnl -- Check for header files.
86 AC_CHECK_HEADERS([locale.h stddef.h syslog.h sys/file.h sys/time.h assert.h \
87 libgen.h signal.h sys/mman.h sys/resource.h sys/utsname.h sys/wait.h time.h], ,
88 [AC_MSG_ERROR(bailing out)])
92 AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;;
94 AC_CHECK_HEADERS(machine/endian.h sys/disk.h,,AC_MSG_ERROR(bailing out)) ;;
97 AC_CHECK_HEADERS([ctype.h dirent.h errno.h fcntl.h getopt.h inttypes.h limits.h \
98 stdarg.h stdio.h stdlib.h string.h sys/ioctl.h sys/param.h sys/stat.h \
99 sys/types.h unistd.h], , [AC_MSG_ERROR(bailing out)])
100 AC_CHECK_HEADERS(termios.h sys/statvfs.h)
102 ################################################################################
103 dnl -- Check for typedefs, structures, and compiler characteristics.
106 AC_CHECK_MEMBERS([struct stat.st_rdev])
112 AC_CHECK_MEMBERS([struct stat.st_rdev])
115 ################################################################################
116 dnl -- Check for functions
117 AC_CHECK_FUNCS([gethostname getpagesize memset mkdir rmdir munmap setlocale \
118 strcasecmp strchr strdup strncasecmp strerror strrchr strstr strtol strtoul \
119 uname], , [AC_MSG_ERROR(bailing out)])
121 AC_FUNC_CLOSEDIR_VOID
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)
140 ################################################################################
141 dnl -- Prefix is /usr by default, the exec_prefix default is setup later
142 AC_PREFIX_DEFAULT(/usr)
144 ################################################################################
145 dnl -- Setup the ownership of the files
146 AC_MSG_CHECKING(file owner)
150 [ --with-user=USER Set the owner of installed files [[USER=root]] ],
151 [ OWNER="$withval" ])
152 AC_MSG_RESULT($OWNER)
154 if test x$OWNER != x; then
158 ################################################################################
159 dnl -- Setup the group ownership of the files
160 AC_MSG_CHECKING(group owner)
163 [ --with-group=GROUP Set the group owner of installed files [[GROUP=root]] ],
164 [ GROUP="$withval" ])
165 AC_MSG_RESULT($GROUP)
167 if test x$GROUP != x; then
171 ################################################################################
172 dnl -- Setup device node ownership
173 AC_MSG_CHECKING(device node uid)
175 AC_ARG_WITH(device-uid,
176 [ --with-device-uid=UID Set the owner used for new device nodes [[UID=0]] ],
177 [ DM_DEVICE_UID="$withval" ], [ DM_DEVICE_UID="0" ] )
178 AC_MSG_RESULT($DM_DEVICE_UID)
180 ################################################################################
181 dnl -- Setup device group ownership
182 AC_MSG_CHECKING(device node gid)
184 AC_ARG_WITH(device-gid,
185 [ --with-device-gid=UID Set the group used for new device nodes [[GID=0]] ],
186 [ DM_DEVICE_GID="$withval" ], [ DM_DEVICE_GID="0" ] )
187 AC_MSG_RESULT($DM_DEVICE_GID)
189 ################################################################################
190 dnl -- Setup device mode
191 AC_MSG_CHECKING(device node mode)
193 AC_ARG_WITH(device-mode,
194 [ --with-device-mode=MODE Set the mode used for new device nodes [[MODE=0600]] ],
195 [ DM_DEVICE_MODE="$withval" ], [ DM_DEVICE_MODE="0600" ] )
196 AC_MSG_RESULT($DM_DEVICE_MODE)
198 ################################################################################
199 dnl -- LVM1 tool fallback option
200 AC_MSG_CHECKING(whether to enable lvm1 fallback)
201 AC_ARG_ENABLE(lvm1_fallback, [ --enable-lvm1_fallback Use this to fall back and use LVM1 binaries if
202 device-mapper is missing from the kernel], LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no)
203 AC_MSG_RESULT($LVM1_FALLBACK)
205 if test x$LVM1_FALLBACK = xyes; then
206 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])
209 ################################################################################
210 dnl -- format1 inclusion type
211 AC_MSG_CHECKING(whether to include support for lvm1 metadata)
213 [ --with-lvm1=TYPE LVM1 metadata support: internal/shared/none
219 if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]];
221 --with-lvm1 parameter invalid
225 if test x$LVM1 = xinternal; then
226 AC_DEFINE([LVM1_INTERNAL], 1, [Define to 1 to include built-in support for LVM1 metadata.])
229 ################################################################################
230 dnl -- format_pool inclusion type
231 AC_MSG_CHECKING(whether to include support for GFS pool metadata)
233 [ --with-pool=TYPE GFS pool read-only support: internal/shared/none
239 if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]];
241 --with-pool parameter invalid
245 if test x$POOL = xinternal; then
246 AC_DEFINE([POOL_INTERNAL], 1, [Define to 1 to include built-in support for GFS pool metadata.])
249 ################################################################################
250 dnl -- cluster_locking inclusion type
251 AC_MSG_CHECKING(whether to include support for cluster locking)
253 [ --with-cluster=TYPE Cluster LVM locking support: internal/shared/none
255 [ CLUSTER="$withval" ])
256 AC_MSG_RESULT($CLUSTER)
258 if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]];
260 --with-cluster parameter invalid
264 if test x$CLUSTER = xinternal; then
265 AC_DEFINE([CLUSTER_LOCKING_INTERNAL], 1, [Define to 1 to include built-in support for clustered LVM locking.])
268 ################################################################################
269 dnl -- snapshots inclusion type
270 AC_MSG_CHECKING(whether to include snapshots)
271 AC_ARG_WITH(snapshots,
272 [ --with-snapshots=TYPE Snapshot support: internal/shared/none
274 [ SNAPSHOTS="$withval" ],
275 [ SNAPSHOTS="internal" ])
276 AC_MSG_RESULT($SNAPSHOTS)
278 if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]];
280 --with-snapshots parameter invalid
284 if test x$SNAPSHOTS = xinternal; then
285 AC_DEFINE([SNAPSHOT_INTERNAL], 1, [Define to 1 to include built-in support for snapshots.])
288 ################################################################################
289 dnl -- mirrors inclusion type
290 AC_MSG_CHECKING(whether to include mirrors)
292 [ --with-mirrors=TYPE Mirror support: internal/shared/none
294 [ MIRRORS="$withval" ],
295 [ MIRRORS="internal" ])
296 AC_MSG_RESULT($MIRRORS)
298 if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]];
300 --with-mirrors parameter invalid
304 if test x$MIRRORS = xinternal; then
305 AC_DEFINE([MIRRORED_INTERNAL], 1, [Define to 1 to include built-in support for mirrors.])
308 ################################################################################
309 dnl -- Disable readline
310 AC_MSG_CHECKING(whether to enable readline)
311 AC_ARG_ENABLE([readline],
312 [ --disable-readline Disable readline support],
313 [READLINE=$enableval], [READLINE=maybe])
314 AC_MSG_RESULT($READLINE)
316 ################################################################################
317 dnl -- Disable realtime clock support
318 AC_MSG_CHECKING(whether to enable realtime support)
319 AC_ARG_ENABLE(realtime, [ --disable-realtime Disable realtime clock support],
321 AC_MSG_RESULT($REALTIME)
323 ################################################################################
324 dnl -- Build cluster LVM daemon
325 AC_MSG_CHECKING(whether to build cluster LVM daemon)
327 [ --with-clvmd=TYPE Build cluster LVM Daemon: cman/gulm/none/all
329 [ CLVMD="$withval" ],
331 if test x$CLVMD = xyes; then
334 AC_MSG_RESULT($CLVMD)
336 dnl -- If clvmd enabled without cluster locking, automagically include it
337 if test x$CLVMD != xnone && test x$CLUSTER = xnone; then
341 ################################################################################
342 dnl -- Enable debugging
343 AC_MSG_CHECKING(whether to enable debugging)
344 AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging],
345 DEBUG=$enableval, DEBUG=no)
346 AC_MSG_RESULT($DEBUG)
348 dnl -- Normally turn off optimisation for debug builds
349 if test x$DEBUG = xyes; then
355 ################################################################################
356 dnl -- Override optimisation
357 AC_MSG_CHECKING(for C optimisation flag)
358 AC_ARG_WITH(optimisation,
359 [ --with-optimisation=OPT C optimisation flag [[OPT=-O2]] ],
360 [ COPTIMISE_FLAG="$withval" ])
361 AC_MSG_RESULT($COPTIMISE_FLAG)
363 ################################################################################
364 dnl -- Enable profiling
365 AC_MSG_CHECKING(whether to gather gcov profiling data)
366 AC_ARG_ENABLE(profiling,
367 AC_HELP_STRING(--enable-profiling, [Gather gcov profiling data]),
368 PROFILING=$enableval, PROFILING=no)
369 AC_MSG_RESULT($PROFILING)
371 if test "x$PROFILING" = xyes; then
372 COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage"
373 AC_PATH_PROG(LCOV, lcov, no)
374 AC_PATH_PROG(GENHTML, genhtml, no)
375 if test "$LCOV" = no -o "$GENHTML" = no ; then
376 AC_MSG_ERROR([lcov and genhtml are required for profiling])
380 ################################################################################
381 dnl -- Disable devmapper
382 AC_MSG_CHECKING(whether to use device-mapper)
383 AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable LVM2 device-mapper interaction],
384 DEVMAPPER=$enableval)
385 AC_MSG_RESULT($DEVMAPPER)
387 if test x$DEVMAPPER = xyes; then
388 AC_DEFINE([DEVMAPPER_SUPPORT], 1, [Define to 1 to enable LVM2 device-mapper interaction.])
391 ################################################################################
392 dnl -- Compatibility mode
393 AC_ARG_ENABLE(compat, [ --enable-compat Enable support for old device-mapper versions],
394 DM_COMPAT=$enableval, DM_COMPAT=no)
396 ################################################################################
398 AC_ARG_ENABLE(ioctl, [ --disable-driver Disable calls to device-mapper in the kernel],
399 DM_IOCTLS=$enableval)
401 ################################################################################
402 dnl -- Disable O_DIRECT
403 AC_MSG_CHECKING(whether to enable O_DIRECT)
404 AC_ARG_ENABLE(o_direct, [ --disable-o_direct Disable O_DIRECT],
406 AC_MSG_RESULT($ODIRECT)
408 if test x$ODIRECT = xyes; then
409 AC_DEFINE([O_DIRECT_SUPPORT], 1, [Define to 1 to enable O_DIRECT support.])
412 ################################################################################
414 AC_MSG_CHECKING(whether to compile liblvm2cmd.so)
415 AC_ARG_ENABLE(cmdlib, [ --enable-cmdlib Build shared command library],
416 CMDLIB=$enableval, CMDLIB=no)
417 AC_MSG_RESULT($CMDLIB)
418 AC_SUBST([LVM2CMD_LIB])
419 test x$CMDLIB = xyes \
420 && LVM2CMD_LIB=-llvm2cmd \
423 ################################################################################
424 dnl -- Enable pkg-config
425 AC_ARG_ENABLE(pkgconfig, [ --enable-pkgconfig Install pkgconfig support],
426 PKGCONFIG=$enableval, PKGCONFIG=no)
428 ################################################################################
430 AC_MSG_CHECKING(whether to install fsadm)
431 AC_ARG_ENABLE(fsadm, [ --enable-fsadm Enable fsadm],
433 AC_MSG_RESULT($FSADM)
435 ################################################################################
436 dnl -- enable dmeventd handling
437 AC_MSG_CHECKING(whether to use dmeventd)
438 AC_ARG_ENABLE(dmeventd, [ --enable-dmeventd Enable the device-mapper event daemon],
440 AC_MSG_RESULT($DMEVENTD)
442 BUILD_DMEVENTD=$DMEVENTD
444 dnl -- dmeventd currently requires internal mirror support
445 if test x$DMEVENTD = xyes; then
446 if test x$MIRRORS != xinternal; then
448 --enable-dmeventd currently requires --with-mirrors=internal
451 if test x$CMDLIB = xno; then
453 --enable-dmeventd requires --enable-cmdlib to be used as well
458 if test x$DMEVENTD = xyes; then
459 AC_DEFINE([DMEVENTD], 1, [Define to 1 to enable the device-mapper event daemon.])
462 ################################################################################
463 dnl -- getline included in recent libc
465 AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1,
466 [Define to 1 if getline is available.]))
468 ################################################################################
469 dnl -- canonicalize_file_name included in recent libc
471 AC_CHECK_LIB(c, canonicalize_file_name,
472 AC_DEFINE([HAVE_CANONICALIZE_FILE_NAME], 1,
473 [Define to 1 if canonicalize_file_name is available.]))
475 ################################################################################
476 dnl -- Clear default exec_prefix - install into /sbin rather than /usr/sbin
477 if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
481 ################################################################################
482 dnl -- Check for termcap (Shamelessly copied from parted 1.4.17)
483 if test x$READLINE != xno; then
484 AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib],
485 [tg_found=yes], [tg_found=no])
486 test x$READLINE:$tg_found = xyes:no &&
488 termcap could not be found which is required for the
489 --enable-readline option (which is enabled by default). Either disable readline
490 support with --disable-readline or download and install termcap from:
491 ftp.gnu.org/gnu/termcap
492 Note: if you are using precompiled packages you will also need the development
493 package as well (which may be called termcap-devel or something similar).
494 Note: (n)curses also seems to work as a substitute for termcap. This was
495 not found either - but you could try installing that as well.
499 ################################################################################
500 dnl -- Check for dlopen
501 AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no)
503 if [[ "x$HAVE_LIBDL" = xyes ]]; then
504 AC_DEFINE([HAVE_LIBDL], 1, [Define to 1 if dynamic libraries are available.])
510 ################################################################################
511 dnl -- Check for shared/static conflicts
512 if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \
513 -o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \
514 \) -a "x$STATIC_LINK" = xyes ]];
516 Features cannot be 'shared' when building statically
520 ################################################################################
521 dnl -- Disable selinux
522 AC_MSG_CHECKING(whether to enable selinux support)
523 AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support],
525 AC_MSG_RESULT($SELINUX)
527 ################################################################################
528 dnl -- Check for selinux
529 if test x$SELINUX = xyes; then
530 AC_CHECK_LIB(sepol, sepol_check_context, HAVE_SEPOL=yes, HAVE_SEPOL=no)
532 if test x$HAVE_SEPOL = xyes; then
533 AC_DEFINE([HAVE_SEPOL], 1,
534 [Define to 1 if sepol_check_context is available.])
538 AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes, HAVE_SELINUX=no)
540 if test x$HAVE_SELINUX = xyes; then
541 AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
542 LIBS="-lselinux $LIBS"
544 AC_MSG_WARN(Disabling selinux)
547 # With --enable-static_link and selinux enabled, linking
548 # fails on at least Debian unstable due to unsatisfied references
549 # to pthread_mutex_lock and _unlock. See if we need -lpthread.
550 if test "$STATIC_LINK-$HAVE_SELINUX" = yes-yes; then
553 AC_SEARCH_LIBS([pthread_mutex_lock], [pthread],
554 [test "$ac_cv_search_pthread_mutex_lock" = "none required" ||
555 LIB_PTHREAD=-lpthread])
560 ################################################################################
561 dnl -- Check for realtime clock support
562 if test x$REALTIME = xyes; then
563 AC_CHECK_LIB(rt, clock_gettime, HAVE_REALTIME=yes, HAVE_REALTIME=no)
565 if test x$HAVE_REALTIME = xyes; then
566 AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.])
569 AC_MSG_WARN(Disabling realtime clock)
573 ################################################################################
574 dnl -- Check for getopt
575 AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.]))
577 ################################################################################
578 dnl -- Check for readline (Shamelessly copied from parted 1.4.17)
579 if test x$READLINE != xno; then
581 AC_CHECK_LIB([readline], [readline], , [rl_found=no])
582 test x$READLINE:$rl_found = xyes:no &&
584 GNU Readline could not be found which is required for the
585 --enable-readline option (which is enabled by default). Either disable readline
586 support with --disable-readline or download and install readline from:
587 ftp.gnu.org/gnu/readline
588 Note: if you are using precompiled packages you will also need the development
589 package as well (which may be called readline-devel or something similar).
591 if test $rl_found = yes; then
592 AC_CHECK_FUNCS([rl_completion_matches])
593 AC_DEFINE([READLINE_SUPPORT], 1,
594 [Define to 1 to include the LVM readline shell.])
598 ################################################################################
599 dnl -- Internationalisation stuff
600 AC_MSG_CHECKING(whether to enable internationalisation)
601 AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],
602 INTL=$enableval, INTL=no)
605 if test x$INTL = xyes; then
606 # FIXME - Move this - can be device-mapper too
608 AC_PATH_PROG(MSGFMT, msgfmt)
609 if [[ "x$MSGFMT" == x ]];
611 msgfmt not found in path $PATH
615 AC_ARG_WITH(localedir,
616 [ --with-localedir=DIR Translation files in DIR [[PREFIX/share/locale]] ],
617 [ LOCALEDIR="$withval" ],
618 [ LOCALEDIR='${prefix}/share/locale' ])
621 ################################################################################
623 [ --with-confdir=DIR Configuration files in DIR [/etc]],
624 [ CONFDIR="$withval" ],
627 AC_ARG_WITH(staticdir,
628 [ --with-staticdir=DIR Static binary in DIR [EXEC_PREFIX/sbin]],
629 [ STATICDIR="$withval" ],
630 [ STATICDIR='${exec_prefix}/sbin' ])
632 AC_ARG_WITH(usrlibdir,
633 [ --with-usrlibdir=DIR],
634 [ usrlibdir="$withval"],
635 [ usrlibdir='${prefix}/lib' ])
637 AC_ARG_WITH(usrsbindir,
638 [ --with-usrsbindir=DIR],
639 [ usrsbindir="$withval"],
640 [ usrsbindir='${prefix}/sbin' ])
642 ################################################################################
643 dnl -- Ensure additional headers required
644 if test x$READLINE = xyes; then
645 AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out))
648 if test x$CLVMD != xnone; then
649 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))
650 AC_CHECK_FUNCS(dup2 getmntent memmove select socket,,AC_MSG_ERROR(bailing out))
653 AC_FUNC_SELECT_ARGTYPES
656 if test x$CLUSTER != xnone; then
657 AC_CHECK_HEADERS(sys/socket.h sys/un.h,,AC_MSG_ERROR(bailing out))
658 AC_CHECK_FUNCS(socket,,AC_MSG_ERROR(bailing out))
661 if test x$HAVE_LIBDL = xyes; then
662 AC_CHECK_HEADERS(dlfcn.h,,AC_MSG_ERROR(bailing out))
665 if test x$INTL = xyes; then
666 AC_CHECK_HEADERS(libintl.h,,AC_MSG_ERROR(bailing out))
669 if test x$HAVE_SELINUX = xyes; then
670 AC_CHECK_HEADERS(selinux/selinux.h,,AC_MSG_ERROR(bailing out))
673 ################################################################################
674 AC_PATH_PROG(MODPROBE_CMD, modprobe)
676 if test x$MODPROBE_CMD != x; then
677 AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
680 ################################################################################
681 dnl -- dmeventd pidfile and executable path
682 AH_TEMPLATE(DMEVENTD_PIDFILE, [Path to dmeventd pidfile.])
683 if test "$BUILD_DMEVENTD" = yes; then
684 AC_ARG_WITH(dmeventd-pidfile,
685 [ --with-dmeventd-pidfile=PATH dmeventd pidfile [[/var/run/dmeventd.pid]] ],
686 [ AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE,"$withval") ],
687 [ AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE,"/var/run/dmeventd.pid") ])
690 AH_TEMPLATE(DMEVENTD_PATH, [Path to dmeventd binary.])
691 if test "$BUILD_DMEVENTD" = yes; then
692 dmeventd_prefix="$exec_prefix"
693 if test "x$dmeventd_prefix" = "xNONE"; then
694 dmeventd_prefix="$prefix"
696 if test "x$dmeventd_prefix" = "xNONE"; then
699 AC_ARG_WITH(dmeventd-path,
700 [ --with-dmeventd-path=PATH dmeventd path [[${exec_prefix}/sbin/dmeventd]] ],
701 [ AC_DEFINE_UNQUOTED(DMEVENTD_PATH,"$withval") ],
702 [ AC_DEFINE_UNQUOTED(DMEVENTD_PATH,"$dmeventd_prefix/sbin/dmeventd") ])
705 ################################################################################
706 dnl -- which kernel interface to use (ioctl only)
707 AC_MSG_CHECKING(for kernel interface choice)
708 AC_ARG_WITH(interface,
709 [ --with-interface=IFACE Choose kernel interface (ioctl) [[ioctl]] ],
710 [ interface="$withval" ],
712 if [[ "x$interface" != xioctl ]];
714 AC_MSG_ERROR(--with-interface=ioctl required. fs no longer supported.)
716 AC_MSG_RESULT($interface)
718 ################################################################################
719 DM_LIB_VERSION="\"`cat VERSION_DM 2>/dev/null || echo Unknown`\""
720 AC_DEFINE_UNQUOTED(DM_LIB_VERSION, $DM_LIB_VERSION, [Library version])
722 DM_LIB_PATCHLEVEL=`cat VERSION_DM | awk -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}'`
724 LVM_VERSION="\"`cat VERSION 2>/dev/null || echo Unknown`\""
726 ################################################################################
727 AC_SUBST(BUILD_DMEVENTD)
731 AC_SUBST(CLDNOWHOLEARCHIVE)
732 AC_SUBST(CLDWHOLEARCHIVE)
736 AC_SUBST(COPTIMISE_FLAG)
742 AC_SUBST(DM_DEVICE_GID)
743 AC_SUBST(DM_DEVICE_MODE)
744 AC_SUBST(DM_DEVICE_UID)
746 AC_SUBST(DM_LIB_VERSION)
747 AC_SUBST(DM_LIB_PATCHLEVEL)
751 AC_SUBST(HAVE_REALTIME)
752 AC_SUBST(HAVE_SELINUX)
754 AC_SUBST(INTL_PACKAGE)
761 AC_SUBST(LVM1_FALLBACK)
763 AC_SUBST(LVM_VERSION)
771 AC_SUBST(STATIC_LINK)
772 AC_SUBST([LIB_PTHREAD])
775 AC_SUBST(missingkernel)
781 ################################################################################
782 dnl -- First and last lines should not contain files to generate in order to
783 dnl -- keep utility scripts running properly
788 daemons/clvmd/Makefile
789 daemons/dmeventd/Makefile
790 daemons/dmeventd/libdevmapper-event.pc
791 daemons/dmeventd/plugins/Makefile
792 daemons/dmeventd/plugins/mirror/Makefile
793 daemons/dmeventd/plugins/snapshot/Makefile
798 lib/format_pool/Makefile
801 lib/snapshot/Makefile
803 libdm/libdevmapper.pc
806 scripts/clvmd_init_red_hat
815 if test x$ODIRECT != xyes; then
816 AC_MSG_WARN(Warning: O_DIRECT disabled: low-memory pvmove may lock up)