gst: Add better support for static plugins
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 24 Oct 2012 10:15:54 +0000 (12:15 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 15 Apr 2013 13:56:02 +0000 (15:56 +0200)
17 files changed:
configure.ac
ext/a52dec/Makefile.am
ext/amrnb/Makefile.am
ext/amrwbdec/Makefile.am
ext/cdio/Makefile.am
ext/dvdread/Makefile.am
ext/lame/Makefile.am
ext/mad/Makefile.am
ext/mpeg2dec/Makefile.am
ext/sidplay/Makefile.am
ext/twolame/Makefile.am
ext/x264/Makefile.am
gst/asfdemux/Makefile.am
gst/dvdlpcmdec/Makefile.am
gst/dvdsub/Makefile.am
gst/realmedia/Makefile.am
gst/xingmux/Makefile.am

index 37e67fc..9fb0362 100644 (file)
@@ -185,6 +185,28 @@ AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO([$PACKAGE_VERSION_NANO],
   ["${srcdir}/gst-plugins-ugly.doap"],
   [$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO])
 
+dnl build static plugins or not
+AC_MSG_CHECKING([whether to build static plugins or not])
+AC_ARG_ENABLE(
+  static-plugins,
+  AC_HELP_STRING(
+    [--enable-static-plugins],
+    [build static plugins @<:@default=no@:>@]),
+  [AS_CASE(
+    [$enableval], [no], [], [yes], [],
+    [AC_MSG_ERROR([bad value "$enableval" for --enable-static-plugins])])],
+  [enable_static_plugins=no])
+AC_MSG_RESULT([$enable_static_plugins])
+if test "x$enable_static_plugins" = xyes; then
+  AC_DEFINE(GST_PLUGIN_BUILD_STATIC, 1,
+    [Define if static plugins should be built])
+  GST_PLUGIN_LIBTOOLFLAGS=""
+else
+  GST_PLUGIN_LIBTOOLFLAGS="--tag=disable-static"
+fi
+AC_SUBST(GST_PLUGIN_LIBTOOLFLAGS)
+AM_CONDITIONAL(GST_PLUGIN_BUILD_STATIC, test "x$enable_static_plugins" = "xyes")
+
 dnl define an ERROR_CFLAGS Makefile variable
 AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [
     -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
@@ -418,7 +440,7 @@ AC_SUBST(GST_ALL_LDFLAGS)
 
 dnl this really should only contain flags, not libs - they get added before
 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
-GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc.*' $GST_ALL_LDFLAGS"
+GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_.*' $GST_ALL_LDFLAGS"
 AC_SUBST(GST_PLUGIN_LDFLAGS)
 
 dnl *** output files ***
index 65c4d26..6a43121 100644 (file)
@@ -15,6 +15,6 @@ libgsta52dec_la_LIBADD = \
        $(ORC_LIBS) \
        $(A52DEC_LIBS)
 libgsta52dec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgsta52dec_la_LIBTOOLFLAGS = --tag=disable-static
+libgsta52dec_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gsta52dec.h
index 6c7edfb..283f54d 100644 (file)
@@ -11,7 +11,7 @@ libgstamrnb_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
         -lgstaudio-@GST_API_VERSION@ \
         $(GST_BASE_LIBS) $(GST_LIBS) $(AMRNB_LIBS)
 libgstamrnb_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstamrnb_la_LIBTOOLFLAGS = --tag=disable-static
+libgstamrnb_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = \
        amrnbdec.h \
index 1ed0200..aef2984 100644 (file)
@@ -11,7 +11,7 @@ libgstamrwbdec_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
        -lgstaudio-@GST_API_VERSION@ \
        $(GST_LIBS) $(AMRWB_LIBS)
 libgstamrwbdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstamrwbdec_la_LIBTOOLFLAGS = --tag=disable-static
+libgstamrwbdec_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = \
        amrwbdec.h
index e4865d1..bd8f422 100644 (file)
@@ -16,7 +16,7 @@ libgstcdio_la_LIBADD = \
        $(CDIO_LIBS)
 
 libgstcdio_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) 
-libgstcdio_la_LIBTOOLFLAGS = --tag=disable-static
+libgstcdio_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = \
        gstcdio.h \
index d5c9bac..30b4ba3 100644 (file)
@@ -5,7 +5,7 @@ libgstdvdread_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(DVDREAD_CFLAGS)
 libgstdvdread_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) \
        $(GMODULE_NO_EXPORT_LIBS) $(DVDREAD_LIBS)
 libgstdvdread_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstdvdread_la_LIBTOOLFLAGS = --tag=disable-static
+libgstdvdread_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = dvdreadsrc.h
 
