Added '--enable-opengl' flag to bypass the thread-safety check.
This commit is contained in:
parent
abdbced4fd
commit
fbc15b1768
131
configure.in
131
configure.in
|
@ -18,6 +18,7 @@ LIBEXT=so # library type .so or .a
|
||||||
TRACE_MSGS=yes # the TRACE() macro
|
TRACE_MSGS=yes # the TRACE() macro
|
||||||
DEBUG_MSGS=yes # the TRACE(), WARN(), and FIXME() macros.
|
DEBUG_MSGS=yes # the TRACE(), WARN(), and FIXME() macros.
|
||||||
CURSES=yes
|
CURSES=yes
|
||||||
|
OPENGL=normal
|
||||||
|
|
||||||
AC_ARG_ENABLE(emulator,
|
AC_ARG_ENABLE(emulator,
|
||||||
[ --disable-emulator build only the Wine library, not the emulator],
|
[ --disable-emulator build only the Wine library, not the emulator],
|
||||||
|
@ -31,6 +32,10 @@ AC_ARG_ENABLE(debug,
|
||||||
[ --disable-debug compile out all debugging messages],
|
[ --disable-debug compile out all debugging messages],
|
||||||
[if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
|
[if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(opengl,
|
||||||
|
[ --enable-opengl force usage of OpenGL even if the latter is thread-safe],
|
||||||
|
[if test "$enableval" = "no"; then OPENGL="no"; elif test "$enableval" = "yes"; then OPENGL="yes"; fi])
|
||||||
|
|
||||||
AC_ARG_ENABLE(trace,
|
AC_ARG_ENABLE(trace,
|
||||||
[ --disable-trace compile out TRACE messages],
|
[ --disable-trace compile out TRACE messages],
|
||||||
[if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
|
[if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
|
||||||
|
@ -188,64 +193,66 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Check for the presence of Mesa
|
dnl Check for the presence of Mesa
|
||||||
AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/osmesa.h)
|
if test $OPENGL = "yes" -o $OPENGL = "normal"
|
||||||
if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
|
|
||||||
then
|
then
|
||||||
dnl Check for some problems due to old Mesa versions
|
AC_CHECK_HEADERS(GL/gl.h GL/glx.h)
|
||||||
AC_CACHE_CHECK("for up-to-date Mesa version", wine_cv_mesa_version_OK,
|
if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
|
||||||
AC_TRY_COMPILE(
|
then
|
||||||
[#include <GL/gl.h>],
|
dnl Check for some problems due to old Mesa versions
|
||||||
[GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
|
AC_CACHE_CHECK("for up-to-date OpenGL version", wine_cv_mesa_version_OK,
|
||||||
[wine_cv_mesa_version_OK="yes"],
|
AC_TRY_COMPILE(
|
||||||
[wine_cv_mesa_version_OK="no"]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
dnl Check for the thread-safety of the OpenGL library
|
|
||||||
AC_CACHE_CHECK("for thread-safe Mesa version",
|
|
||||||
wine_cv_mesa_version_threadsafe,
|
|
||||||
[saved_libs=$LIBS
|
|
||||||
LIBS="$X_LIBS -lGL"
|
|
||||||
AC_TRY_LINK([],[pthread_getspecific();],
|
|
||||||
[wine_cv_mesa_version_threadsafe="yes"],
|
|
||||||
[wine_cv_mesa_version_threadsafe="no"])
|
|
||||||
LIBS=$saved_libs]
|
|
||||||
)
|
|
||||||
|
|
||||||
if test "$wine_cv_mesa_version_OK" = "yes" -a "$wine_cv_mesa_version_threadsafe" = "no"
|
|
||||||
then
|
|
||||||
dnl Check for the presense of the library
|
|
||||||
AC_CHECK_LIB(GL,glXCreateContext,
|
|
||||||
AC_DEFINE(HAVE_LIBMESAGL)
|
|
||||||
X_PRE_LIBS="$X_PRE_LIBS -lGL"
|
|
||||||
MESA_SRCS='$(MESA_SRCS)'
|
|
||||||
,,
|
|
||||||
$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
|
|
||||||
if test "$ac_cv_lib_GL_glXCreateContext" = "no"
|
|
||||||
then
|
|
||||||
AC_CHECK_LIB(MesaGL,glXCreateContext,
|
|
||||||
AC_DEFINE(HAVE_LIBMESAGL)
|
|
||||||
X_PRE_LIBS="$X_PRE_LIBS -lMesaGL"
|
|
||||||
MESA_SRCS='$(MESA_SRCS)'
|
|
||||||
,,
|
|
||||||
$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Check for the Color Table and Paletted Texture extensions
|
|
||||||
AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
|
|
||||||
AC_TRY_COMPILE(
|
|
||||||
[#include <GL/gl.h>],
|
[#include <GL/gl.h>],
|
||||||
[GLenum test = GL_COLOR_INDEX8_EXT;],
|
[GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
|
||||||
[AC_DEFINE(HAVE_GL_COLOR_TABLE)],
|
[wine_cv_mesa_version_OK="yes"],
|
||||||
|
[wine_cv_mesa_version_OK="no"]
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
dnl Check for the thread-safety of the OpenGL library
|
||||||
|
AC_CACHE_CHECK("for thread-safe OpenGL version",
|
||||||
|
wine_cv_mesa_version_threadsafe,
|
||||||
|
[saved_libs=$LIBS
|
||||||
|
LIBS="$X_LIBS -lGL"
|
||||||
|
AC_TRY_LINK([],[pthread_getspecific();],
|
||||||
|
[wine_cv_mesa_version_threadsafe="yes"],
|
||||||
|
[wine_cv_mesa_version_threadsafe="no"])
|
||||||
|
LIBS=$saved_libs]
|
||||||
)
|
)
|
||||||
if test "$ac_cv_lib_GL_glXCreateContext" = "no"
|
|
||||||
then
|
if test "$wine_cv_mesa_version_OK" = "yes" -a \( "$wine_cv_mesa_version_threadsafe" = "no" -o $OPENGL = "yes" \)
|
||||||
AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
|
then
|
||||||
else
|
dnl Check for the presense of the library
|
||||||
AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
|
AC_CHECK_LIB(GL,glXCreateContext,
|
||||||
fi
|
AC_DEFINE(HAVE_LIBMESAGL)
|
||||||
fi
|
X_PRE_LIBS="$X_PRE_LIBS -lGL"
|
||||||
|
MESA_SRCS='$(MESA_SRCS)'
|
||||||
|
,,
|
||||||
|
$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
|
||||||
|
|
||||||
|
if test "$ac_cv_lib_GL_glXCreateContext" = "no"
|
||||||
|
then
|
||||||
|
AC_CHECK_LIB(MesaGL,glXCreateContext,
|
||||||
|
AC_DEFINE(HAVE_LIBMESAGL)
|
||||||
|
X_PRE_LIBS="$X_PRE_LIBS -lMesaGL"
|
||||||
|
MESA_SRCS='$(MESA_SRCS)'
|
||||||
|
,,
|
||||||
|
$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Check for the Color Table and Paletted Texture extensions
|
||||||
|
AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
|
||||||
|
AC_TRY_COMPILE([#include <GL/gl.h>],
|
||||||
|
[GLenum test = GL_COLOR_INDEX8_EXT;],
|
||||||
|
[AC_DEFINE(HAVE_GL_COLOR_TABLE)],))
|
||||||
|
|
||||||
|
if test "$ac_cv_lib_GL_glXCreateContext" = "no"
|
||||||
|
then
|
||||||
|
AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
|
||||||
|
else
|
||||||
|
AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||||
|
@ -1103,14 +1110,24 @@ then
|
||||||
echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
|
echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wine_cv_mesa_version_threadsafe" = "yes"
|
if test "$wine_cv_mesa_version_threadsafe" = "yes" -a $OPENGL = "normal"
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
|
echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
|
||||||
echo "*** thread-safety. To prevent crashes, OpenGL support has been removed"
|
echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
|
||||||
echo "*** (while we work on a better fix)."
|
echo "*** A fix for glibc 2.1.3 that seem to work is included in this version of Wine,"
|
||||||
|
echo "*** start configure with '--enable-opengl' to force OpenGL support."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$wine_cv_mesa_version_threadsafe" = "yes" -a $OPENGL = "yes"
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo "*** Warning: you explicitely linked in a thread-safe OpenGL version. If you"
|
||||||
|
echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
|
||||||
|
echo "*** support before reporting bugs."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Configure finished. Do 'make depend && make' to compile Wine."
|
echo "Configure finished. Do 'make depend && make' to compile Wine."
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -242,9 +242,6 @@
|
||||||
/* Define if you have the <GL/glx.h> header file. */
|
/* Define if you have the <GL/glx.h> header file. */
|
||||||
#undef HAVE_GL_GLX_H
|
#undef HAVE_GL_GLX_H
|
||||||
|
|
||||||
/* Define if you have the <GL/osmesa.h> header file. */
|
|
||||||
#undef HAVE_GL_OSMESA_H
|
|
||||||
|
|
||||||
/* Define if you have the <X11/Xlib.h> header file. */
|
/* Define if you have the <X11/Xlib.h> header file. */
|
||||||
#undef HAVE_X11_XLIB_H
|
#undef HAVE_X11_XLIB_H
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue