~walkerlee/totem/pre-interview

« back to all changes in this revision

Viewing changes to .pc/93_grilo_optional.patch/configure.ac

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-05-26 00:07:51 UTC
  • mfrom: (1.6.1) (24.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20130526000751-kv8ap3x1di4qq8j2
Tags: 3.8.2-0ubuntu1
* Sync with Debian. Remaining changes: 
* debian/control.in:
  - Drop build-depends on libepc-ui-dev and libgrilo-0.2-dev (in universe)
  - Drop libxtst-dev build-depends so that the (redundant) fake key presses
    for inhibiting the screensaver are disabled (LP: #1007438)
  - Build-depend on libzeitgeist-dev
  - Suggest rather than recommend gstreamer components in universe
  - Add totem-plugins-extra
  - Add XB-Npp-Description and XB-Npp-Filename header to the 
    totem-mozilla package to improve ubufox/ubuntu plugin db integration 
  - Refer to Firefox in totem-mozilla description instead of Iceweasel
  - Don't have totem-mozilla recommend any particular browser
  - Drop obsolete python library dependencies since iplayer is no longer
    included
* debian/totem-common.install, debian/source_totem.py:
  - Install Ubuntu apport debugging hook
* debian/totem-plugins-extra.install:
  - Universe plugins split out of totem-plugins (currently only gromit)
* debian/totem-plugins.install:    
  - Skip the plugins split to -extra and add the zeitgeist plugin
* debian/rules:
  - Build with --fail-missing, to ensure we install everything. 
    + Ignore libtotem.{,l}a since we delibrately don't install these.
  - Re-enable hardening, make sure both PIE and BINDNOW are used
    by setting hardening=+all. (LP: #1039604)
* debian/patches/91_quicklist_entries.patch:
  - Add static quicklist
* debian/patches/92_gst-plugins-good.patch:
  - Build without unnecessary gstreamer1.0-bad dependency
* debian/patches/93_grilo_optional.patch:
  - Allow building without grilo while grilo MIR is still pending
* debian/patches/correct_desktop_mimetypes.patch:
  - Don't list the mimetypes after the unity lists
* debian/patches/revert_shell_menu.patch: 
  - revert the use of a shell menu until indicator-appmenu can handle
    the mixed shell/traditional menus itself
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_PREREQ[(2.64)]
 
2
 
 
3
m4_define(totem_version_major, 3)
 
4
m4_define(totem_version_minor, 8)
 
5
m4_define(totem_version_micro, 2)
 
6
 
 
7
# The version of the API exposed to plugins
 
8
m4_define(totem_api_version_major, 1)
 
9
m4_define(totem_api_version_minor, 0)
 
10
 
 
11
AC_INIT([totem],
 
12
        [totem_version_major.totem_version_minor.totem_version_micro],
 
13
        [http://bugzilla.gnome.org/enter_bug.cgi?product=totem],
 
14
        [totem],
 
15
        [http://projects.gnome.org/totem/])
 
16
 
 
17
AM_MAINTAINER_MODE([enable])
 
18
AC_CONFIG_SRCDIR([src/totem.c])
 
19
AC_CONFIG_HEADERS([config.h])
 
20
AC_CONFIG_MACRO_DIR([m4])
 
21
AC_CONFIG_AUX_DIR([build-aux])
 
22
 
 
23
AM_INIT_AUTOMAKE([1.11 dist-xz tar-ustar no-dist-gzip check-news])
 
24
 
 
25
# Enable silent build when available (Automake 1.11)
 
26
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
27
 
 
28
dnl Add the languages which your application supports to po/LINGUAS
 
29
GETTEXT_PACKAGE=totem
 
30
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define to the Gettext package name])
 
31
AC_SUBST(GETTEXT_PACKAGE)
 
32
IT_PROG_INTLTOOL([0.40.0])
 
33
 
 
34
# User Documentation
 
35
YELP_HELP_INIT
 
36
 
 
37
GOBJECT_INTROSPECTION_CHECK([0.6.7])
 
38
 
 
39
AC_PROG_CXX
 
40
AM_PROG_CC_C_O
 
41
 
 
42
# Initialize libtool
 
43
LT_PREREQ([2.2])
 
44
LT_INIT
 
45
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
 
46
 
 
47
PKG_PROG_PKG_CONFIG
 
48
 
 
49
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
 
50
 
 
51
# Requirements
 
52
GLIB_REQS=2.33.0
 
53
GIO_REQS=2.27.92
 
54
GTK_REQS=3.5.2
 
55
TOTEM_PLPARSER_REQS=2.32.4
 
56
GNOMEICON_REQS=2.15.90
 
57
DBUS_REQS=0.82
 
58
VALA_REQS=0.14.1
 
59
PEAS_REQS=1.1.0
 
60
PYTHON_REQS=2.3
 
61
PYGOBJECT_REQS=2.90.3
 
62
GRILO_REQS=0.2.0
 
63
LIBXML_REQS=2.6.0
 
64
 
 
65
# Used in the pkg-config file for plugins
 
66
AC_SUBST(GLIB_REQS)
 
67
AC_SUBST(GTK_REQS)
 
68
AC_SUBST(TOTEM_PLPARSER_REQS)
 
69
 
 
70
TOTEM_VERSION_MAJOR=totem_version_major
 
71
TOTEM_VERSION_MINOR=totem_version_minor
 
72
TOTEM_VERSION_MICRO=totem_version_micro
 
73
AC_SUBST(TOTEM_VERSION_MAJOR)
 
74
AC_SUBST(TOTEM_VERSION_MINOR)
 
75
AC_SUBST(TOTEM_VERSION_MICRO)
 
76
 
 
77
TOTEM_API_VERSION=totem_api_version_major.totem_api_version_minor
 
78
AC_SUBST(TOTEM_API_VERSION)
 
79
AC_DEFINE_UNQUOTED(TOTEM_API_VERSION, ["$TOTEM_API_VERSION"], [Define to the Totem plugin API version])
 
80
 
 
81
# The full list of plugins
 
82
allowed_plugins="apple-trailers autoload-subtitles brasero-disc-recorder chapters dbusservice im-status gromit lirc media-player-keys ontop opensubtitles properties pythonconsole recent rotation save-file samplepython sample-vala screensaver screenshot sidebar-test skipto zeitgeist-dp grilo"
 
83
 
 
84
PLUGINDIR='${libdir}/totem/plugins'
 
85
AC_SUBST(PLUGINDIR)
 
86
 
 
87
dnl the two versions here implicate the gstreamer core and gst-plugins
 
88
dnl release versions.
 
89
GST_MAJORMINOR=1.0
 
90
GST_REQS=0.11.93
 
91
GST_PLUG_BASE_REQS=0.11.93
 
92
GSTPLUG_REQS=0.11.93
 
93
CLUTTER_REQS=1.10.0
 
94
CLUTTER_GST_REQS=1.5.5
 
95
CLUTTER_GTK_REQS=1.0.2
 
96
 
 
97
dnl Check for the required GStreamer versions for missing plugins
 
98
dnl installation, unless this has been disabled.
 
99
MISSING_PLUGINS_MODULES=""
 
100
AC_MSG_CHECKING([whether to enable easy codec installation support])
 
101
AC_ARG_ENABLE([easy-codec-installation],
 
102
        [
 
103
                AS_HELP_STRING([--enable-easy-codec-installation],
 
104
                        [Whether to enable easy codec installation support for GStreamer]
 
105
                )
 
106
        ], [
 
107
                case "${enableval}" in
 
108
                        yes) enable_easy_codec_installation=yes ;;
 
109
                        no)  enable_easy_codec_installation=no ;;
 
110
                        *) enable_easy_codec_installation=auto ;;
 
111
                esac
 
112
        ], [
 
113
                dnl default value
 
114
                enable_easy_codec_installation=auto
 
115
        ]
 
116
)
 
117
AC_MSG_RESULT([$enable_easy_codec_installation])
 
118
 
 
119
if test "x$enable_easy_codec_installation" != "xno"; then
 
120
        MISSING_PLUGINS_MODULES="gstreamer-pbutils-1.0"
 
121
        PKG_CHECK_MODULES(MISSING_PLUGINS, $MISSING_PLUGINS_MODULES,
 
122
        [
 
123
                AC_DEFINE([ENABLE_MISSING_PLUGIN_INSTALLATION], 1,
 
124
                          [Whether we can and want to do installation of missing plugins])
 
125
        ])
 
126
fi
 
127
 
 
128
# ================================================================
 
129
# Backend requirements
 
130
# ================================================================
 
131
 
 
132
BACKEND_MODULES="gstreamer-1.0 >= $GST_REQS gstreamer-base-1.0 >= $GST_REQS gstreamer-plugins-base-1.0 >= $GST_PLUG_BASE_REQS $MISSING_PLUGINS_MODULES gstreamer-tag-1.0 >= $GSTPLUG_REQS gstreamer-audio-1.0 gstreamer-video-1.0 clutter-1.0 >= $CLUTTER_REQS clutter-gst-2.0 >= $CLUTTER_GST_REQS clutter-gtk-1.0 cairo gnome-icon-theme >= $GNOMEICON_REQS gsettings-desktop-schemas"
 
133
 
 
134
PKG_CHECK_MODULES(BACKEND, $BACKEND_MODULES)
 
135
PKG_CHECK_MODULES(BACKEND_TEST, $BACKEND_MODULES gtk+-3.0 >= $GTK_REQS)
 
136
 
 
137
dnl Check for required plugins
 
138
gst10_toolsdir=`$PKG_CONFIG --variable=toolsdir gstreamer-1.0`
 
139
gst10_inspect="$gst10_toolsdir/gst-inspect-1.0"
 
140
 
 
141
dnl Give error and exit if we don't have the gst_inspect tool
 
142
AC_MSG_CHECKING([GStreamer 1.0 inspection tool])
 
143
if test -r "$gst10_inspect"; then
 
144
        AC_MSG_RESULT([yes])
 
145
else
 
146
        AC_MSG_RESULT([no])
 
147
        AC_MSG_ERROR([
 
148
                Cannot find required GStreamer-1.0 tool 'gst-inspect-1.0'.
 
149
                It should be part of gstreamer-1_0-utils. Please install it.
 
150
        ])
 
151
fi
 
152
 
 
153
dnl Check for elements from gst-plugins-base
 
154
dnl Set plugins which contain below elements
 
155
set -- playback videoscale
 
156
for base_element in playbin videoscale
 
157
do
 
158
        AC_MSG_CHECKING([GStreamer 1.0 $base_element element])
 
159
        if $gst10_inspect $base_element >/dev/null 2>/dev/null; then
 
160
                AC_MSG_RESULT([yes])
 
161
        else
 
162
                AC_MSG_RESULT([no])
 
163
                AC_MSG_ERROR([
 
164
                        Cannot find required GStreamer-1.0 plugin '$1'.
 
165
                        It should be part of gst-plugins-base. Please install it.
 
166
                ])
 
167
 
 
168
        fi
 
169
        shift;
 
170
done
 
171
 
 
172
dnl Check for elements from gst-plugins-good
 
173
dnl Set plugins which contain below elements
 
174
set -- autodetect goom scaletempo
 
175
for good_element in autoaudiosink goom scaletempo
 
176
do
 
177
        AC_MSG_CHECKING([GStreamer 1.0 $good_element element])
 
178
        if $gst10_inspect $good_element >/dev/null 2>/dev/null; then
 
179
                AC_MSG_RESULT([yes])
 
180
        else
 
181
                AC_MSG_RESULT([no])
 
182
                AC_MSG_ERROR([
 
183
                        Cannot find required GStreamer-1.0 plugin '$1'.
 
184
                        It should be part of gst-plugins-good. Please install it.
 
185
                ])
 
186
        fi
 
187
        shift;
 
188
done
 
189
 
 
190
dnl Check the smclient backend
 
191
AC_MSG_CHECKING([which smclient backend to use])
 
192
AC_ARG_WITH([smclient],
 
193
  [AS_HELP_STRING([--with-smclient],[which smclient backend to use (auto/no/xsmp/win32/quartz)])],
 
194
  [],
 
195
  [with_smclient=auto])
 
196
 
 
197
if test "$with_smclient" = "auto"; then
 
198
        # There could be several targets, given in any order (see bgo#652999)
 
199
        gdk_targets=`$PKG_CONFIG --variable targets gdk-3.0`
 
200
        for target in $gdk_targets; do
 
201
                case "$target" in
 
202
                        x11)
 
