From 68b7dc75cf93146682cedb18e7f9efb9491601c4 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 17 Aug 2012 19:08:18 -0700 Subject: Link to pthreads library --- configure.ac | 4 ++++ orc.pc.in | 2 +- orc/Makefile.am | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 2163e07..c7eb199 100644 --- a/configure.ac +++ b/configure.ac @@ -111,8 +111,12 @@ case "${host_os}" in ;; *) AC_DEFINE(HAVE_THREAD_PTHREAD, 1, [Use pthread thread code]) + PTHREAD_CFLAGS= + PTHREAD_LIBS=-lpthread ;; esac +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_LIBS) AC_ARG_ENABLE(backend, AC_HELP_STRING([--enable-backend],[sse,mmx,neon,arm,all (default all)]), diff --git a/orc.pc.in b/orc.pc.in index eb8a280..d1ffd2e 100644 --- a/orc.pc.in +++ b/orc.pc.in @@ -9,7 +9,7 @@ Name: orc-@ORC_MAJORMINOR@ Description: Library of Optimized Inner Loops Runtime Compiler Version: @VERSION@ Libs: -L${libdir} -lorc-@ORC_MAJORMINOR@ -Libs.private: @LIBM@ @LIBRT@ +Libs.private: @LIBM@ @LIBRT@ @PTHREAD_LIBS@ Cflags: -I${includedir} orcc=${toolsdir}/orcc@EXEEXT@ diff --git a/orc/Makefile.am b/orc/Makefile.am index 172b77b..1b6d879 100644 --- a/orc/Makefile.am +++ b/orc/Makefile.am @@ -3,7 +3,7 @@ pkgincludedir = $(includedir)/orc-@ORC_MAJORMINOR@/orc lib_LTLIBRARIES = liborc-@ORC_MAJORMINOR@.la -liborc_@ORC_MAJORMINOR@_la_LIBADD = $(LIBM) $(LIBRT) +liborc_@ORC_MAJORMINOR@_la_LIBADD = $(LIBM) $(LIBRT) $(PTHREAD_LIBS) liborc_@ORC_MAJORMINOR@_la_LDFLAGS = \ -version-info $(ORC_LIBVERSION) \ -no-undefined -export-symbols-regex 'orc_' -- cgit v1.2.1