+ AC_MSG_CHECKING([whether we can work around it])
+ AC_CACHE_VAL(wx_cv_cc_visibility_workaround, [
+ AC_LANG_PUSH(C++)
+ AC_TRY_LINK(
+ [
+ #pragma GCC visibility push(default)
+ #include <string>
+ #pragma GCC visibility pop
+ ],
+ [
+ std::string s("hello");
+ return s.length();
+ ],
+ wx_cv_cc_visibility_workaround=no,
+ wx_cv_cc_visibility_workaround=yes)
+ AC_LANG_POP()
+ ])
+ AC_MSG_RESULT([$wx_cv_cc_visibility_workaround])
+
+ if test $wx_cv_cc_visibility_workaround = no; then
+ dnl we can't use visibility at all then
+ wx_cv_cc_visibility=no
+ fi