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`
67 dnl Next, check for the optional libraries:
68 dnl =======================================
70 dnl Check for libgdk-pixbuf
71 AC_PATH_PROG(GDK_PIXBUF_CONFIG, gdk-pixbuf-config, no)
72 if test x$GDK_PIXBUF_CONFIG = xno; then
73 AC_MSG_WARN(Couldn't find gdk-pixbuf-config)
78 GDK_PIXBUF_LIBS=`gdk-pixbuf-config --libs`
79 GDK_PIXBUF_CFLAGS=`gdk-pixbuf-config --cflags`
82 AC_SUBST(GDK_PIXBUF_LIBS)
83 AC_SUBST(GDK_PIXBUF_CFLAGS)
89 dnl Check for libghttp
90 AC_CHECK_LIB(ghttp, ghttp_request_new,
92 GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
95 [AC_MSG_WARN(Cannot find libghttp: can't build gsthttpsrc)
102 AC_SUBST(GST_HTTPSRC_GET_TYPE)
104 dnl Check for atomic.h
105 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
106 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
107 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
108 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
109 if test x$HAVE_ATOMIC_H = xyes; then
111 #include "asm/atomic.h"
112 main() { atomic_t t; atomic_set(&t,0); return 0;}
115 if test x$HAVE_ATOMIC_H = xyes; then
116 AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
122 AC_MSG_WARN(Can't check properly for atomic reference counting. Assuming OK.)
126 dnl Check for MMX capable compiler
127 AC_MSG_CHECKING(Checking MMX compilation)
129 #include "include/mmx.h"
132 { movq_r2r(mm0, mm1); return 0; }
145 dnl Check for X11 extensions
147 if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
148 AC_MSG_ERROR(can not find X11)
152 AC_SUBST(X_EXTRA_LIBS)
155 AC_CHECK_LIB(Xv, XvQueryExtension,,,
156 $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
159 AC_CHECK_HEADER(xaudio/decoder.h,[
160 AC_DEFINE(HAVE_XAUDIO)
161 HAVE_XAUDIO="yes", []
164 dnl Set location of plugin directory
165 if test "x${prefix}" = "xNONE"; then
166 PLUGINS_DIR=${ac_default_prefix}/lib/gst
168 PLUGINS_DIR=${prefix}/lib/gst
170 AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
171 AC_SUBST(PLUGINS_DIR)
173 dnl Set location of uninstalled plugin directory
174 PLUGINS_SRCDIR=`pwd`/$srcdir
175 AC_DEFINE_UNQUOTED(PLUGINS_SRCDIR,"$PLUGINS_SRCDIR")
176 AC_SUBST(PLUGINS_SRCDIR)
178 dnl check if css.c exists (FIXME)
179 AC_MSG_CHECKING(DVD CSS code)
180 if test -f plugins/dvdsrc/css.c
190 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, true, false)
193 dnl ######################################################################
194 dnl # Check command line parameters, and set shell variables accordingly #
195 dnl ######################################################################
197 AC_ARG_ENABLE(gdk-pixbuf,
198 [ --enable-gdk-pixbuf use gdk pixbuf, if available],
199 [case "${enableval}" in
200 yes) USE_GDK_PIXBUF=$HAVE_GDK_PIXBUF ;;
201 no) USE_GDK_PIXBUF=no ;;
202 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gdk-pixbuf) ;;
204 [USE_GDK_PIXBUF=$HAVE_GDK_PIXBUF]) dnl Default value
206 AC_ARG_ENABLE(libghttp,
207 [ --enable-libghttp use the ghttp library, if available],
208 [case "${enableval}" in
209 yes) USE_LIBGHTTP=$HAVE_LIBGHTTP ;;
210 no) USE_LIBGHTTP=no ;;
211 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libghttp) ;;
213 [USE_LIBGHTTP=$HAVE_LIBGHTTP]) dnl Default value
215 AC_ARG_ENABLE(libmmx,
216 [ --enable-libmmx use libmmx, if available],
217 [case "${enableval}" in
218 yes) USE_LIBMMX=$HAVE_LIBMMX ;;
220 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
222 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
224 AC_ARG_ENABLE(atomic,
225 [ --enable-atomic use atomic reference counting header],
226 [case "${enableval}" in
227 yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
228 noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
229 no) USE_ATOMIC_H=no;;
230 *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
232 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
234 AC_ARG_ENABLE(plugin-srcdir,
235 [ --enable-plugin-srcdir allow tests/demos to use non-installed plugins ],
236 [case "${enableval}" in
237 yes) PLUGINS_USE_SRCDIR=yes ;;
238 no) PLUGINS_USE_SRCDIR=no ;;
239 *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-srcdir) ;;
241 [PLUGINS_USE_SRCDIR=yes]) dnl Default value
244 [ --enable-debug spews lots of useless info at runtime],
245 [case "${enableval}" in
246 yes) USE_DEBUG=yes ;;
248 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
250 [USE_DEBUG=no]) dnl Default value
252 AC_ARG_ENABLE(profiling,
253 [ --enable-profiling adds -pg to compiler commandline, for profiling],
254 [case "${enableval}" in
255 yes) USE_PROFILING=yes ;;
256 no) UES_PROFILING=no ;;
257 *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
259 [USE_PROFILING=no]) dnl Default value
262 dnl ################################################
263 dnl # Set defines according to variables set above #
264 dnl ################################################
266 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
267 dnl HAVE_ and it is likely to be easier to stick with the old name
268 if test "x$USE_GDK_PIXBUF" = xyes; then
269 AC_DEFINE(HAVE_GDK_PIXBUF)
272 if test "x$USE_LIBGHTTP" = xyes; then
273 AC_DEFINE(HAVE_LIBGHTTP)
276 if test "x$USE_LIBMMX" = xyes; then
277 AC_DEFINE(HAVE_LIBMMX)
280 if test "x$USE_ATOMIC_H" = xyes; then
281 AC_DEFINE(HAVE_ATOMIC_H)
284 if test "x$PLUGINS_USE_SRCDIR" = xyes; then
285 AC_DEFINE(PLUGINS_USE_SRCDIR)
288 if test "x$USE_DEBUG" = xyes; then
289 AC_DEFINE(DEBUG_ENABLED)
292 if test "x$USE_PROFILING" = xyes; then
297 dnl #############################
298 dnl # Set automake conditionals #
299 dnl #############################
301 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
302 dnl HAVE_ and it is likely to be easier to stick with the old name
303 AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$USE_GDK_PIXBUF" = "xyes")
304 AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$USE_LIBGHTTP" = "xyes")
305 AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
306 AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
307 AM_CONDITIONAL(HAVE_XAUDIO, test "x$HAVE_XAUDIO" = "xyes")
308 AM_CONDITIONAL(HAVE_CSSAUTH, test "x$HAVE_CSSAUTH" = "xyes")
309 AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
312 dnl FIXME: having to AC_SUBST these is messy. Not sure if CPPFLAGS and LDFLAGS
319 dnl #############################
320 dnl # Configure the subpackages #
321 dnl #############################
323 AC_CONFIG_SUBDIRS(gist)
324 AC_CONFIG_SUBDIRS(plugins/mp3decode/xing/libxing)
327 dnl #########################
328 dnl # Make the output files #
329 dnl #########################
335 gst/elements/Makefile
339 libs/colorspace/Makefile
340 libs/videoscale/Makefile
341 libs/getbits/Makefile
342 libs/putbits/Makefile
347 plugins/jpeg/Makefile
348 plugins/mp3decode/Makefile
349 plugins/mp3decode/xa/Makefile
350 plugins/mp3decode/xing/Makefile
351 plugins/mp3decode/mpg123/Makefile
352 plugins/mp3decode/parse/Makefile
353 plugins/mpeg2/Makefile
354 plugins/mpeg2/parse/Makefile
355 plugins/mpeg2/ac3parse/Makefile
356 plugins/mpeg2/ac3dec/Makefile
357 plugins/mpeg2/video/Makefile
358 plugins/mpeg2/mpeg2enc/Makefile
359 plugins/mpeg1/Makefile
360 plugins/mpeg1/mpeg_play/Makefile
361 plugins/mpeg1/mpegaudio/Makefile
362 plugins/mpeg1/parse/Makefile
363 plugins/mpeg1/system_encode/Makefile
364 plugins/mpeg1/mpeg1encoder/Makefile
365 plugins/mpeg1video/Makefile
366 plugins/mpeg1video/parse/Makefile
367 plugins/filters/Makefile
368 plugins/filters/smooth/Makefile
369 plugins/filters/median/Makefile
370 plugins/effects/Makefile
371 plugins/effects/stereo/Makefile
372 plugins/effects/volume/Makefile
373 plugins/visualization/Makefile
374 plugins/visualization/spectrum/Makefile
375 plugins/visualization/vumeter/Makefile
376 plugins/visualization/synaesthesia/Makefile
377 plugins/visualization/smoothwave/Makefile
378 plugins/videosink/Makefile
379 plugins/videoscale/Makefile
380 plugins/audioscale/Makefile
381 plugins/dvdsrc/Makefile
382 plugins/vcdsrc/Makefile
383 plugins/cobin/Makefile
384 plugins/rtjpeg/Makefile
385 plugins/capture/Makefile
386 plugins/capture/v4l/Makefile
390 test/bindings/Makefile
391 test/cothreads/Makefile
396 docs/gst/gstreamer.types
400 AC_OUTPUT_COMMANDS([chmod +x gstreamer-config])