summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2010-03-04 11:21:05 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2010-03-04 11:21:05 +0000
commitf30875dbc67a6ec3f2e94533f63173062748222e (patch)
tree78a0b81da736d2dbaac8fb6d2c9bfcea0490c67f /configure.in
parent539f4a77287ec4222f4e46cdeca18ab256dfe4b9 (diff)
downloadlvm2-f30875dbc67a6ec3f2e94533f63173062748222e.tar.gz
lvm2-f30875dbc67a6ec3f2e94533f63173062748222e.tar.xz
lvm2-f30875dbc67a6ec3f2e94533f63173062748222e.zip
Pthread linking change
Create new substituted variable PTHREAD_LIBS and link this library only with tools/libs which really needs it - i.e. dmeventd. Check for libpthread only for builds with clvmd or dmeventd. Remove variable LIB_PTHREAD
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index aeac331c..42e42356 100644
--- a/configure.in
+++ b/configure.in
@@ -809,6 +809,12 @@ Features cannot be 'shared' when building statically
fi
################################################################################
+if [[ "$DMEVENTD" = yes -o "$CLVMD" != none ]] ; then
+ AC_CHECK_LIB([pthread], [pthread_mutex_lock],
+ [PTHREAD_LIBS="-lpthread"], hard_bailout)
+fi
+
+################################################################################
dnl -- Disable selinux
AC_MSG_CHECKING(whether to enable selinux support)
AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support],
@@ -1125,6 +1131,7 @@ AC_SUBST(MSGFMT)
AC_SUBST(OWNER)
AC_SUBST(PKGCONFIG)
AC_SUBST(POOL)
+AC_SUBST(PTHREAD_LIBS)
AC_SUBST(QUORUM_CFLAGS)
AC_SUBST(QUORUM_LIBS)
AC_SUBST(READLINE_LIBS)
@@ -1138,7 +1145,6 @@ AC_SUBST(STATICDIR)
AC_SUBST(STATIC_LINK)
AC_SUBST(UDEV_RULES)
AC_SUBST(UDEV_SYNC)
-AC_SUBST([LIB_PTHREAD])
AC_SUBST(interface)
AC_SUBST(kerneldir)
AC_SUBST(missingkernel)