check for HAVE_VISIBILITY first when setting WXIMPORT/WXEXPORT; only set it on platforms where it makes sense

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-08-13 18:36:14 +00:00
parent 8105182945
commit b9d4eff64f
3 changed files with 16 additions and 6 deletions

View File

@@ -43,7 +43,12 @@ AC_DEFUN([WX_VISIBILITY],
#if defined(__GNUC__) && __GNUC__ < 4
error this gcc is too old;
#endif
/* visibility only makes sense for ELF shared libs: */
#if !defined(__ELF__) && !defined(__APPLE__)
error this platform has no visibility;
#endif
extern __attribute__((__visibility__("hidden"))) int hiddenvar;
extern __attribute__((__visibility__("default"))) int exportedvar;
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);