]> code.ossystems Code Review - openembedded-core.git/blob
09054cb7560f011188dfa7a8f59d98a6945a5932
[openembedded-core.git] /
1 From 36829a8d7ad2888515fbee95c2a70b3d636d7538 Mon Sep 17 00:00:00 2001
2 From: Ross Burton <ross.burton@intel.com>
3 Date: Wed, 9 Jul 2014 14:30:33 +0200
4 Subject: [PATCH 2/9] Correctly implement with AC_WITH(glut) so that
5  --without-glut works.
6
7 Signed-off-by: Ross Burton <ross.burton@intel.com>
8 Upstream-Status: Submitted (https://patchwork.freedesktop.org/patch/64417/)
9
10 ---
11  configure.ac | 26 +++++++++++++++-----------
12  1 file changed, 15 insertions(+), 11 deletions(-)
13
14 diff --git a/configure.ac b/configure.ac
15 index c4ee12b..9445424 100644
16 --- a/configure.ac
17 +++ b/configure.ac
18 @@ -67,21 +67,25 @@ DEMO_CFLAGS="$DEMO_CFLAGS $GL_CFLAGS"
19  DEMO_LIBS="$DEMO_LIBS $GL_LIBS"
20  
21  dnl Check for GLUT
22 -GLUT_CFLAGS=""
23 -GLUT_LIBS=-lglut
24 -glut_enabled=yes
25 +glut_enabled=no
26  AC_ARG_WITH([glut],
27         [AS_HELP_STRING([--with-glut=DIR],
28                         [glut install directory])],
29         [GLUT_CFLAGS="-I$withval/include"
30 -        GLUT_LIBS="-L$withval/lib -lglut"])
31 -AC_CHECK_HEADER([GL/glut.h],
32 -               [],
33 -               [glut_enabled=no])
34 -AC_CHECK_LIB([glut],
35 -               [glutInit],
36 -               [],
37 -               [glut_enabled=no])
38 +        GLUT_LIBS="-L$withval/lib -lglut"],
39 +       [GLUT_CFLAGS=""
40 +        GLUT_LIBS="-lglut"]
41 +        )
42 +AS_IF([test "x$with_glut" != xno],
43 +      [AC_CHECK_HEADER([GL/glut.h],
44 +                       [],
45 +                       [glut_enabled=no])
46 +       AC_CHECK_LIB([glut],
47 +                    [glutInit],
48 +                    [],
49 +                    [glut_enabled=no])
50 +       glut_enabled=yes
51 +])
52  
53  dnl Check for FreeGLUT 2.6 or later
54  AC_EGREP_HEADER([glutInitContextProfile],
55 -- 
56 2.0.0
57