Fix config check that claims to test if CXX supports -fvisibility=hidden option to...
authorJon TURNEY <jon.turney@dronecode.org.uk>
Tue, 26 Apr 2011 10:49:01 +0000 (11:49 +0100)
committerJon TURNEY <jon.turney@dronecode.org.uk>
Tue, 28 Jun 2011 16:06:59 +0000 (17:06 +0100)
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
configure.ac

index 0346a8ade676722fe081228dfe66ad3a6c22f39a..74357a2e24c9d7e63688865edb3afd28dbddd6bd 100644 (file)
@@ -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