1 dnl autoconf configuration file for gst-plugins
2 AC_INIT
3 AC_CANONICAL_TARGET([])
5 dnl We disable static building for development, for time savings
6 dnl this goes before AS_LIBTOOL to appease autoconf
7 dnl *NOTE*: dnl this line before release, so release does static too
8 AM_DISABLE_STATIC
10 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
11 AM_MAINTAINER_MODE
13 dnl when going to/from release please set the nano (fourth number) right !
14 dnl releases only do Wall, cvs and prerelease does Werror too
15 AS_VERSION(gst-plugins, GST_PLUGINS_VERSION, 0, 7, 1, 1, GST_CVS="no", GST_CVS="yes")
17 dnl add a suffix to apps
18 if test x$program_suffix = xNONE ; then
19 program_suffix=-$GST_PLUGINS_VERSION_MAJOR.$GST_PLUGINS_VERSION_MINOR
20 fi
22 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
24 dnl our libraries and install dirs use major.minor as a version
25 GST_MAJORMINOR=$GST_PLUGINS_VERSION_MAJOR.$GST_PLUGINS_VERSION_MINOR
26 AC_SUBST(GST_MAJORMINOR)
28 dnl CURRENT, REVISION, AGE
29 dnl - library source changed -> increment REVISION
30 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
31 dnl - interfaces added -> increment AGE
32 dnl - interfaces removed -> AGE = 0
33 AS_LIBTOOL(GST_PLUGINS, 1, 0, 0)
35 dnl FIXME take something else ?
36 AC_CONFIG_SRCDIR([gst/law/alaw.c])
37 AM_CONFIG_HEADER(config.h)
39 dnl Add parameters for aclocal
40 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
41 ACLOCAL_FLAGS="-I m4 -I common/m4"
42 AC_SUBST(ACLOCAL_AMFLAGS, $ACLOCAL_FLAGS)
44 AC_PROG_CC
45 AM_PROG_CC_STDC
46 AM_PROG_AS
47 AS="${CC}"
49 dnl decide on error flags
50 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
52 if test "x$GST_WALL" = "xyes"; then
53 GST_ERROR="$GST_ERROR -Wall"
55 if test "x$GST_CVS" = "xyes"; then
56 AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
57 GST_ERROR="$GST_ERROR -DG_DISABLE_DEPRECATED"
58 fi
59 fi
61 dnl determine c++ compiler
62 AC_PROG_CXX
63 dnl determine if c++ is available on this system
64 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
65 dnl determine c++ preprocessor
66 AC_PROG_CXXCPP
67 AC_ISC_POSIX
69 AC_HEADER_STDC([])
71 dnl Check for a way to display the function name in debug output
72 GST_CHECK_FUNCTION()
74 dnl define correct errorlevel for debugging messages. We want to have GST_ERROR
75 dnl messages printed when running cvs builds
76 if test "x$GST_CVS" = "xyes"; then
77 AC_DEFINE(GST_LEVEL_DEFAULT, GST_LEVEL_ERROR, [Default errorlevel to use])
78 fi
80 dnl ############################################
81 dnl # Super Duper options for plug-in building #
82 dnl ############################################
84 dnl ext plug-ins; plug-ins that have external dependencies
85 GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
86 [HAVE_EXTERNAL=yes],enabled,
87 [
88 AC_MSG_WARN(building external plug-ins)
89 BUILD_EXTERNAL="yes"
90 ],[
91 AC_MSG_WARN(all plug-ins with external dependencies will not be built)
92 BUILD_EXTERNAL="no"
93 ])
94 # make BUILD_EXTERNAL available to Makefile.am
95 AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
97 dnl experimental plug-ins; stuff that hasn't had the dust settle yet
98 dnl read 'builds, but might not work'UTO
99 GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plug-ins],,
100 [HAVE_EXPERIMENTAL=yes],disabled,
101 [
102 AC_MSG_WARN(building experimental plug-ins)
103 USE_TARKIN="yes"
104 USE_SHOUT2="yes"
105 ],[
106 AC_MSG_NOTICE(not building experimental plug-ins)
107 USE_TARKIN="no"
108 USE_SHOUT2="no"
109 ])
111 dnl broken plug-ins; stuff that doesn't seem to build at the moment
112 GST_CHECK_FEATURE(BROKEN, [enable building of broken plug-ins],,
113 HAVE_BROKEN=yes,disabled,
114 [
115 AC_MSG_WARN([building broken plug-ins -- no bug reports on these, only patches :)])
116 ],[
117 AC_MSG_NOTICE([not building broken plug-ins])
118 ])
120 dnl ##############################
121 dnl # Do automated configuration #
122 dnl ##############################
124 dnl Check for tools:
125 dnl ================
127 dnl allow for different autotools
128 AS_AUTOTOOLS_ALTERNATE()
130 dnl modify pkg-config path
131 AC_ARG_WITH(pkg-config-path,
132 AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
133 [export PKG_CONFIG_PATH=${withval}])
135 dnl Check for nasm
136 AC_PATH_PROG(NASM_PATH, nasm, no)
137 AC_SUBST(NASM_PATH)
138 if test x$NASM_PATH = xno; then
139 AC_MSG_WARN(Couldn't find nasm)
140 HAVE_NASM="no"
141 else
142 AC_DEFINE(HAVE_NASM, 1, [Define if NASM, the netwide assembler, is available])
143 HAVE_NASM="yes"
144 fi
146 dnl check for gconftool-2
147 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONFTOOL, true)
148 GST_CHECK_FEATURE(GCONFTOOL, [GConf schemas], , [
149 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
150 if test x$GCONFTOOL = xno; then
151 AC_MSG_WARN(Not installing GConf schemas)
152 HAVE_GCONFTOOL="no"
153 else
154 AM_GCONF_SOURCE_2
155 HAVE_GCONFTOOL="yes"
156 fi
157 AC_SUBST(HAVE_GCONFTOOL)
158 ])
160 dnl check for GConf libraries
161 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONF, true)
162 GST_CHECK_FEATURE(GCONF, [GConf libraries], , [
163 PKG_CHECK_MODULES(GCONF, gconf-2.0, HAVE_GCONF="yes", HAVE_GCONF="no")
164 AC_SUBST(GCONF_CFLAGS)
165 AC_SUBST(GCONF_LIBS)
166 ])
168 dnl check for gstreamer; uninstalled is selected preferentially -- see pkg-config(1)
169 PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_PLUGINS_VERSION_MAJOR.$GST_PLUGINS_VERSION_MINOR.$GST_PLUGINS_VERSION_MICRO,
170 HAVE_GST="yes", HAVE_GST="no")
172 if test "x$HAVE_GST" = "xno"; then
173 AC_MSG_ERROR(no GStreamer found)
174 fi
176 GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer-$GST_MAJORMINOR`
177 if test -z $GST_TOOLS_DIR; then
178 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
179 fi
180 AC_SUBST(GST_TOOLS_DIR)
182 dnl check for gstreamer-control; uninstalled is selected preferentially
183 PKG_CHECK_MODULES(GST_CONTROL, gstreamer-control-$GST_MAJORMINOR >= $GST_PLUGINS_VERSION_MAJOR.$GST_PLUGINS_VERSION_MINOR.$GST_PLUGINS_VERSION_MICRO,
184 HAVE_GST_CONTROL="yes", HAVE_GST_CONTROL="no")
186 if test "x$HAVE_GST_CONTROL" = "xno"; then
187 AC_MSG_ERROR(no GStreamer Control Libs found)
188 fi
190 AC_SUBST(GST_CONTROL_LIBS)
193 dnl Set up conditionals for (target) architecture:
194 dnl ==============================================
196 dnl Determine CPU
197 case "x${target_cpu}" in
198 xi?86 | k?) HAVE_CPU_I386=yes
199 AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
200 dnl FIXME could use some better detection
201 dnl (ie CPUID)
202 case "x${target_cpu}" in
203 xi386 | xi486) ;;
204 *) AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;;
205 esac ;;
206 xpowerpc) HAVE_CPU_PPC=yes
207 AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PPC]) ;;
208 xalpha) HAVE_CPU_ALPHA=yes
209 AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
210 xarm*) HAVE_CPU_ARM=yes
211 AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
212 xsparc*) HAVE_CPU_SPARC=yes
213 AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a PPC]) ;;
214 xmips*) HAVE_CPU_MIPS=yes
215 AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
216 xhppa*) HAVE_CPU_HPPA=yes
217 AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
218 esac
220 dnl Determine endianness
221 AC_C_BIGENDIAN
223 dnl Check for fast float to int casting as defined in C99
224 AC_C99_FUNC_LRINT()
225 AC_C99_FUNC_LRINTF()
227 dnl Check for essential libraries first:
228 dnl ====================================
230 GST_GLIB2_CHECK()
232 dnl Check for additional libraries that we might use:
233 dnl =================================================
234 dnl GTK
235 HAVE_GTK=NO
236 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, HAVE_GTK_22=no)
237 if test "x$HAVE_GTK_22" = "xyes"; then
238 HAVE_GTK=yes
239 AC_PATH_PROG(QUERYLOADERS, gdk-pixbuf-query-loaders, no)
240 GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
241 AC_SUBST(GTK_VERSION)
242 GTK_BASE_DIR=`echo "$QUERYLOADERS" | sed "s/bin\/gdk-pixbuf-query-loaders\$//"`
243 AC_SUBST(GTK_BASE_DIR)
244 else
245 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK_20=yes, HAVE_GTK_20=no)
246 fi
247 if test "x$HAVE_GTK_20" = "xyes"; then
248 HAVE_GTK=yes
249 fi
250 GTK_CFLAGS=$GTK2_CFLAGS
251 GTK_LIBS=$GTK2_LIBS
252 AC_SUBST(GTK_LIBS)
253 AC_SUBST(GTK_CFLAGS)
254 AC_SUBST(HAVE_GTK)
255 AM_CONDITIONAL(HAVE_GDK_LOADERS, test "x$HAVE_GTK_22" = "xyes")
257 dnl Check for X11 extensions
258 AC_PATH_XTRA
259 if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
260 AC_MSG_NOTICE([cannot find X11, the build system needs fixage])
261 fi
262 AC_SUBST(X_CFLAGS)
263 AC_SUBST(X_PRE_LIBS)
264 AC_SUBST(X_EXTRA_LIBS)
265 AC_SUBST(X_LIBS)
267 dnl ===========================================================================
268 dnl ============================= gst plug-ins ================================
269 dnl ===========================================================================
271 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
272 AC_SUBST(plugindir)
274 GST_PLUGIN_LDFLAGS='-module -avoid-version'
275 AC_SUBST(GST_PLUGIN_LDFLAGS)
277 dnl these are all the gst plug-ins, compilable without additional libs
278 GST_PLUGINS_ALL="\
279 ac3parse \
280 adder \
281 asfdemux \
282 audioconvert \
283 audioscale \
284 auparse \
285 avi \
286 cdxaparse \
287 chart \
288 cutter \
289 debug \
290 deinterlace \
291 effectv \
292 festival \
293 filter \
294 flx \
295 goom \
296 id3 \
297 intfloat \
298 law \
299 level \
300 median \
301 mixmatrix \
302 mpeg1sys \
303 mpeg1videoparse \
304 mpeg2sub \
305 mpegaudio \
306 mpegaudioparse \
307 mpegstream \
308 monoscope \
309 oneton \
310 overlay \
311 passthrough \
312 playondemand \
313 qtdemux \
314 realmedia \
315 rtjpeg \
316 rtp \
317 silence \
318 sine \
319 smooth \
320 smpte \
321 spectrum \
322 speed \
323 stereo \
324 synaesthesia \
325 tcp \
326 typefind \
327 udp \
328 vbidec \
329 videocrop \
330 videodrop \
331 videoflip \
332 videofilter \
333 videoscale \
334 videotestsrc \
335 volenv \
336 volume \
337 wavenc \
338 wavparse \
339 y4m"
341 dnl see if we can build C++ plug-ins
342 if test "x$HAVE_CXX" = "xyes"; then
343 GST_PLUGINS_ALL="$GST_PLUGINS_ALL \
344 modplug"
345 else
346 AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
347 fi
349 AC_SUBST(GST_PLUGINS_ALL)
351 GST_PLUGINS_SELECTED=""
353 AC_ARG_WITH(plugins,
354 AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
355 [for i in `echo $withval | tr , ' '`; do
356 if test -n `echo $i | grep $GST_PLUGINS_ALL`; then
357 GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
358 else
359 echo "plug-in $i not recognized, ignoring..."
360 fi
361 done],
362 [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
364 AC_SUBST(GST_PLUGINS_SELECTED)
366 dnl ==========================================================================
367 dnl ============================= sys plug-ins ================================
368 dnl ==========================================================================
370 dnl *** DXR3 card ***
371 translit(dnm, m, l) AM_CONDITIONAL(USE_DXR3, true)
372 GST_CHECK_FEATURE(DXR3, [DXR3 hardware MPEG DVD decoder],
373 dxr3videosink dxr3audiosink dxr3spusink, [
374 HAVE_DXR3=yes
375 AC_CHECK_HEADER(linux/em8300.h, ,
376 [ AC_MSG_WARN([DXR3/em8300 header file not found]) &&
377 HAVE_DXR3=no ] )
378 AC_CHECK_HEADER(linux/soundcard.h, ,
379 [ AC_MSG_WARN([Generic sound header file not found]) &&
380 HAVE_DXR3=no ] )
381 ])
383 dnl *** OSS audio ***
384 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
385 GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
386 AC_CHECK_HEADER(sys/soundcard.h, HAVE_OSS="yes", HAVE_OSS="no")
387 ])
389 dnl *** QuickCam ***
390 translit(dnm, m, l) AM_CONDITIONAL(USE_QCAM, true)
391 GST_CHECK_FEATURE(QCAM, [QuickCam], qcamsrc, [
392 if test "x$HAVE_CPU_I386" != "xyes";
393 then
394 HAVE_QCAM="no"
395 else
396 AC_CHECK_HEADER(sys/io.h, HAVE_QCAM="yes", HAVE_QCAM="no")
397 fi
398 if test "x$HAVE_QCAM" != "xyes";
399 then
400 AC_MSG_WARN([QuickCam only works on i386-linux])
401 fi
402 ])
404 dnl *** Video 4 Linux ***
405 dnl for information about the header/define, see sys/v4l/gstv4lelement.h
406 translit(dnm, m, l) AM_CONDITIONAL(USE_V4L, true)
407 GST_CHECK_FEATURE(V4L, [Video 4 Linux], v4lsrc v4lmjpegsrc v4lmjpegsink, [
408 AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_V4L="yes", HAVE_V4L="no", [
409 #include <sys/types.h>
410 #define _LINUX_TIME_H
411 #include <linux/videodev.h>
412 ])
413 ])
415 dnl *** Video 4 Linux 2***
416 dnl for information about the header/define, see sys/v4l2/gstv4l2element.h
417 translit(dnm, m, l) AM_CONDITIONAL(USE_V4L2, true)
418 GST_CHECK_FEATURE(V4L2, [Video 4 Linux 2], v4l2src, [
419 AC_MSG_CHECKING([Checking for uptodate v4l2 installation])
420 AC_TRY_COMPILE([
421 #include <sys/types.h>
422 #include <linux/types.h>
423 #define _LINUX_TIME_H
424 #include <linux/videodev2.h>
425 #if defined(V4L2_MAJOR_VERSION) || defined(V4L2_MINOR_VERSION)
426 #error too early v4l2 version or no v4l2 at all
427 #endif
428 ], [
429 return 0;
430 ], [ HAVE_V4L2="yes" && AC_MSG_RESULT(yes)],
431 [ HAVE_V4L2="no" && AC_MSG_RESULT(no) &&
432 AC_CHECK_HEADER(linux/videodev2.h,
433 [ AC_MSG_WARN([video4linux2 headers were found, but they're old. Please update v4l2 to compile the v4l2 plugins])],
434 [ AC_MSG_WARN([video4linux2 was not found])])])
435 ])
437 dnl *** Video CD ***
438 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
439 GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
440 AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
441 ])
443 dnl *** CDROM Audio ***
444 translit(dnm, m, l) AM_CONDITIONAL(USE_CDROM, true)
445 GST_CHECK_FEATURE(CDROM, [CDROM Audio], cdrom, [
446 AC_CHECK_HEADERS(linux/cdrom.h) dnl linux
447 AC_CHECK_HEADERS(sys/cdio.h) dnl almost everything else
448 dnl AC_CHECK_HEADERS(dmedia/cdaudio.h) dnl irix
450 if test "${ac_cv_header_linux_cdrom_h}" = "yes" || test "${ac_cv_header_sys_cdio_h}" = "yes" || test "${ac_cv_header_dmedia_cdaudio_h}" = "yes"; then
451 case "$host" in
452 *-sun-* | *-*-linux*)
453 AC_DEFINE(HAVE_CDROM_SOLARIS,, [Define if cdrom access is in Solaris style])
454 ;;
455 *-*-freebsd*)
456 AC_DEFINE(HAVE_CDROM_BSD,, [Define if cdrom access is in BSD style])
457 ;;
458 *-*-netbsd* | *-*-openbsd*)
459 AC_DEFINE(HAVE_CDROM_BSD,, [Define if cdrom access is in BSD style])
460 AC_DEFINE(HAVE_CDROM_BSD_NETBSD,, [Define if cdrom access uses NetBSD variant])
461 ;;
462 *-*darwin*)
463 AC_DEFINE(HAVE_CDROM_BSD,, [Define if cdrom access is in BSD style])
464 AC_DEFINE(HAVE_CDROM_BSD_DARWIN,, [Define if cdrom access uses Darwin variant])
465 ;;
466 dnl *-irix-*)
467 dnl AC_DEFINE(HAVE_CDROM_IRIX,, [Define if cdrom access is in Irix DMedia style])
468 dnl ;;
469 esac
471 HAVE_CDROM="yes"
472 else
473 HAVE_CDROM="no"
474 fi
475 ])
477 dnl *** X check ***
478 translit(dnm, m, l) AM_CONDITIONAL(USE_XFREE, true)
479 GST_CHECK_FEATURE(XFREE, [X11 XFree86],
480 [ximagesink xvideosink], [
481 if test "$X_CFLAGS" = "-DX_DISPLAY_MISSING"; then
482 HAVE_XFREE=no
483 else
484 HAVE_XFREE=yes
485 fi
486 ])
488 dnl *** XVideo ***
489 dnl Look for the PIC library first, Debian requires it.
490 dnl Check debian-devel archives for gory details.
491 dnl 20020110:
492 dnl At the moment XFree86 doesn't distribute shared libXv due
493 dnl to unstable API. On many platforms you CAN NOT link a shared
494 dnl lib to a static non-PIC lib. This is what the xvideo GStreamer
495 dnl plug-in wants to do. So Debian distributes a PIC compiled
496 dnl version of the static lib for plug-ins to link to when it is
497 dnl inappropriate to link the main application to libXv directly.
498 dnl FIXME: add check if this platform can support linking to a
499 dnl non-PIC libXv, if not then don not use Xv.
500 dnl FIXME: perhaps warn user if they have a shared libXv since
501 dnl this is an error until XFree86 starts shipping one
503 dnl Check for Xv extension
504 translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
505 GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions],
506 [xvimagesink xvideosink], [
507 if test x$HAVE_XFREE = xyes; then
508 AC_CHECK_LIB(Xv_pic, XvQueryExtension,
509 HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
510 $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
512 if test x$HAVE_XVIDEO = xyes; then
513 XVIDEO_LIBS="-lXv_pic -lXext"
514 AC_SUBST(XVIDEO_LIBS)
515 else
516 dnl try again using something else if we didn't find it first
517 if test x$HAVE_XVIDEO = xno; then
518 AC_CHECK_LIB(Xv, XvQueryExtension,
519 HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
520 $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
522 if test x$HAVE_XVIDEO = xyes; then
523 XVIDEO_LIBS="-lXv -lXext"
524 AC_SUBST(XVIDEO_LIBS)
525 fi
526 fi
527 fi
528 fi
529 ])
531 dnl check for Shm
532 translit(dnm, m, l) AM_CONDITIONAL(USE_SHM, true)
533 GST_CHECK_FEATURE(SHM, [Shared Memory], ximage with shm, [
534 AC_CHECK_HEADER(sys/shm.h, HAVE_SHM="yes", HAVE_SHM="no")
535 ])
537 dnl Next, check for the optional libraries:
538 dnl These are all libraries used in building plug-ins
539 dnl ================================================
540 dnl let's try and sort them alphabetically, shall we ?
542 if test "x$BUILD_EXTERNAL" = "xyes"; then
544 AC_MSG_NOTICE(Checking for plug-in dependency libraries)
546 dnl *** a52dec ***
547 translit(dnm, m, l) AM_CONDITIONAL(USE_A52DEC, true)
548 GST_CHECK_FEATURE(A52DEC, [a52dec], a52dec, [
549 AC_CHECK_A52DEC(HAVE_A52DEC=yes, HAVE_A52DEC=no)
550 ])
552 dnl *** aalib ***
553 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
554 GST_CHECK_FEATURE(AALIB, [aasink plug-in], aasink, [
555 AM_PATH_AALIB(, HAVE_AALIB=yes, HAVE_AALIB=no)
556 AS_SCRUB_INCLUDE(AALIB_CFLAGS)
557 ])
559 dnl *** alsa ***
560 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
561 GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
562 AM_PATH_ALSA(0.9.0, HAVE_ALSA=yes, HAVE_ALSA=no)
563 ])
565 dnl *** arts ***
566 dnl if mcopidl can't be found there's no use in compiling it
567 AC_CHECK_PROG(MCOPIDL, mcopidl, yes, no)
568 if test "x$HAVE_MCOPIDL" = "xno";
569 then
570 USE_ARTS=no
571 fi
573 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTS, true)
574 GST_CHECK_FEATURE(ARTS, [arts plug-ins], arts, [
575 AM_PATH_ARTS(, HAVE_ARTS=yes, HAVE_ARTS=no)
576 ])
578 dnl *** artsc ***
579 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTSC, true)
580 GST_CHECK_FEATURE(ARTSC, [artsd plug-ins], artsdsink, [
581 GST_CHECK_ARTSC()
582 ])
584 dnl *** audiofile ***
585 dnl this check uses the GST_CHECK_CONFIGPROG macro
586 translit(dnm, m, l) AM_CONDITIONAL(USE_AUDIOFILE, true)
587 GST_CHECK_FEATURE(AUDIOFILE, [audiofile], afsink afsrc, [
588 translit(dnm, m, l) AC_SUBST(AUDIOFILE_LIBS)
589 translit(dnm, m, l) AC_SUBST(AUDIOFILE_CFLAGS)
590 dnl check with pkg-config first
591 PKG_CHECK_MODULES(AUDIOFILE, audiofile, HAVE_AUDIOFILE="yes", HAVE_AUDIOFILE="no")
592 if test "x$HAVE_AUDIOFILE" = "xno"; then
593 GST_CHECK_CONFIGPROG(AUDIOFILE, audiofile-config)
594 dnl we need this function
595 AC_CHECK_LIB(audiofile, afOpenVirtualFile, , HAVE_AUDIOFILE="no")
596 fi])
598 dnl *** CDParanoia ***
599 translit(dnm, m, l) AM_CONDITIONAL(USE_CDPARANOIA, true)
600 GST_CHECK_FEATURE(CDPARANOIA, [CDParanoia], cdparanoia, [
601 GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface,
602 cdda_open, -lm,
603 cdda_interface.h,
604 CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia"
605 HEADER_DIR="no"
606 FOUND_CDPARANOIA="yes")
607 if test "x$FOUND_CDPARANOIA" != "xyes";
608 then
609 GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface,
610 cdda_open, -lm,
611 cdda/cdda_interface.h,
612 CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia"
613 HEADER_DIR="yes"
614 FOUND_CDPARANOIA="yes")
615 fi
616 if test "x$HEADER_DIR" = "xyes";
617 then
618 AC_DEFINE_UNQUOTED(CDPARANOIA_HEADERS_IN_DIR, ,
619 defined if cdda headers are in a cdda/ directory)
620 fi
621 AC_SUBST(CDPARANOIA_LIBS)
622 ])
623 dnl FIXME : add second check somehow if that is necessary
624 dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
625 dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
627 dnl *** DIVX ***
628 translit(dnm, m, l) AM_CONDITIONAL(USE_DIVX, true)
629 GST_CHECK_FEATURE(DIVX, [divx plugins], divx, [
630 HAVE_DIVX=yes
631 AC_CHECK_HEADER(encore2.h, ,
632 [ AC_MSG_WARN([Divx4linux encore headers not found]) &&
633 HAVE_DIVX=no ] )
634 if [ test x$HAVE_DIVX = xyes ]; then
635 AC_MSG_CHECKING([Checking for valid divx4linux encore version])
636 AC_TRY_COMPILE([
637 #include <encore2.h>
638 #if ENCORE_VERSION != 20021024
639 #error Wrong version of divx encore libraries
640 #endif
641 ], [
642 return 0;
643 ], [ HAVE_DIVX=yes && AC_MSG_RESULT(yes)],
644 [ HAVE_DIVX=no && AC_MSG_RESULT(no) &&
645 AC_MSG_WARN([Wrong version of divx4linux installed]) ])
646 fi
647 if [ test x$HAVE_DIVX = xyes ]; then
648 AC_CHECK_HEADER(decore.h, ,
649 [ AC_MSG_WARN([Divx4linux decoder headers not found]) &&
650 HAVE_DIVX=no ] )
651 fi
652 if [ test x$HAVE_DIVX = xyes ]; then
653 AC_MSG_CHECKING([Checking for valid divx4linux decore version])
654 AC_TRY_COMPILE([
655 #include <decore.h>
656 #if DECORE_VERSION != 20021112
657 #error Wrong version of divx decore libraries
658 #endif
659 ], [
660 return 0;
661 ], [ HAVE_DIVX=yes && AC_MSG_RESULT(yes)],
662 [ HAVE_DIVX=no && AC_MSG_RESULT(no) &&
663 AC_MSG_WARN([Wrong version of divx4linux installed]) ])
664 fi
665 LIBS="-lm"
666 if test x$HAVE_DIVX = xyes; then
667 AC_CHECK_LIB(divxencore, encore, ,
668 [ AC_MSG_WARN([Divx4linux encore libs not found]) &&
669 HAVE_DIVX=no ] )
670 fi
671 if test x$HAVE_DIVX = xyes; then
672 AC_CHECK_LIB(divxdecore, decore, ,
673 [ AC_MSG_WARN([Divx4linux decore libs not found]) &&
674 HAVE_DIVX=no ] )
675 fi
676 if test x$HAVE_DIVX = xyes; then
677 DIVXENC_LIBS="-ldivxencore -lm"
678 DIVXDEC_LIBS="-ldivxdecore -lm"
679 AC_SUBST(DIVXENC_LIBS)
680 AC_SUBST(DIVXDEC_LIBS)
681 fi
682 ])
684 dnl *** dvdread ***
685 translit(dnm, m, l) AM_CONDITIONAL(USE_DVDREAD, true)
686 GST_CHECK_FEATURE(DVDREAD, [dvdread library], dvdreadsrc, [
687 GST_CHECK_LIBHEADER(DVDREAD, dvdread, DVDOpen, , dvdread/dvd_reader.h, DVDREAD_LIBS="-ldvdread")
688 AC_SUBST(DVDREAD_LIBS)
689 ])
691 dnl *** dvdnav ***
692 translit(dnm, m, l) AM_CONDITIONAL(USE_DVDNAV, true)
693 GST_CHECK_FEATURE(DVDNAV, [dvdnav library], dvdnavsrc, [
694 translit(dnm, m, l) AC_SUBST(DVDNAV_LIBS)
695 translit(dnm, m, l) AC_SUBST(DVDNAV_CFLAGS)
696 GST_CHECK_CONFIGPROG(DVDNAV, dvdnav-config)
697 if test x"$HAVE_DVDNAV" = x"yes"; then
698 dnl check version
699 DVDNAV_VERSION=`dvdnav-config --version|head -n 1|sed 's/^.*) //'|sed 's/ (.*)//'`
700 DVDNAV_MAJOR=`echo $DVDNAV_VERSION | cut -d. -f1 | sed s/[a-zA-Z\-].*//g`
701 DVDNAV_MINOR=`echo $DVDNAV_VERSION | cut -d. -f2 | sed s/[a-zA-Z\-].*//g`
702 DVDNAV_MICRO=`echo $DVDNAV_VERSION | cut -d. -f3 | sed s/[a-zA-Z\-].*//g`
703 if [[ "$DVDNAV_MAJOR" -eq "0" ]] && \
704 [[ "$DVDNAV_MINOR" -lt "1" ]]; then
705 AC_MSG_WARN([libdvdnav >= 0.1.7 is required, you have $DVDNAV_VERSION])
706 HAVE_DVDNAV="no"
707 elif [[ "$DVDNAV_MAJOR" -eq "0" ]] && \
708 [[ "$DVDNAV_MINOR" -eq "1" ]] && \
709 [[ "$DVDNAV_MICRO" -lt "7" ]]; then
710 AC_MSG_WARN([libdvdnav >= 0.1.7 is required, you have $DVDNAV_VERSION])
711 HAVE_DVDNAV="no"
712 fi
713 fi
714 AS_SCRUB_INCLUDE(DVDNAV_CFLAGS)
715 ])
717 dnl *** MAS ***
718 translit(dnm, m, l) AM_CONDITIONAL(USE_MAS, true)
719 GST_CHECK_FEATURE(MAS, [mas library], massink, [
720 translit(dnm, m, l) AC_SUBST(MAS_LIBS)
721 translit(dnm, m, l) AC_SUBST(MAS_CFLAGS)
722 GST_CHECK_CONFIGPROG(MAS, mas-config)
723 AS_SCRUB_INCLUDE(MAS_CFLAGS)
724 ])
726 dnl **** ESound ****
727 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
728 GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink esdmon, [
729 AM_PATH_ESD(0.2.12, HAVE_ESD=yes, HAVE_ESD=no)
730 AS_SCRUB_INCLUDE(ESD_CFLAGS)
731 ])
733 dnl **** festival ****
734 dnl translit(dnm, m, l) AM_CONDITIONAL(USE_FESTIVAL, true)
735 dnl GST_CHECK_FEATURE(FESTIVAL, [festival plug-ins], festivalsrc, [
736 dnl NOTE: just using local net connection now, add this lib check
737 dnl in the future if needed
738 dnl AC_LANG_PUSH(C++)
739 dnl dnl FIXME: took out func to check for
740 dnl dnl This check puts festival_tidy_up in extern "C".
741 dnl dnl But, at least on Debian as of 20020110, it is compiled with name
742 dnl dnl mangling C++ nonsense and symbols can't resolve
743 dnl dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, festival_tidy_up, , festival/festival.h, FESTIVAL_LIBS="-lFestival")
744 dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, , , festival/festival.h, FESTIVAL_LIBS="-lFestival")
745 dnl AC_LANG_POP(C++)
746 dnl AC_SUBST(FESTIVAL_LIBS)
747 dnl HAVE_FESTIVAL=yes
748 dnl])
750 dnl *** FLAC ***
751 translit(dnm, m, l) AM_CONDITIONAL(USE_FLAC, true)
752 GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flacenc flacdec, [
753 GST_CHECK_LIBHEADER(FLAC, FLAC, FLAC__seekable_stream_encoder_new, -lm, FLAC/all.h, FLAC_LIBS="-lFLAC")
754 AC_SUBST(FLAC_LIBS)
755 ])
757 dnl *** FFMPEG ***
758 translit(dnm, m, l) AM_CONDITIONAL(USE_FFMPEG, true)
759 GST_CHECK_FEATURE(FFMPEG, [ffmpeg plug-ins], ffmpeg, [
760 # only slurp in the case where we are in CVS mode;
761 # prerelease and release should get it disted
762 if test "x$GST_PLUGINS_VERSION_NANO" = x1; then
763 AC_MSG_NOTICE(slurping FFmpeg CVS source)
764 AS_SLURP_FFMPEG(gst-libs/ext/ffmpeg, 2003-10-26 10:00 GMT,
765 HAVE_FFMPEG=yes, HAVE_FFMPEG=no)
766 else
767 AC_MSG_NOTICE(FFmpeg CVS code should be included already)
768 HAVE_FFMPEG=yes
769 fi
770 # we only bother with uninstalled (included) ffmpeg for now
771 AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED, 1,
772 [defined if we use uninstalled ffmpeg])
773 ])
775 dnl *** GDK pixbuf ***
776 translit(dnm, m, l) AM_CONDITIONAL(USE_GDK_PIXBUF, true)
777 GST_CHECK_FEATURE(GDK_PIXBUF, [GDK pixbuf], gdkpixbufsrc, [
778 if test $HAVE_GTK_22 = "yes"; then HAVE_GDK_PIXBUF=yes; fi;
779 ])
781 dnl *** Gnome VFS ***
782 translit(dnm, m, l) AM_CONDITIONAL(USE_GNOME_VFS, true)
783 GST_CHECK_FEATURE(GNOME_VFS, [Gnome VFS], gnomevfssrc, [
784 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0, HAVE_GNOME_VFS="yes", HAVE_GNOME_VFS="no")
785 AC_SUBST(GNOME_VFS_CFLAGS)
786 AC_SUBST(GNOME_VFS_LIBS)
787 ])
789 dnl *** gsm ***
790 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
791 GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
792 GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
793 if test $HAVE_GSM != "yes"; then
794 GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
795 if test $HAVE_GSM = "yes"; then
796 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
797 fi
798 fi
799 AC_SUBST(GSM_LIBS)
800 ])
802 dnl *** Hermes ***
803 translit(dnm, m, l) AM_CONDITIONAL(USE_HERMES, true)
804 GST_CHECK_FEATURE(HERMES, [Hermes library], colorspace, [
805 GST_CHECK_LIBHEADER(HERMES, Hermes, Hermes_ConverterInstance, , Hermes/Hermes.h, HERMES_LIBS="-lHermes")
806 ], AC_SUBST(HERMES_LIBS))
808 dnl *** http ***
809 dnl translit(dnm, m, l) AM_CONDITIONAL(USE_HTTP, true)
810 dnl GST_CHECK_FEATURE(HTTP, [http plug-ins], gsthttpsrc, [
811 dnl dnl FIXME: need to check for header
812 dnl GHTTP_LIBS=
813 dnl GST_HTTPSRC_GET_TYPE=
814 dnl if test x$USE_GLIB2 = xyes; then
815 dnl AC_MSG_WARN(ghttp disabled for glib2.0)
816 dnl else
817 dnl AC_CHECK_LIB(ghttp, ghttp_request_new,
818 dnl [HTTP_LIBS="-lghttp"
819 dnl GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
820 dnl HAVE_HTTP=yes
821 dnl ], :, $LIBS)
822 dnl fi
823 dnl AC_SUBST(HTTP_LIBS)
824 dnl AC_SUBST(GST_HTTPSRC_GET_TYPE)
825 dnl ])
827 dnl *** ivorbis ***
828 dnl AM_PATH_IVORBIS only takes two options
829 translit(dnm, m, l) AM_CONDITIONAL(USE_IVORBIS, true)
830 GST_CHECK_FEATURE(IVORBIS, [integer vorbis plug-in], ivorbisdec, [
831 IVORBIS_LIBS=
832 IVORBIS_CFLAGS=
833 AC_CHECK_LIB(vorbisidec, vorbis_block_init,
834 [IVORBIS_LIBS=-lvorbisidec
835 HAVE_IVORBIS=yes],
836 HAVE_IVORBIS=no)
837 AC_SUBST(IVORBIS_LIBS)
838 AC_SUBST(IVORBIS_CFLAGS)
839 ])
841 dnl *** Jack ***
842 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
843 GST_CHECK_FEATURE(JACK, Jack, jack, [
844 PKG_CHECK_MODULES(JACK, jack >= 0.29.0, HAVE_JACK="yes", HAVE_JACK="no")
845 AC_SUBST(JACK_CFLAGS)
846 AC_SUBST(JACK_LIBS)
847 ])
849 dnl *** jpeg ***
850 dnl FIXME: we could use header checks here as well IMO
851 translit(dnm, m, l) AM_CONDITIONAL(USE_JPEG, true)
852 GST_CHECK_FEATURE(JPEG, [jpeg], jpegenc jpegdec, [
853 AC_ARG_WITH(jpeg-mmx,
854 [ --with-jpeg-mmx, path to MMX'ified JPEG library])
855 OLD_LIBS="$LIBS"
856 if test x$with_jpeg_mmx != x; then
857 LIBS="$LIBS -L$with_jpeg_mmx"
858 fi
859 AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
860 JPEG_LIBS="$LIBS -ljpeg-mmx"
861 LIBS="$OLD_LIBS"
862 if test x$HAVE_JPEG != xyes; then
863 AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
864 JPEG_LIBS="-ljpeg"
865 fi
866 AC_SUBST(JPEG_LIBS)
867 ])
869 dnl *** ladspa ***
870 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
871 GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
872 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
873 ])
875 dnl *** lame ***
876 translit(dnm, m, l) AM_CONDITIONAL(USE_LAME, true)
877 GST_CHECK_FEATURE(LAME, [lame mp3 encoder library], lame, [
878 GST_CHECK_LIBHEADER(LAME, mp3lame, lame_init, -lm, lame/lame.h, HAVE_LAME="yes" LAME_LIBS="-lmp3lame")
879 ])
880 AC_SUBST(LAME_LIBS)
882 dnl *** libcolorspace ***
883 translit(dnm, m, l) AM_CONDITIONAL(USE_LCS, true)
884 GST_CHECK_FEATURE(LCS, Lcs, lcs, [
885 PKG_CHECK_MODULES(LCS, lcs, HAVE_LCS="yes", HAVE_LCS="no")
886 AC_SUBST(LCS_CFLAGS)
887 AC_SUBST(LCS_LIBS)
888 ])
890 dnl *** libdv ***
891 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBDV, true)
892 GST_CHECK_FEATURE(LIBDV, [libdv DV/video decoder], dvdec, [
893 PKG_CHECK_MODULES(LIBDV, libdv >= 0.98, HAVE_LIBDV="yes", HAVE_LIBDV="no")
894 AC_SUBST(LIBDV_CFLAGS)
895 AC_SUBST(LIBDV_LIBS)
896 ])
898 dnl *** libfame ***
899 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBFAME, true)
900 GST_CHECK_FEATURE(LIBFAME, [libfame MPEG1/4 encoder], libfame, [
901 AM_PATH_LIBFAME(0.9.0, HAVE_LIBFAME="yes", HAVE_LIBFAME="no")
902 AC_SUBST(LIBFAME_CFLAGS)
903 AC_SUBST(LIBFAME_LIBS)
904 ])
906 dnl *** libpng ***
907 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBPNG, true)
908 GST_CHECK_FEATURE(LIBPNG, [libpng PNG encoder], pngenc, [
909 PKG_CHECK_MODULES(LIBPNG, libpng12, HAVE_LIBPNG="yes", HAVE_LIBPNG="no")
910 AC_SUBST(LIBPNG_CFLAGS)
911 AC_SUBST(LIBPNG_LIBS)
912 ])
915 dnl *** mad ***
916 dnl FIXME: we could use header checks here as well IMO
917 translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true)
918 GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
919 dnl check with pkg-config first
920 PKG_CHECK_MODULES(MAD, mad id3tag, HAVE_MAD="yes", HAVE_MAD="no")
921 if test "x$HAVE_MAD" = "xno"; then
922 dnl fall back to oldskool detection
923 AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad")
924 if test "x$HAVE_MAD" = "xyes"; then
925 # installed with mad >= 0.14
926 HAVE_MAD="no"
927 save_libs=$LIBS
928 LIBS="-lz"
929 AC_CHECK_LIB(id3tag, id3_tag_query, HAVE_MAD="yes" MAD_LIBS="$MAD_LIBS -lid3tag")
930 LIBS=$save_LIBS
931 fi
932 fi
933 ])
934 AC_SUBST(MAD_LIBS)
936 dnl *** matroska ***
937 translit(dnm, m, l) AM_CONDITIONAL(USE_MATROSKA, true)
938 GST_CHECK_FEATURE(MATROSKA, [matroska muxer/demuxer], matroska muxer/demuxer, [
939 PATH_EBML([HAVE_MATROSKA=yes], [HAVE_MATROSKA=no])
940 if test x$HAVE_MATROSKA = xyes; then
941 PATH_MATROSKA(0.4.4, [HAVE_MATROSKA=yes], [HAVE_MATROSKA=no])
942 fi
943 ])
945 dnl *** mikmod ***
946 translit(dnm, m, l) AM_CONDITIONAL(USE_MIKMOD, true)
947 GST_CHECK_FEATURE(MIKMOD, [mikmod plug-in], mikmod, [
948 AM_PATH_LIBMIKMOD(, HAVE_MIKMOD=yes, HAVE_MIKMOD=no)
949 AC_SUBST(MIKMOD_LIBS, "$LIBMIKMOD_LIBS")
950 AC_SUBST(MIKMOD_CFLAGS, "$LIBMIKMODCFLAGS")
951 ])
953 dnl *** mpeg2dec ***
954 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2DEC, true)
955 GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
956 PKG_CHECK_MODULES(MPEG2DEC, libmpeg2 >= 0.3.1,
957 HAVE_MPEG2DEC="yes", HAVE_MPEG2DEC="no")
958 AC_SUBST(MPEG2DEC_CFLAGS)
959 AC_SUBST(MPEG2DEC_LIBS)
960 ])
962 dnl *** mplex ***
963 translit(dnm, m, l) AM_CONDITIONAL(USE_MPLEX, true)
964 GST_CHECK_FEATURE(MPLEX, [mplex], mplex, [HAVE_MPLEX=$HAVE_CXX])
966 dnl *** pango ***
967 translit(dnm, m, l) AM_CONDITIONAL(USE_PANGO, true)
968 GST_CHECK_FEATURE(PANGO, [pango], pango, [
969 PKG_CHECK_MODULES(PANGO, pango pangoft2,
970 HAVE_PANGO="yes", HAVE_PANGO="no")
971 AC_SUBST(PANGO_CFLAGS)
972 AC_SUBST(PANGO_LIBS)
973 ])
975 dnl *** raw1394 ***
976 translit(dnm, m, l) AM_CONDITIONAL(USE_RAW1394, true)
977 GST_CHECK_FEATURE(RAW1394, [raw1394 library], dv1394src, [
978 GST_CHECK_LIBHEADER(RAW1394, raw1394, raw1394_new_handle,, libraw1394/raw1394.h, RAW1394_LIBS="-lraw1394")
979 AC_SUBST(RAW1394_LIBS)
980 ])
982 dnl *** SDL ***
983 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
984 GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink, [
985 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
986 ])
988 dnl *** shout ***
989 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT, true)
990 GST_CHECK_FEATURE(SHOUT, [shout plug-in], icecastsend, [
991 GST_CHECK_LIBHEADER(SHOUT, shout, shout_init_connection,, shout/shout.h, SHOUT_LIBS="-lshout")
992 AC_SUBST(SHOUT_LIBS)
993 ])
995 dnl *** shout2 ***
996 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT2, true)
997 GST_CHECK_FEATURE(SHOUT2, [shout2 plug-in], shout2send, [
998 AM_PATH_SHOUT2(HAVE_SHOUT2=yes, HAVE_SHOUT2=no)
999 AC_SUBST(SHOUT2_CFLAGS)
1000 AC_SUBST(SHOUT2_LIBS)
1001 ])
1003 dnl *** sidplay ***
1004 translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
1005 GST_CHECK_FEATURE(SIDPLAY, [sidplay plug-in], sidplay, [
1006 GST_PATH_SIDPLAY()
1007 ])
1009 dnl *** smoothwave ***
1010 translit(dnm, m, l) AM_CONDITIONAL(USE_SMOOTHWAVE, true)
1011 GST_CHECK_FEATURE(SMOOTHWAVE, [smoothwave plug-in], smoothwave, [
1012 if test $HAVE_GTK = "yes"; then HAVE_SMOOTHWAVE=yes; fi;
1013 ])
1016 dnl *** snapshot ***
1017 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBPNG, true)
1018 GST_CHECK_FEATURE(LIBPNG, [snapshot plug-in], snapshot, [
1019 GST_CHECK_LIBHEADER(LIBPNG, png, png_read_info, -lz -lm, png.h, LIBPNG_LIBS="-lpng -lz -lm")
1020 AC_SUBST(LIBPNG_LIBS)
1021 ])
1023 dnl *** speex ***
1024 translit(dnm, m, l) AM_CONDITIONAL(USE_SPEEX, true)
1025 GST_CHECK_FEATURE(SPEEX, [speex plug-in], speex, [
1026 GST_CHECK_LIBHEADER(SPEEX, speex, speex_bits_init, , speex.h, HAVE_SPEEX="yes" SPEEX_LIBS="-lspeex")
1027 AC_SUBST(SPEEX_CFLAGS)
1028 AC_SUBST(SPEEX_LIBS)
1029 ])
1031 dnl *** sndfile ***
1032 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
1033 GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [
1034 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.0, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
1035 AC_SUBST(SNDFILE_CFLAGS)
1036 AC_SUBST(SNDFILE_LIBS)
1037 ])
1039 dnl *** swfdec ***
1040 translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
1041 GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
1042 PKG_CHECK_MODULES(SWFDEC, swfdec >= 0.1.3.1, HAVE_SWFDEC=yes, HAVE_SWFDEC=no)
1043 AC_SUBST(SWFDEC_CFLAGS)
1044 AC_SUBST(SWFDEC_LIBS)
1045 ])
1047 dnl *** tarkin ***
1048 dnl for now the sources are included in the plug-in
1049 dnl and should be moved to ext-libs/ perhaps
1050 translit(dnm, m, l) AM_CONDITIONAL(USE_TARKIN, true)
1051 GST_CHECK_FEATURE(TARKIN, [tarkinenc tarkindec], tarkin, [
1052 HAVE_TARKIN="yes"
1053 ])
1055 dnl *** vorbis ***
1056 dnl AM_PATH_VORBIS only takes two options
1057 translit(dnm, m, l) AM_CONDITIONAL(USE_VORBIS, true)
1058 GST_CHECK_FEATURE(VORBIS, [vorbis plug-in], vorbisenc vorbisdec, [
1059 XIPH_PATH_VORBIS(HAVE_VORBIS=yes, HAVE_VORBIS=no)
1060 AS_SCRUB_INCLUDE(VORBIS_CFLAGS)
1061 ])
1063 dnl *** XVID ***
1064 translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true)
1065 GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [
1066 HAVE_XVID=yes
1067 AC_CHECK_HEADER(xvid.h, ,
1068 [ AC_MSG_WARN([Xvid headers not found]) &&
1069 HAVE_XVID=no ] )
1070 LIBS="-lm"
1071 AC_CHECK_LIB(xvidcore, xvid_encore, ,
1072 [ AC_MSG_WARN([Xvid encore libs not found]) &&
1073 HAVE_XVID=no ] )
1074 AC_CHECK_LIB(xvidcore, xvid_decore, ,
1075 [ AC_MSG_WARN([Xvid decore libs not found]) &&
1076 HAVE_XVID=no ] )
1077 if test x$HAVE_XVID = xyes; then
1078 XVID_LIBS="-lxvidcore -lm"
1079 AC_SUBST(XVID_LIBS)
1080 fi
1081 ])
1084 fi dnl of EXT plugins
1086 dnl Check for atomic.h
1087 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
1088 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
1089 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
1090 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
1091 if test x$HAVE_ATOMIC_H = xyes; then
1092 AC_TRY_RUN([
1093 #include "asm/atomic.h"
1094 main() { atomic_t t; atomic_set(&t,0); atomic_inc(&t); atomic_add(1,&t);return 0;}
1095 ],, [
1096 # Not successful
1097 if test x$HAVE_ATOMIC_H = xyes; then
1098 AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
1099 fi
1100 HAVE_ATOMIC_H=no
1101 ], [
1102 # Cross compiling
1103 AC_MSG_RESULT(yes)
1104 AC_MSG_WARN(Can't check properly for atomic reference counting. Assuming OK.)
1105 ])
1106 fi
1109 dnl ######################################################################
1110 dnl # Check command line parameters, and set shell variables accordingly #
1111 dnl ######################################################################
1113 AC_ARG_ENABLE(libmmx,
1114 AC_HELP_STRING([--enable-libmmx],[use libmmx, if available]),
1115 [case "${enableval}" in
1116 yes) USE_LIBMMX=$HAVE_LIBMMX ;;
1117 no) USE_LIBMMX=no ;;
1118 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
1119 esac],
1120 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
1122 AC_ARG_ENABLE(atomic,
1123 AC_HELP_STRING([--enable-atomic],[use atomic reference counting header]),
1124 [case "${enableval}" in
1125 yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
1126 noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
1127 no) USE_ATOMIC_H=no;;
1128 *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
1129 esac],
1130 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
1132 AC_ARG_ENABLE(profiling,
1133 AC_HELP_STRING([--enable-profiling],
1134 [-pg to compiler commandline, for profiling]),
1135 [case "${enableval}" in
1136 yes) USE_PROFILING=yes ;;
1137 no) UES_PROFILING=no ;;
1138 *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
1139 esac],
1140 [USE_PROFILING=no]) dnl Default value
1142 AC_ARG_ENABLE(tests,
1143 AC_HELP_STRING([--disable-tests],[disable building test apps]),
1144 [case "${enableval}" in
1145 yes) BUILD_TESTS=yes ;;
1146 no) BUILD_TESTS=no ;;
1147 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
1148 esac],
1149 [BUILD_TESTS=yes]) dnl Default value
1151 AC_ARG_ENABLE(examples,
1152 AC_HELP_STRING([--disable-examples],[disable building examples]),
1153 [case "${enableval}" in
1154 yes) BUILD_EXAMPLES=yes ;;
1155 no) BUILD_EXAMPLES=no ;;
1156 *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
1157 esac],
1158 [BUILD_EXAMPLES=yes]) dnl Default value
1160 dnl seeking needs freetype, so check for it here
1161 AC_CHECK_FT2(2.0.9,HAVE_FT2=yes,HAVE_FT2=no)
1162 dnl make the HAVE_FT2 variable available to automake and Makefile.am
1163 AM_CONDITIONAL(HAVE_FT2, test "x$HAVE_FT2" = "xyes")
1164 AC_SUBST(FT2_CFLAGS)
1165 AC_SUBST(FT2_LIBS)
1167 dnl ################################################
1168 dnl # Set defines according to variables set above #
1169 dnl ################################################
1172 if test "x$USE_LIBMMX" = xyes; then
1173 AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
1174 fi
1176 if test "x$USE_ATOMIC_H" = xyes; then
1177 AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
1178 fi
1180 # do not use deprecated stuff
1181 GST_CFLAGS="$GST_CFLAGS -DGST_DISABLE_DEPRECATED"
1183 if test "x$USE_DEBUG" = xyes; then
1184 GST_CFLAGS="$GST_CFLAGS -g"
1185 fi
1187 dnl #############################
1188 dnl # Set automake conditionals #
1189 dnl #############################
1191 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
1192 dnl HAVE_ and it is likely to be easier to stick with the old name
1193 AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes")
1194 AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes")
1195 AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes")
1196 AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes")
1197 AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes")
1198 AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
1200 AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
1202 AM_CONDITIONAL(EXPERIMENTAL, test "$EXPERIMENTAL" = "$xyes")
1203 AM_CONDITIONAL(BROKEN, test "$BROKEN" = "$xyes")
1205 AM_CONDITIONAL(HAVE_NASM, test "x$HAVE_NASM" = "xyes")
1206 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
1207 AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
1208 AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes")
1209 AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes")
1210 AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes")
1211 AM_CONDITIONAL(BUILD_PLUGIN_DOCS, test "x$BUILD_PLUGIN_DOCS" = "xyes")
1212 AM_CONDITIONAL(HAVE_FIG2DEV_PNG, $HAVE_FIG2DEV_PNG)
1213 AM_CONDITIONAL(HAVE_FIG2DEV_PDF, $HAVE_FIG2DEV_PDF)
1214 AM_CONDITIONAL(HAVE_RAW1394, test "x$HAVE_RAW1394" = "xyes")
1216 dnl prefer internal headers to already installed ones
1217 GST_CFLAGS="-I\$(top_srcdir)/gst-libs $GST_CFLAGS $GST_ERROR"
1219 AC_SUBST(GST_LIBS)
1220 AC_SUBST(GST_CFLAGS)
1222 dnl ###########################
1223 dnl # Configure external libs #
1224 dnl ###########################
1225 if test "x$HAVE_FFMPEG" = xyes; then
1226 AC_CONFIG_SUBDIRS(gst-libs/ext/ffmpeg/ffmpeg)
1227 fi
1229 dnl ############################
1230 dnl # Set up some more defines #
1231 dnl ############################
1233 dnl set license and copyright notice
1234 AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
1235 AC_DEFINE(GST_COPYRIGHT, "(c) 1999-2003 The GStreamer Team", [copyright message in plugins])
1236 dnl package name in plugins
1237 AC_ARG_WITH(package-name,
1238 AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
1239 [case "${withval}" in
1240 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
1241 no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
1242 *) GST_PACKAGE="${withval}" ;;
1243 esac],
1244 [GST_PACKAGE="Gstreamer"]) dnl Default value
1245 AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
1246 AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
1247 dnl package origin URL
1248 AC_ARG_WITH(package-origin,
1249 AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]),
1250 [case "${withval}" in
1251 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
1252 no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
1253 *) GST_ORIGIN="${withval}" ;;
1254 esac],
1255 [GST_ORIGIN="http://gstreamer.net"]) dnl Default value
1256 AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
1257 AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
1259 dnl #########################
1260 dnl # Make the output files #
1261 dnl #########################
1263 AC_CONFIG_FILES(
1264 Makefile
1265 pkgconfig/gstreamer-libs.pc
1266 pkgconfig/gstreamer-libs-uninstalled.pc
1267 pkgconfig/gstreamer-play.pc
1268 pkgconfig/gstreamer-play-uninstalled.pc
1269 pkgconfig/gstreamer-interfaces.pc
1270 pkgconfig/gstreamer-interfaces-uninstalled.pc
1271 gst-libs/gst/gconf/gstreamer-gconf.pc
1272 gst-libs/gst/gconf/gstreamer-gconf-uninstalled.pc
1273 gst-plugins.spec
1274 gst/Makefile
1275 gst/ac3parse/Makefile
1276 gst/adder/Makefile
1277 gst/audioconvert/Makefile
1278 gst/audioscale/Makefile
1279 gst/auparse/Makefile
1280 gst/avi/Makefile
1281 gst/asfdemux/Makefile
1282 gst/cdxaparse/Makefile
1283 gst/chart/Makefile
1284 gst/cutter/Makefile
1285 gst/debug/Makefile
1286 gst/deinterlace/Makefile
1287 gst/effectv/Makefile
1288 gst/festival/Makefile
1289 gst/filter/Makefile
1290 gst/flx/Makefile
1291 gst/goom/Makefile
1292 gst/id3/Makefile
1293 gst/intfloat/Makefile
1294 gst/law/Makefile
1295 gst/level/Makefile
1296 gst/median/Makefile
1297 gst/mixmatrix/Makefile
1298 gst/mpeg1sys/Makefile
1299 gst/mpeg1videoparse/Makefile
1300 gst/mpeg2sub/Makefile
1301 gst/mpegaudio/Makefile
1302 gst/mpegaudioparse/Makefile
1303 gst/mpegstream/Makefile
1304 gst/modplug/Makefile
1305 gst/modplug/libmodplug/Makefile
1306 gst/monoscope/Makefile
1307 gst/oneton/Makefile
1308 gst/overlay/Makefile
1309 gst/passthrough/Makefile
1310 gst/playondemand/Makefile
1311 gst/qtdemux/Makefile
1312 gst/realmedia/Makefile
1313 gst/rtjpeg/Makefile
1314 gst/rtp/Makefile
1315 gst/silence/Makefile
1316 gst/sine/Makefile
1317 gst/smooth/Makefile
1318 gst/smpte/Makefile
1319 gst/spectrum/Makefile
1320 gst/speed/Makefile
1321 gst/stereo/Makefile
1322 gst/synaesthesia/Makefile
1323 gst/tcp/Makefile
1324 gst/typefind/Makefile
1325 gst/udp/Makefile
1326 gst/vbidec/Makefile
1327 gst/videocrop/Makefile
1328 gst/videodrop/Makefile
1329 gst/videofilter/Makefile
1330 gst/videoflip/Makefile
1331 gst/videoscale/Makefile
1332 gst/videotestsrc/Makefile
1333 gst/volenv/Makefile
1334 gst/volume/Makefile
1335 gst/wavenc/Makefile
1336 gst/wavparse/Makefile
1337 gst/y4m/Makefile
1338 sys/Makefile
1339 sys/cdrom/Makefile
1340 sys/dxr3/Makefile
1341 sys/oss/Makefile
1342 sys/qcam/Makefile
1343 sys/v4l/Makefile
1344 sys/v4l2/Makefile
1345 sys/vcd/Makefile
1346 sys/xvideo/Makefile
1347 sys/ximage/Makefile
1348 sys/glsink/Makefile
1349 ext/Makefile
1350 ext/a52dec/Makefile
1351 ext/aalib/Makefile
1352 ext/alsa/Makefile
1353 ext/arts/Makefile
1354 ext/artsd/Makefile
1355 ext/audiofile/Makefile
1356 ext/cdparanoia/Makefile
1357 ext/divx/Makefile
1358 ext/dv/Makefile
1359 ext/dvdread/Makefile
1360 ext/dvdnav/Makefile
1361 ext/esd/Makefile
1362 ext/ffmpeg/Makefile
1363 ext/flac/Makefile
1364 ext/gdk_pixbuf/Makefile
1365 ext/gnomevfs/Makefile
1366 ext/gsm/Makefile
1367 ext/hermes/Makefile
1368 dnl ext/http/Makefile
1369 ext/jack/Makefile
1370 ext/jpeg/Makefile
1371 ext/ladspa/Makefile
1372 ext/lame/Makefile
1373 ext/ivorbis/Makefile
1374 ext/lcs/Makefile
1375 ext/libfame/Makefile
1376 ext/libpng/Makefile
1377 ext/mad/Makefile
1378 ext/mas/Makefile
1379 ext/matroska/Makefile
1380 ext/mikmod/Makefile
1381 ext/mpeg2dec/Makefile
1382 ext/mplex/Makefile
1383 ext/pango/Makefile
1384 ext/raw1394/Makefile
1385 ext/sdl/Makefile
1386 ext/shout/Makefile
1387 ext/shout2/Makefile
1388 ext/sidplay/Makefile
1389 ext/smoothwave/Makefile
1390 ext/snapshot/Makefile
1391 ext/speex/Makefile
1392 ext/sndfile/Makefile
1393 ext/swfdec/Makefile
1394 ext/vorbis/Makefile
1395 ext/tarkin/Makefile
1396 ext/xvid/Makefile
1397 gst-libs/Makefile
1398 gst-libs/gst/Makefile
1399 gst-libs/gst/audio/Makefile
1400 gst-libs/gst/colorbalance/Makefile
1401 gst-libs/gst/floatcast/Makefile
1402 gst-libs/gst/gconf/Makefile
1403 gst-libs/gst/idct/Makefile
1404 gst-libs/gst/media-info/Makefile
1405 gst-libs/gst/mixer/Makefile
1406 gst-libs/gst/navigation/Makefile
1407 gst-libs/gst/play/Makefile
1408 gst-libs/gst/propertyprobe/Makefile
1409 gst-libs/gst/resample/Makefile
1410 gst-libs/gst/riff/Makefile
1411 gst-libs/gst/tuner/Makefile
1412 gst-libs/gst/video/Makefile
1413 gst-libs/gst/xoverlay/Makefile
1414 gst-libs/gst/xwindowlistener/Makefile
1415 gst-libs/ext/Makefile
1416 gst-libs/ext/ffmpeg/Makefile
1417 gst-libs/ext/mplex/Makefile
1418 examples/dynparams/Makefile
1419 examples/capsfilter/Makefile
1420 examples/seeking/Makefile
1421 examples/indexing/Makefile
1422 examples/Makefile
1423 testsuite/autoplug/Makefile
1424 testsuite/spider/Makefile
1425 testsuite/alsa/Makefile
1426 testsuite/Makefile
1427 tools/Makefile
1428 tools/gst-launch-ext
1429 gconf/Makefile
1430 pkgconfig/Makefile
1431 )
1432 AC_OUTPUT
1434 echo -n "configure: *** Plug-ins that will be built :"
1435 echo -e "$GST_PLUGINS_YES" | sort
1436 echo
1437 echo -n "configure: *** Plug-ins that will not be built :"
1438 echo -e "$GST_PLUGINS_NO" | sort
1439 echo
1440 if test "x$BUILD_EXTERNAL" = "xno"; then
1441 echo "configure: *** No external plug-ins will be built"
1442 fi