diff configure.in @ 569:d02c00ce16d9 stable-1.0

Clean up symbol visibility in the stable-1.0 branch.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 05 Jan 2010 15:03:43 -0500
parents cbb8f13ca516
children
line wrap: on
line diff
--- a/configure.in	Tue Jan 27 14:09:55 2009 -0500
+++ b/configure.in	Tue Jan 05 15:03:43 2010 -0500
@@ -58,6 +58,30 @@
 
 
 dnl ---------------------------------------------------------------------
+dnl Have GCC's -fvisibility option?
+dnl ---------------------------------------------------------------------
+AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
+have_gcc_fvisibility=no
+visibility_CFLAGS="-fvisibility=hidden"
+save_CFLAGS="$CFLAGS"
+CFLAGS="$save_CFLAGS $visibility_CFLAGS"
+AC_TRY_COMPILE([
+#if !defined(__GNUC__) || __GNUC__ < 4
+#error SDL only uses visibility attributes in GCC 4 or newer
+#endif
+],[
+],[
+have_gcc_fvisibility=yes
+])
+AC_MSG_RESULT($have_gcc_fvisibility)
+CFLAGS="$save_CFLAGS"
+
+if test x$have_gcc_fvisibility = xyes; then
+    CFLAGS="$CFLAGS $visibility_CFLAGS"
+fi
+
+
+dnl ---------------------------------------------------------------------
 dnl Debug mode?
 dnl ---------------------------------------------------------------------