203
                                with_smclient=xsmp
 
204
                                PKG_CHECK_MODULES([SMCLIENT],[sm ice])
 
205
                                break
 
206
                                ;;
 
207
                        win32)
 
208
                                with_smclient=win32
 
209
                                break
 
210
                                ;;
 
211
                        quartz)
 
212
                                with_smclient=quartz
 
213
                                break
 
214
                                ;;
 
215
                        *)
 
216
                                with_smclient=no
 
217
                                # Loop around and see if we find a better target next time
 
218
                                ;;
 
219
                esac
 
220
        done
 
221
fi
 
222
 
 
223
AC_MSG_RESULT([$with_smclient])
 
224
 
 
225
if test "$with_smclient" != "no"; then
 
226
        AC_DEFINE([WITH_SMCLIENT],[1],[Define if smclient is enabled])
 
227
fi
 
228
 
 
229
AM_CONDITIONAL([WITH_SMCLIENT],[test "$with_smclient" != "no"])
 
230
AM_CONDITIONAL([WITH_SMCLIENT_XSMP],[test "$with_smclient" = "xsmp"])
 
231
AM_CONDITIONAL([WITH_SMCLIENT_WIN32],[test "$with_smclient" = "win32"])
 
232
AM_CONDITIONAL([WITH_SMCLIENT_QUARTZ],[test "$with_smclient" = "quartz"])
 
