[cairo-commit] configure.ac util/cairo-sphinx

Chris Wilson ickle at kemper.freedesktop.org
Mon Nov 2 04:05:09 PST 2009


 configure.ac                  |    7 +++++++
 util/cairo-sphinx/Makefile.am |    5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 837eb577b4707e447fafb0dfca378ecf4ea3fda5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Nov 2 11:56:29 2009 +0000

    sphinx: Add required pthread libs
    
    Switching to pthread-stubs broke the build for sphinx on unbroken
    platforms [those that do not unnecessarily link against -lpthreads].

diff --git a/configure.ac b/configure.ac
index 2680f21..e5582a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -498,6 +498,13 @@ if test "x$have_pthread" = xno -a "x$use_pthread" = xyes; then
   AC_MSG_ERROR([pthread requested but not found])
 fi
 
+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],, [have_real_pthread="no (requires $real_pthread_REQUIRES)"])])
+AM_CONDITIONAL(HAVE_REAL_PTHREAD, test "x$have_real_pthread" = "xyes")
+
 dnl ===========================================================================
 
 CAIRO_ENABLE_SURFACE_BACKEND(ps, PostScript, yes, [
diff --git a/util/cairo-sphinx/Makefile.am b/util/cairo-sphinx/Makefile.am
index 845888c..adc5659 100644
--- a/util/cairo-sphinx/Makefile.am
+++ b/util/cairo-sphinx/Makefile.am
@@ -16,14 +16,15 @@ cairo_sphinx_la_LIBADD = -ldl
 
 cairo_sphinx_SOURCES = sphinx.c
 cairo_sphinx_CPPFLAGS = $(AM_CPPFLAGS) -DLIBDIR="\"$(cairolibdir)\""
-cairo_sphinx_CFLAGS = $(CAIRO_CFLAGS) $(glib_CFLAGS)
+cairo_sphinx_CFLAGS = $(REAL_PTHREAD_CFLAGS) $(CAIRO_CFLAGS) $(glib_CFLAGS)
 cairo_sphinx_LDADD = \
         $(top_builddir)/util/cairo-script/libcairo-script-interpreter.la \
         $(top_builddir)/boilerplate/libcairoboilerplate.la	\
 	$(top_builddir)/src/libcairo.la 			\
 	$(glib_LIBS) 						\
 	$(CAIRO_LDADD)						\
-	-lrt
+	-lrt							\
+	$(REAL_PTHREAD_LIBS)
 cairo_sphinx_DEPENDENCIES = \
         $(top_builddir)/util/cairo-script/libcairo-script-interpreter.la \
         $(top_builddir)/boilerplate/libcairoboilerplate.la	\


More information about the cairo-commit mailing list