gst: Add better support for static plugins
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 24 Oct 2012 10:10:44 +0000 (12:10 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 24 Oct 2012 10:10:44 +0000 (12:10 +0200)
28 files changed:
configure.ac
ext/alsa/Makefile.am
ext/cdparanoia/Makefile.am
ext/libvisual/Makefile.am
ext/ogg/Makefile.am
ext/pango/Makefile.am
ext/theora/Makefile.am
ext/vorbis/Makefile.am
gst-libs/gst/app/Makefile.am
gst/adder/Makefile.am
gst/app/Makefile.am
gst/audioconvert/Makefile.am
gst/audiorate/Makefile.am
gst/audioresample/Makefile.am
gst/audiotestsrc/Makefile.am
gst/encoding/Makefile.am
gst/gio/Makefile.am
gst/playback/Makefile.am
gst/subparse/Makefile.am
gst/tcp/Makefile.am
gst/typefind/Makefile.am
gst/videoconvert/Makefile.am
gst/videorate/Makefile.am
gst/videoscale/Makefile.am
gst/videotestsrc/Makefile.am
gst/volume/Makefile.am
sys/ximage/Makefile.am
sys/xvimage/Makefile.am

index 584c04c..7736d98 100644 (file)
@@ -333,6 +333,28 @@ AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO([$PACKAGE_VERSION_NANO],
   ["${srcdir}/gst-plugins-base.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")
+
 # set by AG_GST_PARSE_SUBSYSTEM_DISABLES above
 dnl make sure it doesn't complain about unused variables if debugging is disabled
 NO_WARNINGS=""
@@ -805,7 +827,7 @@ AC_SUBST(GST_LIB_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 1c6acf6..9a22257 100644 (file)
@@ -18,7 +18,7 @@ libgstalsa_la_LIBADD = \
        $(ALSA_LIBS)
 
 libgstalsa_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstalsa_la_LIBTOOLFLAGS = --tag=disable-static
+libgstalsa_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = \
        gstalsa.h \
index f4690a6..86c3842 100644 (file)
@@ -12,6 +12,6 @@ libgstcdparanoia_la_LIBADD = \
        $(GST_LIBS) \
        $(CDPARANOIA_LIBS)
 libgstcdparanoia_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstcdparanoia_la_LIBTOOLFLAGS = --tag=disable-static
+libgstcdparanoia_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstcdparanoiasrc.h
index 07eec1a..a996b8e 100644 (file)
@@ -7,6 +7,6 @@ libgstlibvisual_la_LIBADD = \
        $(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la \
        $(GST_BASE_LIBS) $(LIBVISUAL_LIBS)
 libgstlibvisual_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstlibvisual_la_LIBTOOLFLAGS = --tag=disable-static
+libgstlibvisual_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = visual.h gstaudiovisualizer.h
index f9ed4ed..2fa9a30 100644 (file)
@@ -27,7 +27,7 @@ libgstogg_la_LIBADD = \
        $(GST_LIBS) \
        $(OGG_LIBS)
 libgstogg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstogg_la_LIBTOOLFLAGS = --tag=disable-static
+libgstogg_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 
 Android.mk: Makefile.am $(BUILT_SOURCES)
index 0109e01..7ecfbda 100644 (file)
@@ -25,5 +25,5 @@ libgstpango_la_LIBADD = \
        $(GST_LIBS) \
        $(PANGO_LIBS)
 libgstpango_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstpango_la_LIBTOOLFLAGS = --tag=disable-static
+libgstpango_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
index ff423a9..b1202a8 100644 (file)
@@ -17,5 +17,5 @@ libgsttheora_la_LIBADD = \
        $(GST_LIBS) \
        $(THEORA_LIBS)
 libgsttheora_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgsttheora_la_LIBTOOLFLAGS = --tag=disable-static
+libgsttheora_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
index b97029e..41062bb 100644 (file)
@@ -20,7 +20,7 @@ libgstvorbis_la_LIBADD = \
        $(GST_LIBS) \
        $(VORBIS_LIBS) $(VORBISENC_LIBS)
 libgstvorbis_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstvorbis_la_LIBTOOLFLAGS = --tag=disable-static
+libgstvorbis_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 endif
 
 if USE_IVORBIS
@@ -36,7 +36,7 @@ libgstivorbisdec_la_LIBADD = \
        $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_API_VERSION@.la \
        $(GST_LIBS) $(IVORBIS_LIBS)
 libgstivorbisdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstivorbisdec_la_LIBTOOLFLAGS = --tag=disable-static
+libgstivorbisdec_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 endif
 
 noinst_HEADERS = gstvorbisenc.h \
index 46170fb..54f35fb 100644 (file)
@@ -19,7 +19,7 @@ libgstapp_@GST_API_VERSION@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
        $(GST_BASE_CFLAGS) $(GST_CFLAGS)
 libgstapp_@GST_API_VERSION@_la_LIBADD = $(GST_BASE_LIBS)
 libgstapp_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
-libgstapp_@GST_API_VERSION@_la_LIBTOOLFLAGS = --tag=disable-static
+libgstapp_@GST_API_VERSION@_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 libgstapp_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/app
 libgstapp_@GST_API_VERSION@include_HEADERS = \
index a29eefc..c899cfc 100644 (file)
@@ -11,7 +11,7 @@ libgstadder_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstadder_la_LIBADD =  \
                 $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_API_VERSION@.la \
                 $(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS)
-libgstadder_la_LIBTOOLFLAGS = --tag=disable-static
+libgstadder_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstadder.h
 
index 5e344a6..f2bb6f0 100644 (file)
@@ -4,7 +4,7 @@ libgstapp_la_SOURCES = gstapp.c
 libgstapp_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
 libgstapp_la_LIBADD = $(GST_BASE_LIBS) $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_API_VERSION@.la
 libgstapp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstapp_la_LIBTOOLFLAGS = --tag=disable-static
+libgstapp_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 Android.mk: Makefile.am $(BUILT_SOURCES)
        androgenizer \
index a61c86e..66846fc 100644 (file)
@@ -16,7 +16,7 @@ libgstaudioconvert_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstaudioconvert_la_LIBADD = \
        $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_API_VERSION@.la \
        $(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) $(LIBM)
-libgstaudioconvert_la_LIBTOOLFLAGS = --tag=disable-static
+libgstaudioconvert_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = \
        gstaudioconvert.h \
index 557d1c8..9c21d07 100644 (file)
@@ -8,7 +8,7 @@ libgstaudiorate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstaudiorate_la_LIBADD = $(GST_LIBS) \
         $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_API_VERSION@.la
 
-libgstaudiorate_la_LIBTOOLFLAGS = --tag=disable-static
+libgstaudiorate_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 Android.mk: Makefile.am $(BUILT_SOURCES)
        androgenizer \
index 0c7e871..aad8f46 100644 (file)
@@ -27,7 +27,7 @@ libgstaudioresample_la_LIBADD = \
        $(LIBM)
 
 libgstaudioresample_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstaudioresample_la_LIBTOOLFLAGS = --tag=disable-static
+libgstaudioresample_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = \
        arch.h \
index a7c019d..3680d20 100644 (file)
@@ -6,7 +6,7 @@ libgstaudiotestsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstaudiotestsrc_la_LIBADD = \
        $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_API_VERSION@.la \
        $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
-libgstaudiotestsrc_la_LIBTOOLFLAGS = --tag=disable-static
+libgstaudiotestsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstaudiotestsrc.h
 
index f1b4e5f..85efbd1 100644 (file)
@@ -11,7 +11,7 @@ libgstencodebin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstencodebin_la_LIBADD = \
        $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_API_VERSION@.la \
        $(GST_LIBS)
-libgstencodebin_la_LIBTOOLFLAGS = --tag=disable-static
+libgstencodebin_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS =               \
        gstencodebin.h          \
index f4b1611..111dfb1 100644 (file)
@@ -15,7 +15,7 @@ libgstgio_la_SOURCES = \
 libgstgio_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS)
 libgstgio_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS)
 libgstgio_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GIO_LDFLAGS)
-libgstgio_la_LIBTOOLFLAGS = --tag=disable-static
+libgstgio_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 # headers we need but don't want installed
 noinst_HEADERS = \
index 61c60b0..24e6b16 100644 (file)
@@ -23,7 +23,7 @@ libgstplayback_la_LIBADD = \
        $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_API_VERSION@.la \
        $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
        $(GST_LIBS)
-libgstplayback_la_LIBTOOLFLAGS = --tag=disable-static
+libgstplayback_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = \
        gstplayback.h \
index 4a33bd4..40c4be4 100644 (file)
@@ -22,7 +22,7 @@ libgstsubparse_la_SOURCES = \
 libgstsubparse_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
 libgstsubparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstsubparse_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
-libgstsubparse_la_LIBTOOLFLAGS = --tag=disable-static
+libgstsubparse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = \
        gstssaparse.h \
index 9117f4e..22973fa 100644 (file)
@@ -34,7 +34,7 @@ nodist_libgsttcp_la_SOURCES = \
 libgsttcp_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS)
 libgsttcp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgsttcp_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS)
