3 dnl initialize autoconf
4 dnl when going to/from release please set the nano (fourth number) right !
5 dnl releases only do Wall, git and prerelease does Werror too
6 AC_INIT([GStreamer Bad Plug-ins],[1.17.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.14 no-dist-gzip dist-xz tar-ustar subdir-objects])
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([gst/aiff/aiff.c])
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 PKG_CONFIG_SYSROOT_DIR is a valid environment variable
37 m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
39 dnl our libraries and install dirs use GST_API_VERSION in the filename
40 dnl to allow side-by-side installation of different API versions
42 AC_SUBST(GST_API_VERSION)
43 AC_DEFINE_UNQUOTED(GST_API_VERSION, "$GST_API_VERSION",
44 [GStreamer API Version])
46 AG_GST_LIBTOOL_PREPARE
48 dnl CURRENT, REVISION, AGE
49 dnl - library source changed -> increment REVISION
50 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
51 dnl - interfaces added -> increment AGE
52 dnl - interfaces removed -> AGE = 0
53 dnl sets GST_LT_LDFLAGS
54 AS_LIBTOOL(GST, 1700, 0, 1700)
56 dnl *** required versions of GStreamer stuff ***
60 dnl *** autotools stuff ****
62 dnl allow for different autotools
63 AS_AUTOTOOLS_ALTERNATE
65 dnl Add parameters for aclocal
66 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
69 dnl the version check needs to stay here because autopoint greps for it
70 AM_GNU_GETTEXT_VERSION([0.17])
71 AM_GNU_GETTEXT([external])
72 AG_GST_GETTEXT([gst-plugins-bad-$GST_API_VERSION])
74 dnl *** check for arguments to configure ***
76 AG_GST_ARG_DISABLE_FATAL_WARNINGS
77 AG_GST_ARG_ENABLE_EXTRA_CHECKS
86 AG_GST_ARG_WITH_PKG_CONFIG_PATH
87 AG_GST_ARG_WITH_PACKAGE_NAME
88 AG_GST_ARG_WITH_PACKAGE_ORIGIN
90 AG_GST_ARG_WITH_PLUGINS
92 AG_GST_ARG_ENABLE_EXTERNAL
94 AG_GST_ARG_ENABLE_EXPERIMENTAL
96 AG_GST_PKG_CONFIG_PATH
98 dnl *** checks for platform ***
101 dnl * hardware/architecture *
103 dnl common/m4/gst-arch.m4
107 dnl Determine endianness
112 dnl check for large file support
113 dnl affected plugins must include config.h
116 dnl *** checks for programs ***
122 dnl determine c++ compiler
124 dnl determine if c++ is available on this system
125 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
129 dnl check if the compiler supports '-c' and '-o' options
132 dnl check if the compiler supports do while(0) macros
133 AG_GST_CHECK_DOWHILE_MACROS
135 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
136 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
138 dnl check for gobject-introspection
139 GOBJECT_INTROSPECTION_CHECK([1.31.1])
141 dnl *** checks for libraries ***
143 dnl check for libm, for sin() etc.
149 dnl check for pthreads
152 dnl *** checks for header files ***
154 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
155 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
157 if test "x$HAVE_UNISTD_H" != "xyes"; then
158 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
161 AC_CHECK_HEADERS([sys/time.h])
166 AC_CHECK_HEADERS([pthread.h], HAVE_PTHREAD_H=yes)
167 AM_CONDITIONAL(HAVE_PTHREAD_H, test "x$HAVE_PTHREAD_H" = "xyes")
169 dnl *** checks for types/defines ***
171 dnl *** checks for structures ***
173 dnl *** checks for compiler characteristics ***
175 dnl *** checks for library functions ***
176 AC_CHECK_FUNCS([gmtime_r pipe2])
178 dnl *** checks for headers ***
179 AC_CHECK_HEADERS([sys/utsname.h])
181 dnl *** checks for dependency libraries ***
183 dnl *** checks for socket and nsl libraries ***
184 AC_CHECK_FUNC(socket,,[AC_CHECK_LIB(socket,socket)])
185 AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
189 AG_GST_GLIB_CHECK([$GLIB_REQ])
191 dnl Needed by plugins that use g_module_*() API
192 PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0)
194 dnl checks for gstreamer
195 dnl uninstalled is selected preferentially -- see pkg-config(1)
196 AG_GST_CHECK_GST($GST_API_VERSION, [$GST_REQ], yes)
197 AG_GST_CHECK_GST_BASE($GST_API_VERSION, [$GST_REQ], yes)
198 AG_GST_CHECK_GST_CHECK($GST_API_VERSION, [$GST_REQ], no)
199 AG_GST_CHECK_GST_CONTROLLER($GST_API_VERSION, [$GST_REQ], yes)
200 AG_GST_CHECK_GST_NET($GST_API_VERSION, [$GST_REQ], yes)
201 AG_GST_PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-[$GST_API_VERSION], [$GSTPB_REQ], yes)
202 AG_GST_PKG_CHECK_MODULES(GST_AUDIO, gstreamer-audio-[$GST_API_VERSION], [$GSTPB_REQ], yes)
203 AG_GST_PKG_CHECK_MODULES(GST_PBUTILS, gstreamer-pbutils-[$GST_API_VERSION], [$GSTPB_REQ], yes)
204 AG_GST_PKG_CHECK_MODULES(GST_GL, gstreamer-gl-[$GST_API_VERSION], [$GSTPB_REQ], no)
205 AG_GST_PKG_CHECK_MODULES(GST_SDP, gstreamer-sdp-[$GST_API_VERSION], [$GSTPB_REQ], yes)
207 if test "x$HAVE_GST_GL" = "xyes"; then
209 AC_MSG_CHECKING([GStreamer OpenGL window systems ...])
210 GST_GL_WINSYS=`$PKG_CONFIG --variable=gl_winsys gstreamer-gl-1.0`
211 AC_MSG_RESULT([$GST_GL_WINSYS])
212 GST_GL_HAVE_WINDOW_X11=""
213 GST_GL_HAVE_WINDOW_WAYLAND=""
214 GST_GL_HAVE_WINDOW_ANDROID=""
215 GST_GL_HAVE_WINDOW_COCOA=""
216 GST_GL_HAVE_WINDOW_EAGL=""
217 case "$GST_GL_WINSYS" in *x11*) GST_GL_HAVE_WINDOW_X11="1" ;; esac
218 case "$GST_GL_WINSYS" in *wayland*) GST_GL_HAVE_WINDOW_WAYLAND="1" ;; esac
219 case "$GST_GL_WINSYS" in *android*) GST_GL_HAVE_WINDOW_ANDROID="1" ;; esac
220 case "$GST_GL_WINSYS" in *cocoa*) GST_GL_HAVE_WINDOW_COCOA="1" ;; esac
221 case "$GST_GL_WINSYS" in *eagl*) GST_GL_HAVE_WINDOW_EAGL="1" ;; esac
223 AC_MSG_CHECKING([GStreamer OpenGL platforms ...])
224 GST_GL_PLATFORMS=`$PKG_CONFIG --variable=gl_platforms gstreamer-gl-1.0`
225 AC_MSG_RESULT([$GST_GL_PLATFORMS])
226 GST_GL_HAVE_PLATFORM_GLX=""
227 GST_GL_HAVE_PLATFORM_EGL=""
228 GST_GL_HAVE_PLATFORM_CGL=""
229 GST_GL_HAVE_PLATFORM_EAGL=""
230 case "$GST_GL_PLATFORMS" in *glx*) GST_GL_HAVE_PLATFORM_GLX="1" ;; esac
231 case "$GST_GL_PLATFORMS" in *egl*) GST_GL_HAVE_PLATFORM_EGL="1" ;; esac
232 case "$GST_GL_PLATFORMS" in *cgl*) GST_GL_HAVE_PLATFORM_CGL="1" ;; esac
233 case "$GST_GL_PLATFORMS" in *eagl*) GST_GL_HAVE_PLATFORM_EAGL="1" ;; esac
235 AC_MSG_CHECKING([GStreamer OpenGL apis ...])
236 GST_GL_APIS=`$PKG_CONFIG --variable=gl_apis gstreamer-gl-1.0`
237 AC_MSG_RESULT([$GST_GL_APIS])
238 GST_GL_HAVE_API_GLES2=""
239 GST_GL_HAVE_API_GL=""
240 case "$GST_GL_APIS" in *gles2*) GST_GL_HAVE_API_GLES2="1" ;; esac
241 case "$GST_GL_APIS" in "gl"|"gl "*|*" gl"|*" gl "*) GST_GL_HAVE_API_GL="1" ;; esac
243 AM_CONDITIONAL(USE_OPENGL, test "x$GST_GL_HAVE_API_GL" = "x1")
245 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
247 AG_GST_CHECK_GST_PLUGINS_BASE($GST_API_VERSION, [$GSTPB_REQ], yes)
249 dnl check for uninstalled plugin directories for unit tests
250 AG_GST_CHECK_UNINSTALLED_SETUP([
251 AG_GST_CHECK_GST_PLUGINS_GOOD($GST_API_VERSION, [$GSTPB_REQ])
252 AG_GST_CHECK_GST_PLUGINS_UGLY($GST_API_VERSION, [$GSTPB_REQ])
253 AG_GST_CHECK_GST_PLUGINS_LIBAV($GST_API_VERSION, [$GSTPB_REQ])
256 dnl Check for documentation xrefs
257 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
258 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
259 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_API_VERSION`"
260 AC_SUBST(GLIB_PREFIX)
262 AC_SUBST(GSTPB_PREFIX)
264 dnl GTK is optional and used in examples
268 if test "x$BUILD_EXAMPLES" = "xyes"; then
269 AC_MSG_CHECKING([which gtk+ version to compile examples against (optional)])
271 AS_HELP_STRING([--with-gtk=3.0|2.0],[which gtk+ version to compile against (default: 2.0)]),
273 2.0) GTK_REQ=$GTK2_REQ ;;
274 3.0) GTK_REQ=$GTK3_REQ ;;
275 *) AC_MSG_ERROR([invalid gtk+ version specified]);;
279 AC_MSG_RESULT([$with_gtk (>= $GTK_REQ)])
280 PKG_CHECK_MODULES(GTK, gtk+-x11-$with_gtk >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
284 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
286 dnl Check for -Bsymbolic-functions linker flag used to avoid
287 dnl intra-library PLT jumps, if available.
288 AC_ARG_ENABLE(Bsymbolic,
289 [AS_HELP_STRING([--disable-Bsymbolic],[avoid linking with -Bsymbolic])],,
290 [SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}"
291 AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
292 LDFLAGS=-Wl,-Bsymbolic-functions
294 AC_TRY_LINK([], [return 0],
296 enable_Bsymbolic=yes,
299 LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"])
301 dnl *** set variables based on configure arguments ***
303 dnl GTK is optional and used in examples
306 if test "x$BUILD_EXAMPLES" = "xyes"; then
307 PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.4, HAVE_GTK3=yes, HAVE_GTK3=no)
308 if test "x$HAVE_GTK3" = "xyes"; then
310 GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
311 AC_SUBST(GTK_VERSION)
312 GTK_PREFIX=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
313 AC_SUBST(GTK_BASE_DIR)
314 GTK3_TARGETS=`$PKG_CONFIG --variable=targets gtk+-3.0`
315 case "$GTK3_TARGETS" in *wayland*) HAVE_GTK3_WAYLAND="1" ;; esac
319 AC_SUBST(GTK3_CFLAGS)
321 AM_CONDITIONAL(HAVE_GTK3, test "x$HAVE_GTK3" = "xyes")
322 AM_CONDITIONAL(HAVE_GTK3_WAYLAND, test "x$HAVE_GTK3_WAYLAND" = "x1")
324 dnl x11 is optional for librfb
326 PKG_CHECK_MODULES(X11, x11, HAVE_X11=yes, HAVE_X11=no)
330 AM_CONDITIONAL(HAVE_X11, test "x$HAVE_X11" = "xyes")
331 if test "x$HAVE_X11" = "xyes"; then
332 AC_DEFINE(HAVE_X11, 1, [Define if you have X11 library])
335 dnl exif (used on jifmux tests) ****
336 PKG_CHECK_MODULES(EXIF, libexif >= 0.6.16, HAVE_EXIF="yes", HAVE_EXIF="no")
338 AC_SUBST(EXIF_CFLAGS)
339 AM_CONDITIONAL(USE_EXIF, test "x$HAVE_EXIF" = "xyes")
341 AG_GST_CHECK_FEATURE(IQA, [iqa], iqa , [
342 PKG_CHECK_MODULES(DSSIM, dssim, [
350 if test "x$HAVE_DSSIM" = "xyes"; then
351 AC_DEFINE(HAVE_DSSIM, 1, [Define if you have dssim library])
354 AC_SUBST(DSSIM_CFLAGS)
356 AM_CONDITIONAL(HAVE_DSSIM, test "x$HAVE_DSSIM" = "xyes")
361 dnl set license and copyright notice
363 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
364 AC_SUBST(GST_LICENSE)
366 dnl define LIBDIR so we can inform people where we live
367 AS_AC_EXPAND(LIBDIR, $libdir)
368 AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [library dir])
370 dnl set location of plugin directory
373 dnl set release date/time
374 AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO([$PACKAGE_VERSION_NANO],
375 ["${srcdir}/gst-plugins-bad.doap"],
376 [$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO])
378 dnl If only building static libraries, define GST_STATIC_COMPILATION. This is
379 dnl needed only on Windows, but it doesn't hurt to have it everywhere.
380 if test x$enable_static = xyes -a x$enable_shared = xno; then
381 GST_STATIC_CFLAGS="-DGST_STATIC_COMPILATION"
384 AC_ARG_WITH([player-tests],
385 AS_HELP_STRING([--with-player-tests],[Enable GstPlayer tests that need network access (default: no)]))
386 if test x$with_player_tests = xyes; then
387 AC_PATH_PROG([WGET], [wget], no)
388 if test x$WGET = xno; then
389 AC_MSG_WARN([wget required for GstPlayer tests but not found - disabling])
393 AM_CONDITIONAL(WITH_GST_PLAYER_TESTS, test "x$with_player_tests" = "xyes")
395 # set by AG_GST_PARSE_SUBSYSTEM_DISABLES above
396 dnl make sure it doesn't complain about unused variables if debugging is disabled
398 AG_GST_CHECK_GST_DEBUG_DISABLED([NO_WARNINGS="-Wno-unused"], [NO_WARNINGS=""])
400 dnl define an ERROR_CFLAGS Makefile variable
401 dnl -Waggregate-return - libexif returns aggregates
402 dnl -Wundef - Windows headers check _MSC_VER unconditionally
403 AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [
404 -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
405 -Wwrite-strings -Wformat-security -Wold-style-definition
406 -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar
407 -Wnested-externs $NO_WARNINGS])
409 dnl define an ERROR_CXXFLAGS Makefile variable
410 AG_GST_SET_ERROR_CXXFLAGS($FATAL_WARNINGS, [
411 -Wmissing-declarations -Wredundant-decls
412 -Wwrite-strings -Wformat-nonliteral -Wformat-security
413 -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar $NO_WARNINGS])
415 dnl define an ERROR_OBJCFLAGS Makefile variable
416 AG_GST_SET_ERROR_OBJCFLAGS($FATAL_WARNINGS, [
417 -Wmissing-declarations -Wredundant-decls
418 -Wwrite-strings -Wformat-nonliteral -Wformat-security
419 -Winit-self -Wmissing-include-dirs -Wno-multichar $NO_WARNINGS])
421 dnl define correct level for debugging messages
422 AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
425 AG_GST_DEFAULT_ELEMENTS
427 dnl *** plug-ins to include ***
429 dnl these are all the gst plug-ins, compilable without additional libs
430 AG_GST_CHECK_PLUGIN(accurip)
431 AG_GST_CHECK_PLUGIN(adpcmdec)
432 AG_GST_CHECK_PLUGIN(adpcmenc)
433 AG_GST_CHECK_PLUGIN(aiff)
434 AG_GST_CHECK_PLUGIN(videoframe_audiolevel)
435 AG_GST_CHECK_PLUGIN(asfmux)
436 AG_GST_CHECK_PLUGIN(audiobuffersplit)
437 AG_GST_CHECK_PLUGIN(audiofxbad)
438 AG_GST_CHECK_PLUGIN(audiolatency)
439 AG_GST_CHECK_PLUGIN(audiomixmatrix)
440 AG_GST_CHECK_PLUGIN(audiovisualizers)
441 AG_GST_CHECK_PLUGIN(autoconvert)
442 AG_GST_CHECK_PLUGIN(bayer)
443 AG_GST_CHECK_PLUGIN(camerabin2)
444 AG_GST_CHECK_PLUGIN(coloreffects)
445 AG_GST_CHECK_PLUGIN(debugutils)
446 AG_GST_CHECK_PLUGIN(dvbsuboverlay)
447 AG_GST_CHECK_PLUGIN(dvdspu)
448 AG_GST_CHECK_PLUGIN(faceoverlay)
449 AG_GST_CHECK_PLUGIN(festival)
450 AG_GST_CHECK_PLUGIN(fieldanalysis)
451 AG_GST_CHECK_PLUGIN(freeverb)
452 AG_GST_CHECK_PLUGIN(frei0r)
453 AG_GST_CHECK_PLUGIN(gaudieffects)
454 AG_GST_CHECK_PLUGIN(geometrictransform)
455 AG_GST_CHECK_PLUGIN(gdp)
456 AG_GST_CHECK_PLUGIN(id3tag)
457 AG_GST_CHECK_PLUGIN(inter)
458 AG_GST_CHECK_PLUGIN(interlace)
459 AG_GST_CHECK_PLUGIN(ivfparse)
460 AG_GST_CHECK_PLUGIN(ivtc)
461 AG_GST_CHECK_PLUGIN(jp2kdecimator)
462 AG_GST_CHECK_PLUGIN(jpegformat)
463 AG_GST_CHECK_PLUGIN(librfb)
464 AG_GST_CHECK_PLUGIN(midi)
465 AG_GST_CHECK_PLUGIN(mpegdemux)
466 AG_GST_CHECK_PLUGIN(mpegtsdemux)
467 AG_GST_CHECK_PLUGIN(mpegtsmux)
468 AG_GST_CHECK_PLUGIN(mpegpsmux)
469 AG_GST_CHECK_PLUGIN(mxf)
470 AG_GST_CHECK_PLUGIN(netsim)
471 AG_GST_CHECK_PLUGIN(onvif)
472 AG_GST_CHECK_PLUGIN(pcapparse)
473 AG_GST_CHECK_PLUGIN(pnm)
474 AG_GST_CHECK_PLUGIN(proxy)
475 AG_GST_CHECK_PLUGIN(rawparse)
476 AG_GST_CHECK_PLUGIN(removesilence)
477 AG_GST_CHECK_PLUGIN(rist)
478 AG_GST_CHECK_PLUGIN(rtp)
479 AG_GST_CHECK_PLUGIN(sdp)
480 AG_GST_CHECK_PLUGIN(segmentclip)
481 AG_GST_CHECK_PLUGIN(siren)
482 AG_GST_CHECK_PLUGIN(smooth)
483 AG_GST_CHECK_PLUGIN(speed)
484 AG_GST_CHECK_PLUGIN(subenc)
485 AG_GST_CHECK_PLUGIN(timecode)
486 AG_GST_CHECK_PLUGIN(videofilters)
487 AG_GST_CHECK_PLUGIN(videoparsers)
488 AG_GST_CHECK_PLUGIN(videosignal)
489 AG_GST_CHECK_PLUGIN(vmnc)
490 AG_GST_CHECK_PLUGIN(y4m)
491 AG_GST_CHECK_PLUGIN(yadif)
493 dnl *** plug-ins to exclude ***
495 AC_CHECK_HEADER(AVFoundation/AVFoundation.h, HAVE_AVFOUNDATION="yes", HAVE_AVFOUNDATION="no", [-])
496 AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-])
497 AC_CHECK_HEADER(VideoToolbox/VideoToolbox.h, HAVE_VIDEOTOOLBOX="yes", HAVE_VIDEOTOOLBOX="no", [-])
499 if test "x$HAVE_VIDEOTOOLBOX" = "xyes"; then
501 LIBS="$LIBS -framework VideoToolbox"
502 AC_CHECK_FUNC(VTCompressionSessionPrepareToEncodeFrames, [
503 AC_DEFINE(HAVE_VIDEOTOOLBOX_10_9_6, 1, [Define if building with VideoToolbox >= 10.9.6])
509 AM_CONDITIONAL(HAVE_AVFOUNDATION, test "x$HAVE_AVFOUNDATION" = "xyes")
510 if test "x$HAVE_AVFOUNDATION" = "xyes"; then
511 AC_DEFINE(HAVE_AVFOUNDATION, 1, [Define if building with AVFoundation])
514 AM_CONDITIONAL(HAVE_IOS, test "x$HAVE_IOS" = "xyes")
515 if test "x$HAVE_IOS" = "xyes"; then
516 AC_DEFINE(HAVE_IOS, 1, [Define if building for Apple iOS])
519 AM_CONDITIONAL(HAVE_VIDEOTOOLBOX, test "x$HAVE_VIDEOTOOLBOX" = "xyes")
520 if test "x$HAVE_VIDEOTOOLBOX" = "xyes"; then
521 AC_DEFINE(HAVE_VIDEOTOOLBOX, 1, [Define if building with VideoToolbox])
524 dnl disable gst plugins we might not be able to build on this
525 dnl platform: (ugly but minimally invasive)
526 dnl FIXME: maybe move to sys, or make work with winsock2
527 AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
528 AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes)
530 if test "x$HAVE_WINSOCK2_H" = "xyes"; then
531 WINSOCK2_LIBS="-lws2_32"
532 AC_SUBST(WINSOCK2_LIBS)
535 dnl *** sys plug-ins ***
538 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTSOUND, true)
539 AG_GST_CHECK_FEATURE(DIRECTSOUND, [DirectSound], directsoundsrc, [
540 HAVE_DIRECTSOUND="no"
541 save_CFLAGS="$CFLAGS"
542 save_LDFLAGS="$LDFLAGS"
544 CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
545 LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
546 LIBS="$LIBS -lwinmm -ldsound -ldxerr9 -luser32"
547 AC_MSG_CHECKING(for DirectSound LDFLAGS)
548 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
552 #include <mmsystem.h>
554 DXGetErrorString9 (0);
555 DirectSoundCreate(NULL, NULL, NULL);
557 [HAVE_DIRECTSOUND="yes"],
558 [HAVE_DIRECTSOUND="no"])
559 AC_MSG_RESULT($HAVE_DIRECTSOUND)
561 LDFLAGS=$save_LDFLAGS
564 if test "x$HAVE_DIRECTSOUND" = "xyes"; then
565 dnl this is much more than we want
566 DIRECTSOUND_LIBS="-lwinmm -ldsound -ldxerr9 -luser32"
567 AC_SUBST(DIRECTX_CFLAGS)
568 AC_SUBST(DIRECTX_LDFLAGS)
569 AC_SUBST(DIRECTSOUND_LIBS)
571 AC_SUBST(HAVE_DIRECTSOUND)
575 translit(dnm, m, l) AM_CONDITIONAL(USE_WASAPI, true)
576 AG_GST_CHECK_FEATURE(WASAPI, [WASAPI plug-in], wasapi, [
578 save_CFLAGS="$CFLAGS"
579 save_LDFLAGS="$LDFLAGS"
581 CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
582 LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
583 LIBS="$LIBS -lole32 -lwinmm -lksuser"
584 AC_MSG_CHECKING(for WASAPI LDFLAGS)
585 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
588 #include <mmsystem.h>
589 #include <mmdeviceapi.h>
595 hr = CoInitialize(NULL);
597 printf("CoInitialize failed: hr = 0x%08x", hr);
602 // result = do_everything(argc, argv);
610 AC_MSG_RESULT($HAVE_WASAPI)
612 LDFLAGS=$save_LDFLAGS
615 if test "x$HAVE_WASAPI" = "xyes"; then
616 WASAPI_LIBS="-lole32 -lwinmm -lksuser"
617 AC_SUBST(WASAPI_LIBS)
619 AC_SUBST(HAVE_WASAPI)
623 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECT3D, true)
624 AG_GST_CHECK_FEATURE(DIRECT3D, [Direct3D plug-in], direct3dsink, [
626 save_CFLAGS="$CFLAGS"
627 save_LDFLAGS="$LDFLAGS"
629 CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
630 LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
631 LIBS="$LIBS -ld3d9 -lgdi32"
632 AC_MSG_CHECKING(for Direct3D LDFLAGS)
633 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
637 Direct3DCreate9(D3D_SDK_VERSION);
639 [HAVE_DIRECT3D="yes"],
640 [HAVE_DIRECT3D="no"])
641 AC_MSG_RESULT($HAVE_DIRECT3D)
643 LDFLAGS=$save_LDFLAGS
646 if test "x$HAVE_DIRECT3D" = "xyes"; then
647 DIRECT3D_LIBS="-ld3d9 -lgdi32"
648 AC_SUBST(DIRECT3D_LIBS)
650 AC_SUBST(HAVE_DIRECT3D)
654 translit(dnm, m, l) AM_CONDITIONAL(USE_WINSCREENCAP, true)
655 AG_GST_CHECK_FEATURE(WINSCREENCAP, [winscreencap plug-in], winscreencap, [
656 HAVE_WINSCREENCAP="no"
657 save_CFLAGS="$CFLAGS"
658 save_LDFLAGS="$LDFLAGS"
660 CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
661 LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
662 LIBS="$LIBS -ld3d9 -lgdi32"
663 AC_MSG_CHECKING(for Direct3D LDFLAGS)
664 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
668 Direct3DCreate9(D3D_SDK_VERSION);
670 [HAVE_WINSCREENCAP="yes"],
671 [HAVE_WINSCREENCAP="no"])
672 AC_MSG_RESULT($HAVE_WINSCREENCAP)
674 LDFLAGS=$save_LDFLAGS
677 if test "x$HAVE_WINSCREENCAP" = "xyes"; then
678 WINSCREENCAP_LIBS="-ld3d9 -lgdi32"
679 AC_SUBST(WINSCREENCAP_LIBS)
681 AC_SUBST(HAVE_WINSCREENCAP)
685 translit(dnm, m, l) AM_CONDITIONAL(USE_WINKS, true)
686 AG_GST_CHECK_FEATURE(WINKS, [Winks plug-in], winks, [
688 save_CFLAGS="$CFLAGS"
689 save_LDFLAGS="$LDFLAGS"
691 CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
692 LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
693 LIBS="$LIBS -lole32 -luuid -lstrmiids"
694 AC_MSG_CHECKING(for Winks LDFLAGS)
695 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
701 IGraphBuilder *pGraph = NULL;
702 HRESULT hr = CoInitialize(NULL);
703 hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
704 &IID_IGraphBuilder, (void **)&pGraph);
711 AC_MSG_RESULT($HAVE_WINKS)
713 LDFLAGS=$save_LDFLAGS
716 if test "x$HAVE_WINKS" = "xyes"; then
717 dnl this is much more than we want
718 WINKS_LIBS="-ldxguid -lole32 -luuid -lstrmiids -lksuser -lsetupapi"
719 AC_SUBST(DIRECTX_CFLAGS)
720 AC_SUBST(DIRECTX_LDFLAGS)
726 dnl *** Android Media ***
727 translit(dnm, m, l) AM_CONDITIONAL(USE_ANDROID_MEDIA, true)
728 HAVE_ANDROID_MEDIA="no"
729 AG_GST_CHECK_FEATURE(ANDROID_MEDIA, [Android Media], androidmedia, [
732 AC_CHECK_HEADER(jni.h, HAVE_ANDROID_MEDIA="yes", HAVE_ANDROID_MEDIA="no")
735 HAVE_ANDROID_MEDIA="no"
740 dnl *** AppleMedia (OS X and iOS) ***
741 translit(dnm, m, l) AM_CONDITIONAL(USE_APPLE_MEDIA, true)
742 HAVE_APPLE_MEDIA="no"
743 dnl SystemConfiguration.h is common to OS X and iOS, so we check for that
744 AG_GST_CHECK_FEATURE(APPLE_MEDIA, [Apple video], applemedia, [
745 AC_CHECK_HEADER(SystemConfiguration/SystemConfiguration.h, HAVE_APPLE_MEDIA="yes", HAVE_APPLE_MEDIA="no")
746 dnl OSX 10.7 and earlier lack VideoToolbox/VideoToolbox.h
747 if test "x$HAVE_IOS" = "xno"; then
748 AC_CHECK_HEADER(VideoToolbox/VideoToolbox.h,, HAVE_APPLE_MEDIA="no")
752 dnl in case header SystemConfiguration/SystemConfiguration.h is found on other platforms
757 HAVE_APPLE_MEDIA="no"
762 translit(dnm, m, l) AM_CONDITIONAL(USE_BLUEZ, true)
763 AG_GST_CHECK_FEATURE(BLUEZ, [Bluez], bluez, [
764 PKG_CHECK_MODULES([BLUEZ5], [bluez >= 5.0], [
765 PKG_CHECK_MODULES([GIO_UNIX], gio-unix-2.0 > 2.24, [
766 AC_CHECK_PROG([GDBUS_CODEGEN],[gdbus-codegen],[gdbus-codegen])
768 AC_DEFINE(HAVE_BLUEZ5,[1],[Bluez5 detected])
777 dnl *** OS/X AVCVideoServices ***
778 translit(dnm, m, l) AM_CONDITIONAL(USE_AVC, true)
780 AG_GST_CHECK_FEATURE(AVC, [AVC Video Services], avcsrc, [
782 save_CPPFLAGS="$CPPFLAGS"
783 CPPFLAGS="$CPPFLAGS -framework AVCVideoServices -framework CoreFoundation"
785 LIBS="$LIBS -framework AVCVideoServices -framework CoreFoundation"
786 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[HAVE_AVC=yes],[HAVE_AVC=no])
788 CPPFLAGS=$save_CPPFLAGS
791 dnl in case header AVCVideoServices/AVCVideoServices.h is found on other platforms
800 dnl check for shm_open (for shm plugin)
801 translit(dnm, m, l) AM_CONDITIONAL(USE_SHM, true)
802 AG_GST_CHECK_FEATURE(SHM, [POSIX shared memory source and sink], shm, [
803 if test "x$HAVE_SYS_SOCKET_H" = "xyes"; then
805 *-darwin* | *-macos10*)
806 AC_DEFINE(HAVE_OSX,[1],[Apple Mac OS X operating system detected])
813 AC_CHECK_LIB([rt], [shm_open],
814 AC_CHECK_DECL([MSG_NOSIGNAL], HAVE_SHM=yes, HAVE_SHM=no, [
815 #include <sys/socket.h>
818 AC_SUBST(SHM_LIBS, "-lrt")
826 dnl check for unix sockets (ipcpipeline plugin)
827 translit(dnm, m, l) AM_CONDITIONAL(USE_IPCPIPELINE, true)
828 AG_GST_CHECK_FEATURE(IPCPIPELINE, [Unix sockets], ipcpipeline, [
829 if test "x$HAVE_SYS_SOCKET_H" = "xyes"; then
830 AC_CHECK_FUNC(pipe, [
831 AC_CHECK_FUNC(socketpair, [HAVE_IPCPIPELINE=yes], [HAVE_IPCPIPELINE=no])
840 dnl check for OpenSL ES
841 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENSLES, true)
842 AG_GST_CHECK_FEATURE(OPENSLES, [OpenSL ES], opensl, [
843 AC_CHECK_HEADER(SLES/OpenSLES.h, HAVE_OPENSLES="yes", HAVE_OPENSLES="no")
847 translit(dnm, m, l) AM_CONDITIONAL(USE_UVCH264, true)
848 AG_GST_CHECK_FEATURE(UVCH264, [UVC H264], uvch264, [
849 AC_CHECK_HEADER(linux/uvcvideo.h, HAVE_UVCVIDEO_H=yes, HAVE_UVCVIDEO_H=no)
850 PKG_CHECK_MODULES(G_UDEV, gudev-1.0 , [
851 AC_DEFINE([HAVE_GUDEV], 1, [Define if gudev is installed])
854 PKG_CHECK_MODULES(LIBUSB, libusb-1.0 , [
855 AC_DEFINE([HAVE_LIBUSB], 1, [Define if libusb 1.x is installed])
858 if test "x$HAVE_UVCVIDEO_H" = "xyes" && \
859 test "x$HAVE_GUDEV" = "xyes" && \
860 test "x$HAVE_LIBUSB" = "xyes"; then
866 AC_SUBST(LIBUDEV_CFLAGS)
867 AC_SUBST(LIBUDEV_LIBS)
868 AC_SUBST(LIBUSB_CFLAGS)
869 AC_SUBST(LIBUSB_LIBS)
871 dnl *** USE_NVCODEC ***
872 translit(dnm, m, l) AM_CONDITIONAL(USE_NVCODEC, true)
873 AG_GST_CHECK_FEATURE(NVCODEC, [NVIDIA Codec plugin], nvcodec, [
875 USE_NVCODEC_GST_GL="no"
877 if test "x$GST_GL_HAVE_API_GL" = "x1"; then
878 USE_NVCODEC_GST_GL="yes"
879 AC_DEFINE(HAVE_NVCODEC_GST_GL, [1], [NVCODEC GStreamer OpenGL support available])
882 AM_CONDITIONAL(USE_NVCODEC_GST_GL, test "x$USE_NVCODEC_GST_GL" = "xyes")
884 dnl check for tinyalsa
885 translit(dnm, m, l) AM_CONDITIONAL(USE_TINYALSA, true)
886 AG_GST_CHECK_FEATURE(TINYALSA, [tinyalsa], tinyalsa, [
887 AC_CHECK_HEADER(tinyalsa/asoundlib.h, HAVE_TINYALSA="yes", HAVE_TINYALSA="no")
890 dnl check for intel mediasdk
891 translit(dnm, m, l) AM_CONDITIONAL(USE_MSDK, true)
892 AG_GST_CHECK_FEATURE(MSDK, [Intel MediaSDK], msdk, [
893 AG_GST_PKG_CHECK_MODULES(GST_ALLOCATORS, gstreamer-allocators-1.0)
894 PKG_CHECK_MODULES(G_UDEV, gudev-1.0 , [
895 AC_DEFINE([HAVE_GUDEV], 1, [Define if gudev is installed])
898 PKG_CHECK_MODULES(LIBMFX, libmfx,
900 AC_DEFINE(HAVE_LIBMFX, 1, [Define if mfx_dispatcher is available])
902 dnl external msdk dispatchers sometimes install headers into prefix/mfx/
903 save_CPPFLAGS="$CPPFLAGS"
904 CPPFLAGS="$LIBMFX_CFLAGS $save_CPPFLAGS"
905 AC_CHECK_HEADER(mfx/mfxdefs.h, [HAVE_MFX_MFXDEFS_H=1], [HAVE_MFX_MFXDEFS_H=0])
906 if test $HAVE_MFX_MFXDEFS_H -eq 1; then
907 MFX_INCDIR="`$PKG_CONFIG --variable=includedir libmfx`"
908 MSDK_CFLAGS="-I$MFX_INCDIR/mfx"
909 AC_SUBST(MSDK_CFLAGS)
911 CPPFLAGS="$save_CPPFLAGS"
913 AC_ARG_WITH([msdk-prefix],
914 AS_HELP_STRING([--with-msdk-prefix],
915 [Use the provided prefix for detecting the Intel MediaSDK]),
916 [AS_IF([test "x$with_msdk_prefix" != "x"],
917 [MSDK_PREFIX="$with_msdk_prefix"])],
918 [AS_IF([test "x$MFX_HOME" != "x"],
919 [MSDK_PREFIX="$MFX_HOME"],
920 [MSDK_PREFIX="/opt/intel/media"])])
921 MSDK_CFLAGS="-I$MSDK_PREFIX/include -I$MSDK_PREFIX/include/mfx"
922 MSDK_LIBS="-L$MSDK_PREFIX/lib/lin_x64 -L$MSDK_PREFIX/lib/x64 -L$MSDK_PREFIX/lib64 -L$MSDK_PREFIX/lib -lmfx -ldl"
923 AC_SUBST(MSDK_CFLAGS)
926 save_CPPFLAGS="$CPPFLAGS"
927 CPPFLAGS="$MSDK_CFLAGS $save_CPPFLAGS"
928 AC_CHECK_HEADER(mfxdefs.h, HAVE_MFXDEFS_H="yes", HAVE_MFXDEFS_H="no")
929 CPPFLAGS="$save_CPPFLAGS"
932 LIBS="$MSDK_LIBS $LIBS"
934 AC_CHECK_LIB(mfx,MFXInit,HAVE_MFX_LIB="yes",HAVE_MFX_LIB="no")
938 if test "x$HAVE_MFXDEFS_H" = "xyes" \
939 -a "x$HAVE_MFX_LIB" = "xyes"; then
946 PKG_CHECK_MODULES(LIBVA_DRM, libva-drm, HAVE_LIBVA_DRM="yes", HAVE_LIBVA_DRM="no")
948 if test "x$HAVE_GUDEV" = "xyes" \
949 -a "x$HAVE_MSDK" = "xyes" \
950 -a "x$HAVE_LIBVA_DRM" = "xyes"; then
956 dnl check the availability of vp9 apis
958 save_CPPFLAGS="$CPPFLAGS"
959 CPPFLAGS="$LIBMFX_CFLAGS $MSDK_CFLAGS $save_CPPFLAGS"
960 AC_CHECK_HEADER(mfxvp9.h, [HAVE_MFXVP9_H=1], [HAVE_MFXVP9_H=0],
962 #include <mfxplugin.h>
965 if test $HAVE_MFXVP9_H -eq 1; then
967 AC_DEFINE(USE_MSDK_VP9_DEC, 1, [Define if MediaSDK VP9 decoder api is available])
969 ], [USE_MSDK_VP9_DEC=0])
970 AM_CONDITIONAL(USE_MSDK_LIBVA,
971 test "x$HAVE_MSDK" = "xyes" -a "x$HAVE_LIBVA_DRM" = "xyes")
972 AM_CONDITIONAL([USE_MSDK_VP9_DEC],
973 [test $USE_MSDK_VP9_DEC -eq 1])
975 dnl *** ext plug-ins ***
976 dnl keep this list sorted alphabetically !
978 if test "x$BUILD_EXTERNAL" = "xyes"; then
980 dnl *** assrender ***
981 translit(dnm, m, l) AM_CONDITIONAL(USE_ASSRENDER, true)
982 AG_GST_CHECK_FEATURE(ASSRENDER, [ASS/SSA renderer], assrender, [
983 PKG_CHECK_MODULES(ASSRENDER, libass >= 0.10.2, [
984 HAVE_ASSRENDER="yes" ], [
988 AC_SUBST(ASSRENDER_CFLAGS)
989 AC_SUBST(ASSRENDER_LIBS)
992 translit(dnm, m, l) AM_CONDITIONAL(USE_AOM, true)
993 AG_GST_CHECK_FEATURE(AOM, [AV1 encoder/decoder], aom, [
994 AG_GST_PKG_CHECK_MODULES(AOM, aom)
998 translit(dnm, m, l) AM_CONDITIONAL(USE_AVTP, true)
999 AG_GST_CHECK_FEATURE(AVTP, [Audio/Video Transport Protocol], avtp, [
1000 AG_GST_PKG_CHECK_MODULES(AVTP, avtp)
1003 dnl *** vo-amrwbenc ***
1004 translit(dnm, m, l) AM_CONDITIONAL(USE_VOAMRWBENC, true)
1005 AG_GST_CHECK_FEATURE(VOAMRWBENC, [vo-amrwbenc library], vo-amrwbenc, [
1006 AG_GST_PKG_CHECK_MODULES(VOAMRWBENC, vo-amrwbenc >= 0.1.0)
1009 dnl *** vo-aacenc ***
1010 translit(dnm, m, l) AM_CONDITIONAL(USE_VOAACENC, true)
1011 AG_GST_CHECK_FEATURE(VOAACENC, [vo-aacenc library], vo-aacenc, [
1012 AG_GST_PKG_CHECK_MODULES(VOAACENC, vo-aacenc >= 0.1.0)
1016 translit(dnm, m, l) AM_CONDITIONAL(USE_BS2B, true)
1017 AG_GST_CHECK_FEATURE(BS2B, [bs2b], bs2b, [
1018 PKG_CHECK_MODULES(BS2B, libbs2b >= 3.1.0, HAVE_BS2B="yes", [
1021 AC_SUBST(BS2B_CFLAGS)
1026 translit(dnm, m, l) AM_CONDITIONAL(USE_BZ2, true)
1027 AG_GST_CHECK_FEATURE(BZ2, [bz2 library], bz2, [
1030 AC_MSG_CHECKING([for BZ2_bzlibVersion in -lbz2])
1031 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bzlib.h>]], [[const char *version = BZ2_bzlibVersion ();]])],[HAVE_BZ2=yes],[HAVE_BZ2=no])
1032 AC_MSG_RESULT($HAVE_BZ2)
1034 if test "x$HAVE_BZ2" = "xyes"; then
1042 #translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
1043 #AG_GST_CHECK_FEATURE(CAIRO, [cairo plug-in], cairo, [
1044 # PKG_CHECK_MODULES(CAIRO, cairo >= 1.0 glitz-glx, HAVE_CAIRO=yes, [
1047 # AC_SUBST(CAIRO_CFLAGS)
1048 # AC_SUBST(CAIRO_LIBS)
1051 dnl *** chromaprint ***
1052 translit(dnm, m, l) AM_CONDITIONAL(USE_CHROMAPRINT, true)
1053 AG_GST_CHECK_FEATURE(CHROMAPRINT, [chromaprint], chromaprint, [
1054 PKG_CHECK_MODULES(CHROMAPRINT, libchromaprint, HAVE_CHROMAPRINT="yes", [
1055 HAVE_CHROMAPRINT="no"
1057 AC_SUBST(CHROMAPRINT_CFLAGS)
1058 AC_SUBST(CHROMAPRINT_LIBS)
1062 translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true)
1063 AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
1064 PKG_CHECK_MODULES(CURL, libcurl >= 7.35.0, [
1066 AC_CHECK_HEADERS([unistd.h sys/socket.h sys/types.h netinet/in.h netinet/tcp.h fcntl.h], [ ], [
1067 AC_CHECK_HEADERS([unistd.h sys/types.h winsock2.h ws2tcpip.h fcntl.h], [ ], [HAVE_CURL="no"])
1069 AC_CHECK_HEADERS([netinet/ip.h], [], [HAVE_CURL="no"],
1070 [[#ifdef HAVE_SYS_TYPES_H
1071 # include <sys/types.h>
1073 #ifdef HAVE_NETINET_IN_H
1074 # include <netinet/in.h>
1077 AC_MSG_CHECKING([for socket support needed by curlsink])
1078 AC_MSG_RESULT($HAVE_CURL)
1082 AC_SUBST(CURL_CFLAGS)
1084 PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [
1086 AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available])
1090 AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes")
1091 AC_SUBST(SSH2_CFLAGS)
1093 ],,,[AM_CONDITIONAL(USE_SSH2, false)])
1096 translit(dnm, m, l) AM_CONDITIONAL(USE_DASH, true)
1097 AG_GST_CHECK_FEATURE(DASH, [DASH plug-in], dash, [
1098 PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.8, [HAVE_LIBXML2="yes"
1099 HAVE_DASH="yes"], [HAVE_LIBXML2="no"
1101 AC_SUBST(LIBXML2_CFLAGS)
1102 AC_SUBST(LIBXML2_LIBS)
1106 translit(dnm, m, l) AM_CONDITIONAL(USE_DC1394, true)
1107 AG_GST_CHECK_FEATURE(DC1394, [libdc1394], dc1394, [
1108 PKG_CHECK_MODULES(LIBDC1394, libdc1394-2 >= 2.0.0, [
1109 if test -z "`$PKG_CONFIG --modversion libdc1394-2 | grep 2.0.0-rc`"; then
1118 AC_SUBST(LIBDC1394_CFLAGS)
1119 AC_SUBST(LIBDC1394_LIBS)
1122 dnl *** decklink ***
1123 translit(dnm, m, l) AM_CONDITIONAL(USE_DECKLINK, true)
1124 AG_GST_CHECK_FEATURE(DECKLINK, [decklink], decklink, [
1131 if test "x$HAVE_PTHREAD_H" = "xyes"; then
1132 AC_CHECK_LIB(dl, dlopen,
1136 DECKLINK_LIBS="-lpthread -ldl"
1141 if test "x$HAVE_PTHREAD_H" = "xyes"; then
1142 AC_CHECK_LIB(dl, dlopen,
1146 DECKLINK_LIBS="-lpthread -ldl"
1147 HAVE_DECKLINK_OSX=yes
1154 DECKLINK_LIBS="-lole32 -loleaut32"
1155 HAVE_DECKLINK_WIN=yes
1162 AC_SUBST(DECKLINK_CXXFLAGS)
1163 AC_SUBST(DECKLINK_LIBS)
1165 AM_CONDITIONAL(DECKLINK_OSX, test "x$HAVE_DECKLINK_OSX" = xyes)
1166 AM_CONDITIONAL(DECKLINK_WIN, test "x$HAVE_DECKLINK_WIN" = xyes)
1168 dnl **** DirectFB ****
1169 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTFB, true)
1170 AG_GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
1171 PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.24, HAVE_DIRECTFB="yes", [
1176 dnl **** Wayland ****
1177 translit(dnm, m, l) AM_CONDITIONAL(USE_WAYLAND, true)
1178 AC_PATH_PROG([wayland_scanner], [wayland-scanner])
1179 AG_GST_CHECK_FEATURE(WAYLAND, [wayland sink], wayland , [
1180 PKG_CHECK_MODULES(WAYLAND, wayland-client >= 1.11.0 libdrm >= 2.4.55 wayland-protocols >= 1.15, [
1181 if test "x$wayland_scanner" != "x"; then
1183 AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
1185 AC_MSG_RESULT([wayland-scanner is required to build the wayland plugin])
1194 translit(dnm, m, l) AM_CONDITIONAL(USE_WEBP, true)
1195 AG_GST_CHECK_FEATURE(WEBP, [WebP], webp , [
1196 PKG_CHECK_MODULES(WEBP, libwebp >= 0.2.1, [
1197 HAVE_WEBP="yes" ], [ HAVE_WEBP="no"
1199 AC_SUBST(WEBP_CFLAGS)
1204 translit(dnm, m, l) AM_CONDITIONAL(USE_DTS, true)
1205 AG_GST_CHECK_FEATURE(DTS, [dts library], dtsdec, [
1207 AG_GST_CHECK_LIBHEADER(DTS, dca, dca_init, $LIBM, dca.h,
1208 DTS_LIBS="-ldca $LIBM", HAVE_DTS="no")
1209 if test $HAVE_DTS = "no"; then
1210 AG_GST_CHECK_LIBHEADER(DTS, dts_pic, dts_init, $LIBM, dts.h,
1211 [ DTS_LIBS="-ldts_pic $LIBM"
1212 AC_DEFINE(DTS_OLD, 1, [Define if an old libdts is used])
1218 dnl *** resindvd ***
1219 translit(dnm, m, l) AM_CONDITIONAL(USE_RESINDVD, true)
1220 AG_GST_CHECK_FEATURE(RESINDVD, [resindvd plugin], resindvd, [
1221 PKG_CHECK_MODULES(DVDNAV, dvdnav >= 4.1.2 dvdread >= 4.1.2, HAVE_RESINDVD="yes", [
1226 dnl **** Free AAC Encoder (FAAC) ****
1227 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAC, true)
1228 AG_GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
1229 AG_GST_CHECK_LIBHEADER(FAAC, faac, faacEncOpen, $LIBM, faac.h,
1230 FAAC_LIBS="-lfaac $LIBM")
1234 dnl **** Free AAC Decoder (FAAD2) ****
1235 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
1236 AG_GST_CHECK_FEATURE(FAAD, [FAAD2 AAC decoder plug-in], faad, [
1237 AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, $LIBM, neaacdec.h, [
1238 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <faad.h>]], [[
1239 #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
1241 #elif !defined(LATM)
1242 #error Not faad2 >= 2.7
1248 AC_MSG_WARN([Found libfaad, but version not recent enough. Need faad2 >= 2.7])
1258 translit(dnm, m, l) AM_CONDITIONAL(USE_FBDEV, true)
1259 AG_GST_CHECK_FEATURE(FBDEV, [linux framebuffer], fbdevsink, [
1260 if test "x$HAVE_FBDEV" != "xyes"; then
1261 AC_CHECK_HEADER([linux/fb.h], HAVE_FBDEV=yes, HAVE_FBDEV=no)
1266 translit(dnm, m, l) AM_CONDITIONAL(USE_FDK_AAC, true)
1267 AG_GST_CHECK_FEATURE(FDK_AAC, [fdkaac plugin], fdkaac, [
1268 PKG_CHECK_MODULES(FDK_AAC, fdk-aac, HAVE_FDK_AAC="yes", HAVE_FDK_AAC="no")
1270 PKG_CHECK_EXISTS(fdk-aac >= 2.0.0, [
1271 AC_DEFINE(HAVE_FDK_AAC_2_0_0, 1, [Define if we have fdk-aac >= 2.0.0])
1274 PKG_CHECK_EXISTS(fdk-aac >= 0.1.4, [
1275 AC_DEFINE(HAVE_FDK_AAC_0_1_4, 1, [Define if we have fdk-aac >= 0.1.4])
1280 translit(dnm, m, l) AM_CONDITIONAL(USE_FLITE, true)
1281 AG_GST_CHECK_FEATURE(FLITE, [Flite plugin], flite, [
1282 AG_GST_CHECK_LIBHEADER(FLITE, flite, flite_init, $LIBM, flite/flite.h,
1283 FLITE_LIBS="-lflite -lflite_cmu_us_kal -lflite_usenglish -lflite_cmulex $LIBM")
1285 AC_SUBST(FLITE_CFLAGS)
1286 AC_SUBST(FLITE_LIBS)
1290 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
1291 AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
1292 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
1293 if test $HAVE_GSM != "yes"; then
1294 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
1295 if test $HAVE_GSM = "yes"; then
1296 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
1302 dnl *** fluidSynth ***
1303 translit(dnm, m, l) AM_CONDITIONAL(USE_FLUIDSYNTH, true)
1304 AG_GST_CHECK_FEATURE(FLUIDSYNTH, [fluidsynth], fluidsynth, [
1305 PKG_CHECK_MODULES(FLUIDSYNTH, fluidsynth >= 1.0, HAVE_FLUIDSYNTH="yes", [
1306 HAVE_FLUIDSYNTH="no"
1311 translit(dnm, m, l) AM_CONDITIONAL(USE_KATE, true)
1312 AG_GST_CHECK_FEATURE(KATE, [Kate], kate, [
1313 PKG_CHECK_MODULES(KATE, kate >= 0.1.7, HAVE_KATE="yes", [
1316 AC_SUBST(KATE_CFLAGS)
1318 PKG_CHECK_MODULES(TIGER, tiger >= 0.3.2,
1321 AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available])
1327 AM_CONDITIONAL(USE_TIGER, test "x$HAVE_TIGER" = "xyes")
1328 AC_SUBST(TIGER_CFLAGS)
1329 AC_SUBST(TIGER_LIBS)
1330 ],,,[AM_CONDITIONAL(USE_TIGER, false)])
1333 translit(dnm, m, l) AM_CONDITIONAL(USE_KMS, true)
1334 AG_GST_CHECK_FEATURE(KMS, [drm/kms libraries], kms, [
1335 AG_GST_PKG_CHECK_MODULES(GST_ALLOCATORS, gstreamer-allocators-1.0)
1336 PKG_CHECK_MODULES([KMS_DRM], [libdrm >= 2.4.55], HAVE_KMS=yes, HAVE_KMS=no)
1340 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
1341 AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
1342 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
1344 PKG_CHECK_MODULES(LRDF, lrdf, HAVE_LRDF=yes, HAVE_LRDF=no)
1345 if test $HAVE_LRDF = "yes"; then
1346 AC_DEFINE(HAVE_LRDF, 1, [Define if we have liblrdf])
1349 AC_SUBST(LRDF_CFLAGS)
1353 #translit(dnm, m, l) AM_CONDITIONAL(USE_LCMS2, true)
1354 AG_GST_CHECK_FEATURE(LCMS2, [LCMS colormanagement plugin], lcms2, [
1355 PKG_CHECK_MODULES(LCMS2, lcms2 >= 2.7, HAVE_LCMS2="yes", [
1358 AC_SUBST(LCMS2_LIBS)
1362 translit(dnm, m, l) AM_CONDITIONAL(USE_LV2, true)
1363 AG_GST_CHECK_FEATURE(LV2, [lv2], lv2, [
1364 PKG_CHECK_MODULES(LILV, lilv-0 >= 0.22, [
1366 HAVE_LILV_0_22="yes"
1367 AC_DEFINE(HAVE_LILV_0_22, 1, [Define if we have liblilv >= 0.22])
1369 PKG_CHECK_MODULES(LILV, lilv-0 >= 0.16, HAVE_LV2="yes", HAVE_LV2="no")
1371 AC_SUBST(LILV_CFLAGS)
1375 dnl *** libde265 ***
1376 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBDE265, true)
1377 AG_GST_CHECK_FEATURE(LIBDE265, [libde265 HEVC/H.265 decoder], libde265, [
1378 PKG_CHECK_MODULES(LIBDE265, libde265 >= 0.9, HAVE_LIBDE265="yes", HAVE_LIBDE265="no")
1379 AC_SUBST(LIBDE265_CFLAGS)
1380 AC_SUBST(LIBDE265_LIBS)
1384 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBMMS, true)
1385 AG_GST_CHECK_FEATURE(LIBMMS, [mms protocol library], libmms, [
1386 dnl check with pkg-config first
1387 PKG_CHECK_MODULES(LIBMMS, libmms >= 0.4, HAVE_LIBMMS="yes", [
1391 AC_SUBST(LIBMMS_LIBS)
1394 translit(dnm, m, l) AM_CONDITIONAL(USE_SRT, true)
1395 AG_GST_CHECK_FEATURE(SRT, [srt library], srt, [
1396 PKG_CHECK_MODULES(SRT, srt, HAVE_SRT="yes", HAVE_SRT=no)
1398 AC_SUBST(SRT_CFLAGS)
1402 translit(dnm, m, l) AM_CONDITIONAL(USE_SRTP, true)
1403 AG_GST_CHECK_FEATURE(SRTP, [srtp library], srtp, [
1405 AG_GST_PKG_CHECK_MODULES(SRTP, libsrtp2 >= 2.1.0)
1406 if test x"$HAVE_SRTP" = x"yes"; then
1407 AC_DEFINE([HAVE_SRTP2], 1, [Define if libsrtp2 is used])
1409 PKG_CHECK_MODULES(SRTP, libsrtp, HAVE_SRTP="yes",
1410 AG_GST_CHECK_LIBHEADER(SRTP, srtp, crypto_policy_set_aes_gcm_128_16_auth, , srtp/srtp.h, SRTP_LIBS="-lsrtp")
1414 AC_SUBST(SRTP_CFLAGS)
1418 translit(dnm, m, l) AM_CONDITIONAL(USE_DTLS, true)
1419 AG_GST_CHECK_FEATURE(DTLS, [DTLS plugin], dtls, [
1420 PKG_CHECK_MODULES(DTLS, [ openssl >= 1.0.1 libcrypto ], [
1422 AC_SUBST(DTLS_CFLAGS)
1430 translit(dnm, m, l) AM_CONDITIONAL(USE_TTML, true)
1431 AG_GST_CHECK_FEATURE(TTML, [TTML plugin], ttml, [
1432 PKG_CHECK_MODULES(TTML, [ libxml-2.0 >= 2.9.2 pango cairo pangocairo ], [
1440 translit(dnm, m, l) AM_CONDITIONAL(USE_MODPLUG, true)
1441 AG_GST_CHECK_FEATURE(MODPLUG, modplug, modplug, [
1442 if test "x$HAVE_CXX" != "xyes"; then
1443 AC_MSG_WARN([Not compiling modplug plugin as it requires a C++ compiler])
1446 PKG_CHECK_MODULES(MODPLUG, libmodplug, HAVE_MODPLUG="yes", HAVE_MODPLUG="no")
1448 AC_SUBST(MODPLUG_CFLAGS)
1449 AC_SUBST(MODPLUG_LIBS)
1452 dnl *** mjpegtools version info ***
1453 dnl some may prefer older version (given quirks above)
1454 dnl hm, no version info seems available within mjpegtools headers
1455 dnl and API really moves along
1457 PKG_CHECK_EXISTS(mjpegtools >= 1.6.1.93 mjpegtools < 1.8.0, [
1458 mjpegtools_api=10601
1460 PKG_CHECK_EXISTS(mjpegtools >= 1.8.0 mjpegtools < 1.9.0, [
1461 mjpegtools_api=10800
1463 PKG_CHECK_EXISTS(mjpegtools >= 2.0.0, [
1464 mjpegtools_api=20000
1466 PKG_CHECK_MODULES(MJPEG, mjpegtools >= 1.9.0 mjpegtools < 2.0.0, [
1467 dnl logging API changed in release candidates
1468 OLD_CFLAGS="$CFLAGS"
1470 CFLAGS="$MJPEG_CFLAGS"
1471 LIBS="$LIBS $MJPEG_LIBS -lmjpegutils $LIBM $PTHREAD_LIBS"
1472 AC_CHECK_FUNC(mjpeg_loglev_t, [
1473 mjpegtools_api=10903
1475 mjpegtools_api=10900
1477 CFLAGS="$OLD_CFLAGS"
1485 AC_DEFINE_UNQUOTED(GST_MJPEGTOOLS_API, $mjpegtools_api,
1486 [mjpegtools API evolution])
1488 dnl *** mpeg2enc ***
1489 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
1490 AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
1492 dnl we require a c++ compiler for this one
1493 if [ test x$HAVE_CXX = xyes ]; then
1494 dnl libmpeg2enc was first included in mjpegtools-1.6.2-rc3 (1.6.1.92)
1495 dnl since many distros include mjpegtools specifically without mplex
1496 dnl and mpeg2enc, we check for mpeg2enc on its own, too.
1497 PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.93, [
1498 dnl HACK because mpeg2enc 1.8.0 header files have a spurious 'include config.h'
1500 dnl switch over to c++ to test things
1502 OLD_CPPFLAGS="$CPPFLAGS"
1504 CPPFLAGS_GOOD="$CPPFLAGS $MPEG2ENC_CFLAGS"
1505 CPPFLAGS="$CPPFLAGS_GOOD -I."
1507 mpeg2enc_headers_ok=no
1508 AC_CHECK_HEADER([mpeg2encoder.hh], [
1509 MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp $LIBM $PTHREAD_LIBS"
1511 LIBS="$LIBS $MPEG2ENC_LIBS"
1512 AC_MSG_CHECKING([for valid mpeg2enc objects])
1513 AC_RUN_IFELSE([AC_LANG_SOURCE([[
1514 #include <mpeg2encoder.hh>
1515 #include <mpeg2encoptions.hh>
1521 MPEG2EncOptions *options = new MPEG2EncOptions ();
1522 MPEG2Encoder *encoder = new MPEG2Encoder (*options);
1527 dnl so far so good, let's check more things:
1528 dnl mjpegtools-1.8.0 does not install the required
1529 dnl mpeg2syntaxcodes.h header by default, and a new release
1530 dnl is not in sight, so check for this oversight in case
1531 dnl distros or folks have fixed this themselves
1532 if test "$mjpegtools_api" -ge "10800"; then
1533 AC_CHECK_HEADER([mpeg2syntaxcodes.h], [
1534 mpeg2enc_headers_ok=yes
1536 mpeg2enc_headers_ok=no
1539 mpeg2enc_headers_ok=yes
1541 if test "x$mpeg2enc_headers_ok" = "xyes"; then
1544 CPPFLAGS="$CPPFLAGS_GOOD"
1545 AC_SUBST(MPEG2ENC_CFLAGS)
1546 AC_SUBST(MPEG2ENC_LIBS)
1553 CPPFLAGS="$OLD_CPPFLAGS"
1562 translit(dnm, m, l) AM_CONDITIONAL(USE_MPLEX, true)
1563 AG_GST_CHECK_FEATURE(MPLEX, [mplex], mplex, [
1565 dnl we require a c++ compiler for this one
1566 if [ test x$HAVE_CXX = xyes ]; then
1567 dnl libmplex was first included in mjpegtools-1.6.2-rc4 (1.6.1.93)
1568 dnl since many distros include mjpegtools specifically without mplex
1569 dnl and mpeg2enc, we check for mplex on its own, too.
1570 dnl libmplex < 1.9rc? has fuzzy ABI, valgrind and other problems
1571 PKG_CHECK_MODULES(MPLEX, mjpegtools >= 1.9.0, [
1572 dnl HACK because mplex 2.0.0 header files have a spurious 'include config.h'
1574 dnl switch over to c++ to test things
1576 OLD_CPPFLAGS="$CPPFLAGS"
1578 CPPFLAGS_GOOD="$CPPFLAGS $MPLEX_CFLAGS"
1579 CPPFLAGS="$CPPFLAGS_GOOD -I."
1580 AC_CHECK_HEADER(interact.hpp, [
1581 MPLEX_LIBS="$MPLEX_LIBS -lmplex2 $LIBM"
1583 LIBS="$LIBS $MPLEX_LIBS"
1584 OLD_LDFLAGS="$LDFLAGS"
1585 LDFLAGS="$LDFLAGS $MPLEX_LDFLAGS"
1586 dnl older libmplex uses off_t SegmentSize (), which leads to fuzzy ABI;
1587 dnl don't want this here
1588 AC_MSG_CHECKING([for valid mplex objects])
1589 AC_RUN_IFELSE([AC_LANG_SOURCE([[
1591 #include <interact.hpp>
1592 #include <outputstrm.hpp>
1593 #include <multiplexor.hpp>
1598 class TestOutputStream : public OutputStream {
1600 TestOutputStream () : OutputStream () { }
1601 void Write (uint8_t *a, unsigned int b) { }
1602 void NextSegment () { }
1603 uint64_t SegmentSize () { return 0; }
1605 int Open () { return 0; }
1607 MultiplexJob *job = new MultiplexJob ();
1608 vector<IBitStream *> inputs;
1609 job->SetupInputStreams (inputs);
1610 TestOutputStream *out = new TestOutputStream ();
1611 Multiplexor *mux = new Multiplexor(*job, *out, NULL);
1616 CPPFLAGS="$CPPFLAGS_GOOD"
1617 AC_SUBST(MPLEX_CFLAGS)
1618 AC_SUBST(MPLEX_LIBS)
1619 AC_SUBST(MPLEX_LDFLAGS)
1621 ],[AC_MSG_RESULT(no)],[])
1623 LDFLAGS="$OLD_LDFLAGS"
1625 CPPFLAGS="$OLD_CPPFLAGS"
1631 dnl *** musepack ***
1632 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSEPACK, true)
1633 AG_GST_CHECK_FEATURE(MUSEPACK, [musepackdec], musepack, [
1634 AC_CHECK_HEADER([mpc/mpcdec.h], [
1636 MUSEPACK_LIBS="-lmpcdec"
1637 AC_SUBST(MUSEPACK_LIBS)
1638 ], [HAVE_MUSEPACK="no"])
1642 translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true)
1643 AG_GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [
1644 PKG_CHECK_MODULES(NEON, neon >= 0.27.0 neon <= 0.30.99, HAVE_NEON="yes", [
1647 AC_SUBST(NEON_CFLAGS)
1652 translit(dnm, m, l) AM_CONDITIONAL(USE_OFA, true)
1653 AG_GST_CHECK_FEATURE(OFA, [ofa plugins], ofa, [
1654 PKG_CHECK_MODULES(OFA, libofa >= 0.9.3, HAVE_OFA="yes", [
1657 AC_SUBST(OFA_CFLAGS)
1662 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENAL, true)
1663 AG_GST_CHECK_FEATURE(OPENAL, [OpenAL plugin], openal, [
1664 PKG_CHECK_MODULES(OPENAL, openal >= 1.14, HAVE_OPENAL="yes", [
1667 AC_SUBST(OPENAL_CFLAGS)
1668 AC_SUBST(OPENAL_LIBS)
1672 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENCV, true)
1673 AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [
1674 dnl we specify a max. version too because we set CV_NO_BACKWARD_COMPATIBILITY
1675 dnl and don't want the build to break when a new opencv version comes out.
1676 dnl Need to adjust this upwards once we know that our code compiles fine with
1677 dnl a new version and the no-backward-compatibility define. (There doesn't
1678 dnl seem to be a switch to suppress the warnings the cvcompat.h header
1680 PKG_CHECK_MODULES([OPENCV], [opencv >= 3.0.0 opencv < 3.5.0] , [
1683 OLD_CPPFLAGS=$CPPFLAGS
1684 CPPFLAGS=$OPENCV_CFLAGS
1685 something_not_found=no
1686 AC_CHECK_HEADERS([opencv2/bgsegm.hpp \
1687 opencv2/calib3d.hpp \
1689 opencv2/imgproc.hpp \
1690 opencv2/objdetect.hpp \
1691 opencv2/opencv.hpp \
1693 opencv2/bgsegm.hpp], [], [something_not_found=yes])
1695 CPPFLAGS=$OLD_CPPFLAGS
1698 if test $something_not_found = "yes"; then
1699 AC_MSG_RESULT([not all opencv2 headers were found])
1705 PKG_CHECK_MODULES([OPENCV], [opencv4 >= 4.0.0 opencv4 < 4.2.0] , [
1708 OLD_CPPFLAGS=$CPPFLAGS
1709 CPPFLAGS=$OPENCV_CFLAGS
1710 something_not_found=no
1711 AC_CHECK_HEADERS([opencv2/bgsegm.hpp \
1712 opencv2/calib3d.hpp \
1714 opencv2/imgproc.hpp \
1715 opencv2/objdetect.hpp \
1716 opencv2/opencv.hpp \
1718 opencv2/bgsegm.hpp], [], [something_not_found=yes])
1720 CPPFLAGS=$OLD_CPPFLAGS
1723 if test $something_not_found = "yes"; then
1724 AC_MSG_RESULT([not all opencv2 headers were found])
1733 OPENCV_PREFIX="`$PKG_CONFIG --variable=prefix opencv`"
1734 AC_DEFINE_UNQUOTED(OPENCV_PREFIX, "$OPENCV_PREFIX", [opencv install prefix])
1735 AC_SUBST(OPENCV_PREFIX)
1736 OPENCV_PREFIX="`$PKG_CONFIG --variable=prefix opencv`"
1737 AC_DEFINE_UNQUOTED(OPENCV_PREFIX, "$OPENCV_PREFIX", [opencv install prefix])
1738 AC_SUBST(OPENCV_PREFIX)
1739 AC_SUBST(OPENCV_CFLAGS)
1740 AC_SUBST(OPENCV_LIBS)
1741 dnl the OpenCV prefix is used at runtime for some object properties, and also
1742 dnl used here to detect which directory is the correct one. For the second
1743 dnl case, make sure the right sysroot is used, ensuring correct behavior
1744 dnl during cross compilation.
1745 if test -d "$PKG_CONFIG_SYSROOT_DIR/$OPENCV_PREFIX/share/opencv/"; then
1746 AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["opencv"], [OpenCV path name])
1748 AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["OpenCV"], [OpenCV path name])
1753 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENEXR, true)
1754 AG_GST_CHECK_FEATURE(OPENEXR, [openexr library], openexr, [
1755 AG_GST_PKG_CHECK_MODULES(OPENEXR, OpenEXR)
1758 dnl *** openh264 ***
1759 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENH264, true)
1760 AG_GST_CHECK_FEATURE(OPENH264, [openh264 library], openh264, [
1761 AG_GST_PKG_CHECK_MODULES(OPENH264, openh264 >= 1.3.0)
1764 dnl *** OpenJPEG ***
1765 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENJPEG, true)
1766 AG_GST_CHECK_FEATURE(OPENJPEG, [openjpeg library], openjpeg, [
1768 AG_GST_PKG_CHECK_MODULES(OPENJPEG, libopenjp2 >= 2.2)
1769 AC_SUBST(OPENJPEG_CFLAGS)
1770 AC_SUBST(OPENJPEG_LIBS)
1774 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENMPT, true)
1775 AG_GST_CHECK_FEATURE(OPENMPT, openmpt, openmpt, [
1776 PKG_CHECK_MODULES(OPENMPT, libopenmpt, HAVE_OPENMPT="yes", HAVE_OPENMPT="no")
1777 AC_SUBST(OPENMPT_CFLAGS)
1778 AC_SUBST(OPENMPT_LIBS)
1782 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENNI2, true)
1783 AG_GST_CHECK_FEATURE(OPENNI2, [openni2 library], openni2, [
1784 PKG_CHECK_MODULES(OPENNI2, libopenni2 >= 0.26, HAVE_OPENNI2="yes", [ HAVE_OPENNI2="no" ] )
1785 AC_SUBST(OPENNI2_CFLAGS)
1786 AC_SUBST(OPENNI2_LIBS)
1790 translit(dnm, m, l) AM_CONDITIONAL(USE_OPUS, true)
1791 AG_GST_CHECK_FEATURE(OPUS, [opus], opus, [
1792 PKG_CHECK_MODULES(OPUS, opus >= 0.9.4, [
1793 AC_DEFINE([HAVE_OPUS], 1, [Define if Opus >= 0.9.4 is installed])
1798 AC_SUBST(OPUS_CFLAGS)
1803 translit(dnm, m, l) AM_CONDITIONAL(USE_PANGO, true)
1804 AG_GST_CHECK_FEATURE(PANGO, [Pango font rendering], pango, [
1805 AG_GST_PKG_CHECK_MODULES(PANGO, pango >= 1.22.0 pangocairo >= 1.22.0)
1809 translit(dnm, m, l) AM_CONDITIONAL(USE_RSVG, true)
1810 AG_GST_CHECK_FEATURE(RSVG, [rsvg decoder], rsvg, [
1811 AG_GST_PKG_CHECK_MODULES(RSVG, librsvg-2.0 >= 2.36.2)
1816 translit(dnm, m, l) AM_CONDITIONAL(USE_GL, true)
1817 AG_GST_CHECK_FEATURE(GL, [gl elements], gl, [
1818 if test "x$HAVE_GST_GL" = "xyes"; then
1822 AM_CONDITIONAL(USE_GL, test "x$HAVE_GL" = "xyes")
1823 AM_CONDITIONAL(USE_OPENGL, test "x$GST_GL_HAVE_API_GL" = "x1")
1825 dnl *** teletextdec ***
1826 translit(dnm, m, l) AM_CONDITIONAL(USE_TELETEXTDEC, true)
1827 AG_GST_CHECK_FEATURE(TELETEXTDEC, [Teletext decoder], teletextdec, [
1828 AG_GST_PKG_CHECK_MODULES(TELETEXTDEC, zvbi-0.2)
1831 dnl *** wildmidi ***
1832 translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
1833 AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
1834 AG_GST_CHECK_LIBHEADER(WILDMIDI, WildMidi,
1837 WILDMIDI_LIBS="-lWildMidi")
1840 if test "x$HAVE_WILDMIDI" = "xyes"; then
1841 AC_MSG_CHECKING([for wildmidi >= 4.0])
1842 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <wildmidi_lib.h>]], [[
1843 #if LIBWILDMIDI_VER_MAJOR == 0 && LIBWILDMIDI_VER_MINOR < 4
1844 #error "wildmidi too old"
1846 ]])], [ AC_MSG_RESULT(yes)
1849 WILDMIDI_LIBS=-lWildMidi
1850 ], [ AC_MSG_RESULT(no)
1854 AC_MSG_WARN([WildMidi library or development headers not found])
1856 AC_SUBST(WILDMIDI_CFLAGS)
1857 AC_SUBST(WILDMIDI_LIBS)
1860 dnl **** Smooth Streaming ****
1861 translit(dnm, m, l) AM_CONDITIONAL(USE_SMOOTHSTREAMING, true)
1862 AG_GST_CHECK_FEATURE(SMOOTHSTREAMING, [Smooth Streaming plug-in], smoothstreaming, [
1863 PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.4,
1865 HAVE_SMOOTHSTREAMING="yes"],
1867 HAVE_SMOOTHSTREAMING="no"])
1868 AC_SUBST(LIBXML2_CFLAGS)
1869 AC_SUBST(LIBXML2_LIBS)
1873 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
1874 AG_GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfdec sfenc, [
1875 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.16, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
1876 AC_SUBST(SNDFILE_CFLAGS)
1877 AC_SUBST(SNDFILE_LIBS)
1880 dnl *** soundtouch ***
1881 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUNDTOUCH, true)
1882 AG_GST_CHECK_FEATURE(SOUNDTOUCH, [soundtouch plug-in], soundtouch, [
1883 dnl We only need -lBPM on soundtouch < 1.4
1884 dnl We check for libSoundTouch since Debian used it before upstream
1885 dnl added a pkgconfig file.
1886 HAVE_SOUNDTOUCH_1_4=yes
1887 PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch,
1888 [HAVE_SOUNDTOUCH=yes],
1889 [PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.4,
1890 [HAVE_SOUNDTOUCH=yes],
1891 [PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0,
1892 [HAVE_SOUNDTOUCH=yes
1893 HAVE_SOUNDTOUCH_1_4=no
1894 SOUNDTOUCH_LIBS="$SOUNDTOUCH_LIBS -lBPM"],
1895 [PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch >= 1.4,
1896 [HAVE_SOUNDTOUCH=yes],
1897 [PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch,
1898 [HAVE_SOUNDTOUCH=yes
1899 HAVE_SOUNDTOUCH_1_4=no
1900 SOUNDTOUCH_LIBS="$SOUNDTOUCH_LIBS -lBPM"],
1901 HAVE_SOUNDTOUCH=no)])])])])
1902 AC_SUBST(SOUNDTOUCH_CFLAGS)
1903 AC_SUBST(SOUNDTOUCH_LIBS)
1904 if test "x$HAVE_CXX" != "xyes"; then
1905 USE_SOUNDTOUCH=false
1906 AC_MSG_NOTICE([Not building soundtouch plugin: no C++ compiler found])
1908 if test "x$HAVE_SOUNDTOUCH" = "xyes" -a "x$HAVE_SOUNDTOUCH_1_4" = "xyes"; then
1909 AC_DEFINE([HAVE_SOUNDTOUCH_1_4], [1],
1910 [Defined if the available libSoundTouch is >= 1.4])
1915 translit(dnm, m, l) AM_CONDITIONAL(USE_GME, true)
1916 AG_GST_CHECK_FEATURE(GME, [gme decoder], gme, [
1917 AC_CHECK_HEADER(gme/gme.h, [
1918 AC_CHECK_LIB(gme, gme_new_emu, [
1929 if test "x$HAVE_GME" = "xyes"; then
1930 AC_CHECK_LIB(gme, gme_enable_accuracy, [
1931 AC_DEFINE(HAVE_LIBGME_ACCURACY, 1, [Define if gme 0.5.6 or newer is available])
1937 translit(dnm, m, l) AM_CONDITIONAL(USE_DVB, true)
1938 AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [
1939 AC_MSG_CHECKING([Checking for up to date dvb installation])
1940 AC_CHECK_HEADER(linux/dvb/version.h, [
1941 AC_MSG_CHECKING([for up-to-date dvb API])
1942 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/dvb/version.h>]], [[
1943 #if DVB_API_VERSION < 5 || (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR <= 4)
1944 #error "Incompatible dvb API"
1946 ]])], [ AC_MSG_RESULT(yes)
1948 ], [ AC_MSG_RESULT(no)
1955 translit(dnm, m, l) AM_CONDITIONAL(USE_SBC, true)
1956 AG_GST_CHECK_FEATURE(SBC, [SBC bluetooth audio codec], sbc, [
1957 AG_GST_PKG_CHECK_MODULES(SBC, [sbc >= 1.0])
1961 translit(dnm, m, l) AM_CONDITIONAL(USE_ZBAR, true)
1962 AG_GST_CHECK_FEATURE(ZBAR, [ZBar barcode detector], zbar, [
1963 AG_GST_PKG_CHECK_MODULES(ZBAR, zbar >= 0.9)
1967 translit(dnm, m, l) AM_CONDITIONAL(USE_RTMP, true)
1968 AG_GST_CHECK_FEATURE(RTMP, [rtmp library], rtmp, [
1969 AG_GST_PKG_CHECK_MODULES(RTMP, librtmp)
1973 translit(dnm, m, l) AM_CONDITIONAL(USE_SPANDSP, true)
1974 AG_GST_CHECK_FEATURE(SPANDSP, [Spandsp], spandsp, [
1975 PKG_CHECK_MODULES(SPANDSP, spandsp >= 0.0.6, [
1976 HAVE_SPANDSP="yes" ], [
1980 AC_SUBST(SPANDSP_CFLAGS)
1981 AC_SUBST(SPANDSP_LIBS)
1983 dnl *** hls-crypto ***
1984 AC_ARG_WITH([hls-crypto],
1985 AS_HELP_STRING([--with-hls-crypto=auto|nettle|libgcrypt|openssl], [
1986 which cryptographic library version to compile against for hls (default: auto)
1988 AS_CASE([$with_hls_crypto],
1992 [with_hls_crypto=auto]
1998 translit(dnm, m, l) AM_CONDITIONAL(USE_HLS, true)
1999 AG_GST_CHECK_FEATURE(HLS, [http live streaming plugin], hls, [
2000 AS_CASE([$with_hls_crypto],
2002 PKG_CHECK_MODULES(NETTLE, nettle, [
2003 AC_DEFINE(HAVE_NETTLE, 1, [Define if nettle is available])
2005 ],[AC_MSG_ERROR([Could not find nettle library])])
2008 AM_PATH_LIBGCRYPT([1.2.0], [
2009 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define if libgcrypt is available])
2011 ],[AC_MSG_ERROR([Could not find libgcrypt library])])
2014 PKG_CHECK_MODULES(OPENSSL, openssl, [
2015 AC_DEFINE(HAVE_OPENSSL, 1, [Define if openssl is available])
2017 ],[AC_MSG_ERROR([Could not find openssl library])])
2020 dnl Try to find a valid crypto library
2022 PKG_CHECK_MODULES(NETTLE, nettle, [
2023 AC_DEFINE(HAVE_NETTLE, 1, [Define if nettle is available])
2025 AM_PATH_LIBGCRYPT([1.2.0], [
2026 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define if libgcrypt is available])
2028 PKG_CHECK_MODULES(OPENSSL, openssl, [
2029 AC_DEFINE(HAVE_OPENSSL, 1, [Define if openssl is available])
2037 dnl *** x265 (H.265/HEVC encoder) ***
2038 translit(dnm, m, l) AM_CONDITIONAL(USE_X265, true)
2039 AG_GST_CHECK_FEATURE(X265, [x265 plug-in], x265, [
2040 AG_GST_PKG_CHECK_MODULES(X265, x265)
2043 dnl *** WebRTC Audio Processing ***
2044 dnl Note: We test for a specific version as there is no API stability
2045 translit(dnm, m, l) AM_CONDITIONAL(USE_WEBRTCDSP, true)
2046 AG_GST_CHECK_FEATURE(WEBRTCDSP, [WebRTC Audio Processing], webrtcdsp, [
2048 AG_GST_PKG_CHECK_MODULES(WEBRTCDSP, webrtc-audio-processing >= 0.2 webrtc-audio-processing < 0.4)
2050 # On Android, C++ headers comes with the STL implementation
2051 AS_CASE(["${host}"],
2054 PKG_CHECK_MODULES(GNUSTL, gnustl, [
2055 WEBRTCDSP_CFLAGS="$WEBRTCDSP_CFLAGS $GNUSTL_CFLAGS"
2056 WEBRTCDSP_LIBS="$WEBRTCDSP_LIBS $GNUSTL_LIBS"])
2058 AC_SUBST([WEBRTCDSP_CFLAGS])
2059 AC_SUBST([WEBRTCDSP_LIBS])
2062 old_CPPFLAGS=$CPPFLAGS
2063 CPPFLAGS="-std=c++11 $CPPFLAGS $GNUSTL_CFLAGS"
2064 AC_CHECK_HEADER([vector],[],[HAVE_WEBRTCDSP=no])
2065 CPPFLAGS=$old_CPPFLAGS
2070 translit(dnm, m, l) AM_CONDITIONAL(USE_WEBRTC, true)
2071 AG_GST_CHECK_FEATURE(WEBRTC, [WebRTC], webrtc, [
2072 PKG_CHECK_MODULES(NICE, nice >= 0.1.14, [
2073 HAVE_WEBRTC="yes" ], [
2079 translit(dnm, m, l) AM_CONDITIONAL(USE_WPE, true)
2080 AG_GST_CHECK_FEATURE(WPE, [WPE plug-in], wpe, [
2081 PKG_CHECK_MODULES(WPE, [ wpe-webkit-1.0 >= 2.24 wpebackend-fdo-1.0 egl xkbcommon ], [
2088 translit(dnm, m, l) AM_CONDITIONAL(USE_SCTP, true)
2089 AG_GST_CHECK_FEATURE(SCTP, [sctp plug-in], sctp, [
2090 AC_CHECK_HEADER(usrsctp.h, [
2091 AC_CHECK_LIB(usrsctp, usrsctp_init, [
2092 USRSCTP_LIBS="-lusrsctp"
2093 AC_SUBST(USRSCTP_LIBS)
2104 PKG_CHECK_MODULES(LIBLTC, ltc >= 1.1.4, HAVE_LTC=yes, HAVE_LTC=no)
2105 if test "x$HAVE_LTC" = "xyes"; then
2107 AC_DEFINE(HAVE_LTC, 1, [Use libltc])
2112 dnl not building plugins with external dependencies,
2113 dnl but we still need to set the conditionals
2115 AM_CONDITIONAL(USE_ASSRENDER, false)
2116 AM_CONDITIONAL(USE_AOM, false)
2117 AM_CONDITIONAL(USE_AVTP, false)
2118 AM_CONDITIONAL(USE_VOAMRWBENC, false)
2119 AM_CONDITIONAL(USE_VOAACENC, false)
2120 AM_CONDITIONAL(USE_BS2B, false)
2121 AM_CONDITIONAL(USE_BZ2, false)
2122 AM_CONDITIONAL(USE_CHROMAPRINT, false)
2123 AM_CONDITIONAL(USE_CURL, false)
2124 AM_CONDITIONAL(USE_SSH2, false)
2125 AM_CONDITIONAL(USE_DASH, false)
2126 AM_CONDITIONAL(USE_DC1394, false)
2127 AM_CONDITIONAL(USE_DECKLINK, false)
2128 AM_CONDITIONAL(DECKLINK_OSX, false)
2129 AM_CONDITIONAL(DECKLINK_WIN, false)
2130 AM_CONDITIONAL(USE_DIRECTFB, false)
2131 AM_CONDITIONAL(USE_WAYLAND, false)
2132 AM_CONDITIONAL(USE_DTS, false)
2133 AM_CONDITIONAL(USE_EXIF, false)
2134 AM_CONDITIONAL(USE_RESINDVD, false)
2135 AM_CONDITIONAL(USE_FAAC, false)
2136 AM_CONDITIONAL(USE_FAAD, false)
2137 AM_CONDITIONAL(USE_FBDEV, false)
2138 AM_CONDITIONAL(USE_FDK_AAC, false)
2139 AM_CONDITIONAL(USE_FLITE, false)
2140 AM_CONDITIONAL(USE_FLUIDSYNTH, false)
2141 AM_CONDITIONAL(USE_GL, false)
2142 AM_CONDITIONAL(USE_GSM, false)
2143 AM_CONDITIONAL(USE_HLS, false)
2144 AM_CONDITIONAL(USE_IQA, false)
2145 AM_CONDITIONAL(USE_KATE, false)
2146 AM_CONDITIONAL(USE_KMS, false)
2147 AM_CONDITIONAL(USE_TIGER, false)
2148 AM_CONDITIONAL(USE_LADSPA, false)
2149 AM_CONDITIONAL(USE_LCMS2, false)
2150 AM_CONDITIONAL(USE_LV2, false)
2151 AM_CONDITIONAL(USE_LIBDE265, false)
2152 AM_CONDITIONAL(USE_LIBMMS, false)
2153 AM_CONDITIONAL(USE_MODPLUG, false)
2154 AM_CONDITIONAL(USE_MPEG2ENC, false)
2155 AM_CONDITIONAL(USE_MPLEX, false)
2156 AM_CONDITIONAL(USE_MUSEPACK, false)
2157 AM_CONDITIONAL(USE_NEON, false)
2158 AM_CONDITIONAL(USE_OFA, false)
2159 AM_CONDITIONAL(USE_OPENAL, false)
2160 AM_CONDITIONAL(USE_OPENCV, false)
2161 AM_CONDITIONAL(USE_OPENEXR, false)
2162 AM_CONDITIONAL(USE_OPENGL, false)
2163 AM_CONDITIONAL(USE_OPENJPEG, false)
2164 AM_CONDITIONAL(USE_OPENMPT, false)
2165 AM_CONDITIONAL(USE_OPENNI2, false)
2166 AM_CONDITIONAL(USE_OPUS, false)
2167 AM_CONDITIONAL(USE_PANGO, false)
2168 AM_CONDITIONAL(USE_WILDMIDI, false)
2169 AM_CONDITIONAL(USE_SMOOTHSTREAMING, false)
2170 AM_CONDITIONAL(USE_SNDFILE, false)
2171 AM_CONDITIONAL(USE_SOUNDTOUCH, false)
2172 AM_CONDITIONAL(USE_SPANDSP, false)
2173 AM_CONDITIONAL(USE_SRTP, false)
2174 AM_CONDITIONAL(USE_SRT, false)
2175 AM_CONDITIONAL(USE_GME, false)
2176 AM_CONDITIONAL(USE_DVB, false)
2177 AM_CONDITIONAL(USE_SBC, false)
2178 AM_CONDITIONAL(USE_ZBAR, false)
2179 AM_CONDITIONAL(USE_RSVG, false)
2180 AM_CONDITIONAL(USE_RTMP, false)
2181 AM_CONDITIONAL(USE_TELETEXTDEC, false)
2182 AM_CONDITIONAL(USE_UVCH264, false)
2183 AM_CONDITIONAL(USE_WEBP, false)
2184 AM_CONDITIONAL(USE_WEBRTC, false)
2185 AM_CONDITIONAL(USE_WEBRTCDSP, false)
2186 AM_CONDITIONAL(USE_OPENH264, false)
2187 AM_CONDITIONAL(USE_X265, false)
2188 AM_CONDITIONAL(USE_DTLS, false)
2189 AM_CONDITIONAL(USE_TTML, false)
2190 AM_CONDITIONAL(USE_SCTP, false)
2192 fi dnl of EXT plugins
2194 dnl *** finalize CFLAGS, LDFLAGS, LIBS
2197 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
2198 dnl GST_*: flags shared by built objects to link against GStreamer
2199 dnl GST_ALL_LDFLAGS: linker flags shared by all
2200 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
2201 dnl GST_LT_LDFLAGS: library versioning of our libraries
2202 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
2204 dnl GST_OPTION_CFLAGS
2205 if test "x$USE_DEBUG" = xyes; then
2208 AC_SUBST(PROFILE_CFLAGS)
2210 if test "x$PACKAGE_VERSION_NANO" = "x1"; then
2211 dnl Define _only_ during CVS (not pre-releases or releases)
2212 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
2214 DEPRECATED_CFLAGS=""
2216 AC_SUBST(DEPRECATED_CFLAGS)
2218 VISIBILITY_CFLAGS=""
2219 AS_COMPILER_FLAG([-fvisibility=hidden], [
2220 VISIBILITY_CFLAGS="-fvisibility=hidden"
2221 AC_DEFINE(GST_API_EXPORT, [extern __attribute__ ((visibility ("default")))], [public symbol export define])
2223 VISIBILITY_CFLAGS=""
2224 AC_DEFINE(GST_API_EXPORT, [extern], [public symbol export define])
2226 AC_SUBST(VISIBILITY_CFLAGS)
2228 VISIBILITY_CXXFLAGS=""
2229 if test "x$HAVE_CXX" = "xyes"; then
2230 AS_CXX_COMPILER_FLAG([-fvisibility=hidden], [VISIBILITY_CXXFLAGS="-fvisibility=hidden"])
2232 AC_SUBST(VISIBILITY_CXXFLAGS)
2234 dnl disable strict aliasing
2235 AS_COMPILER_FLAG([-fno-strict-aliasing], [EXTRA_CFLAGS="-fno-strict-aliasing"])
2236 AC_SUBST(EXTRA_CFLAGS)
2238 dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden
2239 dnl at make time with e.g. make ERROR_CFLAGS=""
2240 GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
2241 GST_OPTION_CXXFLAGS="\$(WARNING_CXXFLAGS) \$(ERROR_CXXFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
2242 GST_OPTION_OBJCFLAGS="\$(WARNING_OBJCFLAGS) \$(ERROR_OBJCFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
2243 AC_SUBST(GST_OPTION_CFLAGS)
2244 AC_SUBST(GST_OPTION_CXXFLAGS)
2245 AC_SUBST(GST_OPTION_OBJCFLAGS)
2247 dnl FIXME: do we want to rename to GST_ALL_* ?
2248 dnl prefer internal headers to already installed ones
2249 dnl also add builddir include for enumtypes and marshal
2250 dnl add GST_OPTION_CFLAGS, but overridable
2251 GST_CFLAGS="$GST_CFLAGS $GST_STATIC_CFLAGS -DGST_USE_UNSTABLE_API"
2252 GST_CXXFLAGS="$GST_CFLAGS $EXTRA_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CXXFLAGS) \$(VISIBILITY_CXXFLAGS)"
2253 GST_OBJCFLAGS="$GST_CFLAGS $EXTRA_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_OBJCFLAGS) \$(VISIBILITY_CFLAGS)"
2254 GST_CFLAGS="$GST_CFLAGS $EXTRA_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CFLAGS) \$(VISIBILITY_CFLAGS)"
2255 AC_SUBST(GST_CFLAGS)
2256 AC_SUBST(GST_CXXFLAGS)
2257 AC_SUBST(GST_OBJCFLAGS)
2259 GST_PLUGINS_BAD_CXXFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs"
2260 GST_PLUGINS_BAD_OBJCFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs"
2261 GST_PLUGINS_BAD_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs"
2262 AC_SUBST(GST_PLUGINS_BAD_CFLAGS)
2263 AC_SUBST(GST_PLUGINS_BAD_CXXFLAGS)
2264 AC_SUBST(GST_PLUGINS_BAD_OBJCFLAGS)
2266 dnl LDFLAGS really should only contain flags, not libs - they get added before
2267 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
2268 GST_ALL_LDFLAGS="-no-undefined"
2269 if test "x${enable_Bsymbolic}" = "xyes"; then
2270 GST_ALL_LDFLAGS="$GST_ALL_LDFLAGS -Wl,-Bsymbolic-functions"
2272 AC_SUBST(GST_ALL_LDFLAGS)
2275 dnl linker flags shared by all libraries
2276 dnl LDFLAGS modifier defining exported symbols from built libraries
2277 dnl (export _gst_foo but not __gst_foo)
2279 AC_SUBST(GST_LIB_LDFLAGS)
2281 dnl this really should only contain flags, not libs - they get added before
2282 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
2283 GST_PLUGIN_LDFLAGS="-module -avoid-version $GST_ALL_LDFLAGS"
2284 AC_SUBST(GST_PLUGIN_LDFLAGS)
2286 dnl *** output files ***
2288 $MKDIR_P tests/check/orc
2297 gst/accurip/Makefile
2298 gst/adpcmdec/Makefile
2299 gst/adpcmenc/Makefile
2301 gst/videoframe_audiolevel/Makefile
2303 gst/audiobuffersplit/Makefile
2304 gst/audiofxbad/Makefile
2305 gst/audiolatency/Makefile
2306 gst/audiomixmatrix/Makefile
2307 gst/audiovisualizers/Makefile
2308 gst/autoconvert/Makefile
2310 gst/camerabin2/Makefile
2311 gst/coloreffects/Makefile
2312 gst/debugutils/Makefile
2313 gst/dvbsuboverlay/Makefile
2315 gst/faceoverlay/Makefile
2316 gst/festival/Makefile
2317 gst/fieldanalysis/Makefile
2318 gst/freeverb/Makefile
2320 gst/gaudieffects/Makefile
2321 gst/geometrictransform/Makefile
2325 gst/interlace/Makefile
2326 gst/ivfparse/Makefile
2328 gst/jp2kdecimator/Makefile
2329 gst/jpegformat/Makefile
2332 gst/mpegdemux/Makefile
2333 gst/mpegtsdemux/Makefile
2334 gst/mpegtsmux/Makefile
2335 gst/mpegtsmux/tsmux/Makefile
2336 gst/mpegpsmux/Makefile
2340 gst/pcapparse/Makefile
2343 gst/rawparse/Makefile
2344 gst/removesilence/Makefile
2348 gst/segmentclip/Makefile
2353 gst/timecode/Makefile
2354 gst/videofilters/Makefile
2355 gst/videoparsers/Makefile
2356 gst/videosignal/Makefile
2361 gst-libs/gst/Makefile
2362 gst-libs/gst/adaptivedemux/Makefile
2363 gst-libs/gst/basecamerabinsrc/Makefile
2364 gst-libs/gst/insertbin/Makefile
2365 gst-libs/gst/interfaces/Makefile
2366 gst-libs/gst/isoff/Makefile
2367 gst-libs/gst/codecparsers/Makefile
2368 gst-libs/gst/mpegts/Makefile
2369 gst-libs/gst/sctp/Makefile
2370 gst-libs/gst/uridownloader/Makefile
2371 gst-libs/gst/wayland/Makefile
2372 gst-libs/gst/webrtc/Makefile
2373 gst-libs/gst/player/Makefile
2374 gst-libs/gst/audio/Makefile
2375 gst-libs/gst/opencv/Makefile
2377 sys/dshowdecwrapper/Makefile
2378 sys/androidmedia/Makefile
2379 sys/applemedia/Makefile
2381 sys/d3dvideosink/Makefile
2382 sys/decklink/Makefile
2383 sys/directsound/Makefile
2384 sys/dshowsrcwrapper/Makefile
2385 sys/dshowvideosink/Makefile
2388 sys/ipcpipeline/Makefile
2391 sys/nvcodec/Makefile
2392 sys/opensles/Makefile
2394 sys/tinyalsa/Makefile
2395 sys/uvch264/Makefile
2398 sys/winscreencap/Makefile
2400 tests/check/Makefile
2401 tests/files/Makefile
2402 tests/examples/Makefile
2403 tests/examples/avsamplesink/Makefile
2404 tests/examples/camerabin2/Makefile
2405 tests/examples/codecparsers/Makefile
2406 tests/examples/directfb/Makefile
2407 tests/examples/audiomixmatrix/Makefile
2408 tests/examples/ipcpipeline/Makefile
2409 tests/examples/mpegts/Makefile
2410 tests/examples/mxf/Makefile
2411 tests/examples/opencv/Makefile
2412 tests/examples/uvch264/Makefile
2413 tests/examples/waylandsink/Makefile
2414 tests/examples/webrtc/Makefile
2415 tests/icles/Makefile
2416 ext/voamrwbenc/Makefile
2417 ext/voaacenc/Makefile
2418 ext/assrender/Makefile
2423 ext/chromaprint/Makefile
2424 ext/closedcaption/Makefile
2425 ext/colormanagement/Makefile
2429 ext/directfb/Makefile
2430 ext/wayland/Makefile
2436 ext/fluidsynth/Makefile
2443 ext/libde265/Makefile
2446 ext/modplug/Makefile
2447 ext/mpeg2enc/Makefile
2449 ext/musepack/Makefile
2454 ext/openexr/Makefile
2455 ext/openh264/Makefile
2456 ext/openjpeg/Makefile
2457 ext/openmpt/Makefile
2458 ext/openni2/Makefile
2461 ext/resindvd/Makefile
2465 ext/smoothstreaming/Makefile
2466 ext/sndfile/Makefile
2467 ext/soundtouch/Makefile
2468 ext/spandsp/Makefile
2471 ext/teletextdec/Makefile
2473 ext/wildmidi/Makefile
2479 ext/webrtcdsp/Makefile
2484 pkgconfig/gstreamer-plugins-bad.pc
2485 pkgconfig/gstreamer-plugins-bad-uninstalled.pc
2486 pkgconfig/gstreamer-codecparsers.pc
2487 pkgconfig/gstreamer-codecparsers-uninstalled.pc
2488 pkgconfig/gstreamer-insertbin.pc
2489 pkgconfig/gstreamer-insertbin-uninstalled.pc
2490 pkgconfig/gstreamer-mpegts.pc
2491 pkgconfig/gstreamer-mpegts-uninstalled.pc
2492 pkgconfig/gstreamer-player.pc
2493 pkgconfig/gstreamer-player-uninstalled.pc
2494 pkgconfig/gstreamer-sctp.pc
2495 pkgconfig/gstreamer-sctp-uninstalled.pc
2496 pkgconfig/gstreamer-wayland.pc
2497 pkgconfig/gstreamer-wayland-uninstalled.pc
2498 pkgconfig/gstreamer-webrtc.pc
2499 pkgconfig/gstreamer-webrtc-uninstalled.pc
2500 pkgconfig/gstreamer-bad-audio.pc
2501 pkgconfig/gstreamer-bad-audio-uninstalled.pc
2508 AG_GST_OUTPUT_PLUGINS