[libxslt] Make sure testThreads is linked with pthreads



commit c15693f6f42107bf459b30a50ea1b0ae25958a5e
Author: Daniel Veillard <veillard redhat com>
Date:   Thu Aug 20 12:21:52 2009 +0200

    Make sure testThreads is linked with pthreads
    
    * configure.in: augment thread detection to pass THREADS_LIBS
    * xsltproc/Makefile.am: add THREAD_LIBS to testThreads_LDADD

 configure.in         |    6 +++++-
 xsltproc/Makefile.am |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/configure.in b/configure.in
index 60f189f..de904d9 100644
--- a/configure.in
+++ b/configure.in
@@ -120,10 +120,14 @@ AM_PROG_LIBTOOL
 AC_CHECK_HEADERS(sys/types.h sys/time.h stdlib.h unistd.h string.h)
 
 dnl Look for pthread.h, needed for testThreads
+THREAD_LIBS=""
 AC_CHECK_HEADER(pthread.h,
     AC_CHECK_LIB(pthread, pthread_join,[
        AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)])
-       AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there]) ]))
+       AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there])
+       THREAD_LIBS="-lpthread"]))
+
+AC_SUBST(THREAD_LIBS)
 
 dnl
 dnl Detect supported locale
diff --git a/xsltproc/Makefile.am b/xsltproc/Makefile.am
index 7eb01e4..ae4421e 100644
--- a/xsltproc/Makefile.am
+++ b/xsltproc/Makefile.am
@@ -16,7 +16,7 @@ xsltproc_DEPENDENCIES = $(DEPS)
 testThreads_SOURCES=testThreads.c
 testThreads_LDFLAGS =
 testThreads_DEPENDENCIES = $(DEPS)
-testThreads_LDADD= $(LDADDS)
+testThreads_LDADD=  $(THREAD_LIBS) $(LDADDS)
 
 DEPS = $(top_builddir)/libxslt/libxslt.la \
 	$(top_builddir)/libexslt/libexslt.la 



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