-libgsttcp_la_LIBTOOLFLAGS = --tag=disable-static
+libgsttcp_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = \
   gsttcp.h \
index 4dfda7c..414b55d 100644 (file)
@@ -9,7 +9,7 @@ libgsttypefindfunctions_la_LIBADD = \
        $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_API_VERSION@.la \
        $(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS)
 
-libgsttypefindfunctions_la_LIBTOOLFLAGS = --tag=disable-static
+libgsttypefindfunctions_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 Android.mk: Makefile.am $(BUILT_SOURCES)
        androgenizer \
index b17b134..aed82d4 100644 (file)
@@ -16,7 +16,7 @@ libgstvideoconvert_la_LIBADD = \
        $(ORC_LIBS) \
        $(LIBM)
 libgstvideoconvert_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstvideoconvert_la_LIBTOOLFLAGS = --tag=disable-static
+libgstvideoconvert_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstvideoconvert.h videoconvert.h gstcms.h
 
index b275aba..d950ad9 100644 (file)
@@ -6,7 +6,7 @@ libgstvideorate_la_SOURCES = gstvideorate.c
 libgstvideorate_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
 libgstvideorate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstvideorate_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
-libgstvideorate_la_LIBTOOLFLAGS = --tag=disable-static
+libgstvideorate_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 Android.mk: Makefile.am $(BUILT_SOURCES)
        androgenizer \