233
 
 
234
 
 
235
# ================================================================
 
236
# Python plugins
 
237
# ================================================================
 
238
# We don't Python or PyGObject at compile time, but they are needed for the Python plugins at runtime, so we check anyway.
 
239
# We need pylint for `make check`.
 
240
 
 
241
AC_MSG_CHECKING([whether Python plugin support is requested])
 
242
AC_ARG_ENABLE([python],
 
243
        AS_HELP_STRING([--enable-python],[Enable python support]),
 
244
        [enable_python=$enableval],
 
245
        [enable_python=autodetect])
 
246
AC_MSG_RESULT([$enable_python])
 
247
 
 
248
have_python=no
 
249
have_pygobject=no
 
250
PYTHON_MODULES=""
 
251
 
 
252
# Test for the Python run time and PyGObject. Test for pylint as well, for `make check`.
 
253
if test "x$enable_python" != "xno"; then
 
254
        AM_PATH_PYTHON([$PYTHON_REQS],[have_python=yes],[have_python=no])
 
255
        if test "x$PYTHON" = "x:"; then
 
256
                have_python=no
 
257
        fi
 
258
 
 
259
        PYTHON_MODULES="pygobject-3.0 >= $PYGOBJECT_REQS"
 
260
        PKG_CHECK_MODULES([PYGOBJECT],[$PYTHON_MODULES],[have_pygobject=yes],[have_pygobject=no])
 
261
        AC_PATH_PROG([PYLINT], [pylint], [no])
 
262
fi
 
263
 
 
264
# Output the results of the Python checks
 
265
if test "x$have_python" != "xyes" -o "x$have_pygobject" != "xyes" -o "x$PYLINT" = "xno"; then
 
266
        if test "x$enable_python" = "xyes"; then
 
267
                AC_MSG_ERROR([python >= $PYTHON_REQS, $PYTHON_MODULES or pylint not found])
 
268
        elif test "x$enable_python" = "xautodetect"; then
 
269
                enable_python=no
 
270
                AC_MSG_WARN([python >= $PYTHON_REQS, $PYTHON_MODULES or pylint not found; disabling Python support])
 
271
        fi
 
272
elif test "x$enable_python" != "xno"; then
 
273
        enable_python=yes
 
274
fi
 
275
 
 
276
AM_CONDITIONAL([ENABLE_PYTHON],[test "x$enable_python" = "xyes"])
 
277
 
 
278
# ================================================================
 
279
# Player requirements
 
280
#================================================================
 
281
 
 
282
PKG_CHECK_MODULES(PLAYER, $BACKEND_MODULES glib-2.0 >= $GLIB_REQS gio-2.0 >= $GIO_REQS gtk+-3.0 >= $GTK_REQS gdk-x11-3.0 >= $GTK_REQS gmodule-2.0 totem-plparser >= $TOTEM_PLPARSER_REQS libpeas-1.0 >= $PEAS_REQS libpeas-gtk-1.0 >= $PEAS_REQS $PYTHON_MODULES)
 
283
PKG_CHECK_MODULES(LIBPLAYER, glib-2.0 >= $GLIB_REQS gio-2.0 >= $GIO_REQS gtk+-3.0 >= $GTK_REQS gdk-x11-3.0 >= $GTK_REQS clutter-gtk-1.0)
 
284
PKG_CHECK_MODULES(HELPER, gstreamer-1.0 gstreamer-tag-1.0)
 
285
PKG_CHECK_MODULES(TIME_HELPER, glib-2.0)
 
286
PKG_CHECK_MODULES(PIXBUF_HELPER, gdk-pixbuf-2.0 gstreamer-tag-1.0 >= $GSTPLUG_REQS gstreamer-video-1.0)
 
