[cairo-commit] build/configure.ac.system configure.ac

Chris Wilson ickle at kemper.freedesktop.org
Mon Nov 2 04:53:37 PST 2009


 build/configure.ac.system |   12 ++++++++++
 configure.ac              |   51 +++++++++++++++++++---------------------------
 2 files changed, 34 insertions(+), 29 deletions(-)

New commits:
commit 9b42b6156d9916e64e19f2ccb0b43f4d1df72e79
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Nov 2 12:50:45 2009 +0000

    build: Add -pthread to real_pthread_CFLAGS

diff --git a/build/configure.ac.system b/build/configure.ac.system
index 3f6ab7e..5194fe0 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")
diff --git a/configure.ac b/configure.ac
index 325af10..ba3cbc0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,28 @@ AC_CACHE_SAVE
 
 dnl ===========================================================================
 
+AC_ARG_ENABLE(pthread,
+  AS_HELP_STRING([--disable-pthread],
+		 [Do not use pthread]),
+  [use_pthread=$enableval], [use_pthread=auto])
+
+have_pthread=no
+if test "x$use_pthread" != "xno"; then
+  pthread_REQUIRES="pthread-stubs"
+  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)"])])
+  if test "x$have_pthread" = "xyes"; then
+    AC_DEFINE([CAIRO_HAS_PTHREAD], 1, [Define to 1 if we have pthread support])
+  fi
+fi
+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
+
+dnl ===========================================================================
+
 AC_CHECK_LIB(z, compress,
 	 [AC_CHECK_HEADER(zlib.h, [
 	  have_libz=yes
@@ -478,35 +500,6 @@ fi
 
 dnl ===========================================================================
 
-AC_ARG_ENABLE(pthread,
-  AS_HELP_STRING([--disable-pthread],
-		 [Do not use pthread]),
-  [use_pthread=$enableval], [use_pthread=auto])
-
-have_pthread=no
-if test "x$use_pthread" != "xno"; then
-  pthread_REQUIRES="pthread-stubs"
-  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)"])])
-  if test "x$have_pthread" = "xyes"; then
-    AC_DEFINE([CAIRO_HAS_PTHREAD], 1, [Define to 1 if we have pthread support])
-  fi
-fi
-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
-
-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],[real_pthread_LIBS="-lpthread"], [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, [
     # The ps backend requires zlib.
     use_ps=$have_libz


More information about the cairo-commit mailing list