Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / mk / oss.buildlink3.mk
blobaaae8804b9d86b6c2ce709d7216c6cdd5e5ddd34
1 # $NetBSD: oss.buildlink3.mk,v 1.9 2009/03/19 20:12:00 sno Exp $
3 # This Makefile fragment is included by packages that require an Open Sound
4 # System (OSS) implementation. After inclusion of this file, the following
5 # variables may be examined:
7 # OSS_TYPE
8 # The type of OSS implementation that has been found. "native"
9 # means the native OSS implementation is used. "none" means that
10 # no suitable OSS implementation could be found.
12 OSS_BUILDLINK3_MK:= ${OSS_BUILDLINK3_MK}+
14 .include "../../mk/bsd.prefs.mk"
16 .if !defined(_OSS_TYPE)
17 _OSS_TYPE= none
18 CHECK_BUILTIN.oss:= yes
19 . include "../../mk/oss.builtin.mk"
20 CHECK_BUILTIN.oss:= no
21 . if defined(IS_BUILTIN.oss) && !empty(IS_BUILTIN.oss:M[yY][eE][sS])
22 _OSS_TYPE= native
23 . endif
24 .endif
25 MAKEVARS+= _OSS_TYPE
27 OSS_TYPE= ${_OSS_TYPE}
29 .if ${OSS_TYPE} != "none"
31 BUILDLINK_TREE+= oss -oss
32 BUILDLINK_BUILTIN_MK.oss= ../../mk/oss.builtin.mk
34 .if !empty(OSS_BUILDLINK3_MK:M+)
35 LIBOSSAUDIO?= ${BUILDLINK_LDADD.oss}
36 . if (${OPSYS} == "Linux") && exists(/dev/dsp)
37 DEVOSSAUDIO?= /dev/dsp
38 DEVOSSSOUND?= /dev/dsp
39 . elif ${OPSYS} == "DragonFly"
40 DEVOSSAUDIO?= /dev/dsp
41 DEVOSSSOUND?= /dev/dsp
42 . elif ${OPSYS} == "FreeBSD"
43 . if !empty(OS_VERSION:M4.*) || !empty(OS_VERSION:M5.[12]*)
44 DEVOSSAUDIO?= /dev/dsp
45 DEVOSSSOUND?= /dev/dsp
46 . else
47 DEVOSSAUDIO?= /dev/dsp0.0
48 DEVOSSSOUND?= /dev/dsp0.0
49 . endif
50 . else
51 DEVOSSAUDIO?= /dev/audio
52 DEVOSSSOUND?= /dev/sound
53 . endif
55 CONFIGURE_ENV+= LIBOSSAUDIO=${LIBOSSAUDIO:Q}
56 CONFIGURE_ENV+= DEVOSSAUDIO=${DEVOSSAUDIO:Q}
57 CONFIGURE_ENV+= DEVOSSSOUND=${DEVOSSSOUND:Q}
59 MAKE_ENV+= LIBOSSAUDIO=${LIBOSSAUDIO:Q}
60 MAKE_ENV+= DEVOSSAUDIO=${DEVOSSAUDIO:Q}
61 MAKE_ENV+= DEVOSSSOUND=${DEVOSSSOUND:Q}
62 .endif # OSS_BUILDLINK3_MK
64 .endif # OSS_TYPE != none