diff options
author | Matthew Waters <matthew@centricular.com> | 2016-08-16 16:51:02 +1000 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2016-08-16 16:51:02 +1000 |
commit | 2b6841da3201dfc91bf6c88a064d651ee081f9fa (patch) | |
tree | 83aeb97f4f04632887a9089bd0befc0cd21cefe5 | |
parent | 4e04f28478fee0b85b677b9f636c50d6887a6165 (diff) |
gl/build: add configure check for possibly missing EGLAttrib
Fixes the build on older android targets.
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | gst-libs/gst/gl/egl/gstegl.h | 5 |
2 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 01c22be53..c5b7645fd 100644 --- a/configure.ac +++ b/configure.ac @@ -1384,6 +1384,7 @@ GST_GL_HAVE_GLINTPTR=0 GST_GL_HAVE_GLSYNC=0 GST_GL_HAVE_GLUINT64=0 GST_GL_HAVE_GLINT64=0 +GST_GL_HAVE_EGLATTRIB=0 old_CFLAGS=$CFLAGS CFLAGS="$GL_CFLAGS $CFLAGS" @@ -1423,6 +1424,17 @@ if test "x$ac_cv_type_GLint64" = "xyes"; then GST_GL_HAVE_GLINT64=1 fi +if test "x$USE_EGL" = "xyes"; then + EGL_INCLUDES="$GL_INCLUDES + #include <EGL/egl.h> + #include <EGL/eglext.h> + " + AC_CHECK_TYPES(EGLAttrib, [], [], [[$EGL_INCLUDES]]) + if test "x$ac_cv_type_EGLAttrib" = "xyes"; then + GST_GL_HAVE_EGLATTRIB=1 + fi +fi + CFLAGS=$old_CFLAGS GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES @@ -1433,6 +1445,7 @@ GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES #define GST_GL_HAVE_GLSYNC $GST_GL_HAVE_GLSYNC #define GST_GL_HAVE_GLUINT64 $GST_GL_HAVE_GLUINT64 #define GST_GL_HAVE_GLINT64 $GST_GL_HAVE_GLINT64 +#define GST_GL_HAVE_EGLATTRIB $GST_GL_HAVE_EGLATTRIB " AC_CONFIG_COMMANDS([gst-libs/gst/gl/gstglconfig.h], [ diff --git a/gst-libs/gst/gl/egl/gstegl.h b/gst-libs/gst/gl/egl/gstegl.h index 82d4953dd..d227153cd 100644 --- a/gst-libs/gst/gl/egl/gstegl.h +++ b/gst-libs/gst/gl/egl/gstegl.h @@ -46,4 +46,9 @@ #pragma GCC diagnostic pop #endif +/* compatibility definitions... */ +#if !GST_GL_HAVE_EGLATTRIB +typedef EGLAttrib gintptr; +#endif + #endif /* _GST_EGL_H_ */ |