Seeking support
[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 PKG_CHECK_MODULES(gstreamer, [gstreamer-0.10 >= 0.10.10], , AC_MSG_ERROR(gstreamer-0.10 >= 0.10.10 is required))
35 AC_SUBST(gstreamer_CFLAGS)
36 AC_SUBST(gstreamer_LIBS)
37
38 PKG_CHECK_MODULES(gstreamer_plugins_base, [gstreamer-plugins-base-0.10], , AC_MSG_ERROR(gstreamer-plugins-base-0.10 is required))
39
40 dnl --- MODULES -----------
41
42 MODULEDIR='${libdir}/octopus'
43 AC_SUBST(MODULEDIR)
44 COMPONENTDIR='${datadir}/octopus'
45 AC_SUBST(COMPONENTDIR)
46
47 AC_ARG_ENABLE(qosm, AS_HELP_STRING([--enable-qosm], [Include support for QoS manager]), qosm=$enableval, qosm=no)
48 AM_CONDITIONAL(QOSM, test "$qosm" = yes)
49 if test "$qosm" = yes; then
50         PKG_CHECK_MODULES(libqosm, [libqosm], , AC_MSG_ERROR(libqosm is required))
51         AC_SUBST(libqosm_CFLAGS)
52         AC_SUBST(libqosm_LIBS)
53 fi
54
55 dnl --- Player ------------
56
57 AC_ARG_ENABLE(player, AS_HELP_STRING([--enable-player], [Build a simple GTK frontend]), player=$enableval, player=no)
58 AM_CONDITIONAL(PLAYER, test "$player" = xyes)
59 if test "$player" = yes; then
60         PKG_CHECK_MODULES(gtk, [gtk+-2.0 >= 2.4], , AC_MSG_ERROR(gtk+ >= 2.4 is required))
61         AC_SUBST(gtk_CFLAGS)
62         AC_SUBST(gtk_LIBS)
63 fi
64
65 dnl --- Service files -----
66
67
68 dnl --- Compiling flags ---
69
70 dnl -----------------------
71
72
73 AC_OUTPUT(
74 Makefile
75 src/Makefile
76 modules/Makefile
77 data/Makefile
78 data/octopus.pc
79 player/Makefile
80 )