1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
This patches makes opengl an optional component.
Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
Index: mesa3d-demos-8.1.0/configure.ac
===================================================================
--- mesa3d-demos-8.1.0.orig/configure.ac
+++ mesa3d-demos-8.1.0/configure.ac
@@ -51,6 +51,14 @@ m4_ifndef([PKG_PROG_PKG_CONFIG],
ACLOCAL="aclocal -I/other/macro/dir" before running autoreconf.])])
PKG_PROG_PKG_CONFIG()
+AC_ARG_ENABLE([gl],
+ [AS_HELP_STRING([--enable-gl],
+ [enable GL library @<:@default=no@:>@])],
+ [gl_enabled="$enableval"],
+ [gl_enabled=auto])
+
+if test "x$gl_enabled" != "xno"; then
+
dnl Get the pkg-config definitions for libGL. We include a fallback
dnl path for GL implementation that don't provide a .pc file
PKG_CHECK_MODULES(GL, [gl], [], [
@@ -103,6 +111,8 @@ PKG_CHECK_MODULES(GLU, [glu], [],
DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
+fi
+
AC_ARG_ENABLE([egl],
[AS_HELP_STRING([--enable-egl],
[enable EGL library @<:@default=no@:>@])],
@@ -287,7 +297,7 @@ AC_SUBST([MESA_GLAPI])
AC_SUBST([WAYLAND_CFLAGS])
AC_SUBST([WAYLAND_LIBS])
-
+AM_CONDITIONAL(HAVE_GL, test "x$gl_enabled" = "xyes")
AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
Index: mesa3d-demos-8.1.0/src/egl/opengl/Makefile.am
===================================================================
--- mesa3d-demos-8.1.0.orig/src/egl/opengl/Makefile.am
+++ mesa3d-demos-8.1.0/src/egl/opengl/Makefile.am
@@ -50,6 +50,7 @@ endif
endif
if HAVE_EGL
+if HAVE_GL
noinst_PROGRAMS = \
demo1 \
demo2 \
@@ -61,6 +62,7 @@ noinst_PROGRAMS = \
$(EGL_DRM_DEMOS) \
$(EGL_X11_DEMOS)
endif
+endif
egltri_screen_SOURCES = egltri.c
eglgears_screen_SOURCES = eglgears.c
Index: mesa3d-demos-8.1.0/src/util/Makefile.am
===================================================================
--- mesa3d-demos-8.1.0.orig/src/util/Makefile.am
+++ mesa3d-demos-8.1.0/src/util/Makefile.am
@@ -27,7 +27,9 @@ AM_CFLAGS = \
AM_LDFLAGS = \
$(DEMO_LIBS)
+if HAVE_GL
noinst_LTLIBRARIES = libutil.la
+endif
if HAVE_GLUT
AM_CFLAGS += \
|