Add OpenMAX backend (only supports forced pipelines at the moment)
[octopus.git] / configure.ac
1 AC_PREREQ(2.52)
2 AC_INIT(octopus, 0.1)
3 AC_CONFIG_SRCDIR(src/main.c)
4 AM_CONFIG_HEADER(config.h)
5
6 AM_INIT_AUTOMAKE
7
8 AC_PROG_CC
9 AC_PROG_LIBTOOL
10
11 CFLAGS="$CFLAGS -Wall -Werror -g -Wmissing-prototypes -Wmissing-declarations -std=gnu99"
12
13 dnl -----------------------
14 PKG_CHECK_MODULES(glib, [glib-2.0 >= 2.4], , AC_MSG_ERROR(glib >= 2.4 is required))
15 AC_SUBST(glib_CFLAGS)
16 AC_SUBST(glib_LIBS)
17
18 PKG_CHECK_MODULES(dbus, [dbus-1], , AC_MSG_ERROR(dbus >= 1.0 is required))
19 AC_SUBST(dbus_CFLAGS)
20 AC_SUBST(dbus_LIBS)
21
22 PKG_CHECK_MODULES(dbus_glib, [dbus-glib-1], , AC_MSG_ERROR(dbus-glib >= 1.0 is required))
23 AC_SUBST(dbus_glib_CFLAGS)
24 AC_SUBST(dbus_glib_LIBS)
25
26 PKG_CHECK_MODULES(gmodule, [gmodule-2.0], , AC_MSG_ERROR(gmodule >= 2.0 is required))
27 AC_SUBST(gmodule_CFLAGS)
28 AC_SUBST(gmodule_LIBS)
29
30 PKG_CHECK_MODULES(gnome_vfs, [gnome-vfs-2.0], , AC_MSG_ERROR(gnome-vfs >= 2.0 is required))
31 AC_SUBST(gnome_vfs_CFLAGS)
32 AC_SUBST(gnome_vfs_LIBS)
33
34 dnl --- BACKENDS ----------
35
36 AC_ARG_ENABLE(gstreamer, AS_HELP_STRING([--enable-gstreamer], [Include GStreamer backend]), gst_backend=$enableval, gst_backend=yes)
37 AM_CONDITIONAL(GST_BACKEND, test "$gst_backend" = yes)
38 if test "$gst_backend" = yes; then
39         PKG_CHECK_MODULES(gstreamer, [gstreamer-0.10 >= 0.10.10], , AC_MSG_ERROR(gstreamer-0.10 >= 0.10.10 is required))
40         AC_SUBST(gstreamer_CFLAGS)
41         AC_SUBST(gstreamer_LIBS)
42
43         PKG_CHECK_MODULES(gstreamer_plugins_base, [gstreamer-plugins-base-0.10], , AC_MSG_ERROR(gstreamer-plugins-base-0.10 is required))
44 fi
45
46 AC_ARG_ENABLE(openmax, AS_HELP_STRING([--enable-openmax], [Include OpenMAX backend]), omx_backend=$enableval, omx_backend=no)
47 AM_CONDITIONAL(OMX_BACKEND, test "$omx_backend" = yes)
48
49 if test "$gst_backend" != yes -a "$omx_backend" != yes; then
50         AC_MSG_WARN(No backends have been selected.  The resulting Octopus server will be unusable.)
51 fi
52
53 dnl --- MODULES -----------
54
55 MODULEDIR='${libdir}/octopus'
56 AC_SUBST(MODULEDIR)
57 COMPONENTDIR='${datadir}/octopus'
58 AC_SUBST(COMPONENTDIR)
59
60 AC_ARG_ENABLE(qosm, AS_HELP_STRING([--enable-qosm], [Include support for QoS manager]), qosm=$enableval, qosm=no)
61 AM_CONDITIONAL(QOSM, test "$qosm" = yes)
62
63 if test "$qosm" = yes -o "$omx_backend" = yes; then
64         PKG_CHECK_MODULES(openmax, [libomxil-bellagio], , AC_MSG_ERROR(libomxil-bellagio is required))
65         AC_SUBST(openmax_CFLAGS)
66         AC_SUBST(openmax_LIBS)
67 fi
68
69 if test "$qosm" = yes; then
70         PKG_CHECK_MODULES(libqosm, [libqosm], , AC_MSG_ERROR(libqosm is required))
71         AC_SUBST(libqosm_CFLAGS)
72         AC_SUBST(libqosm_LIBS)
73 fi
74
75 dnl --- Player ------------
76
77 AC_ARG_ENABLE(player, AS_HELP_STRING([--enable-player], [Build a simple GTK frontend]), player=$enableval, player=no)
78 AM_CONDITIONAL(PLAYER, test "$player" = yes)
79 if test "$player" = yes; then
80         PKG_CHECK_MODULES(gtk, [gtk+-2.0 >= 2.4], , AC_MSG_ERROR(gtk+ >= 2.4 is required))
81         AC_SUBST(gtk_CFLAGS)
82         AC_SUBST(gtk_LIBS)
83 fi
84
85 dnl --- Service files -----
86
87
88 dnl --- Compiling flags ---
89
90 dnl -----------------------
91
92
93 AC_OUTPUT(
94 Makefile
95 src/Makefile
96 modules/Makefile
97 data/Makefile
98 data/octopus.pc
99 player/Makefile
100 )