From 7d049f50f9b9f28feab876dc2043fa1cbddae221 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <guest@slax.example.net>
Date: Fri, 15 Apr 2022 18:38:17 +0300
Subject: [PATCH 3/3] fix libva libs for internal ffmpeg on my machine

---
 cinelerra-5.1/configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
index 37607b1..1b064d3 100644
--- a/cinelerra-5.1/configure.ac
+++ b/cinelerra-5.1/configure.ac
@@ -1079,12 +1079,12 @@ fi
 
 FFMPEG_EXTRA_LDFLAGS=""
 if test "x$WANT_VAAPI" != "xno" -a "x$HAVE_VAAPI" = "xyes"; then
-  FFMPEG_EXTRA_LDFLAGS+=' -lva'
-  EXTRA_LIBS+=' -lva'
+  FFMPEG_EXTRA_LDFLAGS+=' -lva `pkg-config --libs libva`'
+  EXTRA_LIBS+=' -lva '
   WANT_VAAPI="yes"
   if test "x$HAVE_vaapi_x11" = "xyes"; then
     FFMPEG_EXTRA_LDFLAGS+=' -lva-x11'
-    EXTRA_LIBS+=' -lva-x11'
+    EXTRA_LIBS+=' -lva-x11 `pkg-config --libs x11`'
   fi
   if test "x$HAVE_vaapi_drm" = "xyes"; then
     FFMPEG_EXTRA_LDFLAGS+=' -lva-drm'
-- 
2.14.5

