Andreas Bierfert 95da87
From 1ede664b18bd8a88359a3cebb291ad49833ee033 Mon Sep 17 00:00:00 2001
b99de9
From: Alexandre Rostovtsev <tetromino@gentoo.org>
b99de9
Date: Tue, 7 Aug 2012 01:29:01 -0400
b99de9
Subject: [PATCH] Do not check for libGL symbols when checking libOSMesa
b99de9
b99de9
If mesa had been built with shared glapi, glAccum is not available in
b99de9
libOSMesa without explicitly linking to libGL. In addition, in
b99de9
mesa-8.0.x and earlier, libOSMesa needs to be explicitly linked to
b99de9
libglapi if mesa was built with shared glapi, see
b99de9
https://bugs.gentoo.org/show_bug.cgi?id=399813
Andreas Bierfert 95da87
And in mesa-8.1.x, libOSMesa in addition needs libdl, libpthread, and
Andreas Bierfert 95da87
libstdc++, see https://bugs.gentoo.org/show_bug.cgi?id=431832
b99de9
---
Andreas Bierfert 95da87
 configure.ac | 8 +++++++-
Andreas Bierfert 95da87
 1 file changed, 7 insertions(+), 1 deletion(-)
b99de9
b99de9
diff --git a/configure.ac b/configure.ac
Andreas Bierfert 95da87
index cc32c24..275b792 100644
b99de9
--- a/configure.ac
b99de9
+++ b/configure.ac
Andreas Bierfert 95da87
@@ -1128,7 +1128,13 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
b99de9
 
Andreas Bierfert 95da87
         if test "x$with_osmesa" != "xno"
Andreas Bierfert 95da87
         then
Andreas Bierfert 95da87
-            WINE_CHECK_SONAME(OSMesa,glAccum,,,[$X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
Andreas Bierfert 95da87
+            WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[$X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
Andreas Bierfert 95da87
+            if test "x$ac_cv_lib_soname_OSMesa" = "x"; then
Andreas Bierfert 95da87
+                osmesa_save_CC=$CC
Andreas Bierfert 95da87
+                CC=$CXX
Andreas Bierfert 95da87
+                WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[-lglapi -lpthread -ldl $X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
Andreas Bierfert 95da87
+                CC=$osmesa_save_CC
Andreas Bierfert 95da87
+            fi
Andreas Bierfert 95da87
             WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"],
Andreas Bierfert 95da87
                              [libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.])
Andreas Bierfert 95da87
         fi
b99de9
-- 
Andreas Bierfert 95da87
1.8.0
b99de9