[Mesa-dev] [PATCH 01/16] build: Set PTHREAD_LIBS for pkgconfig files if empty

Matt Turner mattst88 at gmail.com
Thu Sep 27 15:58:05 PDT 2012


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

diff --git a/configure.ac b/configure.ac
index 896f98a..b67655d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -509,6 +509,10 @@ AC_CHECK_DECLS([signbit],[],
 
 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],
-- 
1.7.8.6



More information about the mesa-dev mailing list