egl/gallium: Set defines for supported APIs when using automake
authorNiels Ole Salscheider <niels_ole@salscheider-online.de>
Wed, 11 Jun 2014 21:13:12 +0000 (23:13 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 12 Jun 2014 17:07:20 +0000 (18:07 +0100)
This fixes automake builds which are broken since
b52a530ce2aada1967bc8fefa83ab53e6a737dae.

v2: This patch also adds the FEATURE_* defines back to targets/egl-static for
Android and Scons that have been removed in the mentioned commit.

Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79885
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/gallium/state_trackers/egl/Makefile.am
src/gallium/targets/egl-static/Android.mk
src/gallium/targets/egl-static/SConscript

index b7dcdabffefbdb47ff8c18b32f58c2667b1fac18..828bf13e27c56cf5b32bf7dc873b979fd703f92e 100644 (file)
@@ -88,3 +88,23 @@ AM_CPPFLAGS += \
        -I$(top_srcdir)/src/gallium/winsys/sw \
        -DHAVE_NULL_BACKEND
 endif
+
+if HAVE_OPENGL
+AM_CPPFLAGS += \
+       -DFEATURE_GL=1
+endif
+
+if HAVE_OPENGL_ES1
+AM_CPPFLAGS += \
+       -DFEATURE_ES1=1
+endif
+
+if HAVE_OPENGL_ES2
+AM_CPPFLAGS += \
+       -DFEATURE_ES2=1
+endif
+
+if HAVE_OPENVG
+AM_CPPFLAGS += \
+       -DFEATURE_VG=1
+endif
index 01408a7cb186a8d737b879a67f5108929348c8b7..37244b5443a4145de5c7100cd783038c2ae98176 100644 (file)
@@ -31,6 +31,8 @@ LOCAL_SRC_FILES := \
        egl_st.c
 
 LOCAL_CFLAGS := \
+       -DFEATURE_ES1=1 \
+       -DFEATURE_ES2=1 \
        -D_EGL_MAIN=_eglBuiltInDriverGALLIUM
 
 LOCAL_C_INCLUDES := \
index 7d8d4d27cdb4c20288fbe8265b3fe3b64d52ab46..afb5c11fa91ca8c3146bd4ef7fa29633e5b66cb8 100644 (file)
@@ -63,6 +63,11 @@ if env['platform'] == 'windows':
 
 # OpenGL ES and OpenGL
 if env['gles']:
+    env.Append(CPPDEFINES = [
+        'FEATURE_GL=1',
+        'FEATURE_ES1=1',
+        'FEATURE_ES2=1'
+    ])
     env.Prepend(LIBPATH = [shared_glapi.dir])
     # manually add LIBPREFIX on windows
     glapi_name = 'glapi' if env['platform'] != 'windows' else 'libglapi'
@@ -70,6 +75,7 @@ if env['gles']:
 
 # OpenVG
 if True:
+    env.Append(CPPDEFINES = ['FEATURE_VG=1'])
     env.Prepend(LIBPATH = [openvg.dir])
     # manually add LIBPREFIX on windows
     openvg_name = 'OpenVG' if env['platform'] != 'windows' else 'libOpenVG'