1diff -ur misc/build/cairo-1.8.0.org/build/Makefile.win32.common misc/build/cairo-1.8.0/build/Makefile.win32.common 2--- misc/build/cairo-1.8.0.org/build/Makefile.win32.common 2008-09-25 14:36:35.000000000 +0300 3+++ misc/build/cairo-1.8.0/build/Makefile.win32.common 2008-11-14 22:20:08.000000000 +0200 4@@ -18,8 +18,8 @@ 5 OPT := -O2 6 endif 7 8-PIXMAN_CFLAGS := -I$(top_srcdir)/../pixman/pixman 9-PIXMAN_LIBS := $(top_builddir)/../pixman/pixman/$(CFG)/pixman-1.lib 10+PIXMAN_CFLAGS := -I$(SOLARSRC)/cairo/$(INPATH)/inc 11+PIXMAN_LIBS := $(SOLARSRC)/cairo/$(INPATH)/lib/pixman-1.lib 12 13 CAIRO_LIBS = gdi32.lib msimg32.lib user32.lib 14 ifeq ($(CAIRO_HAS_PNG_FUNCTIONS),1) 15@@ -27,13 +27,15 @@ 16 endif 17 ifeq ($(CAIRO_HAS_PS_SURFACE)$(CAIRO_HAS_PDF_SURFACE),00) 18 else 19-CAIRO_LIBS += zdll.lib 20+CAIRO_LIBS += zlib.lib 21 endif 22 23 DEFAULT_CFLAGS = -MD -nologo $(OPT) 24 DEFAULT_CFLAGS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE 25 DEFAULT_CFLAGS += -I. -I$(top_srcdir) 26 DEFAULT_CFLAGS += $(PIXMAN_CFLAGS) 27+DEFAULT_CFLAGS += $(SOLARINC) 28+DEFAULT_CFLAGS += -I$(SOLARVER)/$(INPATH)/inc/zlib -I$(SOLARVER)/$(INPATH)/inc/external/libpng -DZLIB_FIX 29 30 CAIRO_CFLAGS = $(DEFAULT_CFLAGS) $(CFLAGS) 31 32@@ -55,7 +57,7 @@ 33 34 $(CFG)/%.obj: %.c 35 @mkdir -p $(CFG) 36- @$(CC) $(CAIRO_CFLAGS) -c -Fo"$@" $< 37+ $(CC) $(CAIRO_CFLAGS) -c -Fo"$@" $< 38 39 $(CFG)/%-static.obj: %.c 40 @mkdir -p $(CFG) 41diff -ur misc/build/cairo-1.8.0.org/build/Makefile.win32.features misc/build/cairo-1.8.0/build/Makefile.win32.features 42--- misc/build/cairo-1.8.0.org/build/Makefile.win32.features 2008-09-25 02:15:49.000000000 +0300 43+++ misc/build/cairo-1.8.0/build/Makefile.win32.features 2008-11-04 22:19:52.000000000 +0200 44@@ -10,11 +10,11 @@ 45 CAIRO_HAS_WIN32_FONT=1 46 CAIRO_HAS_OS2_SURFACE=0 47 CAIRO_HAS_BEOS_SURFACE=0 48-CAIRO_HAS_PNG_FUNCTIONS=1 49+CAIRO_HAS_PNG_FUNCTIONS=1 50 CAIRO_HAS_GLITZ_SURFACE=0 51 CAIRO_HAS_DIRECTFB_SURFACE=0 52 CAIRO_HAS_FT_FONT=0 53 CAIRO_HAS_PS_SURFACE=1 54 CAIRO_HAS_PDF_SURFACE=1 55-CAIRO_HAS_SVG_SURFACE=1 56+CAIRO_HAS_SVG_SURFACE=0 57 CAIRO_HAS_TEST_SURFACES=0 58diff -ur misc/build/cairo-1.8.0.org/configure misc/build/cairo-1.8.0/configure 59--- misc/build/cairo-1.8.0.org/configure 2008-09-26 01:57:30.000000000 +0300 60+++ misc/build/cairo-1.8.0/configure 2008-11-04 22:21:26.000000000 +0200 61@@ -4397,7 +4397,7 @@ 62 63 cygwin*) 64 # func_win32_libid is a shell function defined in ltmain.sh 65- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 66+ lt_cv_deplibs_check_method='file_magic ^x86 archive|^x86 DLL' 67 lt_cv_file_magic_cmd='func_win32_libid' 68 ;; 69 70@@ -4406,7 +4406,7 @@ 71 # func_win32_libid shell function, so use a weaker test based on 'objdump', 72 # unless we find 'file', for example because we are cross-compiling. 73 if ( file / ) >/dev/null 2>&1; then 74- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 75+ lt_cv_deplibs_check_method='file_magic ^x86 archive|^x86 DLL' 76 lt_cv_file_magic_cmd='func_win32_libid' 77 else 78 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 79@@ -25304,19 +25304,39 @@ 80 rm -f confcache 81 82 83-{ echo "$as_me:$LINENO: checking for compress in -lz" >&5 84-echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6; } 85-if test "${ac_cv_lib_z_compress+set}" = set; then 86+save_libs="$LIBS" 87+LIBS="$LIBS $ZLIB3RDLIB" 88+ 89+for ac_func in $COMPRESS 90+do 91+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 92+{ echo "$as_me:$LINENO: checking for $ac_func" >&5 93+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 94+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 95 echo $ECHO_N "(cached) $ECHO_C" >&6 96 else 97- ac_check_lib_save_LIBS=$LIBS 98-LIBS="-lz $LIBS" 99-cat >conftest.$ac_ext <<_ACEOF 100+ cat >conftest.$ac_ext <<_ACEOF 101 /* confdefs.h. */ 102 _ACEOF 103 cat confdefs.h >>conftest.$ac_ext 104 cat >>conftest.$ac_ext <<_ACEOF 105 /* end confdefs.h. */ 106+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. 107+ For example, HP-UX 11i <limits.h> declares gettimeofday. */ 108+#define $ac_func innocuous_$ac_func 109+ 110+/* System header to define __stub macros and hopefully few prototypes, 111+ which can conflict with char $ac_func (); below. 112+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 113+ <limits.h> exists even on freestanding compilers. */ 114+ 115+#ifdef __STDC__ 116+# include <limits.h> 117+#else 118+# include <assert.h> 119+#endif 120+ 121+#undef $ac_func 122 123 /* Override any GCC internal prototype to avoid an error. 124 Use char because int might match the return type of a GCC 125@@ -25324,11 +25344,18 @@ 126 #ifdef __cplusplus 127 extern "C" 128 #endif 129-char compress (); 130+char $ac_func (); 131+/* The GNU C library defines this for functions which it implements 132+ to always fail with ENOSYS. Some functions are actually named 133+ something starting with __ and the normal name is an alias. */ 134+#if defined __stub_$ac_func || defined __stub___$ac_func 135+choke me 136+#endif 137+ 138 int 139 main () 140 { 141-return compress (); 142+return $ac_func (); 143 ; 144 return 0; 145 } 146@@ -25351,22 +25378,25 @@ 147 test ! -s conftest.err 148 } && test -s conftest$ac_exeext && 149 $as_test_x conftest$ac_exeext; then 150- ac_cv_lib_z_compress=yes 151+ eval "$as_ac_var=yes" 152 else 153 echo "$as_me: failed program was:" >&5 154 sed 's/^/| /' conftest.$ac_ext >&5 155 156- ac_cv_lib_z_compress=no 157+ eval "$as_ac_var=no" 158 fi 159 160 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 161 conftest$ac_exeext conftest.$ac_ext 162-LIBS=$ac_check_lib_save_LIBS 163 fi 164-{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5 165-echo "${ECHO_T}$ac_cv_lib_z_compress" >&6; } 166-if test $ac_cv_lib_z_compress = yes; then 167- if test "${ac_cv_header_zlib_h+set}" = set; then 168+ac_res=`eval echo '${'$as_ac_var'}'` 169+ { echo "$as_me:$LINENO: result: $ac_res" >&5 170+echo "${ECHO_T}$ac_res" >&6; } 171+if test `eval echo '${'$as_ac_var'}'` = yes; then 172+ cat >>confdefs.h <<_ACEOF 173+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 174+_ACEOF 175+ if test "${ac_cv_header_zlib_h+set}" = set; then 176 { echo "$as_me:$LINENO: checking for zlib.h" >&5 177 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } 178 if test "${ac_cv_header_zlib_h+set}" = set; then 179@@ -25506,7 +25536,9 @@ 180 else 181 have_libz="no (requires zlib http://www.gzip.org/zlib/)" 182 fi 183+done 184 185+LIBS="$save_libs" 186 187 188 { echo "$as_me:$LINENO: checking for X" >&5 189@@ -34097,7 +34129,7 @@ 190 191 # The ps backend requires zlib. 192 use_ps=$have_libz 193- ps_NONPKGCONFIG_LIBS=-lz 194+ ps_NONPKGCONFIG_LIBS=$ZLIB3RDLIB 195 196 cairo_cv_ps_use=$use_ps 197 cairo_cv_ps_cache_vars=" BASE REQUIRES CFLAGS NONPKGCONFIG_CFLAGS LIBS NONPKGCONFIG_LIBS" 198@@ -34444,7 +34476,7 @@ 199 200 # The pdf backend requires zlib. 201 use_pdf=$have_libz 202- pdf_NONPKGCONFIG_LIBS=-lz 203+ pdf_NONPKGCONFIG_LIBS=$ZLIB3RDLIB 204 205 cairo_cv_pdf_use=$use_pdf 206 cairo_cv_pdf_cache_vars=" BASE REQUIRES CFLAGS NONPKGCONFIG_CFLAGS LIBS NONPKGCONFIG_LIBS" 207diff -ur misc/build/cairo-1.8.0.org/src/cairo-deflate-stream.c misc/build/cairo-1.8.0/src/cairo-deflate-stream.c 208--- misc/build/cairo-1.8.0.org/src/cairo-deflate-stream.c 2008-09-25 13:03:43.000000000 +0300 209+++ misc/build/cairo-1.8.0/src/cairo-deflate-stream.c 2008-11-14 22:21:00.000000000 +0200 210@@ -36,7 +36,11 @@ 211 212 #include "cairoint.h" 213 #include "cairo-output-stream-private.h" 214+#ifdef ZLIB_FIX 215+#include <zlib/zlib.h> 216+#else 217 #include <zlib.h> 218+#endif 219 220 #define BUFFER_SIZE 16384 221 222diff -ur misc/build/cairo-1.8.0.org/src/cairo-pdf-surface.c misc/build/cairo-1.8.0/src/cairo-pdf-surface.c 223--- misc/build/cairo-1.8.0.org/src/cairo-pdf-surface.c 2008-09-25 14:36:35.000000000 +0300 224+++ misc/build/cairo-1.8.0/src/cairo-pdf-surface.c 2008-11-14 22:20:41.000000000 +0200 225@@ -51,7 +51,11 @@ 226 #include "cairo-type3-glyph-surface-private.h" 227 228 #include <time.h> 229+#ifdef ZLIB_FIX 230+#include <zlib/zlib.h> 231+#else 232 #include <zlib.h> 233+#endif 234 235 /* Issues: 236 * 237diff -ur misc/build/cairo-1.8.0.org/src/cairo-ps-surface.c misc/build/cairo-1.8.0/src/cairo-ps-surface.c 238--- misc/build/cairo-1.8.0.org/src/cairo-ps-surface.c 2008-09-25 14:36:35.000000000 +0300 239+++ misc/build/cairo-1.8.0/src/cairo-ps-surface.c 2008-11-14 22:21:33.000000000 +0200 240@@ -67,7 +67,11 @@ 241 #include <stdio.h> 242 #include <ctype.h> 243 #include <time.h> 244+#ifdef ZLIB_FIX 245+#include <zlib/zlib.h> 246+#else 247 #include <zlib.h> 248+#endif 249 #include <errno.h> 250 251 #define DEBUG_PS 0 252