summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-10-24 12:18:56 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-04-15 16:00:02 +0200
commit1caa7d6161bf7768506c7fffd96580a793edc052 (patch)
tree019b68ebd9d35264a4236c652aa0d81a9dc32a7d
parent710c92d83063d5bfb02f9dc13c060790ccafb81d (diff)
gst: Add better support for static plugins
-rw-r--r--configure.ac24
-rw-r--r--ext/libav/Makefile.am2
-rw-r--r--ext/libswscale/Makefile.am2
3 files changed, 25 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 2fe3f84..195aaa2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,6 +132,28 @@ dnl *** set variables based on configure arguments ***
dnl set location of plugin directory
AG_GST_SET_PLUGINDIR
+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 -Wundef
@@ -184,7 +206,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 Add MacOSX specific flags
diff --git a/ext/libav/Makefile.am b/ext/libav/Makefile.am
index c721a4f..65a6f0d 100644
--- a/ext/libav/Makefile.am
+++ b/ext/libav/Makefile.am
@@ -29,7 +29,7 @@ libgstlibav_la_LIBADD = $(LIBAV_LIBS) $(GST_PLUGINS_BASE_LIBS) \
-lgstpbutils-$(GST_API_VERSION) $(GST_BASE_LIBS) \
$(LIBM) $(WIN32_LIBS) -lz $(BZ2_LIBS)
libgstlibav_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
-libgstlibav_la_LIBTOOLFLAGS = --tag=disable-static
+libgstlibav_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
if HAVE_LIBAV_UNINSTALLED
libgstlibav_la_DEPENDENCIES = $(LIBAV_LIBS)
diff --git a/ext/libswscale/Makefile.am b/ext/libswscale/Makefile.am
index 32ad6c6..b252c09 100644
--- a/ext/libswscale/Makefile.am
+++ b/ext/libswscale/Makefile.am
@@ -8,7 +8,7 @@ libgstavscale_la_LIBADD = $(SWSCALE_LIBS) \
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
$(GST_BASE_LIBS) $(ORC_LIBS) $(LIBM) -lz
libgstavscale_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
-libgstavscale_la_LIBTOOLFLAGS = --tag=disable-static
+libgstavscale_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
if HAVE_LIBAV_UNINSTALLED
libgstavscale_la_DEPENDENCIES = $(SWSCALE_LIBS)