1 # gstreamer-vaapi package version number
2 m4_define([gst_vaapi_major_version], [0])
3 m4_define([gst_vaapi_minor_version], [7])
4 m4_define([gst_vaapi_micro_version], [1])
5 m4_define([gst_vaapi_pre_version], [1])
6 m4_define([gst_vaapi_version],
7 [gst_vaapi_major_version.gst_vaapi_minor_version.gst_vaapi_micro_version])
8 m4_if(gst_vaapi_pre_version, [0], [], [
9 m4_append([gst_vaapi_version], gst_vaapi_pre_version, [.pre])
13 m4_define([default_glapi], [any])
15 # gstreamer-vaapi library (libtool) version number
16 m4_define([gst_vaapi_lt_current], [7])
17 m4_define([gst_vaapi_lt_current_bias], [7])
18 m4_define([gst_vaapi_lt_revision], [0])
19 m4_define([gst_vaapi_lt_age], [0])
22 m4_define([glib_version], [2.32])
24 # gmodule version number
25 m4_define([gmodule_version], [2.32])
27 # gstreamer version number
28 m4_define([gst_version], [1.6.3])
29 m4_define([gst_plugins_base_version], [1.6.3])
30 m4_define([gst_plugins_bad_version], [1.6.3])
32 # Wayland minimum version number
33 m4_define([wayland_api_version], [1.0.2])
35 # VA-API minimum version number
36 m4_define([va_api_version], [0.30.4])
37 m4_define([va_api_enc_version], [0.34.0])
38 m4_define([va_api_drm_version], [0.33.0])
39 m4_define([va_api_x11_version], [0.31.0])
40 m4_define([va_api_wld_version], [0.33.0])
42 # gtk-doc version number
43 # XXX: introspection annotations require gtk-doc >= 1.12
44 m4_define([gtkdoc_version], [1.9])
47 AC_INIT([gst_vaapi], [gst_vaapi_version],
48 [gwenole.beauchesne@intel.com, sreerenj.balachandran@intel.com],
51 AC_CONFIG_HEADERS([config.h])
52 AC_CONFIG_SRCDIR([Makefile.am])
53 AC_CONFIG_MACRO_DIR([m4])
54 AC_CONFIG_AUX_DIR([build-aux])
58 AM_INIT_AUTOMAKE([1.11 tar-ustar no-dist-gzip dist-bzip2])
60 dnl Use pretty build output with automake >= 1.11
61 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [
62 AM_DEFAULT_VERBOSITY=1
63 AC_SUBST(AM_DEFAULT_VERBOSITY)
70 AC_ARG_VAR([GIT], [Path to git program, if any])
71 AC_PATH_PROG([GIT], [git])
72 AM_CONDITIONAL([HAVE_GIT], [test -n "$GIT"])
74 dnl Initialize libtool
78 AC_ARG_ENABLE([encoders],
79 AS_HELP_STRING([--enable-encoders],
80 [enable video encoders @<:@default=yes@:>@]),
81 [], [enable_encoders="yes"])
84 AS_HELP_STRING([--enable-drm],
85 [enable DRM backend @<:@default=yes@:>@]),
86 [], [enable_drm="yes"])
89 AS_HELP_STRING([--enable-x11],
90 [enable X11 output @<:@default=yes@:>@]),
91 [], [enable_x11="yes"])
94 AS_HELP_STRING([--enable-glx],
95 [enable OpenGL/X11 output @<:@default=yes@:>@]),
96 [], [enable_glx="yes"])
98 AC_ARG_ENABLE(wayland,
99 AC_HELP_STRING([--enable-wayland],
100 [enable Wayland output @<:@default=yes@:>@]),
101 [], [enable_wayland="yes"])
104 AS_HELP_STRING([--enable-egl],
105 [enable EGL output @<:@default=yes@:>@]),
106 [], [enable_egl="yes"])
109 AS_HELP_STRING([--with-glapi=APIs],
110 [build with the specified OpenGL APIs @<:@default=default_glapi@:>@]),
111 [GLAPI="$with_glapi"], [GLAPI=default_glapi])
113 dnl Check for basic libraries
116 dnl Check for Gtk doc
117 GTKDOC_VERSION=gtkdoc_version
118 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
119 m4_ifdef([GTK_DOC_CHECK], [
120 GTK_DOC_CHECK([$GTKDOC_VERSION], [--flavour no-tmpl])], [
121 AM_CONDITIONAL([ENABLE_GTK_DOC], [false])])
124 GLIB_VERSION_REQUIRED=glib_version
125 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $GLIB_VERSION_REQUIRED])
127 dnl Check to see if dlopen is in default libraries (like Solaris, which
128 dnl has it in libc), or if libdl is needed to get it.
129 AC_CHECK_FUNC([dlopen], [], [
130 AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
131 AC_SUBST([DLOPEN_LIBS])
133 dnl ---------------------------------------------------------------------------
135 dnl ---------------------------------------------------------------------------
136 GST_PKG_VERSION="1.0"
137 AC_SUBST([GST_PKG_VERSION])
138 AC_DEFINE_UNQUOTED([GST_PKG_VERSION_S], ["$GST_PKG_VERSION"],
139 [Defined to the string representation of GStreamer API version])
141 dnl Versions for GStreamer and plugins-base
142 GST_VERSION_REQUIRED=gst_version
143 GST_PLUGINS_BASE_VERSION_REQUIRED=gst_plugins_base_version
144 GST_PLUGINS_BAD_VERSION_REQUIRED=gst_plugins_bad_version
147 PKG_CHECK_MODULES([GST],
148 [gstreamer-$GST_PKG_VERSION >= $GST_VERSION_REQUIRED])
150 AC_MSG_CHECKING([for GStreamer API version])
151 gst_api_version=`$PKG_CONFIG --modversion "gstreamer-$GST_PKG_VERSION"`
152 gst_major_version=`echo "$gst_api_version" | cut -d'.' -f1`
153 gst_minor_version=`echo "$gst_api_version" | cut -d'.' -f2`
154 GST_API_VERSION="${gst_major_version}.${gst_minor_version}"
155 AC_MSG_RESULT([$GST_API_VERSION])
156 AC_DEFINE_UNQUOTED([GST_API_VERSION_S], ["$GST_API_VERSION"],
157 [Defined to the string representation of GStreamer version])
159 PKG_CHECK_MODULES([GST_BASE],
160 [gstreamer-base-$GST_PKG_VERSION >= $GST_VERSION_REQUIRED])
162 dnl GStreamer -base plugins
163 PKG_CHECK_MODULES([GST_PLUGINS_BASE],
164 [gstreamer-plugins-base-$GST_PKG_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
166 dnl ... gst_dmabuf_memory_get_fd (gstreamer-allocators)
167 PKG_CHECK_MODULES([GST_ALLOCATORS],
168 [gstreamer-allocators-$GST_PKG_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
170 dnl ... GstVideoOverlayComposition (gstreamer-video)
171 PKG_CHECK_MODULES([GST_VIDEO],
172 [gstreamer-video-$GST_PKG_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
174 dnl ... GStreamer base utils (gstreamer-pbutils)
175 PKG_CHECK_MODULES([GST_PBUTILS],
176 [gstreamer-pbutils-$GST_PKG_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
178 dnl ... bitstream parsers
179 PKG_CHECK_MODULES([GST_CODEC_PARSERS],
180 [gstreamer-codecparsers-$GST_PKG_VERSION >= $GST_PLUGINS_BAD_VERSION_REQUIRED])
182 dnl ... VP9 parser, with required extensions
183 HAVE_GST_VP9_PARSER=0
184 AC_CACHE_CHECK([for VP9 parser],
185 ac_cv_have_gst_vp9_parser, [
186 saved_CPPFLAGS="$CPPFLAGS"
187 CPPFLAGS="$CPPFLAGS $GST_CFLAGS $GST_CODEC_PARSERS_CFLAGS"
189 LIBS="$LIBS $GST_LIBS $GST_CODEC_PARSERS_LIBS"
192 [[#include <gst/codecparsers/gstvp9parser.h>]],
193 [[GstVp9FrameHdr frame_hdr;]])],
194 [ac_cv_have_gst_vp9_parser="yes" HAVE_GST_VP9_PARSER=1],
195 [ac_cv_have_gst_vp9_parser="no"]
197 CPPFLAGS="$saved_CPPFLAGS"
201 dnl ... opengl helper libraries
203 if test "$enable_glx" = "yes" -o "$enable_egl" = "yes"; then
204 PKG_CHECK_MODULES([GST_GL],
205 [gstreamer-gl-$GST_PKG_VERSION >= $GST_PLUGINS_BAD_VERSION_REQUIRED],
206 [HAVE_GSTGL=1], [HAVE_GSTGL=0])
209 if test $HAVE_GSTGL -eq 1; then
210 AC_CACHE_CHECK([for GStreamer OpenGL helper libraries],
211 [ac_cv_have_gst_gl_helpers], [
212 saved_CPPFLAGS="$CPPFLAGS"
213 CPPFLAGS="$CPPFLAGS $GST_GL_CFLAGS $GST_VIDEO_CFLAGS"
216 AC_CHECK_HEADERS([gst/gl/gl.h], [:], [HAVE_GSTGL=0])
219 [[#include <gst/gl/gl.h>]],
220 [[GstGLContext gl_context;]])],
221 [ac_cv_have_gst_gl_helpers="yes"],
222 [ac_cv_have_gst_gl_helpers="no" HAVE_GSTGL=0]
224 CPPFLAGS="$saved_CPPFLAGS"
228 AM_CONDITIONAL([USE_GST_GL_HELPERS], [test $HAVE_GSTGL -eq 1])
230 AC_DEFINE_UNQUOTED([USE_GST_GL_HELPERS], [$HAVE_GSTGL],
231 [Defined to 1 if GStreamer OpenGL helper libraries are available])
233 if test "$enable_egl" = "yes" -a $HAVE_GSTGL -ne 1; then
234 AC_MSG_WARN([GStreamer/GL helper libraries not found, disabling EGL support])
238 GST_VAAPI_MAJOR_VERSION=`expr gst_vaapi_lt_current - gst_vaapi_lt_current_bias`
239 AC_DEFINE_UNQUOTED([GST_VAAPI_MAJOR_VERSION_S], ["$GST_VAAPI_MAJOR_VERSION"],
240 [Defined to the string representation of gstreamer-vaapi major version])
243 dnl LDFLAGS really should only contain flags, not libs - they get added before
244 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
245 GST_ALL_LDFLAGS="-no-undefined"
246 AC_SUBST(GST_ALL_LDFLAGS)
248 dnl GST_PLUGIN_LDFLAGS:
249 dnl this really should only contain flags, not libs - they get added before
250 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
251 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^([_]*gst_plugin_desc|gst_.*_get_type)\$\$' $GST_ALL_LDFLAGS"
252 AC_SUBST(GST_PLUGIN_LDFLAGS)
254 dnl Check for the GStreamer plugins directory
255 AC_ARG_VAR([GST_PLUGIN_PATH_1_0], [installation path for gstreamer-vaapi plugin elements for GStreamer 1.0])
256 AC_MSG_CHECKING([for GStreamer plugins directory])
257 if test -n "$GST_PLUGIN_PATH_1_0"; then
258 GST_PLUGINS_DIR="$GST_PLUGIN_PATH_1_0"
260 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-$GST_PKG_VERSION --variable pluginsdir`
261 if test -z "$GST_PLUGINS_DIR"; then
262 GST_PLUGINS_DIR="\$(libdir)/gstreamer-$GST_PKG_VERSION"
265 AC_MSG_RESULT([$GST_PLUGINS_DIR])
266 plugindir="$GST_PLUGINS_DIR"
269 dnl ---------------------------------------------------------------------------
271 dnl ---------------------------------------------------------------------------
273 dnl Check for DRM/libudev
275 if test "$enable_drm" = "yes"; then
276 PKG_CHECK_MODULES(DRM, [libdrm], [USE_DRM=1], [USE_DRM=0])
277 PKG_CHECK_MODULES(UDEV, [libudev], [:], [USE_DRM=0])
279 if test $USE_DRM -eq 1; then
280 saved_CPPFLAGS="$CPPFLAGS"
281 CPPFLAGS="$CPPFLAGS $DRM_CFLAGS"
282 AC_CHECK_HEADERS([drm_fourcc.h], [:], [USE_DRM=0])
283 CPPFLAGS="$saved_CPPFLAGS"
289 if test "$enable_x11" = "yes"; then
290 PKG_CHECK_MODULES(X11, [x11], [USE_X11=1], [USE_X11=0])
291 if test $USE_X11 -eq 1; then
292 saved_CPPFLAGS="$CPPFLAGS"
293 CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
294 AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xatom.h], [:], [USE_X11=0])
295 CPPFLAGS="$saved_CPPFLAGS"
299 dnl Check for XKB library
301 if test $USE_X11 -eq 1; then
302 AC_CHECK_HEADERS([X11/XKBlib.h], [HAVE_XKBLIB=1], [:])
304 if test $HAVE_XKBLIB -eq 1; then
305 AC_DEFINE_UNQUOTED([HAVE_XKBLIB], 1,
306 [Defined to 1 if the XKB extension exists.])
311 if test $USE_X11 -eq 1; then
313 PKG_CHECK_MODULES([XRANDR], [xrandr], [:], [HAVE_XRANDR=0])
314 if test $HAVE_XRANDR -eq 1; then
315 saved_CPPFLAGS="$CPPFLAGS"
316 CPPFLAGS="$CPPFLAGS $XRANDR_CFLAGS"
317 AC_CHECK_HEADERS([X11/extensions/Xrandr.h], [:], [HAVE_XRANDR=0])
318 CPPFLAGS="$saved_CPPFLAGS"
321 if test $HAVE_XRANDR -eq 1; then
322 AC_DEFINE_UNQUOTED(HAVE_XRANDR, 1,
323 [Defined to 1 if the XRandR extension exists.])
326 dnl Check for XRender
328 if test $USE_X11 -eq 1; then
330 PKG_CHECK_MODULES([XRENDER], [xrender], [:], [HAVE_XRENDER=0])
331 if test $HAVE_XRENDER -eq 1; then
332 saved_CPPFLAGS="$CPPFLAGS"
333 CPPFLAGS="$CPPFLAGS $XRENDER_CFLAGS"
334 AC_CHECK_HEADERS([X11/extensions/Xrender.h], [:], [HAVE_XRENDER=0])
335 CPPFLAGS="$saved_CPPFLAGS"
338 if test $HAVE_XRENDER -eq 1; then
339 AC_DEFINE_UNQUOTED([HAVE_XRENDER], [1],
340 [Defined to 1 if the XRender extension exists.])
345 if test "$enable_glx" = "yes"; then
348 if test "$enable_egl" = "yes"; then
354 if test "$enable_opengl" = "yes"; then
358 PKG_CHECK_MODULES([GL], [gl], [:], [HAVE_GL=0])
359 saved_CPPFLAGS="$CPPFLAGS"
360 CPPFLAGS="$CPPFLAGS $GL_CFLAGS"
361 AC_CHECK_HEADERS([GL/gl.h GL/glext.h], [:], [HAVE_GL=0], [
366 CPPFLAGS="$saved_CPPFLAGS"
370 GLES_VERSION_MASK=`expr $GLES_VERSION_MASK "+" $HAVE_GL "*" 1`
374 if test "$enable_opengl" = "yes"; then
378 PKG_CHECK_MODULES([GLES2], [glesv2], [:], [HAVE_GLESv2=0])
379 saved_CPPFLAGS="$CPPFLAGS"
380 CPPFLAGS="$CPPFLAGS $GLES2_CFLAGS"
381 AC_CHECK_HEADERS([GLES2/gl2.h GLES2/gl2ext.h], [:],
383 #ifdef HAVE_GLES2_GL2_H
384 # include <GLES2/gl2.h>
387 CPPFLAGS="$saved_CPPFLAGS"
391 GLES_VERSION_MASK=`expr $GLES_VERSION_MASK "+" $HAVE_GLESv2 "*" 4`
395 if test "$enable_opengl" = "yes"; then
399 PKG_CHECK_MODULES([GLES3], [glesv2], [:], [HAVE_GLESv3=0])
400 saved_CPPFLAGS="$CPPFLAGS"
401 CPPFLAGS="$CPPFLAGS $GLES3_CFLAGS"
402 AC_CHECK_HEADERS([GLES3/gl3.h GLES3/gl3ext.h GLES2/gl2ext.h], [:],
404 #ifdef HAVE_GLES3_GL3_H
405 # include <GLES3/gl3.h>
408 CPPFLAGS="$saved_CPPFLAGS"
412 GLES_VERSION_MASK=`expr $GLES_VERSION_MASK "+" $HAVE_GLESv3 "*" 8`
416 if test "$enable_glx" = "yes" -a $HAVE_GL -eq 1 -a $USE_X11 -eq 1; then
418 saved_CPPFLAGS="$CPPFLAGS"
420 CPPFLAGS="$CPPFLAGS $GL_CFLAGS"
421 LIBS="$LIBS $GL_LIBS"
422 AC_CHECK_HEADERS([GL/glx.h], [:], [USE_GLX=0], [
427 AC_CHECK_LIB([GL], [glXCreateContext], [:], [USE_GLX=0])
428 CPPFLAGS="$saved_CPPFLAGS"
434 if test "$enable_egl" = "yes" -a $GLES_VERSION_MASK -ne 0; then
436 PKG_CHECK_MODULES([EGL], [egl], [:], [USE_EGL=0])
437 saved_CPPFLAGS="$CPPFLAGS"
439 AC_CHECK_HEADERS([EGL/egl.h], [:], [USE_EGL=0])
440 AC_CHECK_LIB([EGL], [eglGetDisplay], [:], [USE_EGL=0])
441 CPPFLAGS="$saved_CPPFLAGS"
444 dnl Check for GMODULE
445 GMODULE_VERSION_REQUIRED=gmodule_version
446 PKG_CHECK_MODULES([GMODULE], [gmodule-2.0 >= $GMODULE_VERSION_REQUIRED])
449 dnl Check for Wayland
451 if test "$enable_wayland" = "yes"; then
452 PKG_CHECK_MODULES(WAYLAND, [wayland-client >= wayland_api_version],
453 [USE_WAYLAND=1], [USE_WAYLAND=0])
455 if test $USE_WAYLAND -eq 1; then
456 saved_CPPFLAGS="$CPPFLAGS"
457 CPPFLAGS="$CPPFLAGS $WAYLAND_CFLAGS"
458 AC_CHECK_HEADERS([wayland-client.h], [:], [USE_WAYLAND=0])
459 CPPFLAGS="$saved_CPPFLAGS"
463 dnl ---------------------------------------------------------------------------
465 dnl ---------------------------------------------------------------------------
468 PKG_CHECK_MODULES([LIBVA], [libva >= va_api_version])
469 VA_VERSION_STR=`$PKG_CONFIG --modversion libva`
473 if test $USE_DRM -eq 1; then
474 PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= va_api_drm_version],
475 [HAVE_VA_DRM=1], [USE_DRM=0])
477 if test $HAVE_VA_DRM -eq 1; then
478 saved_CPPFLAGS="$CPPFLAGS"
479 CPPFLAGS="$LIBVA_DRM_CFLAGS"
480 AC_CHECK_HEADERS([va/va_drm.h], [:], [HAVE_VA_DRM=0 USE_DRM=0])
481 CPPFLAGS="$saved_CPPFLAGS"
486 if test $USE_X11 -eq 1; then
487 PKG_CHECK_MODULES(LIBVA_X11, [libva-x11 >= va_api_x11_version],
491 dnl Check for va_dec_jpeg.h header
492 saved_CPPFLAGS="$CPPFLAGS"
493 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
494 AC_CHECK_HEADERS([va/va_dec_jpeg.h], [], [], [#include <va/va.h>])
495 CPPFLAGS="$saved_CPPFLAGS"
497 dnl Check for JPEG decoding API (0.32.1+)
499 AC_CACHE_CHECK([for JPEG decoding API],
500 ac_cv_have_jpeg_decoding_api, [
501 saved_CPPFLAGS="$CPPFLAGS"
502 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
504 LIBS="$LIBS $LIBVA_LIBS"
508 #ifdef HAVE_VA_VA_DEC_JPEG_H
509 #include <va/va_dec_jpeg.h>
512 [[VAPictureParameterBufferJPEGBaseline pic_param;
513 VASliceParameterBufferJPEGBaseline slice_param;
514 VAHuffmanTableBufferJPEGBaseline huffman_table;
515 VAIQMatrixBufferJPEGBaseline iq_matrix;]])],
516 [ac_cv_have_jpeg_decoding_api="yes" USE_JPEG_DECODER=1],
517 [ac_cv_have_jpeg_decoding_api="no"]
519 CPPFLAGS="$saved_CPPFLAGS"
523 dnl Check for va_dec_vp8.h header
524 saved_CPPFLAGS="$CPPFLAGS"
525 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
526 AC_CHECK_HEADERS([va/va_dec_vp8.h], [], [], [#include <va/va.h>])
527 CPPFLAGS="$saved_CPPFLAGS"
529 dnl Check for VP8 decoding API (0.34+)
531 AC_CACHE_CHECK([for VP8 decoding API],
532 ac_cv_have_vp8_decoding_api, [
533 saved_CPPFLAGS="$CPPFLAGS"
534 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
536 LIBS="$LIBS $LIBVA_LIBS"
540 #ifdef HAVE_VA_VA_DEC_VP8_H
541 #include <va/va_dec_vp8.h>
544 [[VAPictureParameterBufferVP8 pic_param;
545 VASliceParameterBufferVP8 slice_param;
546 VAProbabilityDataBufferVP8 prob_data;
547 VAIQMatrixBufferVP8 iq_matrix;
548 slice_param.slice_data_offset = 0;
549 slice_param.slice_data_flag = 0;]])],
550 [ac_cv_have_vp8_decoding_api="yes" USE_VP8_DECODER=1],
551 [ac_cv_have_vp8_decoding_api="no"]
553 CPPFLAGS="$saved_CPPFLAGS"
557 dnl Check for va_dec_vp9.h header
558 saved_CPPFLAGS="$CPPFLAGS"
559 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
560 AC_CHECK_HEADERS([va/va_dec_vp9.h], [], [], [#include <va/va.h>])
561 CPPFLAGS="$saved_CPPFLAGS"
563 dnl Check for VP9 decoding API (0.37+)
565 AC_CACHE_CHECK([for VP9 decoding API],
566 ac_cv_have_vp9_decoding_api, [
567 saved_CPPFLAGS="$CPPFLAGS"
568 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
570 LIBS="$LIBS $LIBVA_LIBS"
574 #ifdef HAVE_VA_VA_DEC_VP9_H
575 #include <va/va_dec_vp9.h>
578 [[VADecPictureParameterBufferVP9 pic_param;
579 VASliceParameterBufferVP9 slice_param;
580 VASegmentParameterVP9 seg_param;
581 slice_param.slice_data_offset = 0;
582 slice_param.slice_data_flag = 0;]])],
583 [ac_cv_have_vp9_decoding_api="yes" USE_VP9_DECODER=$HAVE_GST_VP9_PARSER],
584 [ac_cv_have_vp9_decoding_api="no"]
586 CPPFLAGS="$saved_CPPFLAGS"
590 dnl Check for va_dec_hevc.h header
591 saved_CPPFLAGS="$CPPFLAGS"
592 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
593 AC_CHECK_HEADERS([va/va_dec_hevc.h], [], [], [#include <va/va.h>])
594 CPPFLAGS="$saved_CPPFLAGS"
596 dnl Check for HEVC decoding API (0.38+)
598 AC_CACHE_CHECK([for HEVC decoding API],
599 ac_cv_have_hevc_decoding_api, [
600 saved_CPPFLAGS="$CPPFLAGS"
601 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
603 LIBS="$LIBS $LIBVA_LIBS"
607 #ifdef HAVE_VA_VA_DEC_HEVC_H
608 #include <va/va_dec_hevc.h>
611 [[VAPictureParameterBufferHEVC pic_param;
612 VASliceParameterBufferHEVC slice_param;
613 VAIQMatrixBufferHEVC iq_matrix;
614 slice_param.slice_data_offset = 0;
615 slice_param.slice_data_flag = 0;]])],
616 [ac_cv_have_hevc_decoding_api="yes" USE_HEVC_DECODER=1],
617 [ac_cv_have_hevc_decoding_api="no"]
619 CPPFLAGS="$saved_CPPFLAGS"
623 dnl Check for vpp (video post-processing) support
625 AC_CACHE_CHECK([for video post-postprocessing API],
626 ac_cv_have_va_vpp_api, [
627 saved_CPPFLAGS="$CPPFLAGS"
628 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
630 LIBS="$LIBS $LIBVA_LIBS"
634 #include <va/va_vpp.h>]],
637 VAProcFilterType filters[VAProcFilterCount];
638 unsigned int num_filters = VAProcFilterCount;
639 vaQueryVideoProcFilters(va_dpy, vpp_ctx, filters, &num_filters);
641 [ac_cv_have_va_vpp_api="yes" USE_VA_VPP=1],
642 [ac_cv_have_va_vpp_api="no"]
644 CPPFLAGS="$saved_CPPFLAGS"
648 dnl Check for encoding support
653 if test "$enable_encoders" = "yes"; then
654 PKG_CHECK_MODULES([LIBVA], [libva >= va_api_enc_version],
655 [HAVE_VA_ENC=1], [HAVE_VA_ENC=0])
657 if test $HAVE_VA_ENC -eq 1; then
658 saved_CPPFLAGS="$CPPFLAGS"
659 CPPFLAGS="$LIBVA_CFLAGS"
660 AC_CHECK_HEADERS([va/va_enc_mpeg2.h va/va_enc_h264.h],
661 [USE_ENCODERS=1], [HAVE_VA_ENC=0 USE_ENCODERS=0],
665 dnl Check for JPEG Encoding API (0.37.0+)
666 AC_CHECK_HEADERS([va/va_enc_jpeg.h],
667 [USE_JPEG_ENCODER=1], [],
670 AC_CACHE_CHECK([for JPEG encoding API],
671 ac_cv_have_jpeg_encoding_api, [
672 saved_CPPFLAGS="$CPPFLAGS"
673 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
675 LIBS="$LIBS $LIBVA_LIBS"
679 #ifdef HAVE_VA_VA_ENC_JPEG_H
680 #include <va/va_enc_jpeg.h>
683 [[VAEncPictureParameterBufferJPEG pic_param;
684 VAEncSliceParameterBufferJPEG slice_param;
685 VAQMatrixBufferJPEG q_matrix;]])],
686 [ac_cv_have_jpeg_encoding_api="yes" USE_JPEG_ENCODER=1],
687 [ac_cv_have_jpeg_encoding_api="no"]
689 CPPFLAGS="$saved_CPPFLAGS"
693 dnl Check for VP8 Encoding API
694 AC_CHECK_HEADERS([va/va_enc_vp8.h],
695 [USE_VP8_ENCODER=1], [],
698 AC_CACHE_CHECK([for VP8 encoding API],
699 ac_cv_have_vp8_encoding_api, [
700 saved_CPPFLAGS="$CPPFLAGS"
701 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
703 LIBS="$LIBS $LIBVA_LIBS"
707 #ifdef HAVE_VA_VA_ENC_VP8_H
708 #include <va/va_enc_vp8.h>
711 [[VAEncSequenceParameterBufferVP8 seq_param;
712 VAEncPictureParameterBufferVP8 pic_param;
713 VAQMatrixBufferVP8 q_matrix;]])],
714 [ac_cv_have_vp8_encoding_api="yes" USE_VP8_ENCODER=1],
715 [ac_cv_have_vp8_encoding_api="no" USE_VP8_ENCODER=0]
717 CPPFLAGS="$saved_CPPFLAGS"
720 CPPFLAGS="$saved_CPPFLAGS"
722 dnl Check for H265/HEVC Encoding API
723 AC_CHECK_HEADERS([va/va_enc_hevc.h],
724 [USE_H265_ENCODER=1], [],
727 AC_CACHE_CHECK([for HEVC encoding API],
728 ac_cv_have_hevc_encoding_api, [
729 saved_CPPFLAGS="$CPPFLAGS"
730 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
732 LIBS="$LIBS $LIBVA_LIBS"
736 #ifdef HAVE_VA_VA_ENC_HEVC_H
737 #include <va/va_enc_hevc.h>
740 [[VAEncSequenceParameterBufferHEVC seq_param;
741 VAEncPictureParameterBufferHEVC pic_param;
742 VAEncSliceParameterBufferHEVC buf_param;
743 VAQMatrixBufferHEVC q_matrix;]])],
744 [ac_cv_have_hevc_encoding_api="yes" USE_H265_ENCODER=1],
745 [ac_cv_have_hevc_encoding_api="no" USE_H265_ENCODER=0]
747 CPPFLAGS="$saved_CPPFLAGS"
750 CPPFLAGS="$saved_CPPFLAGS"
755 if test "$enable_wayland" = "yes"; then
756 PKG_CHECK_MODULES([LIBVA_WAYLAND], [libva-wayland >= va_api_wld_version],
757 [:], [USE_WAYLAND=0])
760 dnl ---------------------------------------------------------------------------
761 dnl -- Generate files and summary --
762 dnl ---------------------------------------------------------------------------
764 case ":$USE_X11:$USE_GLX:$USE_EGL:$USE_WAYLAND:$USE_DRM:" in
768 AC_MSG_ERROR([No renderer is enabled])
772 AC_DEFINE_UNQUOTED([USE_ENCODERS], $USE_ENCODERS,
773 [Defined to 1 if video encoders are used])
774 AM_CONDITIONAL([USE_ENCODERS], [test $USE_ENCODERS -eq 1])
776 AC_DEFINE_UNQUOTED(USE_JPEG_ENCODER, $USE_JPEG_ENCODER,
777 [Defined to 1 if JPEG encoder is used])
778 AM_CONDITIONAL(USE_JPEG_ENCODER, test $USE_JPEG_ENCODER -eq 1)
780 AC_DEFINE_UNQUOTED(USE_VP8_ENCODER, $USE_VP8_ENCODER,
781 [Defined to 1 if VP8 encoder is used])
782 AM_CONDITIONAL(USE_VP8_ENCODER, test $USE_VP8_ENCODER -eq 1)
784 AC_DEFINE_UNQUOTED(USE_H265_ENCODER, $USE_H265_ENCODER,
785 [Defined to 1 if H265 encoder is used])
786 AM_CONDITIONAL(USE_H265_ENCODER, test $USE_H265_ENCODER -eq 1)
788 AC_DEFINE_UNQUOTED(USE_VA_VPP, $USE_VA_VPP,
789 [Defined to 1 if video post-processing is used])
790 AM_CONDITIONAL(USE_VA_VPP, test $USE_VA_VPP -eq 1)
792 AC_DEFINE_UNQUOTED(USE_JPEG_DECODER, $USE_JPEG_DECODER,
793 [Defined to 1 if JPEG decoder is used])
794 AM_CONDITIONAL(USE_JPEG_DECODER, test $USE_JPEG_DECODER -eq 1)
796 AC_DEFINE_UNQUOTED(USE_VP8_DECODER, $USE_VP8_DECODER,
797 [Defined to 1 if VP8 decoder is used])
798 AM_CONDITIONAL(USE_VP8_DECODER, test $USE_VP8_DECODER -eq 1)
800 AC_DEFINE_UNQUOTED(USE_VP9_DECODER, $USE_VP9_DECODER,
801 [Defined to 1 if VP9 decoder is used])
802 AM_CONDITIONAL(USE_VP9_DECODER, test $USE_VP9_DECODER -eq 1)
804 AC_DEFINE_UNQUOTED(USE_HEVC_DECODER, $USE_HEVC_DECODER,
805 [Defined to 1 if HEVC decoder is used])
806 AM_CONDITIONAL(USE_HEVC_DECODER, test $USE_HEVC_DECODER -eq 1)
808 AC_DEFINE_UNQUOTED(USE_DRM, $USE_DRM,
809 [Defined to 1 if DRM is enabled])
810 AM_CONDITIONAL(USE_DRM, test $USE_DRM -eq 1)
812 AC_DEFINE_UNQUOTED(USE_X11, $USE_X11,
813 [Defined to 1 if X11 is enabled])
814 AM_CONDITIONAL(USE_X11, test $USE_X11 -eq 1)
816 AC_DEFINE_UNQUOTED(USE_GLX, $USE_GLX,
817 [Defined to 1 if GLX is enabled])
818 AM_CONDITIONAL(USE_GLX, test $USE_GLX -eq 1)
820 AC_DEFINE_UNQUOTED([USE_EGL], [$USE_EGL],
821 [Defined to 1 if EGL is enabled])
822 AM_CONDITIONAL([USE_EGL], [test $USE_EGL -eq 1])
824 AC_DEFINE_UNQUOTED([USE_GLES_VERSION_MASK], [$GLES_VERSION_MASK],
825 [Defined to the set of enabled OpenGL ES APIs])
827 AC_DEFINE_UNQUOTED(USE_WAYLAND, $USE_WAYLAND,
828 [Defined to 1 if WAYLAND is enabled])
829 AM_CONDITIONAL(USE_WAYLAND, test $USE_WAYLAND -eq 1)
834 docs/reference/Makefile
835 docs/reference/plugins/Makefile
836 docs/reference/plugins/plugins-docs.xml
838 gst-libs/gst/Makefile
839 gst-libs/gst/base/Makefile
840 gst-libs/gst/vaapi/Makefile
849 test $1 -eq 1 && echo yes || echo no
853 AS_IF([test $USE_DRM -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS drm"])
854 AS_IF([test $USE_X11 -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS x11"])
855 AS_IF([test $USE_GLX -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS glx"])
856 AS_IF([test $USE_EGL -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS egl"])
857 AS_IF([test $USE_WAYLAND -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS wayland"])
860 echo $PACKAGE configuration summary:
862 echo Installation Prefix .............. : ${prefix}
863 echo GStreamer API version ............ : $GST_API_VERSION
864 echo VA-API version ................... : $VA_VERSION_STR
865 echo Video encoding ................... : $(yesno $USE_ENCODERS)
866 echo Video outputs .................... : $VIDEO_OUTPUTS