Import wine_tsx11_lock/unlock directly from x11drv in opengl32 and
ddraw, so that they don't need to link with libwine_tsx11.
Removed header wine_gl.h.

diff --git a/dlls/opengl32/opengl_ext.h b/dlls/opengl32/opengl_ext.h
index e0f3d4d..32e81a2 100644
--- a/dlls/opengl32/opengl_ext.h
+++ b/dlls/opengl32/opengl_ext.h
@@ -19,6 +19,37 @@
 #ifndef __DLLS_OPENGL32_OPENGL_EXT_H
 #define __DLLS_OPENGL32_OPENGL_EXT_H
 
+#undef APIENTRY
+#undef CALLBACK
+#undef WINAPI
+
+#define XMD_H /* This is to prevent the Xmd.h inclusion bug :-/ */
+#include <GL/gl.h>
+#include <GL/glx.h>
+#ifdef HAVE_GL_GLEXT_H
+# include <GL/glext.h>
+#endif
+#undef  XMD_H
+
+#undef APIENTRY
+#undef CALLBACK
+#undef WINAPI
+
+/* Redefines the constants */
+#define CALLBACK    __stdcall
+#define WINAPI      __stdcall
+#define APIENTRY    WINAPI
+
+/* X11 locking */
+
+extern void (*wine_tsx11_lock_ptr)(void);
+extern void (*wine_tsx11_unlock_ptr)(void);
+
+/* As GLX relies on X, this is needed */
+#define ENTER_GL() wine_tsx11_lock_ptr()
+#define LEAVE_GL() wine_tsx11_unlock_ptr()
+
+
 typedef struct {
   char  *name;     /* name of the extension */
   char  *glx_name; /* name used on Unix's libGL */