diff options
author | David Reveman <davidr@novell.com> | 2005-06-15 06:02:51 +0000 |
---|---|---|
committer | David Reveman <davidr@novell.com> | 2005-06-15 06:02:51 +0000 |
commit | d0ccadf30b458cad6a73a542970db8ec664827a2 (patch) | |
tree | ad63e7101a4f51bdadf5de13d80e401ce37c39a8 | |
parent | ac7fa260d3a6c6e52202fd8f5eddd691374d5fb2 (diff) |
Fix thread support in egl backend
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.in | 23 | ||||
-rw-r--r-- | src/egl/glitz_egl_info.c | 4 |
3 files changed, 30 insertions, 5 deletions
@@ -1,3 +1,11 @@ +2005-06-15 David Reveman <davidr@novell.com> + + * src/egl/glitz_egl_info.c (glitz_egl_get_proc_address): Shut up + compiler. + PTHREADS is now defined in config.h. + + * configure.in: Check for libpthread when building glitz-egl. + 2005-06-07 David Reveman <davidr@novell.com> * src/glitz.h (GLITZ_REVISION): Bump version to 0.4.3. diff --git a/configure.in b/configure.in index 7a9365b..a1d47ad 100644 --- a/configure.in +++ b/configure.in @@ -203,9 +203,26 @@ AC_ARG_ENABLE(egl, AC_HELP_STRING([--enable-egl], [Enable glitz's EGL backend]), [use_egl=$enableval], [use_egl=no]) -EGL_LIBS="-lGL -lEGL" -EGL_CFLAGS="$EGL_CFLAGS" - +if test "x$use_egl" = "xyes"; then + EGL_LIBS="-lGL -lEGL" + EGL_CFLAGS="$EGL_CFLAGS" + + save_libs="$LIBS" + LIBS="-lpthread" + + AC_MSG_CHECKING([for PTHREADS]) + AC_TRY_LINK_FUNC(pthread_key_create, [use_pthreads=yes], [use_pthreads=no]) + + LIBS="$save_LIBS" + + if test "x$use_pthreads" = "xyes" + then + EGL_LIBS="$EGL_LIBS -lpthread" + AC_DEFINE(PTHREADS, 1) + fi + AC_MSG_RESULT($use_pthreads) +fi + if test "x$use_egl" = "xyes"; then AM_CONDITIONAL(GLITZ_BUILD_EGL_BACKEND, true) else diff --git a/src/egl/glitz_egl_info.c b/src/egl/glitz_egl_info.c index 514de5c..f8627b4 100644 --- a/src/egl/glitz_egl_info.c +++ b/src/egl/glitz_egl_info.c @@ -125,7 +125,7 @@ glitz_egl_get_proc_address (const char *name, glitz_function_pointer_t address = NULL; if (screen_info->egl_feature_mask & GLITZ_EGL_FEATURE_GET_PROC_ADDRESS_MASK) - address = eglGetProcAddress ((glitz_gl_ubyte_t *) name); + address = eglGetProcAddress ((char *) name); if (!address) { if (!info->dlhand) @@ -173,7 +173,7 @@ _glitz_egl_thread_info_fini (glitz_egl_thread_info_t *thread_info) thread_info->cctx = NULL; } -#define PTHREADS + #ifdef PTHREADS /* thread safe */ |