summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-06-24 02:02:20 +0530
committerTim-Philipp Müller <tim@centricular.com>2016-06-24 01:14:50 +0100
commitfc4f171f0fdfbbd164137dfd0ed687809fafa757 (patch)
tree87b6d1553248503ee6bf23b221a41e61e16b229d /configure.ac
parent51918ebacbee8ec9d9a20c32b246f5737b79b4b9 (diff)
configure: Need to add -DGST_STATIC_COMPILATION when building only statically
https://bugzilla.gnome.org/show_bug.cgi?id=767463
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index bdd96b0..f79c974 100644
--- a/configure.ac
+++ b/configure.ac
@@ -268,7 +268,7 @@ AC_SUBST(GST_OPTION_CFLAGS)
dnl FIXME: do we want to rename to GST_ALL_* ?
dnl prefer internal headers to already installed ones
dnl add GST_OPTION_CFLAGS, but overridable
-GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS)"
+GST_CFLAGS="$GST_CFLAGS \$(GST_STATIC_CFLAGS) \$(GST_OPTION_CFLAGS)"
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_LIBS)
@@ -330,6 +330,13 @@ fi
AC_SUBST(GST_PLUGIN_LIBTOOLFLAGS)
AM_CONDITIONAL(GST_PLUGIN_BUILD_STATIC, test "x$enable_static_plugins" = "xyes")
+dnl If only building static libraries, define GST_STATIC_COMPILATION. This is
+dnl needed only on Windows, but it doesn't hurt to have it everywhere.
+if test x$enable_static = xyes -a x$enable_shared = xno; then
+ GST_STATIC_CFLAGS="-DGST_STATIC_COMPILATION"
+fi
+AC_SUBST(GST_STATIC_CFLAGS)
+
GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_.*' $GST_ALL_LDFLAGS"
AC_SUBST(GST_PLUGIN_LDFLAGS)