summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac51
1 files changed, 22 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac
index 325af109..ba3cbc06 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