index ecd3c9b..5d96422 100644 (file)
@@ -18,7 +18,7 @@ libgstvideoscale_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstvideoscale_la_LIBADD = \
        $(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la \
        $(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) $(LIBM)
-libgstvideoscale_la_LIBTOOLFLAGS = --tag=disable-static
+libgstvideoscale_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = \
        gstvideoscale.h \
index 5096b9b..52230f2 100644 (file)
@@ -13,7 +13,7 @@ libgstvideotestsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstvideotestsrc_la_LIBADD =         \
        $(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la \
        $(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) $(LIBM)
-libgstvideotestsrc_la_LIBTOOLFLAGS = --tag=disable-static
+libgstvideotestsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstvideotestsrc.h videotestsrc.h
 
index be5f736..bb83001 100644 (file)
@@ -12,7 +12,7 @@ libgstvolume_la_LIBADD = \
        $(GST_BASE_LIBS) \
        $(GST_LIBS) \
        $(ORC_LIBS)
-libgstvolume_la_LIBTOOLFLAGS = --tag=disable-static
+libgstvolume_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstvolume.h
 
index d7f2390..5d113f9 100644 (file)
@@ -8,6 +8,6 @@ libgstximagesink_la_LIBADD = \
        $(X_LIBS) $(XSHM_LIBS)
 libgstximagesink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstximagesink_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la
-libgstximagesink_la_LIBTOOLFLAGS = --tag=disable-static
+libgstximagesink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = ximagesink.h ximagepool.h
index 170b7b8..9dd9bef 100644 (file)
@@ -9,6 +9,6 @@ libgstxvimagesink_la_LIBADD = \
        $(X_LIBS) $(XVIDEO_LIBS) $(XSHM_LIBS) $(LIBM)
 libgstxvimagesink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstxvimagesink_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la
-libgstxvimagesink_la_LIBTOOLFLAGS = --tag=disable-static
+libgstxvimagesink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = xvimagesink.h xvimagepool.h