[Libreoffice-commits] core.git: canvas/Module_canvas.mk config_host.mk.in configure.ac Repository.mk

Christian Lohmaier lohmaier+LibreOffice at googlemail.com
Mon Oct 7 14:29:47 PDT 2013


 Repository.mk           |    2 +-
 canvas/Module_canvas.mk |    2 +-
 config_host.mk.in       |    1 +
 configure.ac            |   12 ++++++++++--
 4 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 6019a157512fb3182c165e8264e9d4024b76b280
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Mon Oct 7 23:19:08 2013 +0200

    only build openGL canvas when libGL supports shader
    
    and disable for Mac until code is adjusted to compile
    
    Change-Id: I48c69962ae5e59ae3bdd35d343deeeffdde6e903
    Reviewed-on: https://gerrit.libreoffice.org/6160
    Reviewed-by: Thorsten Behrens <thb at documentfoundation.org>
    Tested-by: Thorsten Behrens <thb at documentfoundation.org>

diff --git a/Repository.mk b/Repository.mk
index d306442..e43db47 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -229,7 +229,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
 	$(if $(filter unx,$(GUIBASE)),desktop_detector) \
 	$(if $(DISABLE_SCRIPTING),,dlgprov) \
 	$(if $(ENABLE_DIRECTX),directx9canvas) \
-	$(if $(ENABLE_OPENGL),oglcanvas) \
+	$(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \
 	drawinglayer \
 	editeng \
 	egi \
diff --git a/canvas/Module_canvas.mk b/canvas/Module_canvas.mk
index 510cb98..310ad2a 100644
--- a/canvas/Module_canvas.mk
+++ b/canvas/Module_canvas.mk
@@ -32,7 +32,7 @@ $(eval $(call gb_Module_add_targets,canvas,\
 ))
 endif
 
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_OPENGL_CANVAS),TRUE)
 $(eval $(call gb_Module_add_targets,canvas,\
 	Library_oglcanvas \
 ))
diff --git a/config_host.mk.in b/config_host.mk.in
index 4536c21..8aceea3 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -146,6 +146,7 @@ export ENABLE_NPAPI_INTO_BROWSER=@ENABLE_NPAPI_INTO_BROWSER@
 export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
 export ENABLE_OOENV=@ENABLE_OOENV@
 export ENABLE_OPENGL=@ENABLE_OPENGL@
+export ENABLE_OPENGL_CANVAS=@ENABLE_OPENGL_CANVAS@
 export ENABLE_OPENCL=@ENABLE_OPENCL@
 export ENABLE_PACKAGEKIT=@ENABLE_PACKAGEKIT@
 export ENABLE_PCH=@ENABLE_PCH@
diff --git a/configure.ac b/configure.ac
index 1da0a2e..c351f0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10263,11 +10263,14 @@ if test "x$enable_opengl" = "xno"; then
 elif test "$_os" = "Darwin"; then
     # We use frameworks on Mac OS X, no need for detail checks
     ENABLE_OPENGL=TRUE
+    ENABLE_OPENGL_CANVAS=
+    add_warning "openGL canvas not adapted for Mac yet - disabling"
     SYSTEM_MESA_HEADERS=YES
     AC_MSG_RESULT([yes])
 elif test $_os = WINNT; then
     # Experimental: try to use OpenGL on Windows
     ENABLE_OPENGL=TRUE
+    ENABLE_OPENGL_CANVAS=TRUE
     # We need the internal "Mesa" headers.
     SYSTEM_MESA_HEADERS=NO
     BUILD_TYPE="$BUILD_TYPE MESA"
@@ -10276,8 +10279,12 @@ else
     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([GL], [main],
+        [AC_CHECK_LIB([GL], [glCreateShader], [ENABLE_OPENGL_CANVAS=TRUE],
+            [add_warning "no shader support in libGL - will enable openGL transitions, but not openGL canvas"
+             AC_MSG_WARN([no shader support in libGL - will enable openGL transitions, but not openGL canvas])
+             ENABLE_OPENGL_CANVAS=], [])],
+        [AC_MSG_ERROR(libGL not installed or functional)], [])
     LDFLAGS="$LDFLAGS -lGL"
     AC_CHECK_LIB([GLU], [main], [:],
               [AC_MSG_ERROR(libGLU not installed or functional)], [])
@@ -10306,6 +10313,7 @@ fi
 
 AC_SUBST(SYSTEM_MESA_HEADERS)
 AC_SUBST(ENABLE_OPENGL)
+AC_SUBST(ENABLE_OPENGL_CANVAS)
 
 dnl =================================================
 dnl Check whether to build with OpenCL support.


More information about the Libreoffice-commits mailing list