[Mesa-dev] [PATCH 1/2] Fix config check that claims to test if CXX supports -fvisibility=hidden option to actually test the C++ compiler.

Jon TURNEY jon.turney at dronecode.org.uk
Tue Apr 26 05:00:57 PDT 2011


Looking at this bit of autofoolery, I notice that at the moment it is just
checking if CC supports -fvisibility=hidden twice

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 configure.ac |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3b05ca3..37ea5e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,8 +170,10 @@ if test "x$GXX" = xyes; then
     AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
     VISIBILITY_CXXFLAGS="-fvisibility=hidden"
     CXXFLAGS="$CXXFLAGS $VISIBILITY_CXXFLAGS"
+    AC_LANG_PUSH([C++])
     AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
 		   [VISIBILITY_CXXFLAGS="" ; AC_MSG_RESULT([no])]);
+    AC_LANG_POP([C++])
 
     # Restore CXXFLAGS; VISIBILITY_CXXFLAGS are added to it where needed.
     CXXFLAGS=$save_CXXFLAGS
-- 
1.7.4



More information about the mesa-dev mailing list