[svn r477] Added functions to get the channel's list from the MythTV, using the normal backend server messages.
2 # Process this file with autoconf to produce a configure script.
6 AC_INIT([maemo-myth],[0.1])
8 dnl AC_CONFIG_SRCDIR([src/mmyth_main.c])
9 AC_CONFIG_HEADER(config.h)
11 dnl when going to/from release please set the nano (fourth number) right !
12 dnl releases only do Wall, SVN and prerelease does Werror too
13 AS_VERSION(maemo-myth, GMYTH, 0, 1, 0, 3, GMYTH_SVN="no", GMYTH_SVN="yes")
15 GMYTH_MAJORMINOR=$GMYTH_MAJOR_VERSION.$GMYTH_MINOR_VERSION
17 AC_SUBST(GMYTH_MAJORMINOR)
19 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
21 dnl make aclocal work in maintainer mode
22 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
24 # Checks for programs.
26 # Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
27 CFLAGS="$CFLAGS -Wall"
31 # Checks for libraries.
33 # Checks for header files.
35 AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
37 # Checks for typedefs, structures, and compiler characteristics.
42 # Checks for library functions.
44 AC_PROG_GCC_TRADITIONAL
48 AC_CHECK_FUNCS([memset socket stime strstr strtoul])
50 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
52 # Checks required packages
54 dnl Test if --disable-debug given
56 [AC_HELP_STRING([--disable-debug], [disable debugging mode])],
57 enable_debug="$enableval",
60 if test "x$enable_debug" = "xyes" ; then
63 AC_DEFINE( NDEBUG, 1, [disable debug messages] )
64 CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS -DNDEBUG"
67 AM_CONDITIONAL( NDEBUG, test "x$enable_debug" = "xyes" )
70 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
71 # Give error and exit if we don't have pkgconfig
72 if test "x$HAVE_PKGCONFIG" = "xno"; then
73 AC_MSG_ERROR(you need to have pkgconfig installed !)
77 PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
79 # Give error and exit if we don't have glib
80 if test "x$HAVE_GLIB" = "xno"; then
81 AC_MSG_ERROR(you need glib-2.0 installed)
84 # make GLIB_CFLAGS and GLIB_LIBS available
88 # Check for GObject2.0
89 PKG_CHECK_MODULES(GOBJECT,
91 HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
93 # Give error and exit if we don't have gobject
94 if test "x$HAVE_GOBJECT" = "xno"; then
95 AC_MSG_ERROR(you need gobject-2.0 installed)
98 # make GOBJECT_CFLAGS and GOBJECT_LIBS available
99 AC_SUBST(GOBJECT_CFLAGS)
100 AC_SUBST(GOBJECT_LIBS)
103 PKG_CHECK_MODULES(GTK, gtk+-2.0, HAVE_GTK=yes,HAVE_GTK=no)
105 # Give error and exit if we don't have gtk
106 if test "x$HAVE_GTK" = "xyes"; then
107 AC_DEFINE(WITH_GTK, 1, [build with GTK+ related stuff])
108 dnl AC_MSG_ERROR(you need gtk+-2.0 installed)
113 AM_CONDITIONAL(WITH_GTK, test "x$HAVE_GTK" = "xyes" )
115 # make GTK_CFLAGS and GTK_LIBS available
119 dnl ========== Check for Hildon Libraries
120 PKG_CHECK_MODULES(HILDON,
121 libosso hildon-lgpl libosso hildon-status-bar-lib libhildonmenu hildon-base-lib hildon-control-panel hildon-libs,
122 HAVE_HILDON=yes, HAVE_HILDON=no)
124 if test "x$HAVE_HILDON" = "xyes"; then
125 HILDON_CFLAGS="$HILDON_CFLAGS -DMAEMO_PLATFORM"
126 AC_DEFINE(MAEMO_PLATFORM, 1, [build with hildon libs])
131 AM_CONDITIONAL(MAEMO_PLATFORM, test "x$HAVE_HILDON" = "xyes")
133 dnl make HILDON_CFLAGS and HILDON_LIBS available
134 AC_SUBST(HILDON_CFLAGS)
135 AC_SUBST(HILDON_LIBS)
137 # Check for libxml-2.0
138 PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML=yes,HAVE_LIBXML=no)
140 # Give error and exit if we don't have libxml
141 if test "x$HAVE_LIBXML" = "xno"; then
142 AC_MSG_ERROR(you need libxml-2.0 installed)
145 # make LIBXML_CFLAGS and LIBXML_LIBS available
146 AC_SUBST(LIBXML_CFLAGS)
147 AC_SUBST(LIBXML_LIBS)
150 # check for gstreamer development files
153 PKG_CHECK_MODULES(GST, \
154 gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
155 HAVE_GST=yes, HAVE_GST=no)
157 # Give error and exit if we don't have gstreamer
158 if test "x$HAVE_GST" = "xno"; then
159 AC_MSG_ERROR(you need gstreamer development packages installed !)
162 # make GST_CFLAGS and GST_LIBS available
166 # check for gstreamer-base plugins (xoverlay interface)
167 GSTBASE_REQUIRED=0.10
168 GSTBASE_MAJORMINOR=0.10
169 PKG_CHECK_MODULES(GSTBASE, \
170 gstreamer-base-$GSTBASE_MAJORMINOR >= $GSTBASE_REQUIRED,
171 HAVE_GSTBASE=yes, HAVE_GSTBASE=no)
173 # Give error and exit if we don't have gstreamer base libraries
174 if test "x$HAVE_GSTBASE" = "xno"; then
175 AC_MSG_ERROR(you need gstreamer base development packages installed !)
178 # make GSTBASE_CFLAGS and GSTBASE_LIBS available
179 AC_SUBST(GSTBASE_CFLAGS)
180 AC_SUBST(GSTBASE_LIBS)
182 # make GST_MAJORMINOR available in Makefile.am
183 AC_SUBST(GST_MAJORMINOR)
186 # check for gstreamer-base plugins (xoverlay interface)
187 GSTPLUGINSBASE_REQUIRED=0.10
188 GSTPLUGINSBASE_MAJORMINOR=0.10
189 PKG_CHECK_MODULES(GSTPLUGINSBASE, \
190 gstreamer-plugins-base-$GSTPLUGINSBASE_MAJORMINOR >= $GSTPLUGINSBASE_REQUIRED,
191 HAVE_GSTPLUGINSBASE=yes, HAVE_GSTPLUGINSBASE=no)
193 # Give error and exit if we don't have gstreamer base libraries
194 if test "x$HAVE_GSTPLUGINSBASE" = "xno"; then
195 AC_MSG_ERROR(you need gstreamer plugins base development packages installed !)
198 # make GSTPLUGINSBASE_CFLAGS and GSTPLUGINSBASE_LIBS available
199 AC_SUBST(GSTPLUGINSBASE_CFLAGS)
200 AC_SUBST(GSTPLUGINSBASE_LIBS)
202 # check for gstreamer-interfaces (xoverlay interface)
203 AC_CHECK_FUNC( gst_x_overlay_get_type,
204 HAVE_GSTINTERFACES=yes, HAVE_GSTINTERFACES=no )
206 # Give error and exit if we don't have gstreamer base libraries
207 if test "x$HAVE_GSTINTERFACES" = "xno"; then
208 AC_MSG_NOTICE(you need gstreamer interfaces development packages installed !)
209 CFLAGS="$CFLAGS -lgstinterfaces-$GSTPLUGINSBASE_MAJORMINOR"
212 # Check for gmyth-0.1
214 PKG_CHECK_MODULES(LIBGMYTH, gmyth-0.1, HAVE_LIBGMYTH=yes,HAVE_LIBGMYTH=no)
216 # Give error and exit if we don't have gmyth-0.1
217 if test "x$HAVE_LIBGMYTH" = "xno"; then
218 AC_MSG_ERROR(you need gmyth-0.1 installed)
221 # make LIBXML_CFLAGS and LIBXML_LIBS available
222 AC_SUBST(LIBGMYTH_CFLAGS)
223 AC_SUBST(LIBGMYTH_LIBS)
226 AC_CONFIG_FILES([Makefile