Skip to content

Commit

Permalink
2009-01-02 Sebastien Pouliot <sebastien@ximian.com>
Browse files Browse the repository at this point in the history
	* autogen.sh: Rename --with-cairo=system to --skip-cairo. This option
	allows you to skip the autogen part of cairo and pixman if you're
	building libgdiplus with a more recent (than 1.6.4) version of cairo.
	* configure.in: Automatically use the system cairo if it's more 
	recent than the one we have bundled in libgdiplus.
	* README: Update with changes


svn path=/trunk/libgdiplus/; revision=122347
  • Loading branch information
Sebastien Pouliot committed Jan 2, 2009
1 parent 450f8d3 commit 417e859
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 20 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2009-01-02 Sebastien Pouliot <sebastien@ximian.com>

* autogen.sh: Rename --with-cairo=system to --skip-cairo. This option
allows you to skip the autogen part of cairo and pixman if you're
building libgdiplus with a more recent (than 1.6.4) version of cairo.
* configure.in: Automatically use the system cairo if it's more
recent than the one we have bundled in libgdiplus.
* README: Update with changes

2008-08-12 Raja R Harinath <harinath@hurrynot.org>

* configure.in (FONTCONFIG_CONFIG): Rename from FONTCONFIG-CONFIG.
Expand Down
18 changes: 8 additions & 10 deletions README
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
libgdiplus: An Open Source implementation of the GDI+ API.

This is part of the Mono project
This is part of the Mono project - http://mono-project.com

Requirements:

This requires the libraries used by the Cairo vector graphics library
to build (freetype2, fontconfig, Xft2 and libpng, basically).
See cairo/REAME. Note that libpixman is included in this package already.
See cairo/README. Note that libpixman is included in this package already.

If the system cairo is newer than the bundled version (1.6.4) provided
by libgdiplus then the newer version will be used

To build:

Expand All @@ -19,14 +22,9 @@ To install:

Optional build options [UNSUPPORTED]

--with-cairo=system

This build libgdiplus using the system's libcairo (and not the
internal copy of Cairo that libgdiplus bundles). Minimum Cairo
version is 1.4.

--with-pango

This build libgdiplus using Pango to render (measure and draw)
all of it's text. This can only be enabled if --with-cairo=system
and requires Pango version 1.10 (or later).
all of it's text. This can only be enabled if libgdiplus is built
with the *system* cairo and requires Pango version 1.10 (or later).

2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ CONF_OPTIONS=""
CAIRO_AUTOGEN_REQUIRED=1
until [ -z "$1" ]
do
if [ "$1" = "--with-cairo=system" ]; then
if [ "$1" = "--skip-cairo" ]; then
echo Skipping internal pixman and cairo ...
CAIRO_AUTOGEN_REQUIRED=0
fi
Expand Down
19 changes: 10 additions & 9 deletions configure.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(libgdiplus,2.1)
AM_INIT_AUTOMAKE(libgdiplus,2.3)

AM_MAINTAINER_MODE
AM_PROG_LIBTOOL
Expand All @@ -18,8 +18,9 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
GDIPLUS_LIBS="`pkg-config --libs glib-2.0 `"
GDIPLUS_CFLAGS="`pkg-config --cflags glib-2.0 `"

# Optional use (still unsupported) of the system's Cairo library
AC_ARG_WITH(cairo, [ --with-cairo=internal,system],[cairo_v=system],[cairo_v=internal])
# libgdiplus bundles its own cairo 1.6.4 but if the system cairo is more recent then we use it instead
CAIRO_BUNDLED_VERSION="1.6.4"
PKG_CHECK_MODULES(CAIRO, cairo > $CAIRO_BUNDLED_VERSION, [cairo_v=system], [cairo_v=internal])

# Optional use (experimental and unsupported) of Pango's text rendering on top of Cairo
AC_ARG_WITH(pango, [ --with-pango],[text_v=pango],[text_v=cairo])
Expand All @@ -30,36 +31,36 @@ if test $cairo_v = "internal"; then
ac_configure_args="$ac_configure_args --with-pic=yes"

# disable the PNG, PDF and SVG surface backends of Cairo (unrequired for GDI+)
# cairo 1.6.x bug - we can't disable PDF and keep PS backend - reported at https://bugs.freedesktop.org/show_bug.cgi?id=15532
# cairo 1.6.4 bug - we can't disable PDF and keep PS backend - reported at https://bugs.freedesktop.org/show_bug.cgi?id=15532
# ac_configure_args="$ac_configure_args --disable-png --disable-pdf --disable-svg"
ac_configure_args="$ac_configure_args --disable-png --disable-svg"
# gdiplsu mac note; if we have quartz and ft fonts, quartz is the default and gdi+ assumes the latter everywhere, force it out
# gdiplus mac note; if we have quartz and ft fonts, quartz is the default and gdi+ assumes the latter everywhere, force it out
# of the internal build
ac_configure_args="$ac_configure_args --disable-quartz-font"

AC_CONFIG_SUBDIRS([pixman cairo])
CAIRO_DIR="pixman cairo"
CAIRO_LIBS='$(top_builddir)/cairo/src/libcairo.la'
CAIRO_CFLAGS='-I$(top_builddir)/pixman/pixman -I$(top_srcdir)/pixman/pixman -I$(top_builddir)/cairo/src -I$(top_srcdir)/cairo/src'
cairo_info+="$CAIRO_BUNDLED_VERSION (internal)"
AC_DEFINE(USE_INCLUDED_CAIRO,1,[Use Cairo/pixman bundled in libgdiplus])

if test $text_v = "pango"; then
AC_MSG_ERROR("Pango text rendering is only possible with --with-cairo=system")
fi
else
CAIRO_REQUIRED_VERSION="1.4"
PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
CAIRO_DIR=""
CAIRO_LIBS="`pkg-config --libs cairo `"
CAIRO_CFLAGS="`pkg-config --cflags cairo `"
cairo_info="`pkg-config --modversion cairo ` (system)"
GDIPLUS_PKG_REQ="cairo"

if test $text_v = "pango"; then
PANGO_REQUIRED_VERSION="1.10"
PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED_VERSION)
PANGO_LIBS="`pkg-config --libs pangocairo `"
PANGO_CFLAGS="`pkg-config --cflags pangocairo `"
AC_DEFINE(USE_PANGO_RENDERING,1,[Use Pango to measure and draw text])
AC_DEFINE(USE_PANGO_RENDERING,1,[Use Pango to measure and draw text (INCOMPLETE and UNSUPPORTED)])
GDIPLUS_PKG_REQ="$GDIPLUS_PKG_REQ pangocairo-1.0"
fi
fi
Expand Down Expand Up @@ -371,7 +372,7 @@ echo "---"
echo "Configuration summary"
echo ""
echo " * Installation prefix = $prefix"
echo " * Cairo = $cairo_v"
echo " * Cairo = $cairo_info"
echo " * Text = $text_v"
echo " * EXIF tags = $libexif_pkgconfig"
echo " * Codecs supported:"
Expand Down

0 comments on commit 417e859

Please sign in to comment.