aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-10-13 15:13:00 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-10-13 15:13:00 +0100
commit901bacd29cb5b242f68302b8384de6e193413a49 (patch)
treefe4d79398d1f986c81fabe85d93010cd5939646f /configure.ac
parent24c905f84120a7b0bcd7c5e86c58e908b9e850f9 (diff)
intel: Fallback to atomic-ops.h [libatomic-ops-dev]
Use the external implementation for atomic operations across a wide range of architectures. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index fd6f696b..7efc4d4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,15 +163,23 @@ if test "x$INTEL" != "xno"; then
], [],
drm_cv_atomic_primitives="Intel"
)
+
+ if test "x$drm_cv_atomic_primitives" = "xnone"; then
+ AC_CHECK_HEADER([atomic_ops.h], drm_cv_atomic_primitives="libatomic-ops")
+ fi
+
])
if test "x$drm_cv_atomic_primitives" = xIntel; then
AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1,
[Enable if your compiler supports the Intel __sync_* atomic primitives])
fi
+ if test "x$drm_cv_atomic_primitives" = "xlibatomic-ops"; then
+ AC_DEFINE(HAVE_LIB_ATOMIC_OPS, 1, [Enable if you have libatomic-ops-dev installed])
+ fi
if test "x$drm_cv_atomic_primitives" = "xnone"; then
if test "x$INTEL" != "xauto"; then
- AC_MSG_ERROR([libdrm_intel depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or disable support for Intel GPUs by passing --disable-intel to ./configure])
+ AC_MSG_ERROR([libdrm_intel depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or install the libatomics-op-dev package, or, failing both of those, disable support for Intel GPUs by passing --disable-intel to ./configure])
else
INTEL=no
fi