1 # gstreamer-vaapi package version number
2 m4_define([gst_vaapi_major_version], [0])
3 m4_define([gst_vaapi_minor_version], [5])
4 m4_define([gst_vaapi_micro_version], [4])
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])
12 # gstreamer-vaapi library (libtool) version number
13 m4_define([gst_vaapi_lt_current], [3])
14 m4_define([gst0_vaapi_lt_current_bias], [0])
15 m4_define([gst1_vaapi_lt_current_bias], [2])
16 m4_define([gst_vaapi_lt_revision], [0])
17 m4_define([gst_vaapi_lt_age], [0])
20 m4_define([glib_version], [2.28])
22 # gstreamer version number
23 m4_define([gst_api_version], [1.0])
24 m4_define([gst0_version], [0.10.36])
25 m4_define([gst0_plugins_base_version], [0.10.31])
26 m4_define([gst0_plugins_bad_version], [0.10.22])
27 m4_define([gst1_version], [1.0.0])
28 m4_define([gst1_plugins_base_version], [1.0.0])
29 m4_define([gst1_plugins_bad_version], [1.0.0])
31 # Wayland minimum version number
32 m4_define([wayland_api_version], [1.0.0])
34 # VA-API minimum version number
35 m4_define([va_api_version], [0.30.4])
36 m4_define([va_api_drm_version], [0.33.0])
37 m4_define([va_api_x11_version], [0.31.0])
38 m4_define([va_api_glx_version], [0.32.0])
39 m4_define([va_api_wld_version], [0.33.0])
41 # libva package version number
42 m4_define([libva_drm_package_version], [1.1.0])
43 m4_define([libva_x11_package_version], [1.0.3])
44 m4_define([libva_glx_package_version], [1.0.9])
45 m4_define([libva_wld_package_version], [1.1.0])
47 # gtk-doc version number
48 # XXX: introspection annotations require gtk-doc >= 1.12
49 m4_define([gtkdoc_version], [1.9])
52 AC_INIT([gst_vaapi], [gst_vaapi_version],
53 [gwenole.beauchesne@intel.com],
56 AC_CONFIG_HEADERS([config.h])
57 AC_CONFIG_SRCDIR([Makefile.am])
58 AC_CONFIG_MACRO_DIR([m4])
59 AC_CONFIG_AUX_DIR([build-aux])
63 AM_INIT_AUTOMAKE([1.11 tar-ustar no-dist-gzip dist-bzip2])
65 TODAY="`LC_ALL=C date +'%a, %d %b %Y %X %z'`"
68 LIBVA_PACKAGE_VERSION=libva_x11_package_version
69 AC_SUBST(LIBVA_PACKAGE_VERSION)
71 WAYLAND_API_VERSION=wayland_api_version
72 AC_SUBST(WAYLAND_API_VERSION)
74 dnl Use pretty build output with automake >= 1.11
75 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [
76 AM_DEFAULT_VERBOSITY=1
77 AC_SUBST(AM_DEFAULT_VERBOSITY)
84 AC_ARG_VAR([GIT], [Path to git program, if any])
85 AC_PATH_PROG([GIT], [git])
86 AM_CONDITIONAL([HAVE_GIT], [test -n "$GIT"])
88 dnl Initialize libtool
93 AS_HELP_STRING([--enable-drm],
94 [enable DRM backend @<:@default=yes@:>@]),
95 [], [enable_drm="yes"])
98 AS_HELP_STRING([--enable-x11],
99 [enable X11 output @<:@default=yes@:>@]),
100 [], [enable_x11="yes"])
103 AS_HELP_STRING([--enable-glx],
104 [enable OpenGL/X11 output @<:@default=yes@:>@]),
105 [], [enable_glx="yes"])
107 AC_ARG_ENABLE(wayland,
108 AC_HELP_STRING([--enable-wayland],
109 [enable Wayland output @<:@default=yes@:>@]),
110 [], [enable_wayland="yes"])
112 AC_ARG_WITH([gstreamer-api],
113 AC_HELP_STRING([--with-gstreamer-api=VERSION],
114 [build against the specified GStreamer API version
115 @<:@default=gst_api_version@:>@]),
116 [GST_API_VERSION="$with_gstreamer_api"], [GST_API_VERSION=gst_api_version])
118 dnl Check for basic libraries
121 dnl Check for Gtk doc
122 GTKDOC_VERSION=gtkdoc_version
123 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
124 m4_ifdef([GTK_DOC_CHECK], [
125 GTK_DOC_CHECK([$GTKDOC_VERSION], [--flavour no-tmpl])], [
126 AM_CONDITIONAL([ENABLE_GTK_DOC], [false])])
127 AC_SUBST(GTKDOC_VERSION)
130 GLIB_VERSION_REQUIRED=glib_version
131 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $GLIB_VERSION_REQUIRED])
132 AC_SUBST(GLIB_VERSION_REQUIRED)
134 dnl Check to see if dlopen is in default libraries (like Solaris, which
135 dnl has it in libc), or if libdl is needed to get it.
136 AC_CHECK_FUNC([dlopen], [], [
137 AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
138 AC_SUBST([DLOPEN_LIBS])
140 dnl ---------------------------------------------------------------------------
142 dnl ---------------------------------------------------------------------------
144 dnl Versions for GStreamer and plugins-base
145 case $GST_API_VERSION in
147 GST_VERSION_REQUIRED=gst0_version
148 GST_PLUGINS_BASE_VERSION_REQUIRED=gst0_plugins_base_version
149 GST_PLUGINS_BAD_VERSION_REQUIRED=gst0_plugins_bad_version
152 GST_VERSION_REQUIRED=gst1_version
153 GST_PLUGINS_BASE_VERSION_REQUIRED=gst1_plugins_base_version
154 GST_PLUGINS_BAD_VERSION_REQUIRED=gst1_plugins_bad_version
157 AC_MSG_ERROR([unsupported GStreamer API version $GST_API_VERSION])
160 AC_SUBST(GST_API_VERSION)
161 AC_SUBST(GST_VERSION_REQUIRED)
162 AC_SUBST(GST_PLUGINS_BASE_VERSION_REQUIRED)
163 AC_SUBST(GST_PLUGINS_BAD_VERSION_REQUIRED)
165 USE_GST_API_0_10="no"
166 USE_GST_API_1_0p="no"
167 AS_VERSION_COMPARE([$GST_API_VERSION], [0.10],
168 [], [USE_GST_API_0_10="yes"], [])
169 AS_VERSION_COMPARE([$GST_API_VERSION], [1.0],
170 [], [USE_GST_API_1_0p="yes"], [USE_GST_API_1_0p="yes"])
171 AM_CONDITIONAL([USE_GST_API_0_10], [test "$USE_GST_API_0_10" = "yes"])
172 AM_CONDITIONAL([USE_GST_API_1_0p], [test "$USE_GST_API_1_0p" = "yes"])
175 PKG_CHECK_MODULES([GST],
176 [gstreamer-$GST_API_VERSION >= $GST_VERSION_REQUIRED])
177 PKG_CHECK_MODULES([GST_BASE],
178 [gstreamer-base-$GST_API_VERSION >= $GST_VERSION_REQUIRED])
180 AC_CACHE_CHECK([for GstBaseSink::query hook], ac_cv_have_gst_base_sink_query, [
181 saved_CPPFLAGS="$CPPFLAGS"
182 CPPFLAGS="$CPPFLAGS $GST_BASE_CFLAGS"
184 LIBS="$LIBS $GST_BASE_LIBS"
187 [[#include <gst/base/gstbasesink.h>]],
188 [[GstBaseSinkClass klass; klass.query = NULL;]])],
189 [ac_cv_have_gst_base_sink_query="yes"],
190 [ac_cv_have_gst_base_sink_query="no"]
192 CPPFLAGS="$saved_CPPFLAGS"
195 if test "$ac_cv_have_gst_base_sink_query" != "yes"; then
196 AC_MSG_ERROR([GstBaseSink does not contain the 'query' vfunc])
199 dnl GStreamer -base plugins
200 PKG_CHECK_MODULES([GST_PLUGINS_BASE],
201 [gstreamer-plugins-base-$GST_API_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
202 if test "$GST_API_VERSION" = "0.10"; then
203 PKG_CHECK_MODULES([GST_INTERFACES],
204 [gstreamer-interfaces-$GST_API_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
207 dnl ... GstVideoOverlayComposition (gstreamer-video)
208 PKG_CHECK_MODULES([GST_VIDEO],
209 [gstreamer-video-$GST_API_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
211 AC_CACHE_CHECK([for GstVideoOverlayComposition],
212 ac_cv_have_gst_video_overlay_composition, [
213 saved_CPPFLAGS="$CPPFLAGS"
214 CPPFLAGS="$CPPFLAGS $GST_CFLAGS"
216 LIBS="$LIBS $GST_LIBS"
219 [[#include <gst/video/video-overlay-composition.h>]],
220 [[GstVideoOverlayComposition *c;
221 c = gst_video_overlay_composition_new(0);]])],
222 [ac_cv_have_gst_video_overlay_composition="yes"],
223 [ac_cv_have_gst_video_overlay_composition="no"]
225 CPPFLAGS="$saved_CPPFLAGS"
228 if test "$ac_cv_have_gst_video_overlay_composition" != "yes"; then
229 AC_MSG_ERROR([GstVideoOverlayComposition is not available])
232 AC_CACHE_CHECK([... with advanced format flags],
233 ac_cv_have_gst_video_overlay_hwcaps, [
234 saved_CPPFLAGS="$CPPFLAGS"
235 CPPFLAGS="$CPPFLAGS $GST_CFLAGS $GST_VIDEO_CFLAGS"
237 LIBS="$LIBS $GST_LIBS $GST_VIDEO_LIBS"
240 [[#include <gst/video/video-overlay-composition.h>]],
241 [[GstVideoOverlayRectangle *rect;
242 const guint w = 64, h = 64;
244 GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA|
245 GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA);
246 rect = gst_video_overlay_rectangle_new_argb(NULL, w, h, w * 4,
248 gst_video_overlay_rectangle_set_global_alpha(rect, 0.5f);]])],
249 [ac_cv_have_gst_video_overlay_hwcaps="yes"],
250 [ac_cv_have_gst_video_overlay_hwcaps="no"]
252 CPPFLAGS="$saved_CPPFLAGS"
255 if test "$ac_cv_have_gst_video_overlay_hwcaps" = "yes"; then
256 AC_DEFINE_UNQUOTED([HAVE_GST_VIDEO_OVERLAY_HWCAPS], 1,
257 [Defined to 1 if GstVideoOverlayComposition API supports HW hints.])
260 dnl ... GstVideoDecoder (gstreamer-video)
261 AC_CACHE_CHECK([for GstVideoDecoder],
262 ac_cv_have_gst_video_decoder, [
263 saved_CPPFLAGS="$CPPFLAGS"
264 CPPFLAGS="$CPPFLAGS $GST_CFLAGS $GST_VIDEO_CFLAGS"
266 LIBS="$LIBS $GST_LIBS $GST_VIDEO_LIBS"
269 [[#include <gst/video/gstvideodecoder.h>]],
270 [[GstVideoCodecFrame *f;
271 GstVideoDecoder vdec;
272 f = g_slice_new0(GstVideoCodecFrame);
274 gst_video_decoder_have_frame(&vdec);
275 gst_video_decoder_finish_frame(&vdec, f);
276 gst_video_codec_frame_unref(f);]])],
277 [ac_cv_have_gst_video_decoder="yes"],
278 [ac_cv_have_gst_video_decoder="no"]
280 CPPFLAGS="$saved_CPPFLAGS"
283 AM_CONDITIONAL([USE_LOCAL_GST_VIDEO_DECODER],
284 [test "$ac_cv_have_gst_video_decoder" != "yes"])
286 dnl GStreamer -bad plugins
287 PKG_CHECK_MODULES([GST_BASEVIDEO],
288 [gstreamer-basevideo-$GST_API_VERSION >= $GST_PLUGINS_BAD_VERSION_REQUIRED])
290 dnl ... bitstream parsers
291 PKG_CHECK_MODULES([GST_CODEC_PARSERS],
292 [gstreamer-codecparsers-$GST_API_VERSION >= $GST_PLUGINS_BAD_VERSION_REQUIRED])
294 dnl ... MPEG-2 parser, with the required extensions
295 AC_CACHE_CHECK([for MPEG-2 parser],
296 ac_cv_have_gst_mpeg2_parser, [
297 saved_CPPFLAGS="$CPPFLAGS"
298 CPPFLAGS="$CPPFLAGS $GST_CFLAGS $GST_CODEC_PARSERS_CFLAGS"
300 LIBS="$LIBS $GST_LIBS $GST_CODEC_PARSERS_LIBS"
303 [[#include <gst/codecparsers/gstmpegvideoparser.h>]],
304 [[GstMpegVideoSequenceHdr seq_hdr;
305 GstMpegVideoSequenceExt seq_ext;
306 GstMpegVideoSequenceDisplayExt seq_dpy;
307 gst_mpeg_video_finalise_mpeg2_sequence_header(&seq_hdr,
308 &seq_ext, &seq_dpy);]])],
309 [ac_cv_have_gst_mpeg2_parser="yes"],
310 [ac_cv_have_gst_mpeg2_parser="no"]
312 CPPFLAGS="$saved_CPPFLAGS"
315 AM_CONDITIONAL([USE_LOCAL_CODEC_PARSERS_MPEG2],
316 [test "$ac_cv_have_gst_mpeg2_parser" != "yes"])
318 dnl ... H.264 parser, with the required extensions
319 AC_CACHE_CHECK([for H.264 parser],
320 ac_cv_have_gst_h264_parser, [
321 saved_CPPFLAGS="$CPPFLAGS"
322 CPPFLAGS="$CPPFLAGS $GST_CFLAGS $GST_CODEC_PARSERS_CFLAGS"
324 LIBS="$LIBS $GST_LIBS $GST_CODEC_PARSERS_LIBS"
327 [[#include <gst/codecparsers/gsth264parser.h>]],
328 [[GstH264SliceHdr slice_hdr;
329 GstH264VUIParams vui_params;
330 GstH264Profile profile = GST_H264_PROFILE_HIGH;
331 slice_hdr.n_emulation_prevention_bytes = 0;
332 vui_params.par_n = 0;
333 vui_params.par_d = 0;]])],
334 [ac_cv_have_gst_h264_parser="yes"],
335 [ac_cv_have_gst_h264_parser="no"]
337 CPPFLAGS="$saved_CPPFLAGS"
340 AM_CONDITIONAL([USE_LOCAL_CODEC_PARSERS_H264],
341 [test "$ac_cv_have_gst_h264_parser" != "yes"])
343 dnl ... JPEG parser, not upstream yet
344 AC_CACHE_CHECK([for JPEG parser],
345 ac_cv_have_gst_jpeg_parser, [
346 saved_CPPFLAGS="$CPPFLAGS"
347 CPPFLAGS="$CPPFLAGS $GST_CFLAGS $GST_CODEC_PARSERS_CFLAGS"
349 LIBS="$LIBS $GST_LIBS $GST_CODEC_PARSERS_LIBS"
352 [[#include <gst/codecparsers/gstjpegparser.h>]],
353 [[GstJpegImage jpeg_image;]])],
354 [ac_cv_have_gst_jpeg_parser="yes"],
355 [ac_cv_have_gst_jpeg_parser="no"]
357 CPPFLAGS="$saved_CPPFLAGS"
360 AM_CONDITIONAL([USE_LOCAL_CODEC_PARSERS_JPEG],
361 [test "$ac_cv_have_gst_jpeg_parser" != "yes"])
363 case $GST_API_VERSION in
364 0.10) lt_bias=gst0_vaapi_lt_current_bias;;
365 1.0) lt_bias=gst1_vaapi_lt_current_bias;;
367 GST_VAAPI_MAJOR_VERSION=`expr gst_vaapi_lt_current - "$lt_bias"`
368 AC_SUBST(GST_VAAPI_MAJOR_VERSION)
370 dnl GST_VAAPI_LT_LDFLAGS:
371 GST_VAAPI_LT_CURRENT="$GST_VAAPI_MAJOR_VERSION"
372 GST_VAAPI_LT_REV=gst_vaapi_lt_revision
373 GST_VAAPI_LT_AGE=gst_vaapi_lt_age
374 GST_VAAPI_LT_VERSION="$GST_VAAPI_LT_CURRENT:$GST_VAAPI_LT_REV:$GST_VAAPI_LT_AGE"
375 GST_VAAPI_LT_LDFLAGS="-version-info $GST_VAAPI_LT_VERSION"
376 AC_SUBST(GST_VAAPI_LT_VERSION)
377 AC_SUBST(GST_VAAPI_LT_LDFLAGS)
380 dnl LDFLAGS really should only contain flags, not libs - they get added before
381 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
382 GST_ALL_LDFLAGS="-no-undefined"
383 AC_SUBST(GST_ALL_LDFLAGS)
385 dnl GST_PLUGIN_LDFLAGS:
386 dnl this really should only contain flags, not libs - they get added before
387 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
388 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^([_]*gst_plugin_desc|gst_.*_get_type)\$\$' $GST_ALL_LDFLAGS"
389 AC_SUBST(GST_PLUGIN_LDFLAGS)
391 dnl Check for the GStreamer plugins directory
392 AC_ARG_VAR([GST_PLUGIN_PATH], [installation path for gstreamer-vaapi plugin elements])
393 AC_MSG_CHECKING([for GStreamer plugins directory])
394 if test -d "$GST_PLUGIN_PATH"; then
395 GST_PLUGINS_DIR="$GST_PLUGIN_PATH"
397 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-$GST_API_VERSION --variable pluginsdir`
398 if test -z "$GST_PLUGINS_DIR"; then
399 GST_PLUGINS_DIR="\$(libdir)/gstreamer-$GST_API_VERSION"
402 AC_MSG_RESULT([$GST_PLUGINS_DIR])
403 plugindir="$GST_PLUGINS_DIR"
406 dnl ---------------------------------------------------------------------------
408 dnl ---------------------------------------------------------------------------
410 dnl Check for DRM/libudev
412 if test "$enable_drm" = "yes"; then
413 PKG_CHECK_MODULES(DRM, [libdrm], [USE_DRM=1], [USE_DRM=0])
414 PKG_CHECK_MODULES(UDEV, [libudev], [:], [USE_DRM=0])
416 if test $USE_DRM -eq 1; then
417 saved_CPPFLAGS="$CPPFLAGS"
418 CPPFLAGS="$CPPFLAGS $DRM_CFLAGS"
419 AC_CHECK_HEADERS([drm_fourcc.h], [:], [USE_DRM=0])
420 CPPFLAGS="$saved_CPPFLAGS"
426 if test "$enable_x11" = "yes"; then
427 PKG_CHECK_MODULES(X11, [x11], [USE_X11=1], [USE_X11=0])
428 if test $USE_X11 -eq 1; then
429 saved_CPPFLAGS="$CPPFLAGS"
430 CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
431 AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xatom.h], [:], [USE_X11=0])
432 CPPFLAGS="$saved_CPPFLAGS"
438 if test $USE_X11 -eq 1; then
440 PKG_CHECK_MODULES([XRANDR], [xrandr], [:], [HAVE_XRANDR=0])
441 if test $HAVE_XRANDR -eq 1; then
442 saved_CPPFLAGS="$CPPFLAGS"
443 CPPFLAGS="$CPPFLAGS $XRANDR_CFLAGS"
444 AC_CHECK_HEADERS([X11/extensions/Xrandr.h], [:], [HAVE_XRANDR=0])
445 CPPFLAGS="$saved_CPPFLAGS"
448 if test $HAVE_XRANDR -eq 1; then
449 AC_DEFINE_UNQUOTED(HAVE_XRANDR, 1,
450 [Defined to 1 if the XRandR extension exists.])
455 if test "$enable_glx" = "yes"; then
460 if test "$enable_opengl" = "yes"; then
462 PKG_CHECK_MODULES([GL], [gl], [:], [HAVE_GL=0])
463 saved_CPPFLAGS="$CPPFLAGS"
464 CPPFLAGS="$CPPFLAGS $GL_CFLAGS"
465 AC_CHECK_HEADERS([GL/gl.h GL/glext.h], [:], [HAVE_GL=0], [
470 CPPFLAGS="$saved_CPPFLAGS"
475 if test "$enable_glx" = "yes" -a $HAVE_GL -eq 1 -a $USE_X11 -eq 1; then
477 saved_CPPFLAGS="$CPPFLAGS"
479 CPPFLAGS="$CPPFLAGS $GL_CFLAGS"
480 LIBS="$LIBS $GL_LIBS"
481 AC_CHECK_HEADERS([GL/glx.h], [:], [USE_GLX=0], [
486 AC_CHECK_LIB([GL], [glXCreateContext], [:], [USE_GLX=0])
487 CPPFLAGS="$saved_CPPFLAGS"
491 dnl Check for Wayland
493 if test "$enable_wayland" = "yes"; then
494 PKG_CHECK_MODULES(WAYLAND, [wayland-client >= wayland_api_version],
495 [USE_WAYLAND=1], [USE_WAYLAND=0])
497 if test $USE_WAYLAND -eq 1; then
498 saved_CPPFLAGS="$CPPFLAGS"
499 CPPFLAGS="$CPPFLAGS $WAYLAND_CFLAGS"
500 AC_CHECK_HEADERS([wayland-client.h], [:], [USE_WAYLAND=0])
501 CPPFLAGS="$saved_CPPFLAGS"
505 dnl ---------------------------------------------------------------------------
507 dnl ---------------------------------------------------------------------------
510 LIBVA_PKGNAME="libva"
511 PKG_CHECK_MODULES(LIBVA, [$LIBVA_PKGNAME >= va_api_version])
512 AC_SUBST(LIBVA_PKGNAME)
514 VA_VERSION=`$PKG_CONFIG --modversion libva`
515 VA_MAJOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f1`
516 VA_MINOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f2`
517 VA_MICRO_VERSION=`echo "$VA_VERSION" | cut -d'.' -f3`
518 VA_VERSION_STR="$VA_VERSION"
522 if test $USE_DRM -eq 1; then
523 PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= va_api_drm_version],
524 [HAVE_VA_DRM=1], [USE_DRM=0])
526 if test $HAVE_VA_DRM -eq 1; then
527 saved_CPPFLAGS="$CPPFLAGS"
528 CPPFLAGS="$LIBVA_DRM_CFLAGS"
529 AC_CHECK_HEADERS([va/va_drm.h], [:], [HAVE_VA_DRM=0 USE_DRM=0])
530 CPPFLAGS="$saved_CPPFLAGS"
536 LIBVA_X11_PKGNAME="libva-x11"
537 if test $USE_X11 -eq 1; then
538 PKG_CHECK_MODULES(LIBVA_X11, [$LIBVA_X11_PKGNAME >= va_api_x11_version],
539 [HAVE_VA_X11=1], [USE_X11=0])
541 AC_SUBST(LIBVA_X11_PKGNAME)
545 LIBVA_GLX_PKGNAME="libva-glx"
546 if test $USE_GLX -eq 1; then
547 PKG_CHECK_MODULES(LIBVA_GLX, [$LIBVA_GLX_PKGNAME >= va_api_glx_version],
548 [HAVE_VA_GLX=1], [LIBVA_GLX_PKGNAME="$LIBVA_X11_PKGNAME"])
550 if test $HAVE_VA_GLX -eq 1; then
551 saved_CPPFLAGS="$CPPFLAGS"
552 CPPFLAGS="$LIBVA_GLX_CFLAGS"
553 AC_CHECK_HEADERS([va/va_glx.h], [:], [HAVE_VA_GLX=0])
554 CPPFLAGS="$saved_CPPFLAGS"
557 AC_SUBST(LIBVA_GLX_PKGNAME)
559 dnl Check for JPEG decoding API (0.32.1+)
561 AC_CACHE_CHECK([for JPEG decoding API],
562 ac_cv_have_jpeg_decoding_api, [
563 saved_CPPFLAGS="$CPPFLAGS"
564 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
566 LIBS="$LIBS $LIBVA_LIBS"
569 [[#include <va/va.h>]],
570 [[VAPictureParameterBufferJPEGBaseline pic_param;
571 VASliceParameterBufferJPEGBaseline slice_param;
572 VAHuffmanTableBufferJPEGBaseline huffman_table;
573 VAIQMatrixBufferJPEGBaseline iq_matrix;]])],
574 [ac_cv_have_jpeg_decoding_api="yes" USE_JPEG_DECODER=1],
575 [ac_cv_have_jpeg_decoding_api="no"]
577 CPPFLAGS="$saved_CPPFLAGS"
582 if test "$enable_wayland" = "yes"; then
583 PKG_CHECK_MODULES([LIBVA_WAYLAND], [libva-wayland >= va_api_wld_version],
584 [:], [USE_WAYLAND=0])
587 dnl ---------------------------------------------------------------------------
588 dnl -- Generate files and summary --
589 dnl ---------------------------------------------------------------------------
591 case ":$USE_X11:$USE_GLX:$USE_WAYLAND:$USE_DRM:" in
595 AC_MSG_ERROR([No renderer is enabled])
599 AC_DEFINE_UNQUOTED(USE_JPEG_DECODER, $USE_JPEG_DECODER,
600 [Defined to 1 if JPEG decoder is used])
601 AM_CONDITIONAL(USE_JPEG_DECODER, test $USE_JPEG_DECODER -eq 1)
603 AC_DEFINE_UNQUOTED(USE_DRM, $USE_DRM,
604 [Defined to 1 if DRM is enabled])
605 AM_CONDITIONAL(USE_DRM, test $USE_DRM -eq 1)
607 AC_DEFINE_UNQUOTED(USE_X11, $USE_X11,
608 [Defined to 1 if X11 is enabled])
609 AM_CONDITIONAL(USE_X11, test $USE_X11 -eq 1)
611 AC_DEFINE_UNQUOTED(USE_GLX, $USE_GLX,
612 [Defined to 1 if GLX is enabled])
613 AM_CONDITIONAL(USE_GLX, test $USE_GLX -eq 1)
615 AC_DEFINE_UNQUOTED(USE_WAYLAND, $USE_WAYLAND,
616 [Defined to 1 if WAYLAND is enabled])
617 AM_CONDITIONAL(USE_WAYLAND, test $USE_WAYLAND -eq 1)
619 pkgconfigdir=${libdir}/pkgconfig
620 AC_SUBST(pkgconfigdir)
624 debian.upstream/Makefile
625 debian.upstream/changelog
626 debian.upstream/control
627 debian.upstream/gstreamer$GST_API_VERSION-vaapi-doc.install:\
628 debian.upstream/gstreamer-vaapi-doc.install.in
629 debian.upstream/gstreamer$GST_API_VERSION-vaapi.install:\
630 debian.upstream/gstreamer-vaapi.install.in
631 debian.upstream/libgstvaapi$GST_VAAPI_MAJOR_VERSION.install:\
632 debian.upstream/libgstvaapi.install.in
633 debian.upstream/libgstvaapi-dev.install
634 debian.upstream/libgstvaapi-drm-$GST_VAAPI_MAJOR_VERSION.install:\
635 debian.upstream/libgstvaapi-drm.install.in
636 debian.upstream/libgstvaapi-glx-$GST_VAAPI_MAJOR_VERSION.install:\
637 debian.upstream/libgstvaapi-glx.install.in
638 debian.upstream/libgstvaapi-wayland-$GST_VAAPI_MAJOR_VERSION.install:\
639 debian.upstream/libgstvaapi-wayland.install.in
640 debian.upstream/libgstvaapi-x11-$GST_VAAPI_MAJOR_VERSION.install:\
641 debian.upstream/libgstvaapi-x11.install.in
643 docs/reference/Makefile
644 docs/reference/libs/Makefile
645 docs/reference/libs/libs-docs.xml
646 docs/reference/plugins/Makefile
647 docs/reference/plugins/plugins-docs.xml
650 gst-libs/gst/Makefile
651 gst-libs/gst/codecparsers/Makefile
652 gst-libs/gst/vaapi/Makefile
653 gst-libs/gst/video/Makefile
657 pkgconfig/gstreamer-vaapi-$GST_API_VERSION.pc:\
658 pkgconfig/gstreamer-vaapi.pc.in
659 pkgconfig/gstreamer-vaapi-drm-$GST_API_VERSION.pc:\
660 pkgconfig/gstreamer-vaapi-drm.pc.in
661 pkgconfig/gstreamer-vaapi-glx-$GST_API_VERSION.pc:\
662 pkgconfig/gstreamer-vaapi-glx.pc.in
663 pkgconfig/gstreamer-vaapi-wayland-$GST_API_VERSION.pc:\
664 pkgconfig/gstreamer-vaapi-wayland.pc.in
665 pkgconfig/gstreamer-vaapi-x11-$GST_API_VERSION.pc:\
666 pkgconfig/gstreamer-vaapi-x11.pc.in
673 test $1 -eq 1 && echo yes || echo no
677 AS_IF([test $USE_DRM -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS drm"])
678 AS_IF([test $USE_X11 -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS x11"])
679 AS_IF([test $USE_GLX -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS glx"])
680 AS_IF([test $USE_WAYLAND -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS wayland"])
683 echo $PACKAGE configuration summary:
685 echo GStreamer API version ............ : $GST_API_VERSION
686 echo VA-API version ................... : $VA_VERSION_STR
687 echo Video outputs .................... : $VIDEO_OUTPUTS