Evas: Check for dlsym and disable gl engines if not found

SVN revision: 64091
This commit is contained in:
Youness Alaoui 2011-10-15 09:31:04 +00:00
parent 84e9551521
commit 93d79aa509
5 changed files with 20 additions and 11 deletions

View File

@ -484,22 +484,24 @@ dlopen_libs=""
case "$host_os" in
mingw32ce*)
# managed by evil
AC_DEFINE(HAVE_DLADDR)
AC_DEFINE(HAVE_DLSYM)
;;
mingw*)
# nothing on mingw platform
;;
*)
AC_CHECK_FUNCS(dlopen, res=yes, res=no)
AC_CHECK_FUNCS(dlsym, res=yes, res=no)
if test "x$res" = "xyes"; then
AC_CHECK_FUNCS(dladdr, AC_DEFINE(HAVE_DLADDR))
AC_DEFINE(HAVE_DLSYM)
else
AC_CHECK_LIB(dl, dlopen, res=yes, res=no)
AC_CHECK_LIB(dl, dlsym, res=yes, res=no)
if test "x$res" = "xyes"; then
AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
dlopen_libs=-ldl
AC_DEFINE(HAVE_DLSYM)
else
AC_MSG_ERROR(Cannot find dlopen)
want_evas_engine_gl_xlib="no"
want_evas_engine_gl_xcb="no"
want_evas_engine_gl_sdl="no"
fi
fi
esac

View File

@ -1,5 +1,11 @@
#include "evas_gl_private.h"
#ifdef HAVE_DLSYM
# include <dlfcn.h> /* dlopen,dlclose,etc */
#else
# error gl_common should not get compiled if dlsym is not found on the system!
#endif
#define PRG_INVALID 0xffffffff
#define GLPIPES 1

View File

@ -2,8 +2,6 @@
#define _EVAS_GL_PRIVATE_H
#include "evas_gl_common.h"
#include <dlfcn.h> /* dlopen,dlclose,etc */
extern int _evas_engine_GL_common_log_dom;
#ifdef ERR

View File

@ -1,8 +1,6 @@
#include "evas_common.h" /* Also includes international specific stuff */
#include "evas_engine.h"
#include <dlfcn.h> /* dlopen,dlclose,etc */
static void* _sdl_output_setup (int w, int h, int fullscreen, int noframe);
int _evas_engine_GL_SDL_log_dom = -1;

View File

@ -1,7 +1,12 @@
#include "evas_common.h" /* Also includes international specific stuff */
#include "evas_engine.h"
#include <dlfcn.h> /* dlopen,dlclose,etc */
#ifdef HAVE_DLSYM
# include <dlfcn.h> /* dlopen,dlclose,etc */
#else
# error gl_x11 should not get compiled if dlsym is not found on the system!
#endif
#define EVAS_GL_NO_GL_H_CHECK 1
#include "Evas_GL.h"