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