248
248
AC_CHECK_HEADERS([GLES/egl.h], [HAVE_EGL=yes], [HAVE_EGL=no])
249
249
AC_CHECK_HEADERS([GLES/gl.h], [HAVE_GLES=yes], [HAVE_GLES=no])
250
AC_CHECK_HEADERS([GLES2/gl2.h], [HAVE_GLES2=yes], [HAVE_GLES2=no])
251
AC_CHECK_HEADERS([EGL/egl.h], [HAVE_EGL2=yes], [HAVE_EGL2=no])
251
253
AC_ARG_ENABLE(opengles1-gdl,
252
254
AS_HELP_STRING([--enable-opengles1-gdl],[enable build of OpenGL ES 1 renderer using Intel GDL backend]),
271
273
[ENABLE_OPENGLES1_X11=no])
275
AC_ARG_ENABLE(opengles2-x11,
276
AC_HELP_STRING([--enable-opengles2-x11], [enable build of OpenGL ES 2 renderer using X11 backend]),
278
case "${enableval}" in
279
yes) ENABLE_OPENGLES2_X11=yes ;;
280
no) ENABLE_OPENGLES2_X11=no ;;
281
*) AC_MSG_ERROR(bad value ${enableval} for --enable-opengles2-x11) ;;
284
[ENABLE_OPENGLES2_X11=no])
286
if test x$HAVE_EGL2 = xyes -a x$HAVE_GLES2 = xyes; then
287
if test x$ENABLE_OPENGLES2_X11 = xyes -a x$HAVE_X11 = xyes; then
288
AC_DEFINE([HAVE_EGL2_X11], [1],
289
[Defined to 1 if the OpenGL ES 2 renderer uses the X11 backend])
290
HAVE_OPENGLES2_PLUGIN="yes"
291
OPENGLES2_BACKEND="(X11 backend)"
292
PGM_GLES2_CFLAGS="$XLIB_CFLAG $GLIB_CFLAGS"
293
PGM_GLES2_LIBS="$XLIB_LIBS $GLIB_LIBS -lGLESv2 -lEGL"
295
AC_DEFINE([HAVE_EGL2_NATIVE], [1],
296
[Defined to 1 if the OpenGL ES 2 renderer uses the native backend])
297
HAVE_OPENGLES2_PLUGIN="yes"
298
OPENGLES2_BACKEND="(native backend)"
299
PGM_GLES2_CFLAGS="$GLIB_CFLAGS"
300
PGM_GLES2_LIBS="$GLIB_LIBS -lGLESv2 -lEGL"
303
HAVE_OPENGLES2_PLUGIN="no"
273
307
if test x$HAVE_EGL = xyes -a x$HAVE_GLES = xyes; then
274
308
if test x$ENABLE_OPENGLES1_GDL = xyes; then
275
309
AC_CHECK_HEADERS([libgdl.h], [HAVE_GDL=yes], [HAVE_GDL=no])
290
324
[Defined to 1 if the OpenGL ES 1 renderer uses the X11 backend])
291
325
HAVE_OPENGLES1_PLUGIN="yes"
292
326
OPENGLES1_BACKEND="(X11 backend)"
293
PGM_GLES1_CFLAGS="$GLIB_CFLAGS"
294
PGM_GLES1_LIBS="$GLIB_LIBS -lGLES_CM"
327
PGM_GLES1_CFLAGS="$XLIB_LIBS $GLIB_CFLAGS"
328
PGM_GLES1_LIBS="$XLIB_LIBS $GLIB_LIBS -lGLES_CM -lEGL"
296
330
HAVE_OPENGLES1_PLUGIN="no"
297
331
OPENGLES1_BACKEND=""
302
336
HAVE_OPENGLES1_PLUGIN="yes"
303
337
OPENGLES1_BACKEND="(native backend)"
304
338
PGM_GLES1_CFLAGS="$GLIB_CFLAGS"
305
PGM_GLES1_LIBS="$GLIB_LIBS -lGLES_CM"
339
PGM_GLES1_LIBS="$GLIB_LIBS -lGLES_CM -lEGL"
308
342
HAVE_OPENGLES1_PLUGIN="no"
313
347
AC_SUBST(HAVE_OPENGLES1_PLUGIN)
314
348
AC_SUBST(PGM_GLES1_CFLAGS)
315
349
AC_SUBST(PGM_GLES1_LIBS)
351
AC_SUBST(OPENGLES2_BACKEND)
352
AC_SUBST(HAVE_OPENGLES2_PLUGIN)
353
AC_SUBST(PGM_GLES2_CFLAGS)
354
AC_SUBST(PGM_GLES2_LIBS)
316
356
AM_CONDITIONAL(HAVE_OPENGLES1_PLUGIN_COND, test x$HAVE_OPENGLES1_PLUGIN = xyes)
357
AM_CONDITIONAL(HAVE_OPENGLES2_PLUGIN_COND, test x$HAVE_OPENGLES2_PLUGIN = xyes)
358
AM_CONDITIONAL(HAVE_OPENGLES_PLUGIN_COND, test x$HAVE_OPENGLES2_PLUGIN = xyes -o x$HAVE_OPENGLES1_PLUGIN = xyes )
317
359
AM_CONDITIONAL(HAVE_EGL_GDL_COND, test x$HAVE_EGL = xyes -a x$HAVE_GLES = xyes -a x$ENABLE_OPENGLES1_GDL = xyes)
318
360
AM_CONDITIONAL(HAVE_EGL_X11_COND, test x$HAVE_EGL = xyes -a x$HAVE_GLES = xyes -a x$ENABLE_OPENGLES1_X11 = xyes)
361
AM_CONDITIONAL(HAVE_EGL2_X11_COND, test x$HAVE_EGL2 = xyes -a x$HAVE_GLES2 = xyes -a x$ENABLE_OPENGLES2_X11 = xyes)
362
AM_CONDITIONAL(HAVE_EGL2_NATIVE_COND, test x$HAVE_EGL2 = xyes -a x$HAVE_GLES2 = xyes -a x$ENABLE_OPENGLES2_X11 = xno)
319
363
AM_CONDITIONAL(HAVE_EGL_NATIVE_COND, test x$HAVE_EGL = xyes -a x$HAVE_GLES = xyes -a x$ENABLE_OPENGLES1_X11 = xno -a x$ENABLE_OPENGLES1_GDL = xno)
321
365
# *** Documentation ***
448
492
echo " 3D graphics engine: yes"
449
493
echo " OpenGL renderer: ${HAVE_OPENGL_PLUGIN} ${OPENGL_BACKEND}"
450
494
echo " OpenGL ES 1 renderer: ${HAVE_OPENGLES1_PLUGIN} ${OPENGLES1_BACKEND}"
495
echo " OpenGL ES 2 renderer: ${HAVE_OPENGLES2_PLUGIN} ${OPENGLES2_BACKEND}"
451
496
echo " GUI classes: ${HAVE_GUI_CLASSES}"
452
497
echo " GStreamer classes: ${HAVE_GST_CLASSES}"
453
498
echo " GTK+ classes: ${HAVE_GTK_CLASSES}"