[cairo-commit] 2 commits - configure.in src/cairo-mutex-private.h
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu Apr 19 13:53:38 PDT 2007
configure.in | 13 ++++++++++++-
src/cairo-mutex-private.h | 4 ++--
2 files changed, 14 insertions(+), 3 deletions(-)
New commits:
diff-tree 0ffb021e9b0cc2ec9afc3eaa360b4518327afa6c (from 813cdd71503ca2d77da011c91368e55cf20ad657)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Apr 19 16:52:51 2007 -0400
[cairo-mutex] If no mutex implementation is found, should #error instead of #warning
otherwise we will cause compile errors before the sanity check macros get
a chance to err.
diff --git a/src/cairo-mutex-private.h b/src/cairo-mutex-private.h
index a8b09f4..195b849 100644
--- a/src/cairo-mutex-private.h
+++ b/src/cairo-mutex-private.h
@@ -135,8 +135,8 @@ typedef int cairo_mutex_t;
#else /**********************************************************************/
-# warning "XXX: No mutex implementation found. Define CAIRO_NO_MUTEX to 1" \
- " to compile cairo without thread-safety support."
+# error "XXX: No mutex implementation found. Define CAIRO_NO_MUTEX to 1" \
+ " to compile cairo without thread-safety support."
#endif
diff-tree 813cdd71503ca2d77da011c91368e55cf20ad657 (from 6d01e89988ea89ae21f3461825583d89b6eef55e)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Apr 19 16:49:35 2007 -0400
[configure.in] Support --disable-pthread
Also allows for --enable-pthread=yes which will make configure abort
if pthread is not found (as opposed to silently disabling it).
diff --git a/configure.in b/configure.in
index 79d8d12..02c5ada 100644
--- a/configure.in
+++ b/configure.in
@@ -506,8 +506,19 @@ fi
dnl ===========================================================================
-AC_CHECK_HEADERS([pthread.h], have_pthread=yes, have_pthread=no)
+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
+ AC_CHECK_HEADERS([pthread.h], have_pthread=yes, have_pthread=no)
+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 ===========================================================================
More information about the cairo-commit
mailing list