287
PKG_CHECK_MODULES(THUMBNAILER, gtk+-3.0 >= $GTK_REQS totem-plparser >= $TOTEM_PLPARSER_REQS gstreamer-tag-1.0 >= $GSTPLUG_REQS gstreamer-video-1.0)
 
288
PKG_CHECK_MODULES(PREVIEW, gstreamer-1.0 >= $GST_REQS gio-2.0 >= $GIO_REQS gdk-pixbuf-2.0)
 
289
PKG_CHECK_MODULES(PROPERTIES, gtk+-3.0 >= $GTK_REQS)
 
290
 
 
291
LIBGD_INIT([
 
292
        tagged-entry
 
293
        main-icon-view
 
294
        static
 
295
 ])
 
296
 
 
297
 
 
298
dnl ================================================================
 
299
dnl Vala plugins
 
300
dnl ================================================================
 
301
AC_MSG_CHECKING([whether Vala plugin support is requested])
 
302
AC_ARG_ENABLE([vala],
 
303
        AS_HELP_STRING([--enable-vala],[Enable Vala plugin support]),
 
304
        [enable_vala=$enableval],
 
305
        [enable_vala=auto])
 
306
AC_MSG_RESULT([$enable_vala])
 
307
if test "x$enable_vala" != "xno"; then
 
308
        AM_PROG_VALAC([$VALA_REQS])
 
309
        if test "x$VALAC" = "x"; then
 
310
                if test "x$enable_vala" = "xyes"; then
 
311
                        AC_MSG_ERROR([Vala plugin support explicitly requested, but not found])
 
312
                fi
 
313
                with_vala=no
 
314
        else
 
315
                with_vala=yes
 
316
        fi
 
317
fi
 
318
 
 
319
AM_CONDITIONAL(ENABLE_VALA, test "x$with_vala" = "xyes")
 
320
 
 
321
# ********************
 
322
# Movie player plugins
 
323
# ********************
 
324
 
 
325
plugin_error_or_ignore()
 
326
{
 
327
        if test "${error_on_bad_plugin}" = "1" ; then
 
328
                AC_MSG_ERROR([$1])
 
329
        else
 
330
                AC_MSG_WARN([$1 (disabling plugin)])
 
331
        fi
 
332
}
 
333
 
 
334
plugin_error()
 
335
{
 
336
        AC_MSG_ERROR([$1])
 
337
}
 
338
 
 
339
AC_ARG_WITH([plugins],
 
340
        [AS_HELP_STRING([--with-plugins],[Which Totem plugins to compile (default: auto; "all", "none" and "autodetect" are valid)])],
 
341
        [], [with_plugins=autodetect])
 
342
 
 
343
used_plugins=""
 
344
used_plugins2=""
 
345
 
 
346
if test "x${with_plugins}" = "xautodetect" ; then
 
347
        # Default to all plugins and just ignore them if they won't compile
 
348
        with_plugins="all"
 
349
        error_on_bad_plugin="0"
 
350
else
 
351
        # Clean up the plugin list and error if a plugin won't compile
 
352
        with_plugins=`echo ,"${with_plugins}", | sed -e 's/[[   ,]][[   ,]]*/ /g' -e 's/,$//'`
 
353
        error_on_bad_plugin="1"
 
354
fi
 
355
 
 
356
# Iterate through the wanted plugins and weed out bad ones (or error)
 
357
for wanted_plugin in ${with_plugins}; do
 
358
        for allowed_plugin in ${allowed_plugins}; do
 
359
                case ${wanted_plugin} in
 
360
                        all)
 
361
                                # List all plugins as being used
 
362
                                used_plugins=${allowed_plugins}
 
363
                        ;;
 
364
                        autodetect)
 
365
                                # List all plugins as being used
 
366
                                used_plugins=${allowed_plugins}
 
367
                        ;;
 
368
                        none) used_plugins="";; # List no plugins
 
369
                        ${allowed_plugin}) used_plugins="${used_plugins} ${wanted_plugin}";; # List the plugin
 
370
                        *) ;;
 
371
                esac
 
372
        done
 
373
done
 
374
 
 
375
# Check for plugin-specific requirements and error if necessary
 
376
for plugin in ${used_plugins}; do
 
377
        add_plugin="1"
 
378
 
 
379
        case ${plugin} in
 
380
                gromit)
 
381
                        have_x11=no
 
382
                        gdk_targets=$(pkg-config --variable=targets gtk+-3.0)
 
383
                        for gdk_target in $gdk_targets; do
 
384
                                if test x$gdk_target = xx11; then
 
385
                                        have_x11=yes
 
386
                                        break
 
387
                                fi
 
388
                        done
 
389
 
 
390
                        if test "${have_x11}" != "yes" ; then
 
391
                                plugin_error_or_ignore "the gromit plugin is not supported on non-X11 targets"
 
392
                                add_plugin="0"
 
393
                        fi
 
394
                ;;
 
395
                media-player-keys)
 
396
                        PKG_CHECK_MODULES(MEDIA_PLAYER_KEYS, gio-2.0,
 
397
                                [HAVE_MEDIA_PLAYER_KEYS=yes], [HAVE_MEDIA_PLAYER_KEYS=no])
 
398
                        if test "${HAVE_MEDIA_PLAYER_KEYS}" != "yes" ; then
 
399
                                plugin_error "you need gio installed for the media-player-keys plugin"
 
400
                                add_plugin="0"
 
401
                        fi
 
402
                ;;
 
403
                lirc)
 
404
                        AC_CHECK_LIB(lirc_client, lirc_init,
 
405
                                [AC_CHECK_HEADER(lirc/lirc_client.h,
 
406
                                        [LIRC_LIBS="-llirc_client"
 
407
                                         HAVE_LIRC=yes],
 
408
                                        [
 
409
                                         LIRC_LIBS=""
 
410
                                         HAVE_LIRC=no])])
 
411
                        AC_SUBST(LIRC_LIBS)
 
412
                        if test "${HAVE_LIRC}" != "yes" ; then
 
413
                                plugin_error_or_ignore "you need lirc_client installed for the lirc plugin"
 
414
                                add_plugin="0"
 
415
                        fi
 
416
                ;;
 
417
                rotation)
 
418
                        if test "${with_vala}" != "yes" ; then
 
419
                                plugin_error_or_ignore "you need vala installed to use the rotation plugin"
 
420
                                add_plugin="0"
 
421
                        elif test "x$found_introspection" != "xyes"; then
 
422
                                plugin_error_or_ignore "you need introspection support for the rotation plugin"
 
423
                                add_plugin="0"
 
424
                        fi
 
425
                ;;
 
426
                sample-vala)
 
427
                        if test "${with_vala}" != "yes" ; then
 
428
                                plugin_error_or_ignore "you need vala installed to use the sample-vala plugin"
 
429
                                add_plugin="0"
 
430
                        elif test "x$found_introspection" != "xyes"; then
 
431
                                plugin_error_or_ignore "you need introspection support for the sample-vala plugin"
 
432
                                add_plugin="0"
 
433
                        fi
 
434
                ;;
 
435
                brasero-disc-recorder)
 
436
                        dnl this is only needed to use brasero icons
 
437
                        PKG_CHECK_MODULES(DISC_RECORDER, libxml-2.0 >= 2.6.0 gtk+-x11-3.0,
 
438
                                        [BUILD_RECORDER=yes], [BUILD_RECORDER=no])
 
439
                        if test "${BUILD_RECORDER}" != "yes" ; then
 
440
                                plugin_error_or_ignore "you need libxml-2.0 >= 2.6.0 and gtk+-x11-3.0 to use the brasero-disc-recorder plugin"
 
441
                                add_plugin="0"
 
442
                        fi
 
443
                ;;
 
444
                save-file)
 
445
                        dnl the nautilus check should be a run-time check
 
446
                        dnl but it might not always be running
 
447
                        PKG_CHECK_MODULES(SAVE_FILE_CHECK, gio-2.0 >= 2.26 libnautilus-extension >= 2.91.3,
 
448
                                          [BUILD_SAVE_FILE=yes], [BUILD_SAVE_FILE=no])
 
449
                        if test "${BUILD_SAVE_FILE}" != "yes" ; then
 
450
                                plugin_error_or_ignore "you need gio-2.0 >=2.26 to use the save-file plugin"
 
451
                                add_plugin="0"
 
452
                        else
 
453
                                PKG_CHECK_MODULES(SAVE_FILE, gio-2.0 >= 2.26)
 
454
                        fi
 
455
                ;;
 
456
                chapters)
 
457
                        PKG_CHECK_MODULES(CHAPTERS, libxml-2.0 >= $LIBXML_REQS gtk+-3.0 glib-2.0,
 
458
                                [BUILD_CHAPTERS=yes], [BUILD_CHAPTERS=no])
 
459
                        if test "${BUILD_CHAPTERS}" != "yes" ; then
 
460
                                plugin_error "you need gtk+-3.0, glib-2.0 >= 2.15.0 and libxml-2.0 >= 2.6.0 to use the chapters plugin"
 
461
                                add_plugin="0"
 
462
                        fi
 
463
                ;;
 
464
                zeitgeist-dp)
 
465
                        if test "${with_vala}" != "yes" ; then
 
466
                                plugin_error_or_ignore "you need vala installed to use the zeitgeist-dp plugin"
 
467
                                add_plugin="0"
 
468
                        elif test "x$found_introspection" != "xyes"; then
 
469
                                plugin_error_or_ignore "you need introspection support for the zeitgeist-dp plugin"
 
470
                                add_plugin="0"
 
471
                        else
 
472
                                PKG_CHECK_MODULES(LIBZEITGEIST, zeitgeist-1.0 >= 0.3.6,
 
473
                                [HAS_LIBZEITGEIST=yes], [HAS_LIBZEITGEIST=no])
 
474
                                if test "${HAS_LIBZEITGEIST}" != "yes" ; then
 
475
                                        plugin_error_or_ignore "you need zeitgeist-1.0 >= 0.3.6 to use the zeitgeist-dp plugin"
 
476
                                        add_plugin="0"
 
477
                                fi
 
478
                        fi
 
479
                ;;
 
480
                grilo)
 
481
                        PKG_CHECK_MODULES(LIBGRILO, grilo-0.2 >= $GRILO_REQS,
 
482
                                [HAVE_LIBGRILO=yes], [HAVE_LIBGRILO=no])
 
483
                        if test "${HAVE_LIBGRILO}" != "yes" ; then
 
484
                                plugin_error "you need libgrilo >= $GRILO_REQS installed for the Grilo plugin"
 
485
                                add_plugin="0"
 
486
                        fi
 
487
                ;;
 
488
        esac
 
489
 
 
490
        # Add the specified plugin
 
491
        if test "${add_plugin}" = "1" ; then
 
492
                used_plugins2="${used_plugins2} ${plugin}"
 
493
        fi
 
494
done
 
495
 
 
496
ALL_PLUGINS=$allowed_plugins
 
497
PLUGINS=$used_plugins2
 
498
 
 
499
AC_MSG_CHECKING([which plugins to compile])
 
500
AC_MSG_RESULT([$PLUGINS])
 
501
 
 
502
AC_SUBST([ALL_PLUGINS])
 
503
AC_SUBST([PLUGINS])
 
504
 
 
505
# ***************
 
506
# Browser plugins
 
507
# ***************
 
508
 
 
509
AC_MSG_CHECKING([whether to compile the browser plugins])
 
510
 
 
511
AC_ARG_ENABLE([browser-plugins],
 
512
        [AS_HELP_STRING([--enable-browser-plugins],[compile the totem browser plugins])],
 
513
        [],[enable_browser_plugins=yes])
 
