[Mesa-dev] [PATCH demos] configure.ac: Fix default behavior of AC_ARG_WITH(glut) if glut isn't available

Andreas Boll andreas.boll.dev at gmail.com
Wed Jan 13 03:09:58 PST 2016


ping

2015-12-10 16:32 GMT+01:00 Andreas Boll <andreas.boll.dev at gmail.com>:
> Fixes a regression introduced in
> 406248811eb0dfabf75ae9495b54529ec59cce66
>
> It wrongly sets glut_enabled=yes if glut isn't available and neither
> option --with-glut nor --without-glut was given.
>
> The default behavior in that case should be if glut is available then
> enable glut else it should disable glut.
>
> To fix this the default value of glut_enabled is set back to yes and in
> case --without-glut was given glut_enabled is set to no.
>
> Cc: Ross Burton <ross.burton at intel.com>
> Signed-off-by: Andreas Boll <andreas.boll.dev at gmail.com>
> ---
>  configure.ac | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 0525b09..ddc68b5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -67,7 +67,7 @@ DEMO_CFLAGS="$DEMO_CFLAGS $GL_CFLAGS"
>  DEMO_LIBS="$DEMO_LIBS $GL_LIBS"
>
>  dnl Check for GLUT
> -glut_enabled=no
> +glut_enabled=yes
>  AC_ARG_WITH([glut],
>         [AS_HELP_STRING([--with-glut=DIR],
>                         [glut install directory])],
> @@ -83,9 +83,8 @@ AS_IF([test "x$with_glut" != xno],
>         AC_CHECK_LIB([glut],
>                      [glutInit],
>                      [],
> -                    [glut_enabled=no])
> -       glut_enabled=yes
> -])
> +                    [glut_enabled=no])],
> +      [glut_enabled=no])
>
>  dnl Check for FreeGLUT 2.6 or later
>  AC_EGREP_HEADER([glutInitContextProfile],
> --
> 2.1.4
>


More information about the mesa-dev mailing list