aboutsummaryrefslogtreecommitdiffstats
path: root/bs/dep-output.sh
blob: 2e885540c6e49c2d791af1648696a636e7277022 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
t_alsa ()
{
	dep_paths alsa
	if test_header 'alsa/asoundlib'; then
		ldflags="$ldflags -lasound -lm -ldl -lpthread"
		echo t
	fi
}

t_ao ()
{
	dep_paths ao
	if test_header 'ao/ao'; then
		ldflags="$ldflags -ld -lao"
		echo t
	fi
}

t_fifo ()
{
	echo t
}

t_mvp ()
{
	echo t
}

t_oss ()
{
	dep_paths oss
	test_header 'sys/soundcard' && echo t
}

t_pulse ()
{
	dep_paths pulse
	test_header 'pulse/simple' && echo 't'
}

t_shout ()
{
	dep_paths shout
	ok=
	if test "$PKGCONFIG" != "no" && `$PKGCONFIG --exists shout`; then
		cflags="$cflags `$PKGCONFIG --variable=cflags_only shout`"
		cflags="$cflags `$PKGCONFIG --variable=cppflags shout`"
		ldflags="$ldflags `$PKGCONFIG --libs shout`"
		ok=t
	else
		test -z "$sc" && sc="`which shoutconfig`"
		if test `$sc --package` = "libshout"; then
			cflags="$cflags `$sc --cflags-only`"
			cflags="$cflags `$sc --cppflags shout`"
			ldflags="$ldflags `$sc --libs`"
			ok=t
		fi
	fi
	# freebsd 6.1 + shout 2.2 port seems to leave pthread out
	case "$uname_s" in
	freebsd*)
		case "$cflags" in
		*-D_THREAD_SAFE*)
			ldflags="$ldflags -lpthread"
			;;
		esac
	;;
	esac

	echo $ok
}

t_sun ()
{
	dep_paths sun
	test_header 'sys/audioio' && echo t
}