]> git.saurik.com Git - wxWidgets.git/blobdiff - build/aclocal/visibility.m4
check for HAVE_VISIBILITY first when setting WXIMPORT/WXEXPORT; only set it on platfo...
[wxWidgets.git] / build / aclocal / visibility.m4
index 0f02567b9c8c4b61bc3143a969364312af937840..9ee33576dcceb16774aa9576e7928e1f672b0329 100644 (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);