]> code.ossystems Code Review - openembedded-core.git/blob
c96af12acf9c73b728b2062628b56228615c50e2
[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 ---
8  configure.ac | 26 +++++++++++++++-----------
9  1 file changed, 15 insertions(+), 11 deletions(-)
10
11 diff --git a/configure.ac b/configure.ac
12 index c4ee12b..9445424 100644
13 --- a/configure.ac
14 +++ b/configure.ac
15 @@ -67,21 +67,25 @@ DEMO_CFLAGS="$DEMO_CFLAGS $GL_CFLAGS"
16  DEMO_LIBS="$DEMO_LIBS $GL_LIBS"
17  
18  dnl Check for GLUT
19 -GLUT_CFLAGS=""
20 -GLUT_LIBS=-lglut
21 -glut_enabled=yes
22 +glut_enabled=no
23  AC_ARG_WITH([glut],
24         [AS_HELP_STRING([--with-glut=DIR],
25                         [glut install directory])],
26         [GLUT_CFLAGS="-I$withval/include"
27 -        GLUT_LIBS="-L$withval/lib -lglut"])
28 -AC_CHECK_HEADER([GL/glut.h],
29 -               [],
30 -               [glut_enabled=no])
31 -AC_CHECK_LIB([glut],
32 -               [glutInit],
33 -               [],
34 -               [glut_enabled=no])
35 +        GLUT_LIBS="-L$withval/lib -lglut"],
36 +       [GLUT_CFLAGS=""
37 +        GLUT_LIBS="-lglut"]
38 +        )
39 +AS_IF([test "x$with_glut" != xno],
40 +      [AC_CHECK_HEADER([GL/glut.h],
41 +                       [],
42 +                       [glut_enabled=no])
43 +       AC_CHECK_LIB([glut],
44 +                    [glutInit],
45 +                    [],
46 +                    [glut_enabled=no])
47 +       glut_enabled=yes
48 +])
49  
50  dnl Check for FreeGLUT 2.6 or later
51  AC_EGREP_HEADER([glutInitContextProfile],
52 -- 
53 2.0.0
54