diff --git a/configure.ac b/configure.ac
index a90561858e6c876ba08021c8322f972cc20a81e7..a7df70e6216df12766fdea4e1dfcdf13f2f9bdf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4057,8 +4057,6 @@ AC_ARG_ENABLE(taglib,
 AS_IF([test "${enable_taglib}" != "no"], [
   PKG_CHECK_MODULES(TAGLIB, taglib >= 1.6.1, [
     VLC_ADD_PLUGIN([taglib])
-    VLC_ADD_LIBS([taglib],[$TAGLIB_LIBS -lz])
-    VLC_ADD_CXXFLAGS([taglib],[$TAGLIB_CFLAGS])
   ], [
     AC_MSG_WARN([${TAGLIB_PKG_ERRORS}.])])
 ])
diff --git a/modules/meta_engine/.gitignore b/modules/meta_engine/.gitignore
deleted file mode 100644
index 08a6d725b51930d1162342705fb6b5444f68a980..0000000000000000000000000000000000000000
--- a/modules/meta_engine/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.am
diff --git a/modules/meta_engine/Makefile.am b/modules/meta_engine/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..efa32f195b58375e4e20c88db53bdd91b0109f9b
--- /dev/null
+++ b/modules/meta_engine/Makefile.am
@@ -0,0 +1,13 @@
+include ../common.am
+metadir = $(pluginsdir)/meta_engine
+EXTRA_LTLIBRARIES =
+
+libfolder_plugin_la_SOURCES = folder.c
+meta_LTLIBRARIES = libfolder_plugin.la
+
+libtaglib_plugin_la_SOURCES = taglib.cpp ../demux/xiph_metadata.h ../demux/xiph_metadata.c
+libtaglib_plugin_la_CXXFLAGS = $(AM_CFLAGS) $(TAGLIB_CFLAGS)
+libtaglib_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(metadir)'
+libtaglib_plugin_la_LIBADD = $(TAGLIB_LIBS) -lz
+EXTRA_LTLIBRARIES += libtaglib_plugin.la
+meta_LTLIBRARIES += $(LTLIBtaglib)
diff --git a/modules/meta_engine/Modules.am b/modules/meta_engine/Modules.am
deleted file mode 100644
index 89ea140a1b38038b1790375f45aae8e3aa6bf7e1..0000000000000000000000000000000000000000
--- a/modules/meta_engine/Modules.am
+++ /dev/null
@@ -1,5 +0,0 @@
-SOURCES_folder = folder.c
-SOURCES_taglib = taglib.cpp ../demux/xiph_metadata.h ../demux/xiph_metadata.c
-
-meta_engine_LTLIBRARIES += \
-	libfolder_plugin.la