gl: update plugins to use GstGL from -base
diff --git a/ext/gtk/Makefile.am b/ext/gtk/Makefile.am
index 3490625..057ff3f 100644
--- a/ext/gtk/Makefile.am
+++ b/ext/gtk/Makefile.am
@@ -22,18 +22,16 @@
 	$(NULL)
 
 libgstgtk_la_CFLAGS = \
-	-I$(top_srcdir)/gst-libs \
-	-I$(top_builddir)/gst-libs \
-	$(GTK3_CFLAGS) \
-	$(GST_CFLAGS) \
-	$(GST_BASE_CFLAGS) \
+	$(GST_PLUGINS_BAD_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) \
-	$(GL_CFLAGS)
+	$(GST_GL_CFLAGS) \
+	$(GST_CFLAGS) \
+	$(GTK3_CFLAGS)
 libgstgtk_la_LIBADD = \
-	$(GTK3_LIBS) \
-	$(GST_BASE_LIBS) \
 	$(GST_PLUGINS_BASE_LIBS) \
-	-lgstvideo-$(GST_API_VERSION)
+	-lgstvideo-$(GST_API_VERSION) \
+	$(GST_BASE_LIBS) \
+	$(GTK3_LIBS)
 
 libgstgtk_la_SOURCES = $(sources)
 libgstgtk_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
@@ -41,8 +39,7 @@
 if USE_GTK3_GL
 if USE_GL
 libgstgtk_la_SOURCES += gstgtkglsink.c gstgtkglsink.h gtkgstglwidget.c gtkgstglwidget.h
-libgstgtk_la_LIBADD += \
-	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la
+libgstgtk_la_LIBADD += $(GST_GL_LIBS)
 endif
 endif
 
diff --git a/ext/gtk/meson.build b/ext/gtk/meson.build
index d041fbd..324bfba 100644
--- a/ext/gtk/meson.build
+++ b/ext/gtk/meson.build
@@ -15,7 +15,7 @@
   if build_gstgl and gstgl_dep.found() and gtk_dep.version().version_compare('>=3.15.0')
     have_gtk3_gl_windowing = false
 
-    if x11_dep.found() and gl_dep.found()
+    if gst_gl_have_window_x11 and gst_gl_have_platform_glx
       gtk_x11_dep = dependency('gtk+-x11-3.0', required : false)
       if gtk_x11_dep.found()
         optional_deps += gtk_x11_dep
@@ -23,7 +23,7 @@
       endif
     endif
 
-    if wayland_egl_dep.found() and egl_dep.found()
+    if gst_gl_have_window_wayland and gst_gl_have_platform_egl
       gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false)
       if gtk_wayland_dep.found()
         optional_deps += gtk_wayland_dep
diff --git a/tests/examples/gtk/Makefile.am b/tests/examples/gtk/Makefile.am
index adf5e31..15636d9 100644
--- a/tests/examples/gtk/Makefile.am
+++ b/tests/examples/gtk/Makefile.am
@@ -12,30 +12,29 @@
 noinst_PROGRAMS += gtkglsink glliveshader
 
 gtkglsink_SOURCES = gtkglsink.c
-gtkglsink_CFLAGS = $(GTK3_CFLAGS) \
+gtkglsink_CFLAGS = \
 	$(GST_PLUGINS_BAD_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) \
 	$(GST_CFLAGS) \
 	$(GL_CFLAGS) \
-	-DGST_USE_UNSTABLE_API
-gtkglsink_LDADD = $(GTK3_LIBS) \
+	$(GTK3_CFLAGS)
+gtkglsink_LDADD = \
+	$(GST_GL_LIBS) \
 	$(GST_LIBS) \
-	$(GL_LIBS) \
+	$(GTK3_LIBS) \
 	$(X11_LIBS)
 
 glliveshader_SOURCES = glliveshader.c
-glliveshader_CFLAGS = $(GTK3_CFLAGS) \
-	-I$(top_srcdir)/gst-libs \
-	-I$(top_builddir)/gst-libs \
+glliveshader_CFLAGS = \
 	$(GST_PLUGINS_BAD_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_GL_CFLAGS) \
 	$(GST_CFLAGS) \
-	$(GL_CFLAGS) \
-	-DGST_USE_UNSTABLE_API
-glliveshader_LDADD = $(GTK3_LIBS) \
+	$(GTK3_CFLAGS)
+glliveshader_LDADD = \
+	$(GST_GL_LIBS) \
 	$(GST_LIBS) \
-	$(GL_LIBS) \
-	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
+	$(GTK3_LIBS) \
 	$(X11_LIBS)
 endif
 endif