3 dnl initialize autoconf
4 dnl when going to/from release please set the nano (fourth number) right !
5 dnl releases only do Wall, cvs and prerelease does Werror too
6 AC_INIT([GStreamer Bad Plug-ins],[1.1.0.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-bad])
10 dnl initialize automake
11 AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar])
13 dnl define PACKAGE_VERSION_* variables
16 dnl check if this is a release version
17 AS_NANO(GST_GIT="no", GST_GIT="yes")
19 dnl can autoconf find the source ?
20 AC_CONFIG_SRCDIR([docs/plugins/gst-plugins-bad-plugins-docs.sgml])
22 dnl define the output header for config
23 AC_CONFIG_HEADERS([config.h])
25 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
26 AM_MAINTAINER_MODE([enable])
28 dnl sets host_* variables
31 dnl use pretty build output with automake >= 1.11
32 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
33 [AM_DEFAULT_VERBOSITY=1
34 AC_SUBST(AM_DEFAULT_VERBOSITY)])
36 dnl our libraries and install dirs use GST_API_VERSION in the filename
37 dnl to allow side-by-side installation of different API versions
39 AC_SUBST(GST_API_VERSION)
40 AC_DEFINE_UNQUOTED(GST_API_VERSION, "$GST_API_VERSION",
41 [GStreamer API Version])
43 AG_GST_LIBTOOL_PREPARE
45 dnl CURRENT, REVISION, AGE
46 dnl - library source changed -> increment REVISION
47 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
48 dnl - interfaces added -> increment AGE
49 dnl - interfaces removed -> AGE = 0
50 dnl sets GST_LT_LDFLAGS
51 AS_LIBTOOL(GST, 2, 0, 2)
53 dnl *** required versions of GStreamer stuff ***
57 dnl *** autotools stuff ****
59 dnl allow for different autotools
60 AS_AUTOTOOLS_ALTERNATE
62 dnl Add parameters for aclocal
63 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
66 dnl the version check needs to stay here because autopoint greps for it
67 AM_GNU_GETTEXT_VERSION([0.17])
68 AM_GNU_GETTEXT([external])
69 AG_GST_GETTEXT([gst-plugins-bad-$GST_API_VERSION])
71 dnl *** check for arguments to configure ***
73 AG_GST_ARG_DISABLE_FATAL_WARNINGS
82 AG_GST_ARG_WITH_PKG_CONFIG_PATH
83 AG_GST_ARG_WITH_PACKAGE_NAME
84 AG_GST_ARG_WITH_PACKAGE_ORIGIN
86 AG_GST_ARG_WITH_PLUGINS
88 AG_GST_ARG_ENABLE_EXTERNAL
90 AG_GST_ARG_ENABLE_EXPERIMENTAL
92 dnl *** checks for platform ***
95 dnl * hardware/architecture *
97 dnl common/m4/gst-arch.m4
101 dnl Determine endianness
104 dnl *** checks for programs ***
110 dnl determine c++ compiler
112 dnl determine if c++ is available on this system
113 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
117 dnl check if the compiler supports '-c' and '-o' options
120 dnl check if the compiler supports do while(0) macros
121 AG_GST_CHECK_DOWHILE_MACROS
123 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
124 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
126 dnl check for documentation tools
127 GTK_DOC_CHECK([1.12])
128 AG_GST_PLUGIN_DOCS([1.12])
130 dnl *** checks for libraries ***
132 dnl check for libm, for sin() etc.
138 dnl *** checks for header files ***
140 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
141 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
143 if test "x$HAVE_UNISTD_H" != "xyes"; then
144 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
147 AC_CHECK_HEADERS([sys/time.h])
152 AC_CHECK_HEADERS([pthread.h], HAVE_PTHREAD_H=yes)
153 AM_CONDITIONAL(HAVE_PTHREAD_H, test "x$HAVE_PTHREAD_H" = "xyes")
155 if test "x$HAVE_PTHREAD_H" != "xyes"; then
156 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/dccp//`
159 dnl *** checks for types/defines ***
161 dnl Check for FIONREAD ioctl declaration
165 dnl *** checks for structures ***
167 dnl *** checks for compiler characteristics ***
169 dnl *** checks for library functions ***
170 AC_CHECK_FUNCS([gmtime_r])
172 dnl *** checks for headers ***
173 AC_CHECK_HEADERS([sys/utsname.h])
175 dnl *** checks for dependency libraries ***
177 dnl *** checks for socket and nsl libraries ***
178 AC_CHECK_FUNC(socket,,[AC_CHECK_LIB(socket,socket)])
179 AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
183 AG_GST_GLIB_CHECK([$GLIB_REQ])
185 dnl checks for gstreamer
186 dnl uninstalled is selected preferentially -- see pkg-config(1)
187 AG_GST_CHECK_GST($GST_API_VERSION, [$GST_REQ], yes)
188 AG_GST_CHECK_GST_BASE($GST_API_VERSION, [$GST_REQ], yes)
189 AG_GST_CHECK_GST_CHECK($GST_API_VERSION, [$GST_REQ], no)
190 AG_GST_CHECK_GST_CONTROLLER($GST_API_VERSION, [$GST_REQ], yes)
191 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
193 AG_GST_CHECK_GST_PLUGINS_BASE($GST_API_VERSION, [$GSTPB_REQ], yes)
195 dnl check for uninstalled plugin directories for unit tests
196 AG_GST_CHECK_UNINSTALLED_SETUP([
197 AG_GST_CHECK_GST_PLUGINS_GOOD($GST_API_VERSION, [0.11.0])
198 AG_GST_CHECK_GST_PLUGINS_UGLY($GST_API_VERSION, [0.11.0])
199 AG_GST_CHECK_GST_PLUGINS_FFMPEG($GST_API_VERSION, [0.11.0])
202 dnl Check for documentation xrefs
203 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
204 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
205 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_API_VERSION`"
206 AC_SUBST(GLIB_PREFIX)
208 AC_SUBST(GSTPB_PREFIX)
210 dnl GTK is optional and used in examples
214 if test "x$BUILD_EXAMPLES" = "xyes"; then
215 AC_MSG_CHECKING([which gtk+ version to compile examples against (optional)])
217 AS_HELP_STRING([--with-gtk=3.0|2.0],[which gtk+ version to compile against (default: 2.0)]),
219 2.0) GTK_REQ=$GTK2_REQ ;;
220 3.0) GTK_REQ=$GTK3_REQ ;;
221 *) AC_MSG_ERROR([invalid gtk+ version specified]);;
225 AC_MSG_RESULT([$with_gtk (>= $GTK_REQ)])
226 PKG_CHECK_MODULES(GTK, gtk+-x11-$with_gtk >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
230 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
234 dnl Needed for GtkBuilder to autoconnect signals
235 PKG_CHECK_MODULES(GMODULE_EXPORT, gmodule-export-2.0, HAVE_GMODULE_EXPORT=yes, HAVE_GMODULE_EXPORT=no)
237 dnl Needed by plugins that use g_module_*() API
238 PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0)
240 dnl x11 is optional for librfb and eglglessink
242 PKG_CHECK_MODULES(X11, x11, HAVE_X11=yes, HAVE_X11=no)
246 AM_CONDITIONAL(HAVE_X11, test "x$HAVE_X11" = "xyes")
247 if test "x$HAVE_X11" = "xyes"; then
248 AC_DEFINE(HAVE_X11, 1, [Define if you have X11 library])
251 dnl exif (used on jifmux tests) ****
252 PKG_CHECK_MODULES(EXIF, libexif >= 0.6.16, HAVE_EXIF="yes", HAVE_EXIF="no")
254 AC_SUBST(EXIF_CFLAGS)
255 AM_CONDITIONAL(USE_EXIF, test "x$HAVE_EXIF" = "xyes")
260 dnl set license and copyright notice
262 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
263 AC_SUBST(GST_LICENSE)
265 dnl define LIBDIR so we can inform people where we live
266 AS_AC_EXPAND(LIBDIR, $libdir)
267 AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [library dir])
269 dnl set location of plugin directory
272 dnl set release date/time
273 AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO([$PACKAGE_VERSION_NANO],
274 ["${srcdir}/gst-plugins-bad.doap"],
275 [$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO])
277 # set by AG_GST_PARSE_SUBSYSTEM_DISABLES above
278 dnl make sure it doesn't complain about unused variables if debugging is disabled
280 AG_GST_CHECK_GST_DEBUG_DISABLED([NO_WARNINGS="-Wno-unused"], [NO_WARNINGS=""])
282 dnl define an ERROR_CFLAGS Makefile variable
283 dnl -Waggregate-return - libexif returns aggregates
284 dnl -Wundef - Windows headers check _MSC_VER unconditionally
285 AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [
286 -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
287 -Wwrite-strings -Wformat-security -Wold-style-definition
288 -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar
289 -Wnested-externs $NO_WARNINGS])
291 dnl define an ERROR_CXXFLAGS Makefile variable
292 AG_GST_SET_ERROR_CXXFLAGS($FATAL_WARNINGS, [
293 -Wmissing-declarations -Wredundant-decls
294 -Wwrite-strings -Wformat-nonliteral -Wformat-security
295 -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar $NO_WARNINGS])
297 dnl define an ERROR_OBJCFLAGS Makefile variable
298 AG_GST_SET_ERROR_OBJCFLAGS($FATAL_WARNINGS, [
299 -Wmissing-declarations -Wredundant-decls
300 -Wwrite-strings -Wformat-nonliteral -Wformat-security
301 -Winit-self -Wmissing-include-dirs -Wno-multichar $NO_WARNINGS])
303 dnl define correct level for debugging messages
304 AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
307 AG_GST_DEFAULT_ELEMENTS
309 dnl *** plug-ins to include ***
310 dnl Non ported plugins (non-dependant, then dependant)
311 dnl Make sure you have a space before and after all plugins
312 GST_PLUGINS_NONPORTED=" aiff \
316 hdvparse ivfparse jp2kdecimator \
318 mve mythtv nsf nuvdemux \
320 sdi stereo tta videofilters \
321 videomeasure videosignal vmnc \
322 decklink fbdev linsys vcd \
323 apexsink cdaudio cog dc1394 dirac directfb \
324 gsettings jasper ladspa \
325 musepack musicbrainz nas neon ofa openal rsvg sdl sndfile timidity \
326 directdraw direct3d9 acm wininet \
327 wildmidi xvid lv2 teletextdec sndio uvch264 wasapi"
328 AC_SUBST(GST_PLUGINS_NONPORTED)
330 dnl these are all the gst plug-ins, compilable without additional libs
331 AG_GST_CHECK_PLUGIN(accurip)
332 AG_GST_CHECK_PLUGIN(adpcmdec)
333 AG_GST_CHECK_PLUGIN(adpcmenc)
334 AG_GST_CHECK_PLUGIN(aiff)
335 AG_GST_CHECK_PLUGIN(asfmux)
336 AG_GST_CHECK_PLUGIN(audiovisualizers)
337 AG_GST_CHECK_PLUGIN(autoconvert)
338 AG_GST_CHECK_PLUGIN(bayer)
339 AG_GST_CHECK_PLUGIN(camerabin2)
340 AG_GST_CHECK_PLUGIN(cdxaparse)
341 AG_GST_CHECK_PLUGIN(coloreffects)
342 AG_GST_CHECK_PLUGIN(dataurisrc)
343 AG_GST_CHECK_PLUGIN(dccp)
344 AG_GST_CHECK_PLUGIN(debugutils)
345 AG_GST_CHECK_PLUGIN(dtmf)
346 AG_GST_CHECK_PLUGIN(dvbsuboverlay)
347 AG_GST_CHECK_PLUGIN(dvdspu)
348 AG_GST_CHECK_PLUGIN(faceoverlay)
349 AG_GST_CHECK_PLUGIN(festival)
350 AG_GST_CHECK_PLUGIN(fieldanalysis)
351 AG_GST_CHECK_PLUGIN(freeverb)
352 AG_GST_CHECK_PLUGIN(frei0r)
353 AG_GST_CHECK_PLUGIN(gaudieffects)
354 AG_GST_CHECK_PLUGIN(geometrictransform)
355 AG_GST_CHECK_PLUGIN(gdp)
356 AG_GST_CHECK_PLUGIN(hdvparse)
357 AG_GST_CHECK_PLUGIN(hls)
358 AG_GST_CHECK_PLUGIN(id3tag)
359 AG_GST_CHECK_PLUGIN(inter)
360 AG_GST_CHECK_PLUGIN(interlace)
361 AG_GST_CHECK_PLUGIN(ivfparse)
362 AG_GST_CHECK_PLUGIN(jp2kdecimator)
363 AG_GST_CHECK_PLUGIN(jpegformat)
364 AG_GST_CHECK_PLUGIN(librfb)
365 AG_GST_CHECK_PLUGIN(liveadder)
366 AG_GST_CHECK_PLUGIN(mpegdemux)
367 AG_GST_CHECK_PLUGIN(mpegtsdemux)
368 AG_GST_CHECK_PLUGIN(mpegtsmux)
369 AG_GST_CHECK_PLUGIN(mpegpsmux)
370 AG_GST_CHECK_PLUGIN(mve)
371 AG_GST_CHECK_PLUGIN(mxf)
372 AG_GST_CHECK_PLUGIN(nsf)
373 AG_GST_CHECK_PLUGIN(nuvdemux)
374 AG_GST_CHECK_PLUGIN(patchdetect)
375 AG_GST_CHECK_PLUGIN(pcapparse)
376 AG_GST_CHECK_PLUGIN(pnm)
377 AG_GST_CHECK_PLUGIN(rawparse)
378 AG_GST_CHECK_PLUGIN(real)
379 AG_GST_CHECK_PLUGIN(removesilence)
380 AG_GST_CHECK_PLUGIN(sdi)
381 AG_GST_CHECK_PLUGIN(sdp)
382 AG_GST_CHECK_PLUGIN(segmentclip)
383 AG_GST_CHECK_PLUGIN(siren)
384 AG_GST_CHECK_PLUGIN(smooth)
385 AG_GST_CHECK_PLUGIN(speed)
386 AG_GST_CHECK_PLUGIN(subenc)
387 AG_GST_CHECK_PLUGIN(stereo)
388 AG_GST_CHECK_PLUGIN(tta)
389 AG_GST_CHECK_PLUGIN(videofilters)
390 AG_GST_CHECK_PLUGIN(videomeasure)
391 AG_GST_CHECK_PLUGIN(videoparsers)
392 AG_GST_CHECK_PLUGIN(videosignal)
393 AG_GST_CHECK_PLUGIN(vmnc)
394 AG_GST_CHECK_PLUGIN(y4m)
396 dnl *** plug-ins to exclude ***
398 dnl real plugin only works on i386 and x86_64 for the time being.
399 if test "x$HAVE_CPU_I386" != "xyes" && test "x$HAVE_CPU_X86_64" != "xyes"; then
400 AC_MSG_WARN([Not building real plugin, only works on 32bit and 64bit x86 platforms])
401 AG_GST_DISABLE_PLUGIN(real)
404 dnl disable gst plugins we might not be able to build on this
405 dnl platform: librfb (ugly but minimally invasive)
406 dnl FIXME: maybe move to sys, or make work with winsock2
407 AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
408 AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes)
410 if test "x$HAVE_WINSOCK2_H" = "xyes"; then
411 WINSOCK2_LIBS="-lws2_32"
412 AC_SUBST(WINSOCK2_LIBS)
415 if test "x$HAVE_PTHREAD_H" = "xyes"; then
416 DCCP_LIBS="$DCCP_LIBS -lpthread"
419 AG_GST_DISABLE_PLUGIN(dccp)
422 dnl *** sys plug-ins ***
425 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTSOUND, true)
426 AG_GST_CHECK_FEATURE(DIRECTSOUND, [DirectSound], directsoundsrc, [
427 HAVE_DIRECTSOUND="no"
428 save_CFLAGS="$CFLAGS"
429 save_LDFLAGS="$LDFLAGS"
431 CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
432 LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
433 LIBS="$LIBS -ldsound -ldxerr9 -luser32"
434 AC_MSG_CHECKING(for DirectSound LDFLAGS)
435 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
440 DXGetErrorString9 (0);
441 DirectSoundCreate(NULL, NULL, NULL);
443 [HAVE_DIRECTSOUND="yes"],
444 [HAVE_DIRECTSOUND="no"])
445 AC_MSG_RESULT($HAVE_DIRECTSOUND)
447 LDFLAGS=$save_LDFLAGS
450 if test "x$HAVE_DIRECTSOUND" = "xyes"; then
451 dnl this is much more than we want
452 DIRECTSOUND_LIBS="-ldsound -ldxerr9 -luser32"
453 AC_SUBST(DIRECTX_CFLAGS)
454 AC_SUBST(DIRECTX_LDFLAGS)
455 AC_SUBST(DIRECTSOUND_LIBS)
457 AC_SUBST(HAVE_DIRECTSOUND)
461 translit(dnm, m, l) AM_CONDITIONAL(USE_WASAPI, true)
462 AG_GST_CHECK_FEATURE(WASAPI, [WASAPI plug-in], wasapi, [
464 save_CFLAGS="$CFLAGS"
465 save_LDFLAGS="$LDFLAGS"
467 CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
468 LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
469 LIBS="$LIBS -lole32 -lwinmm -lksuser"
470 AC_MSG_CHECKING(for WASAPI LDFLAGS)
471 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
474 #include <mmsystem.h>
475 #include <mmdeviceapi.h>
481 hr = CoInitialize(NULL);
483 printf("CoInitialize failed: hr = 0x%08x", hr);
488 // result = do_everything(argc, argv);
496 AC_MSG_RESULT($HAVE_WASAPI)
498 LDFLAGS=$save_LDFLAGS
501 if test "x$HAVE_WASAPI" = "xyes"; then
502 WASAPI_LIBS="-lole32 -lwinmm -lksuser"
503 AC_SUBST(WASAPI_LIBS)
505 AC_SUBST(HAVE_WASAPI)
509 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECT3D, true)
510 AG_GST_CHECK_FEATURE(DIRECT3D, [Direct3D plug-in], direct3dsink, [
512 save_CFLAGS="$CFLAGS"
513 save_LDFLAGS="$LDFLAGS"
515 CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
516 LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
517 LIBS="$LIBS -ld3d9 -lgdi32"
518 AC_MSG_CHECKING(for Direct3D LDFLAGS)
519 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
523 Direct3DCreate9(D3D_SDK_VERSION);
525 [HAVE_DIRECT3D="yes"],
526 [HAVE_DIRECT3D="no"])
527 AC_MSG_RESULT($HAVE_DIRECT3D)
529 LDFLAGS=$save_LDFLAGS
532 if test "x$HAVE_DIRECT3D" = "xyes"; then
533 DIRECT3D_LIBS="-ld3d9 -lgdi32"
534 AC_SUBST(DIRECT3D_LIBS)
536 AC_SUBST(HAVE_DIRECT3D)
540 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTDRAW, true)
541 AG_GST_CHECK_FEATURE(DIRECTDRAW, [DirectDraw plug-in], directdrawsink, [
543 save_CFLAGS="$CFLAGS"
544 save_LDFLAGS="$LDFLAGS"
546 CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
547 LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
548 LIBS="$LIBS -lddraw -lgdi32"
549 AC_MSG_CHECKING(for DirectDraw LDFLAGS)
550 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
555 DirectDrawCreate(NULL, NULL, NULL);
557 [HAVE_DIRECTDRAW="yes"],
558 [HAVE_DIRECTDRAW="no"])
559 AC_MSG_RESULT($HAVE_DIRECTDRAW)
561 LDFLAGS=$save_LDFLAGS
564 if test "x$HAVE_DIRECTDRAW" = "xyes"; then
565 dnl this is much more than we want
566 DIRECTDRAW_LIBS="-lddraw -ldxguid -lgdi32"
567 AC_SUBST(DIRECTX_CFLAGS)
568 AC_SUBST(DIRECTX_LDFLAGS)
569 AC_SUBST(DIRECTDRAW_LIBS)
571 AC_SUBST(HAVE_DIRECTDRAW)
575 AM_CONDITIONAL(USE_DIRECT3D9, true)
576 AG_GST_CHECK_FEATURE(DIRECT3D9, [Direct3D9], winscreencap, [
578 save_CFLAGS="$CFLAGS"
579 save_LDFLAGS="$LDFLAGS"
581 CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
582 LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
583 LIBS="$LIBS -ld3d9 -lgdi32"
584 AC_MSG_CHECKING(for Direct3D9 LDFLAGS)
585 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
589 Direct3DCreate9(D3D_SDK_VERSION);
591 [HAVE_DIRECT3D9="yes"],
592 [HAVE_DIRECT3D9="no"])
593 AC_MSG_RESULT($HAVE_DIRECT3D9)
595 LDFLAGS=$save_LDFLAGS
598 if test "x$HAVE_DIRECT3D9" = "xyes"; then
600 DIRECT3D9_LIBS="-ld3d9 -lgdi32"
601 AC_SUBST(DIRECT3D9_LIBS)
603 AC_SUBST(HAVE_DIRECT3D9)
607 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTSHOW, true)
608 AG_GST_CHECK_FEATURE(DIRECTSHOW, [DirectShow plug-in], winks, [
610 save_CFLAGS="$CFLAGS"
611 save_LDFLAGS="$LDFLAGS"
613 CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
614 LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
615 LIBS="$LIBS -lole32 -luuid -lstrmiids"
616 AC_MSG_CHECKING(for DirectShow LDFLAGS)
617 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
623 IGraphBuilder *pGraph = NULL;
624 HRESULT hr = CoInitialize(NULL);
625 hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
626 &IID_IGraphBuilder, (void **)&pGraph);
631 [HAVE_DIRECTSHOW="yes"],
632 [HAVE_DIRECTSHOW="no"])
633 AC_MSG_RESULT($HAVE_DIRECTSHOW)
635 LDFLAGS=$save_LDFLAGS
638 if test "x$HAVE_DIRECTSHOW" = "xyes"; then
639 dnl this is much more than we want
640 DIRECTSHOW_LIBS="-ldxguid -lole32 -luuid -lstrmiids -lksuser -lsetupapi"
641 AC_SUBST(DIRECTX_CFLAGS)
642 AC_SUBST(DIRECTX_LDFLAGS)
643 AC_SUBST(DIRECTSHOW_LIBS)
645 AC_SUBST(HAVE_DIRECTSHOW)
648 dnl *** Android Media ***
649 translit(dnm, m, l) AM_CONDITIONAL(USE_ANDROID_MEDIA, true)
650 HAVE_ANDROID_MEDIA="no"
651 AG_GST_CHECK_FEATURE(ANDROID_MEDIA, [Android Media], androidmedia, [
654 AC_CHECK_HEADER(jni.h, HAVE_ANDROID_MEDIA="yes", HAVE_ANDROID_MEDIA="no")
657 HAVE_ANDROID_MEDIA="no"
662 dnl *** AppleMedia (OS X and iOS) ***
663 translit(dnm, m, l) AM_CONDITIONAL(USE_APPLE_MEDIA, true)
664 HAVE_APPLE_MEDIA="no"
665 dnl SystemConfiguration.h is common to OS X and iOS, so we check for that
666 AG_GST_CHECK_FEATURE(APPLE_MEDIA, [Apple video], applemedia, [
667 AC_CHECK_HEADER(SystemConfiguration/SystemConfiguration.h, HAVE_APPLE_MEDIA="yes", HAVE_APPLE_MEDIA="no")
669 dnl in case header SystemConfiguration/SystemConfiguration.h is found on other platforms
674 HAVE_APPLE_MEDIA="no"
678 if test "x$HAVE_APPLE_MEDIA" = "xyes"; then
679 AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-])
682 AM_CONDITIONAL(HAVE_IOS, test "x$HAVE_IOS" = "xyes")
683 if test "x$HAVE_IOS" = "xyes"; then
684 AC_DEFINE(HAVE_IOS, 1, [Define if building for Apple iOS])
687 dnl *** OS X videosrc ***
688 translit(dnm, m, l) AM_CONDITIONAL(USE_OSX_VIDEO, true)
690 AG_GST_CHECK_FEATURE(OSX_VIDEO, [OSX video], osxvideosrc, [
691 AC_CHECK_TYPE([SeqGrabComponent], HAVE_OSX_VIDEO="yes", HAVE_OSX_VIDEO="no",
692 [#include <Quicktime/Quicktime.h>])
694 dnl in case header Quicktime/Quicktime.h is found on other platforms
703 dnl *** OS/X AVCVideoServices ***
704 translit(dnm, m, l) AM_CONDITIONAL(USE_AVC, true)
706 AG_GST_CHECK_FEATURE(AVC, [AVC Video Services], avcsrc, [
708 save_CPPFLAGS="$CPPFLAGS"
709 CPPFLAGS="$CPPFLAGS -framework AVCVideoServices -framework CoreFoundation"
711 LIBS="$LIBS -framework AVCVideoServices -framework CoreFoundation"
712 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[HAVE_AVC=yes],[HAVE_AVC=no])
714 CPPFLAGS=$save_CPPFLAGS
717 dnl in case header AVCVideoServices/AVCVideoServices.h is found on other platforms
726 dnl check for QuickTime
727 translit(dnm, m, l) AM_CONDITIONAL(USE_QUICKTIME, true)
728 AG_GST_CHECK_FEATURE(QUICKTIME, [QuickTime wrapper], qtwrapper, [
729 AC_CHECK_TYPE([SampleReferenceRecord], HAVE_QUICKTIME="yes", HAVE_QUICKTIME="no",
730 [#include <Quicktime/Quicktime.h>])
733 dnl check for shm_open (for shm plugin)
734 translit(dnm, m, l) AM_CONDITIONAL(USE_SHM, true)
735 AG_GST_CHECK_FEATURE(SHM, [POSIX shared memory source and sink], shm, [
736 if test "x$HAVE_SYS_SOCKET_H" = "xyes"; then
738 *-darwin* | *-macos10*)
739 AC_DEFINE(HAVE_OSX,[1],[Apple Mac OS X operating system detected])
743 AC_CHECK_LIB([rt], [shm_open],
744 AC_CHECK_DECL([MSG_NOSIGNAL], HAVE_SHM=yes, HAVE_SHM=no, [
745 #include <sys/socket.h>
748 AC_SUBST(SHM_LIBS, "-lrt")
756 dnl *** Video 4 Linux 2 ***
757 dnl for information about the header/define, see sys/v4l2/gstv4l2element.h
758 dnl renamed to GST_V4L2 because of some conflict with kernel headers
759 translit(dnm, m, l) AM_CONDITIONAL(USE_MFC, true)
760 AG_GST_CHECK_FEATURE(MFC, [Multi Format Codec], mfc, [
761 AC_MSG_CHECKING([Checking for up to date v4l2 installation])
762 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
763 #include <sys/types.h>
764 #ifdef __sun /* Solaris */
765 #include <sys/types.h>
766 #include <sys/videodev2.h>
768 #include <linux/videodev2.h>
770 #include <linux/types.h>
771 #define _LINUX_TIME_H
773 #include <linux/videodev2.h>
775 #if defined(V4L2_MAJOR_VERSION) || defined(V4L2_MINOR_VERSION)
776 #error too early v4l2 version or no v4l2 at all
788 AC_CHECK_HEADER(linux/videodev2.h, [ HAVE_VIDEODEV=yes ],
790 AC_CHECK_HEADER(sys/videodev2.h, [ HAVE_VIDEODEV=yes ])
793 if test "x$HAVE_VIDEODEV" = "xyes"; then
794 AC_MSG_WARN([video4linux2 headers were found, but they're old.])
795 AC_MSG_WARN([Please update v4l2 to compile the MFC plugins])
797 AC_MSG_WARN([v4l2 was not found])
802 dnl check for Video CD
803 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
804 AG_GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
805 AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
808 dnl check for OpenSL ES
809 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENSLES, true)
810 AG_GST_CHECK_FEATURE(OPENSLES, [OpenSL ES], opensl, [
811 AC_CHECK_HEADER(SLES/OpenSLES.h, HAVE_OPENSLES="yes", HAVE_OPENSLES="no")
815 translit(dnm, m, l) AM_CONDITIONAL(USE_UVCH264, true)
816 AG_GST_CHECK_FEATURE(UVCH264, [UVC H264], uvch264, [
817 AC_CHECK_HEADER(linux/uvcvideo.h, HAVE_UVCVIDEO_H=yes, HAVE_UVCVIDEO_H=no)
818 AG_GST_PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-0.10 >= 0.10.36)
819 PKG_CHECK_MODULES(G_UDEV, gudev-1.0 , [
820 AC_DEFINE([HAVE_GUDEV], 1, [Define if gudev is installed])
823 PKG_CHECK_MODULES(LIBUSB, libusb-1.0 , [
824 AC_DEFINE([HAVE_LIBUSB], 1, [Define if libusb 1.x is installed])
827 if test "x$HAVE_UVCVIDEO_H" == "xyes" && \
828 test "x$HAVE_GUDEV" == "xyes" && \
829 test "x$HAVE_LIBUSB" == "xyes"; then
835 AC_SUBST(LIBUDEV_CFLAGS)
836 AC_SUBST(LIBUDEV_LIBS)
837 AC_SUBST(LIBUSB_CFLAGS)
838 AC_SUBST(LIBUSB_LIBS)
841 dnl *** ext plug-ins ***
842 dnl keep this list sorted alphabetically !
844 if test "x$BUILD_EXTERNAL" = "xyes"; then
846 dnl *** assrender ***
847 translit(dnm, m, l) AM_CONDITIONAL(USE_ASSRENDER, true)
848 AG_GST_CHECK_FEATURE(ASSRENDER, [ASS/SSA renderer], assrender, [
849 PKG_CHECK_MODULES(ASSRENDER, libass >= 0.9.4, [
850 HAVE_ASSRENDER="yes" ], [
854 AC_SUBST(ASSRENDER_CFLAGS)
855 AC_SUBST(ASSRENDER_LIBS)
857 dnl *** vo-amrwbenc ***
858 translit(dnm, m, l) AM_CONDITIONAL(USE_VOAMRWBENC, true)
859 AG_GST_CHECK_FEATURE(VOAMRWBENC, [vo-amrwbenc library], vo-amrwbenc, [
860 AG_GST_PKG_CHECK_MODULES(VOAMRWBENC, vo-amrwbenc >= 0.1.0)
863 dnl *** vo-aacenc ***
864 translit(dnm, m, l) AM_CONDITIONAL(USE_VOAACENC, true)
865 AG_GST_CHECK_FEATURE(VOAACENC, [vo-aacenc library], vo-aacenc, [
866 AG_GST_PKG_CHECK_MODULES(VOAACENC, vo-aacenc >= 0.1.0)
870 translit(dnm, m, l) AM_CONDITIONAL(USE_APEXSINK, true)
871 AG_GST_CHECK_FEATURE(APEXSINK, [AirPort Express Wireless sink], apexsink, [
872 PKG_CHECK_MODULES(APEXSINK, [ openssl >= 0.9.5 libcrypto ], [
876 AC_SEARCH_LIBS(socket, [socket], [ ], [ APEXSINK="no" ])
877 AC_SEARCH_LIBS(gethostbyname, [nsl], [ ], [ APEXSINK="no" ])
878 APEXSINK_LIBS="$APEXSINK_LIBS $LIBS"
880 AC_SUBST(APEXSINK_CFLAGS)
881 AC_SUBST(APEXSINK_LIBS)
888 translit(dnm, m, l) AM_CONDITIONAL(USE_BZ2, true)
889 AG_GST_CHECK_FEATURE(BZ2, [bz2 library], bz2, [
890 AG_GST_CHECK_LIBHEADER(BZ2, bz2, BZ2_bzCompress, ,bzlib.h, BZ2_LIBS="-lbz2")
895 #translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
896 #AG_GST_CHECK_FEATURE(CAIRO, [cairo plug-in], cairo, [
897 # PKG_CHECK_MODULES(CAIRO, cairo >= 1.0 glitz-glx, HAVE_CAIRO=yes, [
900 # AC_SUBST(CAIRO_CFLAGS)
901 # AC_SUBST(CAIRO_LIBS)
905 translit(dnm, m, l) AM_CONDITIONAL(USE_CDAUDIO, true)
906 AG_GST_CHECK_FEATURE(CDAUDIO, [cdaudio], cdaudio, [
907 PKG_CHECK_MODULES(CDAUDIO, libcdaudio, [
912 AC_SUBST(CDAUDIO_CFLAGS)
913 AC_SUBST(CDAUDIO_LIBS)
917 translit(dnm, m, l) AM_CONDITIONAL(USE_CELT, true)
918 AG_GST_CHECK_FEATURE(CELT, [celt], celt, [
919 PKG_CHECK_MODULES(CELT, celt >= 0.5.0, [
920 AC_DEFINE([HAVE_CELT], 1, [Define if libcelt 0.5 is installed])
926 PKG_CHECK_MODULES(CELT_0_7, celt >= 0.7.0, [
927 AC_DEFINE([HAVE_CELT_0_7], 1, [Define if libcelt 0.7 is installed])
929 dnl to prevent an error
933 PKG_CHECK_MODULES(CELT_0_8, celt >= 0.8.0, [
934 AC_DEFINE([HAVE_CELT_0_8], 1, [Define if libcelt 0.8 is installed])
936 dnl to prevent an error
940 PKG_CHECK_MODULES(CELT_0_11, celt >= 0.11.0, [
941 AC_DEFINE([HAVE_CELT_0_11], 1, [Define if libcelt 0.11 is installed])
943 dnl to prevent an error
946 AC_SUBST(CELT_CFLAGS)
950 dnl *** chromaprint ***
951 translit(dnm, m, l) AM_CONDITIONAL(USE_CHROMAPRINT, true)
952 AG_GST_CHECK_FEATURE(CHROMAPRINT, [chromaprint], chromaprint, [
953 PKG_CHECK_MODULES(CHROMAPRINT, libchromaprint, HAVE_CHROMAPRINT="yes", [
954 HAVE_CHROMAPRINT="no"
956 AC_SUBST(CHROMAPRINT_CFLAGS)
957 AC_SUBST(CHROMAPRINT_LIBS)
961 translit(dnm, m, l) AM_CONDITIONAL(USE_COG, true)
962 AG_GST_CHECK_FEATURE(COG, [Cog plugin], cog, [
963 PKG_CHECK_MODULES(COG, libpng >= 1.2, HAVE_COG="yes", [
971 translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true)
972 AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
973 PKG_CHECK_MODULES(CURL, libcurl >= 7.21.0, [
975 AC_CHECK_HEADERS([unistd.h sys/socket.h sys/types.h netinet/in.h netinet/ip.h netinet/tcp.h fcntl.h], [ ], [
976 AC_CHECK_HEADERS([unistd.h sys/types.h winsock2.h ws2tcpip.h fcntl.h], [ ], [HAVE_CURL="no"])
978 AC_MSG_CHECKING([for socket support needed by curlsink])
979 AC_MSG_RESULT($HAVE_CURL)
983 AC_SUBST(CURL_CFLAGS)
988 translit(dnm, m, l) AM_CONDITIONAL(USE_DC1394, true)
989 AG_GST_CHECK_FEATURE(DC1394, [libdc1394], dc1394, [
990 PKG_CHECK_MODULES(LIBDC1394, libdc1394-2 >= 2.0.0, [
991 if test -z "`$PKG_CONFIG --modversion libdc1394-2 | grep 2.0.0-rc`"; then
1000 AC_SUBST(LIBDC1394_CFLAGS)
1001 AC_SUBST(LIBDC1394_LIBS)
1004 dnl *** decklink ***
1005 translit(dnm, m, l) AM_CONDITIONAL(USE_DECKLINK, true)
1006 AG_GST_CHECK_FEATURE(DECKLINK, [decklink], decklink, [
1010 if test "x$HAVE_PTHREAD_H" = "xyes"; then
1011 AC_CHECK_LIB(dl, dlopen,
1015 DECKLINK_LIBS="-lpthread -ldl"
1020 if test "x$HAVE_PTHREAD_H" = "xyes"; then
1021 AC_CHECK_LIB(dl, dlopen,
1025 DECKLINK_LIBS="-lpthread -ldl"
1026 HAVE_DECKLINK_OSX=yes
1035 AC_SUBST(DECKLINK_CXXFLAGS)
1036 AC_SUBST(DECKLINK_LIBS)
1038 AM_CONDITIONAL(DECKLINK_OSX, test "x$HAVE_DECKLINK_OSX" = xyes)
1040 dnl **** DirectFB ****
1041 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTFB, true)
1042 AG_GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
1043 PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.24, HAVE_DIRECTFB="yes", [
1048 dnl **** Wayland ****
1049 translit(dnm, m, l) AM_CONDITIONAL(USE_WAYLAND, true)
1050 AG_GST_CHECK_FEATURE(WAYLAND, [wayland sink], wayland , [
1051 PKG_CHECK_MODULES(WAYLAND, wayland-client >= 1.0.0, [
1052 HAVE_WAYLAND="yes" ], [ HAVE_WAYLAND="no"
1057 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRAC, true)
1058 AG_GST_CHECK_FEATURE(DIRAC, [dirac], dirac, [
1059 PKG_CHECK_MODULES(DIRAC, dirac >= 0.10, HAVE_DIRAC="yes", [
1065 translit(dnm, m, l) AM_CONDITIONAL(USE_DTS, true)
1066 AG_GST_CHECK_FEATURE(DTS, [dts library], dtsdec, [
1068 AG_GST_CHECK_LIBHEADER(DTS, dca, dca_init, $LIBM, dca.h,
1069 DTS_LIBS="-ldca $LIBM", HAVE_DTS="no")
1070 if test $HAVE_DTS = "no"; then
1071 AG_GST_CHECK_LIBHEADER(DTS, dts_pic, dts_init, $LIBM, dts.h,
1072 [ DTS_LIBS="-ldts_pic $LIBM"
1073 AC_DEFINE(DTS_OLD, 1, [Define if an old libdts is used])
1079 dnl *** resindvd ***
1080 translit(dnm, m, l) AM_CONDITIONAL(USE_RESINDVD, true)
1081 AG_GST_CHECK_FEATURE(RESINDVD, [resindvd plugin], resindvd, [
1082 PKG_CHECK_MODULES(DVDNAV, dvdnav >= 4.1.2 dvdread >= 4.1.2, HAVE_RESINDVD="yes", [
1087 dnl **** Free AAC Encoder (FAAC) ****
1088 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAC, true)
1089 AG_GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
1090 AG_GST_CHECK_LIBHEADER(FAAC, faac, faacEncOpen, $LIBM, faac.h,
1091 FAAC_LIBS="-lfaac $LIBM")
1092 AS_SCRUB_INCLUDE(FAAC_CFLAGS)
1096 dnl **** Free AAC Decoder (FAAD) ****
1097 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
1098 AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
1101 AG_GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, $LIBM, faad.h,
1102 FAAD_LIBS="-lfaad $LIBM", HAVE_FAAD="no")
1103 if test $HAVE_FAAD = "no"; then
1104 AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, $LIBM, neaacdec.h,
1105 [ FAAD_LIBS="-lfaad $LIBM"
1106 AC_DEFINE(FAAD_IS_NEAAC, 1, [Define if AAC is using new api prefix])
1107 faad_hdr="neaacdec.h"
1114 if test $HAVE_FAAD = "yes"; then
1115 AC_MSG_CHECKING([Checking for FAAD >= 2.0])
1116 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <faad.h>]], [[
1117 #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
1120 /* Release candidate of 2.0 is not good enough for us. This field
1121 * was added only in 2.0 final and does not exist in 2.0-RC3 */
1122 faacDecConfiguration conf; conf.dontUpSampleImplicitSBR = 1;
1127 AC_MSG_CHECKING([Checking FAAD2 version in $faad_hdr])
1128 for minor in 10 9 8 7 6 5 0; do
1129 if test x$faad2_minor_version = "x"; then
1130 AC_EGREP_CPP([GST_CHECK_FAAD_VERSION \"2\.$minor\"], [
1131 #include <$faad_hdr>
1132 GST_CHECK_FAAD_VERSION FAAD2_VERSION
1134 faad2_minor_version=$minor
1138 if test x$faad2_minor_version = "x"; then
1139 AC_MSG_RESULT([no idea])
1141 AC_MSG_RESULT([2.$faad2_minor_version])
1142 AC_DEFINE_UNQUOTED([FAAD2_MINOR_VERSION], [$faad2_minor_version], [The x in 2.x])
1148 AS_SCRUB_INCLUDE(FAAD_CFLAGS)
1150 AC_SUBST(FAAD_IS_NEAAC)
1154 translit(dnm, m, l) AM_CONDITIONAL(USE_FBDEV, true)
1155 AG_GST_CHECK_FEATURE(FBDEV, [linux framebuffer], fbdevsink, [
1156 if test "x$HAVE_FBDEV" != "xyes"; then
1157 AC_CHECK_HEADER([linux/fb.h], HAVE_FBDEV=yes, HAVE_FBDEV=no)
1162 translit(dnm, m, l) AM_CONDITIONAL(USE_FLITE, true)
1163 AG_GST_CHECK_FEATURE(FLITE, [Flite plugin], flite, [
1164 AG_GST_CHECK_LIBHEADER(FLITE, flite, flite_init, $LIBM, flite/flite.h,
1165 FLITE_LIBS="-lflite -lflite_cmu_us_kal -lflite_usenglish -lflite_cmulex $LIBM")
1167 AC_SUBST(FLITE_CFLAGS)
1168 AC_SUBST(FLITE_LIBS)
1172 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
1173 AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
1174 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
1175 if test $HAVE_GSM != "yes"; then
1176 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
1177 if test $HAVE_GSM = "yes"; then
1178 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
1185 translit(dnm, m, l) AM_CONDITIONAL(USE_JASPER, true)
1186 AG_GST_CHECK_FEATURE(JASPER, [jasper], jasperdec jasperenc, [
1187 AG_GST_CHECK_LIBHEADER(JASPER, jasper, jas_stream_fopen, , jasper/jasper.h,
1188 JASPER_LIBS="-ljasper")
1189 AC_SUBST(JASPER_LIBS)
1192 dnl *** OpenJPEG ***
1193 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENJPEG, true)
1194 AG_GST_CHECK_FEATURE(OPENJPEG, [openjpeg library], openjpeg, [
1196 PKG_CHECK_MODULES(OPENJPEG, libopenjpeg1,
1197 HAVE_OPENJPEG="yes",
1198 AG_GST_CHECK_LIBHEADER(OPENJPEG, openjpeg, opj_version, , openjpeg.h, OPENJPEG_LIBS="-lopenjpeg")
1200 AC_SUBST(OPENJPEG_CFLAGS)
1201 AC_SUBST(OPENJPEG_LIBS)
1205 translit(dnm, m, l) AM_CONDITIONAL(USE_KATE, true)
1206 AG_GST_CHECK_FEATURE(KATE, [Kate], kate, [
1207 PKG_CHECK_MODULES(KATE, kate >= 0.1.7, HAVE_KATE="yes", [
1210 AC_SUBST(KATE_CFLAGS)
1212 PKG_CHECK_MODULES(TIGER, tiger >= 0.3.2,
1215 AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available])
1221 AM_CONDITIONAL(USE_TIGER, test "x$HAVE_TIGER" = "xyes")
1222 AC_SUBST(TIGER_CFLAGS)
1223 AC_SUBST(TIGER_LIBS)
1224 ],,,[AM_CONDITIONAL(USE_TIGER, false)])
1227 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
1228 AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
1229 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
1231 PKG_CHECK_MODULES(LRDF, lrdf, HAVE_LRDF=yes, HAVE_LRDF=no)
1232 if test $HAVE_LRDF = "yes"; then
1233 AC_DEFINE(HAVE_LRDF, 1, [Define if we have liblrdf])
1236 AC_SUBST(LRDF_CFLAGS)
1240 translit(dnm, m, l) AM_CONDITIONAL(USE_LV2, true)
1241 AG_GST_CHECK_FEATURE(LV2, [lv2], lv2, [
1242 PKG_CHECK_MODULES(SLV2, slv2 >= 0.6.6, HAVE_LV2="yes", HAVE_LV2="no")
1243 AC_SUBST(SLV2_CFLAGS)
1248 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBMMS, true)
1249 AG_GST_CHECK_FEATURE(LIBMMS, [mms protocol library], libmms, [
1250 dnl check with pkg-config first
1251 PKG_CHECK_MODULES(LIBMMS, libmms >= 0.4, HAVE_LIBMMS="yes", [
1255 AC_SUBST(LIBMMS_LIBS)
1258 translit(dnm, m, l) AM_CONDITIONAL(USE_LINSYS, true)
1259 AG_GST_CHECK_FEATURE(LINSYS, [Linear Systems SDI plugin], linsys, [
1271 translit(dnm, m, l) AM_CONDITIONAL(USE_MODPLUG, true)
1272 AG_GST_CHECK_FEATURE(MODPLUG, modplug, modplug, [
1273 if test "x$HAVE_CXX" != "xyes"; then
1274 AC_MSG_WARN([Not compiling modplug plugin as it requires a C++ compiler])
1277 PKG_CHECK_MODULES(MODPLUG, libmodplug, HAVE_MODPLUG="yes", HAVE_MODPLUG="no")
1279 AC_SUBST(MODPLUG_CFLAGS)
1280 AC_SUBST(MODPLUG_LIBS)
1284 translit(dnm, m, l) AM_CONDITIONAL(USE_MIMIC, true)
1285 AG_GST_CHECK_FEATURE(MIMIC, [libmimic library], mimic, [
1287 PKG_CHECK_MODULES(MIMIC, libmimic >= $MIMIC_REQUIRED,
1288 HAVE_MIMIC=yes, HAVE_MIMIC=no)
1289 AC_SUBST(MIMIC_CFLAGS)
1290 AC_SUBST(MIMIC_LIBS)
1293 dnl *** mjpegtools version info ***
1294 dnl some may prefer older version (given quirks above)
1295 dnl hm, no version info seems available within mjpegtools headers
1296 dnl and API really moves along
1298 PKG_CHECK_EXISTS(mjpegtools >= 1.6.1.93 mjpegtools < 1.8.0, [
1299 mjpegtools_api=10601
1301 PKG_CHECK_EXISTS(mjpegtools >= 1.8.0 mjpegtools < 1.9.0, [
1302 mjpegtools_api=10800
1304 PKG_CHECK_EXISTS(mjpegtools >= 2.0.0, [
1305 mjpegtools_api=20000
1307 PKG_CHECK_MODULES(MJPEG, mjpegtools >= 1.9.0 mjpegtools < 2.0.0, [
1308 dnl logging API changed in release candidates
1309 OLD_CFLAGS="$CFLAGS"
1311 CFLAGS="$MJPEG_CFLAGS"
1312 LIBS="$LIBS $MJPEG_LIBS -lmjpegutils $LIBM -lpthread"
1313 AC_CHECK_FUNC(mjpeg_loglev_t, [
1314 mjpegtools_api=10903
1316 mjpegtools_api=10900
1318 CFLAGS="$OLD_CFLAGS"
1326 AC_DEFINE_UNQUOTED(GST_MJPEGTOOLS_API, $mjpegtools_api,
1327 [mjpegtools API evolution])
1329 dnl *** mpeg2enc ***
1330 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
1331 AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
1333 dnl we require a c++ compiler for this one
1334 if [ test x$HAVE_CXX = xyes ]; then
1335 dnl libmpeg2enc was first included in mjpegtools-1.6.2-rc3 (1.6.1.92)
1336 dnl since many distros include mjpegtools specifically without mplex
1337 dnl and mpeg2enc, we check for mpeg2enc on its own, too.
1338 PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.93, [
1339 dnl HACK because mpeg2enc 1.8.0 header files have a spurious 'include config.h'
1341 dnl switch over to c++ to test things
1343 OLD_CPPFLAGS="$CPPFLAGS"
1345 CPPFLAGS_GOOD="$CPPFLAGS $MPEG2ENC_CFLAGS"
1346 CPPFLAGS="$CPPFLAGS_GOOD -I."
1348 mpeg2enc_headers_ok=no
1349 AC_CHECK_HEADER([mpeg2encoder.hh], [
1350 MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp $LIBM -lpthread"
1352 LIBS="$LIBS $MPEG2ENC_LIBS"
1353 AC_MSG_CHECKING([for valid mpeg2enc objects])
1354 AC_RUN_IFELSE([AC_LANG_SOURCE([[
1355 #include <mpeg2encoder.hh>
1356 #include <mpeg2encoptions.hh>
1362 MPEG2EncOptions *options = new MPEG2EncOptions ();
1363 MPEG2Encoder *encoder = new MPEG2Encoder (*options);
1368 dnl so far so good, let's check more things:
1369 dnl mjpegtools-1.8.0 does not install the required
1370 dnl mpeg2syntaxcodes.h header by default, and a new release
1371 dnl is not in sight, so check for this oversight in case
1372 dnl distros or folks have fixed this themselves
1373 if test "$mjpegtools_api" -ge "10800"; then
1374 AC_CHECK_HEADER([mpeg2syntaxcodes.h], [
1375 mpeg2enc_headers_ok=yes
1377 mpeg2enc_headers_ok=no
1380 mpeg2enc_headers_ok=yes
1382 if test "x$mpeg2enc_headers_ok" = "xyes"; then
1385 CPPFLAGS="$CPPFLAGS_GOOD"
1386 AC_SUBST(MPEG2ENC_CFLAGS)
1387 AC_SUBST(MPEG2ENC_LIBS)
1394 CPPFLAGS="$OLD_CPPFLAGS"
1403 translit(dnm, m, l) AM_CONDITIONAL(USE_MPG123, true)
1404 AG_GST_CHECK_FEATURE(MPG123, [mpg123 audio decoder], mpg123, [
1405 PKG_CHECK_MODULES(MPG123, libmpg123 >= 1.13, HAVE_MPG123="yes", HAVE_MPG123="no")
1406 AC_SUBST(MPG123_CFLAGS)
1407 AC_SUBST(MPG123_LIBS)
1411 translit(dnm, m, l) AM_CONDITIONAL(USE_MPLEX, true)
1412 AG_GST_CHECK_FEATURE(MPLEX, [mplex], mplex, [
1414 dnl we require a c++ compiler for this one
1415 if [ test x$HAVE_CXX = xyes ]; then
1416 dnl libmplex was first included in mjpegtools-1.6.2-rc4 (1.6.1.93)
1417 dnl since many distros include mjpegtools specifically without mplex
1418 dnl and mpeg2enc, we check for mplex on its own, too.
1419 dnl libmplex < 1.9rc? has fuzzy ABI, valgrind and other problems
1420 PKG_CHECK_MODULES(MPLEX, mjpegtools >= 1.9.0, [
1421 dnl HACK because mplex 2.0.0 header files have a spurious 'include config.h'
1423 dnl switch over to c++ to test things
1425 OLD_CPPFLAGS="$CPPFLAGS"
1427 CPPFLAGS_GOOD="$CPPFLAGS $MPLEX_CFLAGS"
1428 CPPFLAGS="$CPPFLAGS_GOOD -I."
1429 AC_CHECK_HEADER(interact.hpp, [
1430 MPLEX_LIBS="$MPLEX_LIBS -lmplex2 $LIBM"
1432 LIBS="$LIBS $MPLEX_LIBS"
1433 OLD_LDFLAGS="$LDFLAGS"
1434 LDFLAGS="$LDFLAGS $MPLEX_LDFLAGS"
1435 dnl older libmplex uses off_t SegmentSize (), which leads to fuzzy ABI;
1436 dnl don't want this here
1437 AC_MSG_CHECKING([for valid mplex objects])
1438 AC_RUN_IFELSE([AC_LANG_SOURCE([[
1440 #include <interact.hpp>
1441 #include <outputstrm.hpp>
1442 #include <multiplexor.hpp>
1447 class TestOutputStream : public OutputStream {
1449 TestOutputStream () : OutputStream () { }
1450 void Write (uint8_t *a, unsigned int b) { }
1451 void NextSegment () { }
1452 uint64_t SegmentSize () { }
1456 MultiplexJob *job = new MultiplexJob ();
1457 vector<IBitStream *> inputs;
1458 job->SetupInputStreams (inputs);
1459 TestOutputStream *out = new TestOutputStream ();
1460 Multiplexor *mux = new Multiplexor(*job, *out, NULL);
1465 CPPFLAGS="$CPPFLAGS_GOOD"
1466 AC_SUBST(MPLEX_CFLAGS)
1467 AC_SUBST(MPLEX_LIBS)
1468 AC_SUBST(MPLEX_LDFLAGS)
1470 ],[AC_MSG_RESULT(no)],[])
1472 LDFLAGS="$OLD_LDFLAGS"
1474 CPPFLAGS="$OLD_CPPFLAGS"
1480 dnl *** musepack ***
1481 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSEPACK, true)
1482 AG_GST_CHECK_FEATURE(MUSEPACK, [musepackdec], musepack, [
1483 AC_CHECK_HEADER([mpc/mpcdec.h], [
1485 MUSEPACK_LIBS="-lmpcdec"
1486 AC_SUBST(MUSEPACK_LIBS)
1487 ], [AC_CHECK_HEADER([mpcdec/mpcdec.h], [
1489 MUSEPACK_LIBS="-lmpcdec"
1490 AC_DEFINE(MPC_IS_OLD_API, 1, [Define if the old MusePack API is used])
1491 AC_SUBST(MUSEPACK_LIBS)
1492 ], [HAVE_MUSEPACK="no"])])
1495 dnl *** musicbrainz ***
1496 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSICBRAINZ, true)
1497 AG_GST_CHECK_FEATURE(MUSICBRAINZ, [musicbrainz tag generation], musicbrainz, [
1498 PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.0, HAVE_MUSICBRAINZ="yes", HAVE_MUSICBRAINZ="no")
1499 AC_SUBST(MUSICBRAINZ_CFLAGS)
1500 AC_SUBST(MUSICBRAINZ_LIBS)
1504 translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
1505 AG_GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
1506 PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4 gmyth <= 0.7.99, HAVE_MYTHTV="yes", [
1509 AC_SUBST(GMYTH_CFLAGS)
1510 AC_SUBST(GMYTH_LIBS)
1514 translit(dnm, m, l) AM_CONDITIONAL(USE_NAS, true)
1515 AG_GST_CHECK_FEATURE(NAS, [nas plug-in], nassink, [
1518 if test "x$HAVE_X" = "xyes"; then
1519 save_cppflags=$CFLAGS
1520 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1521 AG_GST_CHECK_LIBHEADER(NAS, audio, AuOpenServer, $X_LIBS, audio/audiolib.h,
1522 NAS_LIBS="$X_LIBS -laudio" NAS_CFLAGS="$X_CFLAGS")
1523 CPPFLAGS="$save_cppflags"
1525 AC_SUBST(NAS_CFLAGS)
1530 translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true)
1531 AG_GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [
1532 PKG_CHECK_MODULES(NEON, neon >= 0.27.0 neon <= 0.29.99, HAVE_NEON="yes", [
1535 AC_SUBST(NEON_CFLAGS)
1540 translit(dnm, m, l) AM_CONDITIONAL(USE_OFA, true)
1541 AG_GST_CHECK_FEATURE(OFA, [ofa plugins], ofa, [
1542 PKG_CHECK_MODULES(OFA, libofa >= 0.9.3, HAVE_OFA="yes", [
1545 AC_SUBST(OFA_CFLAGS)
1550 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENAL, true)
1551 AG_GST_CHECK_FEATURE(OPENAL, [OpenAL plugin], openal, [
1552 PKG_CHECK_MODULES(OPENAL, openal, HAVE_OPENAL="yes", [
1555 AC_SUBST(OPENAL_CFLAGS)
1556 AC_SUBST(OPENAL_LIBS)
1560 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENCV, true)
1561 AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [
1562 dnl we specify a max. version too because we set CV_NO_BACKWARD_COMPATIBILITY
1563 dnl and don't want the build to break when a new opencv version comes out.
1564 dnl Need to adjust this upwards once we know that our code compiles fine with
1565 dnl a new version and the no-backward-compatibility define. (There doesn't
1566 dnl seem to be a switch to suppress the warnings the cvcompat.h header
1568 PKG_CHECK_MODULES(OPENCV, opencv >= 2.0.0 opencv <= 2.4.2 , [
1571 OLD_CPPFLAGS=$CPPFLAGS
1572 CPPFLAGS=$OPENCV_CFLAGS
1573 AC_CHECK_HEADERS([highgui.h opencv2/highgui/highgui_c.h])
1574 CPPFLAGS=$OLD_CPPFLAGS
1577 if test $ac_cv_header_highgui_h = "yes" -o $ac_cv_header_opencv2_highgui_highgui_c_h = "yes" ; then
1580 AC_MSG_RESULT([neither highgui.h nor opencv2/highgui/highgui_c.h could not be found])
1586 OPENCV_PREFIX="`$PKG_CONFIG --variable=prefix opencv`"
1587 AC_DEFINE_UNQUOTED(OPENCV_PREFIX, "$OPENCV_PREFIX", [opencv install prefix])
1588 AC_SUBST(OPENCV_PREFIX)
1589 AC_SUBST(OPENCV_CFLAGS)
1590 AC_SUBST(OPENCV_LIBS)
1594 translit(dnm, m, l) AM_CONDITIONAL(USE_OPUS, true)
1595 AG_GST_CHECK_FEATURE(OPUS, [opus], opus, [
1596 PKG_CHECK_MODULES(OPUS, opus >= 0.9.4, [
1597 AC_DEFINE([HAVE_OPUS], 1, [Define if Opus >= 0.9.4 is installed])
1602 AC_SUBST(OPUS_CFLAGS)
1607 translit(dnm, m, l) AM_CONDITIONAL(USE_PVR, true)
1608 AG_GST_CHECK_FEATURE(PVR, [pvrvideosink], pvr, [
1609 PKG_CHECK_MODULES([PVR], [libtimemmgr], HAVE_PVR=yes, HAVE_PVR=no)
1610 AC_SUBST(PVR_CFLAGS)
1614 AC_ARG_WITH([pvr-external-headers],
1615 AS_HELP_STRING([--with-pvr-external-headers],[Use system installed PVR2D headers]),
1616 [AS_IF([test "x$with_pvr_external_headers" = "xno"],
1617 [PVR_CFLAGS="$PVR_CFLAGS -I\$(srcdir)/pvr_includes"])],
1618 [PVR_CFLAGS="$PVR_CFLAGS -I\$(srcdir)/pvr_includes"])
1621 translit(dnm, m, l) AM_CONDITIONAL(USE_RSVG, true)
1622 AG_GST_CHECK_FEATURE(RSVG, [rsvg decoder], rsvg, [
1623 PKG_CHECK_MODULES(RSVG, librsvg-2.0 >= 2.14 cairo, [
1625 PKG_CHECK_MODULES(RSVG_2_35_0, librsvg-2.0 >= 2.35.0, HAVE_RSVG_2_35_0="yes", HAVE_RSVG_2_35_0="no")
1626 if test "x$HAVE_RSVG_2_35_0" = "xyes"; then
1627 AC_DEFINE(HAVE_RSVG_2_35_0, [1], [Have RSVG 2.35.0 or newer])
1632 AC_SUBST(RSVG_CFLAGS)
1637 AC_ARG_WITH([egl-window-system],
1638 AS_HELP_STRING([--with-egl-window-system],[EGL window system to use (x11, mali-fb, none)]),
1639 [EGL_WINDOW_SYSTEM="$withval"],
1640 [EGL_WINDOW_SYSTEM="none"])
1642 translit(dnm, m, l) AM_CONDITIONAL(USE_EGLGLES, true)
1643 AG_GST_CHECK_FEATURE(EGLGLES, [eglgles sink], eglgles, [
1646 case "$EGL_WINDOW_SYSTEM" in
1648 PKG_CHECK_MODULES(EGLGLES, egl glesv2, HAVE_EGLGLES="yes", [
1652 AC_CHECK_LIB([GLESv2], [glEnable],
1654 AC_CHECK_HEADER([GLES2/gl2.h],
1656 AC_CHECK_LIB([EGL], [eglGetProcAddress],
1658 AC_CHECK_HEADER([EGL/egl.h],
1661 EGLGLES_LIBS="-lGLESv2 -lEGL"
1671 if test x"$HAVE_EGLGLES" = x"yes" -a x"$EGL_WINDOW_SYSTEM" = x"x11"; then
1672 if test x"$HAVE_X11" != x"yes"; then
1673 AC_MSG_ERROR([libX11 not found and is required for EGL X11 window system])
1675 AC_DEFINE(USE_EGL_X11, [1], [Use X11 EGL window system])
1676 EGLGLES_CFLAGS="$EGLGLES_CFLAGS $X11_CFLAGS"
1677 EGLGLES_LIBS="$EGLGLES_LIBS $X11_LIBS"
1683 AC_CHECK_HEADER([EGL/fbdev_window.h],
1689 AC_CHECK_LIB([Mali], [mali_image_create],
1692 AC_CHECK_LIB([GLESv2], [glEnable],
1694 AC_CHECK_HEADER([GLES2/gl2.h],
1696 AC_CHECK_LIB([EGL], [eglGetProcAddress],
1698 AC_CHECK_HEADER([EGL/egl.h],
1701 EGLGLES_LIBS="-lGLESv2 -lEGL -lMali -lUMP"
1703 AC_DEFINE(USE_EGL_MALI_FB, [1], [Use Mali FB EGL window system])
1715 AC_MSG_ERROR([invalid EGL window system specified])
1719 AC_SUBST(EGLGLES_CFLAGS)
1720 AC_SUBST(EGLGLES_LIBS)
1723 dnl *** timidity ***
1724 translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true)
1725 AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
1726 PKG_CHECK_MODULES(TIMIDITY, libtimidity, [
1727 HAVE_TIMIDITY="yes",
1728 AC_MSG_CHECKING([for timidity.cfg])
1730 if test -r /etc/timidity.cfg; then
1731 timidity_cfg=/etc/timidity.cfg
1732 elif test -r /etc/timidity/timidity.cfg; then
1733 timidity_cfg=/etc/timidity/timidity.cfg
1734 elif test -r /usr/share/timidity/timidity.cfg; then
1735 timidity_cfg=/usr/share/timidity/timidity.cfg
1736 elif test -r /usr/local/share/timidity/timidity.cfg; then
1737 timidity_cfg=/usr/local/share/timidity/timidity.cfg
1739 if test "x$timidity_cfg" != "x"; then
1740 AC_MSG_RESULT($timidity_cfg)
1741 AC_DEFINE_UNQUOTED(TIMIDITY_CFG, "$timidity_cfg", [Define location of timidity.cfg])
1743 AC_MSG_RESULT([not found])
1748 AC_SUBST(TIMIDITY_CFLAGS)
1749 AC_SUBST(TIMIDITY_LIBS)
1752 dnl *** teletextdec ***
1753 translit(dnm, m, l) AM_CONDITIONAL(USE_TELETEXTDEC, true)
1754 AG_GST_CHECK_FEATURE(TELETEXTDEC, [Teletext decoder], teletextdec, [
1755 AG_GST_PKG_CHECK_MODULES(TELETEXTDEC, zvbi-0.2)
1758 dnl *** wildmidi ***
1759 translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
1760 AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
1761 AG_GST_CHECK_LIBHEADER(WILDMIDI, WildMidi,
1764 WILDMIDI_LIBS="-lWildMidi")
1765 AC_CHECK_LIB(WildMidi, WildMidi_LoadSamples, AC_DEFINE(HAVE_WILDMIDI_0_2_2, [1], [Have WildMidi 0.2.2 or earlier library]))
1767 if test "x$HAVE_WILDMIDI" = "xyes"; then
1769 WILDMIDI_LIBS=-lWildMidi
1770 AC_MSG_NOTICE(compiling gstWildMidi)
1774 AC_MSG_WARN(no WildMidi library found (libWildMidi))
1776 AC_SUBST(WILDMIDI_CFLAGS)
1777 AC_SUBST(WILDMIDI_LIBS)
1781 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
1782 AG_GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink sdlaudiosink, [
1783 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
1787 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
1788 AG_GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [
1789 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.16, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
1790 AC_SUBST(SNDFILE_CFLAGS)
1791 AC_SUBST(SNDFILE_LIBS)
1794 dnl *** soundtouch ***
1795 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUNDTOUCH, true)
1796 AG_GST_CHECK_FEATURE(SOUNDTOUCH, [soundtouch plug-in], soundtouch, [
1797 dnl We only need -lBPM on soundtouch < 1.4
1798 dnl We check for libSoundTouch since Debian used it before upstream
1799 dnl added a pkgconfig file.
1800 HAVE_SOUNDTOUCH_1_4=yes
1801 PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch,
1802 [HAVE_SOUNDTOUCH=yes],
1803 [PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.4,
1804 [HAVE_SOUNDTOUCH=yes],
1805 [PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0,
1806 [HAVE_SOUNDTOUCH=yes
1807 HAVE_SOUNDTOUCH_1_4=no
1808 SOUNDTOUCH_LIBS="$SOUNDTOUCH_LIBS -lBPM"],
1809 [PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch >= 1.4,
1810 [HAVE_SOUNDTOUCH=yes],
1811 [PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch,
1812 [HAVE_SOUNDTOUCH=yes
1813 HAVE_SOUNDTOUCH_1_4=no
1814 SOUNDTOUCH_LIBS="$SOUNDTOUCH_LIBS -lBPM"],
1815 HAVE_SOUNDTOUCH=no)])])])])
1816 AC_SUBST(SOUNDTOUCH_CFLAGS)
1817 AC_SUBST(SOUNDTOUCH_LIBS)
1818 if test "x$HAVE_CXX" != "xyes"; then
1819 USE_SOUNDTOUCH=false
1820 AC_MSG_NOTICE([Not building soundtouch plugin: no C++ compiler found])
1822 if test "x$HAVE_SOUNDTOUCH" = "xyes" -a "x$HAVE_SOUNDTOUCH_1_4" = "xyes"; then
1823 AC_DEFINE([HAVE_SOUNDTOUCH_1_4], [1],
1824 [Defined if the available libSoundTouch is >= 1.4])
1829 translit(dnm, m, l) AM_CONDITIONAL(USE_SPC, true)
1830 AG_GST_CHECK_FEATURE(SPC, [spc decoder], spc, [
1831 AC_CHECK_HEADER(openspc.h, [
1832 AC_CHECK_LIB(openspc, OSPC_Init, [
1833 SPC_LIBS="-lopenspc"
1845 translit(dnm, m, l) AM_CONDITIONAL(USE_GME, true)
1846 AG_GST_CHECK_FEATURE(GME, [gme decoder], gme, [
1847 AC_CHECK_HEADER(gme/gme.h, [
1848 AC_CHECK_LIB(gme, gme_new_emu, [
1859 if test "x$HAVE_GME" = "xyes"; then
1860 AC_CHECK_LIB(gme, gme_enable_accuracy, [
1861 AC_DEFINE(HAVE_LIBGME_ACCURACY, 1, [Define if gme 0.5.6 or newer is available])
1867 translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
1868 AG_GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
1869 PKG_CHECK_MODULES(SWFDEC, swfdec-0.3 >= 0.3.6, HAVE_SWFDEC=yes, [
1872 AC_SUBST(SWFDEC_CFLAGS)
1873 AC_SUBST(SWFDEC_LIBS)
1877 translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true)
1878 AG_GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [
1880 AC_CHECK_HEADER(xvid.h, [
1882 LIBS="-lpthread $LIBM"
1883 AC_CHECK_LIB(xvidcore, xvid_encore, [
1884 AC_CHECK_LIB(xvidcore, xvid_decore, [
1885 AC_CHECK_LIB(xvidcore, xvid_global, [
1886 AC_MSG_CHECKING([for uptodate XviD API version])
1887 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <xvid.h>]], [[
1888 #if XVID_API_MAJOR(XVID_API) != 4
1889 #error "Incompatible XviD API version"
1891 #if XVID_API_MAJOR(XVID_API) == 4 && XVID_API_MINOR(XVID_API) < 3
1892 #error "Incompatible XviD API version"
1894 ]])],[ AC_MSG_RESULT(yes)
1895 XVID_LIBS="-lxvidcore $LIBM"
1898 ],[AC_MSG_RESULT(no) ])
1907 translit(dnm, m, l) AM_CONDITIONAL(USE_DVB, true)
1908 AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [
1909 AC_MSG_CHECKING([Checking for up to date dvb installation])
1910 AC_CHECK_HEADER(linux/dvb/frontend.h, [HAVE_DVB="yes"], [HAVE_DVB="no"])
1914 translit(dnm, m, l) AM_CONDITIONAL(USE_WININET, true)
1915 AG_GST_CHECK_FEATURE(WININET, [Windows internet library], wininet, [
1916 AC_MSG_CHECKING([Checking for windows internet support])
1917 AC_CHECK_HEADERS([windows.h wininet.h],
1918 [HAVE_WININET="yes"], [HAVE_WININET="no"],
1919 [AC_INCLUDES_DEFAULT
1920 #include <windows.h>])
1924 translit(dnm, m, l) AM_CONDITIONAL(USE_ACM, true)
1925 AG_GST_CHECK_FEATURE(ACM, [Windows ACM library], acm, [
1926 AC_MSG_CHECKING([Checking for ACM support])
1927 AC_CHECK_HEADERS([windows.h msacm.h],
1929 AC_SUBST(ACMENC_CFLAGS)
1930 AC_SUBST(ACMMP3DEC_CFLAGS)
1932 [AC_INCLUDES_DEFAULT
1933 #include <windows.h>])
1937 translit(dnm, m, l) AM_CONDITIONAL(USE_VDPAU, true)
1938 AG_GST_CHECK_FEATURE(VDPAU, [VDPAU], vdpau, [
1943 PKG_CHECK_MODULES(VDPAU, vdpau, [HAVE_VDPAU="yes"],
1945 if test "$HAVE_VDPAU" = "no"; then
1946 saved_CPPFLAGS="$CPPFLAGS"
1947 AC_CHECK_HEADER([vdpau/vdpau.h], [HAVE_VDPAU_H=yes])
1949 if test -z "$HAVE_VDPAU_H"; then
1950 dnl Didn't find VDPAU header straight away.
1951 dnl Try /usr/include/nvidia. Need to clear caching vars first
1952 AC_MSG_NOTICE([VDPAU header not in standard path. Checking /usr/include/nvidia])
1953 unset ac_cv_header_vdpau_vdpau_h
1954 unset ac_cv_header_vdpau_vdpau_x11_h
1955 VDPAU_CFLAGS="-I/usr/include/nvidia"
1956 VDPAU_LIBS="-L/usr/lib/nvidia -lvdpau"
1957 CPPFLAGS="$VDPAU_CFLAGS $saved_CPPFLAGS"
1958 AC_CHECK_HEADER([vdpau/vdpau.h], [HAVE_VDPAU_H=yes])
1961 AC_CHECK_HEADER([vdpau/vdpau_x11.h], [HAVE_VDPAU_X11_H=yes])
1963 if test "x$HAVE_VDPAU_H" = "xyes" -a "x$HAVE_VDPAU_X11_H" = "xyes"; then
1964 dnl Found the headers - look for the lib
1965 AC_MSG_NOTICE([VDPAU headers found. Checking libraries])
1967 LIBS="$VDPAU_LIBS $saved_LIBS"
1968 AC_CHECK_LIB(vdpau,vdp_device_create_x11,[HAVE_VDPAU="yes"])
1974 if test "$HAVE_VDPAU" = "yes"; then
1975 AC_MSG_NOTICE([Found up to date VDPAU installation])
1976 AC_SUBST(VDPAU_CFLAGS)
1977 AC_SUBST(VDPAU_LIBS)
1981 dnl *** schroedinger ***
1982 translit(dnm, m, l) AM_CONDITIONAL(USE_SCHRO, true)
1983 AG_GST_CHECK_FEATURE(SCHRO, [Schroedinger video codec], schro, [
1984 AG_GST_PKG_CHECK_MODULES(SCHRO, schroedinger-1.0 >= 1.0.10)
1988 translit(dnm, m, l) AM_CONDITIONAL(USE_ZBAR, true)
1989 AG_GST_CHECK_FEATURE(ZBAR, [ZBar barcode detector], zbar, [
1990 AG_GST_PKG_CHECK_MODULES(ZBAR, zbar >= 0.9)
1994 translit(dnm, m, l) AM_CONDITIONAL(USE_RTMP, true)
1995 AG_GST_CHECK_FEATURE(RTMP, [rtmp library], rtmp, [
1996 AG_GST_PKG_CHECK_MODULES(RTMP, librtmp)
2000 translit(dnm, m, l) AM_CONDITIONAL(USE_SPANDSP, true)
2001 AG_GST_CHECK_FEATURE(SPANDSP, [Spandsp], spandsp, [
2002 PKG_CHECK_MODULES(SPANDSP, spandsp >= 0.0.6, [
2003 HAVE_SPANDSP="yes" ], [
2007 AC_SUBST(SPANDSP_CFLAGS)
2008 AC_SUBST(SPANDSP_LIBS)
2010 dnl *** GSettings ***
2011 translit(dnm, m, l) AM_CONDITIONAL(USE_GSETTINGS, true)
2012 AG_GST_CHECK_FEATURE(GSETTINGS, [GSettings plugin], gsettings, [
2013 AG_GST_PKG_CHECK_MODULES(GSETTINGS, gio-2.0 >= 2.25.0)
2014 if test "x$HAVE_GSETTINGS" = "xyes"; then
2020 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDIO, true)
2021 AG_GST_CHECK_FEATURE(SNDIO, [sndio audio], sndio, [
2022 AC_CHECK_HEADER(sndio.h, HAVE_SNDIO="yes", HAVE_SNDIO="no")
2023 if test "x$HAVE_SNDIO" = "xyes"; then
2024 AC_CHECK_LIB(sndio, sio_open, HAVE_SNDIO="yes", HAVE_SNDIO="no")
2025 if test "x$HAVE_SNDIO" = "xyes"; then
2027 AC_SUBST(SNDIO_LIBS)
2034 dnl not building plugins with external dependencies,
2035 dnl but we still need to set the conditionals
2037 AM_CONDITIONAL(USE_ASSRENDER, false)
2038 AM_CONDITIONAL(USE_VOAMRWBENC, false)
2039 AM_CONDITIONAL(USE_VOAACENC, false)
2040 AM_CONDITIONAL(USE_APEXSINK, false)
2041 AM_CONDITIONAL(USE_BZ2, false)
2042 AM_CONDITIONAL(USE_CDAUDIO, false)
2043 AM_CONDITIONAL(USE_CELT, false)
2044 AM_CONDITIONAL(USE_CHROMAPRINT, false)
2045 AM_CONDITIONAL(USE_COG, false)
2046 AM_CONDITIONAL(USE_CURL, false)
2047 AM_CONDITIONAL(USE_DC1394, false)
2048 AM_CONDITIONAL(USE_DECKLINK, false)
2049 AM_CONDITIONAL(DECKLINK_OSX, false)
2050 AM_CONDITIONAL(USE_DIRECTFB, false)
2051 AM_CONDITIONAL(USE_WAYLAND, false)
2052 AM_CONDITIONAL(USE_DIRAC, false)
2053 AM_CONDITIONAL(USE_DTS, false)
2054 AM_CONDITIONAL(USE_EXIF, false)
2055 AM_CONDITIONAL(USE_RESINDVD, false)
2056 AM_CONDITIONAL(USE_FAAC, false)
2057 AM_CONDITIONAL(USE_FAAD, false)
2058 AM_CONDITIONAL(USE_FBDEV, false)
2059 AM_CONDITIONAL(USE_FLITE, false)
2060 AM_CONDITIONAL(USE_GSM, false)
2061 AM_CONDITIONAL(USE_JASPER, false)
2062 AM_CONDITIONAL(USE_OPENJPEG, false)
2063 AM_CONDITIONAL(USE_KATE, false)
2064 AM_CONDITIONAL(USE_TIGER, false)
2065 AM_CONDITIONAL(USE_LADSPA, false)
2066 AM_CONDITIONAL(USE_LV2, false)
2067 AM_CONDITIONAL(USE_LIBMMS, false)
2068 AM_CONDITIONAL(USE_LINSYS, false)
2069 AM_CONDITIONAL(USE_MODPLUG, false)
2070 AM_CONDITIONAL(USE_MIMIC, false)
2071 AM_CONDITIONAL(USE_MPEG2ENC, false)
2072 AM_CONDITIONAL(USE_MPG123, false)
2073 AM_CONDITIONAL(USE_MPLEX, false)
2074 AM_CONDITIONAL(USE_MUSEPACK, false)
2075 AM_CONDITIONAL(USE_MUSICBRAINZ, false)
2076 AM_CONDITIONAL(USE_MYTHTV, false)
2077 AM_CONDITIONAL(USE_NAS, false)
2078 AM_CONDITIONAL(USE_NEON, false)
2079 AM_CONDITIONAL(USE_OFA, false)
2080 AM_CONDITIONAL(USE_OPENAL, false)
2081 AM_CONDITIONAL(USE_OPENCV, false)
2082 AM_CONDITIONAL(USE_OPUS, false)
2083 AM_CONDITIONAL(USE_PVR, false)
2084 AM_CONDITIONAL(USE_RSVG, false)
2085 AM_CONDITIONAL(USE_TIMIDITY, false)
2086 AM_CONDITIONAL(USE_WILDMIDI, false)
2087 AM_CONDITIONAL(USE_SDL, false)
2088 AM_CONDITIONAL(USE_SNDFILE, false)
2089 AM_CONDITIONAL(USE_SOUNDTOUCH, false)
2090 AM_CONDITIONAL(USE_SPANDSP, false)
2091 AM_CONDITIONAL(USE_SPC, false)
2092 AM_CONDITIONAL(USE_GME, false)
2093 AM_CONDITIONAL(USE_GSETTINGS, false)
2094 AM_CONDITIONAL(USE_SWFDEC, false)
2095 AM_CONDITIONAL(USE_XVID, false)
2096 AM_CONDITIONAL(USE_DVB, false)
2097 AM_CONDITIONAL(USE_WININET, false)
2098 AM_CONDITIONAL(USE_ACM, false)
2099 AM_CONDITIONAL(USE_VDPAU, false)
2100 AM_CONDITIONAL(USE_SCHRO, false)
2101 AM_CONDITIONAL(USE_ZBAR, false)
2102 AM_CONDITIONAL(USE_RTMP, false)
2103 AM_CONDITIONAL(USE_TELETEXTDEC, false)
2104 AM_CONDITIONAL(USE_SNDIO, false)
2105 AM_CONDITIONAL(USE_UVCH264, false)
2107 fi dnl of EXT plugins
2109 dnl *** finalize CFLAGS, LDFLAGS, LIBS
2112 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
2113 dnl GST_*: flags shared by built objects to link against GStreamer
2114 dnl GST_ALL_LDFLAGS: linker flags shared by all
2115 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
2116 dnl GST_LT_LDFLAGS: library versioning of our libraries
2117 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
2119 dnl GST_OPTION_CFLAGS
2120 if test "x$USE_DEBUG" = xyes; then
2123 AC_SUBST(PROFILE_CFLAGS)
2125 if test "x$PACKAGE_VERSION_NANO" = "x1"; then
2126 dnl Define _only_ during CVS (not pre-releases or releases)
2127 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
2129 DEPRECATED_CFLAGS=""
2131 AC_SUBST(DEPRECATED_CFLAGS)
2133 dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden
2134 dnl at make time with e.g. make ERROR_CFLAGS=""
2135 GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
2136 GST_OPTION_CXXFLAGS="\$(WARNING_CXXFLAGS) \$(ERROR_CXXFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
2137 GST_OPTION_OBJCFLAGS="\$(WARNING_OBJCFLAGS) \$(ERROR_OBJCFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
2138 AC_SUBST(GST_OPTION_CFLAGS)
2139 AC_SUBST(GST_OPTION_CXXFLAGS)
2140 AC_SUBST(GST_OPTION_OBJCFLAGS)
2142 dnl FIXME: do we want to rename to GST_ALL_* ?
2143 dnl prefer internal headers to already installed ones
2144 dnl also add builddir include for enumtypes and marshal
2145 dnl add GST_OPTION_CFLAGS, but overridable
2146 GST_CFLAGS="$GST_CFLAGS -DGST_USE_UNSTABLE_API"
2147 GST_CXXFLAGS="$GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CXXFLAGS)"
2148 GST_OBJCFLAGS="$GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_OBJCFLAGS)"
2149 GST_CFLAGS="$GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CFLAGS)"
2150 AC_SUBST(GST_CFLAGS)
2151 AC_SUBST(GST_CXXFLAGS)
2152 AC_SUBST(GST_OBJCFLAGS)
2154 GST_PLUGINS_BAD_CXXFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs"
2155 GST_PLUGINS_BAD_OBJCFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs"
2156 GST_PLUGINS_BAD_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs"
2157 AC_SUBST(GST_PLUGINS_BAD_CFLAGS)
2158 AC_SUBST(GST_PLUGINS_BAD_CXXFLAGS)
2159 AC_SUBST(GST_PLUGINS_BAD_OBJCFLAGS)
2161 dnl LDFLAGS really should only contain flags, not libs - they get added before
2162 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
2163 GST_ALL_LDFLAGS="-no-undefined"
2164 AC_SUBST(GST_ALL_LDFLAGS)
2167 dnl linker flags shared by all libraries
2168 dnl LDFLAGS modifier defining exported symbols from built libraries
2169 dnl (export _gst_foo but not __gst_foo)
2170 GST_LIB_LDFLAGS="-export-symbols-regex ^_?\(gst_\|Gst\|GST_\).*"
2171 AC_SUBST(GST_LIB_LDFLAGS)
2173 dnl this really should only contain flags, not libs - they get added before
2174 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
2175 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc.*' $GST_ALL_LDFLAGS"
2176 AC_SUBST(GST_PLUGIN_LDFLAGS)
2178 dnl *** output files ***
2186 gst-plugins-bad.spec
2188 gst/accurip/Makefile
2189 gst/adpcmdec/Makefile
2190 gst/adpcmenc/Makefile
2193 gst/audiovisualizers/Makefile
2194 gst/autoconvert/Makefile
2196 gst/camerabin2/Makefile
2197 gst/cdxaparse/Makefile
2198 gst/coloreffects/Makefile
2199 gst/dataurisrc/Makefile
2201 gst/debugutils/Makefile
2203 gst/dvbsuboverlay/Makefile
2205 gst/faceoverlay/Makefile
2206 gst/festival/Makefile
2207 gst/fieldanalysis/Makefile
2208 gst/freeverb/Makefile
2210 gst/gaudieffects/Makefile
2211 gst/geometrictransform/Makefile
2213 gst/hdvparse/Makefile
2217 gst/interlace/Makefile
2218 gst/ivfparse/Makefile
2219 gst/jp2kdecimator/Makefile
2220 gst/jpegformat/Makefile
2222 gst/liveadder/Makefile
2223 gst/mpegdemux/Makefile
2224 gst/mpegtsdemux/Makefile
2225 gst/mpegtsmux/Makefile
2226 gst/mpegtsmux/tsmux/Makefile
2227 gst/mpegpsmux/Makefile
2231 gst/nuvdemux/Makefile
2232 gst/patchdetect/Makefile
2233 gst/pcapparse/Makefile
2235 gst/rawparse/Makefile
2237 gst/removesilence/Makefile
2240 gst/segmentclip/Makefile
2247 gst/videofilters/Makefile
2248 gst/videomeasure/Makefile
2249 gst/videoparsers/Makefile
2250 gst/videosignal/Makefile
2254 gst-libs/gst/Makefile
2255 gst-libs/gst/basecamerabinsrc/Makefile
2256 gst-libs/gst/interfaces/Makefile
2257 gst-libs/gst/signalprocessor/Makefile
2258 gst-libs/gst/codecparsers/Makefile
2259 gst-libs/gst/video/Makefile
2261 sys/dshowdecwrapper/Makefile
2263 sys/acmmp3dec/Makefile
2264 sys/androidmedia/Makefile
2265 sys/applemedia/Makefile
2267 sys/d3dvideosink/Makefile
2268 sys/decklink/Makefile
2269 sys/directdraw/Makefile
2270 sys/directsound/Makefile
2271 sys/dshowsrcwrapper/Makefile
2272 sys/dshowvideosink/Makefile
2276 sys/opensles/Makefile
2277 sys/osxvideo/Makefile
2278 sys/qtwrapper/Makefile
2281 sys/uvch264/Makefile
2284 sys/vdpau/gstvdp/Makefile
2285 sys/vdpau/basevideodecoder/Makefile
2288 sys/wininet/Makefile
2290 sys/winscreencap/Makefile
2292 tests/check/Makefile
2293 tests/files/Makefile
2294 tests/examples/Makefile
2295 tests/examples/camerabin2/Makefile
2296 tests/examples/directfb/Makefile
2297 tests/examples/mxf/Makefile
2298 tests/examples/opencv/Makefile
2299 tests/examples/uvch264/Makefile
2300 tests/icles/Makefile
2301 ext/voamrwbenc/Makefile
2302 ext/voaacenc/Makefile
2303 ext/assrender/Makefile
2304 ext/apexsink/Makefile
2306 ext/cdaudio/Makefile
2308 ext/chromaprint/Makefile
2313 ext/directfb/Makefile
2314 ext/wayland/Makefile
2316 ext/eglgles/Makefile
2327 ext/modplug/Makefile
2328 ext/mpeg2enc/Makefile
2332 ext/musepack/Makefile
2333 ext/musicbrainz/Makefile
2340 ext/openjpeg/Makefile
2343 ext/resindvd/Makefile
2345 ext/schroedinger/Makefile
2347 ext/sndfile/Makefile
2348 ext/soundtouch/Makefile
2349 ext/spandsp/Makefile
2351 ext/teletextdec/Makefile
2353 ext/gsettings/Makefile
2354 ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml
2357 ext/timidity/Makefile
2362 docs/plugins/Makefile
2364 docs/version.entities
2366 pkgconfig/gstreamer-plugins-bad.pc
2367 pkgconfig/gstreamer-plugins-bad-uninstalled.pc
2368 pkgconfig/gstreamer-codecparsers.pc
2369 pkgconfig/gstreamer-codecparsers-uninstalled.pc
2370 pkgconfig/gstreamer-basevideo.pc
2371 pkgconfig/gstreamer-basevideo-uninstalled.pc
2374 win32/common/config.h
2378 AG_GST_OUTPUT_PLUGINS