Permalink
Browse files

configure: add --enable-mesa

* define MESA_EGL_NO_X11_HEADERS in include/EGL/eglplatform.h
  unless there is --enable-mesa configure parameter

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

Conflicts:
	glesv2/glesv2.c
  • Loading branch information...
1 parent 8d015db commit 6b2815973f98601e39d916a8f53a4f6acb76b22b @shr-project shr-project committed with Carsten Munk Jan 14, 2013
Showing with 31 additions and 7 deletions.
  1. +6 −0 configure.ac
  2. +6 −0 egl/Makefile.am
  3. +0 −2 egl/egl.c
  4. +3 −0 glesv2/Makefile.am
  5. +0 −1 glesv2/glesv2.c
  6. +4 −0 include/EGL/eglplatform.h
  7. +12 −0 tests/Makefile.am
  8. +0 −2 tests/test_egl.c
  9. +0 −1 tests/test_glesv2.c
  10. +0 −1 tests/test_offscreen_rendering.cpp
View
@@ -41,6 +41,12 @@ AC_ARG_ENABLE(debug,
[debug="no"])
AM_CONDITIONAL( [WANT_DEBUG], [test x"$debug" = x"yes"])
+AC_ARG_ENABLE(mesa,
+ [ --enable-mesa Enable mesa headers (default=disabled)],
+ [mesa=$enableval],
+ [mesa="no"])
+AM_CONDITIONAL( [WANT_MESA], [test x"$mesa" = x"yes"])
+
AC_CONFIG_FILES([
Makefile
common/Makefile
View
@@ -3,10 +3,16 @@ lib_LTLIBRARIES = \
libEGL_la_SOURCES = egl.c ws.c ws_fbdev.cpp nativewindowbase.cpp fbdev_window.cpp
libEGL_la_CFLAGS = -I$(top_srcdir)/include
+if WANT_MESA
+libEGL_la_CFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
+endif
if WANT_DEBUG
libEGL_la_CFLAGS += -ggdb -O0 -DDEBUG
endif
libEGL_la_CXXFLAGS = -I$(top_srcdir)/include
+if WANT_MESA
+libEGL_la_CXXFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
+endif
if WANT_DEBUG
libEGL_la_CXXFLAGS += -ggdb -O0 -DDEBUG
endif
View
@@ -15,8 +15,6 @@
*
*/
-#define MESA_EGL_NO_X11_HEADERS
-
/* EGL function pointers */
#define EGL_EGLEXT_PROTOTYPES
#include <EGL/egl.h>
View
@@ -3,6 +3,9 @@ lib_LTLIBRARIES = \
libGLESv2_la_SOURCES = glesv2.c
libGLESv2_la_CFLAGS = -I$(top_srcdir)/include
+if WANT_MESA
+libGLESv2_la_CFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
+endif
if WANT_DEBUG
libGLESv2_la_CFLAGS += -ggdb -O0 -DDEBUG
endif
View
@@ -15,7 +15,6 @@
*
*/
-#define MESA_EGL_NO_X11_HEADERS
#define GL_GLEXT_PROTOTYPES
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
@@ -46,6 +46,10 @@
* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
*/
+#ifndef LIBHYBRIS_WANTS_MESA_X11_HEADERS
+#define MESA_EGL_NO_X11_HEADERS
+#endif
+
#ifndef EGLAPI
#define EGLAPI KHRONOS_APICALL
#endif
View
@@ -6,13 +6,19 @@ bin_PROGRAMS = \
test_egl_SOURCES = test_egl.c
test_egl_CFLAGS = \
-I$(top_srcdir)/include
+if WANT_MESA
+test_egl_CFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
+endif
test_egl_LDADD = \
$(top_builddir)/common/libhybris-common.la \
$(top_builddir)/egl/libEGL.la
test_glesv2_SOURCES = test_glesv2.c
test_glesv2_CFLAGS = \
-I$(top_srcdir)/include
+if WANT_MESA
+test_glesv2_CFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
+endif
test_glesv2_LDADD = \
-lm \
$(top_builddir)/common/libhybris-common.la \
@@ -28,8 +34,14 @@ test_offscreen_rendering_SOURCES = \
native_handle.c
test_offscreen_rendering_CXXFLAGS = \
-I$(top_srcdir)/include
+if WANT_MESA
+test_offscreen_rendering_CXXFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
+endif
test_offscreen_rendering_CFLAGS = \
-I$(top_srcdir)/include
+if WANT_MESA
+test_offscreen_rendering_CFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
+endif
test_offscreen_rendering_LDADD = \
-lm \
$(top_builddir)/common/libhybris-common.la \
View
@@ -15,8 +15,6 @@
*
*/
-#define MESA_EGL_NO_X11_HEADERS
-
#include <EGL/egl.h>
#include <assert.h>
#include <stdio.h>
View
@@ -15,7 +15,6 @@
*
*/
-#define MESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h>
#include <GLES2/gl2.h>
#include <assert.h>
@@ -1,4 +1,3 @@
-#define MESA_EGL_NO_X11_HEADERS
//#define EGL_EGLEXT_PROTOTYPES
#include <EGL/egl.h>
#include <EGL/eglext.h>

0 comments on commit 6b28159

Please sign in to comment.