Commit 5d68f79a authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

Better detection of OpenGL.

parent 22d2c527
......@@ -135,8 +135,8 @@ then
fi
dnl Check for the presence of Mesa
AC_CHECK_HEADERS(GL/gl.h GL/osmesa.h)
if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_osmesa_h" = "yes"
AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/osmesa.h)
if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
then
dnl Check for some problems due to old Mesa versions
AC_CACHE_CHECK("for up-to-date Mesa version", wine_cv_mesa_version_OK,
......@@ -151,7 +151,11 @@ then
if test "$wine_cv_mesa_version_OK" = "yes"
then
dnl Check for the presense of the library
AC_CHECK_LIB(MesaGL,OSMesaCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lMesaGL",,$X_LIBS -lXext -lX11 -lm)
AC_CHECK_LIB(GL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lGL",,$X_LIBS -lXext -lX11 -lm)
if test "$ac_cv_lib_GL_glXCreateContext" = "no"
then
AC_CHECK_LIB(MesaGL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lGL",,$X_LIBS -lXext -lX11 -lm)
fi
fi
fi
......
......@@ -184,6 +184,9 @@
/* Define if you have the <GL/gl.h> header file. */
#undef HAVE_GL_GL_H
/* Define if you have the <GL/glx.h> header file. */
#undef HAVE_GL_GLX_H
/* Define if you have the <GL/osmesa.h> header file. */
#undef HAVE_GL_OSMESA_H
......
......@@ -9,7 +9,7 @@
#include "config.h"
#if defined(HAVE_LIBMESAGL) && defined(HAVE_GL_OSMESA_H)
#if defined(HAVE_LIBMESAGL) && defined(HAVE_GL_GLX_H)
#define HAVE_MESAGL
......@@ -18,9 +18,6 @@
#undef WINAPI
#include <GL/gl.h>
/* These will need to have some #ifdef / #endif added to support
more than the X11 using OSMesa target */
#include <GL/osmesa.h>
#include <GL/glx.h>
#undef APIENTRY
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment