On Tue, Apr 26, 2011 at 5:00 AM, Jon TURNEY <jon.tur...@dronecode.org.uk> wrote:
> 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.tur...@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

I'm not super familiar with how AC_LANG_PROGRAM works, but this seems
right as it should use whatever AC_LANG is.

http://www.gnu.org/software/autoconf/manual/autoconf.html#Language-Choice
http://www.gnu.org/software/autoconf/manual/autoconf.html#Writing-Test-Programs

--
Dan
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to