[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 1/5] build: rely on gnulib's pthread module



No need to repeat the work already provided by gnulib.

* bootstrap.conf (gnulib_modules): Add pthread.
* configure.ac: Drop all pthread.h checks.
* src/Makefile.am (libvirt_lxc_LDADD): Ensure proper link.
---
 bootstrap.conf  |    1 +
 configure.ac    |    8 --------
 src/Makefile.am |    3 ++-
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 785489b..da7cc9c 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -43,6 +43,7 @@ perror
 physmem
 poll
 posix-shell
+pthread
 recv
 random_r
 send
diff --git a/configure.ac b/configure.ac
index f883ef7..cfefc02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,14 +138,6 @@ AM_CONDITIONAL([HAVE_GLIBC_RPCGEN],
 	       [test "x$ac_cv_path_RPCGEN" != "xno" &&
 	        $ac_cv_path_RPCGEN -t </dev/null >/dev/null 2>&1])

-dnl pthread?
-AC_CHECK_HEADER([pthread.h],
-	[AC_CHECK_LIB([pthread],[pthread_join],[
-		AC_DEFINE([HAVE_LIBPTHREAD],[],[Define if pthread (-lpthread)])
-		AC_DEFINE([HAVE_PTHREAD_H],[],[Define if <pthread.h>])
-		LIBS="-lpthread $LIBS"
-	])])
-
 dnl Miscellaneous external programs.
 AC_PATH_PROG([RM], [rm], [/bin/rm])
 AC_PATH_PROG([MV], [mv], [/bin/mv])
diff --git a/src/Makefile.am b/src/Makefile.am
index d8466f0..b14b63a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -984,7 +984,8 @@ libvirt_lxc_SOURCES =						\
 		$(CPU_CONF_SOURCES)				\
 		$(NWFILTER_PARAM_CONF_SOURCES)
 libvirt_lxc_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDCFLAGS) $(CAPNG_LIBS) $(YAJL_LIBS)
-libvirt_lxc_LDADD = $(LIBXML_LIBS) $(NUMACTL_LIBS) ../gnulib/lib/libgnu.la
+libvirt_lxc_LDADD = $(LIBXML_LIBS) $(NUMACTL_LIBS) $(LIB_PTHREAD) \
+		../gnulib/lib/libgnu.la
 libvirt_lxc_CFLAGS =				\
 		$(LIBPARTED_CFLAGS)		\
 		$(NUMACTL_CFLAGS)		\
-- 
1.6.6.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]