diff options
author | tnn <tnn@pkgsrc.org> | 2010-04-19 18:46:15 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2010-04-19 18:46:15 +0000 |
commit | f5cab1ae295190e55510c43b6538da04c99c14f9 (patch) | |
tree | 765bb556b8c1cfcfd98e4299935724e980335513 /x11/libdrm/Makefile | |
parent | 6f905731c689044e73d45c3af8b6ef7ebc69e15e (diff) | |
download | pkgsrc-f5cab1ae295190e55510c43b6538da04c99c14f9.tar.gz |
clean up atomic ops handling and use devel/libatomic_ops as a fallback.
Based on patch from Dennis den Brok.
Diffstat (limited to 'x11/libdrm/Makefile')
-rw-r--r-- | x11/libdrm/Makefile | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/x11/libdrm/Makefile b/x11/libdrm/Makefile index c151583c25e..4304d666a62 100644 --- a/x11/libdrm/Makefile +++ b/x11/libdrm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2010/04/16 13:43:36 tnn Exp $ +# $NetBSD: Makefile,v 1.12 2010/04/19 18:46:15 tnn Exp $ # DISTNAME= libdrm-2.4.20 @@ -20,22 +20,18 @@ GNU_CONFIGURE= yes .include "../../mk/bsd.prefs.mk" -ATOMIC_OPS_CHECK?= 0 - SUBST_CLASSES+= atomic SUBST_FILES.atomic= xf86drm.h SUBST_MESSAGE.atomic= Configuring xf86drm.h's atomic operations. SUBST_STAGE.atomic= pre-configure SUBST_VARS.atomic= ATOMIC_OPS_CHECK -.if ${OPSYS} == "NetBSD" && !target(netbsd-atomic-ops-check) -netbsd-atomic-ops-check: -ATOMIC_OPS_CHECK!=\ - if ( ${NM} /usr/lib/libc.so | ${GREP} -q atomic_cas_uint ); then \ - ${ECHO} "1"; \ - else \ - ${ECHO} "0"; \ - fi +.if ${OPSYS} == "NetBSD" && exists(/usr/include/sys/atomic.h) +ATOMIC_OPS_CHECK= 1 +.else +ATOMIC_OPS_CHECK= 0 +.include "../../devel/libatomic_ops/buildlink3.mk" +CONFIGURE_ENV+= drm_cv_atomic_primitives=libatomic-ops .endif CONFIGURE_ARGS+= PTHREADSTUBS_CFLAGS=-I${PREFIX}/include \ |