Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / graphics / MesaLib / glx-config.mk
blobc398ca8af3cbf7e6fc00a7f2ddce13d6ab34662b
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)
6 GLX_CONFIG_MK= # empty
8 ### XXX Older versions of xf86driproto installed dri_interface.h, which
9 ### is now installed by Mesa.
10 ###
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:
21 ATOMIC_OPS_CHECK!=\
22 if ( ${NM} /usr/lib/libc.so | ${GREP} -q atomic_cas_uint ); then \
23 ${ECHO} "-D"; \
24 else \
25 ${ECHO} "-U"; \
27 .endif
29 .if (${MACHINE_ARCH} == "x86_64" || \
30 ${MACHINE_ARCH} == "sparc64" || \
31 ${MACHINE_ARCH} == "alpha")
32 CFLAGS+= -D__GLX_ALIGN64
33 .endif
35 .if !empty(MACHINE_ARCH:Mi386) || !empty(MACHINE_ARCH:Mx86_64)
36 ###
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.
39 ###
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.
43 ###
44 ### XXX We need a reliable check for these functions.
45 ###
46 #/* NetBSD uses IEEE double precision. */
47 CFLAGS.NetBSD+= -DDEFAULT_X86_FPU=0x127f
48 ###
49 #/* FreeBSD leaves some exceptions unmasked as well. */
50 ###
51 CFLAGS.FreeBSD+= -DDEFAULT_X86_FPU=0x1272
52 . endif
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