configure: fix detection of VA/JPEG decoding API.

Fix detection of VA/JPEG decoding API with non-standard libva packages.
More precisely, some packages were shipping with a <va/va.h> header that
did not include <va/va_dec_jpeg.h>.

https://bugzilla.gnome.org/show_bug.cgi?id=706055

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
Wind Yuan 2013-08-15 17:59:37 +08:00 committed by Gwenole Beauchesne
parent 45b4ba7df7
commit 621d48a5b1
2 changed files with 15 additions and 1 deletions

View file

@ -593,6 +593,12 @@ if test $USE_GLX -eq 1; then
fi
AC_SUBST(LIBVA_GLX_PKGNAME)
dnl Check for va_dec_jpeg.h header
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
AC_CHECK_HEADERS([va/va_dec_jpeg.h], [], [], [#include <va/va.h>])
CPPFLAGS="$saved_CPPFLAGS"
dnl Check for JPEG decoding API (0.32.1+)
USE_JPEG_DECODER=0
AC_CACHE_CHECK([for JPEG decoding API],
@ -603,7 +609,11 @@ AC_CACHE_CHECK([for JPEG decoding API],
LIBS="$LIBS $LIBVA_LIBS"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <va/va.h>]],
[[#include <va/va.h>
#ifdef HAVE_VA_VA_DEC_JPEG_H
#include <va/va_dec_jpeg.h>
#endif
]],
[[VAPictureParameterBufferJPEGBaseline pic_param;
VASliceParameterBufferJPEGBaseline slice_param;
VAHuffmanTableBufferJPEGBaseline huffman_table;

View file

@ -34,6 +34,10 @@
#include "gstvaapidisplay_priv.h"
#include "gstvaapiobject_priv.h"
#ifdef HAVE_VA_VA_DEC_JPEG_H
# include <va/va_dec_jpeg.h>
#endif
#define DEBUG 1
#include "gstvaapidebug.h"