From 1789c6090fa9781fd9887db18b475a32e476bf46 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 10 Aug 2017 13:09:27 +0200 Subject: [PATCH] build: check for va_vpp.h Thus, in config.h the macro HAVE_VA_VA_VPP_H is defined. This will allow us to handle the inclusion of the header better. https://bugzilla.gnome.org/show_bug.cgi?id=786119 --- configure.ac | 13 ++++++++++++- meson.build | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index ce1e023..efa7bdc 100644 --- a/configure.ac +++ b/configure.ac @@ -709,6 +709,15 @@ slice_param.slice_data_flag = 0; ]) AS_IF([test "x$ac_cv_have_h265_decoding_api" = "xyes"], [USE_H265_DECODER=1]) +dnl Check for va_vpp.h header +saved_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS" +AC_CHECK_HEADERS([va/va_vpp.h], [], [], + [ +#include + ]) +CPPFLAGS="$saved_CPPFLAGS" + dnl Check for vpp (video post-processing) support USE_VA_VPP=0 AC_CACHE_CHECK([for video post-postprocessing API], @@ -723,7 +732,9 @@ AC_CACHE_CHECK([for video post-postprocessing API], AC_LANG_PROGRAM( [[ #include -#include +#ifdef HAVE_VA_VA_VPP_H +# include +#endif ]], [[ VADisplay va_dpy; diff --git a/meson.build b/meson.build index ac5cf99..6f335b3 100644 --- a/meson.build +++ b/meson.build @@ -94,6 +94,8 @@ USE_VP8_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp8.h', dependencies USE_VP9_DECODER = cc.has_header('va/va_dec_vp9.h', dependencies: libva_dep, prefix: '#include ') USE_VP9_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp9.h', dependencies: libva_dep, prefix: '#include ') +USE_VPP = cc.has_header('va/va_vpp.h', dependencies: libva_dep, prefix: '#include ') + USE_DRM = libva_drm_dep.found() and libdrm_dep.found() and libudev_dep.found() and get_option('with_drm') != 'no' USE_EGL = gmodule_dep.found() and egl_dep.found() and GLES_VERSION_MASK != 0 and get_option('with_egl') != 'no' USE_GLX = libva_x11_dep.found() and x11_dep.found() and gl_dep.found() and libdl_dep.found() and get_option('with_glx') != 'no' @@ -125,7 +127,7 @@ cdata.set10('USE_X11', USE_X11) cdata.set10('HAVE_XKBLIB', cc.has_header('X11/XKBlib.h', dependencies: x11_dep)) cdata.set10('HAVE_XRANDR', xrandr_dep.found()) cdata.set10('HAVE_XRENDER', xrender_dep.found()) -cdata.set10('USE_VA_VPP', true) +cdata.set10('USE_VA_VPP', USE_VPP) cdata.set10('USE_GST_GL_HELPERS', gstgl_dep.found()) cdata.set('GLES_VERSION_MASK', GLES_VERSION_MASK) runcmd = run_command('pkg-config', '--variable=driverdir', 'libva') -- 2.7.4