~walkerlee/totem/pre-interview

« back to all changes in this revision

Viewing changes to configure.in

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