[PATCH weston 1/4] gl_renderer: allow GL Renderer to be disabled with --disable-gl-renderer

John Sadler deathofathousandpapercuts at gmail.com
Sat Sep 5 07:01:37 PDT 2015


Commit a352580285 introduced a dependency on `libdrm` whenever
EGL support is enabled. However, when building for Raspberry Pi
with EGL enabled this is an unwelcome dependency, and we don't
need the GL Renderer anyway.

This commit introduces a separate configure option:
    --disable-gl-renderer

Which allows building of the GL Renderer to be disabled, and
the `libdrm` dependency along with it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91884

Signed-off-by: John Sadler <deathofathousandpapercuts at gmail.com>
---
 Makefile.am  | 2 +-
 configure.ac | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 62719c9..9968b7f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -198,7 +198,7 @@ westoninclude_HEADERS =				\
 	shared/zalloc.h				\
 	shared/platform.h
 
-if ENABLE_EGL
+if ENABLE_GL_RENDERER
 module_LTLIBRARIES += gl-renderer.la
 gl_renderer_la_LDFLAGS = -module -avoid-version
 gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
diff --git a/configure.ac b/configure.ac
index 17a3754..f832ada 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,13 +80,22 @@ if test "x$enable_devdocs" != "xno"; then
 fi
 AM_CONDITIONAL(ENABLE_DEVDOCS, test "x$enable_devdocs" = "xyes")
 
+AC_ARG_ENABLE(gl-renderer, [  --disable-gl-renderer],,
+              enable_gl_renderer=yes)
+
 AC_ARG_ENABLE(egl, [  --disable-egl],,
               enable_egl=yes)
+
 AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes)
 if test x$enable_egl = xyes; then
 	AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support])
 	PKG_CHECK_MODULES(EGL, [egl >= 7.10 glesv2])
         PKG_CHECK_MODULES([EGL_TESTS], [egl >= 7.10 glesv2 wayland-client wayland-egl])
+fi
+
+AM_CONDITIONAL(ENABLE_GL_RENDERER, test x$enable_gl_renderer = xyes -a x$enable_egl = xyes)
+if test x$enable_gl_renderer = xyes -a x$enable_egl = xyes; then
+	AC_DEFINE([ENABLE_GL_RENDERER], [1], [Build GL Renderer])
 	PKG_CHECK_MODULES([GL_RENDERER], [libdrm])
 fi
 
-- 
1.8.1.4



More information about the wayland-devel mailing list