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.7.0
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 PKG_CHECK_MODULES(LIBGLIB, glib-2.0 >= $GLIB_REQUIRED)
57 VALAFLAGS="--target-glib=2.32 $VALAFLAGS"
59 PKG_CHECK_MODULES(LIBGSSDP, gssdp-1.0 >= $GSSDP_REQUIRED)
60 PKG_CHECK_MODULES(LIBGUPNP, gupnp-1.0 >= $GUPNP_REQUIRED)
61 PKG_CHECK_MODULES(LIBGUPNP_AV, gupnp-av-1.0 >= $GUPNP_AV_REQUIRED)
62 PKG_CHECK_MODULES(LIBGIO, gio-2.0 >= $GIO_REQUIRED)
63 PKG_CHECK_MODULES(GEE, gee-0.8 >= $GEE_REQUIRED)
64 PKG_CHECK_MODULES(UUID, uuid >= $UUID_REQUIRED)
65 PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4 >= $LIBSOUP_REQUIRED)
66 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED)
68 dnl Media engine to use
69 BUILT_ENGINES="librygel-media-engine-simple"
71 dnl Disabling the gstreamer media_engine also disables
72 dnl anything else that uses gstreamer.
73 AC_ARG_WITH([media_engine],
75 [--with-media-engine=@<:@gstreamer|simple@:>@],
76 [Media Engine to use]),
77 [with_media_engine="$withval"],
78 [with_media_engine="gstreamer"])
80 AS_IF([test "x$with_media_engine" = "xgstreamer"],
82 PKG_CHECK_MODULES(LIBGUPNP_DLNA, gupnp-dlna-1.1 >= $GUPNP_DLNA_REQUIRED)
83 PKG_CHECK_MODULES(LIBGSTREAMER, gstreamer-1.0 >= $GSTREAMER_REQUIRED)
84 PKG_CHECK_MODULES(GSTREAMER_BASE, gstreamer-base-1.0 >= $GSTREAMER_REQUIRED)
85 PKG_CHECK_MODULES(GST_PBU, gstreamer-pbutils-1.0 >= $GSTPBU_REQUIRED)
86 PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-1.0 >= $GSTREAMER_REQUIRED)
87 enable_gstreamer="yes"
88 BUILT_ENGINES="$BUILT_ENGINES;librygel-media-engine-gst"
90 [enable_gstreamer="no"])
91 AM_CONDITIONAL([HAVE_GSTREAMER],[test "x$enable_gstreamer" = "xyes"])
92 AC_SUBST([BUILT_ENGINES])
95 RYGEL_ADD_PLUGIN([external],[MediaServer2 DBus consumer],[yes])
96 RYGEL_ADD_PLUGIN([mpris],[MPRIS2 DBus consumer],[yes])
97 RYGEL_ADD_PLUGIN([mediathek],[ZDF Mediathek],[no])
98 RYGEL_ADD_PLUGIN([tracker],[Tracker],[yes])
100 AS_IF([test "x$with_media_engine" = "xgstreamer"],
102 RYGEL_ADD_PLUGIN([playbin],[GStreamer playbin],[yes])
103 RYGEL_ADD_PLUGIN([media-export],[MediaExport],[yes])
104 RYGEL_ADD_PLUGIN([gst-launch],[GStreamer launchline],[no])
105 RYGEL_ADD_STAMP([src/media-engines/gstreamer/librygel_media_engine_gst_la_vala.stamp])
106 RYGEL_ADD_STAMP([src/librygel-renderer-gst/librygel_renderer_gst_2_0_la_vala.stamp])
109 RYGEL_DISABLE_PLUGIN([playbin])
110 RYGEL_DISABLE_PLUGIN([media-export])
111 RYGEL_DISABLE_PLUGIN([gst-launch])
115 AC_ARG_ENABLE([example-plugins],
116 AS_HELP_STRING([--enable-example-plugins],[enable example plugins]),,
117 enable_example_plugins=no)
118 AM_CONDITIONAL([BUILD_EXAMPLE_PLUGINS], [test "x$[]enable_example_plugins" = "xyes"])
120 dnl Explicitly add stamp files for targets that are not plugins
121 RYGEL_ADD_STAMP([src/librygel-core/librygel_core_2_0_la_vala.stamp])
122 RYGEL_ADD_STAMP([src/librygel-server/librygel_server_2_0_la_vala.stamp])
123 RYGEL_ADD_STAMP([src/librygel-renderer/librygel_renderer_2_0_la_vala.stamp])
124 RYGEL_ADD_STAMP([src/rygel/rygel_vala.stamp])
125 RYGEL_ADD_STAMP([src/ui/rygel_preferences_vala.stamp])
126 RYGEL_ADD_STAMP([src/media-engines/simple/librygel_media_engine_simple_la_vala.stamp])
128 RYGEL_CHECK_VALA([$VALA_REQUIRED],
135 AS_IF([test "x$with_media_engine" = "xgstreamer"],
137 RYGEL_CHECK_PACKAGES([gupnp-dlna-1.1 gstreamer-1.0
138 gstreamer-pbutils-1.0])
143 AS_HELP_STRING([--enable-debug],[enable debugging]),,
145 if test "x$enable_debug" = "xyes"; then
146 CFLAGS="$CFLAGS -O0 -g"
147 RYGEL_DEBUG_VALAFLAGS="-g"
150 AC_SUBST(RYGEL_DEBUG_VALAFLAGS)
153 AC_ARG_ENABLE(strict-cc,
154 AS_HELP_STRING([--enable-strict-cc],[enable strict C compiler]),,
156 if test "x$enable_strict_cc" = "xyes"; then
157 CFLAGS="$CFLAGS -Wall -Werror"
163 AC_ARG_ENABLE(uninstalled,
164 AS_HELP_STRING([--enable-uninstalled],[run uninstalled]),,
165 enable_uninstalled=no)
166 if test "x$enable_uninstalled" = "xyes"; then
167 AC_MSG_WARN("You want to run the tools uninstalled only? Fine!")
169 AM_CONDITIONAL([UNINSTALLED], [test "x$enable_uninstalled" = "xyes"])
171 dnl Check wether user wants to build UIs
173 AS_HELP_STRING([--without-ui],[Do not build UI applications]),
174 try_ui=$withval, try_ui=yes )
177 if test x$try_ui = xyes ; then
179 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQUIRED,
181 RYGEL_CHECK_PACKAGES([gtk+-3.0], [HAVE_GTK=yes])
184 AC_MSG_WARN([gtk $GTK_REQUIRED or greater not found.])
185 AC_MSG_WARN([UI applications will not be built.])
188 AC_MSG_NOTICE([UI applications disabled.])
191 AM_CONDITIONAL(BUILD_UI, test "x$HAVE_GTK" = "xyes")
194 AC_ARG_ENABLE([tests],
195 AS_HELP_STRING([--enable-tests],[always build tests]),,
197 AM_CONDITIONAL([ALWAYS_TEST], [test "x$enable_tests" = "xyes"])
199 dnl Generate coverage data
200 AC_ARG_ENABLE([coverage],
201 AS_HELP_STRING([--enable-coverage],
202 [Generate converage reports for unit tests]),
204 [enable_coverage=no])
205 AM_CONDITIONAL([ENABLE_COVERAGE],[test "x$enable_coverage" != "xno"])
206 AS_IF([test "x$enable_coverage" != "xno"],
208 AC_PATH_PROG([LCOV], [lcov])
209 AC_PATH_PROG([GENHTML], [genhtml])
210 AC_SUBST([COVERAGE_LIBS],["-lgcov"])
211 AC_SUBST([COVERAGE_CFLAGS],["-fprofile-arcs -ftest-coverage"])
212 AC_SUBST(COVERAGE_VALAFLAGS,["-g"])
216 dnl Check additional requirements for MediaExport plugins
217 if test "x$enable_media_export_plugin" = "xyes";
219 PKG_CHECK_MODULES(LIBSQLITE3, sqlite3 >= $LIBSQLITE3_REQUIRED)
220 PKG_CHECK_MODULES(GSTREAMER_TAG, gstreamer-tag-1.0 >= $GSTREAMER_TAG_REQUIRED);
221 PKG_CHECK_MODULES(GSTREAMER_APP, gstreamer-app-1.0 >= $GSTREAMER_APP_REQUIRED);
222 RYGEL_CHECK_PACKAGES([sqlite3 gstreamer-tag-1.0 gstreamer-app-1.0])
223 AC_CHECK_HEADER([unistr.h],
224 AC_CHECK_LIB([unistring],
226 [have_unistring=yes],[have_unistring=no]))
227 if test "x$have_unistring" = "xyes"; then
228 AC_DEFINE([HAVE_UNISTRING],[1],[Use libunistring for collation])
230 COLLATION_LIBS=-lunistring
231 AC_SUBST([COLLATION_CFLAGS])
232 AC_SUBST([COLLATION_LIBS])
236 AS_IF([test "x$enable_tracker_plugin" = "xyes"],
238 tracker_api_version="0.14"
239 PKG_CHECK_MODULES(TRACKER_SPARQL,
240 tracker-sparql-0.14 >= $TRACKER_SPARQL_REQUIRED_MIN,
241 [tracker_api_version="0.14"],
242 [tracker_api_version=""])
243 AS_IF([test "x$[]tracker_api_version" = "x"],
245 PKG_CHECK_MODULES(TRACKER_SPARQL,
246 tracker-sparql-0.15 >= $TRACKER_SPARQL_REQUIRED_MIN,
247 [tracker_api_version="0.15"],
248 [tracker_api_version=""])
250 AS_IF([test "x$[]tracker_api_version" = "x"],
252 PKG_CHECK_MODULES(TRACKER_SPARQL,
253 tracker-sparql-0.16 >= $TRACKER_SPARQL_REQUIRED_MIN,
254 [tracker_api_version="0.16"],
257 AS_IF([test "x$enable_vala" = "xyes"],
258 [VALA_CHECK_PACKAGES([tracker-sparql-$tracker_api_version])])
259 TRACKER_API_VERSION=$tracker_api_version
260 AC_SUBST(TRACKER_API_VERSION)
264 GETTEXT_PACKAGE=rygel
265 AC_SUBST(GETTEXT_PACKAGE)
266 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"],
267 [Define the gettext package to be used])
270 IT_PROG_INTLTOOL([0.40.0])
273 AM_SILENT_RULES([yes])
276 AC_PATH_PROG([XSLTPROC], [xsltproc])
277 AM_CONDITIONAL([HAVE_XSLTPROC], [test x"$XSLTPROC" != x])
279 dnl Use valadoc for API documentation:
280 dnl This is on by default when using autogen.sh
281 dnl (so it is not on by default when building from a tarball with configure.)
282 AC_ARG_ENABLE(valadoc,
283 AS_HELP_STRING([--enable-valadoc[=@<:@no/auto/yes@:>@]], [Enable valadoc support]),,
287 AS_IF([test "x$enable_valadoc" != "xno"], [
288 AC_PATH_PROG(VALADOC, valadoc, :)
289 AS_IF([test -x "$VALADOC"], [
292 PKG_CHECK_MODULES([GTKDOC],[gtk-doc >= 1.0])
294 AS_IF([test "x$enable_valadoc" == "xyes"], AC_MSG_ERROR([Unable to find valadoc]))
298 AM_CONDITIONAL(ENABLE_VALADOC, test x$found_valadoc = xyes)
303 src/librygel-core/Makefile
304 src/librygel-renderer/Makefile
305 src/librygel-renderer-gst/Makefile
306 src/librygel-server/Makefile
309 src/media-engines/Makefile
310 src/media-engines/gstreamer/Makefile
311 src/media-engines/simple/Makefile
315 data/xml/MediaServer3.xml.in
316 data/xml/MediaRenderer2.xml.in
318 data/icons/32x32/Makefile
319 data/icons/48x48/Makefile
320 data/icons/120x120/Makefile
321 data/icons/128x128/Makefile
322 data/icons/scalable/Makefile
323 data/rygel.desktop.in
324 data/rygel-preferences.desktop.in
326 doc/reference/Makefile
327 doc/reference/librygel-core/Makefile
328 doc/reference/librygel-renderer/Makefile
329 doc/reference/librygel-server/Makefile
330 doc/reference/librygel-renderer-gst/Makefile
333 rygel-renderer-2.0.pc
335 rygel-renderer-gst-2.0.pc
338 examples/renderer-plugins/Makefile
339 examples/renderer-plugins/vala/Makefile
340 examples/renderer-plugins/C/Makefile
341 examples/server-plugins/Makefile
342 examples/server-plugins/vala/Makefile
343 examples/server-plugins/C/Makefile
349 ${PACKAGE} ${VERSION}
354 Source code location: ${srcdir}
357 VALAFLAGS: ${VALAFLAGS}
358 uninstalled: ${enable_uninstalled}
359 preferences ui: ${HAVE_GTK}
360 Media Engine: ${with_media_engine}
362 examples: ${enable_example_plugins}
363 tracker: ${enable_tracker_plugin}
364 version: ${tracker_api_version}
365 mediathek: ${enable_mediathek_plugin}
366 media-export ${enable_media_export_plugin}
367 external: ${enable_external_plugin}
368 MPRIS2: ${enable_mpris_plugin}
369 gst-launch: ${enable_gst_launch_plugin}
370 playbin: ${enable_playbin_plugin}