index 7cacf2a..c7124dd 100644 (file)
@@ -6,6 +6,6 @@ libgstlame_la_CFLAGS = \
 libgstlame_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \
        $(GST_BASE_LIBS) $(GST_LIBS) $(LAME_LIBS)
 libgstlame_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstlame_la_LIBTOOLFLAGS = --tag=disable-static
+libgstlame_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstlamemp3enc.h
index 097b864..ca796d6 100644 (file)
@@ -9,7 +9,7 @@ libgstmad_la_LIBADD = \
         $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \
        $(GST_BASE_LIBS) $(GST_LIBS) $(MAD_LIBS)
 libgstmad_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstmad_la_LIBTOOLFLAGS = --tag=disable-static
+libgstmad_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstmad.h
 
index bf0a4ea..593e2c3 100644 (file)
@@ -6,6 +6,6 @@ libgstmpeg2dec_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
 libgstmpeg2dec_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
        $(GST_LIBS) $(MPEG2DEC_LIBS)
 libgstmpeg2dec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstmpeg2dec_la_LIBTOOLFLAGS = --tag=disable-static
+libgstmpeg2dec_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstmpeg2dec.h
index 47e51ee..d44b227 100644 (file)
@@ -6,6 +6,6 @@ libgstsid_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \
 libgstsid_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(SIDPLAY_LIBS) \
                      -lgstaudio-$(GST_API_VERSION)
 libgstsid_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstsid_la_LIBTOOLFLAGS = --tag=disable-static
+libgstsid_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstsiddec.h
index 7503515..b6de82c 100644 (file)
@@ -7,6 +7,6 @@ libgsttwolame_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
        -lgstaudio-@GST_API_VERSION@ -lgstpbutils-@GST_API_VERSION@ \
        $(GST_LIBS) $(TWOLAME_LIBS)
 libgsttwolame_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgsttwolame_la_LIBTOOLFLAGS = --tag=disable-static
+libgsttwolame_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gsttwolamemp2enc.h
index f69c9b1..aae9603 100644 (file)
@@ -12,7 +12,7 @@ libgstx264_la_LIBADD = \
        $(GST_LIBS) \
        $(X264_LIBS)
 libgstx264_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstx264_la_LIBTOOLFLAGS = --tag=disable-static
+libgstx264_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstx264enc.h
 
index e76500a..93fa1e8 100644 (file)
@@ -8,7 +8,7 @@ libgstasf_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
                $(GST_BASE_LIBS) $(GST_LIBS) \
                $(WIN32_LIBS)
 libgstasf_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstasf_la_LIBTOOLFLAGS = --tag=disable-static
+libgstasf_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstasfdemux.h asfheaders.h asfpacket.h gstrtpasfdepay.h gstrtspwms.h
 
index 7809536..fcee1e4 100644 (file)
@@ -5,7 +5,7 @@ libgstdvdlpcmdec_la_SOURCES = gstdvdlpcmdec.c
 libgstdvdlpcmdec_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
 libgstdvdlpcmdec_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_API_VERSION@ $(GST_LIBS)
 libgstdvdlpcmdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstdvdlpcmdec_la_LIBTOOLFLAGS = --tag=disable-static
+libgstdvdlpcmdec_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstdvdlpcmdec.h
 
index 68b16c5..5272ac5 100644 (file)
@@ -6,7 +6,7 @@ libgstdvdsub_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
 libgstdvdsub_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
        $(GST_BASE_LIBS) $(GST_LIBS)
 libgstdvdsub_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstdvdsub_la_LIBTOOLFLAGS = --tag=disable-static
+libgstdvdsub_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstdvdsubdec.h gstdvdsubparse.h
 
index 9df89e9..46cbbc3 100644 (file)
@@ -14,7 +14,7 @@ libgstrmdemux_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
                                -lgstpbutils-@GST_API_VERSION@ \
                                $(GST_BASE_LIBS) $(GST_LIBS)
 libgstrmdemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstrmdemux_la_LIBTOOLFLAGS = --tag=disable-static
+libgstrmdemux_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = rademux.h rmdemux.h rmutils.h rdtdepay.h rdtmanager.h \
                 rdtjitterbuffer.h rtspreal.h realhash.h asmrules.h gstrdtbuffer.h \
index 5439a42..c5d7692 100644 (file)
@@ -6,7 +6,7 @@ libgstxingmux_la_SOURCES = plugin.c gstxingmux.c
 libgstxingmux_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS)
 libgstxingmux_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS)
 libgstxingmux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstxingmux_la_LIBTOOLFLAGS = --tag=disable-static
+libgstxingmux_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstxingmux.h