Bump version for development.
[vaapi:gstreamer-vaapi.git] / configure.ac
1 # gstreamer-vaapi package version number
2 m4_define([gst_vaapi_major_version], [0])
3 m4_define([gst_vaapi_minor_version], [3])
4 m4_define([gst_vaapi_micro_version], [8])
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])
10 ])
11
12 # gst version number
13 m4_define([gst_major_version], [0])
14 m4_define([gst_minor_version], [10])
15 m4_define([gst_micro_version], [10])
16 m4_define([gst_major_minor_version],
17           [gst_major_version.gst_minor_version])
18 m4_define([gst_version],
19           [gst_major_version.gst_minor_version.gst_micro_version])
20
21 # gst plugins-base version number
22 m4_define([gst_plugins_base_major_version], [0])
23 m4_define([gst_plugins_base_minor_version], [10])
24 m4_define([gst_plugins_base_micro_version], [16])
25 m4_define([gst_plugins_base_version],
26           [gst_plugins_base_major_version.gst_plugins_base_minor_version.gst_plugins_base_micro_version])
27
28 # VA-API minimum version number
29 m4_define([va_api_x11_version], [0.31.0])
30 m4_define([va_api_glx_version], [0.32.0])
31
32 # gst plugins-bad version number
33 m4_define([gst_plugins_bad_major_version], [0])
34 m4_define([gst_plugins_bad_minor_version], [10])
35 m4_define([gst_plugins_bad_micro_version], [22])
36 m4_define([gst_plugins_bad_version],
37           [gst_plugins_bad_major_version.gst_plugins_bad_minor_version.gst_plugins_bad_micro_version])
38
39 # libva package version number
40 m4_define([libva_x11_package_version], [1.0.3])
41 m4_define([libva_glx_package_version], [1.0.9])
42
43 # gtk-doc version number
44 # XXX: introspection annotations require gtk-doc >= 1.12
45 m4_define([gtkdoc_major_version], [1])
46 m4_define([gtkdoc_minor_version], [9])
47 m4_define([gtkdoc_version], [gtkdoc_major_version.gtkdoc_minor_version])
48
49 AC_PREREQ([2.57])
50 AC_INIT([gst_vaapi], [gst_vaapi_version],
51     [gwenole.beauchesne@intel.com],
52     [gstreamer-vaapi])
53 AC_CONFIG_SRCDIR([Makefile.am])
54 AC_CANONICAL_TARGET
55 AM_INIT_AUTOMAKE
56 AM_CONFIG_HEADER([config.h])
57
58 TODAY="`LC_ALL=C date +'%a, %d %b %Y %X %z'`"
59 AC_SUBST(TODAY)
60
61 GST_VAAPI_MAJOR_VERSION=gst_vaapi_major_version
62 AC_SUBST(GST_VAAPI_MAJOR_VERSION)
63
64 LIBVA_PACKAGE_VERSION=libva_x11_package_version
65 AC_SUBST(LIBVA_PACKAGE_VERSION)
66
67 dnl Versions for GStreamer and plugins-base
68 GST_MAJORMINOR=gst_major_minor_version
69 GST_VERSION_REQUIRED=gst_version
70 GST_PLUGINS_BASE_VERSION_REQUIRED=gst_plugins_base_version
71 GST_PLUGINS_BAD_VERSION_REQUIRED=gst_plugins_bad_version
72 AC_SUBST(GST_MAJORMINOR)
73 AC_SUBST(GST_VERSION_REQUIRED)
74 AC_SUBST(GST_PLUGINS_BASE_VERSION_REQUIRED)
75
76 dnl Use pretty build output with automake >= 1.11
77 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [
78   AM_DEFAULT_VERBOSITY=1
79   AC_SUBST(AM_DEFAULT_VERBOSITY)
80 ])
81
82 dnl Check for tools
83 AC_PROG_CC
84 AM_PROG_CC_C_O
85 AC_PROG_LIBTOOL
86
87 AC_ARG_ENABLE(glx,
88     AC_HELP_STRING([--enable-glx],
89                    [enable OpenGL/X11 @<:@default=yes@:>@]),
90     [], [enable_glx="yes"])
91
92 AC_ARG_ENABLE(vaapi-glx,
93     AC_HELP_STRING([--enable-vaapi-glx],
94                    [enable VA/GLX extensions @<:@default=yes@:>@]),
95     [], [enable_vaapi_glx="yes"])
96
97 AC_ARG_ENABLE(vaapisink-glx,
98     AC_HELP_STRING([--enable-vaapisink-glx],
99                    [enable OpenGL/X11 to vaapisink @<:@default=yes@:>@]),
100     [], [enable_vaapisink_glx="no"])
101
102 AC_ARG_ENABLE(ffmpeg,
103     AC_HELP_STRING([--enable-ffmpeg],
104                    [enable bitstream parsing from FFmpeg @<:@default=no@:>@]),
105     [], [enable_ffmpeg="no"])
106
107 AC_ARG_ENABLE(codecparsers,
108     AC_HELP_STRING([--enable-codecparsers],
109                    [enable adhoc bitstream parsers from GStreamer @<:@default=yes@:>@]),
110     [], [enable_codecparsers="yes"])
111
112 dnl Check for __attribute__((visibility()))
113 AC_CACHE_CHECK([whether __attribute__((visibility())) is supported],
114   vaapi_cv_visibility_attribute,
115   [cat > conftest.c <<EOF
116 int foo __attribute__ ((visibility ("hidden"))) = 1;
117 int bar __attribute__ ((visibility ("protected"))) = 1;
118 EOF
119   vaapi_cv_visibility_attribute=no
120   if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
121     if grep '\.hidden.*foo' conftest.s >/dev/null; then
122       if grep '\.protected.*bar' conftest.s >/dev/null; then
123         vaapi_cv_visibility_attribute=yes
124       fi
125     fi
126   fi
127   rm -f conftest.[cs]
128 ])
129 if test $vaapi_cv_visibility_attribute = yes; then
130   vaapi_cv_visibility_attribute_hidden="__attribute__((visibility(\"hidden\")))"
131 else
132   vaapi_cv_visibility_attribute_hidden=""
133 fi
134 AC_DEFINE_UNQUOTED([attribute_hidden],
135                    [$vaapi_cv_visibility_attribute_hidden],
136                    [Define the "hidden" visibility attribute])
137
138 dnl Check for basic libraries
139 AC_CHECK_LIB(m, tan)
140
141 dnl Check for Gtk doc
142 GTKDOC_VERSION=gtkdoc_version
143 GTK_DOC_CHECK([$GTKDOC_VERSION])
144 AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes"])
145 AC_SUBST(GTKDOC_VERSION)
146
147 dnl Check for GLib
148 AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
149 PKG_CHECK_MODULES([GLIB], [glib-2.0])
150 AC_CHECK_LIB([glib-2.0], [g_list_free_full], [
151     AC_DEFINE([HAVE_G_LIST_FREE_FULL], [1],
152               [Define to 1 if g_list_free_full() is available.])])
153 AC_SUBST(GLIB_CFLAGS)
154 AC_SUBST(GLIB_LIBS)
155
156 dnl Check for GStreamer
157 PKG_CHECK_MODULES([GST],
158     [gstreamer-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
159 )
160 AC_SUBST(GST_CFLAGS)
161 AC_SUBST(GST_LIBS)
162
163 AC_CACHE_CHECK([for GstBaseSink::query hook], ac_cv_have_gst_base_sink_query, [
164     saved_CFLAGS="$CFLAGS"
165     CFLAGS="$CFLAGS $GST_CFLAGS"
166     saved_LIBS="$LIBS"
167     LIBS="$LIBS $GST_LIBS"
168     AC_TRY_COMPILE(
169         [#include <gst/base/gstbasesink.h>],
170         [GstBaseSinkClass klass; klass.query = NULL;],
171         [ac_cv_have_gst_base_sink_query="yes"],
172         [ac_cv_have_gst_base_sink_query="no"]
173     )
174     CFLAGS="$saved_CFLAGS"
175     LIBS="$saved_LIBS"
176 ])
177 if test "$ac_cv_have_gst_base_sink_query" != "yes"; then
178     AC_MSG_ERROR([GstBaseSink does not contain the 'query' vfunc])
179 fi
180
181 dnl Check for GStreamer plugins-base
182 PKG_CHECK_MODULES([GST_PLUGINS_BASE],
183     [gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_PLUGINS_BASE_VERSION_REQUIRED]
184 )
185 AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
186 AC_SUBST(GST_PLUGINS_BASE_LIBS)
187
188 V=`$PKG_CONFIG --modversion gstreamer-plugins-base-$GST_MAJORMINOR`
189 GST_PLUGINS_BASE_MAJOR_VERSION=`echo "$V" | cut -d'.' -f1`
190 GST_PLUGINS_BASE_MINOR_VERSION=`echo "$V" | cut -d'.' -f2`
191 GST_PLUGINS_BASE_MICRO_VERSION=`echo "$V" | cut -d'.' -f3`
192 AC_SUBST(GST_PLUGINS_BASE_MAJOR_VERSION)
193 AC_SUBST(GST_PLUGINS_BASE_MINOR_VERSION)
194 AC_SUBST(GST_PLUGINS_BASE_MICRO_VERSION)
195
196 dnl Check for GStreamer base
197 PKG_CHECK_MODULES([GST_BASE],
198     [gstreamer-base-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
199 )
200 AC_SUBST(GST_BASE_CFLAGS)
201 AC_SUBST(GST_BASE_LIBS)
202
203 dnl Check for GStreamer video
204 PKG_CHECK_MODULES([GST_VIDEO],
205     [gstreamer-video-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
206 )
207 AC_SUBST(GST_VIDEO_CFLAGS)
208 AC_SUBST(GST_VIDEO_LIBS)
209
210 AC_CACHE_CHECK([for GstVideoOverlayComposition],
211     ac_cv_have_gst_video_overlay_composition, [
212     saved_CFLAGS="$CFLAGS"
213     CFLAGS="$CFLAGS $GST_CFLAGS"
214     saved_LIBS="$LIBS"
215     LIBS="$LIBS $GST_LIBS"
216     AC_TRY_COMPILE(
217         [#include <gst/video/video-overlay-composition.h>],
218         [GstVideoOverlayComposition *c = gst_video_overlay_composition_new(0);],
219         [ac_cv_have_gst_video_overlay_composition="yes"],
220         [ac_cv_have_gst_video_overlay_composition="no"]
221     )
222     CFLAGS="$saved_CFLAGS"
223     LIBS="$saved_LIBS"
224 ])
225 if test "$ac_cv_have_gst_video_overlay_composition" != "yes"; then
226     AC_MSG_ERROR([GstVideoOverlayComposition is not available])
227 fi
228
229 dnl Check for GStreamer basevideo
230 PKG_CHECK_MODULES([GST_BASEVIDEO],
231     [gstreamer-basevideo-$GST_MAJORMINOR >= $GST_PLUGINS_BAD_VERSION_REQUIRED]
232 )
233 AC_SUBST(GST_BASEVIDEO_CFLAGS)
234 AC_SUBST(GST_BASEVIDEO_LIBS)
235
236 dnl Check for GStreamer codec parsers
237 USE_CODEC_PARSERS=0
238 if test "$enable_codecparsers" = "yes"; then
239 PKG_CHECK_MODULES([GST_CODEC_PARSERS],
240     [gstreamer-codecparsers-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED],
241     [enable_codecparsers="yes" USE_CODEC_PARSERS=1],
242     [enable_codecparsers="no"  USE_CODEC_PARSERS=0]
243 )
244 fi
245
246 AC_DEFINE_UNQUOTED(USE_CODEC_PARSERS, $USE_CODEC_PARSERS,
247     [Defined to 1 if GStreamer codec parsers are used])
248 AM_CONDITIONAL(USE_CODEC_PARSERS, test $USE_CODEC_PARSERS -eq 1)
249
250 USE_LOCAL_CODEC_PARSERS=0
251 if test "$enable_codecparsers" = "yes"; then
252 AC_CACHE_CHECK([for GstH264SliceHdr::n_emulation_prevention_bytes],
253     ac_cv_have_gst_h264_slice_hdr_epb_count, [
254     saved_CFLAGS="$CFLAGS"
255     CFLAGS="$CFLAGS $GST_CFLAGS $GST_CODEC_PARSERS_CFLAGS"
256     saved_LIBS="$LIBS"
257     LIBS="$LIBS $GST_LIBS $GST_CODEC_PARSERS_LIBS"
258     AC_TRY_COMPILE(
259         [#include <gst/codecparsers/gsth264parser.h>],
260         [GstH264SliceHdr slice_hdr;
261          slice_hdr.n_emulation_prevention_bytes = 0;],
262         [ac_cv_have_gst_h264_slice_hdr_epb_count="yes"],
263         [ac_cv_have_gst_h264_slice_hdr_epb_count="no"]
264     )
265     CFLAGS="$saved_CFLAGS"
266     LIBS="$saved_LIBS"
267 ])
268
269 AC_CACHE_CHECK([for JPEG parser],
270     ac_cv_have_gst_jpeg_parser, [
271     saved_CFLAGS="$CFLAGS"
272     CFLAGS="$CFLAGS $GST_CFLAGS $GST_CODEC_PARSERS_CFLAGS"
273     saved_LIBS="$LIBS"
274     LIBS="$LIBS $GST_LIBS $GST_CODEC_PARSERS_LIBS"
275     AC_TRY_COMPILE(
276         [#include <gst/codecparsers/gstjpegparser.h>],
277         [GstJpegImage jpeg_image;],
278         [ac_cv_have_gst_jpeg_parser="yes"],
279         [ac_cv_have_gst_jpeg_parser="no" USE_LOCAL_CODEC_PARSERS=1]
280     )
281     CFLAGS="$saved_CFLAGS"
282     LIBS="$saved_LIBS"
283 ])
284 fi
285
286 if test "$ac_cv_have_gst_h264_slice_hdr_epb_count" = "yes"; then
287     AC_DEFINE_UNQUOTED(HAVE_GST_H264_SLICE_HDR_EPB_COUNT, 1,
288         [Defined to 1 if GstH264SliceHdr::n_emulation_prevention_bytes exists.])
289 fi
290
291 if test "$ac_cv_have_gst_jpeg_parser" = "yes"; then
292     AC_DEFINE_UNQUOTED(HAVE_GST_JPEG_PARSER, 1,
293         [Defined to 1 if JPEG parser exists.])
294 fi
295 AM_CONDITIONAL(USE_LOCAL_CODEC_PARSERS, test $USE_LOCAL_CODEC_PARSERS -eq 1)
296
297 dnl Check for GStreamer interfaces
298 PKG_CHECK_MODULES([GST_INTERFACES],
299     [gstreamer-interfaces-$GST_MAJORMINOR >= $GST_PLUGINS_BASE_VERSION_REQUIRED]
300 )
301 AC_SUBST(GST_INTERFACES_CFLAGS)
302 AC_SUBST(GST_INTERFACES_LIBS)
303
304 dnl GST_ALL_LDFLAGS:
305 dnl LDFLAGS really should only contain flags, not libs - they get added before
306 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
307 GST_ALL_LDFLAGS="-no-undefined"
308 AC_SUBST(GST_ALL_LDFLAGS)
309
310 dnl GST_PLUGIN_LDFLAGS:
311 dnl this really should only contain flags, not libs - they get added before
312 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
313 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^([_]*gst_plugin_desc|gst_.*_get_type)\$\$' $GST_ALL_LDFLAGS"
314 AC_SUBST(GST_PLUGIN_LDFLAGS)
315
316 dnl Check for the GStreamer plugins directory
317 AC_MSG_CHECKING([for GStreamer plugins directory])
318 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-$GST_MAJORMINOR --variable pluginsdir`
319 if test -z "$GST_PLUGINS_DIR"; then
320     echo "FAIL FAIL FAIL"
321     GST_PLUGINS_DIR="\$(libdir)/gstreamer-$GST_MAJORMINOR"
322 fi
323 AC_MSG_RESULT([$GST_PLUGINS_DIR])
324 plugindir="$GST_PLUGINS_DIR"
325 AC_SUBST(plugindir)
326
327 dnl Check for X11
328 PKG_CHECK_MODULES(X11, [x11])
329
330 dnl Check for OpenGL
331 USE_GLX=1
332 if test "$enable_glx" != "yes"; then
333     USE_GLX=0
334 fi
335 GLX_CFLAGS=""
336 GLX_LIBS=""
337 AC_CHECK_HEADERS([GL/gl.h GL/glext.h GL/glx.h], [], [USE_GLX=0], [
338 #ifdef HAVE_GL_GL_H
339 # include <GL/gl.h>
340 #endif
341 ])
342 AC_CHECK_LIB(GL, glXCreateContext, [GLX_LIBS="-lGL"], [USE_GLX=0])
343 AC_SUBST(GLX_CFLAGS)
344 AC_SUBST(GLX_LIBS)
345
346 dnl Check for VA-API
347 LIBVA_PKGNAME="libva"
348 PKG_CHECK_MODULES(LIBVA, [$LIBVA_PKGNAME])
349 AC_SUBST(LIBVA_PKGNAME)
350
351 dnl ... original VA-API 0.29
352 AC_CACHE_CHECK([for old VA-API 0.29],
353     ac_cv_have_vaapi_old, [
354     saved_CFLAGS="$CFLAGS"
355     CFLAGS="$CFLAGS $LIBVA_CFLAGS"
356     saved_LIBS="$LIBS"
357     LIBS="$LIBS $LIBVA_LIBS"
358     AC_TRY_LINK(
359     [#include <va_x11.h>],
360     [vaGetDisplay(NULL)],
361     [ac_cv_have_vaapi_old="yes"],
362     [ac_cv_have_vaapi_old="no"])
363     CFLAGS="$saved_CFLAGS"
364     LIBS="$saved_LIBS"
365 ])
366 if test "$ac_cv_have_vaapi_old" = "yes"; then
367     LIBVA_EXTRA_CFLAGS="$LIBVA_CFLAGS -DGST_VAAPI_USE_OLD_VAAPI_0_29"
368 fi
369
370 dnl ... VA-API >= 0.31 or -sds
371 LIBVA_X11_PKGNAME="libva-x11"
372 PKG_CHECK_MODULES(LIBVA_X11, [$LIBVA_X11_PKGNAME],
373     [ac_cv_have_vaapi_x11="yes"],
374     [ac_cv_have_vaapi_x11="no"]
375 )
376 if test "$ac_cv_have_vaapi_x11" = "no"; then
377     if test "$ac_cv_have_vaapi_old" = "yes"; then
378         LIBVA_X11_PKGNAME="libva"
379         CFLAGS="$CFLAGS $LIBVA_EXTRA_CFLAGS"
380         LIBS="$LIBS $LIBVA_EXTRA_LIBS"
381     else
382         AC_MSG_ERROR([could not find VA-API])
383     fi
384 fi
385 AC_SUBST(LIBVA_X11_PKGNAME)
386
387 dnl ... VA-API >= 0.31 or -sds (VA/GLX extensions)
388 USE_VAAPI_GLX=0
389 if test $USE_GLX -eq 1; then
390     if test "$enable_vaapi_glx" = "yes"; then
391         LIBVA_GLX_PKGNAME="libva-glx"
392         PKG_CHECK_MODULES(LIBVA_GLX, [$LIBVA_GLX_PKGNAME],
393             [ac_cv_have_vaapi_glx="yes" USE_VAAPI_GLX=1],
394             [ac_cv_have_vaapi_glx="no"]
395         )
396     fi
397     if test $USE_VAAPI_GLX -eq 0; then
398         AC_MSG_WARN([VA/GLX not found or disabled. Fallbacking to TFP+FBO])
399         LIBVA_GLX_PKGNAME="$LIBVA_X11_PKGNAME"
400     fi
401 fi
402 AC_SUBST(LIBVA_GLX_PKGNAME)
403
404 AC_SUBST(LIBVA_EXTRA_CFLAGS)
405 AC_SUBST(LIBVA_EXTRA_LIBS)
406
407 dnl Check for JPEG decoding API (0.33+)
408 USE_JPEG_DECODER=0
409 if test "$enable_codecparsers" = "yes"; then
410 AC_CACHE_CHECK([for JPEG decoding API],
411     ac_cv_have_jpeg_decoding_api, [
412     saved_CFLAGS="$CFLAGS"
413     CFLAGS="$CFLAGS $LIBVA_CFLAGS"
414     saved_LIBS="$LIBS"
415     LIBS="$CFLAGS $LIBVA_LIBS"
416     AC_TRY_COMPILE(
417         [#include <va/va.h>
418          #include <va/va_dec_jpeg.h>]
419         [VAPictureParameterBufferJPEG pic_param;
420          VASliceParameterBufferJPEG slice_param;
421          VAHuffmanTableBufferJPEG huffman_table;
422          VAIQMatrixBufferJPEG iq_matrix;],
423         [ac_cv_have_jpeg_decoding_api="yes" USE_JPEG_DECODER=1],
424         [ac_cv_have_jpeg_decoding_api="no"]
425     )
426     CFLAGS="$saved_CFLAGS"
427     LIBS="$saved_LIBS"
428 ])
429 fi
430
431 AC_DEFINE_UNQUOTED(USE_JPEG_DECODER, $USE_JPEG_DECODER,
432     [Defined to 1 if JPEG decoder is used])
433 AM_CONDITIONAL(USE_JPEG_DECODER, test $USE_JPEG_DECODER -eq 1)
434
435 dnl Check for OpenGL support to vaapisink
436 if test "$enable_vaapisink_glx:$USE_GLX" = "yes:1"; then
437     USE_VAAPISINK_GLX=1
438 else
439     USE_VAAPISINK_GLX=0
440 fi
441
442 dnl Check for FFmpeg
443 USE_FFMPEG=0
444 if test "$enable_ffmpeg" = "yes"; then
445 PKG_CHECK_MODULES(LIBAVCODEC, [libavcodec],
446     [enable_ffmpeg="yes" USE_FFMPEG=1],
447     [enable_ffmpeg="no"  USE_FFMPEG=0]
448 )
449 fi
450 if test "$enable_ffmpeg" = "yes"; then
451 AC_CHECK_HEADERS([libavcodec/avcodec.h ffmpeg/avcodec.h])
452 AC_CHECK_HEADERS([libavcodec/vaapi.h ffmpeg/vaapi.h],
453     [break],
454     [enable_ffmpeg="no"  USE_FFMPEG=0]
455 )
456 fi
457
458 if test "$enable_ffmpeg:$enable_codecparsers" = "no:no"; then
459     AC_MSG_ERROR([Found neither suitable FFmpeg with VA-API support nor GStreamer bitstream parsers])
460 fi
461
462 AC_DEFINE_UNQUOTED(USE_FFMPEG, $USE_FFMPEG,
463     [Defined to 1 if FFmpeg is used])
464 AM_CONDITIONAL(USE_FFMPEG, test $USE_FFMPEG -eq 1)
465
466 AC_DEFINE_UNQUOTED(USE_GLX, $USE_GLX,
467     [Defined to 1 if GLX is enabled])
468 AM_CONDITIONAL(USE_GLX, test $USE_GLX -eq 1)
469
470 AC_DEFINE_UNQUOTED(USE_VAAPI_GLX, $USE_VAAPI_GLX,
471     [Defined to 1 if VA/GLX is enabled])
472 AM_CONDITIONAL(USE_VAAPI_GLX, test $USE_VAAPI_GLX -eq 1)
473
474 AC_DEFINE_UNQUOTED(USE_VAAPISINK_GLX, $USE_VAAPISINK_GLX,
475     [Defined to 1 to enable GLX support to vaapisink])
476 AM_CONDITIONAL(USE_VAAPISINK_GLX, test $USE_VAAPISINK_GLX -eq 1)
477
478 VA_VERSION=`$PKG_CONFIG --modversion libva`
479 VA_MAJOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f1`
480 VA_MINOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f2`
481 VA_MICRO_VERSION=`echo "$VA_VERSION" | cut -d'.' -f3`
482 VA_VERSION_STR="$VA_VERSION"
483
484 pkgconfigdir=${libdir}/pkgconfig
485 AC_SUBST(pkgconfigdir)
486
487 AC_OUTPUT([
488     Makefile
489     debian.upstream/Makefile
490     debian.upstream/changelog
491     debian.upstream/control
492     debian.upstream/gstreamer$GST_MAJORMINOR-vaapi.install:\
493 debian.upstream/gstreamer-vaapi.install.in
494     debian.upstream/gstreamer$GST_MAJORMINOR-vaapi-doc.install:\
495 debian.upstream/gstreamer-vaapi-doc.install.in
496     debian.upstream/libgstvaapi$GST_VAAPI_MAJOR_VERSION.install:\
497 debian.upstream/libgstvaapi.install.in
498     debian.upstream/libgstvaapi-dev.install
499     debian.upstream/libgstvaapi-x11-$GST_VAAPI_MAJOR_VERSION.install:\
500 debian.upstream/libgstvaapi-x11.install.in
501     debian.upstream/libgstvaapi-glx-$GST_VAAPI_MAJOR_VERSION.install:\
502 debian.upstream/libgstvaapi-glx.install.in
503     docs/Makefile
504     docs/reference/Makefile
505     docs/reference/libs/Makefile
506     docs/reference/libs/libs-docs.xml
507     docs/reference/plugins/Makefile
508     docs/reference/plugins/plugins-docs.xml
509     gst-libs/Makefile
510     gst-libs/gst/Makefile
511     gst-libs/gst/gstutils_version.h
512     gst-libs/gst/codecparsers/Makefile
513     gst-libs/gst/vaapi/Makefile
514     pkgconfig/Makefile
515     pkgconfig/gstreamer-vaapi-$GST_MAJORMINOR.pc:\
516 pkgconfig/gstreamer-vaapi.pc.in
517     pkgconfig/gstreamer-vaapi-glx-$GST_MAJORMINOR.pc:\
518 pkgconfig/gstreamer-vaapi-glx.pc.in
519     pkgconfig/gstreamer-vaapi-x11-$GST_MAJORMINOR.pc:\
520 pkgconfig/gstreamer-vaapi-x11.pc.in
521     gst/Makefile
522     gst/vaapi/Makefile
523     tests/Makefile
524 ])
525
526 dnl Print summary
527 yesno() {
528     test $1 -eq 1 && echo yes || echo no
529 }
530
531 echo
532 echo $PACKAGE configuration summary:
533 echo
534 echo VA-API version ................... : $VA_VERSION_STR
535 echo GLX support ...................... : $(yesno $USE_GLX)
536 echo VA/GLX support ................... : $(yesno $USE_VAAPI_GLX)
537 echo VaapiSink/GL ..................... : $(yesno $USE_VAAPISINK_GLX)
538 echo FFmpeg bitstream parsers ......... : $(yesno $USE_FFMPEG)
539 echo GStreamer bitstream parsers ...... : $(yesno $USE_CODEC_PARSERS)
540 echo