[Libreoffice-commits] core.git: avmedia/Library_avmedia.mk avmedia/Library_avmediaogl.mk canvas/Library_oglcanvas.mk chart2/Library_chartcore.mk chart2/Library_chartopengl.mk configure.ac desktop/Library_sofficeapp.mk external/libgltf slideshow/Library_OGLTrans.mk slideshow/Library_slideshow.mk svx/Executable_gengal.mk svx/Library_svxcore.mk vcl/CppunitTest_vcl_bitmap_test.mk vcl/Executable_icontest.mk vcl/Executable_mtfdemo.mk vcl/Executable_ui-previewer.mk vcl/Executable_vcldemo.mk vcl/StaticLibrary_glxtest.mk

Tor Lillqvist tml at collabora.com
Wed Nov 11 15:30:46 PST 2015


 avmedia/Library_avmedia.mk                  |    2 -
 avmedia/Library_avmediaogl.mk               |    2 -
 canvas/Library_oglcanvas.mk                 |    2 -
 chart2/Library_chartcore.mk                 |    2 -
 chart2/Library_chartopengl.mk               |    2 -
 configure.ac                                |   36 ++++++++++++++--------------
 desktop/Library_sofficeapp.mk               |    1 
 external/libgltf/ExternalProject_libgltf.mk |    2 -
 slideshow/Library_OGLTrans.mk               |    2 -
 slideshow/Library_slideshow.mk              |    2 -
 svx/Executable_gengal.mk                    |    1 
 svx/Library_svxcore.mk                      |    2 -
 vcl/CppunitTest_vcl_bitmap_test.mk          |    2 -
 vcl/Executable_icontest.mk                  |    3 --
 vcl/Executable_mtfdemo.mk                   |    1 
 vcl/Executable_ui-previewer.mk              |    1 
 vcl/Executable_vcldemo.mk                   |    3 --
 vcl/StaticLibrary_glxtest.mk                |    1 
 18 files changed, 31 insertions(+), 36 deletions(-)

New commits:
commit b216cc1b8096eb60c27f67e8c27b7cd756c75e38
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 12 01:13:01 2015 +0200

    Avoid mesa_headers on X11, also link with -lGL only where necesssary
    
    The GLEW headers are enough, and what we actually use in these
    places. In addition to handling GL extension things in its dynamic
    fashion, GLEW headers also have declarations for standard,
    non-extension, OpenGL API, including xgl and wgl ones.
    
    Most likely we don't need mesa_headers on Windows or OS X either, and
    can drop them completely.
    
    Change-Id: Ic0d8d6238c862f8fe4a74e99e95344dcbf540980

