@@ -36,7 +36,7 @@ AM_CPPFLAGS = -DAMDGPU_ASIC_ID_TABLE=\"${libdrmdatadir}/amdgpu.ids\"
libdrm_amdgpu_la_LTLIBRARIES = libdrm_amdgpu.la
libdrm_amdgpu_ladir = $(libdir)
libdrm_amdgpu_la_LDFLAGS = -version-number 1:0:0 -no-undefined
-libdrm_amdgpu_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
+libdrm_amdgpu_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @ATOMIC_OPS_LIBS@
libdrm_amdgpu_la_SOURCES = $(LIBDRM_AMDGPU_FILES)
amdgpu_asic_id.lo: $(top_srcdir)/data/amdgpu.ids
@@ -247,7 +247,7 @@ AC_CACHE_CHECK([for native atomic primitives], drm_cv_atomic_primitives, [
]],[[]])], [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")
+ PKG_CHECK_MODULES(ATOMIC_OPS, [atomic_ops], drm_cv_atomic_primitives="libatomic-ops", true)
fi
# atomic functions defined in <atomic.h> & libc on Solaris
@@ -12,7 +12,8 @@ libdrm_etnaviv_la_LDFLAGS = -version-number 1:0:0 -no-undefined
libdrm_etnaviv_la_LIBADD = \
../libdrm.la \
@PTHREADSTUBS_LIBS@ \
- @CLOCK_LIB@
+ @CLOCK_LIB@ \
+ @ATOMIC_OPS_LIBS@
libdrm_etnaviv_la_SOURCES = $(LIBDRM_ETNAVIV_FILES)
@@ -14,7 +14,8 @@ libdrm_freedreno_la_LDFLAGS = -version-number 1:0:0 -no-undefined
libdrm_freedreno_la_LIBADD = \
../libdrm.la \
@PTHREADSTUBS_LIBS@ \
- @CLOCK_LIB@
+ @CLOCK_LIB@ \
+ @ATOMIC_OPS_LIBS@
libdrm_freedreno_la_SOURCES = $(LIBDRM_FREEDRENO_FILES)
if HAVE_FREEDRENO_KGSL
@@ -38,7 +38,8 @@ libdrm_intel_la_LDFLAGS = -version-number 1:0:0 -no-undefined
libdrm_intel_la_LIBADD = ../libdrm.la \
@PTHREADSTUBS_LIBS@ \
@PCIACCESS_LIBS@ \
- @CLOCK_LIB@
+ @CLOCK_LIB@ \
+ @ATOMIC_OPS_LIBS@
libdrm_intel_la_SOURCES = $(LIBDRM_INTEL_FILES)
@@ -10,7 +10,7 @@ AM_CFLAGS = \
libdrm_nouveau_la_LTLIBRARIES = libdrm_nouveau.la
libdrm_nouveau_ladir = $(libdir)
libdrm_nouveau_la_LDFLAGS = -version-number 2:0:0 -no-undefined
-libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
+libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @ATOMIC_OPS_LIBS@
libdrm_nouveau_la_SOURCES = $(LIBDRM_NOUVEAU_FILES)
@@ -7,7 +7,7 @@ AM_CFLAGS = \
libdrm_omap_la_LTLIBRARIES = libdrm_omap.la
libdrm_omap_ladir = $(libdir)
libdrm_omap_la_LDFLAGS = -version-number 1:0:0 -no-undefined
-libdrm_omap_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
+libdrm_omap_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @ATOMIC_OPS_LIBS@
libdrm_omap_la_SOURCES = omap_drm.c
@@ -33,7 +33,7 @@ AM_CFLAGS = \
libdrm_radeon_la_LTLIBRARIES = libdrm_radeon.la
libdrm_radeon_ladir = $(libdir)
libdrm_radeon_la_LDFLAGS = -version-number 1:0:1 -no-undefined
-libdrm_radeon_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
+libdrm_radeon_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @ATOMIC_OPS_LIBS@
libdrm_radeon_la_SOURCES = $(LIBDRM_RADEON_FILES)
@@ -9,7 +9,7 @@ AM_CFLAGS = \
libdrm_tegra_ladir = $(libdir)
libdrm_tegra_la_LTLIBRARIES = libdrm_tegra.la
libdrm_tegra_la_LDFLAGS = -version-number 0:0:0 -no-undefined
-libdrm_tegra_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
+libdrm_tegra_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @ATOMIC_OPS_LIBS@
libdrm_tegra_la_SOURCES = \
private.h \