<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 13-12-08 03:51 PM, <a class="moz-txt-link-abbreviated" href="mailto:davyaxel@free.fr">davyaxel@free.fr</a>
wrote:<br>
</div>
<blockquote
cite="mid:1683946033.605810807.1386535901212.JavaMail.root@zimbra26-e5.priv.proxad.net"
type="cite">
<pre wrap="">I've searched, and it should do to check if "EGL_KHR_image", "EGL_KHR_gl_texture_2D_image" and "EGL_EXT_image_dma_buf_import" are defined.
Those should be defined in <EGL/eglext.h>.
</pre>
</blockquote>
The <EGL/eglext.h> header is include in the "egl" software
package. <br>
<br>
This is the code to add to configure.ac to check for the 3 symbols
which should be added after the PKG_CHECK_MODULES for EGL.<br>
<blockquote><tt>SAVE_CFLAGS=$CFLAGS<br>
CFLAGS="$EGL_CFLAGS"<br>
AC_CHECK_DECLS([EGL_KHR_image, EGL_KHR_gl_texture_2D_image,
EGL_EXT_image_dma_buf_import], [], [],[<br>
AC_INCLUDES_DEFAULT<br>
#include <EGL/egl.h><br>
#include <EGL/eglext.h><br>
])<br>
CFLAGS=$SAVE_CFLAGS</tt><br>
</blockquote>
When you run ./autogen.sh, a new ./configure script is created which
includes a short C program to test if the symbols are declared.
Running the new script yields this output:<br>
<blockquote><tt>checking whether EGL_KHR_image is declared... yes</tt><tt><br>
</tt><tt>checking whether EGL_KHR_gl_texture_2D_image is
declared... yes</tt><tt><br>
</tt><tt>checking whether EGL_EXT_image_dma_buf_import is
declared... yes</tt><tt><br>
</tt></blockquote>
New #defines have also been added in config.h:<br>
<blockquote><tt>/* Define to 1 if you have the declaration of
`EGL_EXT_image_dma_buf_import',</tt><tt><br>
</tt><tt> and to 0 if you don't. */</tt><tt><br>
</tt><tt>#define HAVE_DECL_EGL_EXT_IMAGE_DMA_BUF_IMPORT 1</tt><tt><br>
</tt><tt><br>
</tt><tt>/* Define to 1 if you have the declaration of
`EGL_KHR_gl_texture_2D_image',</tt><tt><br>
</tt><tt> and to 0 if you don't. */</tt><tt><br>
</tt><tt>#define HAVE_DECL_EGL_KHR_GL_TEXTURE_2D_IMAGE 1</tt><tt><br>
</tt><tt><br>
</tt><tt>/* Define to 1 if you have the declaration of
`EGL_KHR_image', and to 0 if you</tt><tt><br>
</tt><tt> don't. */</tt><tt><br>
</tt><tt>#define HAVE_DECL_EGL_KHR_IMAGE 1</tt><tt><br>
</tt></blockquote>
Should the C test program fails when running ./configure, the
compiler output and the program listing is written in config.log.<br>
<br>
Have a go at it and experiment. See if this will help you write
conditional around the egl extension.<br>
<br>
Skipping the includes, this is the short C program:<br>
<blockquote><tt> int</tt><tt><br>
</tt><tt> main ()</tt><tt><br>
</tt><tt> {</tt><tt><br>
</tt><tt> #ifndef EGL_KHR_image</tt><tt><br>
</tt><tt> #ifdef __cplusplus</tt><tt><br>
</tt><tt> (void) EGL_KHR_image;</tt><tt><br>
</tt><tt> #else</tt><tt><br>
</tt><tt> (void) EGL_KHR_image;</tt><tt><br>
</tt><tt> #endif</tt><tt><br>
</tt><tt> #endif </tt><tt><br>
</tt><tt> ;</tt><tt><br>
</tt><tt> return 0;</tt><tt><br>
</tt><tt> }</tt><tt><br>
</tt></blockquote>
<br>
<br>
<br>
</body>
</html>