gst: Add better support for static plugins

This commit is contained in:
Sebastian Dröge 2012-10-24 12:10:44 +02:00
parent 1813701ef2
commit d2d79e3bc2
28 changed files with 51 additions and 29 deletions

View 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 ***

View 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 \

View 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

View 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

View 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)

View 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)

View 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)

View 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 \

View 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 = \

View 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

View 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 \

View 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 \

View 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 \

View 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 \

View 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

View 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 \

View 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 = \

View 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 \

View 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 \

View 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 \

View 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 \

View 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

View 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 \

View 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 \

View 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

View 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

View 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

View 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