[virglrenderer-devel] [PATCH] Make EGL optional at configure time.
Joe M. Kniss
djmk at chromium.org
Fri Nov 10 00:08:09 UTC 2017
Make EGL optional since it's use in virglrenderer isn't always
compatible with drivers on linux, for example nVidia does not
provide a GBM implementation (used by virgl_egl*) with their
linux drivers.
Signed-off-by: Joe M. Kniss <djmk at google.com>
---
configure.ac | 12 +++++++++---
src/Makefile.am | 2 +-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5ffd448..27a9a63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,16 +89,21 @@ if test "x$build_tests" = "xyes"; then
fi
AC_CHECK_FUNCS_ONCE([eventfd])
-AC_CHECK_HEADERS_ONCE([sys/uio.h epoxy/egl.h])
+AC_CHECK_HEADERS_ONCE([sys/uio.h])
AM_CONDITIONAL(HAVE_VALGRIND, [test "x$VALGRIND" != "x"])
AM_CONDITIONAL(BUILD_TESTS, [test "x$build_tests" = "xyes"])
LIBDRM_REQUIRED=2.4.50
+AC_ARG_ENABLE([egl], AS_HELP_STRING([--disable-egl], [Disable EGL]))
if test "x$os_win32" = xno; then
- PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
- PKG_CHECK_MODULES([GBM], [gbm])
+ AS_IF([test "x$enable_egl" != "xno"], [
+ AC_CHECK_HEADER([epoxy/egl.h])
+ PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
+ PKG_CHECK_MODULES([GBM], [gbm])
+ ])
fi
+AM_CONDITIONAL([WITH_EGL], [test "x$enable_egl" != "xno" && "x$os_wind32" = "xno"])
PKG_CHECK_MODULES([EPOXY], [epoxy])
@@ -129,6 +134,7 @@ AC_MSG_NOTICE([
c compiler: $CC
win32: $os_win32
+ egl: $enable_egl
glx: $with_glx
debug: $enable_debug
tests: $build_tests
diff --git a/src/Makefile.am b/src/Makefile.am
index 3ec8358..3ae08e4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,7 +33,7 @@ libvrend_la_SOURCES = \
vrend_blitter.h \
iov.c
-if !OS_WIN32
+if WITH_EGL
libvrend_la_SOURCES += \
virgl_egl.h \
virgl_egl_context.c
--
2.15.0.448.gf294e3d99a-goog
More information about the virglrenderer-devel
mailing list