Sebastian Lackner : configure: Support for recent versions of OSMesa.

Alexandre Julliard julliard at winehq.org
Sun Mar 18 09:02:34 CDT 2018


Module: wine
Branch: oldstable
Commit: 42d017be9282231e3ed49f7536f1f63ef233e216
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=42d017be9282231e3ed49f7536f1f63ef233e216

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Mon Apr 24 01:20:15 2017 +0200

configure: Support for recent versions of OSMesa.

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit f625707ffc38c58cc296c8a27ac6c2b3e1c38249)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 configure                  |  4 ++--
 configure.ac               |  2 +-
 dlls/gdi32/dibdrv/opengl.c | 17 +++++++++--------
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/configure b/configure
index b77245f..1c5c2c9 100755
--- a/configure
+++ b/configure
@@ -10806,11 +10806,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;
 }
diff --git a/configure.ac b/configure.ac
index 9b75b4f..8c57db9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/dlls/gdi32/dibdrv/opengl.c b/dlls/gdi32/dibdrv/opengl.c
index 4133116..77d6320 100644
--- a/dlls/gdi32/dibdrv/opengl.c
+++ b/dlls/gdi32/dibdrv/opengl.c
@@ -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:




More information about the wine-cvs mailing list