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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
|
dnl -----------
dnl basic stuff
dnl -----------
KDE_ENABLE_HIDDEN_VISIBILITY
AC_ARG_VAR([PKG_CONFIG], [Path to pkg-config])
if test -z "$PKG_CONFIG" ; then
PKG_CONFIG="pkg-config"
fi
AC_MSG_CHECKING([for pkg-config])
if ! "$PKG_CONFIG" --version ; then
echo ""
echo "---------------------------------------------------------------------"
echo "ERROR: Could not find pkg-config. Make sure it is in your path or set"
echo "the PKG_CONFIG environment variable to the full path to pkg-config."
echo "---------------------------------------------------------------------"
echo ""
AC_MSG_ERROR([could not find pkg-config])
fi
AC_ARG_WITH([xinit-workaround],
[AS_HELP_STRING([--with-xinit-workaround],
[use this flag if Kaffeine hangs at startup and you are using XFree86 4.4 or X.Org 6.7.0])],,
[with_xinit_workaround=no])
if test "$with_xinit_workaround" = "yes" ; then
AC_DEFINE([XINIT_WKRND],,[workaround buggy X server])
fi
dnl ------------------------
dnl check for DPMS extension
dnl ------------------------
AC_ARG_WITH([dpms], [AS_HELP_STRING([--without-dpms], [build without DPMS support])],,
[with_dpms=yes])
CFLAGS_DPMS=""
LIB_DPMS=""
if test "$with_dpms" != "no" ; then
AC_MSG_CHECKING([for DPMS extension])
if "$PKG_CONFIG" --exists xext ; then
with_dpms=yes
CFLAGS_DPMS=`"$PKG_CONFIG" --cflags xext`
LIB_DPMS=`"$PKG_CONFIG" --libs xext`
AC_DEFINE([HAVE_DPMS],,[DPMS extension available])
AC_MSG_RESULT([yes])
else
with_dpms=no
AC_MSG_RESULT([no])
fi
fi
AC_SUBST([CFLAGS_DPMS])
AC_SUBST([LIB_DPMS])
dnl -------------------------
dnl check for XTest extension
dnl -------------------------
AC_ARG_WITH([xtest], [AS_HELP_STRING([--without-xtest], [build without XTest support])],,
[with_xtest=yes])
CFLAGS_XTEST=""
LIB_XTEST=""
if test "$with_xtest" != "no" ; then
AC_MSG_CHECKING([for XTest extension])
if "$PKG_CONFIG" --exists xtst ; then
with_xtest=yes
CFLAGS_XTEST=`"$PKG_CONFIG" --cflags xtst`
LIB_XTEST=`"$PKG_CONFIG" --libs xtst`
AC_DEFINE([HAVE_XTEST],,[XTest extension available])
AC_MSG_RESULT([yes])
else
with_xtest=no
AC_MSG_RESULT([no])
fi
fi
AC_SUBST([CFLAGS_XTEST])
AC_SUBST([LIB_XTEST])
dnl ----------------------------
dnl check for Xinerama extension
dnl ----------------------------
AC_ARG_WITH([xinerama], [AS_HELP_STRING([--without-xinerama], [build without Xinerama support])],,
[with_xinerama=yes])
CFLAGS_XINERAMA=""
LIB_XINERAMA=""
if test "$with_xinerama" != "no" ; then
AC_MSG_CHECKING([for Xinerama extension])
if "$PKG_CONFIG" --exists xinerama ; then
with_xinerama=yes
CFLAGS_XINERAMA=`"$PKG_CONFIG" --cflags xinerama`
LIB_XINERAMA=`"$PKG_CONFIG" --libs xinerama`
AC_DEFINE([HAVE_XINERAMA],,[Xinerama extension available])
AC_MSG_RESULT([yes])
else
with_xinerama=no
AC_MSG_RESULT([no])
fi
fi
AC_SUBST([CFLAGS_XINERAMA])
AC_SUBST([LIB_XINERAMA])
dnl ------------------
dnl check for xine-lib
dnl ------------------
AC_MSG_CHECKING([for xine-lib])
CFLAGS_XINE=""
LIB_XINE=""
if "$PKG_CONFIG" --exists "libxine >= 1.1.9" ; then
CFLAGS_XINE=`"$PKG_CONFIG" --cflags libxine`
LIB_XINE=`"$PKG_CONFIG" --libs libxine`
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
echo ""
echo "---------------------------------------"
echo "ERROR: Could not find xine-lib >= 1.1.9"
echo "---------------------------------------"
echo ""
AC_MSG_ERROR([could not find xine-lib])
fi
AC_SUBST([CFLAGS_XINE])
AC_SUBST([LIB_XINE])
dnl -------------
dnl check for xcb
dnl -------------
AC_ARG_WITH([xcb], [AS_HELP_STRING([--without-xcb], [disable xcb support (not recommended)])],,
[with_xcb=yes])
AC_MSG_CHECKING([for xcb and xine-lib >= 1.1.9])
CFLAGS_XCB=""
LIB_XCB=""
if test "$with_xcb" != "no" ; then
if "$PKG_CONFIG" --exists "xcb >= 1.0" ; then
with_xcb=yes
CFLAGS_XCB=`"$PKG_CONFIG" --cflags xcb`
LIB_XCB=`"$PKG_CONFIG" --libs xcb`
AC_DEFINE([HAVE_XCB],,[xcb available])
AC_MSG_RESULT([yes])
else
with_xcb=no
AC_MSG_RESULT([no])
fi
fi
AC_SUBST([CFLAGS_XCB])
AC_SUBST([LIB_XCB])
AM_CONDITIONAL([with_xcb], [test "$with_xcb" = "yes"])
dnl ---------------------
dnl check for DVB headers
dnl ---------------------
AC_ARG_WITH([dvb], [AS_HELP_STRING([--without-dvb], [build without DVB support])],,
[with_dvb=yes])
if test "$with_dvb" != "no" ; then
KDE_CHECK_HEADER([linux/dvb/frontend.h], [with_dvb=yes]
[AC_DEFINE([HAVE_DVB],,[DVB headers installed])], [with_dvb=no])
fi
AM_CONDITIONAL([with_dvb], [test "$with_dvb" = "yes"])
dnl -------------------
dnl check for gstreamer
dnl -------------------
AC_ARG_WITH([gstreamer], [AS_HELP_STRING([--without-gstreamer], [disable GStreamer player part])],,
[with_gstreamer=yes])
CFLAGS_GSTREAMER=""
LIB_GSTREAMER=""
if test "$with_gstreamer" != "no" ; then
AC_MSG_CHECKING([for GStreamer])
if "$PKG_CONFIG" --exists "gstreamer-0.10 gstreamer-plugins-base-0.10"; then
with_gstreamer=yes
CFLAGS_GSTREAMER=`"$PKG_CONFIG" --cflags gstreamer-0.10 gstreamer-plugins-base-0.10`
LIB_GSTREAMER=`"$PKG_CONFIG" --libs gstreamer-0.10 gstreamer-plugins-base-0.10`
AC_MSG_RESULT([yes])
else
with_gstreamer=no
AC_MSG_RESULT([no])
fi
fi
AC_SUBST([CFLAGS_GSTREAMER])
AC_SUBST([LIB_GSTREAMER])
AM_CONDITIONAL([with_gstreamer], [test "$with_gstreamer" = "yes"])
dnl --------------------
dnl check for cdparanoia
dnl --------------------
KDE_CHECK_HEADER([cdda_interface.h], [with_cdparanoia=yes], [with_cdparanoia=no])
if test "$with_cdparanoia" != "yes" ; then
echo ""
echo "-----------------------------------------"
echo "ERROR: Could not find cdparanoia headers."
echo "-----------------------------------------"
echo ""
AC_MSG_ERROR([could not find cdparanoia headers])
fi
dnl ----------------------------
dnl check for Ogg Vorbis encoder
dnl ----------------------------
AC_ARG_WITH([oggvorbis], [AS_HELP_STRING([--without-oggvorbis], [build without Ogg Vorbis support])],,
[with_oggvorbis=yes])
CFLAGS_OGGVORBIS=""
LIB_OGGVORBIS=""
if test "$with_oggvorbis" != "no" ; then
AC_MSG_CHECKING([for Ogg/Vorbis encoder])
if "$PKG_CONFIG" --exists vorbisenc ; then
with_oggvorbis=yes
CFLAGS_OGGVORBIS=`"$PKG_CONFIG" --cflags vorbisenc`
LIB_OGGVORBIS=`"$PKG_CONFIG" --libs vorbisenc`
AC_MSG_RESULT([yes])
else
with_oggvorbis=no
AC_MSG_RESULT([no])
fi
fi
AC_SUBST([CFLAGS_OGGVORBIS])
AC_SUBST([LIB_OGGVORBIS])
AM_CONDITIONAL([with_oggvorbis], [test "$with_oggvorbis" = "yes"])
dnl --------------
dnl check for LAME
dnl --------------
AC_ARG_WITH([lame], [AS_HELP_STRING([--without-lame], [build without LAME support])],,
[with_lame=yes])
LIB_LAME=""
if test "$with_lame" != "no" ; then
KDE_CHECK_HEADER([lame/lame.h], [with_lame=yes], [with_lame=no])
fi
if test "$with_lame" = "yes" ; then
KDE_CHECK_LIB([mp3lame], [lame_init], [LIB_LAME="-lmp3lame"], [with_lame=no], [-lm])
fi
AC_SUBST([LIB_LAME])
AM_CONDITIONAL([with_lame], [test "$with_lame" = "yes"])
|