summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch')
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch b/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
new file mode 100644
index 0000000000..c96af12acf
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
@@ -0,0 +1,54 @@
1From 36829a8d7ad2888515fbee95c2a70b3d636d7538 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com>
3Date: Wed, 9 Jul 2014 14:30:33 +0200
4Subject: [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
11diff --git a/configure.ac b/configure.ac
12index 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--
532.0.0
54