configure: Support for recent versions of OSMesa.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2017-04-24 01:20:15 +02:00 committed by Alexandre Julliard
parent 87a8c55811
commit f625707ffc
3 changed files with 12 additions and 11 deletions

4
configure vendored
View File

@ -10866,11 +10866,11 @@ LIBS="-lOSMesa $X_LIBS -lm $X_EXTRA_LIBS $LIBS"
#ifdef __cplusplus
extern "C"
#endif
char glAccum ();
char OSMesaGetProcAddress ();
int
main ()
{
return glAccum ();
return OSMesaGetProcAddress ();
;
return 0;
}

View File

@ -1149,7 +1149,7 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
if test "x$with_osmesa" != "xno"
then
WINE_CHECK_SONAME(OSMesa,glAccum,,,[$X_LIBS -lm $X_EXTRA_LIBS])
WINE_CHECK_SONAME(OSMesa,OSMesaGetProcAddress,,,[$X_LIBS -lm $X_EXTRA_LIBS])
WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"],
[libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.])
fi

View File

@ -113,14 +113,6 @@ static BOOL init_opengl(void)
return FALSE;
}
for (i = 0; i < sizeof(opengl_func_names)/sizeof(opengl_func_names[0]); i++)
{
if (!(((void **)&opengl_funcs.gl)[i] = wine_dlsym( osmesa_handle, opengl_func_names[i], buffer, sizeof(buffer) )))
{
ERR( "%s not found in %s (%s), disabling.\n", opengl_func_names[i], SONAME_LIBOSMESA, buffer );
goto failed;
}
}
#define LOAD_FUNCPTR(f) do if (!(p##f = wine_dlsym( osmesa_handle, #f, buffer, sizeof(buffer) ))) \
{ \
ERR( "%s not found in %s (%s), disabling.\n", #f, SONAME_LIBOSMESA, buffer ); \
@ -134,6 +126,15 @@ static BOOL init_opengl(void)
LOAD_FUNCPTR(OSMesaPixelStore);
#undef LOAD_FUNCPTR
for (i = 0; i < sizeof(opengl_func_names)/sizeof(opengl_func_names[0]); i++)
{
if (!(((void **)&opengl_funcs.gl)[i] = pOSMesaGetProcAddress( opengl_func_names[i] )))
{
ERR( "%s not found in %s, disabling.\n", opengl_func_names[i], SONAME_LIBOSMESA );
goto failed;
}
}
return TRUE;
failed: