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@gmail.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
Jon TURNEY
2011-04-26 11:49:01 +01:00
parent de33b0dd23
commit 560f76227c
+2
View 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