summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorBenjamin Franzke <[email protected]>2011-08-09 14:23:18 +0200
committerBenjamin Franzke <[email protected]>2011-08-15 09:42:16 +0200
commit85fe9484945cb57ffd49df248b0e5057eba6af04 (patch)
treec41d0a8191d087b1b3c1d0d274929fb7f8b376a5 /configure.ac
parentf5e757ea60d9abb848d98af01e1986be3e35e236 (diff)
egl: Native Display autodetection
EGL doesnt define howto manage different native platforms. So mesa has a builtime configurable default platform, whith non-standard envvar (EGL_PLATFORM) overwrites. This caused unneeded bugreports, when EGL_PLATFORM was forgotten. Detection is grouped into basic types of NativeDisplays (which itself needs to be detected). The final decision is based on characteristcs of these basic types: File Desciptor based platforms (fbdev): - fstat(2) to check for being a fd that belongs to a character device - check kernel subsystem (todo) Pointer to structuctures (x11, wayland, drm/gbm): - mincore(2) to check whether its valid pointer to some memory. - magic elements (e.g. pointers to exported symbols): o wayland display stores interface type pointer (first elm.) o gbm stores pointer to its constructor (first elm.) o x11 as a fallback (FIXME?) Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1b1823a211f..9195da9b3a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1370,6 +1370,8 @@ if test "x$enable_egl" = xyes; then
EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS -lpthread"
EGL_DRIVERS_DIRS=""
+ AC_CHECK_FUNC(mincore, [DEFINES="$DEFINES -DHAVE_MINCORE"])
+
if test "$enable_static" != yes; then
# build egl_glx when libGL is built
if test "x$enable_glx" = xyes; then