Check whether gcc supports --enable-hidden-symbols before allowing it.

This commit is contained in:
Dan Fandrich 2006-06-13 17:43:00 +00:00
parent 59582a9d9d
commit f13ac35edf
1 changed files with 14 additions and 4 deletions

View File

@ -1967,10 +1967,20 @@ AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibi
no)
AC_MSG_RESULT(no)
;;
*) AC_MSG_RESULT(yes)
AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
AC_SUBST(CURL_HIDDEN_SYMBOLS)
CFLAGS="$CFLAGS -fvisibility=hidden"
*)
if test "$GCC" = yes ; then
AC_MSG_CHECKING([whether $CC supports it])
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
AC_MSG_RESULT(yes)
AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
AC_SUBST(CURL_HIDDEN_SYMBOLS)
CFLAGS="$CFLAGS -fvisibility=hidden"
else
AC_MSG_RESULT(no)
fi
else
AC_MSG_RESULT([no (not gcc)])
fi
;;
esac ],
AC_MSG_RESULT(no)