]> git.sesse.net Git - vlc/commitdiff
Allow building plugins through autotools-builtin means...
authorRémi Denis-Courmont <rem@videolan.org>
Mon, 28 Apr 2008 19:20:34 +0000 (22:20 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Mon, 28 Apr 2008 19:20:34 +0000 (22:20 +0300)
...in addition to vlc-config

modules/common.am
modules/genmf

index cdd432bd24d8fd7adf4948027f332495572aa8a0..727a230e4799be7cb76acb60dbadf73c5fb181c9 100644 (file)
@@ -8,7 +8,6 @@
 NULL =
 SUFFIXES =
 libvlcdir = $(libdir)/vlc/$(basedir)
-libvlc_LTLIBRARIES =
 EXTRA_DIST = Modules.am
 BUILT_SOURCES =
 CLEANFILES = $(BUILT_SOURCES)
index f756893b36cccdddfe61e4d99fcb4f95b9d8db36..ec314a3e914145aef234cb793bc9cb3fab1ef412 100755 (executable)
@@ -19,10 +19,19 @@ do
   # automake will not recurse for make dist if we don't define SUBDIRS = .
   subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`"
   mods="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | xargs`"
+  plugins="`sed -n -e 's/^.*lib\([^ ]*\)_plugin\.la.*/\1/p' < "${modf}" | xargs`"
+  libvlc_ltlibs=""
   extra_ltlibs=""
   for mod in $mods
   do
-    extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la"
+    case " ${plugins} " in
+      *\ ${mod}\ *)
+       ;;
+      *)
+        libvlc_ltlibs="${libvlc_ltlibs} \$(LTLIB${mod})"
+        extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la"
+      ;;
+    esac
   done
   rm -f "${makf}" && cat > "${makf}" << EOF
 # ${makf} automatically generated from ${modf} by $0
@@ -32,6 +41,7 @@ basedir = ${basedir}
 dir = ${dir}
 mods = ${mods}
 SUBDIRS = ${subdirs}
+libvlc_LTLIBRARIES = ${libvlc_ltlibs}
 EXTRA_LTLIBRARIES = ${extra_ltlibs}
 
 include \$(top_srcdir)/modules/common.am