From 1db01073e50a7030d3009e41ebedc9d9845471b3 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Thu, 18 Dec 2014 10:04:31 -0500 Subject: [PATCH] Build system fixes. libtoxcore.pc now has -lpthread like it's supposed to on systems where it is needed. --- configure.ac | 10 ++++++++-- libtoxav.pc.in | 4 ++-- libtoxcore.pc.in | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 93aecef6..ee516f80 100644 --- a/configure.ac +++ b/configure.ac @@ -489,6 +489,13 @@ AX_PTHREAD( ] ) +AC_CHECK_LIB([pthread], [pthread_self], + [ + PTHREAD_LDFLAGS="-lpthread" + AC_SUBST(PTHREAD_LDFLAGS) + ] +) + if test "x$BUILD_AV" = "xyes"; then PKG_CHECK_MODULES([OPUS], [opus], [], @@ -512,8 +519,7 @@ fi if test "x$BUILD_AV" = "xyes"; then # toxcore lib needs an global? # So far this works okay - ## What about pthread? - AV_LIBS="$OPUS_LIBS $VPX_LIBS -pthread" + AV_LIBS="$OPUS_LIBS $VPX_LIBS" AC_SUBST(AV_LIBS) AV_CFLAGS="$OPUS_CFLAGS $VPX_CFLAGS" diff --git a/libtoxav.pc.in b/libtoxav.pc.in index 05493231..b36b5a91 100644 --- a/libtoxav.pc.in +++ b/libtoxav.pc.in @@ -5,7 +5,7 @@ includedir=@includedir@ Name: libtoxav Description: Tox A/V library -Requires: +Requires: libtoxcore Version: @PACKAGE_VERSION@ Libs: -L${libdir} -ltoxav @AV_LIBS@ -Cflags: -I${includedir} \ No newline at end of file +Cflags: -I${includedir} diff --git a/libtoxcore.pc.in b/libtoxcore.pc.in index 57a7469e..0ff86827 100644 --- a/libtoxcore.pc.in +++ b/libtoxcore.pc.in @@ -7,5 +7,5 @@ Name: libtoxcore Description: Tox protocol library Requires: Version: @PACKAGE_VERSION@ -Libs: @NACL_OBJECTS_PKGCONFIG@ -L${libdir} @NACL_LDFLAGS@ -ltoxdns -ltoxencryptsave -ltoxcore @NACL_LIBS@ @LIBS@ @MATH_LDFLAGS@ +Libs: @NACL_OBJECTS_PKGCONFIG@ -L${libdir} @NACL_LDFLAGS@ -ltoxdns -ltoxencryptsave -ltoxcore @NACL_LIBS@ @LIBS@ @MATH_LDFLAGS@ @PTHREAD_LDFLAGS@ Cflags: -I${includedir}