[cogl] Make building cogl-pango optional



commit 4211462eb246aa423496a84b36a27605111bf0eb
Author: Robert Bragg <robert linux intel com>
Date:   Thu May 5 21:39:40 2011 +0100

    Make building cogl-pango optional
    
    When building for platforms that don't use pango for handling text
    you may not need the cogl-pango library.

 Makefile.am  |    6 +++++-
 configure.ac |   21 ++++++++++++++++++++-
 2 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 3d7dd3e..a3c2b81 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,8 @@
-SUBDIRS = cogl pango
+SUBDIRS = cogl
+
+if BUILD_COGL_PANGO
+SUBDIRS += pango
+endif
 
 if COGL_STANDALONE_BUILD
 SUBDIRS += po examples
diff --git a/configure.ac b/configure.ac
index c982156..ec4ba6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,6 +170,7 @@ AS_CASE(
   [
     test "$cflags_set" = set || CFLAGS="$CFLAGS -g -O0"
     COGL_EXTRA_CFLAGS="$COGL_EXTRA_CFLAGS -DCOGL_GL_DEBUG -DCOGL_OBJECT_DEBUG -DCOGL_HANDLE_DEBUG -DCOGL_ENABLE_DEBUG"
+    COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES cairo"
   ],
   [no],
   [
@@ -270,6 +271,23 @@ AS_IF(
 )
 
 
+dnl     ============================================================
+dnl     Should cogl-pango be built?
+dnl     ============================================================
+
+AC_ARG_ENABLE(
+  [cogl-pango],
+  [AC_HELP_STRING([--enable-cogl-pango=@<:@no/yes@:>@], [Enable pango support @<:@default=yes@:>@])],
+  [],
+  enable_cogl_pango=yes
+)
+AM_CONDITIONAL([BUILD_COGL_PANGO], [test "x$enable_cogl_pango" = "xyes"])
+
+AS_IF([test "x$enable_cogl_pango" = "xyes"],
+      [
+	COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES pangocairo >= pangocairo_req_version"
+      ]
+)
 
 dnl     ============================================================
 dnl     Determine which drivers and window systems we can support
@@ -645,7 +663,7 @@ AM_PATH_GLIB_2_0([glib_req_version],
                  [gobject gthread gmodule-no-export])
 AS_IF([test "x$have_glib" = "xno"], AC_MSG_ERROR([glib-2.0 is required]))
 
-COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES glib-2.0 pangocairo >= pangocairo_req_version"
+COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES glib-2.0"
 AC_SUBST(COGL_PKG_REQUIRES)
 PKG_CHECK_MODULES(COGL_DEP, [$COGL_PKG_REQUIRES])
 
@@ -739,6 +757,7 @@ if test "x$SUPPORT_EGL" = "xyes"; then
 echo "        EGL Platforms:${EGL_PLATFORMS}"
 fi
 echo "        Image backend: ${COGL_IMAGE_BACKEND}"
+echo "        Cogl Pango: ${enable_cogl_pango}"
 
 # Compiler/Debug related flags
 echo ""



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]