514
AC_MSG_RESULT([$enable_browser_plugins])
 
515
 
 
516
if test "$enable_browser_plugins" = "yes" ; then
 
517
        AC_DEFINE([ENABLE_BROWSER_PLUGINS],[1],[Define to build the browser plugin])
 
518
 
 
519
        BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}"
 
520
        AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
 
521
 
 
522
        PKG_CHECK_MODULES([BROWSER_PLUGIN],
 
523
                [glib-2.0
 
524
                 gio-2.0 >= $GIO_REQS
 
525
                 gmodule-export-2.0
 
526
                 x11
 
527
                 totem-plparser-mini >= $TOTEM_PLPARSER_REQS],
 
528
                [],[enable_browser_plugins=no])
 
529
 
 
530
        AC_SUBST([BROWSER_PLUGIN_CFLAGS])
 
531
        AC_SUBST([BROWSER_PLUGIN_LIBS])
 
532
 
 
533
        # Earlier versions misdetect playlists
 
534
        PKG_CHECK_EXISTS([shared-mime-info >= 0.22],
 
535
                        [],
 
536
                        [AC_MSG_ERROR([
 
537
                                The Browser plugin requires shared-mime-info
 
538
                                >= 0.22 to function.])])
 
539
 
 
540
        PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_REQS],,
 
541
                        [enable_browser_plugins=no])
 
542
        DBUSLIBDIR="`$PKG_CONFIG dbus-glib-1 --variable=libdir`"
 
543
        DBUSBINDIR="`echo $DBUSLIBDIR | sed -e s/lib/bin/`"
 
544
        AC_PATH_PROG([DBUS_BIND], [dbus-binding-tool], [no], [$DBUSBINDIR:$PATH])
 
545
        if test "x$DBUS_BIND" = "xno"; then
 
546
                AC_MSG_WARN([dbus-binding-tool not found])
 
547
                enable_browser_plugins=no
 
548
        fi
 
549
 
 
550
        # check for -fno-rtti flag
 
551
 
 
552
        AC_LANG_PUSH([C++])
 
553
        __SAVE_CXXFLAGS=$CXXFLAGS
 
554
        CXXFLAGS="-fno-rtti $CXXFLAGS"
 
555
 
 
556
        AC_MSG_CHECKING([for -fno-rtti compiler flag])
 
557
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[have_no_rtti_flag=yes],[have_no_rtti_flag=no])
 
558
        AC_MSG_RESULT([$have_no_rtti_flag])
 
559
 
 
560
        CXXFLAGS=$__SAVE_CXXFLAGS
 
561
        AC_LANG_POP([C++])
 
562
 
 
563
        if test "$have_no_rtti_flag" = "yes"; then
 
564
                AM_CXXFLAGS="-fno-rtti $AM_CXXFLAGS"
 
565
        fi
 
566
 
 
567
        PKG_CHECK_MODULES(PLUGIN_VIEWER, $BACKEND_MODULES gtk+-3.0 >= $GTK_REQS totem-plparser >= $TOTEM_PLPARSER_REQS gdk-x11-3.0 >= $GTK_REQS dbus-glib-1 >= $DBUS_REQS)
 
568
        PKG_CHECK_MODULES(GLOW_BUTTON, gtk+-3.0)
 
569
fi
 
570
 
 
571
AM_CONDITIONAL([ENABLE_BROWSER_PLUGINS], [test "$enable_browser_plugins" = "yes"])
 
572
 
 
573
# check which plugins to enable
 
574
 
 
575
if test "$enable_browser_plugins" = "yes"; then
 
576
 
 
577
AC_MSG_CHECKING([whether to enable the GMP browser plugin])
 
578
AC_ARG_ENABLE([gmp-plugin],
 
579
        AS_HELP_STRING([--enable-gmp-plugin],[Whether to enable the GMP browser plugin]),
 
580
        [],[enable_gmp_plugin=yes])
 
581
AC_MSG_RESULT([$enable_gmp_plugin])
 
582
 
 
583
AC_MSG_CHECKING([whether to enable the NarrowSpace browser plugin])
 
584
AC_ARG_ENABLE([narrowspace-plugin],
 
585
        AS_HELP_STRING([--enable-narrowspace-plugin],[Whether to enable the NarrowSpace browser plugin]),
 
586
        [],[enable_narrowspace_plugin=yes])
 
587
AC_MSG_RESULT([$enable_narrowspace_plugin])
 
588
 
 
589
AC_MSG_CHECKING([whether to enable the MullY browser plugin])
 
590
AC_ARG_ENABLE([mully-plugin],
 
591
        AS_HELP_STRING([--enable-mully-plugin],[Whether to enable the MullY browser plugin]),
 
592
        [],[enable_mully_plugin=yes])
 
593
AC_MSG_RESULT([$enable_mully_plugin])
 
594
 
 
595
AC_MSG_CHECKING([whether to enable the Cone browser plugin])
 
596
AC_ARG_ENABLE([cone-plugin],
 
597
        AS_HELP_STRING([--enable-cone-plugin],[Whether to enable the Cone browser plugin]),
 
598
        [],[enable_cone_plugin=yes])
 
599
AC_MSG_RESULT([$enable_cone_plugin])
 
600
 
 
601
AC_MSG_CHECKING([whether to enable the Vegas browser plugin])
 
602
AC_ARG_ENABLE([vegas-plugin],
 
603
        AS_HELP_STRING([--enable-vegas-plugin],[Whether to enable the Vegas browser plugin]),
 
604
        [],[enable_vegas_plugin=yes])
 
605
AC_MSG_RESULT([$enable_vegas_plugin])
 
606
 
 
607
fi
 
608
 
 
609
AM_CONDITIONAL([ENABLE_GMP_PLUGIN],[test "$enable_gmp_plugin" = "yes"])
 
610
AM_CONDITIONAL([ENABLE_NARROWSPACE_PLUGIN],[test "$enable_narrowspace_plugin" = "yes"])
 
