1 # $NetBSD: glx-config.mk,v 1.4 2009/02/28 01:22:07 bjs Exp $
3 # used by x11/modular-xorg-server/options.mk
5 .if
!defined
(GLX_CONFIG_MK
)
8 ### XXX Older versions of xf86driproto installed dri_interface.h, which
9 ### is now installed by Mesa.
11 BUILDLINK_API_DEPENDS.xf86driproto
+= xf86driproto
>=2.0.4
13 .
include "../../mk/bsd.fast.prefs.mk"
15 CFLAGS.NetBSD
+= -D_NETBSD_SOURCE
16 CFLAGS.NetBSD
+= ${ATOMIC_OPS_CHECK}HAVE_NETBSD_ATOMIC_OPS
18 . if
${OPSYS} == "NetBSD" && !target
(netbsd-atomic-ops-check
)
19 .PHONY
: netbsd-atomic-opts-check
20 netbsd-atomic-ops-check
:
22 if
( ${NM} /usr
/lib
/libc.so |
${GREP} -q atomic_cas_uint
); then \
29 .if
(${MACHINE_ARCH} == "x86_64" || \
30 ${MACHINE_ARCH} == "sparc64" || \
31 ${MACHINE_ARCH} == "alpha")
32 CFLAGS
+= -D__GLX_ALIGN64
35 .if
!empty
(MACHINE_ARCH
:Mi386
) ||
!empty
(MACHINE_ARCH
:Mx86_64
)
37 ### This is taken from <sys/arch/i386/include/npx.h>. If we don't override
38 ### it, the FPU control word will be restored to 0x037f.
40 ### Also, see patch-aq about the libm functions required (float functions
41 ### such as floorf). Proper configuration of this should be a goal of
42 ### the Mesa developers; alas, it obviously is not.
44 ### XXX We need a reliable check for these functions.
46 #/* NetBSD uses IEEE double precision. */
47 CFLAGS.NetBSD
+= -DDEFAULT_X86_FPU
=0x127f
49 #/* FreeBSD leaves some exceptions unmasked as well. */
51 CFLAGS.FreeBSD
+= -DDEFAULT_X86_FPU
=0x1272
54 CFLAGS.FreeBSD
+= -DUSE_NATIVE_LIBM_FUNCS
55 CFLAGS.NetBSD
+= -DUSE_NATIVE_LIBM_FUNCS
56 CFLAGS.DragonFly
+= -DUSE_NATIVE_LIBM_FUNCS
58 .
endif # GLX_CONFIG_MK