diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2013-01-10 15:09:46 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2013-01-10 15:11:57 +0200 |
commit | dc7e074fc89677d87194b2836c18755788c22f1c (patch) | |
tree | 694aea59dc0e577fddb76f837f742a733c2030e4 /configure.ac | |
parent | b0a827aa839afefd580c438ea72a7e5ca0b88aea (diff) |
Make it possible to even try building the OpenGL transitions for Windows
Change-Id: Id9b688a22518aedb8959120f909832f0cd84b324
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 85 |
1 files changed, 48 insertions, 37 deletions
diff --git a/configure.ac b/configure.ac index 688f2e4d89b4..60daa23c8a16 100644 --- a/configure.ac +++ b/configure.ac @@ -867,8 +867,7 @@ AC_ARG_ENABLE(cairo-canvas, AC_ARG_ENABLE(opengl, AS_HELP_STRING([--disable-opengl], - [Determines whether to build the OpenGL 3D slide transitions component.]), -,enable_opengl=yes) + [Determines whether to build the OpenGL 3D slide transitions component.])) AC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], @@ -9702,47 +9701,59 @@ dnl =================================================================== AC_MSG_CHECKING([whether to build the OpenGL Transitions component]) ENABLE_OPENGL= -if test "$_os" = "Darwin"; then +if test -z "$enable_opengl"; then + if test $_os = WINNT; then + # By default disable the OpenGL transitions for Windows (the code doesn't even compile + # currently). In other words, use --enable-opengl only if you plan to hack on that code for + # Windows. + enable_opengl=no + else + enable_opengl=yes + fi +fi + +if test "x$enable_opengl" = "xno"; then + AC_MSG_RESULT([no]) +elif test "$_os" = "Darwin"; then # We use frameworks on Mac OS X, no need for detail checks ENABLE_OPENGL=TRUE SYSTEM_MESA_HEADERS=YES AC_MSG_RESULT([yes]) +elif test $_os = WINNT; then + # Experimental: try to use OpenGL on Windows + ENABLE_OPENGL=TRUE + # We need the internal "Mesa" headers. + SYSTEM_MESA_HEADERS=NO + BUILD_TYPE="$BUILD_TYPE MESA" + AC_MSG_RESULT([yes]) else - if test "x$enable_opengl" != "xno"; then - if test "$_os" != "WINNT"; then - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -lm" - AC_MSG_RESULT([yes]) - AC_CHECK_LIB([GL], [main], [:], - [AC_MSG_ERROR(libGL not installed or functional)], []) - AC_CHECK_LIB([GLU], [main], [:], - [AC_MSG_ERROR(libGLU not installed or functional)], []) - ENABLE_OPENGL=TRUE - LDFLAGS=$save_LDFLAGS - - dnl =================================================================== - dnl Check for system Mesa - dnl =================================================================== - AC_MSG_CHECKING([which Mesa headers to use]) - if test "$with_system_mesa_headers" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_MESA_HEADERS=YES - AC_LANG_PUSH(C) - AC_CHECK_HEADER(GL/glxext.h, [], - [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>]) - AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC]) - AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no)) - AC_LANG_POP(C) - else - AC_MSG_RESULT([internal]) - SYSTEM_MESA_HEADERS=NO - BUILD_TYPE="$BUILD_TYPE MESA" - fi - else - AC_MSG_RESULT([not on Windows]) - fi + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -lm" + AC_MSG_RESULT([yes]) + AC_CHECK_LIB([GL], [main], [:], + [AC_MSG_ERROR(libGL not installed or functional)], []) + AC_CHECK_LIB([GLU], [main], [:], + [AC_MSG_ERROR(libGLU not installed or functional)], []) + ENABLE_OPENGL=TRUE + LDFLAGS=$save_LDFLAGS + + dnl =================================================================== + dnl Check for system Mesa + dnl =================================================================== + AC_MSG_CHECKING([which Mesa headers to use]) + if test "$with_system_mesa_headers" = "yes"; then + AC_MSG_RESULT([external]) + SYSTEM_MESA_HEADERS=YES + AC_LANG_PUSH(C) + AC_CHECK_HEADER(GL/glxext.h, [], + [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>]) + AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC]) + AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no)) + AC_LANG_POP(C) else - AC_MSG_RESULT([no]) + AC_MSG_RESULT([internal]) + SYSTEM_MESA_HEADERS=NO + BUILD_TYPE="$BUILD_TYPE MESA" fi fi |