summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2015-07-06 18:20:20 +0100
committerAlasdair G Kergon <agk@redhat.com>2015-07-06 18:20:20 +0100
commitc923dee8de0fd01ca1538ecf783fb6c1dfa9d127 (patch)
tree7a94bb6757f65fa6b3bbbd5ef10db8555bca4226 /configure.in
parent633aea92fbcb228417ac2b4a1ac3d808460d8df5 (diff)
downloadlvm2-c923dee8de0fd01ca1538ecf783fb6c1dfa9d127.tar.gz
configure: Separate sanlock and dlm lock config.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in189
1 files changed, 91 insertions, 98 deletions
diff --git a/configure.in b/configure.in
index 9e713aa15..783948029 100644
--- a/configure.in
+++ b/configure.in
@@ -1079,31 +1079,6 @@ AC_MSG_RESULT($LVMETAD)
BUILD_LVMETAD=$LVMETAD
-if test "$BUILD_LVMETAD" = yes; then
- AC_MSG_CHECKING([defaults for use_lvmetad])
- AC_ARG_ENABLE(use_lvmetad,
- AC_HELP_STRING([--disable-use-lvmetad],
- [disable usage of LVM Metadata Daemon]),
- [case ${enableval} in
- yes) DEFAULT_USE_LVMETAD=1 ;;
- *) DEFAULT_USE_LVMETAD=0 ;;
- esac], DEFAULT_USE_LVMETAD=1)
- AC_MSG_RESULT($DEFAULT_USE_LVMETAD)
- AC_DEFINE([LVMETAD_SUPPORT], 1, [Define to 1 to include code that uses lvmetad.])
-
- AC_ARG_WITH(lvmetad-pidfile,
- AC_HELP_STRING([--with-lvmetad-pidfile=PATH],
- [lvmetad pidfile [PID_DIR/lvmetad.pid]]),
- LVMETAD_PIDFILE=$withval,
- LVMETAD_PIDFILE="$DEFAULT_PID_DIR/lvmetad.pid")
- AC_DEFINE_UNQUOTED(LVMETAD_PIDFILE, ["$LVMETAD_PIDFILE"],
- [Path to lvmetad pidfile.])
-else
- DEFAULT_USE_LVMETAD=0
-fi
-AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMETAD, [$DEFAULT_USE_LVMETAD],
- [Use lvmetad by default.])
-
################################################################################
dnl -- Build lvmpolld
AC_MSG_CHECKING(whether to build lvmpolld)
@@ -1115,43 +1090,59 @@ AC_MSG_RESULT($LVMPOLLD)
BUILD_LVMPOLLD=$LVMPOLLD
-if test "$BUILD_LVMPOLLD" = yes; then
- AC_MSG_CHECKING([defaults for use_lvmpolld])
- AC_ARG_ENABLE(use_lvmpolld,
- AC_HELP_STRING([--disable-use-lvmpolld],
- [disable usage of LVM Poll Daemon]),
- [case ${enableval} in
- yes) DEFAULT_USE_LVMPOLLD=1 ;;
- *) DEFAULT_USE_LVMPOLLD=0 ;;
- esac], DEFAULT_USE_LVMPOLLD=1)
- AC_MSG_RESULT($DEFAULT_USE_LVMPOLLD)
- AC_DEFINE([LVMPOLLD_SUPPORT], 1, [Define to 1 to include code that uses lvmpolld.])
+################################################################################
+dnl -- Build lockdsanlock
+AC_MSG_CHECKING(whether to build lockdsanlock)
+AC_ARG_ENABLE(lockd-sanlock,
+ AC_HELP_STRING([--enable-lockd-sanlock],
+ [enable the LVM lock daemon using sanlock]),
+ LOCKDSANLOCK=$enableval)
+AC_MSG_RESULT($LOCKDSANLOCK)
- AC_ARG_WITH(lvmpolld-pidfile,
- AC_HELP_STRING([--with-lvmpolld-pidfile=PATH],
- [lvmpolld pidfile [PID_DIR/lvmpolld.pid]]),
- LVMPOLLD_PIDFILE=$withval,
- LVMPOLLD_PIDFILE="$DEFAULT_PID_DIR/lvmpolld.pid")
- AC_DEFINE_UNQUOTED(LVMPOLLD_PIDFILE, ["$LVMPOLLD_PIDFILE"],
- [Path to lvmpolld pidfile.])
-else
- DEFAULT_USE_LVMPOLLD=0
+BUILD_LOCKDSANLOCK=$LOCKDSANLOCK
+
+if test "$BUILD_LOCKDSANLOCK" = yes; then
+ AC_DEFINE([LOCKDSANLOCK_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd sanlock option.])
+fi
+
+################################################################################
+dnl -- Look for sanlock libraries
+if test "$BUILD_LOCKDSANLOCK" = yes; then
+ PKG_CHECK_MODULES(LOCKD_SANLOCK, libsanlock_client, [HAVE_LOCKD_SANLOCK=yes], $bailout)
+ BUILD_LVMLOCKD=yes
+fi
+
+################################################################################
+dnl -- Build lockddlm
+AC_MSG_CHECKING(whether to build lockddlm)
+AC_ARG_ENABLE(lockd-dlm,
+ AC_HELP_STRING([--enable-lockd-dlm],
+ [enable the LVM lock daemon using dlm]),
+ LOCKDDLM=$enableval)
+AC_MSG_RESULT($LOCKDDLM)
+
+BUILD_LOCKDDLM=$LOCKDDLM
+
+if test "$BUILD_LOCKDDLM" = yes; then
+ AC_DEFINE([LOCKDDLM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm option.])
+fi
+
+################################################################################
+dnl -- Look for dlm libraries
+if test "$BUILD_LOCKDDLM" = yes; then
+ PKG_CHECK_MODULES(LOCKD_DLM, libdlm, [HAVE_LOCKD_DLM=yes], $bailout)
+ BUILD_LVMLOCKD=yes
fi
-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
+AC_MSG_CHECKING(whether to build lvmlockd)
+AC_MSG_RESULT($BUILD_LVMLOCKD)
if test "$BUILD_LVMLOCKD" = yes; then
+ AS_IF([test -n "$BUILD_LVMPOLLD"], [BUILD_LVMPOLLD=yes; AC_MSG_WARN([Enabling lvmpolld - required by lvmlockd.])])
+ AS_IF([test -n "$BUILD_LVMETAD"], [BUILD_LVMETAD=yes; AC_MSG_WARN([Enabling lvmetad - required by lvmlockd.])])
AC_MSG_CHECKING([defaults for use_lvmlockd])
AC_ARG_ENABLE(use_lvmlockd,
AC_HELP_STRING([--disable-use-lvmlockd],
@@ -1177,46 +1168,58 @@ AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMLOCKD, [$DEFAULT_USE_LVMLOCKD],
[Use lvmlockd by default.])
################################################################################
-dnl -- Build lockdsanlock
-AC_MSG_CHECKING(whether to build lockdsanlock)
-AC_ARG_ENABLE(lockd-sanlock,
- AC_HELP_STRING([--enable-lockd-sanlock],
- [enable the LVM lock daemon sanlock option]),
- LOCKDSANLOCK=$enableval)
-AC_MSG_RESULT($LOCKDSANLOCK)
-
-BUILD_LOCKDSANLOCK=$LOCKDSANLOCK
-
-if test "$BUILD_LOCKDSANLOCK" = yes; then
- AC_DEFINE([LOCKDSANLOCK_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd sanlock option.])
-fi
-
-################################################################################
-dnl -- Build lockddlm
-AC_MSG_CHECKING(whether to build lockddlm)
-AC_ARG_ENABLE(lockd-dlm,
- AC_HELP_STRING([--enable-lockd-dlm],
- [enable the LVM lock daemon dlm option]),
- LOCKDDLM=$enableval)
-AC_MSG_RESULT($LOCKDDLM)
-
-BUILD_LOCKDDLM=$LOCKDDLM
+dnl -- Check lvmetad
+if test "$BUILD_LVMETAD" = yes; then
+ AC_MSG_CHECKING([defaults for use_lvmetad])
+ AC_ARG_ENABLE(use_lvmetad,
+ AC_HELP_STRING([--disable-use-lvmetad],
+ [disable usage of LVM Metadata Daemon]),
+ [case ${enableval} in
+ yes) DEFAULT_USE_LVMETAD=1 ;;
+ *) DEFAULT_USE_LVMETAD=0 ;;
+ esac], DEFAULT_USE_LVMETAD=1)
+ AC_MSG_RESULT($DEFAULT_USE_LVMETAD)
+ AC_DEFINE([LVMETAD_SUPPORT], 1, [Define to 1 to include code that uses lvmetad.])
-if test "$BUILD_LOCKDDLM" = yes; then
- AC_DEFINE([LOCKDDLM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm option.])
+ AC_ARG_WITH(lvmetad-pidfile,
+ AC_HELP_STRING([--with-lvmetad-pidfile=PATH],
+ [lvmetad pidfile [PID_DIR/lvmetad.pid]]),
+ LVMETAD_PIDFILE=$withval,
+ LVMETAD_PIDFILE="$DEFAULT_PID_DIR/lvmetad.pid")
+ AC_DEFINE_UNQUOTED(LVMETAD_PIDFILE, ["$LVMETAD_PIDFILE"],
+ [Path to lvmetad pidfile.])
+else
+ DEFAULT_USE_LVMETAD=0
fi
+AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMETAD, [$DEFAULT_USE_LVMETAD],
+ [Use lvmetad by default.])
################################################################################
-dnl -- Look for sanlock libraries
-if test "$BUILD_LOCKDSANLOCK" = yes; then
- PKG_CHECK_MODULES(LOCKD_SANLOCK, libsanlock_client, [HAVE_LOCKD_SANLOCK=yes], $bailout)
-fi
+dnl -- Check lvmpolld
+if test "$BUILD_LVMPOLLD" = yes; then
+ AC_MSG_CHECKING([defaults for use_lvmpolld])
+ AC_ARG_ENABLE(use_lvmpolld,
+ AC_HELP_STRING([--disable-use-lvmpolld],
+ [disable usage of LVM Poll Daemon]),
+ [case ${enableval} in
+ yes) DEFAULT_USE_LVMPOLLD=1 ;;
+ *) DEFAULT_USE_LVMPOLLD=0 ;;
+ esac], DEFAULT_USE_LVMPOLLD=1)
+ AC_MSG_RESULT($DEFAULT_USE_LVMPOLLD)
+ AC_DEFINE([LVMPOLLD_SUPPORT], 1, [Define to 1 to include code that uses lvmpolld.])
-################################################################################
-dnl -- Look for dlm libraries
-if test "$BUILD_LOCKDDLM" = yes; then
- PKG_CHECK_MODULES(LOCKD_DLM, libdlm, [HAVE_LOCKD_DLM=yes], $bailout)
+ AC_ARG_WITH(lvmpolld-pidfile,
+ AC_HELP_STRING([--with-lvmpolld-pidfile=PATH],
+ [lvmpolld pidfile [PID_DIR/lvmpolld.pid]]),
+ LVMPOLLD_PIDFILE=$withval,
+ LVMPOLLD_PIDFILE="$DEFAULT_PID_DIR/lvmpolld.pid")
+ AC_DEFINE_UNQUOTED(LVMPOLLD_PIDFILE, ["$LVMPOLLD_PIDFILE"],
+ [Path to lvmpolld pidfile.])
+else
+ DEFAULT_USE_LVMPOLLD=0
fi
+AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMPOLLD, [$DEFAULT_USE_LVMPOLLD],
+ [Use lvmpolld by default.])
################################################################################
@@ -2072,13 +2075,3 @@ 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])])
-
-AS_IF([test "$BUILD_LVMLOCKD" == yes && test "$BUILD_LOCKDDLM" == no && test "$BUILD_LOCKDSANLOCK" == no],
- [AC_MSG_WARN([lvmlockd requires enabling sanlock or dlm or both])])
-