-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathconfigure.ac
439 lines (368 loc) · 13.5 KB
/
configure.ac
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
dnl configure.ac
dnl
dnl Pragha - A Lightweight Music Player for GNU/Linux
dnl
dnl Version information
m4_define([pragha_version_major], [1])
m4_define([pragha_version_minor], [3])
m4_define([pragha_version_micro], [99.1])
m4_define([pragha_version], [pragha_version_major().pragha_version_minor().pragha_version_micro()])
dnl Initialize autoconf
AC_COPYRIGHT([Copyright (c) 2009-2019
Matias De lellis <[email protected]>])
AC_INIT([pragha], [pragha_version()], [[email protected]])
AC_CONFIG_HEADERS([config.h])
dnl Initialize automake
AM_INIT_AUTOMAKE([no-dist-gzip dist-bzip2])
AM_MAINTAINER_MODE()
dnl Set required and max glib/gdk versions
AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_14, [Ignore post 3.14 deprecations])
AC_DEFINE(GDK_VERSION_MAX_ALLOWED, GDK_VERSION_3_14, [Ignore post 3.14 deprecations])
dnl *********************
dnl * Debugging support *
dnl *********************
AC_ARG_ENABLE(debug,[ --enable-debug Turn on debugging],[
case "${enableval}" in
yes) debug=true ;
CFLAGS="$CFLAGS -DDEBUG -D_DEBUG -g -ggdb -O0 -fno-inline -fno-inline-functions" ;;
no) debug=false ;
CFLAGS="$CFLAGS -DNDEBUG" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac
],[ debug=false
CFLAGS="$CFLAGS -DNDEBUG"
])
dnl ***********************************************************************
dnl Check for win32 platform
dnl ***********************************************************************
AC_CANONICAL_HOST
AC_MSG_CHECKING([whether to build with mingw32 for a Windows host])
case "${host}" in
*-*-mingw*|*-*-cygwin*) WIN32="yes" ;;
*) WIN32="no" ;;
esac
AM_CONDITIONAL([WIN32], test "$WIN32" = "yes")
AS_IF([test "x$WIN32" = "xyes"],
[AC_CHECK_TOOL([WINDRES], [windres])
AS_IF([test -z "$WINDRES"],
[AC_MSG_ERROR([windres is required when building for a Windows host])])])
AC_SUBST(CFLAGS)
PLUGIN_LIBTOOL_FLAGS="-avoid-version -module -shared -export-dynamic -no-undefined"
AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl Check for basic programs
AC_PROG_CC()
AM_PROG_CC_C_O()
AC_PROG_INSTALL()
IT_PROG_INTLTOOL()
dnl Initialize libtool
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
dnl Check for i18n support
XDT_I18N([ar bg ca_ES cs da de es el fr hu id it ja ko_KR lt nl no pl pt pt_BR ru sk sv tr uk vi zh_CN])
dnl Check tools required
AC_CHECK_PROG([HAVE_XDT_CSOURCE], [xdt-csource], [yes])
if test x"$HAVE_XDT_CSOURCE" != xyes; then
AC_MSG_FAILURE([xdt-csource not installed])
fi
dnl Check for required packages
PKG_CHECK_MODULES(PRAGHA, \
gstreamer-1.0 >= 0.11.90 \
gstreamer-base-1.0 >= 0.11.90 \
gio-2.0 >= 2.42 \
gtk+-3.0 >= 3.14 \
sqlite3 >= 3.4 \
taglib_c >= 1.8)
AC_SUBST(PRAGHA_CFLAGS)
AC_SUBST(PRAGHA_LIBS)
dnl Check peas library to plugins support
LIBPEAS_FOUND="no"
XDT_CHECK_OPTIONAL_PACKAGE([LIBPEAS],
[libpeas-1.0], [1.0.0],
[libpeas-1.0],
[libpeas-1.0 library], [yes])
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_PACKAGE([LIBPEAS_GTK], [libpeas-gtk-1.0], [1.0.0])
fi
PRAGHA_CFLAGS+=" $LIBPEAS_CFLAGS $LIBPEAS_GTK_CFLAGS"
PRAGHA_LIBS+=" $LIBPEAS_LIBS $LIBPEAS_GTK_LIBS"
dnl Check gstreamer-audio
GSTREAMER_AUDIO_FOUND="no"
XDT_CHECK_OPTIONAL_PACKAGE([GSTREAMER_AUDIO],
[gstreamer-audio-1.0], 0.11.90,
[gstreamer-audio],
[gstreamer-audio], [yes])
PRAGHA_CFLAGS+=" $GSTREAMER_AUDIO_CFLAGS"
PRAGHA_LIBS+=" $GSTREAMER_AUDIO_LIBS"
dnl Check libxfce4ui
LIBXFCE4UI_FOUND="no"
XDT_CHECK_OPTIONAL_PACKAGE([LIBXFCE4UI],
[libxfce4ui-2], [4.10.0],
[libxfce4ui],
[libxfce4ui library], [yes])
PRAGHA_CFLAGS+=" $LIBXFCE4UI_CFLAGS"
PRAGHA_LIBS+=" $LIBXFCE4UI_LIBS"
dnl Check totem-pl-parser
PLPARSER_FOUND="no"
XDT_CHECK_OPTIONAL_PACKAGE([PLPARSER],
[totem-plparser], [2.26],
[totem-plparser],
[totem-plparser library], [yes])
PRAGHA_CFLAGS+=" $PLPARSER_CFLAGS"
PRAGHA_LIBS+=" $PLPARSER_LIBS"
dnl Check for gudev
GUDEV_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([GUDEV],
[gudev-1.0], [145],
[gudev-1.0],
[gudev-1.0 library], [yes])
else
AM_CONDITIONAL([HAVE_GUDEV], 0)
fi
PRAGHA_CFLAGS+=" $GUDEV_CFLAGS"
PRAGHA_LIBS+=" $GUDEV_LIBS"
dnl Check dbus plugins support
DBUS_PLUGINS_SUPPORT="no"
if test x"$LIBPEAS_FOUND" = x"yes" && test x"$WIN32" = x"no"; then
DBUS_PLUGINS_SUPPORT="yes"
fi
AM_CONDITIONAL([DBUS_PLUGINS_SUPPORT], test "$DBUS_PLUGINS_SUPPORT" = "yes")
dnl Check notify support
LIBNOTIFY_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY],
[libnotify], [0.7.5],
[libnotify],
[libnotify library], [yes])
else
AM_CONDITIONAL([HAVE_LIBNOTIFY], 0)
fi
dnl Check global keyboard shortcuts support
LIBKEYBINDER_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([LIBKEYBINDER],
[keybinder-3.0], [0.2.0],
[keybinder],
[keybinder library], [yes])
else
AM_CONDITIONAL([HAVE_LIBKEYBINDER], 0)
fi
dnl Check libglyr
LIBGLYR_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([LIBGLYR],
[libglyr], [1.0.1],
[libglyr],
[libglyr library], [yes])
else
AM_CONDITIONAL([HAVE_LIBGLYR], 0)
fi
LIBMTP_FOUND="no"
if test x"$GUDEV_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([LIBMTP],
[libmtp], [1.1.0],
[libmtp],
[libmtp library], [yes])
else
AM_CONDITIONAL([HAVE_LIBMTP], 0)
fi
dnl Check libpsuop
LIBSOUP_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([LIBSOUP],
[libsoup-2.4], [2.38],
[libsoup-2.4],
[libsoup-2.4 library], [yes])
else
AM_CONDITIONAL([HAVE_LIBSOUP], 0)
fi
dnl Check libpsuop
JSON_GLIB_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([JSON_GLIB],
[json-glib-1.0], [1.0.0],
[json-glib-1.0],
[json-glib-1.0 library], [yes])
else
AM_CONDITIONAL([HAVE_JSON_GLIB], 0)
fi
dnl Check rygel
RYGEL_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([RYGEL],
[rygel-server-2.6], [0.26.0],
[rygel-server-2.6],
[rygel-server-2.6 library], [yes])
else
AM_CONDITIONAL([HAVE_RYGEL], 0)
fi
dnl Check grilo
GRILO_FOUND="no"
GRILO3_FOUND="no"
GRILO2_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([GRILO3],
[grilo-0.3], [0.3.0],
[grilo-0.3],
[grilo-0.3 library], [yes])
if test x"$GRILO3_FOUND" = x"no"; then
XDT_CHECK_OPTIONAL_PACKAGE([GRILO2],
[grilo-0.2], [0.2.11],
[grilo-0.2],
[grilo-0.2 library], [yes])
else
AM_CONDITIONAL([HAVE_GRILO2], 0)
fi
else
AM_CONDITIONAL([HAVE_GRILO3], 0)
AM_CONDITIONAL([HAVE_GRILO2], 0)
fi
if test x"$GRILO3_FOUND" = x"yes"; then
GRILO_FOUND="yes"
fi
if test x"$GRILO2_FOUND" = x"yes"; then
GRILO_FOUND="yes"
fi
dnl Check grilo-net
GRILO_NET_FOUND="no"
GRILO_NET3_FOUND="no"
GRILO_NET2_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([GRILO_NET3],
[grilo-net-0.3], [0.3.0],
[grilo-net-0.3],
[grilo-net-0.3 library], [yes])
if test x"$GRILO_NET3_FOUND" = x"no"; then
XDT_CHECK_OPTIONAL_PACKAGE([GRILO_NET2],
[grilo-net-0.2], [0.2.5],
[grilo-net-0.2],
[grilo-net-0.2 library], [yes])
else
AM_CONDITIONAL([HAVE_GRILO_NET2], 0)
fi
else
AM_CONDITIONAL([HAVE_GRILO_NET3], 0)
AM_CONDITIONAL([HAVE_GRILO_NET2], 0)
fi
if test x"$GRILO_NET3_FOUND" = x"yes"; then
GRILO_NET_FOUND="yes"
fi
if test x"$GRILO_NET2_FOUND" = x"yes"; then
GRILO_NET_FOUND="yes"
fi
dnl Check libclastfm
LIBCLASTFM_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([LIBCLASTFM],
[libclastfm], [0.5],
[libclastfm],
[libclastfm library], [yes])
else
AM_CONDITIONAL([HAVE_LIBCLASTFM], 0)
fi
dnl Check libcdio, libcdio_paranoia and libcddb
LIBCDIO_FOUND="no"
LIBCDIO_PARANOIA_FOUND="no"
LIBCDDB_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([LIBCDIO],
[libcdio], [0.80],
[libcdio],
[libcdio library], [yes])
XDT_CHECK_OPTIONAL_PACKAGE([LIBCDIO_PARANOIA],
[libcdio_paranoia], [0.90],
[libcdio_paranoia],
[libcdio_paranoia library], [yes])
XDT_CHECK_OPTIONAL_PACKAGE([LIBCDDB],
[libcddb], [1.3.0],
[libcddb],
[libcddb library], [yes])
else
AM_CONDITIONAL([HAVE_LIBCDIO], 0)
AM_CONDITIONAL([HAVE_LIBCDIO_PARANOIA], 0)
AM_CONDITIONAL([HAVE_LIBCDDB], 0)
fi
CDROM_SUPPORT="no"
if test x"$LIBCDIO_FOUND" = x"yes" &&
test x"$LIBCDIO_PARANOIA_FOUND" = x"yes" &&
test x"$LIBCDDB_FOUND" = x"yes"; then
CDROM_SUPPORT="yes"
fi
KOEL_SUPPORT="no"
if test x"$LIBPEAS_FOUND" = x"yes" &&
test x"$LIBSOUP_FOUND" = x"yes" &&
test x"$JSON_GLIB_FOUND" = x"yes"; then
KOEL_SUPPORT="yes"
fi
dnl Output files
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([data/Makefile])
AC_CONFIG_FILES([data/icons/Makefile])
AC_CONFIG_FILES([data/icons/16x16/Makefile])
AC_CONFIG_FILES([data/icons/24x24/Makefile])
AC_CONFIG_FILES([data/icons/32x32/Makefile])
AC_CONFIG_FILES([data/icons/48x48/Makefile])
AC_CONFIG_FILES([data/icons/64x64/Makefile])
AC_CONFIG_FILES([data/icons/128x128/Makefile])
AC_CONFIG_FILES([data/icons/symbolic/Makefile])
AC_CONFIG_FILES([data/ui/Makefile])
AC_CONFIG_FILES([po/Makefile.in])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([src/win32/Makefile])
if test x"$LIBPEAS_FOUND" = x"yes"; then
AC_CONFIG_FILES([plugins/Makefile])
AC_CONFIG_FILES([plugins/acoustid/Makefile])
AC_CONFIG_FILES([plugins/ampache/Makefile])
AC_CONFIG_FILES([plugins/cdrom/Makefile])
AC_CONFIG_FILES([plugins/dlna/Makefile])
AC_CONFIG_FILES([plugins/dlna-renderer/Makefile])
AC_CONFIG_FILES([plugins/keybinder/Makefile])
AC_CONFIG_FILES([plugins/koel/Makefile])
AC_CONFIG_FILES([plugins/lastfm/Makefile])
AC_CONFIG_FILES([plugins/mpris2/Makefile])
AC_CONFIG_FILES([plugins/mtp/Makefile])
AC_CONFIG_FILES([plugins/notify/Makefile])
AC_CONFIG_FILES([plugins/removable-media/Makefile])
AC_CONFIG_FILES([plugins/song-info/Makefile])
AC_CONFIG_FILES([plugins/subsonic/Makefile])
AC_CONFIG_FILES([plugins/tunein/Makefile])
AC_CONFIG_FILES([plugins/visualizer/Makefile])
fi
AC_OUTPUT
echo ""
echo "Build Configuration for $PACKAGE version $VERSION"
echo ""
echo " Gtk version used......: $GTK_VERSION"
echo " Gstreamer version used: $GSTREAMER_VERSION"
echo ""
echo " Prefix................: ${prefix}"
echo " Host..................: ${host}"
echo ""
echo " Debug enabled.........: $debug"
echo ""
echo " Plugins enabled.......: $LIBPEAS_FOUND"
echo " * Show notification when change songs..........(Need libnotify >= 0.7.5).: $LIBNOTIFY_FOUND"
echo " * Controls Pragha using Mpris2 interface.................................: $DBUS_PLUGINS_SUPPORT"
echo " * Controls Pragha using multimedia keys....(Need keybinder-3.0 >= 0.2.0).: $LIBKEYBINDER_FOUND"
echo " * Play Audio cds...............(Need libcdio, libcdio_paranoia, libcddb).: $CDROM_SUPPORT"
echo " * Search lyrics, artists info and albums art.....(Need libglyr >= 1.0.1).: $LIBGLYR_FOUND"
echo " * Search metadata on AcoustID.....................(Need libsoup >= 2.38).: $LIBSOUP_FOUND"
echo " * Search radios on TuneIn.........................(Need libsoup >= 2.38).: $LIBSOUP_FOUND"
echo " * Share music library on DLNA............(Need rygel-server-2.2 >= 0.26).: $RYGEL_FOUND"
echo " * Play songs on DLNA Servers......................(Need grilo >= 0.2.11).: $GRILO_FOUND"
echo " * Append music on Ampache server...............(Need grilo-net >= 0.2.5).: $GRILO_NET_FOUND"
echo " * Append music on Subsonic server..............(Need grilo-net >= 0.2.5).: $GRILO_NET_FOUND"
echo " * Append music on Koel server...............(Need libsoup and json-glib).: $KOEL_SUPPORT"
echo " * Lastfm scroble, and add similar songs support (Need libclastfm >= 0.5).: $LIBCLASTFM_FOUND"
echo ""
echo " * EXPERIMENTAL management of external devices...........(Need gudev-1.0).: $GUDEV_FOUND"
echo " * USB flash drive/Memory cards........................(Need gudev-1.0).: $GUDEV_FOUND"
echo " * Optical disc Hot-plug...............................(Need gudev-1.0).: $GUDEV_FOUND"
echo " * MTP compatible devices..................:(Need gudev-1.0 and libmtp).: $LIBMTP_FOUND"
echo ""
echo " Others build options..:"
echo " * Cubic volume support.....................(Need gstreamer-plugins-base).: $GSTREAMER_AUDIO_FOUND"
echo " * Better session management support........(Need libxfce4ui-2 >= 4.11.0).: $LIBXFCE4UI_FOUND"
echo " * Use totem-pl-parser to open playlists....(Need totem-plparser >= 2.26).: $PLPARSER_FOUND"
echo ""