summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-11-02 12:50:45 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2009-11-02 12:50:45 +0000
commit9b42b6156d9916e64e19f2ccb0b43f4d1df72e79 (patch)
tree402367f725999ee9ce43a1e5b3af94e7c76c7742 /build
parent3eecf2f60c85e0195360ff3c3a54d58ceaa4a6f1 (diff)
build: Add -pthread to real_pthread_CFLAGS
Diffstat (limited to 'build')
-rw-r--r--build/configure.ac.system12
1 files changed, 12 insertions, 0 deletions
diff --git a/build/configure.ac.system b/build/configure.ac.system
index 3f6ab7e2d..5194fe072 100644
--- a/build/configure.ac.system
+++ b/build/configure.ac.system
@@ -162,3 +162,15 @@ dnl Test for the tools required for building one big test binary
dnl
AC_CHECK_FUNCS(fork waitpid raise)
+
+dnl ===========================================================================
+
+have_real_pthread=no
+real_pthread_REQUIRES="pthread"
+PKG_CHECK_MODULES(real_pthread, $real_pthread_REQUIRES,
+ [have_real_pthread=yes],
+ [AC_CHECK_HEADERS([pthread.h],
+ [CAIRO_CC_TRY_FLAG("-pthread",, real_pthread_CFLAGS="-pthread", real_pthread_CFLAGS="")
+ real_pthread_LIBS="-lpthread"],
+ [have_real_pthread="no (requires $real_pthread_REQUIRES)"])])
+AM_CONDITIONAL(HAVE_REAL_PTHREAD, test "x$have_real_pthread" = "xyes")