summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-07-19 09:20:09 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-07-19 09:20:09 +0200
commitbc09d770240030f2dc3162258a76d9b2281a6100 (patch)
treea5c7058d8587f6581318a30a596ca182d994a201
parented12a874225a35292779a454b8a8d385334014a5 (diff)
configure: Check for GLeglImageOES and others again
https://bugzilla.gnome.org/show_bug.cgi?id=704498
-rw-r--r--configure.ac48
-rw-r--r--gst-libs/gst/gl/glprototypes/gstgl_compat.h40
-rw-r--r--gst-libs/gst/gl/gstglapi.h2
3 files changed, 90 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1711220..55182e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -653,6 +653,54 @@ 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]])
+if test "x$ac_cv_type_GLeglImageOES" = "xyes"; then
+ GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
+#define GST_GL_HAVE_GLEGLIMAGEOES 1"
+fi
+
+AC_CHECK_TYPES(GLchar, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLchar" = "xyes"; then
+ GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
+#define GST_GL_HAVE_GLCHAR 1"
+fi
+
+AC_CHECK_TYPES(GLsizeiptr, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLsizeiptr" = "xyes"; then
+ GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
+#define GST_GL_HAVE_GLSIZEIPTR 1"
+fi
+
+AC_CHECK_TYPES(GLintptr, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLintptr" = "xyes"; then
+ GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
+#define GST_GL_HAVE_GLINTPTR 1"
+fi
+
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
new file mode 100644
index 0000000..21b9f71
--- /dev/null
+++ b/gst-libs/gst/gl/glprototypes/gstgl_compat.h
@@ -0,0 +1,40 @@
+ /*
+ * GStreamer
+ * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_GL_COMPAT_H__
+#define __GST_GL_COMPAT_H__
+
+#include <gst/gl/gstglconfig.h>
+
+/* undefined typedefs */
+#ifndef GST_GL_HAVE_GLEGLIMAGEOES
+typedef gpointer GLeglImageOES;
+#endif
+#ifndef GST_GL_HAVE_GLCHAR
+typedef gchar GLchar;
+#endif
+#ifndef GST_GL_HAVE_GLSIZEIPTR
+typedef ptrdiff_t GLsizeiptr;
+#endif
+#ifndef GST_GL_HAVE_GLINTPTR
+typedef ptrdiff_t GLintptr;
+#endif
+
+#endif
diff --git a/gst-libs/gst/gl/gstglapi.h b/gst-libs/gst/gl/gstglapi.h
index 1c6e76e..b5969c2 100644
--- a/gst-libs/gst/gl/gstglapi.h
+++ b/gst-libs/gst/gl/gstglapi.h
@@ -23,6 +23,8 @@
#include <gst/gl/gstglconfig.h>
+#include <gst/gl/glprototypes/gstgl_compat.h>
+
/* OpenGL 2.0 for Embedded Systems */
#if GST_GL_HAVE_GLES2
# include <GLES2/gl2.h>