Mesa (9.0): build: Set PTHREAD_LIBS for pkgconfig files if empty

Maarten Lankhorst mlankhorst at kemper.freedesktop.org
Fri Oct 5 15:32:47 UTC 2012


Module: Mesa
Branch: 9.0
Commit: c8fda5f44a02ab8c1c50a052edc6b189f34352ae
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8fda5f44a02ab8c1c50a052edc6b189f34352ae

Author: Matt Turner <mattst88 at gmail.com>
Date:   Thu Sep 27 15:49:52 2012 -0700

build: Set PTHREAD_LIBS for pkgconfig files if empty

(cherry picked from dd4fde8f674f5e3efa19e929f97de4ecfd82391b)

---

 configure.ac |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1a795ca..b8d0141 100644
--- a/configure.ac
+++ b/configure.ac
@@ -502,6 +502,10 @@ AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
 
 dnl Check for pthreads
 AX_PTHREAD
+dnl AX_PTHREADS leaves PTHREAD_LIBS empty for gcc and sets PTHREAD_CFLAGS
+dnl to -pthread, which causes problems if we need -lpthread to appear in
+dnl pkgconfig files.
+test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread"
 
 dnl SELinux awareness.
 AC_ARG_ENABLE([selinux],




More information about the mesa-commit mailing list