diff --git a/cogl/cogl-renderer.c b/cogl/cogl-renderer.c index 8b76a77e9..be73adfe6 100644 --- a/cogl/cogl-renderer.c +++ b/cogl/cogl-renderer.c @@ -177,9 +177,6 @@ _cogl_renderer_choose_driver (CoglRenderer *renderer, { const char *driver_name = g_getenv ("COGL_DRIVER"); const char *libgl_name; -#ifndef HAVE_DIRECTLY_LINKED_GL_LIBRARY - char *libgl_module_path; -#endif #ifdef HAVE_COGL_GL if (driver_name == NULL || !strcmp (driver_name, "gl")) @@ -218,14 +215,9 @@ _cogl_renderer_choose_driver (CoglRenderer *renderer, #ifndef HAVE_DIRECTLY_LINKED_GL_LIBRARY - libgl_module_path = g_module_build_path (NULL, /* standard lib search path */ - libgl_name); - - renderer->libgl_module = g_module_open (libgl_module_path, + renderer->libgl_module = g_module_open (libgl_name, G_MODULE_BIND_LAZY); - g_free (libgl_module_path); - if (renderer->libgl_module == NULL) { g_set_error (error, COGL_DRIVER_ERROR, diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c index 17ac612ff..12d7a54a6 100644 --- a/cogl/winsys/cogl-winsys-glx.c +++ b/cogl/winsys/cogl-winsys-glx.c @@ -333,7 +333,6 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer, { CoglGLXRenderer *glx_renderer; CoglXlibRenderer *xlib_renderer; - char *libgl_module_path; renderer->winsys = g_slice_new0 (CoglGLXRenderer); @@ -343,14 +342,9 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer, if (!_cogl_xlib_renderer_connect (renderer, error)) goto error; - libgl_module_path = g_module_build_path (NULL, /* standard lib search path */ - COGL_GL_LIBNAME); - - glx_renderer->libgl_module = g_module_open (libgl_module_path, + glx_renderer->libgl_module = g_module_open (COGL_GL_LIBNAME, G_MODULE_BIND_LAZY); - g_free (libgl_module_path); - if (glx_renderer->libgl_module == NULL) { g_set_error (error, COGL_WINSYS_ERROR, diff --git a/configure.ac b/configure.ac index 716283823..a31d65fa8 100644 --- a/configure.ac +++ b/configure.ac @@ -387,7 +387,7 @@ AS_IF([test "x$enable_gles1" = "xyes"], PKG_CHECK_EXISTS([glesv1_cm], [COGL_PKG_REQUIRES_GL="$COGL_PKG_REQUIRES_GL glesv1_cm" - COGL_GLES1_LIBNAME="GLESv1_CM" + COGL_GLES1_LIBNAME="libGLESv1_CM.so" NEED_EGL=yes ], [ @@ -430,10 +430,10 @@ AS_IF([test "x$enable_gles1" = "xyes"], # bundles the GLES and EGL API together and -lGLESv1_CM # would be used for a standalone GLES API. AC_CHECK_LIB(GLES_CM, [eglInitialize], - [COGL_GLES1_LIBNAME="GLES_CM"], + [COGL_GLES1_LIBNAME="libGLES_CM.so"], [ AC_CHECK_LIB(GLESv1_CM, [glFlush], - [COGL_GLES1_LIBNAME="GLESv1_CM" + [COGL_GLES1_LIBNAME="libGLESv1_CM.so" NEED_SEPARATE_EGL=yes ], [AC_MSG_ERROR([Unable to locate required GLES 1.x Common Profile library])]) @@ -463,7 +463,7 @@ AS_IF([test "x$enable_gles2" = "xyes"], PKG_CHECK_EXISTS([glesv2], [COGL_PKG_REQUIRES_GL="$COGL_PKG_REQUIRES_GL glesv2" - COGL_GLES2_LIBNAME="GLESv2" + COGL_GLES2_LIBNAME="libGLESv2.so" ], [ # We have to check the two headers independently as GLES2/gl2ext.h @@ -477,7 +477,7 @@ AS_IF([test "x$enable_gles2" = "xyes"], [AC_MSG_ERROR([Unable to locate GLES2/gl2ext.h])], [#include ]) - COGL_GLES2_LIBNAME="GLESv2" + COGL_GLES2_LIBNAME="libGLESv2.so" ]) NEED_EGL=yes @@ -527,7 +527,7 @@ AS_IF([test "x$enable_gl" = "xyes"], , [AC_MSG_ERROR([Unable to locate required GL library])]) ]) - COGL_GL_LIBNAME="GL" + COGL_GL_LIBNAME="libGL.so.1" ]) AC_DEFINE([HAVE_COGL_GL], [1], [Have GL for rendering])