<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    Axel,<br>
    <br>
    Here is a preview I have been drafted for the configuration tests.<br>
    <br>
    I am still concerned about the test for EGLNativePixmapType. If
    libgbm >= 9 is not found, then there is no dri3 support. If
    libgbm is found, then in glamor_egl.c, gbm.h is included and
    therefore EGLNativePixmapType will be of type struct gbm_bo, right?<br>
    <br>
    Under what circumstances do you see EGLNativePixmapType being of
    type void* when libgbm is present? According to eglplatform.h,
    Symbian and __GBM__ seem mutually exclusive.<br>
    <br>
    Better comments are welcome.<br>
    <blockquote><tt>#
        ---------------------------------------------------------------------</tt><tt><br>
      </tt><tt>#     Configure Glamor DRI3 Support</tt><tt><br>
      </tt><tt>#
        ---------------------------------------------------------------------</tt><tt><br>
      </tt><tt><br>
      </tt><tt># Define a configure option for DRI3 support</tt><tt><br>
      </tt><tt>AC_ARG_ENABLE(glamor-dri3,</tt><tt><br>
      </tt><tt>    AS_HELP_STRING([--enable-glamor-dri3],</tt><tt><br>
      </tt><tt>                   [Build glamor DRI3 helpers (default:
        yes if libgbm >= 9 is detected)]),</tt><tt><br>
      </tt><tt>                   [GLAMOR_DRI3_HELPERS="$enableval"],</tt><tt><br>
      </tt><tt>                   [GLAMOR_DRI3_HELPERS=yes])</tt><tt><br>
      </tt><tt><br>
      </tt><tt># Check if DRI3 support is possible, if requested by user</tt><tt><br>
      </tt><tt>if test "x$GLAMOR_DRI3_HELPERS" = xyes -a "x$GBMv9" =
        xno; then</tt><tt><br>
      </tt><tt>   GLAMOR_DRI3_HELPERS=no</tt><tt><br>
      </tt><tt>fi</tt><tt><br>
      </tt><tt><br>
      </tt><tt># Check for the presence of some EGL extensions</tt><tt><br>
      </tt><tt>SAVE_CFLAGS=$CFLAGS</tt><tt><br>
      </tt><tt>CFLAGS="$EGL_CFLAGS"</tt><tt><br>
      </tt><tt>AC_CHECK_DECLS([EGL_KHR_image,
        EGL_KHR_gl_texture_2D_image, EGL_EXT_image_dma_buf_import], [],
      </tt><tt><br>
      </tt><tt>[GLAMOR_DRI3_HELPERS=no],[</tt><tt><br>
      </tt><tt>     AC_INCLUDES_DEFAULT</tt><tt><br>
      </tt><tt>     #include <EGL/egl.h></tt><tt><br>
      </tt><tt>     #include <EGL/eglext.h></tt><tt><br>
      </tt><tt>])</tt><tt><br>
      </tt><tt>CFLAGS=$SAVE_CFLAGS</tt><tt><br>
      </tt><tt><br>
      </tt><tt># Check for this 32bpp format in drm_fourcc.h</tt><tt><br>
      </tt><tt>SAVE_CFLAGS=$CFLAGS</tt><tt><br>
      </tt><tt>CFLAGS="$LIBDRM_CFLAGS"</tt><tt><br>
      </tt><tt>AC_CHECK_DECLS([DRM_FORMAT_ARGB8888], [], </tt><tt><br>
      </tt><tt>[GLAMOR_DRI3_HELPERS=no],[</tt><tt><br>
      </tt><tt>     AC_INCLUDES_DEFAULT</tt><tt><br>
      </tt><tt>     #include <drm_fourcc.h></tt><tt><br>
      </tt><tt>])</tt><tt><br>
      </tt><tt>CFLAGS=$SAVE_CFLAGS</tt><tt><br>
      </tt><tt><br>
      </tt><tt># Check that EGLNativePixmapType is a struct gbm_bo</tt><tt><br>
      </tt><tt>XORG_TESTSET_CFLAG([COMPAT_CFLAGS], [-Werror])</tt><tt><br>
      </tt><tt>XORG_TESTSET_CFLAG([COMPAT_CFLAGS], [-Wc++-compat])</tt><tt><br>
      </tt><tt>SAVE_CFLAGS=$CFLAGS</tt><tt><br>
      </tt><tt>CFLAGS="$EGL_CFLAGS $COMPAT_CFLAGS"</tt><tt><br>
      </tt><tt>AC_COMPILE_IFELSE([</tt><tt><br>
      </tt><tt>    AC_LANG_PROGRAM([</tt><tt><br>
      </tt><tt>        #include <unistd.h></tt><tt><br>
      </tt><tt>        #include <gbm.h></tt><tt><br>
      </tt><tt>        #include <EGL/egl.h></tt><tt><br>
      </tt><tt>        #include <EGL/eglext.h>],[</tt><tt><br>
      </tt><tt>        struct gbm_bo *bo = gbm_bo_create
        (gbm_create_device(1), 0, 0, GBM_FORMAT_ARGB8888,</tt><tt><br>
      </tt><tt>                            GBM_BO_USE_RENDERING |
        GBM_BO_USE_SCANOUT);</tt><tt><br>
      </tt><tt>        EGLNativePixmapType native_pixmap;</tt><tt><br>
      </tt><tt>        native_pixmap = bo;])], [],
        [GLAMOR_DRI3_HELPERS=no]</tt><tt><br>
      </tt><tt>)</tt><tt><br>
      </tt><tt>CFLAGS=$SAVE_CFLAGS</tt><tt><br>
      </tt><tt><br>
      </tt><tt>if test "x$GLAMOR_DRI3_HELPERS" = xyes; then</tt><tt><br>
      </tt><tt>    AC_DEFINE(GLAMOR_HAS_DRI3_SUPPORT, 1, [Enable Dri3
        helpers])</tt><tt><br>
      </tt><tt>fi</tt><tt><br>
      </tt><tt><br>
      </tt><tt>AC_MSG_CHECKING([Enable Glamor DRI3 helpers])</tt><tt><br>
      </tt><tt>AC_MSG_RESULT([$GLAMOR_DRI3_HELPERS])</tt><tt><br>
      </tt><tt>#
        ---------------------------------------------------------------------</tt><br>
      <br>
    </blockquote>
  </body>
</html>