diff --git a/configure.ac b/configure.ac index 702bed0..c71bec0 100644 --- a/configure.ac +++ b/configure.ac @@ -123,6 +123,21 @@ if test "x$have_gcc4" = "xyes"; then fi AC_MSG_RESULT($have_gcc4) +have_sunstudio8=no +AC_MSG_CHECKING(for -fvisibility) +AC_COMPILE_IFELSE([ +#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) +#else +#error Need Sun Studio 8 for visibility +#endif +int main () { return 0; } +], have_sunstudio8=yes) + +if test "x$have_sunstudio8" = "xyes"; then + CFLAGS="$CFLAGS -xldscope=hidden" +fi +AC_MSG_RESULT($have_sunstudio8) + dnl =========================================================================== dnl Check for MMX diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h index a27d2a8..e26a0c3 100644 --- a/pixman/pixman-private.h +++ b/pixman/pixman-private.h @@ -729,6 +729,9 @@ pixman_compute_composite_region32 (pixman_region32_t * pRegion, /* GCC visibility */ #if defined(__GNUC__) && __GNUC__ >= 4 #define PIXMAN_EXPORT __attribute__ ((visibility("default"))) +/* Sun Studio 8 visibility */ +#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) +#define PIXMAN_EXPORT __global #else #define PIXMAN_EXPORT #endif