summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2011-11-03 10:41:59 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2011-11-03 10:48:10 +0100
commit824a28b40129a1f5467fa87f0442d1d6c118965a (patch)
tree4047968da31c78e44b82cd6d626bd696bd329fa3
parent530a3e34232cd96f5db0d9626cd2a41ee9c58e29 (diff)
configure: add check for EGL.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
-rw-r--r--configure.ac22
1 files changed, 19 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 9e2cedf..2b5661b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,6 +121,11 @@ AC_ARG_ENABLE(glx,
[build with GLX support @<:@default=yes@:>@])],
[], [enable_glx="yes"])
+AC_ARG_ENABLE(egl,
+ [AC_HELP_STRING([--enable-egl],
+ [build with EGL support @<:@default=yes@:>@])],
+ [], [enable_egl="yes"])
+
AC_ARG_ENABLE(dummy-driver,
[AC_HELP_STRING([--enable-dummy-driver],
[build dummy video driver @<:@default=yes@:>@])],
@@ -171,7 +176,7 @@ if test x$libudev = xno; then
fi
AM_CONDITIONAL(BUILD_DUMMY_BACKEND, test x$enable_dummy_backend = xyes)
-# Check for OpenGL (X11)
+# Check for GLX
USE_GLX="no"
GL_DEPS_CFLAGS=""
GL_DEPS_LIBS=""
@@ -187,8 +192,19 @@ AC_SUBST(GL_DEPS_CFLAGS)
AC_SUBST(GL_DEPS_LIBS)
AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes")
-# TBD: Check for EGL
-USE_EGL="yes"
+# Check for EGL
+USE_EGL="no"
+EGL_DEPS_CFLAGS=""
+EGL_DEPS_LIBS=""
+if test "$enable_egl" = "yes"; then
+ AC_CHECK_HEADERS([EGL/egl.h])
+ AC_CHECK_LIB(EGL, eglGetDisplay, [
+ USE_EGL="yes"
+ EGL_DEPS_LIBS="-lEGL"
+ ])
+fi
+AC_SUBST(EGL_DEPS_CFLAGS)
+AC_SUBST(EGL_DEPS_LIBS)
AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes")
# We only need the headers, we don't link against the DRM libraries