2008-11-23 22:18:31 -08:00
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_BUFFER(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_BUFFER],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="yes"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
2009-07-14 14:16:08 -07:00
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB],
|
2008-11-23 22:18:31 -08:00
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_PATH_X
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([X11/X.h], [have_dep="yes"])
|
|
|
|
|
2009-08-03 01:26:02 -07:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([X11], [XCreateImage], [have_dep="yes"], [have_dep="no"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([Xext], [XShmCreateImage], [have_dep="yes"], [have_dep="no"])
|
|
|
|
fi
|
|
|
|
|
2008-11-23 22:18:31 -08:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
if test "x$2" = "xyes" ; then
|
|
|
|
x_libs="${x_libs} -lX11 -lXext"
|
|
|
|
else
|
|
|
|
x_dir=${x_dir:-/usr/X11R6}
|
|
|
|
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
|
|
|
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
|
|
|
|
fi
|
|
|
|
evas_engine_[]$1[]_cflags="${x_cflags}"
|
|
|
|
evas_engine_[]$1[]_libs="${x_libs}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2011-07-07 17:18:22 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_GL_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
2011-07-07 17:18:22 -07:00
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_XLIB],
|
2008-11-23 22:18:31 -08:00
|
|
|
[
|
|
|
|
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_PATH_X
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
2010-10-26 17:00:52 -07:00
|
|
|
AC_CHECK_HEADER([GL/gl.h],
|
2009-03-14 10:24:53 -07:00
|
|
|
[have_dep="yes"],
|
2010-10-26 16:31:58 -07:00
|
|
|
[have_dep="no"],
|
|
|
|
[
|
|
|
|
#include <GL/gl.h>
|
|
|
|
#include <GL/glext.h>
|
|
|
|
#include <GL/glx.h>
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xatom.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
#include <X11/extensions/Xrender.h>
|
|
|
|
#include <X11/Xresource.h>
|
|
|
|
])
|
|
|
|
|
|
|
|
gl_pt_lib="";
|
|
|
|
have_gl_pt="no"
|
2011-11-10 10:14:48 -08:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether pthread_create() is supported])
|
|
|
|
CFLAGS_save="${CFLAGS}"
|
|
|
|
CFLAGS="${CFLAGS} -pthread"
|
|
|
|
LIBS_save="${LIBS}"
|
|
|
|
LIBS="${LIBS} -pthread"
|
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[
|
|
|
|
#include <pthread.h>
|
|
|
|
]],
|
|
|
|
[[
|
|
|
|
pthread_create(NULL, NULL, NULL, NULL);
|
|
|
|
]])],
|
|
|
|
[have_gl_pt="yes"],
|
|
|
|
[have_gl_pt="no"])
|
|
|
|
CFLAGS=${CFLAGS_save}
|
|
|
|
LIBS=${LIBS_save}
|
|
|
|
AC_MSG_RESULT([${have_gl_pt}])
|
|
|
|
|
2010-10-26 16:31:58 -07:00
|
|
|
if test "x$have_gl_pt" = "xyes" ; then
|
2011-11-10 10:14:48 -08:00
|
|
|
gl_pt_lib=" -pthread"
|
2010-10-26 16:31:58 -07:00
|
|
|
fi
|
2008-11-23 22:18:31 -08:00
|
|
|
|
2009-08-03 01:26:02 -07:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([X11], [XCreateColormap], [have_dep="yes"], [have_dep="no"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
2010-10-26 16:31:58 -07:00
|
|
|
AC_CHECK_LIB([Xrender], [XRenderCreatePicture], [have_dep="yes"], [have_dep="no"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([GL], [glXCreateContext], [have_dep="yes"], [have_dep="no"], -lX11 -lXext -lXrender -lm $gl_pt_lib)
|
2009-08-03 01:26:02 -07:00
|
|
|
fi
|
|
|
|
|
2009-10-09 20:46:27 -07:00
|
|
|
if test "x$gl_flavor_gles" = "xyes" ; then
|
|
|
|
have_dep=no
|
|
|
|
fi
|
2009-08-03 01:26:02 -07:00
|
|
|
|
2008-11-23 22:18:31 -08:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
2012-03-16 23:25:41 -07:00
|
|
|
PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"])
|
From: Jiyoun Park <jy0703.park@samsung.com>
Subject: [E-devel] [Patch] Evas gl shader use binary shader
I make patch related with evas gl binary shader.
The concept of binary shader is compile shader only once.
Some people want to use binary shader because of performance issue.
In current evas gl engine, every application have to compile shader each
time.
But I modify code , so only first running application need compile shader.
Other application use already compiled shader(binary shader)
The binary shader is made under HOME/.evas/gl_common_shaders directory.
Binary shader is created according to GL vendor,GL renderer, GL version and
Module_arch.
The basic flow is
1. First running application which use gl engine check binary shader
directory, but it can't find binary shader.
2. After compiling shader, It saves compiled shaders..
3. Other application checks shader directory, it can use binary
shaders.
In mobile target, using binary shader, I can save 150ms. (that time, there
is 11 shaders).
If there is more shaders and more applications, this flow maybe save more
total time.
(the above is now in, changelog coming, with change to using ~/.cache,
some formatting fixes, make ity do the desktop gl one right with the
retrievable hint parameter ont he program etc. - doesn't break desktop
gl at least. yay. a,so fixes to mke it compile at all).
SVN revision: 59167
2011-05-03 23:15:00 -07:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
if test "x$2" = "xyes" ; then
|
|
|
|
x_libs="${x_libs} -lX11 -lXext -lXrender"
|
|
|
|
else
|
|
|
|
x_dir=${x_dir:-/usr/X11R6}
|
|
|
|
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
|
|
|
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
|
|
|
|
fi
|
2011-04-25 02:42:49 -07:00
|
|
|
evas_engine_[]$1[]_cflags="-I/usr/include ${x_cflags}"
|
|
|
|
evas_engine_[]$1[]_libs="${x_libs} -lGL $gl_pt_lib"
|
|
|
|
evas_engine_gl_common_libs="-lGL $gl_pt_lib"
|
From: Jiyoun Park <jy0703.park@samsung.com>
Subject: [E-devel] [Patch] Evas gl shader use binary shader
I make patch related with evas gl binary shader.
The concept of binary shader is compile shader only once.
Some people want to use binary shader because of performance issue.
In current evas gl engine, every application have to compile shader each
time.
But I modify code , so only first running application need compile shader.
Other application use already compiled shader(binary shader)
The binary shader is made under HOME/.evas/gl_common_shaders directory.
Binary shader is created according to GL vendor,GL renderer, GL version and
Module_arch.
The basic flow is
1. First running application which use gl engine check binary shader
directory, but it can't find binary shader.
2. After compiling shader, It saves compiled shaders..
3. Other application checks shader directory, it can use binary
shaders.
In mobile target, using binary shader, I can save 150ms. (that time, there
is 11 shaders).
If there is more shaders and more applications, this flow maybe save more
total time.
(the above is now in, changelog coming, with change to using ~/.cache,
some formatting fixes, make ity do the desktop gl one right with the
retrievable hint parameter ont he program etc. - doesn't break desktop
gl at least. yay. a,so fixes to mke it compile at all).
SVN revision: 59167
2011-05-03 23:15:00 -07:00
|
|
|
fi
|
2009-10-09 05:10:27 -07:00
|
|
|
else
|
|
|
|
if test "x$2" = "xyes" ; then
|
2009-10-10 23:59:47 -07:00
|
|
|
x_libs="${x_libs} -lX11 -lXext -lXrender"
|
2009-10-09 05:10:27 -07:00
|
|
|
else
|
|
|
|
x_dir=${x_dir:-/usr/X11R6}
|
|
|
|
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
2009-10-10 23:59:47 -07:00
|
|
|
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
|
2009-10-09 05:10:27 -07:00
|
|
|
fi
|
2010-10-26 17:00:52 -07:00
|
|
|
AC_CHECK_HEADER([GLES2/gl2.h],
|
2010-10-26 16:31:58 -07:00
|
|
|
[have_egl="yes"],
|
|
|
|
[have_egl="no"],
|
|
|
|
[
|
|
|
|
#include <GLES2/gl2.h>
|
|
|
|
#include <GLES2/gl2ext.h>
|
|
|
|
#include <EGL/egl.h>
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xatom.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
#include <X11/extensions/Xrender.h>
|
|
|
|
#include <X11/Xresource.h>
|
|
|
|
])
|
2009-10-09 05:10:27 -07:00
|
|
|
if test "x${have_egl}" = "xyes" ; then
|
2010-10-26 16:31:58 -07:00
|
|
|
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lm $gl_pt_lib)
|
2009-10-09 05:10:27 -07:00
|
|
|
if test "x${have_glesv2}" = "xyes" ; then
|
2012-03-16 23:25:41 -07:00
|
|
|
PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"])
|
From: Jiyoun Park <jy0703.park@samsung.com>
Subject: [E-devel] [Patch] Evas gl shader use binary shader
I make patch related with evas gl binary shader.
The concept of binary shader is compile shader only once.
Some people want to use binary shader because of performance issue.
In current evas gl engine, every application have to compile shader each
time.
But I modify code , so only first running application need compile shader.
Other application use already compiled shader(binary shader)
The binary shader is made under HOME/.evas/gl_common_shaders directory.
Binary shader is created according to GL vendor,GL renderer, GL version and
Module_arch.
The basic flow is
1. First running application which use gl engine check binary shader
directory, but it can't find binary shader.
2. After compiling shader, It saves compiled shaders..
3. Other application checks shader directory, it can use binary
shaders.
In mobile target, using binary shader, I can save 150ms. (that time, there
is 11 shaders).
If there is more shaders and more applications, this flow maybe save more
total time.
(the above is now in, changelog coming, with change to using ~/.cache,
some formatting fixes, make ity do the desktop gl one right with the
retrievable hint parameter ont he program etc. - doesn't break desktop
gl at least. yay. a,so fixes to mke it compile at all).
SVN revision: 59167
2011-05-03 23:15:00 -07:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
evas_engine_[]$1[]_cflags="${x_cflags}"
|
|
|
|
evas_engine_[]$1[]_libs="${x_libs} -lGLESv2 -lEGL -lm $gl_pt_lib"
|
|
|
|
evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib"
|
|
|
|
have_dep="yes"
|
|
|
|
AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
|
|
|
|
gles_variety_sgx="yes"
|
|
|
|
fi
|
2009-10-09 05:10:27 -07:00
|
|
|
fi
|
|
|
|
fi
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
2009-10-09 05:10:27 -07:00
|
|
|
|
2008-11-23 22:18:31 -08:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XCB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XCB],
|
|
|
|
[
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
requirement=""
|
2008-11-23 22:18:31 -08:00
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES([XCB],
|
2011-07-09 06:48:39 -07:00
|
|
|
[xcb xcb-shm xcb-image >= 0.2.1 pixman-1],
|
2008-11-23 22:18:31 -08:00
|
|
|
[
|
|
|
|
have_dep="yes"
|
2011-07-09 06:48:39 -07:00
|
|
|
requirement="xcb xcb-shm xcb-image pixman-1"
|
2008-11-23 22:18:31 -08:00
|
|
|
evas_engine_[]$1[]_cflags="${XCB_CFLAGS}"
|
|
|
|
evas_engine_[]$1[]_libs="${XCB_LIBS}"
|
2010-07-27 17:16:06 -07:00
|
|
|
],[
|
|
|
|
have_dep="no"
|
2008-11-23 22:18:31 -08:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
if test "x$3" = "xstatic" ; then
|
|
|
|
requirement_evas="${requirement} ${requirement_evas}"
|
|
|
|
fi
|
|
|
|
|
2008-11-23 22:18:31 -08:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2011-07-07 17:18:22 -07:00
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_GL_XCB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_XCB],
|
|
|
|
[
|
|
|
|
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_PATH_X
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([GL/gl.h],
|
|
|
|
[have_dep="yes"],
|
|
|
|
[have_dep="no"],
|
|
|
|
[
|
|
|
|
#include <GL/gl.h>
|
|
|
|
#include <GL/glext.h>
|
|
|
|
#include <GL/glx.h>
|
|
|
|
])
|
|
|
|
|
|
|
|
gl_pt_lib="";
|
|
|
|
have_gl_pt="no"
|
2011-11-10 10:14:48 -08:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether pthread_create() is supported])
|
|
|
|
CFLAGS_save="${CFLAGS}"
|
|
|
|
CFLAGS="${CFLAGS} -pthread"
|
|
|
|
LIBS_save="${LIBS}"
|
|
|
|
LIBS="${LIBS} -pthread"
|
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[
|
|
|
|
#include <pthread.h>
|
|
|
|
]],
|
|
|
|
[[
|
|
|
|
pthread_create(NULL, NULL, NULL, NULL);
|
|
|
|
]])],
|
|
|
|
[have_gl_pt="yes"],
|
|
|
|
[have_gl_pt="no"])
|
|
|
|
CFLAGS=${CFLAGS_save}
|
|
|
|
LIBS=${LIBS_save}
|
|
|
|
AC_MSG_RESULT([${have_gl_pt}])
|
|
|
|
|
2011-07-07 17:18:22 -07:00
|
|
|
if test "x$have_gl_pt" = "xyes" ; then
|
2011-11-10 10:14:48 -08:00
|
|
|
gl_pt_lib=" -pthread"
|
2011-07-07 17:18:22 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([X11], [XCreateColormap], [have_dep="yes"], [have_dep="no"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([Xrender], [XRenderCreatePicture], [have_dep="yes"], [have_dep="no"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([GL], [glXCreateContext], [have_dep="yes"], [have_dep="no"], -lX11 -lXext -lXrender -lm $gl_pt_lib)
|
|
|
|
fi
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES([XCB_GL],
|
2011-07-09 06:48:39 -07:00
|
|
|
[x11-xcb xcb xcb-glx xcb-render xcb-renderutil],
|
2011-07-07 17:18:22 -07:00
|
|
|
[
|
|
|
|
have_dep="yes"
|
2011-07-09 06:48:39 -07:00
|
|
|
requirement="x11-xcb xcb xcb-glx xcb-render xcb-renderutil"
|
2011-07-07 17:18:22 -07:00
|
|
|
evas_engine_[]$1[]_cflags="${XCB_GL_CFLAGS}"
|
|
|
|
evas_engine_[]$1[]_libs="${XCB_GL_LIBS}"
|
|
|
|
],[
|
|
|
|
have_dep="no"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
if test "x$gl_flavor_gles" = "xyes" ; then
|
|
|
|
have_dep=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
2012-03-16 23:25:41 -07:00
|
|
|
PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"])
|
2011-07-07 17:18:22 -07:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
if test "x$2" = "xyes" ; then
|
|
|
|
x_libs="${x_libs} -lX11 -lXext -lXrender"
|
|
|
|
else
|
|
|
|
x_dir=${x_dir:-/usr/X11R6}
|
|
|
|
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
|
|
|
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
|
|
|
|
fi
|
|
|
|
evas_engine_[]$1[]_cflags="-I/usr/include ${XCB_GL_CFLAGS} ${x_cflags}"
|
|
|
|
evas_engine_[]$1[]_libs="${XCB_GL_LIBS} ${x_libs} -lGL $gl_pt_lib"
|
|
|
|
evas_engine_gl_common_libs="-lGL $gl_pt_lib"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if test "x$2" = "xyes" ; then
|
|
|
|
x_libs="${x_libs} -lX11 -lXext -lXrender"
|
|
|
|
else
|
|
|
|
x_dir=${x_dir:-/usr/X11R6}
|
|
|
|
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
|
|
|
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
|
|
|
|
fi
|
|
|
|
AC_CHECK_HEADER([GLES2/gl2.h],
|
|
|
|
[have_egl="yes"],
|
|
|
|
[have_egl="no"],
|
|
|
|
[
|
|
|
|
#include <GLES2/gl2.h>
|
|
|
|
#include <GLES2/gl2ext.h>
|
|
|
|
#include <EGL/egl.h>
|
|
|
|
])
|
|
|
|
if test "x${have_egl}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lm $gl_pt_lib)
|
|
|
|
if test "x${have_glesv2}" = "xyes" ; then
|
2012-03-16 23:25:41 -07:00
|
|
|
PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"])
|
2011-07-07 17:18:22 -07:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
evas_engine_[]$1[]_cflags="${XCB_GL_CFLAGS} ${x_cflags}"
|
|
|
|
evas_engine_[]$1[]_libs="${XCB_GL_LIBS} ${x_libs} -lGLESv2 -lEGL -lm $gl_pt_lib"
|
|
|
|
evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib"
|
|
|
|
have_dep="yes"
|
|
|
|
AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
|
|
|
|
gles_variety_sgx="yes"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2009-04-22 20:20:51 -07:00
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([windows.h],
|
|
|
|
[
|
|
|
|
have_dep="yes"
|
|
|
|
evas_engine_[]$1[]_libs="-lgdi32"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2009-04-22 20:20:51 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_DDRAW(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_DDRAW],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([ddraw.h],
|
|
|
|
[
|
|
|
|
have_dep="yes"
|
|
|
|
evas_engine_[]$1[]_libs="-lddraw"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_DIRECT3D(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_DIRECT3D],
|
|
|
|
[
|
|
|
|
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
2009-03-14 09:42:52 -07:00
|
|
|
AC_CHECK_HEADERS([d3d9.h d3dx9.h],
|
2008-11-23 22:18:31 -08:00
|
|
|
[
|
|
|
|
have_dep="yes"
|
2008-12-20 05:22:46 -08:00
|
|
|
evas_engine_[]$1[]_libs="-ld3d9 -ld3dx9 -lgdi32"
|
2009-03-14 10:24:53 -07:00
|
|
|
],
|
2010-10-26 16:37:28 -07:00
|
|
|
[have_dep="no"; break]
|
2008-11-23 22:18:31 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2011-11-02 11:23:54 -07:00
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_GL_COCOA(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_COCOA],
|
|
|
|
[
|
|
|
|
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_LANG_PUSH([Objective C])
|
|
|
|
|
|
|
|
LIBS_save="$LIBS"
|
|
|
|
LIBS="$LIBS -framework Cocoa"
|
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM(
|
|
|
|
[[
|
|
|
|
#include <Cocoa/Cocoa.h>
|
|
|
|
]],
|
|
|
|
[[
|
|
|
|
NSWindow *window;
|
|
|
|
window = [[NSWindow alloc]
|
|
|
|
initWithContentRect:NSMakeRect(0, 0, 1, 1)
|
|
|
|
styleMask:(NSTitledWindowMask)
|
|
|
|
backing:NSBackingStoreBuffered
|
|
|
|
defer:NO
|
|
|
|
screen:nil
|
|
|
|
];
|
|
|
|
]])],
|
|
|
|
[
|
|
|
|
have_dep="yes"
|
|
|
|
evas_engine_[]$1[]_libs="-framework Cocoa"
|
|
|
|
],
|
|
|
|
[have_dep="no"])
|
|
|
|
LIBS="$LIBS_save"
|
|
|
|
|
|
|
|
AC_LANG_POP([Objective C])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
2012-03-16 23:25:41 -07:00
|
|
|
PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"])
|
2011-11-02 11:23:54 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2011-09-06 23:53:28 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_SDL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_SDL],
|
|
|
|
[
|
|
|
|
|
|
|
|
requirement=""
|
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
2008-11-23 22:18:31 -08:00
|
|
|
PKG_CHECK_MODULES([SDL],
|
|
|
|
[sdl >= 1.2.0],
|
|
|
|
[
|
|
|
|
have_dep="yes"
|
2009-09-27 12:57:01 -07:00
|
|
|
requirement="sdl"
|
2008-11-23 22:18:31 -08:00
|
|
|
evas_engine_[]$1[]_cflags="${SDL_CFLAGS}"
|
|
|
|
evas_engine_[]$1[]_libs="${SDL_LIBS}"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
if test "x$3" = "xstatic" ; then
|
|
|
|
requirement_evas="${requirement} ${requirement_evas}"
|
|
|
|
fi
|
|
|
|
|
2008-11-23 22:18:31 -08:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2010-01-28 18:31:37 -08:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_GL_SDL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_SDL],
|
|
|
|
[
|
|
|
|
|
|
|
|
requirement=""
|
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES([SDL],
|
|
|
|
[sdl >= 1.2.0],
|
|
|
|
[
|
|
|
|
have_dep="yes"
|
|
|
|
requirement="sdl"
|
|
|
|
evas_engine_[]$1[]_cflags="${SDL_CFLAGS}"
|
|
|
|
evas_engine_[]$1[]_libs="${SDL_LIBS}"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2010-10-26 16:31:58 -07:00
|
|
|
gl_pt_lib="";
|
|
|
|
have_gl_pt="no"
|
2011-11-10 10:14:48 -08:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether pthread_create() is supported])
|
|
|
|
CFLAGS_save="${CFLAGS}"
|
|
|
|
CFLAGS="${CFLAGS} -pthread"
|
|
|
|
LIBS_save="${LIBS}"
|
|
|
|
LIBS="${LIBS} -pthread"
|
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[
|
|
|
|
#include <pthread.h>
|
|
|
|
]],
|
|
|
|
[[
|
|
|
|
pthread_create(NULL, NULL, NULL, NULL);
|
|
|
|
]])],
|
|
|
|
[have_gl_pt="yes"],
|
|
|
|
[have_gl_pt="no"])
|
|
|
|
CFLAGS=${CFLAGS_save}
|
|
|
|
LIBS=${LIBS_save}
|
|
|
|
AC_MSG_RESULT([${have_gl_pt}])
|
|
|
|
|
2010-10-26 16:31:58 -07:00
|
|
|
if test "x$have_gl_pt" = "xyes" ; then
|
2011-11-10 10:14:48 -08:00
|
|
|
gl_pt_lib=" -pthread"
|
2010-10-26 16:31:58 -07:00
|
|
|
fi
|
|
|
|
|
2010-10-26 17:00:52 -07:00
|
|
|
AC_CHECK_HEADER([GL/gl.h],
|
2010-01-28 18:31:37 -08:00
|
|
|
[have_dep="yes"],
|
2010-10-26 16:31:58 -07:00
|
|
|
[have_dep="no"],
|
|
|
|
[
|
|
|
|
#include <GL/gl.h>
|
|
|
|
#include <GL/glext.h>
|
|
|
|
])
|
2010-01-28 18:31:37 -08:00
|
|
|
|
|
|
|
if test "x$gl_flavor_gles" = "xyes" ; then
|
|
|
|
have_dep=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
evas_engine_[]$1[]_cflags="${SDL_CFLAGS}"
|
2010-10-26 16:31:58 -07:00
|
|
|
evas_engine_[]$1[]_libs="${SDL_LIBS} -lGL -lm $gl_pt_lib"
|
|
|
|
evas_engine_gl_common_libs="-lGL -lm $gl_pt_lib"
|
2010-01-28 18:31:37 -08:00
|
|
|
else
|
2010-10-26 17:00:52 -07:00
|
|
|
AC_CHECK_HEADER([SDL/SDL_opengles.h],
|
2010-10-26 16:31:58 -07:00
|
|
|
[have_egl="yes"],
|
|
|
|
[have_egl="no"],
|
|
|
|
[
|
|
|
|
#include <SDL/SDL_opengles.h>
|
|
|
|
#include <EGL/egl.h>
|
|
|
|
])
|
2010-01-28 18:31:37 -08:00
|
|
|
if test "x${have_egl}" = "xyes" ; then
|
2010-10-26 16:31:58 -07:00
|
|
|
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lm $gl_pt_lib)
|
2010-01-28 18:31:37 -08:00
|
|
|
if test "x${have_glesv2}" = "xyes" ; then
|
|
|
|
evas_engine_[]$1[]_cflags="${SDL_CFLAGS}"
|
2010-10-26 16:31:58 -07:00
|
|
|
evas_engine_[]$1[]_libs="${SDL_LIBS} -lGLESv2 -lEGL -lm $gl_pt_lib"
|
|
|
|
evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib"
|
2010-01-28 18:31:37 -08:00
|
|
|
have_dep="yes"
|
2010-10-26 16:31:58 -07:00
|
|
|
AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
|
|
|
|
gles_variety_sgx="yes"
|
2010-01-28 18:31:37 -08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x$3" = "xstatic" ; then
|
|
|
|
requirement_evas="${requirement} ${requirement_evas}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_FB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_FB],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([linux/fb.h], [have_dep="yes"])
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_DIRECTFB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_DIRECTFB],
|
|
|
|
[
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
requirement=""
|
2008-11-23 22:18:31 -08:00
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES([DIRECTFB],
|
|
|
|
[directfb >= 0.9.16],
|
|
|
|
[
|
|
|
|
have_dep="yes"
|
2009-09-27 12:57:01 -07:00
|
|
|
requirement="directfb"
|
2008-11-23 22:18:31 -08:00
|
|
|
evas_engine_[]$1[]_cflags="${DIRECTFB_CFLAGS}"
|
|
|
|
evas_engine_[]$1[]_libs="${DIRECTFB_LIBS}"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
if test "x$3" = "xstatic" ; then
|
|
|
|
requirement_evas="${requirement} ${requirement_evas}"
|
|
|
|
fi
|
|
|
|
|
2008-11-23 22:18:31 -08:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2010-07-27 17:16:06 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_8_X11(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_8_X11],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES([XCB],
|
|
|
|
[xcb xcb-shm xcb-image >= 0.2.1 pixman-1],
|
|
|
|
[
|
|
|
|
have_dep="yes"
|
|
|
|
requirement="xcb xcb-shm xcb-image pixman-1"
|
|
|
|
evas_engine_[]$1[]_cflags="${XCB_CFLAGS}"
|
|
|
|
evas_engine_[]$1[]_libs="${XCB_LIBS}"
|
|
|
|
],[
|
|
|
|
have_dep="no"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x$3" = "xstatic" ; then
|
|
|
|
requirement_evas="${requirement} ${requirement_evas}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_X11(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2008-11-23 22:18:31 -08:00
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_X11],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_PATH_X
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([X11/X.h], [have_dep="yes"])
|
|
|
|
|
2009-08-03 01:26:02 -07:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([X11], [XCreateImage], [have_dep="yes"], [have_dep="no"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([Xext], [XShmCreateImage], [have_dep="yes"], [have_dep="no"])
|
|
|
|
fi
|
|
|
|
|
2008-11-23 22:18:31 -08:00
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
if test "x$2" = "xyes" ; then
|
|
|
|
x_libs="${x_libs} -lX11 -lXext"
|
|
|
|
else
|
|
|
|
x_dir=${x_dir:-/usr/X11R6}
|
|
|
|
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
|
|
|
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
|
|
|
|
fi
|
|
|
|
evas_engine_[]$1[]_cflags="${x_cflags}"
|
|
|
|
evas_engine_[]$1[]_libs="${x_libs}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_DDRAW(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_DDRAW],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([ddraw.h],
|
|
|
|
[
|
|
|
|
have_dep="yes"
|
|
|
|
evas_engine_[]$1[]_libs="-lddraw -lgdi32"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2009-09-27 12:57:01 -07:00
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_WINCE(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_16_WINCE],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="yes"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
2011-11-05 10:49:37 -07:00
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_PSL1GHT(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_PSL1GHT],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([rsx/rsx.h], [have_dep="yes"])
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
2008-11-23 22:18:31 -08:00
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
2009-09-27 12:57:01 -07:00
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2011-12-14 10:44:20 -08:00
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="yes"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL],
|
|
|
|
[
|
|
|
|
|
|
|
|
requirement=""
|
|
|
|
have_dep="no"
|
|
|
|
evas_engine_[]$1[]_cflags=""
|
|
|
|
evas_engine_[]$1[]_libs=""
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES([WAYLAND_EGL],
|
2011-12-26 15:13:52 -08:00
|
|
|
[egl >= 7.10 glesv2 gl wayland-client wayland-egl],
|
2011-12-14 10:44:20 -08:00
|
|
|
[
|
|
|
|
have_dep="yes"
|
2011-12-26 15:13:52 -08:00
|
|
|
requirement="egl >= 7.10 glesv2 gl wayland-client wayland-egl"
|
2011-12-14 10:44:20 -08:00
|
|
|
evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}"
|
|
|
|
evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS}"
|
|
|
|
],[
|
|
|
|
have_dep="no"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
2012-03-16 23:25:41 -07:00
|
|
|
PKG_CHECK_MODULES([GL_EET], [eet >= 1.6.0], [have_dep="yes"], [have_dep="no"])
|
2012-01-28 05:47:12 -08:00
|
|
|
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lm)
|
|
|
|
if test "x${have_glesv2}" = "xyes" ; then
|
|
|
|
evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}"
|
|
|
|
evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS} -lGL -lGLESv2 -lEGL"
|
|
|
|
fi
|
2011-12-14 10:44:20 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([evas_engine_$1_cflags])
|
|
|
|
AC_SUBST([evas_engine_$1_libs])
|
|
|
|
|
|
|
|
if test "x$3" = "xstatic" ; then
|
|
|
|
requirement_evas="${requirement} ${requirement_evas}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$4], [:])
|
|
|
|
else
|
|
|
|
m4_default([$5], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2008-11-23 22:18:31 -08:00
|
|
|
dnl use: EVAS_CHECK_ENGINE(engine, want_engine, simple, description)
|
|
|
|
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_ENGINE],
|
|
|
|
[
|
|
|
|
|
|
|
|
m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
|
|
|
|
m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
|
|
|
|
|
|
|
|
want_engine="$2"
|
2009-06-22 10:35:31 -07:00
|
|
|
want_static_engine="no"
|
|
|
|
have_engine="no"
|
2008-11-23 22:18:31 -08:00
|
|
|
have_evas_engine_[]DOWN="no"
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([$1],
|
2008-11-24 17:52:13 -08:00
|
|
|
[AC_HELP_STRING([--enable-$1], [enable $4 rendering backend])],
|
2009-06-22 10:35:31 -07:00
|
|
|
[
|
|
|
|
if test "x${enableval}" = "xyes" ; then
|
|
|
|
want_engine="yes"
|
|
|
|
else
|
|
|
|
if test "x${enableval}" = "xstatic" ; then
|
|
|
|
want_engine="static"
|
|
|
|
else
|
|
|
|
want_engine="no"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to enable $4 rendering backend])
|
|
|
|
AC_MSG_RESULT([${want_engine}])
|
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic" -o "x${want_engine}" = "xauto" ; then
|
2009-09-27 12:57:01 -07:00
|
|
|
m4_default([EVAS_CHECK_ENGINE_DEP_]m4_defn([UP]))(DOWN, $3, ${want_engine}, [have_engine="yes"], [have_engine="no"])
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then
|
2008-11-23 22:18:31 -08:00
|
|
|
AC_MSG_ERROR([$4 dependencies not found (strict dependencies checking)])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether $4 rendering backend will be built])
|
2009-06-22 10:35:31 -07:00
|
|
|
AC_MSG_RESULT([${have_engine}])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
if test "x${have_engine}" = "xyes" ; then
|
|
|
|
if test "x${want_engine}" = "xstatic" ; then
|
|
|
|
have_evas_engine_[]DOWN="static"
|
|
|
|
want_static_engine="yes"
|
|
|
|
else
|
|
|
|
have_evas_engine_[]DOWN="yes"
|
|
|
|
fi
|
2008-11-23 22:18:31 -08:00
|
|
|
fi
|
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
if test "x${have_engine}" = "xyes" ; then
|
|
|
|
AC_DEFINE(BUILD_ENGINE_[]UP, [1], [$4 rendering backend])
|
|
|
|
fi
|
2009-06-16 06:01:36 -07:00
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "x${have_engine}" = "xyes"])
|
2009-06-16 06:01:36 -07:00
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
if test "x${want_static_engine}" = "xyes" ; then
|
2009-06-16 06:01:36 -07:00
|
|
|
AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 engine inside libevas])
|
2009-07-14 14:16:08 -07:00
|
|
|
have_static_module="yes"
|
2009-06-16 06:01:36 -07:00
|
|
|
fi
|
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_engine}" = "xyes"])
|
|
|
|
|
2008-12-20 05:22:46 -08:00
|
|
|
m4_popdef([UP])
|
|
|
|
m4_popdef([DOWN])
|
2008-11-23 22:18:31 -08:00
|
|
|
|
|
|
|
])
|