summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2023-02-20 21:01:31 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2023-02-23 16:46:35 +0100
commitad66600e480d49c22372231c0a56ea3bf5a9b842 (patch)
tree4e86e1f8c68694e72b5fb8196193f5a944b3f514 /configure.ac
parentd91bc6904dce256b06687217ec66caba15b33a7a (diff)
downloadlvm2-ad66600e480d49c22372231c0a56ea3bf5a9b842.tar.gz
configure.ac: update dlm check
Check for pkg-config --libs libdlm_lt and test if the returned value contains word 'pthread' - if so, it's likely a buggy result from incorrect config file and use directly -ldlm_lt for this case.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 86f4941d8..06184be62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -928,8 +928,13 @@ AC_MSG_RESULT([$BUILD_LOCKDDLM])
dnl -- Look for dlm libraries
AS_IF([test "$BUILD_LOCKDDLM" = "yes"], [
- PKG_CHECK_MODULES(LIBDLM, libdlm, [BUILD_LVMLOCKD="yes"], $bailout)
+ PKG_CHECK_MODULES(LIBDLM, libdlm_lt, [BUILD_LVMLOCKD="yes"], $bailout)
AC_DEFINE([LOCKDDLM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm option.])
+ AS_CASE(["$LIBDLM_LIBS"],
+ [*lpthread*], [
+ dnl -- pkg-congig for libdlm_lt may give us libdlm with libpthread
+ AC_MSG_RESULT([replacing pkg-config --libs libdlm_lt "$LIBDLM_LIBS" with... -ldlm_lt])
+ LIBDLM_LIBS="${LIBDLM_LIBS%%ldlm*}ldlm_lt"])
])
################################################################################
@@ -961,6 +966,7 @@ AS_IF([test "$BUILD_LOCKDIDM" = "yes"], [
PKG_CHECK_EXISTS(blkid >= 2.24, [
PKG_CHECK_MODULES(LIBSEAGATEILM, [libseagate_ilm >= 0.1.0], [BUILD_LVMLOCKD="yes"], $bailout)
AC_DEFINE([LOCKDIDM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd IDM option.])
+ AS_IF([test -z "$LIBSEAGATEILM_LIBS"], [LIBSEAGATEILM_LIBS="-lseagate_ilm"])
], $bailout)
])