libva-x11 is used for X11 applications, so it is required to build
any GTK application.
Later, when Wayland test is added, we should change this.
AC_CHECK_HEADERS([gtk/gtk.h], [], [USE_GTK=0])
CPPFLAGS="$saved_CPPFLAGS"
])
-AM_CONDITIONAL([USE_GTK], [test $USE_GTK -eq 1])
+dnl USE_GTK conditional is delayed after being sure to handle X11
dnl ---------------------------------------------------------------------------
dnl -- VA-API --
])
fi
+dnl export USE_GTK after being sure to handle X11
+AM_CONDITIONAL([USE_GTK], [test $USE_X11 -eq 1 -a $USE_GTK -eq 1])
+
dnl Check for encoding support
USE_ENCODERS=0
if test "x$enable_encoders" = "xyes"; then