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], [5])
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
92 AC_ARG_ENABLE(builtin_codecparsers,
93 AS_HELP_STRING([--enable-builtin-codecparsers],
94 [enable built-in codecparsers @<:@default=yes@:>@]),
95 [], [enable_builtin_codecparsers="yes"])
98 AS_HELP_STRING([--enable-drm],
99 [enable DRM backend @<:@default=yes@:>@]),
100 [], [enable_drm="yes"])
103 AS_HELP_STRING([--enable-x11],
104 [enable X11 output @<:@default=yes@:>@]),
105 [], [enable_x11="yes"])
108 AS_HELP_STRING([--enable-glx],
109 [enable OpenGL/X11 output @<:@default=yes@:>@]),
110 [], [enable_glx="yes"])
112 AC_ARG_ENABLE(wayland,
113 AC_HELP_STRING([--enable-wayland],
114 [enable Wayland output @<:@default=yes@:>@]),
115 [], [enable_wayland="yes"])
117 AC_ARG_WITH([gstreamer-api],
118 AC_HELP_STRING([--with-gstreamer-api=VERSION],
119 [build against the specified GStreamer API version
120 @<:@default=gst_api_version@:>@]),
121 [GST_API_VERSION="$with_gstreamer_api"], [GST_API_VERSION=gst_api_version])
123 dnl Check for basic libraries
126 dnl Check for Gtk doc
127 GTKDOC_VERSION=gtkdoc_version
128 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
129 m4_ifdef([GTK_DOC_CHECK], [
130 GTK_DOC_CHECK([$GTKDOC_VERSION], [--flavour no-tmpl])], [
131 AM_CONDITIONAL([ENABLE_GTK_DOC], [false])])
132 AC_SUBST(GTKDOC_VERSION)
135 GLIB_VERSION_REQUIRED=glib_version
136 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $GLIB_VERSION_REQUIRED])
137 AC_SUBST(GLIB_VERSION_REQUIRED)
139 dnl Check to see if dlopen is in default libraries (like Solaris, which
140 dnl has it in libc), or if libdl is needed to get it.
141 AC_CHECK_FUNC([dlopen], [], [
142 AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
143 AC_SUBST([DLOPEN_LIBS])
145 dnl ---------------------------------------------------------------------------
147 dnl ---------------------------------------------------------------------------
149 dnl Versions for GStreamer and plugins-base
150 case $GST_API_VERSION in
152 GST_VERSION_REQUIRED=gst0_version
153 GST_PLUGINS_BASE_VERSION_REQUIRED=gst0_plugins_base_version
154 GST_PLUGINS_BAD_VERSION_REQUIRED=gst0_plugins_bad_version
157 GST_VERSION_REQUIRED=gst1_version
158 GST_PLUGINS_BASE_VERSION_REQUIRED=gst1_plugins_base_version
159 GST_PLUGINS_BAD_VERSION_REQUIRED=gst1_plugins_bad_version
162 AC_MSG_ERROR([unsupported GStreamer API version $GST_API_VERSION])
165 AC_SUBST(GST_API_VERSION)
166 AC_SUBST(GST_VERSION_REQUIRED)
167 AC_SUBST(GST_PLUGINS_BASE_VERSION_REQUIRED)
168 AC_SUBST(GST_PLUGINS_BAD_VERSION_REQUIRED)
170 USE_GST_API_0_10="no"
171 USE_GST_API_1_0p="no"
172 AS_VERSION_COMPARE([$GST_API_VERSION], [0.10],
173 [], [USE_GST_API_0_10="yes"], [])
174 AS_VERSION_COMPARE([$GST_API_VERSION], [1.0],
175 [], [USE_GST_API_1_0p="yes"], [USE_GST_API_1_0p="yes"])
176 AM_CONDITIONAL([USE_GST_API_0_10], [test "$USE_GST_API_0_10" = "yes"])
177 AM_CONDITIONAL([USE_GST_API_1_0p], [test "$USE_GST_API_1_0p" = "yes"])
180 PKG_CHECK_MODULES([GST],
181 [gstreamer-$GST_API_VERSION >= $GST_VERSION_REQUIRED])
182 PKG_CHECK_MODULES([GST_BASE],
183 [gstreamer-base-$GST_API_VERSION >= $GST_VERSION_REQUIRED])
185 AC_CACHE_CHECK([for GstBaseSink::query hook], ac_cv_have_gst_base_sink_query, [
186 saved_CPPFLAGS="$CPPFLAGS"
187 CPPFLAGS="$CPPFLAGS $GST_BASE_CFLAGS"
189 LIBS="$LIBS $GST_BASE_LIBS"
192 [[#include <gst/base/gstbasesink.h>]],
193 [[GstBaseSinkClass klass; klass.query = NULL;]])],
194 [ac_cv_have_gst_base_sink_query="yes"],
195 [ac_cv_have_gst_base_sink_query="no"]
197 CPPFLAGS="$saved_CPPFLAGS"
200 if test "$ac_cv_have_gst_base_sink_query" != "yes"; then
201 AC_MSG_ERROR([GstBaseSink does not contain the 'query' vfunc])
204 dnl GStreamer -base plugins
205 PKG_CHECK_MODULES([GST_PLUGINS_BASE],
206 [gstreamer-plugins-base-$GST_API_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
207 if test "$GST_API_VERSION" = "0.10"; then
208 PKG_CHECK_MODULES([GST_INTERFACES],
209 [gstreamer-interfaces-$GST_API_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
212 dnl ... GstVideoOverlayComposition (gstreamer-video)
213 PKG_CHECK_MODULES([GST_VIDEO],
214 [gstreamer-video-$GST_API_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
216 AC_CACHE_CHECK([for GstVideoOverlayComposition],
217 ac_cv_have_gst_video_overlay_composition, [
218 saved_CPPFLAGS="$CPPFLAGS"
219 CPPFLAGS="$CPPFLAGS $GST_CFLAGS"
221 LIBS="$LIBS $GST_LIBS"
224 [[#include <gst/video/video-overlay-composition.h>]],
225 [[GstVideoOverlayComposition *c;
226 c = gst_video_overlay_composition_new(0);]])],
227 [ac_cv_have_gst_video_overlay_composition="yes"],
228 [ac_cv_have_gst_video_overlay_composition="no"]
230 CPPFLAGS="$saved_CPPFLAGS"
233 if test "$ac_cv_have_gst_video_overlay_composition" != "yes"; then
234 AC_MSG_ERROR([GstVideoOverlayComposition is not available])
237 AC_CACHE_CHECK([... with advanced format flags],
238 ac_cv_have_gst_video_overlay_hwcaps, [
239 saved_CPPFLAGS="$CPPFLAGS"
240 CPPFLAGS="$CPPFLAGS $GST_CFLAGS $GST_VIDEO_CFLAGS"
242 LIBS="$LIBS $GST_LIBS $GST_VIDEO_LIBS"
245 [[#include <gst/video/video-overlay-composition.h>]],
246 [[GstVideoOverlayRectangle *rect;
247 const guint w = 64, h = 64;
249 GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA|
250 GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA);
251 rect = gst_video_overlay_rectangle_new_argb(NULL, w, h, w * 4,
253 gst_video_overlay_rectangle_set_global_alpha(rect, 0.5f);]])],
254 [ac_cv_have_gst_video_overlay_hwcaps="yes"],
255 [ac_cv_have_gst_video_overlay_hwcaps="no"]
257 CPPFLAGS="$saved_CPPFLAGS"
260 if test "$ac_cv_have_gst_video_overlay_hwcaps" = "yes"; then
261 AC_DEFINE_UNQUOTED([HAVE_GST_VIDEO_OVERLAY_HWCAPS], 1,
262 [Defined to 1 if GstVideoOverlayComposition API supports HW hints.])
265 dnl ... GstVideoDecoder (gstreamer-video)
266 AC_CACHE_CHECK([for GstVideoDecoder],
267 ac_cv_have_gst_video_decoder, [
268 saved_CPPFLAGS="$CPPFLAGS"
269 CPPFLAGS="$CPPFLAGS $GST_CFLAGS $GST_VIDEO_CFLAGS"
271 LIBS="$LIBS $GST_LIBS $GST_VIDEO_LIBS"
274 [[#include <gst/video/gstvideodecoder.h>]],
275 [[GstVideoCodecFrame *f;
276 GstVideoDecoder vdec;
277 f = g_slice_new0(GstVideoCodecFrame);
279 gst_video_decoder_have_frame(&vdec);
280 gst_video_decoder_finish_frame(&vdec, f);
281 gst_video_codec_frame_unref(f);]])],
282 [ac_cv_have_gst_video_decoder="yes"],
283 [ac_cv_have_gst_video_decoder="no"]
285 CPPFLAGS="$saved_CPPFLAGS"
288 AM_CONDITIONAL([USE_LOCAL_GST_VIDEO_DECODER],
289 [test "$ac_cv_have_gst_video_decoder" != "yes"])
291 dnl GStreamer -bad plugins
292 PKG_CHECK_MODULES([GST_BASEVIDEO],
293 [gstreamer-basevideo-$GST_API_VERSION >= $GST_PLUGINS_BAD_VERSION_REQUIRED])
295 dnl ... bitstream parsers
296 if test "$enable_builtin_codecparsers" = "yes"; then
297 ac_cv_have_gst_mpeg2_parser="no"
298 ac_cv_have_gst_h264_parser="no"
299 ac_cv_have_gst_jpeg_parser="no"
301 PKG_CHECK_MODULES([GST_CODEC_PARSERS],
302 [gstreamer-codecparsers-$GST_API_VERSION >= $GST_PLUGINS_BAD_VERSION_REQUIRED])
305 dnl ... MPEG-2 parser, with the required extensions
306 AC_CACHE_CHECK([for MPEG-2 parser],
307 ac_cv_have_gst_mpeg2_parser, [
308 saved_CPPFLAGS="$CPPFLAGS"
309 CPPFLAGS="$CPPFLAGS $GST_CFLAGS $GST_CODEC_PARSERS_CFLAGS"
311 LIBS="$LIBS $GST_LIBS $GST_CODEC_PARSERS_LIBS"
314 [[#include <gst/codecparsers/gstmpegvideoparser.h>]],
315 [[GstMpegVideoSequenceHdr seq_hdr;
316 GstMpegVideoSequenceExt seq_ext;
317 GstMpegVideoSequenceDisplayExt seq_dpy;
318 GstMpegVideoSliceHdr slice_hdr;
319 GstMpegVideoPacket packet;
320 gst_mpeg_video_packet_parse_slice_header(&packet, &slice_hdr,
322 gst_mpeg_video_finalise_mpeg2_sequence_header(&seq_hdr,
323 &seq_ext, &seq_dpy);]])],
324 [ac_cv_have_gst_mpeg2_parser="yes"],
325 [ac_cv_have_gst_mpeg2_parser="no"]
327 CPPFLAGS="$saved_CPPFLAGS"
330 AM_CONDITIONAL([USE_LOCAL_CODEC_PARSERS_MPEG2],
331 [test "$ac_cv_have_gst_mpeg2_parser" != "yes"])
333 dnl ... H.264 parser, with the required extensions
334 AC_CACHE_CHECK([for H.264 parser],
335 ac_cv_have_gst_h264_parser, [
336 saved_CPPFLAGS="$CPPFLAGS"
337 CPPFLAGS="$CPPFLAGS $GST_CFLAGS $GST_CODEC_PARSERS_CFLAGS"
339 LIBS="$LIBS $GST_LIBS $GST_CODEC_PARSERS_LIBS"
342 [[#include <gst/codecparsers/gsth264parser.h>]],
343 [[GstH264SliceHdr slice_hdr;
344 GstH264VUIParams vui_params;
345 GstH264Profile profile = GST_H264_PROFILE_HIGH;
346 slice_hdr.n_emulation_prevention_bytes = 0;
347 vui_params.par_n = 0;
348 vui_params.par_d = 0;]])],
349 [ac_cv_have_gst_h264_parser="yes"],
350 [ac_cv_have_gst_h264_parser="no"]
352 CPPFLAGS="$saved_CPPFLAGS"
355 AM_CONDITIONAL([USE_LOCAL_CODEC_PARSERS_H264],
356 [test "$ac_cv_have_gst_h264_parser" != "yes"])
358 dnl ... JPEG parser, not upstream yet
359 AC_CACHE_CHECK([for JPEG parser],
360 ac_cv_have_gst_jpeg_parser, [
361 saved_CPPFLAGS="$CPPFLAGS"
362 CPPFLAGS="$CPPFLAGS $GST_CFLAGS $GST_CODEC_PARSERS_CFLAGS"
364 LIBS="$LIBS $GST_LIBS $GST_CODEC_PARSERS_LIBS"
367 [[#include <gst/codecparsers/gstjpegparser.h>]],
368 [[GstJpegImage jpeg_image;]])],
369 [ac_cv_have_gst_jpeg_parser="yes"],
370 [ac_cv_have_gst_jpeg_parser="no"]
372 CPPFLAGS="$saved_CPPFLAGS"
375 AM_CONDITIONAL([USE_LOCAL_CODEC_PARSERS_JPEG],
376 [test "$ac_cv_have_gst_jpeg_parser" != "yes"])
378 case $GST_API_VERSION in
379 0.10) lt_bias=gst0_vaapi_lt_current_bias;;
380 1.0) lt_bias=gst1_vaapi_lt_current_bias;;
382 GST_VAAPI_MAJOR_VERSION=`expr gst_vaapi_lt_current - "$lt_bias"`
383 AC_SUBST(GST_VAAPI_MAJOR_VERSION)
385 dnl GST_VAAPI_LT_LDFLAGS:
386 GST_VAAPI_LT_CURRENT="$GST_VAAPI_MAJOR_VERSION"
387 GST_VAAPI_LT_REV=gst_vaapi_lt_revision
388 GST_VAAPI_LT_AGE=gst_vaapi_lt_age
389 GST_VAAPI_LT_VERSION="$GST_VAAPI_LT_CURRENT:$GST_VAAPI_LT_REV:$GST_VAAPI_LT_AGE"
390 GST_VAAPI_LT_LDFLAGS="-version-info $GST_VAAPI_LT_VERSION"
391 AC_SUBST(GST_VAAPI_LT_VERSION)
392 AC_SUBST(GST_VAAPI_LT_LDFLAGS)
395 dnl LDFLAGS really should only contain flags, not libs - they get added before
396 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
397 GST_ALL_LDFLAGS="-no-undefined"
398 AC_SUBST(GST_ALL_LDFLAGS)
400 dnl GST_PLUGIN_LDFLAGS:
401 dnl this really should only contain flags, not libs - they get added before
402 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
403 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^([_]*gst_plugin_desc|gst_.*_get_type)\$\$' $GST_ALL_LDFLAGS"
404 AC_SUBST(GST_PLUGIN_LDFLAGS)
406 dnl Check for the GStreamer plugins directory
407 AC_ARG_VAR([GST_PLUGIN_PATH], [installation path for gstreamer-vaapi plugin elements for GStreamer 0.10])
408 AC_ARG_VAR([GST_PLUGIN_PATH_1_0], [installation path for gstreamer-vaapi plugin elements for GStreamer 1.0])
409 AC_MSG_CHECKING([for GStreamer plugins directory])
410 case $GST_API_VERSION in
411 0.10) _gst_plugin_path="$GST_PLUGIN_PATH";;
412 1.0) _gst_plugin_path="$GST_PLUGIN_PATH_1_0";;
414 if test -d "$_gst_plugin_path"; then
415 GST_PLUGINS_DIR="$_gst_plugin_path"
417 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-$GST_API_VERSION --variable pluginsdir`
418 if test -z "$GST_PLUGINS_DIR"; then
419 GST_PLUGINS_DIR="\$(libdir)/gstreamer-$GST_API_VERSION"
422 AC_MSG_RESULT([$GST_PLUGINS_DIR])
423 plugindir="$GST_PLUGINS_DIR"
426 dnl ---------------------------------------------------------------------------
428 dnl ---------------------------------------------------------------------------
430 dnl Check for DRM/libudev
432 if test "$enable_drm" = "yes"; then
433 PKG_CHECK_MODULES(DRM, [libdrm], [USE_DRM=1], [USE_DRM=0])
434 PKG_CHECK_MODULES(UDEV, [libudev], [:], [USE_DRM=0])
436 if test $USE_DRM -eq 1; then
437 saved_CPPFLAGS="$CPPFLAGS"
438 CPPFLAGS="$CPPFLAGS $DRM_CFLAGS"
439 AC_CHECK_HEADERS([drm_fourcc.h], [:], [USE_DRM=0])
440 CPPFLAGS="$saved_CPPFLAGS"
446 if test "$enable_x11" = "yes"; then
447 PKG_CHECK_MODULES(X11, [x11], [USE_X11=1], [USE_X11=0])
448 if test $USE_X11 -eq 1; then
449 saved_CPPFLAGS="$CPPFLAGS"
450 CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
451 AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xatom.h], [:], [USE_X11=0])
452 CPPFLAGS="$saved_CPPFLAGS"
458 if test $USE_X11 -eq 1; then
460 PKG_CHECK_MODULES([XRANDR], [xrandr], [:], [HAVE_XRANDR=0])
461 if test $HAVE_XRANDR -eq 1; then
462 saved_CPPFLAGS="$CPPFLAGS"
463 CPPFLAGS="$CPPFLAGS $XRANDR_CFLAGS"
464 AC_CHECK_HEADERS([X11/extensions/Xrandr.h], [:], [HAVE_XRANDR=0])
465 CPPFLAGS="$saved_CPPFLAGS"
468 if test $HAVE_XRANDR -eq 1; then
469 AC_DEFINE_UNQUOTED(HAVE_XRANDR, 1,
470 [Defined to 1 if the XRandR extension exists.])
475 if test "$enable_glx" = "yes"; then
480 if test "$enable_opengl" = "yes"; then
482 PKG_CHECK_MODULES([GL], [gl], [:], [HAVE_GL=0])
483 saved_CPPFLAGS="$CPPFLAGS"
484 CPPFLAGS="$CPPFLAGS $GL_CFLAGS"
485 AC_CHECK_HEADERS([GL/gl.h GL/glext.h], [:], [HAVE_GL=0], [
490 CPPFLAGS="$saved_CPPFLAGS"
495 if test "$enable_glx" = "yes" -a $HAVE_GL -eq 1 -a $USE_X11 -eq 1; then
497 saved_CPPFLAGS="$CPPFLAGS"
499 CPPFLAGS="$CPPFLAGS $GL_CFLAGS"
500 LIBS="$LIBS $GL_LIBS"
501 AC_CHECK_HEADERS([GL/glx.h], [:], [USE_GLX=0], [
506 AC_CHECK_LIB([GL], [glXCreateContext], [:], [USE_GLX=0])
507 CPPFLAGS="$saved_CPPFLAGS"
511 dnl Check for Wayland
513 if test "$enable_wayland" = "yes"; then
514 PKG_CHECK_MODULES(WAYLAND, [wayland-client >= wayland_api_version],
515 [USE_WAYLAND=1], [USE_WAYLAND=0])
517 if test $USE_WAYLAND -eq 1; then
518 saved_CPPFLAGS="$CPPFLAGS"
519 CPPFLAGS="$CPPFLAGS $WAYLAND_CFLAGS"
520 AC_CHECK_HEADERS([wayland-client.h], [:], [USE_WAYLAND=0])
521 CPPFLAGS="$saved_CPPFLAGS"
525 dnl ---------------------------------------------------------------------------
527 dnl ---------------------------------------------------------------------------
530 LIBVA_PKGNAME="libva"
531 PKG_CHECK_MODULES(LIBVA, [$LIBVA_PKGNAME >= va_api_version])
532 AC_SUBST(LIBVA_PKGNAME)
534 VA_VERSION=`$PKG_CONFIG --modversion libva`
535 VA_MAJOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f1`
536 VA_MINOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f2`
537 VA_MICRO_VERSION=`echo "$VA_VERSION" | cut -d'.' -f3`
538 VA_VERSION_STR="$VA_VERSION"
542 if test $USE_DRM -eq 1; then
543 PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= va_api_drm_version],
544 [HAVE_VA_DRM=1], [USE_DRM=0])
546 if test $HAVE_VA_DRM -eq 1; then
547 saved_CPPFLAGS="$CPPFLAGS"
548 CPPFLAGS="$LIBVA_DRM_CFLAGS"
549 AC_CHECK_HEADERS([va/va_drm.h], [:], [HAVE_VA_DRM=0 USE_DRM=0])
550 CPPFLAGS="$saved_CPPFLAGS"
556 LIBVA_X11_PKGNAME="libva-x11"
557 if test $USE_X11 -eq 1; then
558 PKG_CHECK_MODULES(LIBVA_X11, [$LIBVA_X11_PKGNAME >= va_api_x11_version],
559 [HAVE_VA_X11=1], [USE_X11=0])
561 AC_SUBST(LIBVA_X11_PKGNAME)
565 LIBVA_GLX_PKGNAME="libva-glx"
566 if test $USE_GLX -eq 1; then
567 PKG_CHECK_MODULES(LIBVA_GLX, [$LIBVA_GLX_PKGNAME >= va_api_glx_version],
568 [HAVE_VA_GLX=1], [LIBVA_GLX_PKGNAME="$LIBVA_X11_PKGNAME"])
570 if test $HAVE_VA_GLX -eq 1; then
571 saved_CPPFLAGS="$CPPFLAGS"
572 CPPFLAGS="$LIBVA_GLX_CFLAGS"
573 AC_CHECK_HEADERS([va/va_glx.h], [:], [HAVE_VA_GLX=0])
574 CPPFLAGS="$saved_CPPFLAGS"
577 AC_SUBST(LIBVA_GLX_PKGNAME)
579 dnl Check for JPEG decoding API (0.32.1+)
581 AC_CACHE_CHECK([for JPEG decoding API],
582 ac_cv_have_jpeg_decoding_api, [
583 saved_CPPFLAGS="$CPPFLAGS"
584 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
586 LIBS="$LIBS $LIBVA_LIBS"
589 [[#include <va/va.h>]],
590 [[VAPictureParameterBufferJPEGBaseline pic_param;
591 VASliceParameterBufferJPEGBaseline slice_param;
592 VAHuffmanTableBufferJPEGBaseline huffman_table;
593 VAIQMatrixBufferJPEGBaseline iq_matrix;]])],
594 [ac_cv_have_jpeg_decoding_api="yes" USE_JPEG_DECODER=1],
595 [ac_cv_have_jpeg_decoding_api="no"]
597 CPPFLAGS="$saved_CPPFLAGS"
602 if test "$enable_wayland" = "yes"; then
603 PKG_CHECK_MODULES([LIBVA_WAYLAND], [libva-wayland >= va_api_wld_version],
604 [:], [USE_WAYLAND=0])
607 dnl ---------------------------------------------------------------------------
608 dnl -- Generate files and summary --
609 dnl ---------------------------------------------------------------------------
611 case ":$USE_X11:$USE_GLX:$USE_WAYLAND:$USE_DRM:" in
615 AC_MSG_ERROR([No renderer is enabled])
619 AC_DEFINE_UNQUOTED(USE_JPEG_DECODER, $USE_JPEG_DECODER,
620 [Defined to 1 if JPEG decoder is used])
621 AM_CONDITIONAL(USE_JPEG_DECODER, test $USE_JPEG_DECODER -eq 1)
623 AC_DEFINE_UNQUOTED(USE_DRM, $USE_DRM,
624 [Defined to 1 if DRM is enabled])
625 AM_CONDITIONAL(USE_DRM, test $USE_DRM -eq 1)
627 AC_DEFINE_UNQUOTED(USE_X11, $USE_X11,
628 [Defined to 1 if X11 is enabled])
629 AM_CONDITIONAL(USE_X11, test $USE_X11 -eq 1)
631 AC_DEFINE_UNQUOTED(USE_GLX, $USE_GLX,
632 [Defined to 1 if GLX is enabled])
633 AM_CONDITIONAL(USE_GLX, test $USE_GLX -eq 1)
635 AC_DEFINE_UNQUOTED(USE_WAYLAND, $USE_WAYLAND,
636 [Defined to 1 if WAYLAND is enabled])
637 AM_CONDITIONAL(USE_WAYLAND, test $USE_WAYLAND -eq 1)
639 pkgconfigdir=${libdir}/pkgconfig
640 AC_SUBST(pkgconfigdir)
644 debian.upstream/Makefile
645 debian.upstream/changelog
646 debian.upstream/control
647 debian.upstream/gstreamer$GST_API_VERSION-vaapi-doc.install:\
648 debian.upstream/gstreamer-vaapi-doc.install.in
649 debian.upstream/gstreamer$GST_API_VERSION-vaapi.install:\
650 debian.upstream/gstreamer-vaapi.install.in
651 debian.upstream/libgstvaapi$GST_API_VERSION-dev.install:\
652 debian.upstream/libgstvaapi-dev.install.in
653 debian.upstream/libgstvaapi$GST_VAAPI_MAJOR_VERSION.install:\
654 debian.upstream/libgstvaapi.install.in
655 debian.upstream/libgstvaapi-drm-$GST_VAAPI_MAJOR_VERSION.install:\
656 debian.upstream/libgstvaapi-drm.install.in
657 debian.upstream/libgstvaapi-glx-$GST_VAAPI_MAJOR_VERSION.install:\
658 debian.upstream/libgstvaapi-glx.install.in
659 debian.upstream/libgstvaapi-wayland-$GST_VAAPI_MAJOR_VERSION.install:\
660 debian.upstream/libgstvaapi-wayland.install.in
661 debian.upstream/libgstvaapi-x11-$GST_VAAPI_MAJOR_VERSION.install:\
662 debian.upstream/libgstvaapi-x11.install.in
664 docs/reference/Makefile
665 docs/reference/libs/Makefile
666 docs/reference/libs/libs-docs.xml
667 docs/reference/plugins/Makefile
668 docs/reference/plugins/plugins-docs.xml
671 gst-libs/gst/Makefile
672 gst-libs/gst/codecparsers/Makefile
673 gst-libs/gst/vaapi/Makefile
674 gst-libs/gst/video/Makefile
678 pkgconfig/gstreamer-vaapi-$GST_API_VERSION.pc:\
679 pkgconfig/gstreamer-vaapi.pc.in
680 pkgconfig/gstreamer-vaapi-drm-$GST_API_VERSION.pc:\
681 pkgconfig/gstreamer-vaapi-drm.pc.in
682 pkgconfig/gstreamer-vaapi-glx-$GST_API_VERSION.pc:\
683 pkgconfig/gstreamer-vaapi-glx.pc.in
684 pkgconfig/gstreamer-vaapi-wayland-$GST_API_VERSION.pc:\
685 pkgconfig/gstreamer-vaapi-wayland.pc.in
686 pkgconfig/gstreamer-vaapi-x11-$GST_API_VERSION.pc:\
687 pkgconfig/gstreamer-vaapi-x11.pc.in
694 test $1 -eq 1 && echo yes || echo no
698 AS_IF([test $USE_DRM -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS drm"])
699 AS_IF([test $USE_X11 -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS x11"])
700 AS_IF([test $USE_GLX -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS glx"])
701 AS_IF([test $USE_WAYLAND -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS wayland"])
704 echo $PACKAGE configuration summary:
706 echo GStreamer API version ............ : $GST_API_VERSION
707 echo VA-API version ................... : $VA_VERSION_STR
708 echo Video outputs .................... : $VIDEO_OUTPUTS