forked from pragha-music-player/pragha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
297 lines (260 loc) · 9.79 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
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], [3.git])
m4_define([pragha_version], [pragha_version_major().pragha_version_minor().pragha_version_micro()])
dnl Initialize autoconf
AC_COPYRIGHT([Copyright (c) 2009-2015
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_4, [Ignore post 3.10 deprecations])
AC_DEFINE(GDK_VERSION_MAX_ALLOWED, GDK_VERSION_3_10, [Ignore post 3.10 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"
])
case "${host}" in
i[[3456789]]86-mingw32*) WIN32="yes" ;;
*cygwin*) WIN32="yes" ;;
*) WIN32="no" ;;
esac
AM_CONDITIONAL([WIN32], test "$WIN32" = "yes")
if test x"$WIN32" = x"yes"; then
AC_CHECK_TOOL(WINDRES, windres)
fi
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([ca_ES cs de es el fr hu it ja ko_KR nl no pl pt pt_BR ru sv tr uk vi zh_CN])
GSTREAMER_REQUIRED=0.11.90
dnl Check for required packages
XDT_CHECK_PACKAGE([GSTREAMER], [gstreamer-1.0], [$GSTREAMER_REQUIRED])
XDT_CHECK_PACKAGE([GSTREAMER_BASE], [gstreamer-base-1.0], [$GSTREAMER_REQUIRED])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.36])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.8.0])
XDT_CHECK_PACKAGE([SQLITE3], [sqlite3], [3.4])
XDT_CHECK_PACKAGE([TAGLIB_C], [taglib_c], [1.8])
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
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
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
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 rygel
RYGEL_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([RYGEL],
[rygel-server-2.2], [0.20.0],
[rygel-server-2.2],
[rygel-server-2.2 library], [yes])
else
AM_CONDITIONAL([HAVE_RYGEL], 0)
fi
dnl Check grilo
GRILO_FOUND="no"
if test x"$LIBPEAS_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([GRILO],
[grilo-0.2], [0.2.10],
[grilo-0.2],
[grilo-0.2 library], [yes])
else
AM_CONDITIONAL([HAVE_GRILO], 0)
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"; then
if test x"$LIBCDIO_PARANOIA_FOUND" = x"yes"; then
if test x"$LIBCDDB_FOUND" = x"yes"; then
CDROM_SUPPORT="yes"
fi
fi
fi
dnl Check gstreamer-audio
GSTREAMER_AUDIO_FOUND="no"
XDT_CHECK_OPTIONAL_PACKAGE([GSTREAMER_AUDIO],
[gstreamer-audio-1.0], [$GSTREAMER_REQUIRED],
[gstreamer-audio],
[gstreamer-audio], [yes])
dnl Check libxfce4ui
LIBXFCE4UI_FOUND="no"
XDT_CHECK_OPTIONAL_PACKAGE([LIBXFCE4UI],
[libxfce4ui-2], [4.10.0],
[libxfce4ui],
[libxfce4ui library], [yes])
dnl Check totem-pl-parser
PLPARSER_FOUND="no"
XDT_CHECK_OPTIONAL_PACKAGE([PLPARSER],
[totem-plparser], [2.26],
[totem-plparser],
[totem-plparser library], [yes])
dnl Output files
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([data/Makefile])
AC_CONFIG_FILES([po/Makefile.in])
if test x"$LIBPEAS_FOUND" = x"yes"; then
AC_CONFIG_FILES([plugins/Makefile])
AC_CONFIG_FILES([plugins/acoustid/Makefile])
AC_CONFIG_FILES([plugins/mpris2/Makefile])
AC_CONFIG_FILES([plugins/keybinder/Makefile])
AC_CONFIG_FILES([plugins/gnome-media-keys/Makefile])
AC_CONFIG_FILES([plugins/song-info/Makefile])
AC_CONFIG_FILES([plugins/notify/Makefile])
AC_CONFIG_FILES([plugins/devices/Makefile])
AC_CONFIG_FILES([plugins/mtp/Makefile])
AC_CONFIG_FILES([plugins/removable-media/Makefile])
AC_CONFIG_FILES([plugins/tunein/Makefile])
AC_CONFIG_FILES([plugins/dlna/Makefile])
AC_CONFIG_FILES([plugins/dlna-renderer/Makefile])
AC_CONFIG_FILES([plugins/cdrom/Makefile])
AC_CONFIG_FILES([plugins/lastfm/Makefile])
fi
AC_OUTPUT
echo ""
echo "Build Configuration for $PACKAGE version $VERSION"
echo ""
echo " Gtk version used......: $GTK_VERSION"
echo " Prefix................: ${prefix}"
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.................................: $LIBPEAS_FOUND"
echo " * Controls Pragha using gnome-media-keys interface.......................: $LIBPEAS_FOUND"
echo " * Play Audio cds...............(Need libcdio, libcdio_paranoia, libcddb).: $CDROM_SUPPORT"
echo " * Controls Pragha using multimedia keys....(Need keybinder-3.0 >= 0.2.0).: $LIBKEYBINDER_FOUND"
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.20).: $RYGEL_FOUND"
echo " * Play songs on DLNA Servers..................(Need grilo-0.2 >= 0.2.10).: $GRILO_FOUND"
echo " * Lastfm scroble, and add similar songs support (Need libclastfm >= 0.5).: $LIBCLASTFM_FOUND"
echo " * EXPERIMENTAL management of removable devices..........(Need gudev-1.0).: $GUDEV_FOUND"
echo " * EXPERIMENTAL management of mtp 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 ""