[cairo-commit] 3 commits - configure.in src/cairo-win32-surface.c
src/Makefile.am test/Makefile.am
Behdad Esfahbod
behdad at kemper.freedesktop.org
Mon Feb 19 22:02:06 PST 2007
configure.in | 27 ++++++++++++++++++---------
src/Makefile.am | 7 +++++--
src/cairo-win32-surface.c | 8 ++++++--
test/Makefile.am | 6 ++++--
4 files changed, 33 insertions(+), 15 deletions(-)
New commits:
diff-tree f65c33edbecc1f0e285814995dc1a51748310e36 (from 2335a23a16d84e6ebdde7afbeb1fbceb3bdbe6b6)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Feb 20 01:00:53 2007 -0500
[win32] Make win32-surface compile without win32-font
Hacking on the win32 code, thanks to winelib. Yay!
diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index b3772a6..9c41517 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -1487,6 +1487,7 @@ _cairo_win32_surface_show_glyphs (void
int num_glyphs,
cairo_scaled_font_t *scaled_font)
{
+#if CAIRO_HAS_WIN32_FONT
cairo_win32_surface_t *dst = surface;
WORD glyph_buf_stack[STACK_GLYPH_SIZE];
@@ -1607,8 +1608,13 @@ _cairo_win32_surface_show_glyphs (void
free(dxy_buf);
}
return (win_result) ? CAIRO_STATUS_SUCCESS : CAIRO_INT_STATUS_UNSUPPORTED;
+#else
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+#endif
}
+#undef STACK_GLYPH_SIZE
+
static cairo_bool_t
_cairo_win32_surface_is_compatible (void *surface_a,
void *surface_b)
@@ -1619,8 +1625,6 @@ _cairo_win32_surface_is_compatible (void
return (a->dc == b->dc);
}
-#undef STACK_GLYPH_SIZE
-
/**
* cairo_win32_surface_create:
* @hdc: the DC to create a surface for
diff-tree 2335a23a16d84e6ebdde7afbeb1fbceb3bdbe6b6 (from 8133530ae5848b0a34c299e0c71360931fe383df)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Feb 20 01:00:17 2007 -0500
[test/Makefile.am] Document why svg2png and pdf2png use LDADD
This is to make librsvg and poppler to use the compiled cairo instead
of whatever is on the system, such that the test suite does not depend
on a good version of cairo being installed already.
diff --git a/test/Makefile.am b/test/Makefile.am
index 7eefc32..7eb4dd3 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -421,13 +421,15 @@ SUPPORT_PROGS += imagediff png-flatten
if CAIRO_CAN_TEST_PDF_SURFACE
SUPPORT_PROGS += pdf2png
pdf2png_CFLAGS = $(POPPLER_CFLAGS)
-pdf2png_LDADD = $(LDADD) $(POPPLER_LIBS)
+# add LDADD, so poppler uses "our" cairo
+pdf2png_LDADD = $(LDADD) $(POPPLER_LIBS)
endif
if CAIRO_CAN_TEST_SVG_SURFACE
SUPPORT_PROGS += svg2png
svg2png_CFLAGS = $(LIBRSVG_CFLAGS)
-svg2png_LDADD = $(LDADD) $(LIBRSVG_LIBS)
+# add LDADD, so librsvg uses "our" cairo
+svg2png_LDADD = $(LDADD) $(LIBRSVG_LIBS)
endif
EXTRA_PROGRAMS = $(TESTS) $(SUPPORT_PROGS)
diff-tree 8133530ae5848b0a34c299e0c71360931fe383df (from 0fcd6cfe0edff25ad3d11af056ba611bd8d9d8c8)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Feb 20 00:57:25 2007 -0500
[configure] Improve win32 detection
We now test for windows.h availability to automatically enable win32
backends. This nicely enables compiling cairo against libwine by just
setting CC=winegcc LD=winegcc during configure. This currently only
generates static libs though.
diff --git a/configure.in b/configure.in
index 36748e7..fad10a6 100644
--- a/configure.in
+++ b/configure.in
@@ -286,20 +286,29 @@ CAIRO_BACKEND_ENABLE(nquartz, NativeQuar
dnl ===========================================================================
+AC_MSG_CHECKING([for native Win32])
+case "$host" in
+ *-*-mingw*)
+ cairo_os_win32=yes
+ ;;
+ *)
+ cairo_os_win32=no
+ ;;
+esac
+AC_MSG_RESULT([$cairo_os_win32])
+AM_CONDITIONAL(OS_WIN32, test "$cairo_os_win32" = "yes")
+
+AC_CHECK_HEADERS([windows.h], have_windows=yes, have_windows=no)
+
CAIRO_BACKEND_ENABLE(win32, Microsoft Windows, win32, WIN32_SURFACE, auto, [
- case "$host" in
- *-*-mingw*|*-*-cygwin*)
- :
- ;;
- *)
- use_win32="no (requires a Win32 platform)"
- ;;
- esac
+ if test "x$have_windows" != xyes; then
+ use_win32="no (requires a Win32 platform)"
+ fi
win32_LIBS="-lgdi32 -lmsimg32"
])
CAIRO_BACKEND_ENABLE(win32_font, Microsoft Windows font, win32-font, WIN32_FONT, auto, [
- use_win32_font=$use_win32
+ use_win32_font=$use_win32
])
dnl ===========================================================================
diff --git a/src/Makefile.am b/src/Makefile.am
index 5983867..259a2f3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -72,12 +72,15 @@ libcairo_nquartz_sources = cairo-nquartz
backend_pkgconfigs += cairo-nquartz.pc
endif
+if OS_WIN32
+export_symbols = -export-symbols cairo.def
+cairo_def_dependency = cairo.def
+endif
+
libcairo_win32_sources =
if CAIRO_HAS_WIN32_SURFACE
libcairo_win32_headers = cairo-win32.h
libcairo_win32_sources += cairo-win32-surface.c cairo-win32-private.h
-export_symbols = -export-symbols cairo.def
-cairo_def_dependency = cairo.def
backend_pkgconfigs += cairo-win32.pc
endif
# This is not really a separate conditional. Is TRUE iff the previous one is.
More information about the cairo-commit
mailing list