configure.ac: change our visibility policy
authorRyan Lortie <desrt@desrt.ca>
Thu, 6 Dec 2012 18:42:06 +0000 (13:42 -0500)
committerRyan Lortie <desrt@desrt.ca>
Mon, 14 Jan 2013 03:59:40 +0000 (22:59 -0500)
commit2e7669f5cc46927602108c328fbbeb846bd09218
tree1ce6bca7c4cbc5c915f8121759cdaaa982e3c503
parentf13d3c075fce46a361ea98fb0c487aa21d4d1673
configure.ac: change our visibility policy

Check for -fvisibility=hidden as a supported CFLAG.

If it is supported, use it and emit an AC_DEFINE to change the meaning
of _GLIB_EXTERN to include the GNU attribute for marking symbols as
public: __attribute((visibility("default"))).

This will override the public definition of _GLIB_EXTERN for any file
which does #include "config.h" (forcing all our .c files to do so, as a
side effect).

If we're on mingw, assume that -fvisibility will work and also throw in
a __declspec(dllexport) for good measure.  This will allow us to move
away from using a .def file to create the the various DLLs.

It's possible that there may be compilers that accept
-fvisibility=hidden but don't accept the GNU attribute for making
symbols public again -- we will hopefully receive bugs if any of those
exist.

https://bugzilla.gnome.org/show_bug.cgi?id=688681
configure.ac