[cairo] [PATCH] building libcairo-2.dll on Linux

Kouhei Sutou kou at cozmixng.org
Fri Apr 13 20:29:03 PDT 2007


Hi,

I tried to build libcairo-2.dll on Debian GNU/Linux with
MinGW.

I could build libcairo-2.dll with GnuWin32's libpng
package. I used the following configure options[*]:

  CFLAGS="-I$HOME/work/win32/include -L$HOME/work/win32/lib" \
    PKG_CONFIG_PATH=$HOME/work/win32/lib/pkgconfig \
    ./configure --prefix=/tmp/cairo --host=i586-mingw32msvc \
                --disable-freetype --disable-xlib

[*] I installed GnuWin32's libpng package to $HOME/work/win32/
    directory.

But I needed attached patch to build libcairo-2.dll.


I didn't check libcairo-2.dll built on Linux because I don't
have Windows environment. I can send libcairo-2.dll built on
Linux if someone checks this.


Thanks,
--
kou
-------------- next part --------------
diff --git a/configure.in b/configure.in
index 84b919b..79d8d12 100644
--- a/configure.in
+++ b/configure.in
@@ -57,6 +57,7 @@ dnl ===========================================================================
 
 AC_PROG_CC
 AC_PROG_CPP
+AC_LIBTOOL_WIN32_DLL
 AC_PROG_LIBTOOL dnl required version (1.4) DON'T REMOVE!
 AC_STDC_HEADERS
 AC_C_INLINE
diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index a498eac..5d233a5 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -51,6 +51,10 @@
 #endif
 #include <windows.h>
 
+#if defined(__MINGW32__) && !defined(ETO_PDY)
+# define ETO_PDY 0x2000
+#endif
+
 #undef DEBUG_COMPOSITE
 
 /* for older SDKs */


More information about the cairo mailing list