From eb73aa3061d42144564ad29d92b161174583859b Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Fri, 7 Sep 2012 11:44:44 +0200 Subject: [PATCH] configure: fix check for VA/DRM API. --- configure.ac | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 227aa64026..c598efa33c 100644 --- a/configure.ac +++ b/configure.ac @@ -397,9 +397,17 @@ VA_MICRO_VERSION=`echo "$VA_VERSION" | cut -d'.' -f3` VA_VERSION_STR="$VA_VERSION" dnl VA/DRM API -if test "$enable_drm" = "yes"; then +HAVE_VA_DRM=0 +if test $USE_DRM -eq 1; then PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= va_api_drm_version], - [:], [USE_DRM=0]) + [HAVE_VA_DRM=1], [USE_DRM=0]) + + if test $HAVE_VA_DRM -eq 1; then + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$LIBVA_DRM_CPPFLAGS" + AC_CHECK_HEADERS([va/va_drm.h], [:], [HAVE_VA_DRM=0 USE_DRM=0]) + CPPFLAGS="$saved_CPPFLAGS" + fi fi dnl VA/X11 API