diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2013-07-10 11:30:16 +0200 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2013-07-10 11:30:16 +0200 |
commit | 13b183adc3f445ab825822ff9227f9dbd0e1e603 (patch) | |
tree | 2bb2a7cc69f8217701f088b23f280777f522f94c | |
parent | a2cc208749fd249f9f9341e7825bff417bc1a938 (diff) |
glcompat: Properly check for GLchar and other types
On Android for example these are no #defines but typedefs
-rw-r--r-- | configure.ac | 29 | ||||
-rw-r--r-- | gst-libs/gst/gl/glprototypes/gstgl_compat.h | 8 |
2 files changed, 33 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 080a9f8..145c284 100644 --- a/configure.ac +++ b/configure.ac @@ -604,6 +604,35 @@ AM_CONDITIONAL(USE_GLX, test "x$USE_GLX" = "xyes") AM_CONDITIONAL(USE_WGL, test "x$USE_WGL" = "xyes") AM_CONDITIONAL(USE_COCOA, test "x$USE_COCOA" = "xyes") +dnl Check for some types that are not always present +GL_INCLUDES="" +if test "x$USE_GLES2" = "xyes"; then + GL_INCLUDES="$GL_INCLUDES +# include <GLES2/gl2.h> +# include <GLES2/gl2ext.h> +" +fi + +if test "x$USE_OPENGL" = "xyes"; then + GL_INCLUDES="$GL_INCLUDES +# if __APPLE__ +# include <OpenGL/OpenGL.h> +# include <OpenGL/gl.h> +# else +# include <GL/glu.h> +# include <GL/gl.h> +# if __WIN32__ || _WIN32 +# include <GL/glext.h> +# endif +# endif +" +fi + +AC_CHECK_TYPES(GLeglImageOES, [], [], [[$GL_INCLUDES]]) +AC_CHECK_TYPES(GLchar, [], [], [[$GL_INCLUDES]]) +AC_CHECK_TYPES(GLsizeiptr, [], [], [[$GL_INCLUDES]]) +AC_CHECK_TYPES(GLintptr, [], [], [[$GL_INCLUDES]]) + AC_CONFIG_COMMANDS([gst-libs/gst/gl/gstglconfig.h], [ outfile=gstglconfig.h-tmp cat > $outfile <<\_______EOF diff --git a/gst-libs/gst/gl/glprototypes/gstgl_compat.h b/gst-libs/gst/gl/glprototypes/gstgl_compat.h index 6271917..a0f1ec4 100644 --- a/gst-libs/gst/gl/glprototypes/gstgl_compat.h +++ b/gst-libs/gst/gl/glprototypes/gstgl_compat.h @@ -22,16 +22,16 @@ #define __GST_GL_COMPAT_H__ /* undefined typedefs */ -#ifndef GLeglImageOES +#ifndef HAVE_GLEGLIMAGEOES typedef gpointer GLeglImageOES; #endif -#ifndef GLchar +#ifndef HAVE_GLCHAR typedef gchar GLchar; #endif -#ifndef GLsizeiptr +#ifndef HAVE_GLSIZEIPTR typedef ptrdiff_t GLsizeiptr; #endif -#ifndef GLintptr +#ifndef HAVE_GLINTPTR typedef ptrdiff_t GLintptr; #endif |