[cairo-commit] 3 commits - configure.ac util/cairo-script util/cairo-trace

M. Joonas Pihlaja joonas at kemper.freedesktop.org
Fri Jun 19 09:10:47 PDT 2009


 configure.ac                               |    3 ++-
 util/cairo-script/cairo-script-operators.c |    7 ++++++-
 util/cairo-trace/trace.c                   |    2 ++
 3 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 2da906f4764d5fe7cbb08ec238b01e2a03696899
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date:   Fri Jun 19 18:44:23 2009 +0300

    [script] Include unistd.h if we're twiddling file descriptors.
    
    Including sys/mman.h doesn't pull in unistd.h on Solaris 9 so
    we have to include it explicitly.

diff --git a/util/cairo-script/cairo-script-operators.c b/util/cairo-script/cairo-script-operators.c
index 44f9764..76ceb2d 100644
--- a/util/cairo-script/cairo-script-operators.c
+++ b/util/cairo-script/cairo-script-operators.c
@@ -44,7 +44,12 @@
 #include <assert.h>
 
 #ifdef HAVE_MMAP
-#include <sys/mman.h>
+# ifdef HAVE_UNISTD_H
+#  include <sys/mman.h>
+#  include <unistd.h>
+# else
+#  undef HAVE_MMAP
+# endif
 #endif
 
 typedef struct _csi_proxy {
commit 1b6dbcbbebf18d6239fcc618f3389e9c0fc981f3
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date:   Fri Jun 19 18:39:53 2009 +0300

    [trace] Compile without fontconfig.
    
    Use CAIRO_HAS_FC_FONT to decide whether to export
    cairo_ft_font_face_create_for_pattern() or not.

diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index 2982c8c..5ef290f 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -3510,6 +3510,7 @@ cairo_pattern_set_extend (cairo_pattern_t *pattern, cairo_extend_t extend)
 }
 
 #if CAIRO_HAS_FT_FONT
+#if CAIRO_HAS_FC_FONT
 cairo_font_face_t *
 cairo_ft_font_face_create_for_pattern (FcPattern *pattern)
 {
@@ -3543,6 +3544,7 @@ cairo_ft_font_face_create_for_pattern (FcPattern *pattern)
 
     return ret;
 }
+#endif /* CAIRO_HAS_FC_FONT*/
 
 typedef struct _ft_face_data {
     unsigned long index;
commit d9b5a98a78b712a2ad64408fa47ba6aa34e29f1f
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date:   Fri Jun 19 18:34:34 2009 +0300

    [build] Require fontconfig >= 2.2.95 if we're using it at all.
    
    We require at least fontconfig 2.2.95 when we're using
    fontconfig because we depend on the FcResultOutOfMemory
    error code introduced in that version.

diff --git a/configure.ac b/configure.ac
index 9084357..e389f24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -302,10 +302,11 @@ CAIRO_ENABLE_FONT_BACKEND(ft, FreeType, auto, [
   ft_LIBS="$FREETYPE_LIBS"
 ])
 
+FONTCONFIG_MIN_VERSION=2.2.95
 CAIRO_ENABLE_FONT_BACKEND(fc, Fontconfig, auto, [
   use_fc=$use_ft
   if test "x$use_fc" = "xyes"; then
-    fc_REQUIRES="fontconfig"
+    fc_REQUIRES="fontconfig >= $FONTCONFIG_MIN_VERSION"
     PKG_CHECK_MODULES(FONTCONFIG, $fc_REQUIRES,,
 		      [AC_MSG_RESULT(no); use_fc="no (requires $fc_REQUIRES)"])
   fi


More information about the cairo-commit mailing list