diff --git a/avmedia/Library_avmedia.mk b/avmedia/Library_avmedia.mk
index ec70670..f922486 100644
--- a/avmedia/Library_avmedia.mk
+++ b/avmedia/Library_avmedia.mk
@@ -26,7 +26,7 @@ $(eval $(call gb_Library_add_defs,avmedia,\
 $(eval $(call gb_Library_use_externals,avmedia,\
 	boost_headers \
 	glew \
-	mesa_headers \
+	$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
 ))
 
 $(eval $(call gb_Library_use_libraries,avmedia,\
diff --git a/avmedia/Library_avmediaogl.mk b/avmedia/Library_avmediaogl.mk
index 3ff9818..117e896 100644
--- a/avmedia/Library_avmediaogl.mk
+++ b/avmedia/Library_avmediaogl.mk
@@ -18,7 +18,7 @@ $(eval $(call gb_Library_use_externals,avmediaogl, \
     libgltf \
     glew \
     glm_headers \
-    mesa_headers \
+    $(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
 ))
 
 $(eval $(call gb_Library_use_libraries,avmediaogl,\
diff --git a/canvas/Library_oglcanvas.mk b/canvas/Library_oglcanvas.mk
index 7f859f6..839567d 100644
--- a/canvas/Library_oglcanvas.mk
+++ b/canvas/Library_oglcanvas.mk
@@ -43,7 +43,7 @@ $(eval $(call gb_Library_add_exception_objects,oglcanvas,\
 $(eval $(call gb_Library_use_externals,oglcanvas,\
 	boost_headers \
 	glew \
-	mesa_headers \
+	$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
 ))
 
 ifeq ($(strip $(OS)),MACOSX)
diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index c65f262..f611c68 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -29,7 +29,7 @@ $(eval $(call gb_Library_use_externals,chartcore,\
 	boost_headers \
 	glm_headers \
 	glew \
-	mesa_headers \
+	$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
 ))
 
 $(eval $(call gb_Library_use_custom_headers,chartcore,\
diff --git a/chart2/Library_chartopengl.mk b/chart2/Library_chartopengl.mk
index 83d52d8..440ef9e 100644
--- a/chart2/Library_chartopengl.mk
+++ b/chart2/Library_chartopengl.mk
@@ -22,7 +22,7 @@ $(eval $(call gb_Library_set_precompiled_header,chartopengl,$(SRCDIR)/chart2/inc
 $(eval $(call gb_Library_use_externals,chartopengl,\
 	boost_headers \
 	glm_headers \
-	mesa_headers \
+	$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
 	glew \
 ))
 
diff --git a/configure.ac b/configure.ac
index 6bdf28d..31cc1d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10410,23 +10410,25 @@ else
     fi
     ENABLE_OPENGL_CANVAS=TRUE
 
-    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=TRUE
-        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=
-        BUILD_TYPE="$BUILD_TYPE MESA"
+    if test "$USING_X11" != TRUE; then
+        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=TRUE
+            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=
+            BUILD_TYPE="$BUILD_TYPE MESA"
+        fi
     fi
 fi
 
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 274bb1a..ef95ecf 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -112,7 +112,6 @@ $(eval $(call gb_Library_use_static_libraries,sofficeapp,\
 $(eval $(call gb_Library_add_libs,sofficeapp,\
 	-lm $(DLOPEN_LIBS) \
 	-lpthread \
-    -lGL \
     -lX11 \
 ))
 endif
diff --git a/external/libgltf/ExternalProject_libgltf.mk b/external/libgltf/ExternalProject_libgltf.mk
index 23aa29c..fcc82af 100644
--- a/external/libgltf/ExternalProject_libgltf.mk
+++ b/external/libgltf/ExternalProject_libgltf.mk
@@ -67,7 +67,7 @@ $(call gb_ExternalProject_get_state_target,libgltf,build) :
 			$(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
 			--disable-werror \
 			BOOST_CFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost))" \
-			GLEW_CFLAGS="$(if $(SYSTEM_GLEW),$(GLEW_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glew)/include)" \
+			GLEW_CFLAGS="$(if $(SYSTEM_GLEW),$(GLEW_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glew)/include) -DGLEW_NO_GLU" \
 			GLM_CFLAGS="$(if $(SYSTEM_GLM),$(GLM_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glm))" \
 			$(if $(libgltf_CPPFLAGS),CPPFLAGS='$(libgltf_CPPFLAGS)') \
 		&& $(MAKE) \
diff --git a/slideshow/Library_OGLTrans.mk b/slideshow/Library_OGLTrans.mk
index 4c3340f..04b44e0 100644
--- a/slideshow/Library_OGLTrans.mk
+++ b/slideshow/Library_OGLTrans.mk
@@ -31,7 +31,7 @@ $(eval $(call gb_Library_use_libraries,OGLTrans,\
 $(eval $(call gb_Library_use_externals,OGLTrans,\
 	boost_headers \
 	glew \
-	mesa_headers \
+	$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
 	glm_headers \
 ))
 
diff --git a/slideshow/Library_slideshow.mk b/slideshow/Library_slideshow.mk
index 5772afd..7d0e815 100644
--- a/slideshow/Library_slideshow.mk
+++ b/slideshow/Library_slideshow.mk
@@ -29,7 +29,7 @@ $(eval $(call gb_Library_set_precompiled_header,slideshow,$(SRCDIR)/slideshow/in
 $(eval $(call gb_Library_use_externals,slideshow,\
 	boost_headers \
 	glew \
-	mesa_headers \
+	$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
 ))
 
 $(eval $(call gb_Library_use_sdk_api,slideshow))
diff --git a/svx/Executable_gengal.mk b/svx/Executable_gengal.mk
index e075b05..e0a45e7 100644
--- a/svx/Executable_gengal.mk
+++ b/svx/Executable_gengal.mk
@@ -71,7 +71,6 @@ ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,gengal,\
 	$(DLOPEN_LIBS) \
 	-lpthread \
-    -lGL \
     -lX11 \
 ))
 
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index ca9e5c5..76d4fcb 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -84,7 +84,7 @@ $(eval $(call gb_Library_use_externals,svxcore,\
 	boost_headers \
 	icuuc \
 	icu_headers \
-	mesa_headers \
+	$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
 	glew \
 	libxml2 \
 ))
diff --git a/vcl/CppunitTest_vcl_bitmap_test.mk b/vcl/CppunitTest_vcl_bitmap_test.mk
index 33a0772..8e94d8b 100644
--- a/vcl/CppunitTest_vcl_bitmap_test.mk
+++ b/vcl/CppunitTest_vcl_bitmap_test.mk
@@ -18,7 +18,7 @@ $(eval $(call gb_CppunitTest_use_externals,vcl_bitmap_test,\
 	boost_headers \
 	glew \
 	glm_headers \
-    mesa_headers \
+	$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
 ))
 
 $(eval $(call gb_CppunitTest_set_include,vcl_bitmap_test,\
diff --git a/vcl/Executable_icontest.mk b/vcl/Executable_icontest.mk
index e9a30f8..aa15dfe 100644
--- a/vcl/Executable_icontest.mk
+++ b/vcl/Executable_icontest.mk
@@ -13,7 +13,7 @@ $(eval $(call gb_Executable_use_externals,icontest,\
     boost_headers \
     glew \
 	glm_headers \
-	mesa_headers \
+	$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
 ))
 
 $(eval $(call gb_Executable_use_api,icontest,\
@@ -29,7 +29,6 @@ ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,icontest,\
 	-lm $(DLOPEN_LIBS) \
 	-lpthread \
-    -lGL \
     -lX11 \
 ))
 
diff --git a/vcl/Executable_mtfdemo.mk b/vcl/Executable_mtfdemo.mk
index 01156f8..d637439 100644
--- a/vcl/Executable_mtfdemo.mk
+++ b/vcl/Executable_mtfdemo.mk
@@ -44,7 +44,6 @@ ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,mtfdemo,\
 	-lm $(DLOPEN_LIBS) \
 	-lpthread \
-    -lGL \
     -lX11 \
 ))
 
diff --git a/vcl/Executable_ui-previewer.mk b/vcl/Executable_ui-previewer.mk
index 4ef1b05..0925e57 100644
--- a/vcl/Executable_ui-previewer.mk
+++ b/vcl/Executable_ui-previewer.mk
@@ -38,7 +38,6 @@ ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,ui-previewer,\
 	-lm $(DLOPEN_LIBS) \
 	-lpthread \
-    -lGL \
     -lX11 \
 ))
 
diff --git a/vcl/Executable_vcldemo.mk b/vcl/Executable_vcldemo.mk
index 3e05cf4..6c9c70c 100644
--- a/vcl/Executable_vcldemo.mk
+++ b/vcl/Executable_vcldemo.mk
@@ -19,7 +19,7 @@ $(eval $(call gb_Executable_use_externals,vcldemo,\
 	boost_headers \
 	glew \
 	glm_headers \
-    mesa_headers \
+	$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
 ))
 
 $(eval $(call gb_Executable_set_include,vcldemo,\
@@ -50,7 +50,6 @@ ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,vcldemo,\
 	-lm $(DLOPEN_LIBS) \
 	-lpthread \
-    -lGL \
     -lX11 \
 ))
 
diff --git a/vcl/StaticLibrary_glxtest.mk b/vcl/StaticLibrary_glxtest.mk
index 2ac2283..6e90b24 100644
--- a/vcl/StaticLibrary_glxtest.mk
+++ b/vcl/StaticLibrary_glxtest.mk
@@ -33,7 +33,6 @@ $(eval $(call gb_StaticLibrary_add_libs,glxtest,\
 	-lm \
 	-ldl \
 	-lpthread \
-    -lGL \
     -lX11 \
 ))
 


More information about the Libreoffice-commits mailing list