summaryrefslogtreecommitdiff
path: root/legacy/evas/m4/evas_check_engine.m4
diff options
context:
space:
mode:
authorxcomputerman <xcomputerman>2010-01-29 02:31:37 +0000
committerxcomputerman <xcomputerman@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2010-01-29 02:31:37 +0000
commitcdcc000942064d21c1f685074c3b5ff4453f17dc (patch)
treefa00e05f99b6029ca045ef588d96cff8bb1f79d8 /legacy/evas/m4/evas_check_engine.m4
parenta5a6b927d02503363278f72fecfd671020e2c5df (diff)
Add OpenGL SDL engine
SVN revision: 45674
Diffstat (limited to '')
-rw-r--r--legacy/evas/m4/evas_check_engine.m479
1 files changed, 79 insertions, 0 deletions
diff --git a/legacy/evas/m4/evas_check_engine.m4 b/legacy/evas/m4/evas_check_engine.m4
index 8f268249ab..416cf90737 100644
--- a/legacy/evas/m4/evas_check_engine.m4
+++ b/legacy/evas/m4/evas_check_engine.m4
@@ -487,6 +487,85 @@ fi
487 487
488]) 488])
489 489
490dnl use: EVAS_CHECK_ENGINE_DEP_GL_SDL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
491
492AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_SDL],
493[
494
495requirement=""
496have_dep="no"
497evas_engine_[]$1[]_cflags=""
498evas_engine_[]$1[]_libs=""
499
500PKG_CHECK_MODULES([SDL],
501 [sdl >= 1.2.0],
502 [
503 have_dep="yes"
504 requirement="sdl"
505 evas_engine_[]$1[]_cflags="${SDL_CFLAGS}"
506 evas_engine_[]$1[]_libs="${SDL_LIBS}"
507 ]
508)
509
510AC_CHECK_HEADERS([GL/gl.h],
511 [have_dep="yes"],
512 [have_dep="no"])
513
514if test "x$gl_flavor_gles" = "xyes" ; then
515 have_dep=no
516fi
517
518if test "x${have_dep}" = "xyes" ; then
519 evas_engine_[]$1[]_cflags="${SDL_CFLAGS}"
520 evas_engine_[]$1[]_libs="${SDL_LIBS} -lGL -lpthread"
521 evas_engine_gl_common_libs="-lGL -lpthread"
522else
523 AC_CHECK_HEADERS([EGL/egl.h], [have_egl="yes"])
524 if test "x${have_egl}" = "xyes" ; then
525 AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lpthread -lm)
526 if test "x${have_glesv2}" = "xyes" ; then
527 evas_engine_[]$1[]_cflags="${SDL_CFLAGS}"
528 evas_engine_[]$1[]_libs="${SDL_LIBS} -lGLESv2 -lpthread -lm -lEGL"
529 evas_engine_gl_common_libs="-lGLESv2 -lpthread -lm"
530 have_dep="yes"
531 fi
532dnl samsung s3c6410 libs changed to be like the sgx ones. need a variety option
533dnl have_gles20="no"
534dnl AC_CHECK_LIB(gles20, glTexImage2D, [have_gles20="yes"], , -lEGL)
535dnl if test "x${have_gles20}" = "xyes" ; then
536dnl evas_engine_[]$1[]_cflags="${SDL_CFLAGS}"
537dnl evas_engine_[]$1[]_libs="${SDL_LIBS} -lgles20 -lEGL"
538dnl AC_DEFINE(GLES_VARIETY_S3C6410, 1, [Samsung S3c6410 GLES2 support])
539dnl evas_engine_gl_common_libs="-lgles20"
540dnl have_dep="yes"
541dnl fi
542dnl have_glesv2="no"
543dnl AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lpthread -lm)
544dnl if test "x${have_glesv2}" = "xyes" ; then
545dnl evas_engine_[]$1[]_cflags="${SDL_CFLAGS}"
546dnl evas_engine_[]$1[]_libs="${SDL_LIBS} -lGLESv2 -lpthread -lm -lEGL"
547dnl AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
548dnl evas_engine_gl_common_libs="-lGLESv2 -lpthread -lm"
549dnl have_dep="yes"
550dnl fi
551 fi
552fi
553
554AC_SUBST([evas_engine_$1_cflags])
555AC_SUBST([evas_engine_$1_libs])
556
557if test "x$3" = "xstatic" ; then
558 requirement_evas="${requirement} ${requirement_evas}"
559fi
560
561if test "x${have_dep}" = "xyes" ; then
562 m4_default([$4], [:])
563else
564 m4_default([$5], [:])
565fi
566
567])
568
490dnl use: EVAS_CHECK_ENGINE_DEP_FB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) 569dnl use: EVAS_CHECK_ENGINE_DEP_FB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
491 570
492AC_DEFUN([EVAS_CHECK_ENGINE_DEP_FB], 571AC_DEFUN([EVAS_CHECK_ENGINE_DEP_FB],