llvmpipe: fix warnings on both 32 and 64 bit builds
[mesa.git] / configure.ac
index a7ee0f5763c20500d2c7fa3d1fc45f3db821b555..bf8feb63528ad7ecdbb2da04c311efc31a9128d3 100644 (file)
@@ -155,6 +155,13 @@ fi
 if test "x$GXX" = xyes; then
     CXXFLAGS="$CXXFLAGS -Wall"
 
+    # Enable -fvisibility=hidden if using a gcc that supports it
+    save_CXXFLAGS="$CXXFLAGS"
+    AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
+    CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
+                  [CXXFLAGS="$save_CXXFLAGS" ; AC_MSG_RESULT([no])]);
+
     # Work around aliasing bugs - developers should comment this out
     CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
 fi