summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-07-09 18:43:38 +0200
committerBenjamin Otte <otte@redhat.com>2010-07-09 18:43:38 +0200
commitbf117e4ea7c89dadcb5a358bb47c0f213cc67461 (patch)
tree44ed82f8788092d54f607f19e5e03462aed26075
parent0bd704bd1e92b274209aeda6de88c7e75ffa81be (diff)
build: fix glew include
Currently wether internal glew is built is dependant on wether the tarball in use was built with internal glew or not. And that's not how it should be.
-rw-r--r--configure.ac8
-rw-r--r--src/Makefile.sources11
2 files changed, 11 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index cb32d7c9..ee592249 100644
--- a/configure.ac
+++ b/configure.ac
@@ -347,18 +347,18 @@ CAIRO_ENABLE_SURFACE_BACKEND(gl, OpenGL, no, [
[])])])
;;
esac
- if test "x$have_glew" != "xno"; then
+ AS_IF([test "x$have_glew" != "xno"],[
gl_NONPKGCONFIG_LIBS="-l$have_glew $gl_NONPKGCONFIG_LIBS"
use_glew="yes (system library)"
- else
- CAIRO_ENABLE_FUNCTIONS(glew, GLEW, always)
+ ], [
use_glew="yes (private copy)"
CAIRO_CFLAGS="$CAIRO_CFLAGS -I\$(top_srcdir)/src/glew"
- fi
+ ])
need_glx_functions=yes
need_wgl_functions=yes
need_egl_functions=yes
])
+AM_CONDITIONAL(BUILD_PRIVATE_GLEW, test "x$use_glew" = "xyes (private copy)")
dnl ===========================================================================
diff --git a/src/Makefile.sources b/src/Makefile.sources
index cbb59fb8..e0153cda 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -206,9 +206,6 @@ cairo_sources += $(_cairo_pdf_operators_sources)
cairo_png_sources = cairo-png.c
-cairo_glew_sources = glew/glew.c
-cairo_glew_private = glew/GL/glew.h glew/GL/glxew.h
-
cairo_ps_headers = cairo-ps.h
cairo_ps_private = cairo-ps-surface-private.h
cairo_ps_sources = cairo-ps-surface.c
@@ -316,13 +313,19 @@ cairo_beos_cxx_sources = cairo-beos-surface.cpp
cairo_gl_headers = cairo-gl.h
cairo_gl_private = cairo-gl-private.h \
- cairo-gl-gradient-private.h
+ cairo-gl-gradient-private.h \
+ glew/GL/glew.h \
+ glew/GL/glxew.h
+
cairo_gl_sources = cairo-gl-composite.c \
cairo-gl-device.c \
cairo-gl-glyphs.c \
cairo-gl-gradient.c \
cairo-gl-shaders.c \
cairo-gl-surface.c
+if BUILD_PRIVATE_GLEW
+cairo_gl_sources += glew/glew.c
+endif
cairo_egl_sources += cairo-egl-context.c
cairo_glx_sources += cairo-glx-context.c