611
AM_CONDITIONAL([ENABLE_MULLY_PLUGIN],[test "$enable_mully_plugin" = "yes"])
 
612
AM_CONDITIONAL([ENABLE_CONE_PLUGIN],[test "$enable_cone_plugin" = "yes"])
 
613
AM_CONDITIONAL([ENABLE_VEGAS_PLUGIN],[test "$enable_vegas_plugin" = "yes"])
 
614
 
 
615
dnl ********
 
616
dnl Nautilus
 
617
dnl ********
 
618
 
 
619
dnl Check for Nautilus property page build
 
620
AC_ARG_ENABLE(nautilus,
 
621
        AS_HELP_STRING([--enable-nautilus],[compile the nautilus plugin]),
 
622
        [case "${enableval}" in
 
623
        yes) ENABLE_NAUTILUS=yes ;;
 
624
        no) ENABLE_NAUTILUS=no ;;
 
625
        *) AC_MSG_ERROR(bad value ${enableval} for --enable-nautilus) ;;
 
626
        esac],
 
627
        [ENABLE_NAUTILUS=yes]) dnl Default value
 
628
 
 
629
if test x$ENABLE_NAUTILUS = "xyes" ; then
 
630
        PKG_CHECK_MODULES(NAUTILUS, gtk+-3.0 gthread-2.0 libnautilus-extension gstreamer-tag-1.0 >= $GSTPLUG_REQS $MISSING_PLUGINS_MODULES,
 
631
                        [HAVE_NAUTILUS=yes], [HAVE_NAUTILUS=no])
 
632
fi
 
633
 
 
634
AC_ARG_WITH(nautilusdir,
 
635
            AS_HELP_STRING([--with-nautilusdir=DIR],[Installation path for Nautilus extension @<:@auto@:>@]),
 
636
            [ac_with_nautilusdir=$withval],
 
637
            [ac_with_nautilusdir=""])
 
638
 
 
639
if test x$HAVE_NAUTILUS = "xyes"; then
 
640
        AC_DEFINE(HAVE_NAUTILUS, 1, [defined if you build the nautilus plugin])
 
641
        if test "${ac_with_nautilusdir}" = ""; then
 
642
                ac_with_nautilusdir=`pkg-config --variable=extensiondir libnautilus-extension`
 
643
        fi
 
644
        AC_SUBST(NAUTILUSDIR)
 
645
        AC_MSG_NOTICE([installing nautilus plugin in ${ac_with_nautilusdir}])
 
646
        AC_SUBST([NAUTILUSDIR],[${ac_with_nautilusdir}])
 
647
 
 
648
fi
 
649
AM_CONDITIONAL(HAVE_NAUTILUS, test x$HAVE_NAUTILUS = "xyes")
 
650
 
 
651
GLIB_GSETTINGS
 
652
 
 
653
GNOME_DEBUG_CHECK
 
654
GNOME_COMPILE_WARNINGS([maximum])
 
655
GNOME_CXX_WARNINGS
 
656
GNOME_MAINTAINER_MODE_DEFINES
 
657
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
 
658
 
 
659
# This macro expands DIR and assigns it to RET.
 
660
# If DIR is NONE, then it's replaced by DEFAULT.
 
661
# Based on AC_DEFINE_DIR
 
662
AC_DEFUN([TOTEM_FULLPATH], [
 
663
  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
 
664
  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
665
  ac_expand=[$]$1
 
666
  test "x$ac_expand" = xNONE && ac_expand="[$]$2"
 
667
  ac_expand=`eval echo [$]ac_expand`
 
668
  $3=`eval echo [$]ac_expand`
 
669
])
 
670
 
 
671
dnl FULL_LIBEXECDIR is used for X-GNOME-Bugzilla-ExtraInfoScript expansion
 
672
dnl in data/totem.desktop.in.in.in
 
673
TOTEM_FULLPATH(libexecdir, NONE, FULL_LIBEXECDIR)
 
674
AC_SUBST(FULL_LIBEXECDIR)
 
675
 
 
676
dnl run in source tree
 
677
AC_ARG_ENABLE(run-in-source-tree,
 
678
              AS_HELP_STRING([--disable-run-in-source-tree],[disable search for UI files and plugins in local directory ]),
 
679
        [case "${enableval}" in
 
680
        yes) ENABLE_RUN_IN_SOURCE_TREE=yes ;;
 
681
        no)  ENABLE_RUN_IN_SOURCE_TREE=no ;;
 
682
        *) AC_MSG_ERROR(bad value ${enableval} for --disable-run-in-source-tree) ;;
 
683
        esac],
 
684
[ENABLE_RUN_IN_SOURCE_TREE=yes]) dnl Default value
 
685
if test x$ENABLE_RUN_IN_SOURCE_TREE = xyes; then
 
686
        AC_DEFINE(TOTEM_RUN_IN_SOURCE_TREE, 1, [enable search for UI files and plugins in local directory])
 
687
fi
 
688
 
 
689
if test "$GCC" = "yes" ; then
 
690
        CFLAGS="\
 
691
        -Wall \
 
692
        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
 
693
        -Wnested-externs -Wpointer-arith \
 
694
        -Wcast-align -Wsign-compare \
 
695
        -fno-strict-aliasing \
 
696
        $CFLAGS"
 
697
fi
 
698
 
 
699
AC_SUBST([AM_CPPFLAGS])
 
700
AC_SUBST([AM_CFLAGS])
 
701
AC_SUBST([AM_CXXFLAGS])
 
702
AC_SUBST([AM_LDFLAGS])
 
