Skip to content

Commit

Permalink
Remove UNSUPPORTED warnings from --with-pango configure option and us…
Browse files Browse the repository at this point in the history
…e Pango by default if it's installed on the system.
  • Loading branch information
filipnavara committed Apr 11, 2018
1 parent ce65095 commit d43e782
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -60,7 +60,7 @@ Run the following command from the root of the repository:

make install

### Optional build options [UNSUPPORTED]
### Optional build options

--with-pango

Expand Down
16 changes: 11 additions & 5 deletions configure.ac
Expand Up @@ -28,8 +28,8 @@ GDIPLUS_CFLAGS="`$PKG_CONFIG --cflags glib-2.0 `"
CAIRO_REQUIRED_VERSION="1.6.4"
PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)

# 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])
# Optional use of Pango's text rendering on top of Cairo
AC_ARG_WITH(pango, [ --with-pango use Pango to measure and draw text],[text_v=pango],[text_v=default])

GDIPLUS_CFLAGS="$GDIPLUS_CFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -std=gnu99"

Expand All @@ -44,12 +44,18 @@ CAIRO_CFLAGS="`pkg-config --cflags cairo `"
cairo_info="`pkg-config --modversion cairo ` (system)"
GDIPLUS_PKG_REQ="cairo"

PANGO_REQUIRED_VERSION="1.10"
if test $text_v = "pango"; then
PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED_VERSION)
fi
if test $text_v = "default"; then
PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED_VERSION,
[text_v=pango], [text_v=cairo])
fi
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 (INCOMPLETE and UNSUPPORTED)])
AC_DEFINE(USE_PANGO_RENDERING,1,[Use Pango to measure and draw text])
GDIPLUS_PKG_REQ="$GDIPLUS_PKG_REQ pangocairo-1.0"
fi

Expand Down

0 comments on commit d43e782

Please sign in to comment.