This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac.in
300 lines (255 loc) · 10.8 KB
/
configure.ac.in
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
m4_define([intltool_minimum_version], [0.31])
m4_define([parole_verinfo], [0:5:90])
m4_define([parole_version_api], [0])
m4_define([parole_version_major], [0])
m4_define([parole_version_minor], [5])
m4_define([parole_version_micro], [90])
m4_define([parole_version_build], [])
m4_define([parole_version_tag], [])
m4_define([parole_version], [parole_version_major().parole_version_minor().parole_version_micro()ifelse(parole_version_tag(), [git], [parole_version_tag().parole_version_build()], [parole_version_tag()])])
AC_INIT([parole], [parole_version], [[email protected]])
AC_PREREQ(2.59c)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
AM_CONFIG_HEADER([config.h])
if test x${enable_gtk_doc} = x"yes"; then
AM_MAINTAINER_MODE([enable])
else
if test x${enable_debug} != x"no"; then
AM_MAINTAINER_MODE([enable])
else
AM_MAINTAINER_MODE()
fi
fi
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_USE_SYSTEM_EXTENSIONS()
# ===================================================== #
# Basic compiler settings #
# ===================================================== #
AC_PROG_CC()
AC_PROG_CXX()
AM_PROG_CC_C_O()
AC_PROG_LD()
AC_PROG_INSTALL()
AC_PROG_INTLTOOL([intltool_minimum_version], [no-xml])
# ===================================================== #
# Initialize libtool #
# ===================================================== #
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
# ===================================================== #
# Version information #
# ===================================================== #
PAROLE_VERINFO=parole_verinfo()
PAROLE_VERSION_API=parole_version_api()
PAROLE_VERSION_MAJOR=parole_version_major()
PAROLE_VERSION_MINOR=parole_version_minor()
PAROLE_VERSION_MICRO=parole_version_micro()
AC_SUBST([PAROLE_VERINFO])
AC_SUBST([PAROLE_VERSION_API])
AC_SUBST([PAROLE_VERSION_MAJOR])
AC_SUBST([PAROLE_VERSION_MINOR])
AC_SUBST([PAROLE_VERSION_MICRO])
# ===================================================== #
# Check for headers needed for standard interfaces #
# ===================================================== #
AC_HEADER_STDC
AC_CHECK_HEADERS([errno.h signal.h stddef.h sys/ioctl.h fcntl.h\
string.h sys/stat.h sys/types.h sys/wait.h time.h \
unistd.h])
# ===================================================== #
# Check for i18n support #
# ===================================================== #
XDT_I18N([@LINGUAS@])
# ===================================================== #
# Check for required packages #
# ===================================================== #
m4_define([gtk_minimum_version], [3.2.0])
m4_define([glib_minimum_version], [2.32.0])
dnl gstreamer version
AC_ARG_WITH([gstreamer],
[AS_HELP_STRING([--with-gstreamer=0.10|1.0],[which gstreamer version to compile against (default: 0.10)])],
[case "$with_gstreamer" in
0.10|1.0) ;;
*) AC_MSG_ERROR([invalid gstreamer version specified]) ;;
esac],
[with_gstreamer=0.10]
)
case "$with_gstreamer" in
0.10) gstreamer_api_version=0.10
gstreamer_minimum_version=0.10.31
GST_API_VERSION=0.10
GST_REQS=0.10.30
GSTPLUG_REQS=0.10.30
;;
1.0) gstreamer_api_version=1.0
gstreamer_minimum_version=1.0.0
GST_API_VERSION=1.0
GST_REQS=1.0.0
GSTPLUG_REQS=1.0.0
;;
esac
AC_DEFINE_UNQUOTED(GSTREAMER_API_VERSION, $gstreamer_api_version, [Define the GStreamer+ API version])
m4_define([dbus_minimum_version], [0.60])
m4_define([dbus_glib_minimum_version], [0.70])
m4_define([libxfce4ui_minimum_version],[4.10.0])
m4_define([libxfce4util_minimum_version],[4.10.0])
m4_define([libnotify_minimum_version], [0.4.1])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([DBUS], [dbus-1], [dbus_minimum_version])
XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [dbus_glib_minimum_version])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0],[libxfce4util_minimum_version])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0])
dnl ************************************
dnl *** Compile against GTK3 ***
dnl ************************************
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.10.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.2.0])
XDT_CHECK_PACKAGE([GST], [gstreamer-${gstreamer_api_version}], [${gstreamer_minimum_version}])
XDT_CHECK_PACKAGE([GST_BASE], [gstreamer-base-${gstreamer_api_version}], [${gstreamer_minimum_version}])
XDT_CHECK_PACKAGE([GST_VIDEO], [gstreamer-video-${gstreamer_api_version}], [${gstreamer_minimum_version}])
XDT_CHECK_PACKAGE([GST_PBUTILS], [gstreamer-pbutils-${gstreamer_api_version}], [${gstreamer_minimum_version}])
if test x"${gstreamer_api_version}" = x"0.10"; then
XDT_CHECK_PACKAGE([GST_INTERFACES], [gstreamer-interfaces-${gstreamer_api_version}], [${gstreamer_minimum_version}])
GST_LIBS="$GST_LIBS -lgstbase-$GST_API_VERSION -lgstinterfaces-$GST_API_VERSION -lgstvideo-$GST_API_VERSION -lgstaudio-$GST_API_VERSION -lgstpbutils-$GST_API_VERSION -lgsttag-$GST_API_VERSION"
else
GST_LIBS="$GST_LIBS -lgstbase-$GST_API_VERSION -lgstvideo-$GST_API_VERSION -lgstaudio-$GST_API_VERSION -lgstpbutils-$GST_API_VERSION -lgsttag-$GST_API_VERSION"
fi
XDT_CHECK_LIBX11()
# Taken from Gnome system tools
# ===================================================== #
# Pixmaps files #
# ===================================================== #
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [pixmaps directory])
pixmapsdir="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
else
AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [pixmaps directory])
pixmapsdir="${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
fi
AC_SUBST(pixmapsdir)
# ===================================================== #
# Check XF86keysysm #
# ===================================================== #
# Check for the AudioPlay sym other should exist
# if this one exists.
AC_CHECK_DECL(XF86XK_AudioPlay,have_XF86XK_AudioPlay=1,have_XF86XK_AudioPlay=0,[#include <X11/XF86keysym.h>])
if test "x${ac_cv_have_decl_XF86XK_AudioPlay}" != "xno"; then
AC_DEFINE(HAVE_XF86_KEYSYM, 1, [Define if XF86keysysm.h is available])
fi
# ===================================================== #
# TagLib support #
# ===================================================== #
TAGLIB_FOUND="no"
XDT_CHECK_OPTIONAL_PACKAGE([TAGLIB],
[taglib], [1.4],
[taglib],
[tag lib], [yes])
if test x"$TAGLIB_FOUND" = x"yes"; then
TAGLIBC_LIBS=""
TAGLIBC_CFLAGS=""
AC_CHECK_LIB([tag_c], [taglib_file_new],
[
AC_CHECK_HEADER([taglib/tag_c.h],
[
TAGLIBC_LIBS="-ltag_c"
AC_DEFINE([HAVE_TAGLIBC], [1], [Define to 1 if tag_c is found])
])
], [-lm])
AC_SUBST([TAGLIBC_CFLAGS])
AC_SUBST([TAGLIBC_LIBS])
fi
# ===================================================== #
# Check plugins to build #
# ===================================================== #
# Notify plugin.
#--------------------------
AC_ARG_ENABLE([notify-plugin], AC_HELP_STRING([--disable-notify-plugin], [Don't build parole notification plugin]),
[ac_notify_plugin=$enableval], [ac_notify_plugin=yes])
AC_MSG_CHECKING([whether to build the notification plugin])
AM_CONDITIONAL([PAROLE_NOTIFY_PLUGIN], [test x"$ac_notify_plugin" = x"yes"])
AC_MSG_RESULT([$ac_notify_plugin])
# Depends on Libnotify - if not found cannot build
LIBNOTIFY_FOUND="no"
if test x"$ac_notify_plugin" = x"yes"; then
XDT_CHECK_PACKAGE([LIBNOTIFY],
[libnotify], [libnotify_minimum_version])
fi
# Tray plugin.
#--------------------------
AC_ARG_ENABLE([tray-plugin], AC_HELP_STRING([--disable-tray-plugin], [Don't build parole tray icon plugin]),
[ac_tray_plugin=$enableval], [ac_tray_plugin=yes])
AC_MSG_CHECKING([whether to build the system tray plugin])
AM_CONDITIONAL([PAROLE_TRAY_PLUGIN], [test x"$ac_tray_plugin" = x"yes"])
AC_MSG_RESULT([$ac_tray_plugin])
# MPRIS2 plugin.
#--------------------------
AC_ARG_ENABLE([mpris2-plugin], AC_HELP_STRING([--disable-mpris2-plugin], [Don't build parole mpris2 plugin]),
[ac_mpris2_plugin=$enableval], [ac_mpris2_plugin=yes])
AC_MSG_CHECKING([whether to build the mpris2 plugin])
AM_CONDITIONAL([PAROLE_MPRIS2_PLUGIN], [test x"$ac_mpris2_plugin" = x"yes"])
AC_MSG_RESULT([$ac_mpris2_plugin])
# ===================================================== #
# Check for debugging support #
# ===================================================== #
XDT_FEATURE_DEBUG()
# ===================================================== #
# Check for Gtk doc #
# ===================================================== #
GTK_DOC_CHECK(1.9)
AC_OUTPUT([
Makefile
data/Makefile
data/pixmaps/Makefile
data/interfaces/Makefile
data/icons/Makefile
data/icons/16x16/Makefile
data/icons/24x24/Makefile
data/icons/32x32/Makefile
data/icons/48x48/Makefile
data/icons/scalable/Makefile
data/mime/Makefile
data/desktop/Makefile
src/Makefile
src/misc/Makefile
src/misc/parole.h
src/common/Makefile
src/gst/Makefile
src/dbus/Makefile
src/plugins/Makefile
src/plugins/sample/Makefile
src/plugins/notify/Makefile
src/plugins/tray/Makefile
src/plugins/mpris2/Makefile
docs/Makefile
docs/plugin-api/version.xml
docs/plugin-api/Makefile
po/Makefile.in
])
echo "
------------------------------------------------------
Parole Media Player $VERSION
====================================
Installation:
=============
prefix: $prefix
pixmapsdir: $pixmapsdir
Debug: $enable_debug
Building plugin api docs: ${enable_gtk_doc}
GStreamer API version: ${gstreamer_api_version}
GTK+ version: GTK+-3
Optional dependencies:
======================
Taglib: $TAGLIB_FOUND
Plugins to build:
=================
Notify: ${ac_notify_plugin}
System Tray icon: ${ac_tray_plugin}
MPRIS2: ${ac_mpris2_plugin}
------------------------------------------------------
Configuration finished, type make to compile"