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 =======================================
73 dnl Check for libghttp
74 AC_CHECK_LIB(ghttp, ghttp_request_new,
78 [AC_MSG_WARN(Cannot find libghttp: can't build gsthttpsrc)
85 dnl Check for atomic.h
86 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
87 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
88 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
89 AC_EGREP_HEADER(atomic_set, asm/atomic.h,,
91 if test x$HAVE_ATOMIC_H = xyes; then
92 AC_MSG_WARN("Atomic reference counting is out of date: doing without.")
98 AC_CHECK_HEADER(mmx.h, HAVE_LIBMMX="yes", HAVE_LIBMMX="no")
101 AC_CHECK_HEADER(xaudio/decoder.h,[
102 AC_DEFINE(HAVE_XAUDIO)
103 HAVE_XAUDIO="yes", []
106 dnl Set location of plugin directory
107 PLUGINS_DIR=${prefix}/lib/gst
108 AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
109 AC_SUBST(PLUGINS_DIR)
111 dnl Set location of uninstalled plugin directory
112 PLUGINS_SRCDIR=`pwd`/$srcdir
113 AC_DEFINE_UNQUOTED(PLUGINS_SRCDIR,"$PLUGINS_SRCDIR")
114 AC_SUBST(PLUGINS_SRCDIR)
116 dnl check if css.c exists (FIXME)
117 AC_MSG_CHECKING(DVD CSS code)
118 if test -f plugins/dvdsrc/css.c
128 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, true, false)
131 dnl ######################################################################
132 dnl # Check command line parameters, and set shell variables accordingly #
133 dnl ######################################################################
135 AC_ARG_ENABLE(libghttp,
136 [ --enable-libghttp use the ghttp library, if available],
137 [case "${enableval}" in
138 yes) USE_LIBGHTTP=$HAVE_LIBGHTTP ;;
139 no) USE_LIBGHTTP=no ;;
140 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libghttp) ;;
142 [USE_LIBGHTTP=$HAVE_LIBGHTTP]) dnl Default value
144 AC_ARG_ENABLE(libmmx,
145 [ --enable-libmmx use libmmx, if available],
146 [case "${enableval}" in
147 yes) USE_LIBMMX=$HAVE_LIBMMX ;;
149 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
151 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
153 AC_ARG_ENABLE(atomic,
154 [ --enable-atomic use atomic reference counting header],
155 [case "${enableval}" in
156 yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
157 noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
158 no) USE_ATOMIC_H=no;;
159 *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
161 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
163 AC_ARG_ENABLE(plugin-srcdir,
164 [ --enable-plugin-srcdir allow tests/demos to use non-installed plugins ],
165 [case "${enableval}" in
166 yes) plugins_use_srcdir=yes ;;
167 no) plugins_use_srcdir=no ;;
168 *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-srcdir) ;;
170 [plugins_use_srcdir=yes]) dnl Default value
173 [ --enable-debug spews lots of useless info at runtime],
174 [case "${enableval}" in
175 yes) use_debug=yes ;;
177 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
179 [use_debug=no]) dnl Default value
181 AC_ARG_ENABLE(profiling,
182 [ --enable-profiling adds -pg to compiler commandline, for profiling],
183 [case "${enableval}" in
184 yes) use_profiling=yes ;;
185 no) use_profiling=no ;;
186 *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
188 [use_profiling=no]) dnl Default value
191 dnl ################################################
192 dnl # Set defines according to variables set above #
193 dnl ################################################
195 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
196 dnl HAVE_ and it is likely to be easier to stick with the old name
197 if test "x$USE_LIBGHTTP" = xyes; then
198 AC_DEFINE(HAVE_LIBGHTTP)
201 if test "x$USE_LIBMMX" = xyes; then
202 AC_DEFINE(HAVE_LIBMMX)
205 if test "x$USE_ATOMIC_H" = xyes; then
206 AC_DEFINE(HAVE_ATOMIC_H)
209 if test "x$PLUGINS_USE_SRCDIR" = xyes; then
210 AC_DEFINE(PLUGINS_USE_SRCDIR)
213 if test "x$USE_DEBUG" = xyes; then
214 AC_DEFINE(DEBUG_ENABLED)
217 if test "x$USE_PROFILING" = xyes; then
222 dnl #############################
223 dnl # Set automake conditionals #
224 dnl #############################
226 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
227 dnl HAVE_ and it is likely to be easier to stick with the old name
228 AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$USE_LIBGHTTP" = "xyes")
229 AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
230 AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
231 AM_CONDITIONAL(HAVE_XAUDIO, test "x$HAVE_XAUDIO" = "xyes")
232 AM_CONDITIONAL(HAVE_CSSAUTH, test "x$HAVE_CSSAUTH" = "xyes")
233 AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
236 dnl FIXME: having to AC_SUBST these is messy. Not sure if CPPFLAGS and LDFLAGS
243 dnl #############################
244 dnl # Configure the subpackages #
245 dnl #############################
247 AC_CONFIG_SUBDIRS(gist)
248 AC_CONFIG_SUBDIRS(plugins/mp3decode/xing/libxing)
251 dnl #########################
252 dnl # Make the output files #
253 dnl #########################
259 gst/elements/Makefile
264 plugins/mp3decode/Makefile
265 plugins/mp3decode/xa/Makefile
266 plugins/mp3decode/xing/Makefile
267 plugins/mp3decode/mpg123/Makefile
268 plugins/mp3decode/parse/Makefile
269 plugins/mpeg2/Makefile
270 plugins/mpeg2/parse/Makefile
271 plugins/mpeg2/ac3parse/Makefile
272 plugins/mpeg2/ac3dec/Makefile
273 plugins/mpeg1/Makefile
274 plugins/mpeg1/parse/Makefile
275 plugins/effects/Makefile
276 plugins/effects/stereo/Makefile
277 plugins/effects/volume/Makefile
278 plugins/visualization/Makefile
279 plugins/visualization/spectrum/Makefile
280 plugins/visualization/vumeter/Makefile
281 plugins/visualization/synaesthesia/Makefile
282 plugins/visualization/smoothwave/Makefile
283 plugins/dvdsrc/Makefile
284 plugins/vcdsrc/Makefile
285 plugins/cobin/Makefile
286 plugins/rtjpeg/Makefile
289 test/bindings/Makefile
290 test/cothreads/Makefile
297 AC_OUTPUT_COMMANDS([chmod +x gstreamer-config])