summaryrefslogtreecommitdiffstats
path: root/configure.in.in
blob: 13c19728c7b2da305c6623ff9664f0a29ae456e8 (plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#MIN_CONFIG(3.2)


CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"

dnl --------------------------------------------------------------------
dnl Check for LIRC client support

PLUGIN_LIRC=
LIB_LIRC=

AC_ARG_ENABLE(lirc, AC_HELP_STRING([--enable-lirc], [enable use of LIRC if found, default = true]))
if test -z "$enable_lirc" -o "$enable_lirc" = "yes"; then

	have_lirc=yes
	KDE_CHECK_LIB(lirc_client,lirc_init,,have_lirc=no)
	if test "$have_lirc" = "yes"; then
		KDE_CHECK_HEADER(lirc/lirc_client.h,,have_lirc=no)
	fi

	AC_MSG_CHECKING([for lirc support])

	if test "$have_lirc" = "yes"; then
		AC_DEFINE(HAVE_LIRC, 1, [Define this if lirc client library is available and should be used])
	  	LIB_LIRC="-llirc_client"
		PLUGIN_LIRC=lirc
		AC_MSG_RESULT([enabled])
	else
		AC_MSG_RESULT([disabled])
	fi


else

	AC_MSG_CHECKING([for lirc support])
	AC_MSG_RESULT([disabled])

fi

AC_SUBST(LIB_LIRC)
AC_SUBST(PLUGIN_LIRC)


dnl ---------------------------------------------------------------------
dnl V4L2


AC_ARG_ENABLE(v4l2, AC_HELP_STRING([--enable-v4l2], [enable use of V4L2 if found, default = true]))
if test -z "$enable_v4l2" -o "$enable_v4l2" = "yes"; then

	AC_MSG_CHECKING([for v4l2 support])
	AC_DEFINE_UNQUOTED(HAVE_V4L2, 1, [Define if you have V4L2 support])
	AC_MSG_RESULT([v4l2 support enabled])

else

	AC_MSG_CHECKING([for v4l2 support])
	AC_MSG_RESULT([disabled])

fi

dnl ---------------------------------------------------------------------
dnl LibSndFile

AC_CHECK_LIB(sndfile, sf_open, [], AC_MSG_ERROR([libsndfile not found]))
AC_CHECK_HEADERS([sndfile.h], [], AC_MSG_ERROR([libsndfile header not found]))
AC_CHECK_HEADERS([sys/soundcard.h], [], AC_MSG_ERROR([sys/soundcard.h not found]))

dnl ---------------------------------------------------------------------
dnl LibLame

LIB_LAME=

AC_ARG_ENABLE(lame, AC_HELP_STRING([--enable-lame], [enable use of lame if found, default = true]))
if test -z "$enable_lame" -o "$enable_lame" = "yes"; then


	have_lame=yes
	KDE_CHECK_LIB(mp3lame,lame_init,,have_lame=no)
	if test "$have_lame" = "yes"; then
		KDE_CHECK_HEADER(lame/lame.h,,have_lame=no)
	fi

	AC_MSG_CHECKING([for lame support])

	if test "$have_lame" = "yes"; then
		AC_DEFINE(HAVE_LAME, 1, [Define this if lame mp3 encoder library is available and should be used])
	  	LIB_LAME="-lmp3lame"
		AC_MSG_RESULT([enabled])
	else
		AC_MSG_RESULT([disabled])
	fi

else

	AC_MSG_CHECKING([for lame support])
	AC_MSG_RESULT([disabled])

fi

AC_SUBST(LIB_LAME)


dnl ---------------------------------------------------------------------
dnl Ogg/Vorbis support

LIB_OGG=

AC_ARG_ENABLE(ogg, AC_HELP_STRING([--enable-ogg], [enable use of Ogg/Vorbis if found, default = true]))
if test -z "$enable_ogg" -o "$enable_ogg" = "yes"; then


	have_ogg=yes
	KDE_CHECK_LIB(vorbisenc,vorbis_encode_init,,have_ogg=no)
	if test "$have_ogg" = "yes"; then
		KDE_CHECK_HEADER(vorbis/vorbisenc.h,,have_ogg=no)
	fi
	if test "$have_ogg" = "yes"; then
		KDE_CHECK_LIB(ogg,ogg_stream_packetin,,have_ogg=no)
	fi
	if test "$have_ogg" = "yes"; then
		KDE_CHECK_HEADER(ogg/ogg.h,,have_ogg=no)
	fi

	AC_MSG_CHECKING([for ogg/vorbis support])

	if test "$have_ogg" = "yes"; then
		AC_DEFINE(HAVE_OGG, 1, [Define this if OGG/Vorbis encoder library is available and should be used])
		LIB_OGG="-logg -lvorbisenc"
		AC_MSG_RESULT([enabled])
	else
		AC_MSG_RESULT([disabled])
	fi

else

	AC_MSG_CHECKING([for ogg/vorbis support])
	AC_MSG_RESULT([disabled])

fi

AC_SUBST(LIB_OGG)

dnl ---------------------------------------------------------------------
dnl ALSA support

LIB_ALSA=
PLUGIN_ALSA=

AC_ARG_ENABLE(alsa, AC_HELP_STRING([--enable-alsa], [enable use of ALSA if found, default = true]))
if test -z "$enable_alsa" -o "$enable_alsa" = "yes"; then


	have_alsa=yes
	KDE_CHECK_LIB(asound,snd_card_next,,have_alsa=no)
	if test "$have_alsa" = "yes"; then
		KDE_CHECK_HEADER(alsa/asoundlib.h,,have_alsa=no)
	fi

	AC_MSG_CHECKING([for ALSA support])

	if test "$have_alsa" = "yes"; then
		AC_DEFINE(HAVE_ALSA, 1, [Define this if ALSA library is available and should be used])
		LIB_ALSA="-lasound"
		PLUGIN_ALSA=alsa-sound
		AC_MSG_RESULT([enabled])
	else
		AC_MSG_RESULT([disabled])
	fi

else

	AC_MSG_CHECKING([for alsa support])
	AC_MSG_RESULT([disabled])

fi

AC_SUBST(LIB_ALSA)
AC_SUBST(PLUGIN_ALSA)


dnl ---------------------------------------------------------------------
dnl OSS Plugin

PLUGIN_OSS=

AC_ARG_ENABLE(oss, AC_HELP_STRING([--enable-oss], [compile OSS plugin, default = true]))
if test -z "$enable_oss" -o "$enable_oss" = "yes"; then

	PLUGIN_OSS=oss-sound
	AC_MSG_CHECKING([for OSS support])
	AC_MSG_RESULT([enabled])
else

	AC_MSG_CHECKING([for OSS support])
	AC_MSG_RESULT([disabled])

fi

AC_SUBST(PLUGIN_OSS)


dnl ---------------------------------------------------------------------------

AC_SUBST(libtderadiodir, '$(libdir)/tderadio/plugins')


dnl ----------------------------------------------------------------------
dnl apidox
KDE_INIT_DOXYGEN([The TDERadio API Reference], [Version $VERSION])