From 5b42b3bb5fbf6af57a571b3717651188908b5c2b Mon Sep 17 00:00:00 2001 From: John Sadler Date: Fri, 4 Sep 2015 12:12:44 +0100 Subject: [PATCH 1/4] gl_renderer: allow GL Renderer to be disabled with --disable-gl-renderer 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. --- 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