Disable screen (=libdrm) utilities and mesa-specific calls. 
We want to build this on both Mesa AND Mali.

James

diff -ur mesa-demos-8.1.0-old/src/egl/eglut/eglutint.h mesa-demos-8.1.0/src/egl/eglut/eglutint.h
--- mesa-demos-8.1.0-old/src/egl/eglut/eglutint.h	2010-12-27 04:14:50.000000000 +0700
+++ mesa-demos-8.1.0/src/egl/eglut/eglutint.h	2014-02-25 19:34:33.912292694 +0700
@@ -26,7 +26,8 @@
 #ifndef _EGLUTINT_H_
 #define _EGLUTINT_H_
 
-#include "EGL/egl.h"
+#include <EGL/egl.h>
+#include <EGL/eglmesaext.h>
 #include "eglut.h"
 
 struct eglut_window {
diff -ur mesa-demos-8.1.0-old/src/egl/eglut/Makefile.am mesa-demos-8.1.0/src/egl/eglut/Makefile.am
--- mesa-demos-8.1.0-old/src/egl/eglut/Makefile.am	2012-12-15 14:17:06.000000000 +0700
+++ mesa-demos-8.1.0/src/egl/eglut/Makefile.am	2014-02-25 19:10:07.357291995 +0700
@@ -33,7 +33,8 @@
 eglut_wayland = libeglut_wayland.la
 endif
 
-noinst_LTLIBRARIES = libeglut_screen.la $(eglut_x11) $(eglut_wayland)
+#noinst_LTLIBRARIES = libeglut_screen.la $(eglut_x11) $(eglut_wayland)
+noinst_LTLIBRARIES = $(eglut_x11) $(eglut_wayland)
 endif
 
 libeglut_screen_la_SOURCES = \
diff -ur mesa-demos-8.1.0-old/src/egl/opengl/Makefile.am mesa-demos-8.1.0/src/egl/opengl/Makefile.am
--- mesa-demos-8.1.0-old/src/egl/opengl/Makefile.am	2012-12-15 14:17:06.000000000 +0700
+++ mesa-demos-8.1.0/src/egl/opengl/Makefile.am	2014-02-25 19:14:16.317292114 +0700
@@ -32,7 +32,7 @@
 	-I$(top_srcdir)/src/util
 AM_LDFLAGS = \
 	$(DEMO_LIBS) \
-	$(EGL_LIBS)
+	$(EGL_LIBS) -lGLESv2 -lGLESv1_CM
 
 if HAVE_X11
 EGL_X11_DEMOS = \
@@ -51,12 +51,7 @@
 
 if HAVE_EGL
 noinst_PROGRAMS = \
-	demo1 \
-	demo2 \
-	demo3 \
 	eglinfo \
-	eglgears_screen \
-	egltri_screen \
 	peglgears \
 	$(EGL_DRM_DEMOS) \
 	$(EGL_X11_DEMOS)
diff -ur mesa-demos-8.1.0-old/src/egl/opengles2/Makefile.am mesa-demos-8.1.0/src/egl/opengles2/Makefile.am
--- mesa-demos-8.1.0-old/src/egl/opengles2/Makefile.am	2012-12-15 14:17:06.000000000 +0700
+++ mesa-demos-8.1.0/src/egl/opengles2/Makefile.am	2014-02-25 19:16:10.482292168 +0700
@@ -31,13 +31,12 @@
 AM_LDFLAGS = \
 	$(GLESV2_LIBS) \
 	$(EGL_LIBS) \
-	-lm
+	-lm -lGLESv2
 
 if HAVE_EGL
 if HAVE_GLESV2
 bin_PROGRAMS = \
 	es2_info \
-	es2gears_screen \
 	es2gears_x11 \
 	es2tri
 if HAVE_WAYLAND
