libs: figure out right export define in configure
authorTim-Philipp Müller <tim@centricular.com>
Sat, 25 Aug 2018 21:56:01 +0000 (23:56 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 24 Sep 2018 07:39:37 +0000 (08:39 +0100)
commit57c8e0146f0e203058c95721527cf50a1dd19f72
tree8ba1a268f920dd3fd1e8cdb9d417e78fad6da917
parent46ed0f0489896824f45694b5d8fbdfaac8de6504
libs: figure out right export define in configure

Add new GST_API_EXPORT in config.h and use that for GST_*_API
decorators instead of GST_EXPORT.

The right export define depends on the toolchain and whether
we're using -fvisibility=hidden or not, so it's better to set it
to the right thing directly than hard-coding a compiler whitelist
in the public header.

We put the export define into config.h instead of passing it via the
command line to the compiler because it might contain spaces and brackets
and in the autotools scenario we'd have to pass that through multiple
layers of plumbing and Makefile/shell escaping and we're just not going
to be *that* lucky.

The export define is only used if we're compiling our lib, not by external
users of the lib headers, so it's not a problem to put it into config.h

Also, this means all .c files of libs need to include config.h
to get the export marker defined, so fix up a few that didn't
include config.h.

This commit depends on a common submodule commit that makes gst-glib-gen.mak
add an #include "config.h" to generated enum/marshal .c files for the
autotools build.

https://bugzilla.gnome.org/show_bug.cgi?id=797185
22 files changed:
common
configure.ac
gst/gstconfig.h.in
libs/gst/base/base-prelude.h
libs/gst/base/gstdataqueue.c
libs/gst/base/gstflowcombiner.c
libs/gst/base/gstqueuearray.c
libs/gst/check/check-prelude.h
libs/gst/check/gstbufferstraw.c
libs/gst/check/gstconsistencychecker.c
libs/gst/controller/controller-prelude.h
libs/gst/controller/gstargbcontrolbinding.c
libs/gst/controller/gstdirectcontrolbinding.c
libs/gst/controller/gstinterpolationcontrolsource.c
libs/gst/controller/gstlfocontrolsource.c
libs/gst/controller/gsttimedvaluecontrolsource.c
libs/gst/controller/gsttriggercontrolsource.c
libs/gst/controller/meson.build
libs/gst/net/gstnetaddressmeta.c
libs/gst/net/gstnetcontrolmessagemeta.c
libs/gst/net/net-prelude.h
meson.build