summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-10-24 12:17:28 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-04-15 16:00:40 +0200
commitf77be1085ea686225899f4ce7df5f8d1f4c22c7a (patch)
tree4f4db8089edf628dfd7ff2dc8a52bcdb3dcaab41
parent5de68e0b647be9d89fa1bfe42366718018e157b6 (diff)
gst: Add better support for static plugins
-rw-r--r--configure.ac24
-rw-r--r--gnl/Makefile.am2
2 files changed, 24 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index a76a8ee..92e7288 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,6 +134,28 @@ AC_SUBST(GST_LICENSE)
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($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes
-Wredundant-decls -Wundef -Wwrite-strings -Wformat-nonliteral
@@ -188,7 +210,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 ***
diff --git a/gnl/Makefile.am b/gnl/Makefile.am
index 7f8bc35..0c4876e 100644
--- a/gnl/Makefile.am
+++ b/gnl/Makefile.am
@@ -11,7 +11,7 @@ libgnl_la_SOURCES = \
libgnl_la_CFLAGS = $(GST_CFLAGS)
libgnl_la_LIBADD = $(GST_LIBS)
libgnl_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgnl_la_LIBTOOLFLAGS = --tag=disable-static
+libgnl_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
gnl_headers = \
gnl.h \