diff options
author | Alexandros Frantzis <alexandros.frantzis@linaro.org> | 2011-03-21 16:12:00 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-05-10 08:36:03 +0100 |
commit | c2b4bc6dead3e1fd0aacd9d767a299259f895e4d (patch) | |
tree | ccf94236334b3e7c29f491148d0a05f5a8bdb1eb /configure.ac | |
parent | 2001d2074723c64b1e5a6cb4c550d6a0a8cea812 (diff) |
gl: Fall back to dlsym() if *GetProcAddress() fails
In strictly conforming EGL implementations, eglGetProcAddress() can be used
only to get extension functions, but some of the functions we want belong to
core GL(ES). If the *GetProcAddress function provided by the context fails,
try to get the address of the wanted GL function using standard system
facilities (eg dlsym() in *nix systems).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9107b3e35..72caa0dcd 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,9 @@ if test "x$have_dlsym" = "xno"; then fi AC_CHECK_HEADERS(dlfcn.h, [have_dlsym=yes], [have_dlsym=no]) AM_CONDITIONAL(CAIRO_HAS_DL, test "x$have_dl" = "xyes") +if test "x$have_dlsym" = "xyes"; then + AC_DEFINE([CAIRO_HAS_DLSYM], 1, [Define to 1 if dlsym is available]) +fi dnl =========================================================================== @@ -317,6 +320,10 @@ CAIRO_ENABLE_SURFACE_BACKEND(gl, OpenGL, no, [ gl_NONPKGCONFIG_LIBS="-lGL" fi]) + if test "x$have_dl" = "xyes" -a "x$have_dlsym" = "xyes"; then + gl_LIBS="$gl_LIBS -ldl" + fi + need_glx_functions=yes need_wgl_functions=yes need_egl_functions=yes @@ -333,6 +340,10 @@ CAIRO_ENABLE_SURFACE_BACKEND(glesv2, OpenGLESv2, no, [ glesv2_NONPKGCONFIG_LIBS="-lGLESv2" fi]) + if test "x$have_dl" = "xyes" -a "x$have_dlsym" = "xyes"; then + glesv2_LIBS="$glesv2_LIBS -ldl" + fi + need_egl_functions=yes ]) |