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 dnl releases only do Wall, cvs and prerelease does Werror too
14 AS_VERSION(tuner, GST_PLUGIN_VERSION, 0, 0, 4, 0,
15 GST_PLUGIN_CVS="no", GST_PLUGIN_CVS="yes")
17 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
20 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
22 dnl make aclocal work in maintainer mode
23 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
25 AM_CONFIG_HEADER(config.h)
34 AC_HELP_STRING([--with-hildon],
35 [Turn on/off use of Hildon GUI (default=no)]),
36 [if test "x$withval" = "xyes"; then test_hildon=true; fi])
38 dnl Enable Maemo specific issues
40 AC_HELP_STRING([--with-maemo],
41 [Turn on/off use of Maemo related code (default=no)]),
42 [if test "x$withval" = "xyes"; then enable_maemo=true; fi])
45 dnl decide on error flags
46 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
48 if test "x$GST_WALL" = "xyes"; then
49 GST_ERROR="$GST_ERROR -Wall"
51 if test "x$GST_CVS" = "xyes"; then
52 AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
56 dnl Check for pkgconfig first
57 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
59 dnl Give error and exit if we don't have pkgconfig
60 if test "x$HAVE_PKGCONFIG" = "xno"; then
61 AC_MSG_ERROR(you need to have pkgconfig installed !)
64 dnl Now we're ready to ask for gstreamer libs and cflags
65 dnl And we can also ask for the right version of gstreamer
68 PKG_CHECK_MODULES(GST, \
69 gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
70 HAVE_GST=yes,HAVE_GST=no)
72 dnl Give error and exit if we don't have gstreamer
73 if test "x$HAVE_GST" = "xno"; then
74 AC_MSG_ERROR(you need gstreamer development packages installed !)
78 dnl Check for Maemo required packages
80 if test "x$enable_maemo" = "xtrue"; then
82 AC_DEFINE(MAEMO, 1, [Turn on Maemo dependecies])
85 if test "x$test_hildon" = "xtrue"; then
86 dnl try if hildon is available in the form previous IT2K8
87 PKG_CHECK_MODULES(HILDON, hildon-libs >= 0.12.0,
88 HAVE_HILDON=yes, HAVE_HILDON=no)
90 if test "x$HAVE_HILDON" = "xno"; then
91 dnl if fail try for IT2K8
92 PKG_CHECK_MODULES(HILDON, hildon-1 >= 0.9.9,
93 HAVE_HILDON=yes, HAVE_HILDON=no)
94 AC_DEFINE(HILDON, 1, [Version of hildon libraries])
96 AC_DEFINE(HILDON, 0, [Version of hildon libraries])
99 if test "x$HAVE_HILDON" = "xno"; then
100 AC_MSG_ERROR(you need hildon development packages installed !)
103 PKG_CHECK_MODULES(OSSO, libosso >= 0.9.19)
105 MAEMO_CFLAGS="$HILDON_CFLAGS $OSSO_CFLAGS"
106 MAEMO_LIBS="$HILDON_LIBS $OSSO_LIBS"
109 dnl make MAEMO_CFLAGS and MAEMO_LIBS available
110 AC_SUBST(MAEMO_CFLAGS)
113 dnl append GST_ERROR cflags to GST_CFLAGS
114 GST_CFLAGS="$GST_CFLAGS $GST_ERROR"
116 dnl make GST_CFLAGS and GST_LIBS available
120 dnl make GST_MAJORMINOR available in Makefile.am
121 AC_SUBST(GST_MAJORMINOR)
123 dnl If we need them, we can also use the base class libraries
124 PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED,
125 HAVE_GST_BASE=yes, HAVE_GST_BASE=no)
127 dnl Give a warning if we don't have gstreamer libs
128 dnl you can turn this into an error if you need them
129 if test "x$HAVE_GST_BASE" = "xno"; then
130 AC_MSG_NOTICE(no GStreamer base class libraries found (gstreamer-base-$GST_MAJORMINOR))
133 dnl make _CFLAGS and _LIBS available
134 AC_SUBST(GST_BASE_CFLAGS)
135 AC_SUBST(GST_BASE_LIBS)
137 dnl If we need them, we can also use the gstreamer-plugins-base libraries
138 PKG_CHECK_MODULES(GSTPB_BASE,
139 gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPB_REQUIRED,
140 HAVE_GSTPB_BASE=yes, HAVE_GSTPB_BASE=no)
142 dnl Give a warning if we don't have gstreamer libs
143 dnl you can turn this into an error if you need them
144 if test "x$HAVE_GSTPB_BASE" = "xno"; then
145 AC_MSG_NOTICE(no GStreamer Plugins Base libraries found (gstreamer-plugins-base-$GST_MAJORMINOR))
148 dnl make _CFLAGS and _LIBS available
149 AC_SUBST(GSTPB_BASE_CFLAGS)
150 AC_SUBST(GSTPB_BASE_LIBS)
152 dnl If we need them, we can also use the gstreamer-controller libraries
153 PKG_CHECK_MODULES(GSTCTRL,
154 gstreamer-controller-$GST_MAJORMINOR >= $GSTPB_REQUIRED,
155 HAVE_GSTCTRL=yes, HAVE_GSTCTRL=no)
157 dnl Give a warning if we don't have gstreamer-controller
158 dnl you can turn this into an error if you need them
159 if test "x$HAVE_GSTCTRL" = "xno"; then
160 AC_MSG_NOTICE(no GStreamer Controller libraries found (gstreamer-controller-$GST_MAJORMINOR))
163 dnl make _CFLAGS and _LIBS available
164 AC_SUBST(GSTCTRL_CFLAGS)
165 AC_SUBST(GSTCTRL_LIBS)
167 dnl GTK is optional and used in examples
169 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, HAVE_GTK_22=no)
170 if test "x$HAVE_GTK_22" = "xyes"; then
172 GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
173 AC_SUBST(GTK_VERSION)
174 GTK_PREFIX=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
175 AC_SUBST(GTK_BASE_DIR)
176 GDK_PIXBUF_LIBDIR=`$PKG_CONFIG --variable=libdir gdk-pixbuf-2.0`
177 GDK_PIXBUF_PREFIXDIR=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
178 AC_SUBST(GTK_BASE_DIR)
180 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK_20=yes, HAVE_GTK_20=no)
182 if test "x$HAVE_GTK_20" = "xyes"; then
185 GTK_CFLAGS=$GTK2_CFLAGS
190 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
192 dnl If we need them, we can also use the gstreamer-controller libraries
193 PKG_CHECK_MODULES(GCONF,
195 HAVE_GCONF=yes, HAVE_GCONF=no)
197 dnl Give a warning if we don't have gstreamer-controller
198 dnl you can turn this into an error if you need them
199 if test "x$HAVE_GCONF" = "xno"; then
200 AC_MSG_ERROR(no GConf libraries found)
203 dnl make _CFLAGS and _LIBS available
204 AC_SUBST(GCONF_CFLAGS)
205 AC_SUBST(GCONFL_LIBS)
207 dnl set the plugindir where plugins should be installed
208 if test "x${prefix}" = "x$HOME"; then
209 plugindir="$HOME/.gstreamer-$GST_MAJORMINOR/plugins"
211 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
215 dnl set proper LDFLAGS for plugins
216 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
217 AC_SUBST(GST_PLUGIN_LDFLAGS)
219 AC_OUTPUT(Makefile m4/Makefile debian/Makefile src/Makefile)