12346
|
1 |
--- glib-2.16.3/configure.in.orig 2008-05-21 17:11:07.349378569 +0100
|
|
2 |
+++ glib-2.16.3/configure.in 2008-05-21 17:14:23.829557880 +0100
|
|
3 |
@@ -815,6 +815,28 @@
|
|
4 |
return 0;
|
|
5 |
}
|
|
6 |
],g_have_gnuc_visibility=yes,g_have_gnuc_visibility=no)
|
|
7 |
+# Check if the compiler supports __attribute((alias(...)) for variables
|
|
8 |
+# Sun Studio 12 has gcc style visibility but does not support aliases
|
|
9 |
+# for variables and breaks the build (Bug 528506)
|
|
10 |
+if test "$g_have_gnuc_visibility" = yes ; then
|
|
11 |
+AC_MSG_CHECKING(if the compiler supports aliases for variables)
|
|
12 |
+GLIB_CHECK_COMPILE_WARNINGS([
|
|
13 |
+extern const int * const foo;
|
|
14 |
+
|
|
15 |
+static int real_foo;
|
|
16 |
+
|
|
17 |
+extern __typeof (foo) foo_alias __attribute((visibility("hidden")));
|
|
18 |
+
|
|
19 |
+const int * const foo_alias = &real_foo;
|
|
20 |
+
|
|
21 |
+extern __typeof (foo) foo __attribute((alias("foo_alias"),
|
|
22 |
+visibility("default")));
|
|
23 |
+
|
|
24 |
+int main () {
|
|
25 |
+ int i = *foo;
|
|
26 |
+}
|
|
27 |
+],g_have_gnuc_visibility=yes,g_have_gnuc_visibility=no)
|
|
28 |
+fi
|
|
29 |
AC_MSG_RESULT($g_have_gnuc_visibility)
|
|
30 |
AM_CONDITIONAL(HAVE_GNUC_VISIBILITY, [test x$g_have_gnuc_visibility = xyes])
|
|
31 |
|