1 AC_INIT(gst/gstobject.h)
3 AM_CONFIG_HEADER(config.h)
5 STREAMER_MAJOR_VERSION=0
6 STREAMER_MINOR_VERSION=0
7 STREAMER_MICRO_VERSION=9.2
8 STREAMER_VERSION=$STREAMER_MAJOR_VERSION.$STREAMER_MINOR_VERSION.$STREAMER_MICRO_VERSION
15 AM_INIT_AUTOMAKE(gstreamer, $STREAMER_VERSION)
16 dnl Add parameters for aclocal
17 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
18 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
20 AC_SUBST(STREAMER_MAJOR_VERSION)
21 AC_SUBST(STREAMER_MINOR_VERSION)
22 AC_SUBST(STREAMER_MICRO_VERSION)
23 AC_SUBST(STREAMER_VERSION)
25 AC_SUBST(STREAMER_CURRENT)
26 AC_SUBST(STREAMER_REVISION)
27 AC_SUBST(STREAMER_AGE)
41 dnl ##############################
42 dnl # Do automated configuration #
43 dnl ##############################
45 dnl Check for essential libraries first:
46 dnl ====================================
50 AC_MSG_ERROR(Cannot find glib: Is glib-config in path?),
52 dnl Put the glib flags into $LIBS and $CFLAGS since we always use them
53 LIBS="$LIBS $GLIB_LIBS"
54 CFLAGS="$FLAGS $GLIB_CFLAGS"
57 AC_PATH_PROG(XML_CONFIG, xml-config, no)
58 if test x$XML_CONFIG = xno; then
59 AC_MSG_ERROR(Couldn't find xml-config)
61 XML_LIBS=`xml-config --libs`
62 XML_CFLAGS=`xml-config --cflags`
66 dnl Check for libgdb-pixbuf
67 AC_PATH_PROG(GDK_PIXBUF_CONFIG, gdk-pixbuf-config, no)
68 if test x$GDK_PIXBUF_CONFIG = xno; then
69 AC_MSG_ERROR(Couldn't find gdk-pixbuf-config)
71 GDK_PIXBUF_LIBS=`gdk-pixbuf-config --libs`
72 GDK_PIXBUF_CFLAGS=`gdk-pixbuf-config --cflags`
73 AC_SUBST(GDK_PIXBUF_LIBS)
74 AC_SUBST(GDK_PIXBUF_CFLAGS)
77 dnl Next, check for the optional libraries:
78 dnl =======================================
83 dnl Check for libghttp
84 AC_CHECK_LIB(ghttp, ghttp_request_new,
88 [AC_MSG_WARN(Cannot find libghttp: can't build gsthttpsrc)
95 dnl Check for atomic.h
96 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
97 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
98 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
99 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
100 if test x$HAVE_ATOMIC_H = xyes; then
102 #include "asm/atomic.h"
103 main() { atomic_t t; atomic_set(&t,0); return 0;}
106 if test x$HAVE_ATOMIC_H = xyes; then
107 AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
113 AC_MSG_WARN(Can't check properly for atomic reference counting. Assuming OK.)
117 dnl Check for MMX capable compiler
118 AC_MSG_CHECKING(Checking MMX compilation)
120 #include "include/mmx.h"
123 { movq_r2r(mm0, mm1); return 0; }
137 AC_CHECK_HEADER(xaudio/decoder.h,[
138 AC_DEFINE(HAVE_XAUDIO)
139 HAVE_XAUDIO="yes", []
142 dnl Set location of plugin directory
143 PLUGINS_DIR=${prefix}/lib/gst
144 AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
145 AC_SUBST(PLUGINS_DIR)
147 dnl Set location of uninstalled plugin directory
148 PLUGINS_SRCDIR=`pwd`/$srcdir
149 AC_DEFINE_UNQUOTED(PLUGINS_SRCDIR,"$PLUGINS_SRCDIR")
150 AC_SUBST(PLUGINS_SRCDIR)
152 dnl check if css.c exists (FIXME)
153 AC_MSG_CHECKING(DVD CSS code)
154 if test -f plugins/dvdsrc/css.c
164 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, true, false)
167 dnl ######################################################################
168 dnl # Check command line parameters, and set shell variables accordingly #
169 dnl ######################################################################
171 AC_ARG_ENABLE(libghttp,
172 [ --enable-libghttp use the ghttp library, if available],
173 [case "${enableval}" in
174 yes) USE_LIBGHTTP=$HAVE_LIBGHTTP ;;
175 no) USE_LIBGHTTP=no ;;
176 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libghttp) ;;
178 [USE_LIBGHTTP=$HAVE_LIBGHTTP]) dnl Default value
180 AC_ARG_ENABLE(libmmx,
181 [ --enable-libmmx use libmmx, if available],
182 [case "${enableval}" in
183 yes) USE_LIBMMX=$HAVE_LIBMMX ;;
185 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
187 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
189 AC_ARG_ENABLE(atomic,
190 [ --enable-atomic use atomic reference counting header],
191 [case "${enableval}" in
192 yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
193 noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
194 no) USE_ATOMIC_H=no;;
195 *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
197 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
199 AC_ARG_ENABLE(plugin-srcdir,
200 [ --enable-plugin-srcdir allow tests/demos to use non-installed plugins ],
201 [case "${enableval}" in
202 yes) PLUGINS_USE_SRCDIR=yes ;;
203 no) PLUGINS_USE_SRCDIR=no ;;
204 *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-srcdir) ;;
206 [PLUGINS_USE_SRCDIR=yes]) dnl Default value
209 [ --enable-debug spews lots of useless info at runtime],
210 [case "${enableval}" in
211 yes) USE_DEBUG=yes ;;
213 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
215 [USE_DEBUG=no]) dnl Default value
217 AC_ARG_ENABLE(profiling,
218 [ --enable-profiling adds -pg to compiler commandline, for profiling],
219 [case "${enableval}" in
220 yes) USE_PROFILING=yes ;;
221 no) UES_PROFILING=no ;;
222 *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
224 [USE_PROFILING=no]) dnl Default value
227 dnl ################################################
228 dnl # Set defines according to variables set above #
229 dnl ################################################
231 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
232 dnl HAVE_ and it is likely to be easier to stick with the old name
233 if test "x$USE_LIBGHTTP" = xyes; then
234 AC_DEFINE(HAVE_LIBGHTTP)
237 if test "x$USE_LIBMMX" = xyes; then
238 AC_DEFINE(HAVE_LIBMMX)
241 if test "x$USE_ATOMIC_H" = xyes; then
242 AC_DEFINE(HAVE_ATOMIC_H)
245 if test "x$PLUGINS_USE_SRCDIR" = xyes; then
246 AC_DEFINE(PLUGINS_USE_SRCDIR)
249 if test "x$USE_DEBUG" = xyes; then
250 AC_DEFINE(DEBUG_ENABLED)
253 if test "x$USE_PROFILING" = xyes; then
258 dnl #############################
259 dnl # Set automake conditionals #
260 dnl #############################
262 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
263 dnl HAVE_ and it is likely to be easier to stick with the old name
264 AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$USE_LIBGHTTP" = "xyes")
265 AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
266 AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
267 AM_CONDITIONAL(HAVE_XAUDIO, test "x$HAVE_XAUDIO" = "xyes")
268 AM_CONDITIONAL(HAVE_CSSAUTH, test "x$HAVE_CSSAUTH" = "xyes")
269 AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
272 dnl FIXME: having to AC_SUBST these is messy. Not sure if CPPFLAGS and LDFLAGS
279 dnl #############################
280 dnl # Configure the subpackages #
281 dnl #############################
283 AC_CONFIG_SUBDIRS(gist)
284 AC_CONFIG_SUBDIRS(plugins/mp3decode/xing/libxing)
287 dnl #########################
288 dnl # Make the output files #
289 dnl #########################
295 gst/elements/Makefile
303 plugins/mp3decode/Makefile
304 plugins/mp3decode/xa/Makefile
305 plugins/mp3decode/xing/Makefile
306 plugins/mp3decode/mpg123/Makefile
307 plugins/mp3decode/parse/Makefile
308 plugins/mpeg2/Makefile
309 plugins/mpeg2/parse/Makefile
310 plugins/mpeg2/ac3parse/Makefile
311 plugins/mpeg2/ac3dec/Makefile
312 plugins/mpeg1/Makefile
313 plugins/mpeg1/mpeg_play/Makefile
314 plugins/mpeg1/parse/Makefile
315 plugins/mpeg1video/parse/Makefile
316 plugins/effects/Makefile
317 plugins/effects/stereo/Makefile
318 plugins/effects/volume/Makefile
319 plugins/visualization/Makefile
320 plugins/visualization/spectrum/Makefile
321 plugins/visualization/vumeter/Makefile
322 plugins/visualization/synaesthesia/Makefile
323 plugins/visualization/smoothwave/Makefile
324 plugins/videosink/Makefile
325 plugins/dvdsrc/Makefile
326 plugins/vcdsrc/Makefile
327 plugins/cobin/Makefile
328 plugins/rtjpeg/Makefile
329 plugins/capture/Makefile
330 plugins/capture/v4l/Makefile
333 test/bindings/Makefile
334 test/cothreads/Makefile
342 AC_OUTPUT_COMMANDS([chmod +x gstreamer-config])