diff --git a/configure b/configure index cced7bd3d..ff3a59b6b 100755 --- a/configure +++ b/configure @@ -742,6 +742,7 @@ CLDNOWHOLEARCHIVE CLDFLAGS CACHE BUILD_DMFILEMAPD +BUILD_LOCKDDLM_CONTROL BUILD_LOCKDDLM BUILD_LOCKDSANLOCK BUILD_LVMLOCKD @@ -771,6 +772,8 @@ BLKID_LIBS BLKID_CFLAGS NOTIFY_DBUS_LIBS NOTIFY_DBUS_CFLAGS +LOCKD_DLM_CONTROL_LIBS +LOCKD_DLM_CONTROL_CFLAGS LOCKD_DLM_LIBS LOCKD_DLM_CFLAGS LOCKD_SANLOCK_LIBS @@ -932,6 +935,7 @@ enable_devmapper enable_lvmpolld enable_lvmlockd_sanlock enable_lvmlockd_dlm +enable_lvmlockd_dlmcontrol enable_use_lvmlockd with_lvmlockd_pidfile enable_use_lvmpolld @@ -1000,6 +1004,8 @@ LOCKD_SANLOCK_CFLAGS LOCKD_SANLOCK_LIBS LOCKD_DLM_CFLAGS LOCKD_DLM_LIBS +LOCKD_DLM_CONTROL_CFLAGS +LOCKD_DLM_CONTROL_LIBS NOTIFY_DBUS_CFLAGS NOTIFY_DBUS_LIBS BLKID_CFLAGS @@ -1643,6 +1649,8 @@ Optional Features: --enable-lvmlockd-sanlock enable the LVM lock daemon using sanlock --enable-lvmlockd-dlm enable the LVM lock daemon using dlm + --enable-lvmlockd-dlmcontrol + enable lvmlockd remote refresh using libdlmcontrol --disable-use-lvmlockd disable usage of LVM lock daemon --disable-use-lvmpolld disable usage of LVM Poll Daemon --enable-dmfilemapd enable the dmstats filemap daemon @@ -1788,6 +1796,10 @@ Some influential environment variables: C compiler flags for LOCKD_DLM, overriding pkg-config LOCKD_DLM_LIBS linker flags for LOCKD_DLM, overriding pkg-config + LOCKD_DLM_CONTROL_CFLAGS + C compiler flags for LOCKD_DLM_CONTROL, overriding pkg-config + LOCKD_DLM_CONTROL_LIBS + linker flags for LOCKD_DLM_CONTROL, overriding pkg-config NOTIFY_DBUS_CFLAGS C compiler flags for NOTIFY_DBUS, overriding pkg-config NOTIFY_DBUS_LIBS @@ -3077,6 +3089,7 @@ case "$host_os" in BUILD_LVMPOLLD=no LOCKDSANLOCK=no LOCKDDLM=no + LOCKDDLM_CONTROL=no ODIRECT=yes DM_IOCTLS=yes SELINUX=yes @@ -10958,6 +10971,97 @@ $as_echo "#define LOCKDDLM_SUPPORT 1" >>confdefs.h BUILD_LVMLOCKD=yes fi +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lvmlockddlmcontrol" >&5 +$as_echo_n "checking whether to build lvmlockddlmcontrol... " >&6; } +# Check whether --enable-lvmlockd-dlmcontrol was given. +if test "${enable_lvmlockd_dlmcontrol+set}" = set; then : + enableval=$enable_lvmlockd_dlmcontrol; LOCKDDLM_CONTROL=$enableval +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCKDDLM_CONTROL" >&5 +$as_echo "$LOCKDDLM_CONTROL" >&6; } + +BUILD_LOCKDDLM_CONTROL=$LOCKDDLM_CONTROL + +if test "$BUILD_LOCKDDLM_CONTROL" = yes; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOCKD_DLM_CONTROL" >&5 +$as_echo_n "checking for LOCKD_DLM_CONTROL... " >&6; } + +if test -n "$LOCKD_DLM_CONTROL_CFLAGS"; then + pkg_cv_LOCKD_DLM_CONTROL_CFLAGS="$LOCKD_DLM_CONTROL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdlmcontrol >= 3.2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdlmcontrol >= 3.2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LOCKD_DLM_CONTROL_CFLAGS=`$PKG_CONFIG --cflags "libdlmcontrol >= 3.2" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LOCKD_DLM_CONTROL_LIBS"; then + pkg_cv_LOCKD_DLM_CONTROL_LIBS="$LOCKD_DLM_CONTROL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdlmcontrol >= 3.2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdlmcontrol >= 3.2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LOCKD_DLM_CONTROL_LIBS=`$PKG_CONFIG --libs "libdlmcontrol >= 3.2" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LOCKD_DLM_CONTROL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdlmcontrol >= 3.2" 2>&1` + else + LOCKD_DLM_CONTROL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdlmcontrol >= 3.2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LOCKD_DLM_CONTROL_PKG_ERRORS" >&5 + + $bailout +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + $bailout +else + LOCKD_DLM_CONTROL_CFLAGS=$pkg_cv_LOCKD_DLM_CONTROL_CFLAGS + LOCKD_DLM_CONTROL_LIBS=$pkg_cv_LOCKD_DLM_CONTROL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_LOCKD_DLM_CONTROL=yes +fi + +$as_echo "#define LOCKDDLM_CONTROL_SUPPORT 1" >>confdefs.h + + BUILD_LVMLOCKD=yes +fi + ################################################################################ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lvmlockd" >&5 $as_echo_n "checking whether to build lvmlockd... " >&6; } @@ -13784,6 +13888,7 @@ _ACEOF + ################################################################################ diff --git a/include/configure.h.in b/include/configure.h.in index ce4c326b9..a43053a58 100644 --- a/include/configure.h.in +++ b/include/configure.h.in @@ -295,9 +295,6 @@ /* Define to 1 if you have the `pselect' function. */ #undef HAVE_PSELECT -/* Define to 1 if you have the header file. */ -#undef HAVE_PTHREAD_H - /* Define to 1 if the system has the type `ptrdiff_t'. */ #undef HAVE_PTRDIFF_T @@ -537,6 +534,9 @@ /* Locale-dependent data */ #undef LOCALEDIR +/* Define to 1 to include code that uses lvmlockd dlm control option. */ +#undef LOCKDDLM_CONTROL_SUPPORT + /* Define to 1 to include code that uses lvmlockd dlm option. */ #undef LOCKDDLM_SUPPORT