remove link to libgstbadbase in compositor when compile with 1.14

GST-1.14 hase move badbase into libgstbase

Signed-off-by: Haihua Hu <jared.hu@nxp.com>
diff --git a/configure.ac b/configure.ac
index e841789..e4d412b 100755
--- a/configure.ac
+++ b/configure.ac
@@ -223,6 +223,9 @@
 AC_CHECK_LIB(gstbadallocators-$GST_MAJORMINOR, gst_buffer_is_phymem, [HAVE_BAD_ALLOCATOR=yes])
 AM_CONDITIONAL(USE_BAD_ALLOCATOR, test "x$HAVE_BAD_ALLOCATOR" = "xyes")
 
+PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= 1.14, HAVE_BAD_BASE=no, HAVE_BAD_BASE=yes)
+AM_CONDITIONAL(USE_BAD_BASE, test "x$HAVE_BAD_BASE" = "xyes")
+
 AC_CHECK_HEADERS([vpu_lib.h], [HAVE_VPU_LIB=yes], [HAVE_VPU_LIB=no])
 if test "x$HAVE_VPU_LIB" = "xyes"; then
     VPU_LIBS=`$PKG_CONFIG --libs libfslvpuwrap 2>/dev/null`
diff --git a/plugins/compositor/Makefile.am b/plugins/compositor/Makefile.am
index c7ecf7b..592e8ea 100755
--- a/plugins/compositor/Makefile.am
+++ b/plugins/compositor/Makefile.am
@@ -17,13 +17,16 @@
 
 libgstimxcompositor_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
 				 $(GST_BASE_LIBS) \
-				 -lgstbadbase-$(GST_API_VERSION) \
 				 -lgstbadvideo-$(GST_API_VERSION) \
 				 $(GST_PLUGINS_BASE_LIBS) \
 				 -lgstvideo-$(GST_API_VERSION) \
 				 $(GST_LIBS) \
 				 ../../libs/libgstfsl-@GST_API_VERSION@.la
 
+if USE_BAD_BASE
+libgstimxcompositor_la_LIBADD += -lgstbadbase-$(GST_API_VERSION)
+endif
+
 libgstimxcompositor_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstimxcompositor_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)