summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2010-04-28 17:23:47 +0200
committerAndrea Canciani <ranma42@gmail.com>2010-04-29 10:52:48 +0200
commit248af38b3efa3f96225eea43f4ba5b94baff34a6 (patch)
treee47b1d5bc644d021a6f483934248b50c04fab761 /build
parent56a367a1626b2b7ec3d9e64e74f016867f294a34 (diff)
atomic: Add MacOSX atomic implementation
Enable atomic operation on MacOS X, using the functions provided by libkern/OSAtomic.h Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'build')
-rw-r--r--build/aclocal.cairo.m410
1 files changed, 10 insertions, 0 deletions
diff --git a/build/aclocal.cairo.m4 b/build/aclocal.cairo.m4
index 482763eb..f271ccf9 100644
--- a/build/aclocal.cairo.m4
+++ b/build/aclocal.cairo.m4
@@ -174,6 +174,11 @@ int atomic_cmpxchg(int i, int j, int k) { return __sync_val_compare_and_swap (&i
AC_CHECK_HEADER([atomic_ops.h],
cairo_cv_atomic_primitives="libatomic-ops")
fi
+
+ if test "x$cairo_cv_atomic_primitives" = "xnone"; then
+ AC_CHECK_HEADER([libkern/OSAtomic.h],
+ cairo_cv_atomic_primitives="OSAtomic")
+ fi
])
if test "x$cairo_cv_atomic_primitives" = xIntel; then
AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1,
@@ -184,6 +189,11 @@ int atomic_cmpxchg(int i, int j, int k) { return __sync_val_compare_and_swap (&i
AC_DEFINE(HAVE_LIB_ATOMIC_OPS, 1,
[Enable if you have libatomic-ops-dev installed])
fi
+
+ if test "x$cairo_cv_atomic_primitives" = xOSAtomic; then
+ AC_DEFINE(HAVE_OS_ATOMIC_OPS, 1,
+ [Enable if you have MacOS X atomic operations])
+ fi
])
dnl Usage: