3 [m4_esyscmd(GNOME_TAG_PATTERN=RYGEL build-aux/git-version-gen .tarball-version)],
4 [http://bugzilla.gnome.org/enter_bug.cgi?product=Rygel],
6 [http://live.gnome.org/Rygel])
7 AC_CONFIG_AUX_DIR([build-aux])
9 AC_CONFIG_SRCDIR([src/librygel-core/rygel-root-device.vala])
10 AC_CONFIG_HEADERS([config.h])
11 AC_CONFIG_MACRO_DIR([m4])
13 AC_SEARCH_LIBS([strerror],[cposix])
18 AC_SUBST(abs_top_builddir)
21 dnl Initialize automake
22 AM_INIT_AUTOMAKE([1.11.1 tar-ustar no-dist-gzip dist-xz -Wno-portability])
23 AM_MAINTAINER_MODE([enable])
25 dnl Initialize libtool
26 dnl Disable generation of static libraries
28 LT_INIT([dlopen disable-static])
30 dnl Required versions of library packages
31 dnl Not all of these are actually used, depending on the configure options.
38 GUPNP_AV_REQUIRED=0.11.4
39 GUPNP_DLNA_REQUIRED=0.9.4
40 GSTREAMER_REQUIRED=1.0
45 LIBSOUP_REQUIRED=2.34.0
48 dnl Additional requirements for media-export plugin
49 GSTREAMER_TAG_REQUIRED=1.0
50 GSTREAMER_APP_REQUIRED=1.0
51 LIBSQLITE3_REQUIRED=3.5
53 dnl Additional requirements for tracker plugin
54 TRACKER_SPARQL_REQUIRED_MIN=0.14.0
56 VALAFLAGS="--target-glib=2.32 $VALAFLAGS"
58 RYGEL_BASE_MODULES="gupnp-1.0 >= $GUPNP_REQUIRED gee-0.8 >= $GEE_REQUIRED"
59 PKG_CHECK_MODULES([LIBRYGEL_CORE_DEPS], [$RYGEL_BASE_MODULES uuid >= $UUID_REQUIRED gssdp-1.0 >= $GSSDP_REQUIRED gio-2.0 >= $GIO_REQUIRED gmodule-2.0 libxml-2.0 >= $LIBXML_REQUIRED])
60 RYGEL_BASE_MODULES_VALAFLAGS='--pkg gupnp-1.0 --pkg gee-0.8'
61 LIBRYGEL_CORE_DEPS_VALAFLAGS="$RYGEL_BASE_MODULES_VALAFLAGS --pkg gssdp-1.0 --pkg gio-2.0 --pkg gmodule-2.0"
62 AC_SUBST([LIBRYGEL_CORE_DEPS_VALAFLAGS])
64 RYGEL_COMMON_MODULES="$RYGEL_BASE_MODULES gupnp-av-1.0 >= $GUPNP_AV_REQUIRED"
65 PKG_CHECK_MODULES([LIBRYGEL_SERVER_DEPS], [$RYGEL_COMMON_MODULES uuid >= $UUID_REQUIRED gssdp-1.0 >= $GSSDP_REQUIRED gio-2.0 >= $GIO_REQUIRED gmodule-2.0 libxml-2.0 >= $LIBXML_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED])
66 RYGEL_COMMON_MODULES_VALAFLAGS="$RYGEL_BASE_MODULES_VALAFLAGS --pkg gupnp-av-1.0"
67 LIBRYGEL_SERVER_DEPS_VALAFLAGS="$RYGEL_COMMON_MODULES_VALAFLAGS --pkg gssdp-1.0 --pkg gio-2.0 --pkg libsoup-2.4 --pkg gmodule-2.0"
68 AC_SUBST([LIBRYGEL_SERVER_DEPS_VALAFLAGS])
70 PKG_CHECK_MODULES([LIBRYGEL_RENDERER_DEPS], [$RYGEL_COMMON_MODULES gio-2.0 >= $GIO_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED])
71 LIBRYGEL_RENDERER_DEPS_VALAFLAGS="$RYGEL_COMMON_MODULES_VALAFLAGS --pkg gio-2.0 --pkg libsoup-2.4"
72 AC_SUBST([LIBRYGEL_RENDERER_DEPS_VALAFLAGS])
74 PKG_CHECK_MODULES([RYGEL_DEPS], [$RYGEL_COMMON_MODULES gio-2.0 >= $GIO_REQUIRED gssdp-1.0 >= $GSSDP_REQUIRED])
76 # Not all tests use all of these dependencies,
77 # but having one set of dependencies keeps things simple.
78 PKG_CHECK_MODULES([TEST_DEPS], [$RYGEL_COMMON_MODULES uuid >= $UUID_REQUIRED gio-2.0 >= $GIO_REQUIRED gssdp-1.0 >= $GSSDP_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED])
79 TEST_DEPS_VALAFLAGS="$RYGEL_COMMON_MODULES_VALAFLAGS --pkg gio-2.0 --pkg gssdp-1.0 --pkg libsoup-2.4 --pkg libxml-2.0 --pkg gmodule-2.0"
80 AC_SUBST([TEST_DEPS_VALAFLAGS])
82 PKG_CHECK_MODULES([EXAMPLE_DEPS], [$RYGEL_COMMON_MODULES gio-2.0 >= $GIO_REQUIRED gssdp-1.0 >= $GSSDP_REQUIRED])
86 dnl Media engine to use
87 BUILT_ENGINES="librygel-media-engine-simple"
89 dnl Disabling the gstreamer media_engine also disables
90 dnl anything else that uses gstreamer.
91 AC_ARG_WITH([media_engine],
93 [--with-media-engine=@<:@gstreamer|simple@:>@],
94 [Media Engine to use]),
95 [with_media_engine="$withval"],
96 [with_media_engine="gstreamer"])
98 AS_IF([test "x$with_media_engine" = "xgstreamer"],
100 enable_gstreamer="yes"
101 BUILT_ENGINES="$BUILT_ENGINES;librygel-media-engine-gst"
103 PKG_CHECK_MODULES([RYGEL_MEDIA_ENGINE_GSTREAMER_DEPS],
104 [$RYGEL_COMMON_MODULES
105 gstreamer-pbutils-1.0 >= $GSTPBU_REQUIRED
106 gstreamer-app-1.0 >= $GSTREAMER_APP_REQUIRED
107 gupnp-dlna-2.0 >= $GUPNP_DLNA_REQUIRED
108 gio-2.0 >= $GIO_REQUIRED])
109 RYGEL_MEDIA_ENGINE_GSTREAMER_DEPS_VALAFLAGS="$RYGEL_COMMON_MODULES_VALAFLAGS --pkg gstreamer-base-1.0 --pkg gstreamer-pbutils-1.0 --pkg gupnp-dlna-2.0"
110 AC_SUBST([RYGEL_MEDIA_ENGINE_GSTREAMER_DEPS_VALAFLAGS])
112 PKG_CHECK_MODULES([LIBRYGEL_RENDERER_GST_DEPS], [$RYGEL_COMMON_MODULES gstreamer-1.0 >= $GSTREAMER_REQUIRED gio-2.0 >= $GIO_REQUIRED])
113 LIBRYGEL_RENDERER_GST_DEPS_VALAFLAGS="$RYGEL_COMMON_MODULES_VALAFLAGS --pkg gstreamer-1.0"
114 AC_SUBST([LIBRYGEL_RENDERER_GST_DEPS_VALAFLAGS])
116 [enable_gstreamer="no"])
117 AM_CONDITIONAL([HAVE_GSTREAMER],[test "x$enable_gstreamer" = "xyes"])
118 AC_SUBST([BUILT_ENGINES])
121 RYGEL_ADD_PLUGIN([external],[MediaServer2 DBus consumer],[yes])
122 AS_IF([test "x$enable_external_plugin" = "xyes"],
124 PKG_CHECK_MODULES([RYGEL_PLUGIN_EXTERNAL_DEPS], [$RYGEL_COMMON_MODULES gio-2.0 >= $GIO_REQUIRED])
127 RYGEL_ADD_PLUGIN([mpris],[MPRIS2 DBus consumer],[yes])
128 AS_IF([test "x$enable_mpris_plugin" = "xyes"],
130 PKG_CHECK_MODULES([RYGEL_PLUGIN_MPRIS_DEPS], [$RYGEL_COMMON_MODULES gio-2.0 >= $GIO_REQUIRED])
133 RYGEL_ADD_PLUGIN([mediathek],[ZDF Mediathek],[no])
134 AS_IF([test "x$enable_mediathek_plugin" = "xyes"],
136 PKG_CHECK_MODULES([RYGEL_PLUGIN_MEDIATHEK_DEPS],
137 [$RYGEL_COMMON_MODULES
138 gio-2.0 >= $GIO_REQUIRED
139 libsoup-2.4 >= $LIBSOUP_REQUIRED
140 libxml-2.0 >= $LIBXML_REQUIRED])
143 AS_IF([test "x$with_media_engine" = "xgstreamer"],
145 RYGEL_ADD_PLUGIN([playbin],[GStreamer playbin],[yes])
146 AS_IF([test "x$enable_playbin_plugin" = "xyes"],
148 PKG_CHECK_MODULES([RYGEL_PLUGIN_PLAYBIN_DEPS], [$RYGEL_COMMON_MODULES gstreamer-1.0 >= $GSTREAMER_TAG_REQUIRED])
151 RYGEL_ADD_PLUGIN([media-export],[MediaExport],[yes])
152 AS_IF([test "x$enable_media_export_plugin" = "xyes"],
154 PKG_CHECK_MODULES([RYGEL_PLUGIN_MEDIA_EXPORT_DEPS],
155 [$RYGEL_COMMON_MODULES gio-2.0 >= $GIO_REQUIRED
156 gupnp-dlna-2.0 >= $GUPNP_DLNA_REQUIRED
157 gupnp-dlna-gst-2.0 >= $GUPNP_DLNA_REQUIRED
158 gstreamer-app-1.0 >= $GSTREAMER_APP_REQUIRED
159 gstreamer-tag-1.0 >= $GSTREAMER_TAG_REQUIRED
160 gstreamer-pbutils-1.0 >= $GSTPBU_REQUIRED
161 libsoup-2.4 >= $LIBSOUP_REQUIRED
162 sqlite3 >= $LIBSQLITE3_REQUIRED
164 RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_VALAFLAGS="$RYGEL_COMMON_MODULES_VALAFLAGS --pkg gupnp-dlna-2.0 --pkg gupnp-dlna-gst-2.0 --pkg gstreamer-tag-1.0 --pkg gstreamer-app-1.0 --pkg gstreamer-pbutils-1.0 --pkg sqlite3"
165 AC_SUBST([RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_VALAFLAGS])
168 RYGEL_ADD_PLUGIN([gst-launch],[GStreamer launchline],[no])
169 AS_IF([test "x$enable_gst_launch_plugin" = "xyes"],
171 PKG_CHECK_MODULES([RYGEL_PLUGIN_GST_LAUNCH_DEPS], [$RYGEL_COMMON_MODULES])
172 RYGEL_PLUGIN_GST_LAUNCH_DEPS_VALAFLAGS="$RYGEL_COMMON_MODULES_VALAFLAGS"
173 AC_SUBST([RYGEL_PLUGIN_GST_LAUNCH_DEPS_VALAFLAGS])
176 RYGEL_ADD_STAMP([src/media-engines/gstreamer/librygel_media_engine_gst_la_vala.stamp])
177 RYGEL_ADD_STAMP([src/librygel-renderer-gst/librygel_renderer_gst_2_0_la_vala.stamp])
180 RYGEL_DISABLE_PLUGIN([playbin])
181 RYGEL_DISABLE_PLUGIN([media-export])
182 RYGEL_DISABLE_PLUGIN([gst-launch])
186 AC_ARG_ENABLE([example-plugins],
187 AS_HELP_STRING([--enable-example-plugins],[enable example plugins]),,
188 enable_example_plugins=no)
189 AM_CONDITIONAL([BUILD_EXAMPLE_PLUGINS], [test "x$[]enable_example_plugins" = "xyes"])
191 dnl Explicitly add stamp files for targets that are not plugins
192 RYGEL_ADD_STAMP([src/librygel-core/librygel_core_2_0_la_vala.stamp])
193 RYGEL_ADD_STAMP([src/librygel-server/librygel_server_2_0_la_vala.stamp])
194 RYGEL_ADD_STAMP([src/librygel-renderer/librygel_renderer_2_0_la_vala.stamp])
195 RYGEL_ADD_STAMP([src/rygel/rygel_vala.stamp])
196 RYGEL_ADD_STAMP([src/ui/rygel_preferences_vala.stamp])
197 RYGEL_ADD_STAMP([src/media-engines/simple/librygel_media_engine_simple_la_vala.stamp])
199 AS_IF([test "x$with_media_engine" = "xgstreamer"],
201 RYGEL_CHECK_PACKAGES([gupnp-dlna-2.0 gstreamer-1.0
202 gstreamer-pbutils-1.0])
207 AS_HELP_STRING([--enable-debug],[enable debugging]),,
209 if test "x$enable_debug" = "xyes"; then
210 CFLAGS="$CFLAGS -O0 -g"
211 RYGEL_DEBUG_VALAFLAGS="-g"
214 AC_SUBST(RYGEL_DEBUG_VALAFLAGS)
217 AC_ARG_ENABLE(strict-cc,
218 AS_HELP_STRING([--enable-strict-cc],[enable strict C compiler]),,
220 if test "x$enable_strict_cc" = "xyes"; then
221 CFLAGS="$CFLAGS -Wall -Werror"
227 AC_ARG_ENABLE(uninstalled,
228 AS_HELP_STRING([--enable-uninstalled],[run uninstalled]),,
229 enable_uninstalled=no)
230 if test "x$enable_uninstalled" = "xyes"; then
231 AC_MSG_WARN("You want to run the tools uninstalled only? Fine!")
233 AM_CONDITIONAL([UNINSTALLED], [test "x$enable_uninstalled" = "xyes"])
235 dnl Check wether user wants to build UIs
237 AS_HELP_STRING([--without-ui],[Do not build UI applications]),
238 try_ui=$withval, try_ui=yes )
241 if test x$try_ui = xyes ; then
243 PKG_CHECK_MODULES([RYGEL_UI_DEPS], [$RYGEL_BASE_MODULES gtk+-3.0 >= $GTK_REQUIRED gssdp-1.0 >= $GSSDP_REQUIRED gee-0.8 >= $GEE_REQUIRED],
245 RYGEL_CHECK_PACKAGES([gtk+-3.0], [HAVE_GTK=yes])
246 RYGEL_UI_DEPS_VALAFLAGS="$RYGEL_BASE_MODULES_VALAFLAGS --pkg gtk+-3.0 --pkg gssdp-1.0 --pkg gee-0.8"
247 AC_SUBST([RYGEL_UI_DEPS_VALAFLAGS])
249 PKG_CHECK_MODULES([EXAMPLE_UI_DEPS],
250 [$RYGEL_COMMON_MODULES gio-2.0 >= $GIO_REQUIRED
251 gssdp-1.0 >= $GSSDP_REQUIRED
252 gstreamer-video-1.0 >= $GSTREAMER_REQUIRED
253 gtk+-3.0 >= $GTK_REQUIRED])
256 AC_MSG_WARN([UI dependencies not found.])
257 AC_MSG_WARN([UI applications will not be built.])
261 AC_MSG_NOTICE([UI applications disabled.])
264 AM_CONDITIONAL(BUILD_UI, test "x$HAVE_GTK" = "xyes")
267 AC_ARG_ENABLE([tests],
268 AS_HELP_STRING([--enable-tests],[always build tests]),,
270 AM_CONDITIONAL([ALWAYS_TEST], [test "x$enable_tests" = "xyes"])
272 dnl Generate coverage data
273 AC_ARG_ENABLE([coverage],
274 AS_HELP_STRING([--enable-coverage],
275 [Generate converage reports for unit tests]),
277 [enable_coverage=no])
278 AM_CONDITIONAL([ENABLE_COVERAGE],[test "x$enable_coverage" != "xno"])
279 AS_IF([test "x$enable_coverage" != "xno"],
281 AC_PATH_PROG([LCOV], [lcov])
282 AC_PATH_PROG([GENHTML], [genhtml])
283 AC_SUBST([COVERAGE_LIBS],["-lgcov"])
284 AC_SUBST([COVERAGE_CFLAGS],["-fprofile-arcs -ftest-coverage"])
285 AC_SUBST(COVERAGE_VALAFLAGS,["-g"])
289 dnl Check additional requirements for MediaExport plugins
290 if test "x$enable_media_export_plugin" = "xyes";
292 RYGEL_CHECK_PACKAGES([sqlite3 gstreamer-tag-1.0 gstreamer-app-1.0])
293 AC_CHECK_HEADER([unistr.h],
294 AC_CHECK_LIB([unistring],
296 [have_unistring=yes],[have_unistring=no]))
297 if test "x$have_unistring" = "xyes"; then
298 AC_DEFINE([HAVE_UNISTRING],[1],[Use libunistring for collation])
299 RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_LIBS="$RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_LIBS -lunistring"
304 RYGEL_ADD_PLUGIN([tracker],[Tracker],[yes])
305 AS_IF([test "x$enable_tracker_plugin" = "xyes"],
307 PKG_CHECK_MODULES([RYGEL_PLUGIN_TRACKER_DEPS], [$RYGEL_COMMON_MODULES gio-2.0 >= $GIO_REQUIRED])
309 tracker_api_version="0.14"
310 PKG_CHECK_MODULES(TRACKER_SPARQL,
311 tracker-sparql-0.14 >= $TRACKER_SPARQL_REQUIRED_MIN,
312 [tracker_api_version="0.14"],
313 [tracker_api_version=""])
314 AS_IF([test "x$[]tracker_api_version" = "x"],
316 PKG_CHECK_MODULES(TRACKER_SPARQL,
317 tracker-sparql-0.15 >= $TRACKER_SPARQL_REQUIRED_MIN,
318 [tracker_api_version="0.15"],
319 [tracker_api_version=""])
321 AS_IF([test "x$[]tracker_api_version" = "x"],
323 PKG_CHECK_MODULES(TRACKER_SPARQL,
324 tracker-sparql-0.16 >= $TRACKER_SPARQL_REQUIRED_MIN,
325 [tracker_api_version="0.16"],
328 AS_IF([test "x$enable_vala" = "xyes"],
329 [VALA_CHECK_PACKAGES([tracker-sparql-$tracker_api_version])])
331 RYGEL_PLUGIN_TRACKER_DEPS_VALAFLAGS="--pkg tracker-sparql-$tracker_api_version"
332 AC_SUBST([RYGEL_PLUGIN_TRACKER_DEPS_VALAFLAGS])
335 # This should be called only after all RYGEL_CHECK_VALA() and RYGEL_ADD_PLUGIN() calls:
336 RYGEL_CHECK_VALA([$VALA_REQUIRED],
344 GETTEXT_PACKAGE=rygel
345 AC_SUBST(GETTEXT_PACKAGE)
346 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"],
347 [Define the gettext package to be used])
350 IT_PROG_INTLTOOL([0.40.0])
353 AM_SILENT_RULES([yes])
356 AC_PATH_PROG([XSLTPROC], [xsltproc])
357 AM_CONDITIONAL([HAVE_XSLTPROC], [test x"$XSLTPROC" != x])
359 dnl Use valadoc for API documentation:
360 dnl This is on by default when using autogen.sh
361 dnl (so it is not on by default when building from a tarball with configure.)
362 AC_ARG_ENABLE(valadoc,
363 AS_HELP_STRING([--enable-valadoc[=@<:@no/auto/yes@:>@]], [Enable valadoc support]),,
367 AS_IF([test "x$enable_valadoc" != "xno"], [
368 AC_PATH_PROG(VALADOC, valadoc, :)
369 AS_IF([test -x "$VALADOC"], [
372 PKG_CHECK_MODULES([GTKDOC],[gtk-doc >= 1.0])
374 AS_IF([test "x$enable_valadoc" == "xyes"], AC_MSG_ERROR([Unable to find valadoc]))
378 AM_CONDITIONAL(ENABLE_VALADOC, test x$found_valadoc = xyes)
380 AC_SUBST([RYGEL_PLUGIN_LINKER_FLAGS],
381 ["-module -avoid-version -Wl,-z,defs"])
382 AC_SUBST([RYGEL_PLUGIN_DIR],
383 [${libdir}/rygel-2.0/plugins])
384 AC_SUBST([RYGEL_MEDIA_ENGINE_DIR],
385 [${libdir}/rygel-2.0/engines])
390 src/librygel-core/Makefile
391 src/librygel-renderer/Makefile
392 src/librygel-renderer-gst/Makefile
393 src/librygel-server/Makefile
396 src/media-engines/Makefile
397 src/media-engines/gstreamer/Makefile
398 src/media-engines/gstreamer/media-engine-gst.plugin
399 src/media-engines/simple/Makefile
400 src/media-engines/simple/media-engine-simple.plugin
404 data/xml/MediaServer3.xml.in
405 data/xml/MediaRenderer2.xml.in
407 data/icons/32x32/Makefile
408 data/icons/48x48/Makefile
409 data/icons/120x120/Makefile
410 data/icons/128x128/Makefile
411 data/icons/scalable/Makefile
412 data/rygel.desktop.in
413 data/rygel-preferences.desktop.in
415 doc/reference/Makefile
416 doc/reference/librygel-core/Makefile
417 doc/reference/librygel-renderer/Makefile
418 doc/reference/librygel-server/Makefile
419 doc/reference/librygel-renderer-gst/Makefile
422 rygel-renderer-2.0.pc
424 rygel-renderer-gst-2.0.pc
427 examples/renderer-plugins/Makefile
428 examples/renderer-plugins/vala/Makefile
429 examples/renderer-plugins/vala/example-renderer-vala.plugin
430 examples/renderer-plugins/C/Makefile
431 examples/renderer-plugins/C/example-renderer-c.plugin
432 examples/server-plugins/Makefile
433 examples/server-plugins/vala/Makefile
434 examples/server-plugins/vala/example-server-vala.plugin
435 examples/server-plugins/C/Makefile
436 examples/server-plugins/C/example-server-c.plugin
442 ${PACKAGE} ${VERSION}
447 Source code location: ${srcdir}
450 VALAFLAGS: ${VALAFLAGS}
451 uninstalled: ${enable_uninstalled}
452 preferences ui: ${HAVE_GTK}
453 Media Engine: ${with_media_engine}
455 examples: ${enable_example_plugins}
456 tracker: ${enable_tracker_plugin}
457 version: ${tracker_api_version}
458 mediathek: ${enable_mediathek_plugin}
459 media-export ${enable_media_export_plugin}
460 external: ${enable_external_plugin}
461 MPRIS2: ${enable_mpris_plugin}
462 gst-launch: ${enable_gst_launch_plugin}
463 playbin: ${enable_playbin_plugin}