[cairo] Cairo ported to OS/2 - Suggestions
Tor Lillqvist
tml at iki.fi
Thu Aug 18 17:25:50 PDT 2005
An improved patch: Now actually use the .def file when building the
DLL on Windows. Add dependencies.
Index: configure.in
===================================================================
RCS file: /cvs/cairo/cairo/configure.in,v
retrieving revision 1.129
diff -u -2 -r1.129 configure.in
--- configure.in 18 Aug 2005 15:28:08 -0000 1.129
+++ configure.in 19 Aug 2005 00:24:45 -0000
@@ -35,4 +35,8 @@
VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
AC_SUBST(VERSION_INFO)
+
+LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
+AC_SUBST(LT_CURRENT_MINUS_AGE)
+
CAIRO_VERSION_MAJOR=cairo_version_major()
CAIRO_VERSION_MINOR=cairo_version_minor()
Index: src/Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo/src/Makefile.am,v
retrieving revision 1.61
diff -u -2 -r1.61 Makefile.am
--- src/Makefile.am 17 Aug 2005 01:22:16 -0000 1.61
+++ src/Makefile.am 19 Aug 2005 00:24:45 -0000
@@ -35,4 +35,6 @@
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
endif
if CAIRO_HAS_WIN32_FONT
@@ -55,4 +57,12 @@
endif
+# Headers that declare the functions in the cairo DLL API on Windows
+cairo_win32_api_headers = \
+ $(srcdir)/cairo.h \
+ $(srcdir)/cairo-ft.h \
+ $(srcdir)/cairo-pdf.h \
+ $(srcdir)/cairo-ps.h \
+ $(srcdir)/cairo-win32.h
+
# These names match automake style variable definition conventions so
# without these lines, automake will complain during the handling of
@@ -135,5 +145,5 @@
cairoint.h
-libcairo_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
+libcairo_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined $(export_symbols)
INCLUDES = -I$(srcdir) -I$(top_srcdir)/pixman/src $(CAIRO_CFLAGS)
@@ -141,4 +151,27 @@
libcairo_la_LIBADD = $(top_builddir)/pixman/src/libpixman.la $(CAIRO_LIBS)
+libcairo_la_DEPENDENCIES = $(cairo_def_dependency)
+
+EXTRA_DIST = \
+ cairo.def
+
+cairo.def: $(cairo_win32_api_headers)
+ (echo EXPORTS; \
+ cat $(cairo_win32_api_headers) | \
+ grep -v -E '^# *include' | \
+ gcc \
+ -DCAIRO_HAS_PS_SURFACE \
+ -DCAIRO_HAS_PDF_SURFACE \
+ -DCAIRO_HAS_WIN32_SURFACE \
+ -DCAIRO_HAS_FT_FONT \
+ -DCAIRO_HAS_WIN32_FONT \
+ -DCAIRO_HAS_PNG_FUNCTIONS \
+ -E - | \
+ grep -E '^cairo_.* \(' | \
+ sed -e 's/\([^ ]*\).*/\1/' | \
+ sort; \
+ echo LIBRARY libcairo-$(LT_CURRENT_MINUS_AGE).dll; \
+ ) >$@
+
install-data-local:
@if test -f "$(DESTDIR)$(includedir)/cairo.h" || test -f "$(DESTDIR)$(includedir)/cairo-features.h" ; then \
More information about the cairo
mailing list