3 dnl versions of gstreamer and plugins-base
8 dnl fill in your package name and version here
9 dnl the fourth (nano) number should be 0 for a release, 1 for CVS,
10 dnl and 2... for a prerelease
12 dnl when going to/from release please set the nano correctly !
13 AS_VERSION(tuner, TUNER_VERSION, 0, 1, 3, 0,
14 RELEASE="yes", RELEASE="no")
16 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
19 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
21 dnl make aclocal work in maintainer mode
22 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
24 AM_CONFIG_HEADER(config.h)
33 AC_HELP_STRING([--with-hildon],
34 [Turn on/off use of Hildon GUI (default=no)]),
35 [if test "x$withval" = "xyes"; then test_hildon=true; fi])
37 dnl Enable Maemo specific issues
39 AC_HELP_STRING([--with-maemo],
40 [Turn on/off use of Maemo related code (default=no)]),
41 [if test "x$withval" = "xyes"; then enable_maemo=true; fi])
44 dnl decide on error flags
45 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
47 if test "x$GST_WALL" = "xyes"; then
48 GST_ERROR="$GST_ERROR -Wall"
50 if test "x$GST_CVS" = "xyes"; then
51 AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
55 dnl Check for pkgconfig first
56 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
58 dnl Give error and exit if we don't have pkgconfig
59 if test "x$HAVE_PKGCONFIG" = "xno"; then
60 AC_MSG_ERROR(you need to have pkgconfig installed !)
63 dnl Now we're ready to ask for gstreamer libs and cflags
64 dnl And we can also ask for the right version of gstreamer
67 PKG_CHECK_MODULES(GST, \
68 gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
69 HAVE_GST=yes,HAVE_GST=no)
71 dnl Give error and exit if we don't have gstreamer
72 if test "x$HAVE_GST" = "xno"; then
73 AC_MSG_ERROR(you need gstreamer development packages installed !)
77 dnl Check for Maemo required packages
79 if test "x$enable_maemo" = "xtrue"; then
81 AC_DEFINE(MAEMO, 1, [Turn on Maemo dependecies])
84 if test "x$test_hildon" = "xtrue"; then
85 dnl try if hildon is available in the form previous IT2K8
86 PKG_CHECK_MODULES(HILDON, hildon-libs >= 0.12.0,
87 HAVE_HILDON=yes, HAVE_HILDON=no)
89 if test "x$HAVE_HILDON" = "xno"; then
90 dnl if fail try for IT2K8
91 PKG_CHECK_MODULES(HILDON, hildon-1 >= 0.9.9,
92 HAVE_HILDON=yes, HAVE_HILDON=no)
93 AC_DEFINE(HILDON, 1, [Version of hildon libraries])
95 AC_DEFINE(HILDON, 0, [Version of hildon libraries])
98 if test "x$HAVE_HILDON" = "xno"; then
99 AC_MSG_ERROR(you need hildon development packages installed !)
102 PKG_CHECK_MODULES(OSSO, libosso >= 0.9.19)
104 MAEMO_CFLAGS="$HILDON_CFLAGS $OSSO_CFLAGS"
105 MAEMO_LIBS="$HILDON_LIBS $OSSO_LIBS"
108 dnl make MAEMO_CFLAGS and MAEMO_LIBS available
109 AC_SUBST(MAEMO_CFLAGS)
112 dnl append GST_ERROR cflags to GST_CFLAGS
113 GST_CFLAGS="$GST_CFLAGS $GST_ERROR"
115 dnl make GST_CFLAGS and GST_LIBS available
119 dnl make GST_MAJORMINOR available in Makefile.am
120 AC_SUBST(GST_MAJORMINOR)
122 dnl If we need them, we can also use the base class libraries
123 PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED,
124 HAVE_GST_BASE=yes, HAVE_GST_BASE=no)
126 dnl Give a warning if we don't have gstreamer libs
127 dnl you can turn this into an error if you need them
128 if test "x$HAVE_GST_BASE" = "xno"; then
129 AC_MSG_NOTICE(no GStreamer base class libraries found (gstreamer-base-$GST_MAJORMINOR))
132 dnl make _CFLAGS and _LIBS available
133 AC_SUBST(GST_BASE_CFLAGS)
134 AC_SUBST(GST_BASE_LIBS)
136 dnl If we need them, we can also use the gstreamer-plugins-base libraries
137 PKG_CHECK_MODULES(GSTPB_BASE,
138 gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPB_REQUIRED,
139 HAVE_GSTPB_BASE=yes, HAVE_GSTPB_BASE=no)
141 dnl Give a warning if we don't have gstreamer libs
142 dnl you can turn this into an error if you need them
143 if test "x$HAVE_GSTPB_BASE" = "xno"; then
144 AC_MSG_NOTICE(no GStreamer Plugins Base libraries found (gstreamer-plugins-base-$GST_MAJORMINOR))
147 dnl make _CFLAGS and _LIBS available
148 AC_SUBST(GSTPB_BASE_CFLAGS)
149 AC_SUBST(GSTPB_BASE_LIBS)
151 dnl If we need them, we can also use the gstreamer-controller libraries
152 PKG_CHECK_MODULES(GSTCTRL,
153 gstreamer-controller-$GST_MAJORMINOR >= $GSTPB_REQUIRED,
154 HAVE_GSTCTRL=yes, HAVE_GSTCTRL=no)
156 dnl Give a warning if we don't have gstreamer-controller
157 dnl you can turn this into an error if you need them
158 if test "x$HAVE_GSTCTRL" = "xno"; then
159 AC_MSG_NOTICE(no GStreamer Controller libraries found (gstreamer-controller-$GST_MAJORMINOR))
162 dnl make _CFLAGS and _LIBS available
163 AC_SUBST(GSTCTRL_CFLAGS)
164 AC_SUBST(GSTCTRL_LIBS)
166 dnl GTK is optional and used in examples
168 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, HAVE_GTK_22=no)
169 if test "x$HAVE_GTK_22" = "xyes"; then
171 GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
172 AC_SUBST(GTK_VERSION)
173 GTK_PREFIX=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
174 AC_SUBST(GTK_BASE_DIR)
175 GDK_PIXBUF_LIBDIR=`$PKG_CONFIG --variable=libdir gdk-pixbuf-2.0`
176 GDK_PIXBUF_PREFIXDIR=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
177 AC_SUBST(GTK_BASE_DIR)
179 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK_20=yes, HAVE_GTK_20=no)
181 if test "x$HAVE_GTK_20" = "xyes"; then
184 GTK_CFLAGS=$GTK2_CFLAGS
189 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
191 dnl If we need them, we can also use the gstreamer-controller libraries
192 PKG_CHECK_MODULES(GCONF,
194 HAVE_GCONF=yes, HAVE_GCONF=no)
196 dnl Give a warning if we don't have gstreamer-controller
197 dnl you can turn this into an error if you need them
198 if test "x$HAVE_GCONF" = "xno"; then
199 AC_MSG_ERROR(no GConf libraries found)
202 dnl make _CFLAGS and _LIBS available
203 AC_SUBST(GCONF_CFLAGS)
204 AC_SUBST(GCONFL_LIBS)
206 dnl set the plugindir where plugins should be installed
207 if test "x${prefix}" = "x$HOME"; then
208 plugindir="$HOME/.gstreamer-$GST_MAJORMINOR/plugins"
210 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
214 dnl set proper LDFLAGS for plugins
215 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
216 AC_SUBST(GST_PLUGIN_LDFLAGS)
218 AC_OUTPUT(Makefile m4/Makefile debian/Makefile src/Makefile)