summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-03-05 14:00:44 -0600
committerDavid Teigland <teigland@redhat.com>2015-07-02 15:42:26 -0500
commitfe70b03de2956b6493993990d9fb1cde3f41ebcd (patch)
tree20313364aa6f69c38993ac9b7a95a3c496484d06 /configure.in
parenta32d5a4afc5bdc4585132765fb02739a8f352e49 (diff)
downloadlvm2-fe70b03de2956b6493993990d9fb1cde3f41ebcd.tar.gz
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in57
1 files changed, 57 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 0c310ca7c..21ce5814a 100644
--- a/configure.in
+++ b/configure.in
@@ -39,6 +39,7 @@ case "$host_os" in
DEVMAPPER=yes
LVMETAD=no
LVMPOLLD=no
+ LVMLOCKD=no
ODIRECT=yes
DM_IOCTLS=yes
SELINUX=yes
@@ -1138,6 +1139,50 @@ AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMPOLLD, [$DEFAULT_USE_LVMPOLLD],
[Use lvmpolld by default.])
################################################################################
+dnl -- Build lvmlockd
+AC_MSG_CHECKING(whether to build lvmlockd)
+AC_ARG_ENABLE(lvmlockd,
+ AC_HELP_STRING([--enable-lvmlockd],
+ [enable the LVM lock daemon]),
+ LVMLOCKD=$enableval)
+AC_MSG_RESULT($LVMLOCKD)
+
+BUILD_LVMLOCKD=$LVMLOCKD
+
+if test "$BUILD_LVMLOCKD" = yes; then
+ AC_MSG_CHECKING([defaults for use_lvmlockd])
+ AC_ARG_ENABLE(use_lvmlockd,
+ AC_HELP_STRING([--disable-use-lvmlockd],
+ [disable usage of LVM lock daemon]),
+ [case ${enableval} in
+ yes) DEFAULT_USE_LVMLOCKD=1 ;;
+ *) DEFAULT_USE_LVMLOCKD=0 ;;
+ esac], DEFAULT_USE_LVMLOCKD=1)
+ AC_MSG_RESULT($DEFAULT_USE_LVMLOCKD)
+ AC_DEFINE([LVMLOCKD_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd.])
+
+ AC_ARG_WITH(lvmlockd-pidfile,
+ AC_HELP_STRING([--with-lvmlockd-pidfile=PATH],
+ [lvmlockd pidfile [PID_DIR/lvmlockd.pid]]),
+ LVMLOCKD_PIDFILE=$withval,
+ LVMLOCKD_PIDFILE="$DEFAULT_PID_DIR/lvmlockd.pid")
+ AC_DEFINE_UNQUOTED(LVMLOCKD_PIDFILE, ["$LVMLOCKD_PIDFILE"],
+ [Path to lvmlockd pidfile.])
+else
+ DEFAULT_USE_LVMLOCKD=0
+fi
+AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMLOCKD, [$DEFAULT_USE_LVMLOCKD],
+ [Use lvmlockd by default.])
+
+################################################################################
+dnl -- Look for sanlock and dlm libraries
+if test "$BUILD_LVMLOCKD" = yes; then
+ PKG_CHECK_MODULES(LOCKD_SANLOCK, libsanlock_client, [HAVE_LOCKD_SANLOCK=yes], $bailout)
+ PKG_CHECK_MODULES(LOCKD_DLM, libdlm, [HAVE_LOCKD_DLM=yes], $bailout)
+fi
+
+################################################################################
+
dnl -- Enable blkid wiping functionality
AC_MSG_CHECKING(whether to enable libblkid detection of signatures when wiping)
AC_ARG_ENABLE(blkid_wiping,
@@ -1758,6 +1803,7 @@ AC_SUBST(BUILD_CMIRRORD)
AC_SUBST(BUILD_DMEVENTD)
AC_SUBST(BUILD_LVMETAD)
AC_SUBST(BUILD_LVMPOLLD)
+AC_SUBST(BUILD_LVMLOCKD)
AC_SUBST(CACHE)
AC_SUBST(CFLAGS)
AC_SUBST(CFLOW_CMD)
@@ -1798,6 +1844,7 @@ AC_SUBST(DEFAULT_SYS_DIR)
AC_SUBST(DEFAULT_USE_BLKID_WIPING)
AC_SUBST(DEFAULT_USE_LVMETAD)
AC_SUBST(DEFAULT_USE_LVMPOLLD)
+AC_SUBST(DEFAULT_USE_LVMLOCKD)
AC_SUBST(DEVMAPPER)
AC_SUBST(DLM_CFLAGS)
AC_SUBST(DLM_LIBS)
@@ -1875,6 +1922,7 @@ AC_SUBST(WRITE_INSTALL)
AC_SUBST(DMEVENTD_PIDFILE)
AC_SUBST(LVMETAD_PIDFILE)
AC_SUBST(LVMPOLLD_PIDFILE)
+AC_SUBST(LVMLOCKD_PIDFILE)
AC_SUBST(CLVMD_PIDFILE)
AC_SUBST(CMIRRORD_PIDFILE)
AC_SUBST(interface)
@@ -1909,6 +1957,7 @@ daemons/dmeventd/plugins/snapshot/Makefile
daemons/dmeventd/plugins/thin/Makefile
daemons/lvmetad/Makefile
daemons/lvmpolld/Makefile
+daemons/lvmlockd/Makefile
conf/Makefile
conf/example.conf
conf/lvmlocal.conf
@@ -1955,6 +2004,8 @@ scripts/lvm2_lvmetad_systemd_red_hat.socket
scripts/lvm2_lvmpolld_init_red_hat
scripts/lvm2_lvmpolld_systemd_red_hat.service
scripts/lvm2_lvmpolld_systemd_red_hat.socket
+scripts/lvm2_lvmlockd_systemd_red_hat.service
+scripts/lvm2_lvmlocking_systemd_red_hat.service
scripts/lvm2_monitoring_init_red_hat
scripts/lvm2_monitoring_systemd_red_hat.service
scripts/lvm2_pvscan_systemd_red_hat@.service
@@ -1982,3 +2033,9 @@ AS_IF([test -n "$CACHE_CONFIGURE_WARN"],
AS_IF([test "$ODIRECT" != yes],
[AC_MSG_WARN([O_DIRECT disabled: low-memory pvmove may lock up])])
+
+AS_IF([test "$BUILD_LVMLOCKD" == yes && test "$BUILD_LVMPOLLD" == no],
+ [AC_MSG_WARN([lvmlockd requires lvmpolld])])
+
+AS_IF([test "$BUILD_LVMLOCKD" == yes && test "$BUILD_LVMETAD" == no],
+ [AC_MSG_WARN([lvmlockd requires lvmetad])])