Mesa (master): Fix config check that claims to test if CXX supports -fvisibility= hidden option to actually test the C++ compiler.

Jon TURNEY jturney at kemper.freedesktop.org
Tue Jun 28 16:16:26 UTC 2011


Module: Mesa
Branch: master
Commit: 560f76227ccc848390095414e93d199e588b0c92
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=560f76227ccc848390095414e93d199e588b0c92

Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Tue Apr 26 11:49:01 2011 +0100

Fix config check that claims to test if CXX supports -fvisibility=hidden option to actually test the C++ compiler.

Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
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 0346a8a..74357a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,8 +177,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




More information about the mesa-commit mailing list