diff options
author | Benjamin Otte <otte@redhat.com> | 2010-01-25 20:05:56 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-01-25 20:13:48 +0100 |
commit | bac513a85dc8ef2915b2e60d034cf3dbc82a8e0c (patch) | |
tree | bb8efa95e3b1ab0e6fb65a7e2f1ea009f9221f9a /configure.ac | |
parent | 582604f7b6b5b2ab6e681245bc7cde64d4995307 (diff) |
build: Fix pthread detection
THe pthread.h detection code didn't pass -lpthread or -pthread to Cairo.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index b4f5aa7d..97b0ecf8 100644 --- a/configure.ac +++ b/configure.ac @@ -38,10 +38,14 @@ AC_ARG_ENABLE(pthread, have_pthread=no if test "x$use_pthread" != "xno"; then - pthread_REQUIRES="pthread-stubs" + pthread_REQUIRES="pthread" PKG_CHECK_MODULES(pthread, $pthread_REQUIRES, [use_pthread=yes; have_pthread=yes], - [AC_CHECK_HEADERS([pthread.h], [use_pthread=yes; have_pthread=yes], [use_pthread="no (requires $pthread_REQUIRES)"])]) + [AC_CHECK_HEADERS([pthread.h], [use_pthread=yes; + pthread_CFLAGS="-pthread" + pthread_LIBS="-pthread" + have_pthread=yes + ], [use_pthread="no (requires $pthread_REQUIRES)"])]) if test "x$have_pthread" = "xyes"; then AC_DEFINE([CAIRO_HAS_PTHREAD], 1, [Define to 1 if we have pthread support]) fi @@ -50,6 +54,8 @@ AM_CONDITIONAL(HAVE_PTHREAD, test "x$have_pthread" = "xyes") if test "x$have_pthread" = xno -a "x$use_pthread" = xyes; then AC_MSG_ERROR([pthread requested but not found]) fi +CAIRO_CFLAGS="$CAIRO_CFLAGS $pthread_CFLAGS" +CAIRO_LIBS="$CAIRO_LIBS $pthread_LIBS" dnl =========================================================================== |