20778N/A@@ -878,6 +878,28 @@ int main (int argc, char **argv)
20778N/A ]])],g_have_gnuc_visibility=yes,g_have_gnuc_visibility=no)
13088N/A+# Check if the compiler supports __attribute((alias(...)) for variables
13088N/A+# Sun Studio 12 has gcc style visibility but does not support aliases
13088N/A+# for variables and breaks the build (Bug 528506)
13088N/A+if test "$g_have_gnuc_visibility" = yes ; then
13088N/A+AC_MSG_CHECKING(if the compiler supports aliases for variables)
13088N/A+extern __typeof (foo) foo_alias __attribute((visibility("hidden")));
13088N/A+const int * const foo_alias = &real_foo;
13088N/A+extern __typeof (foo) foo __attribute((alias("foo_alias"),
13088N/A+],g_have_gnuc_visibility=yes,g_have_gnuc_visibility=no)
13088N/A AC_MSG_RESULT($g_have_gnuc_visibility)
13088N/A AM_CONDITIONAL(HAVE_GNUC_VISIBILITY, [test x$g_have_gnuc_visibility = xyes])