703
 
 
704
AC_CONFIG_FILES([
 
705
Makefile
 
706
totem.spec
 
707
libgd/Makefile
 
708
src/Makefile
 
709
src/gst/Makefile
 
710
src/properties/Makefile
 
711
src/plugins/Makefile
 
712
src/plugins/apple-trailers/Makefile
 
713
src/plugins/autoload-subtitles/Makefile
 
714
src/plugins/dbusservice/Makefile
 
715
src/plugins/screensaver/Makefile
 
716
src/plugins/screenshot/Makefile
 
717
src/plugins/ontop/Makefile
 
718
src/plugins/im-status/Makefile
 
719
src/plugins/gromit/Makefile
 
720
src/plugins/lirc/Makefile
 
721
src/plugins/media-player-keys/Makefile
 
722
src/plugins/opensubtitles/Makefile
 
723
src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in
 
724
src/plugins/properties/Makefile
 
725
src/plugins/recent/Makefile
 
726
src/plugins/rotation/Makefile
 
727
src/plugins/save-file/Makefile
 
728
src/plugins/sidebar-test/Makefile
 
729
src/plugins/skipto/Makefile
 
730
src/plugins/samplepython/Makefile
 
731
src/plugins/sample-vala/Makefile
 
732
src/plugins/pythonconsole/Makefile
 
733
src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in
 
734
src/plugins/brasero-disc-recorder/Makefile
 
735
src/plugins/chapters/Makefile
 
736
src/plugins/zeitgeist-dp/Makefile
 
737
src/plugins/grilo/Makefile
 
738
src/backend/Makefile
 
739
browser-plugin/Makefile
 
740
data/Makefile
 
741
data/org.gnome.totem.gschema.xml.in
 
742
data/totem.desktop.in.in
 
743
data/totem.pc
 
744
data/icons/Makefile
 
745
data/icons/16x16/Makefile
 
746
data/icons/22x22/Makefile
 
747
data/icons/24x24/Makefile
 
748
data/icons/32x32/Makefile
 
749
data/icons/48x48/Makefile
 
750
data/icons/256x256/Makefile
 
751
data/icons/scalable/Makefile
 
752
po/Makefile.in
 
753
help/Makefile
 
754
docs/Makefile
 
755
docs/reference/Makefile
 
756
docs/reference/version.xml
 
757
])
 
758
AC_OUTPUT
 
759
 
 
760
AC_MSG_NOTICE([Totem was configured with the following options:])
 
761
AC_MSG_NOTICE([** Using the GStreamer-$GST_MAJORMINOR backend])
 
762
if test "x$MISSING_PLUGINS_LIBS" != "x"; then
 
763
        AC_MSG_NOTICE([** Easy codec installation support enabled])
 
764
else
 
765
        AC_MSG_NOTICE([   Easy codec installation support disabled])
 
766
fi
 
767
if test x$enable_python = xyes ; then
 
768
        AC_MSG_NOTICE([** Python plugin support enabled])
 
769
else
 
770
        AC_MSG_NOTICE([   Python plugin support disabled])
 
771
fi
 
772
if test x$with_vala = xyes ; then
 
773
        AC_MSG_NOTICE([** Vala plugin support enabled])
 
774
else
 
775
        AC_MSG_NOTICE([   Vala plugin support disabled])
 
776
fi
 
777
if test "x${PLUGINS}" != "x" ; then
 
778
        for allowed_plugin in ${ALL_PLUGINS}; do
 
779
                for plugin in ${PLUGINS}; do
 
780
                        case ${allowed_plugin} in
 
781
                                ${plugin})
 
782
                                        AC_MSG_NOTICE([** ${allowed_plugin} plugin enabled])
 
783
                                        continue 2
 
784
                                ;;
 
785
                                *);;
 
786
                        esac
 
787
                done
 
788
                AC_MSG_NOTICE([   ${allowed_plugin} plugin disabled])
 
789
        done
 
790
else
 
791
        AC_MSG_NOTICE([   No Totem plugins enabled])
 
792
fi
 
793
if test x$enable_browser_plugins = xyes ; then
 
794
        AC_MSG_NOTICE([** Browser plugin enabled])
 
795
        if test x$enable_gmp_plugin = xyes ; then
 
796
                AC_MSG_NOTICE([** GMP (Windows Media) plugin enabled])
 
797
        else
 
798
                AC_MSG_NOTICE([   GMP (Windows Media) plugin disabled])
 
799
        fi
 
800
        if test x$enable_narrowspace_plugin = xyes ; then
 
801
                AC_MSG_NOTICE([** NarrowSpace (QuickTime) plugin enabled])
 
802
        else
 
803
                AC_MSG_NOTICE([   NarrowSpace (QuickTime) plugin disabled])
 
804
        fi
 
805
        if test x$enable_mully_plugin = xyes ; then
 
806
                AC_MSG_NOTICE([** MullY (DivX) plugin enabled])
 
807
        else
 
808
                AC_MSG_NOTICE([   MullY (DivX) plugin disabled])
 
809
        fi
 
810
        if test x$enable_cone_plugin = xyes ; then
 
811
                AC_MSG_NOTICE([** Cone (VLC) plugin enabled])
 
812
        else
 
813
                AC_MSG_NOTICE([   Cone (VLC) plugin disabled])
 
814
        fi
 
815
        if test x$enable_vegas_plugin = xyes ; then
 
816
                AC_MSG_NOTICE([** Vegas (Flash) plugin enabled])
 
817
        else
 
818
                AC_MSG_NOTICE([   Vegas (Flash) plugin disabled])
 
819
        fi
 
820
else
 
821
        AC_MSG_NOTICE([   Browser plugin disabled])
 
822
fi
 
823
if test x$ENABLE_NAUTILUS = xyes ; then
 
824
        AC_MSG_NOTICE([** Nautilus properties page enabled])
 
825
else
 
826
        AC_MSG_NOTICE([   Nautilus properties page disabled])
 
827
fi
 
828
if test "$with_smclient" != "no" ; then
 
829
        AC_MSG_NOTICE([** SM client support enabled])
 
830
else
 
831
        AC_MSG_NOTICE([   SM client support disabled])
 
832
fi
 
833
 
 
834
AC_MSG_NOTICE([End options])
 
835