2018-02-24 12:12:14 +01:00
|
|
|
From bb0ffae7164d296d32da24fa5499534de259169a Mon Sep 17 00:00:00 2001
|
|
|
|
From: Spenser Gilliland <spenser@gillilanding.com>
|
|
|
|
Date: Sat, 24 Feb 2018 11:36:17 +0100
|
|
|
|
Subject: [PATCH] demos: makes opengl an optional component
|
2014-10-17 22:07:08 +02:00
|
|
|
|
|
|
|
Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
|
2018-02-24 12:12:14 +01:00
|
|
|
[Romain: convert to git patch, rebase on 8.4.0]
|
|
|
|
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
2014-10-17 22:07:08 +02:00
|
|
|
---
|
2018-02-24 12:12:14 +01:00
|
|
|
configure.ac | 12 +++++++++++-
|
|
|
|
src/egl/opengl/Makefile.am | 2 ++
|
|
|
|
src/util/Makefile.am | 2 ++
|
|
|
|
3 files changed, 15 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
|
|
index 0b5e9a76..24298c44 100644
|
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
|
|
|
@@ -51,6 +51,14 @@ m4_ifndef([PKG_PROG_PKG_CONFIG],
|
2014-10-17 22:07:08 +02:00
|
|
|
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], [], [
|
2018-02-24 12:12:14 +01:00
|
|
|
@@ -112,6 +120,8 @@ PKG_CHECK_MODULES(GLU, [glu], [],
|
2014-10-17 22:07:08 +02:00
|
|
|
DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
|
|
|
|
DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
|
|
|
|
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
AC_ARG_ENABLE([egl],
|
|
|
|
[AS_HELP_STRING([--enable-egl],
|
2015-12-12 19:31:36 +01:00
|
|
|
[enable EGL library @<:@default=auto@:>@])],
|
2018-02-24 12:12:14 +01:00
|
|
|
@@ -302,7 +312,7 @@ AC_SUBST([MESA_GLAPI])
|
2014-10-17 22:07:08 +02:00
|
|
|
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")
|
2018-02-24 12:12:14 +01:00
|
|
|
diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am
|
|
|
|
index 6d184ff6..219ab850 100644
|
|
|
|
--- a/src/egl/opengl/Makefile.am
|
|
|
|
+++ b/src/egl/opengl/Makefile.am
|
|
|
|
@@ -56,6 +56,7 @@ endif
|
2014-10-17 22:07:08 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
if HAVE_EGL
|
|
|
|
+if HAVE_GL
|
2018-02-24 12:12:14 +01:00
|
|
|
bin_PROGRAMS = \
|
|
|
|
eglinfo
|
2014-10-17 22:07:08 +02:00
|
|
|
noinst_PROGRAMS = \
|
2018-02-24 12:12:14 +01:00
|
|
|
@@ -64,6 +65,7 @@ noinst_PROGRAMS = \
|
|
|
|
$(EGL_X11_DEMOS) \
|
|
|
|
$(EGL_WL_DEMOS)
|
2014-10-17 22:07:08 +02:00
|
|
|
endif
|
|
|
|
+endif
|
|
|
|
|
2015-12-12 19:31:36 +01:00
|
|
|
egltri_x11_SOURCES = egltri.c
|
|
|
|
eglgears_x11_SOURCES = eglgears.c
|
2018-02-24 12:12:14 +01:00
|
|
|
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
|
|
|
|
index 759a293a..012b9c75 100644
|
|
|
|
--- a/src/util/Makefile.am
|
|
|
|
+++ b/src/util/Makefile.am
|
2014-10-17 22:07:08 +02:00
|
|
|
@@ -27,7 +27,9 @@ AM_CFLAGS = \
|
|
|
|
AM_LDFLAGS = \
|
|
|
|
$(DEMO_LIBS)
|
|
|
|
|
|
|
|
+if HAVE_GL
|
|
|
|
noinst_LTLIBRARIES = libutil.la
|
|
|
|
+endif
|
|
|
|
|
|
|
|
if HAVE_GLUT
|
|
|
|
AM_CFLAGS += \
|
2018-02-24 12:12:14 +01:00
|
|
|
--
|
|
|
|
2.14.3
|
|
|
|
|