1 # gstreamer-vaapi package version number
2 m4_define([gst_vaapi_major_version], [0])
3 m4_define([gst_vaapi_minor_version], [4])
4 m4_define([gst_vaapi_micro_version], [0])
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([glib_major_version], [2])
14 m4_define([glib_minor_version], [28])
15 m4_define([glib_micro_version], [0])
16 m4_define([glib_major_minor_version],
17 [glib_major_version.glib_minor_version])
18 m4_define([glib_version],
19 [glib_major_version.glib_minor_version.glib_micro_version])
22 m4_define([gst_major_version], [0])
23 m4_define([gst_minor_version], [10])
24 m4_define([gst_micro_version], [14])
25 m4_define([gst_major_minor_version],
26 [gst_major_version.gst_minor_version])
27 m4_define([gst_version],
28 [gst_major_version.gst_minor_version.gst_micro_version])
30 # gst plugins-base version number
31 m4_define([gst_plugins_base_major_version], [0])
32 m4_define([gst_plugins_base_minor_version], [10])
33 m4_define([gst_plugins_base_micro_version], [31])
34 m4_define([gst_plugins_base_version],
35 [gst_plugins_base_major_version.gst_plugins_base_minor_version.gst_plugins_base_micro_version])
37 # gst plugins-bad version number
38 m4_define([gst_plugins_bad_major_version], [0])
39 m4_define([gst_plugins_bad_minor_version], [10])
40 m4_define([gst_plugins_bad_micro_version], [22])
41 m4_define([gst_plugins_bad_version],
42 [gst_plugins_bad_major_version.gst_plugins_bad_minor_version.gst_plugins_bad_micro_version])
44 # VA-API minimum version number
45 m4_define([va_api_x11_version], [0.31.0])
46 m4_define([va_api_glx_version], [0.32.0])
48 # libva package version number
49 m4_define([libva_x11_package_version], [1.0.3])
50 m4_define([libva_glx_package_version], [1.0.9])
52 # gtk-doc version number
53 # XXX: introspection annotations require gtk-doc >= 1.12
54 m4_define([gtkdoc_major_version], [1])
55 m4_define([gtkdoc_minor_version], [9])
56 m4_define([gtkdoc_version], [gtkdoc_major_version.gtkdoc_minor_version])
59 AC_INIT([gst_vaapi], [gst_vaapi_version],
60 [gwenole.beauchesne@intel.com],
63 AC_CONFIG_HEADERS([config.h])
64 AC_CONFIG_SRCDIR([Makefile.am])
65 AC_CONFIG_MACRO_DIR([m4])
66 AC_CONFIG_AUX_DIR([build-aux])
72 TODAY="`LC_ALL=C date +'%a, %d %b %Y %X %z'`"
75 GST_VAAPI_MAJOR_VERSION=gst_vaapi_major_version
76 AC_SUBST(GST_VAAPI_MAJOR_VERSION)
78 LIBVA_PACKAGE_VERSION=libva_x11_package_version
79 AC_SUBST(LIBVA_PACKAGE_VERSION)
81 dnl Versions for GStreamer and plugins-base
82 GST_MAJORMINOR=gst_major_minor_version
83 GST_VERSION_REQUIRED=gst_version
84 GST_PLUGINS_BASE_VERSION_REQUIRED=gst_plugins_base_version
85 GST_PLUGINS_BAD_VERSION_REQUIRED=gst_plugins_bad_version
86 AC_SUBST(GST_MAJORMINOR)
87 AC_SUBST(GST_VERSION_REQUIRED)
88 AC_SUBST(GST_PLUGINS_BASE_VERSION_REQUIRED)
90 dnl Use pretty build output with automake >= 1.11
91 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [
92 AM_DEFAULT_VERBOSITY=1
93 AC_SUBST(AM_DEFAULT_VERBOSITY)
102 AS_HELP_STRING([--enable-glx],
103 [enable OpenGL/X11 @<:@default=yes@:>@]),
104 [], [enable_glx="yes"])
106 AC_ARG_ENABLE(vaapi-glx,
107 AS_HELP_STRING([--enable-vaapi-glx],
108 [enable VA/GLX extensions @<:@default=yes@:>@]),
109 [], [enable_vaapi_glx="yes"])
111 AC_ARG_ENABLE(vaapisink-glx,
112 AS_HELP_STRING([--enable-vaapisink-glx],
113 [enable OpenGL/X11 to vaapisink @<:@default=yes@:>@]),
114 [], [enable_vaapisink_glx="no"])
116 dnl Check for basic libraries
119 dnl Check for Gtk doc
120 GTKDOC_VERSION=gtkdoc_version
121 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
122 m4_ifdef([GTK_DOC_CHECK], [
123 GTK_DOC_CHECK([$GTKDOC_VERSION], [--flavour no-tmpl])], [
124 AM_CONDITIONAL([ENABLE_GTK_DOC], [false])])
125 AC_SUBST(GTKDOC_VERSION)
128 GLIB_VERSION_REQUIRED=glib_version
129 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $GLIB_VERSION_REQUIRED])
130 AC_SUBST(GLIB_VERSION_REQUIRED)
132 dnl Check for GStreamer
133 PKG_CHECK_MODULES([GST],
134 [gstreamer-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
137 AC_CACHE_CHECK([for GstBaseSink::query hook], ac_cv_have_gst_base_sink_query, [
138 saved_CFLAGS="$CFLAGS"
139 CFLAGS="$CFLAGS $GST_CFLAGS"
141 LIBS="$LIBS $GST_LIBS"
144 [[#include <gst/base/gstbasesink.h>]],
145 [[GstBaseSinkClass klass; klass.query = NULL;]])],
146 [ac_cv_have_gst_base_sink_query="yes"],
147 [ac_cv_have_gst_base_sink_query="no"]
149 CFLAGS="$saved_CFLAGS"
152 if test "$ac_cv_have_gst_base_sink_query" != "yes"; then
153 AC_MSG_ERROR([GstBaseSink does not contain the 'query' vfunc])
156 dnl Check for GStreamer plugins-base
157 PKG_CHECK_MODULES([GST_PLUGINS_BASE],
158 [gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_PLUGINS_BASE_VERSION_REQUIRED]
161 V=`$PKG_CONFIG --modversion gstreamer-plugins-base-$GST_MAJORMINOR`
162 GST_PLUGINS_BASE_MAJOR_VERSION=`echo "$V" | cut -d'.' -f1`
163 GST_PLUGINS_BASE_MINOR_VERSION=`echo "$V" | cut -d'.' -f2`
164 GST_PLUGINS_BASE_MICRO_VERSION=`echo "$V" | cut -d'.' -f3`
165 AC_SUBST(GST_PLUGINS_BASE_MAJOR_VERSION)
166 AC_SUBST(GST_PLUGINS_BASE_MINOR_VERSION)
167 AC_SUBST(GST_PLUGINS_BASE_MICRO_VERSION)
169 dnl Check for GStreamer base
170 PKG_CHECK_MODULES([GST_BASE],
171 [gstreamer-base-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
174 dnl Check for GStreamer video
175 PKG_CHECK_MODULES([GST_VIDEO],
176 [gstreamer-video-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
179 AC_CACHE_CHECK([for GstVideoOverlayComposition],
180 ac_cv_have_gst_video_overlay_composition, [
181 saved_CFLAGS="$CFLAGS"
182 CFLAGS="$CFLAGS $GST_CFLAGS"
184 LIBS="$LIBS $GST_LIBS"
187 [[#include <gst/video/video-overlay-composition.h>]],
188 [[GstVideoOverlayComposition *c = gst_video_overlay_composition_new(0);]])],
189 [ac_cv_have_gst_video_overlay_composition="yes"],
190 [ac_cv_have_gst_video_overlay_composition="no"]
192 CFLAGS="$saved_CFLAGS"
195 if test "$ac_cv_have_gst_video_overlay_composition" != "yes"; then
196 AC_MSG_ERROR([GstVideoOverlayComposition is not available])
199 dnl Check for GStreamer basevideo
200 PKG_CHECK_MODULES([GST_BASEVIDEO],
201 [gstreamer-basevideo-$GST_MAJORMINOR >= $GST_PLUGINS_BAD_VERSION_REQUIRED]
204 dnl Check for GStreamer codec parsers
206 USE_LOCAL_CODEC_PARSERS=0
208 PKG_CHECK_MODULES([GST_CODEC_PARSERS],
209 [gstreamer-codecparsers-$GST_MAJORMINOR >= $GST_PLUGINS_BAD_VERSION_REQUIRED]
212 AC_CACHE_CHECK([for GstH264SliceHdr::n_emulation_prevention_bytes],
213 ac_cv_have_gst_h264_slice_hdr_epb_count, [
214 saved_CFLAGS="$CFLAGS"
215 CFLAGS="$CFLAGS $GST_CFLAGS $GST_CODEC_PARSERS_CFLAGS"
217 LIBS="$LIBS $GST_LIBS $GST_CODEC_PARSERS_LIBS"
220 [[#include <gst/codecparsers/gsth264parser.h>]],
221 [[GstH264SliceHdr slice_hdr;
222 slice_hdr.n_emulation_prevention_bytes = 0;]])],
223 [ac_cv_have_gst_h264_slice_hdr_epb_count="yes"],
224 [ac_cv_have_gst_h264_slice_hdr_epb_count="no"]
226 CFLAGS="$saved_CFLAGS"
230 if test "$ac_cv_have_gst_h264_slice_hdr_epb_count" = "yes"; then
231 AC_DEFINE_UNQUOTED(HAVE_GST_H264_SLICE_HDR_EPB_COUNT, 1,
232 [Defined to 1 if GstH264SliceHdr::n_emulation_prevention_bytes exists.])
235 AC_CACHE_CHECK([for JPEG parser],
236 ac_cv_have_gst_jpeg_parser, [
237 saved_CFLAGS="$CFLAGS"
238 CFLAGS="$CFLAGS $GST_CFLAGS $GST_CODEC_PARSERS_CFLAGS"
240 LIBS="$LIBS $GST_LIBS $GST_CODEC_PARSERS_LIBS"
243 [[#include <gst/codecparsers/gstjpegparser.h>]],
244 [[GstJpegImage jpeg_image;]])],
245 [ac_cv_have_gst_jpeg_parser="yes"],
246 [ac_cv_have_gst_jpeg_parser="no" USE_LOCAL_CODEC_PARSERS=1]
248 CFLAGS="$saved_CFLAGS"
252 if test "$ac_cv_have_gst_jpeg_parser" = "yes"; then
253 AC_DEFINE_UNQUOTED(HAVE_GST_JPEG_PARSER, 1,
254 [Defined to 1 if JPEG parser exists.])
256 AM_CONDITIONAL(USE_LOCAL_CODEC_PARSERS, test $USE_LOCAL_CODEC_PARSERS -eq 1)
258 dnl Check for GStreamer interfaces
259 PKG_CHECK_MODULES([GST_INTERFACES],
260 [gstreamer-interfaces-$GST_MAJORMINOR >= $GST_PLUGINS_BASE_VERSION_REQUIRED]
264 dnl LDFLAGS really should only contain flags, not libs - they get added before
265 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
266 GST_ALL_LDFLAGS="-no-undefined"
267 AC_SUBST(GST_ALL_LDFLAGS)
269 dnl GST_PLUGIN_LDFLAGS:
270 dnl this really should only contain flags, not libs - they get added before
271 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
272 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^([_]*gst_plugin_desc|gst_.*_get_type)\$\$' $GST_ALL_LDFLAGS"
273 AC_SUBST(GST_PLUGIN_LDFLAGS)
275 dnl Check for the GStreamer plugins directory
276 AC_MSG_CHECKING([for GStreamer plugins directory])
277 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-$GST_MAJORMINOR --variable pluginsdir`
278 if test -z "$GST_PLUGINS_DIR"; then
279 echo "FAIL FAIL FAIL"
280 GST_PLUGINS_DIR="\$(libdir)/gstreamer-$GST_MAJORMINOR"
282 AC_MSG_RESULT([$GST_PLUGINS_DIR])
283 plugindir="$GST_PLUGINS_DIR"
287 PKG_CHECK_MODULES(X11, [x11])
291 if test "$enable_glx" != "yes"; then
296 AC_CHECK_HEADERS([GL/gl.h GL/glext.h GL/glx.h], [], [USE_GLX=0], [
301 AC_CHECK_LIB(GL, glXCreateContext, [GLX_LIBS="-lGL"], [USE_GLX=0])
306 LIBVA_PKGNAME="libva"
307 PKG_CHECK_MODULES(LIBVA, [$LIBVA_PKGNAME])
308 AC_SUBST(LIBVA_PKGNAME)
310 dnl ... original VA-API 0.29
311 AC_CACHE_CHECK([for old VA-API 0.29],
312 ac_cv_have_vaapi_old, [
313 saved_CFLAGS="$CFLAGS"
314 CFLAGS="$CFLAGS $LIBVA_CFLAGS"
316 LIBS="$LIBS $LIBVA_LIBS"
319 [[#include <va_x11.h>]],
320 [[vaGetDisplay(NULL)]])],
321 [ac_cv_have_vaapi_old="yes"],
322 [ac_cv_have_vaapi_old="no"]
324 CFLAGS="$saved_CFLAGS"
327 if test "$ac_cv_have_vaapi_old" = "yes"; then
328 LIBVA_EXTRA_CFLAGS="$LIBVA_CFLAGS -DGST_VAAPI_USE_OLD_VAAPI_0_29"
331 dnl ... VA-API >= 0.31 or -sds
332 LIBVA_X11_PKGNAME="libva-x11"
333 PKG_CHECK_MODULES(LIBVA_X11, [$LIBVA_X11_PKGNAME],
334 [ac_cv_have_vaapi_x11="yes"],
335 [ac_cv_have_vaapi_x11="no"]
337 if test "$ac_cv_have_vaapi_x11" = "no"; then
338 if test "$ac_cv_have_vaapi_old" = "yes"; then
339 LIBVA_X11_PKGNAME="libva"
340 CFLAGS="$CFLAGS $LIBVA_EXTRA_CFLAGS"
341 LIBS="$LIBS $LIBVA_EXTRA_LIBS"
343 AC_MSG_ERROR([could not find VA-API])
346 AC_SUBST(LIBVA_X11_PKGNAME)
348 dnl ... VA-API >= 0.31 or -sds (VA/GLX extensions)
350 if test $USE_GLX -eq 1; then
351 if test "$enable_vaapi_glx" = "yes"; then
352 LIBVA_GLX_PKGNAME="libva-glx"
353 PKG_CHECK_MODULES(LIBVA_GLX, [$LIBVA_GLX_PKGNAME],
354 [ac_cv_have_vaapi_glx="yes" USE_VAAPI_GLX=1],
355 [ac_cv_have_vaapi_glx="no"]
358 if test $USE_VAAPI_GLX -eq 0; then
359 AC_MSG_WARN([VA/GLX not found or disabled. Fallbacking to TFP+FBO])
360 LIBVA_GLX_PKGNAME="$LIBVA_X11_PKGNAME"
363 AC_SUBST(LIBVA_GLX_PKGNAME)
365 AC_SUBST(LIBVA_EXTRA_CFLAGS)
366 AC_SUBST(LIBVA_EXTRA_LIBS)
368 dnl Check for JPEG decoding API (0.33+)
370 AC_CACHE_CHECK([for JPEG decoding API],
371 ac_cv_have_jpeg_decoding_api, [
372 saved_CFLAGS="$CFLAGS"
373 CFLAGS="$CFLAGS $LIBVA_CFLAGS"
375 LIBS="$CFLAGS $LIBVA_LIBS"
379 #include <va/va_dec_jpeg.h>]],
380 [[VAPictureParameterBufferJPEG pic_param;
381 VASliceParameterBufferJPEG slice_param;
382 VAHuffmanTableBufferJPEG huffman_table;
383 VAIQMatrixBufferJPEG iq_matrix;]])],
384 [ac_cv_have_jpeg_decoding_api="yes" USE_JPEG_DECODER=1],
385 [ac_cv_have_jpeg_decoding_api="no"]
387 CFLAGS="$saved_CFLAGS"
391 AC_DEFINE_UNQUOTED(USE_JPEG_DECODER, $USE_JPEG_DECODER,
392 [Defined to 1 if JPEG decoder is used])
393 AM_CONDITIONAL(USE_JPEG_DECODER, test $USE_JPEG_DECODER -eq 1)
395 dnl Check for OpenGL support to vaapisink
396 if test "$enable_vaapisink_glx:$USE_GLX" = "yes:1"; then
402 AC_DEFINE_UNQUOTED(USE_GLX, $USE_GLX,
403 [Defined to 1 if GLX is enabled])
404 AM_CONDITIONAL(USE_GLX, test $USE_GLX -eq 1)
406 AC_DEFINE_UNQUOTED(USE_VAAPI_GLX, $USE_VAAPI_GLX,
407 [Defined to 1 if VA/GLX is enabled])
408 AM_CONDITIONAL(USE_VAAPI_GLX, test $USE_VAAPI_GLX -eq 1)
410 AC_DEFINE_UNQUOTED(USE_VAAPISINK_GLX, $USE_VAAPISINK_GLX,
411 [Defined to 1 to enable GLX support to vaapisink])
412 AM_CONDITIONAL(USE_VAAPISINK_GLX, test $USE_VAAPISINK_GLX -eq 1)
414 VA_VERSION=`$PKG_CONFIG --modversion libva`
415 VA_MAJOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f1`
416 VA_MINOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f2`
417 VA_MICRO_VERSION=`echo "$VA_VERSION" | cut -d'.' -f3`
418 VA_VERSION_STR="$VA_VERSION"
420 pkgconfigdir=${libdir}/pkgconfig
421 AC_SUBST(pkgconfigdir)
425 debian.upstream/Makefile
426 debian.upstream/changelog
427 debian.upstream/control
428 debian.upstream/gstreamer$GST_MAJORMINOR-vaapi.install:\
429 debian.upstream/gstreamer-vaapi.install.in
430 debian.upstream/gstreamer$GST_MAJORMINOR-vaapi-doc.install:\
431 debian.upstream/gstreamer-vaapi-doc.install.in
432 debian.upstream/libgstvaapi$GST_VAAPI_MAJOR_VERSION.install:\
433 debian.upstream/libgstvaapi.install.in
434 debian.upstream/libgstvaapi-dev.install
435 debian.upstream/libgstvaapi-x11-$GST_VAAPI_MAJOR_VERSION.install:\
436 debian.upstream/libgstvaapi-x11.install.in
437 debian.upstream/libgstvaapi-glx-$GST_VAAPI_MAJOR_VERSION.install:\
438 debian.upstream/libgstvaapi-glx.install.in
440 docs/reference/Makefile
441 docs/reference/libs/Makefile
442 docs/reference/libs/libs-docs.xml
443 docs/reference/plugins/Makefile
444 docs/reference/plugins/plugins-docs.xml
446 gst-libs/gst/Makefile
447 gst-libs/gst/gstutils_version.h
448 gst-libs/gst/codecparsers/Makefile
449 gst-libs/gst/vaapi/Makefile
451 pkgconfig/gstreamer-vaapi-$GST_MAJORMINOR.pc:\
452 pkgconfig/gstreamer-vaapi.pc.in
453 pkgconfig/gstreamer-vaapi-glx-$GST_MAJORMINOR.pc:\
454 pkgconfig/gstreamer-vaapi-glx.pc.in
455 pkgconfig/gstreamer-vaapi-x11-$GST_MAJORMINOR.pc:\
456 pkgconfig/gstreamer-vaapi-x11.pc.in
465 test $1 -eq 1 && echo yes || echo no
469 echo $PACKAGE configuration summary:
471 echo VA-API version ................... : $VA_VERSION_STR
472 echo GLX support ...................... : $(yesno $USE_GLX)
473 echo VA/GLX support ................... : $(yesno $USE_VAAPI_GLX)
474 echo VaapiSink/GL ..................... : $(yesno $USE_VAAPISINK_GLX)