[cairo-atomic] Do not use Intel atomic primitives on i386.

When limiting the target instruction set for compatibility with older
processors, e.g. -march=i386, the Intel atomic primitives generate a
call to a non-existent function, __sync_fetch_and_add_4(). To detect
this scenario change the configure test from AC_TRY_COMPILE to
AC_TRY_LINK which will then cause Cairo to fall back to using mutexes
for its atomic operations.
This commit is contained in:
Chris Wilson 2007-09-25 21:58:24 +01:00
parent 03be41151d
commit f1d84271d3

View file

@ -96,7 +96,7 @@ dnl
AC_MSG_CHECKING([for native atomic primitives])
cairo_atomic_primitives="none"
AC_TRY_COMPILE([int atomic_add(int i) { return __sync_fetch_and_add (&i, 1); }], [],
AC_TRY_LINK([int atomic_add(int i) { return __sync_fetch_and_add (&i, 1); }], [],
AC_DEFINE(CAIRO_HAS_INTEL_ATOMIC_PRIMITIVES, 1, [Enable if your compiler supports the Intel __sync_* atomic primitives])
cairo_atomic_primitives="Intel"
)