diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2008-01-29 22:38:29 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2008-01-29 22:38:29 +0000 |
commit | 701bdf2deb549e925d1aef14c36f14858f3656c7 (patch) | |
tree | 76664cfe62dde4a49308aca6d908e067dabd1f59 | |
parent | bfa586f860e47650541a45f0c11360a2da306bd3 (diff) | |
download | pango-701bdf2deb549e925d1aef14c36f14858f3656c7.tar.gz |
Bug 496244 – Don't use freetype-config, use pkg-config
2008-01-29 Behdad Esfahbod <behdad@gnome.org>
Bug 496244 – Don't use freetype-config, use pkg-config
* configure.in:
Don't use freetype-config. Also cleanup lots of old stale macros
around configure.in.
* pango-uninstalled.pc.in:
* pango.pc.in:
* pangocairo-uninstalled.pc.in:
* pangocairo.pc.in:
* pangoft2-uninstalled.pc.in:
* pangoft2.pc.in:
* pangowin32.pc.in:
* pangox-uninstalled.pc.in:
* pangox.pc.in:
* pangoxft-uninstalled.pc.in:
* pangoxft.pc.in:
And cleaned up all the pkg-config files as a result.
svn path=/trunk/; revision=2559
-rw-r--r-- | configure.in | 143 | ||||
-rw-r--r-- | pango-uninstalled.pc.in | 3 | ||||
-rw-r--r-- | pango.pc.in | 1 | ||||
-rw-r--r-- | pangocairo-uninstalled.pc.in | 3 | ||||
-rw-r--r-- | pangocairo.pc.in | 2 | ||||
-rw-r--r-- | pangoft2-uninstalled.pc.in | 6 | ||||
-rw-r--r-- | pangoft2.pc.in | 11 | ||||
-rw-r--r-- | pangowin32.pc.in | 3 | ||||
-rw-r--r-- | pangox-uninstalled.pc.in | 2 | ||||
-rw-r--r-- | pangox.pc.in | 3 | ||||
-rw-r--r-- | pangoxft-uninstalled.pc.in | 7 | ||||
-rw-r--r-- | pangoxft.pc.in | 6 |
12 files changed, 84 insertions, 106 deletions
diff --git a/configure.in b/configure.in index 4faac1f2..20ba739e 100644 --- a/configure.in +++ b/configure.in @@ -222,44 +222,28 @@ have_xft=false # PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 1.0.1, have_fontconfig=true, AC_MSG_RESULT([no])) +# +# Checks for FreeType +# if $have_fontconfig ; then - # - # Checks for FreeType - # - FREETYPE_LIBS= - FREETYPE_CFLAGS= - AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) - if test "x$FREETYPE_CONFIG" != "xno" ; then - FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags` - FREETYPE_LIBS=`$FREETYPE_CONFIG --libs` - - pango_save_ldflags=$LDFLAGS - LDFLAGS="$LDFLAGS $FREETYPE_LIBS" - AC_CHECK_LIB(freetype, FT_Get_Next_Char, have_freetype=true, :) - LDFLAGS=$pango_save_ldflags - fi - - FREETYPE_LIBS="$FONTCONFIG_LIBS $FREETYPE_LIBS" - FREETYPE_CFLAGS="$FONTCONFIG_CFLAGS $FREETYPE_CFLAGS" - - AC_SUBST(FREETYPE_LIBS) - AC_SUBST(FREETYPE_CFLAGS) + # The first version of freetype with a .pc file is 2.1.5. That's recent + # enough for all the functions we use I guess. No version check needed. + PKG_CHECK_MODULES(FREETYPE, freetype2, have_freetype=true, AC_MSG_RESULT([no])) +fi +if $have_freetype ; then AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library]) - - # - # Checks for Xft/XRender - # - if $have_x && $have_freetype ; then - PKG_CHECK_MODULES(XFT, xft >= 2.0.0 xrender, have_xft=true, AC_MSG_RESULT([no])) - if $have_xft ; then - AC_DEFINE(HAVE_XFT, 1, [Have Xft library]) - fi - fi -elif test "x$pango_os_win32" != xyes; then - AC_MSG_WARN([No fontconfig found, skipping tests for FreeType and Xft]) fi - AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype) + +# +# Checks for Xft/XRender +# +if $have_x && $have_freetype ; then + PKG_CHECK_MODULES(XFT, xft >= 2.0.0 xrender, have_xft=true, AC_MSG_RESULT([no])) +fi +if $have_xft ; then + AC_DEFINE(HAVE_XFT, 1, [Have Xft library]) +fi AM_CONDITIONAL(HAVE_XFT, $have_xft) # @@ -345,48 +329,54 @@ if $have_cairo ; then pango_save_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS $INSTALLED_CAIRO_LIBS" - PKG_CHECK_EXISTS(cairo-png >= $cairo_required, have_cairo_png=true, :) - if $have_cairo_png; then - AC_DEFINE(HAVE_CAIRO_PNG, 1, [Whether Cairo has PNG support]) - fi - - PKG_CHECK_EXISTS(cairo-ps >= $cairo_required, have_cairo_ps=true, :) - if $have_cairo_ps; then - AC_DEFINE(HAVE_CAIRO_PS, 1, [Whether Cairo has PS support]) - fi - - PKG_CHECK_EXISTS(cairo-pdf >= $cairo_required, have_cairo_pdf=true, :) - if $have_cairo_pdf; then - AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether Cairo has PDF support]) - fi - - PKG_CHECK_EXISTS(cairo-xlib >= $cairo_required, have_cairo_xlib=true, :) - if $have_cairo_xlib; then - AC_DEFINE(HAVE_CAIRO_XLIB, 1, [Whether Cairo has Xlib support]) - fi - have_cairo=false - PKG_CHECK_EXISTS(cairo-win32 >= $cairo_required, have_cairo_win32=true, :) - if $have_cairo_win32 && $have_win32; then + if $have_win32; then + PKG_CHECK_EXISTS(cairo-win32 >= $cairo_required, have_cairo_win32=true, :) + fi + if $have_cairo_win32; then AC_DEFINE(HAVE_CAIRO_WIN32, 1, [Whether Cairo uses the Win32 GDI for fonts]) have_cairo=true fi - PKG_CHECK_EXISTS(cairo-ft >= $cairo_required, have_cairo_freetype=true, :) - if $have_cairo_freetype && $have_freetype ; then + if $have_freetype; then + PKG_CHECK_EXISTS(cairo-ft >= $cairo_required, have_cairo_freetype=true, :) + fi + if $have_cairo_freetype; then AC_DEFINE(HAVE_CAIRO_FREETYPE, 1, [Whether Cairo uses FreeType for fonts]) have_cairo=true fi - PKG_CHECK_EXISTS(cairo-atsui >= $cairo_required, have_cairo_atsui=true, :) - if $have_cairo_atsui && $have_atsui ; then + if $have_atsui; then + PKG_CHECK_EXISTS(cairo-atsui >= $cairo_required, have_cairo_atsui=true, :) + fi + if $have_cairo_atsui; then AC_DEFINE(HAVE_CAIRO_ATSUI, 1, [Whether Cairo uses ATSUI for fonts]) have_cairo=true fi if $have_cairo ; then AC_DEFINE(HAVE_CAIRO, 1, [Have usable Cairo library and font backend]) + + PKG_CHECK_EXISTS(cairo-png >= $cairo_required, have_cairo_png=true, :) + if $have_cairo_png; then + AC_DEFINE(HAVE_CAIRO_PNG, 1, [Whether Cairo has PNG support]) + fi + + PKG_CHECK_EXISTS(cairo-ps >= $cairo_required, have_cairo_ps=true, :) + if $have_cairo_ps; then + AC_DEFINE(HAVE_CAIRO_PS, 1, [Whether Cairo has PS support]) + fi + + PKG_CHECK_EXISTS(cairo-pdf >= $cairo_required, have_cairo_pdf=true, :) + if $have_cairo_pdf; then + AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether Cairo has PDF support]) + fi + + PKG_CHECK_EXISTS(cairo-xlib >= $cairo_required, have_cairo_xlib=true, :) + if $have_cairo_xlib; then + AC_DEFINE(HAVE_CAIRO_XLIB, 1, [Whether Cairo has Xlib support]) + fi fi LIBS=$pango_save_libs @@ -398,9 +388,9 @@ AM_CONDITIONAL(HAVE_CAIRO_PNG, $have_cairo_png) AM_CONDITIONAL(HAVE_CAIRO_PS, $have_cairo_ps) AM_CONDITIONAL(HAVE_CAIRO_PDF, $have_cairo_pdf) AM_CONDITIONAL(HAVE_CAIRO_XLIB, $have_cairo_xlib) -AM_CONDITIONAL(HAVE_CAIRO_WIN32, $have_cairo_win32 && $have_win32) -AM_CONDITIONAL(HAVE_CAIRO_FREETYPE, $have_cairo_freetype && $have_freetype) -AM_CONDITIONAL(HAVE_CAIRO_ATSUI, $have_cairo_atsui && $have_atsui) +AM_CONDITIONAL(HAVE_CAIRO_WIN32, $have_cairo_win32) +AM_CONDITIONAL(HAVE_CAIRO_FREETYPE, $have_cairo_freetype) +AM_CONDITIONAL(HAVE_CAIRO_ATSUI, $have_cairo_atsui) # # We must have some backend defined, in order for the pango-querymodules @@ -408,8 +398,8 @@ AM_CONDITIONAL(HAVE_CAIRO_ATSUI, $have_cairo_atsui && $have_atsui) # a new Pango backend outside of Pango, you are up to sending the necessary # patch to fix that rule. :-) # -if $have_freetype || $have_x || $have_xft || $have_win32 || $have_cairo_atsui ; then : ; else - AC_MSG_ERROR([*** Didn't find any of FreeType, X11, ATSUI, or Win32. +if $have_freetype || $have_x || $have_xft || $have_cairo; then : ; else + AC_MSG_ERROR([*** Could not enable any of FreeType, X11, Cairo, or Win32 backends. *** Must have at least one backend to build Pango.]) fi @@ -683,28 +673,23 @@ case $enable_explicit_deps in esac AC_MSG_RESULT($enable_explicit_deps) -PKGCONFIG_X_LIBS= -PKGCONFIG_XFT_LIBS= -PKGCONFIG_FREETYPE_LIBS= PKGCONFIG_MATH_LIBS= -PKGCONFIG_CAIRO_LIBS= +PKGCONFIG_CAIRO_REQUIRES= if test $enable_explicit_deps = yes ; then - PKGCONFIG_X_LIBS="$X_LIBS $X_EXTRA_LIBS" - PKGCONFIG_XFT_LIBS=$XFT_LIBS - PKGCONFIG_FREETYPE_LIBS=$FREETYPE_LIBS PKGCONFIG_MATH_LIBS=-lm - PKGCONFIG_CAIRO_LIBS=$FREETYPE_LIBS - if $have_cairo_freetype ; then - PKGCONFIG_CAIRO_REQUIRES=pangoft2 + + X_LIBS="$X_LIBS $X_EXTRA_LIBS" + + if $have_cairo_freetype; then + PKGCONFIG_CAIRO_REQUIRES="$PKGCONFIG_CAIRO_REQUIRES pangoft2" + fi + if $have_cairo_win32; then + PKGCONFIG_CAIRO_REQUIRES="$PKGCONFIG_CAIRO_REQUIRES pangowin32" fi fi -AC_SUBST(PKGCONFIG_X_LIBS) -AC_SUBST(PKGCONFIG_XFT_LIBS) -AC_SUBST(PKGCONFIG_FREETYPE_LIBS) AC_SUBST(PKGCONFIG_MATH_LIBS) -AC_SUBST(PKGCONFIG_CAIRO_LIBS) AC_SUBST(PKGCONFIG_CAIRO_REQUIRES) AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no) diff --git a/pango-uninstalled.pc.in b/pango-uninstalled.pc.in index d25b888b..662d5450 100644 --- a/pango-uninstalled.pc.in +++ b/pango-uninstalled.pc.in @@ -2,6 +2,5 @@ Name: Pango Uninstalled Description: Internationalized text handling, Not Installed Version: @VERSION@ Requires: glib-2.0,gobject-2.0,gmodule-no-export-2.0 -Libs: ${pc_top_builddir}/${pcfiledir}/pango/libpango-@PANGO_API_VERSION@.la +Libs: ${pc_top_builddir}/${pcfiledir}/pango/libpango-@PANGO_API_VERSION@.la @PKGCONFIG_MATH_LIBS@ Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ - diff --git a/pango.pc.in b/pango.pc.in index 64d77aa8..5cc3ef8a 100644 --- a/pango.pc.in +++ b/pango.pc.in @@ -11,4 +11,3 @@ Version: @VERSION@ Requires: glib-2.0,gobject-2.0,gmodule-no-export-2.0 Libs: -L${libdir} -lpango-@PANGO_API_VERSION@ @PKGCONFIG_MATH_LIBS@ Cflags: -I${includedir}/pango-1.0 - diff --git a/pangocairo-uninstalled.pc.in b/pangocairo-uninstalled.pc.in index 69849e86..fa0700a2 100644 --- a/pangocairo-uninstalled.pc.in +++ b/pangocairo-uninstalled.pc.in @@ -2,6 +2,5 @@ Name: Pango Cairo Uninstalled Description: Cairo rendering support for Pango, Not Installed Version: @VERSION@ Requires: pango cairo @PKGCONFIG_CAIRO_REQUIRES@ -Libs: ${pc_top_builddir}/${pcfiledir}/pango/libpangocairo-@PANGO_API_VERSION@.la @PKGCONFIG_CAIRO_LIBS@ +Libs: ${pc_top_builddir}/${pcfiledir}/pango/libpangocairo-@PANGO_API_VERSION@.la Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ - diff --git a/pangocairo.pc.in b/pangocairo.pc.in index 8dbcfacc..9f18defd 100644 --- a/pangocairo.pc.in +++ b/pangocairo.pc.in @@ -7,5 +7,5 @@ Name: Pango Cairo Description: Cairo rendering support for Pango Version: @VERSION@ Requires: pango cairo @PKGCONFIG_CAIRO_REQUIRES@ -Libs: -L${libdir} -lpangocairo-@PANGO_API_VERSION@ @PKGCONFIG_CAIRO_LIBS@ +Libs: -L${libdir} -lpangocairo-@PANGO_API_VERSION@ Cflags: -I${includedir}/pango-1.0 diff --git a/pangoft2-uninstalled.pc.in b/pangoft2-uninstalled.pc.in index 01c38bf7..7a894aca 100644 --- a/pangoft2-uninstalled.pc.in +++ b/pangoft2-uninstalled.pc.in @@ -1,7 +1,7 @@ Name: Pango FT2 Uninstalled Description: Freetype 2.0 font support for Pango, Not Installed Version: @VERSION@ -Requires: pango -Libs: ${pc_top_builddir}/${pcfiledir}/pango/libpangoft2-@PANGO_API_VERSION@.la @FREETYPE_LIBS@ -Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ @FREETYPE_CFLAGS@ +Requires: pango freetype2 +Libs: ${pc_top_builddir}/${pcfiledir}/pango/libpangoft2-@PANGO_API_VERSION@.la +Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ diff --git a/pangoft2.pc.in b/pangoft2.pc.in index 13ace234..9b1e138d 100644 --- a/pangoft2.pc.in +++ b/pangoft2.pc.in @@ -3,10 +3,9 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ -Name: Pango FT2 -Description: Freetype 2.0 font support for Pango +Name: Pango FT2 and Pango Fc +Description: Freetype 2.0 and fontconfig font support for Pango Version: @VERSION@ -Requires: pango -Libs: -L${libdir} -lpangoft2-@PANGO_API_VERSION@ @PKGCONFIG_FREETYPE_LIBS@ -Cflags: -I${includedir}/pango-1.0 @FONTCONFIG_CFLAGS@ @FREETYPE_CFLAGS@ - +Requires: pango freetype2 fontconfig +Libs: -L${libdir} -lpangoft2-@PANGO_API_VERSION@ +Cflags: -I${includedir}/pango-1.0 diff --git a/pangowin32.pc.in b/pangowin32.pc.in index ab74a201..250d935b 100644 --- a/pangowin32.pc.in +++ b/pangowin32.pc.in @@ -7,6 +7,5 @@ Name: Pango Win32 Description: Win32 GDI font support for Pango Version: @VERSION@ Requires: pango -Libs: -L${libdir} -lpangowin32-@PANGO_API_VERSION@ +Libs: -L${libdir} -lpangowin32-@PANGO_API_VERSION@ @WIN32_LIBS@ Cflags: -I${includedir}/pango-1.0 - diff --git a/pangox-uninstalled.pc.in b/pangox-uninstalled.pc.in index 34e2655c..434cc613 100644 --- a/pangox-uninstalled.pc.in +++ b/pangox-uninstalled.pc.in @@ -3,4 +3,4 @@ Description: X Window System font support for Pango, Not Installed Version: @VERSION@ Requires: pango Libs: ${pc_top_builddir}/${pcfiledir}/pango/libpangox-@PANGO_API_VERSION@.la @X_LIBS@ -Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ +Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ @X_CFLAGS@ diff --git a/pangox.pc.in b/pangox.pc.in index bb7ff511..95f1c261 100644 --- a/pangox.pc.in +++ b/pangox.pc.in @@ -7,6 +7,5 @@ Name: Pango X Description: X Window System font support for Pango Version: @VERSION@ Requires: pango -Libs: -L${libdir} -lpangox-@PANGO_API_VERSION@ @PKGCONFIG_X_LIBS@ +Libs: -L${libdir} -lpangox-@PANGO_API_VERSION@ @X_LIBS@ Cflags: -I${includedir}/pango-1.0 @X_CFLAGS@ - diff --git a/pangoxft-uninstalled.pc.in b/pangoxft-uninstalled.pc.in index 97a6bb55..4d7f4d4b 100644 --- a/pangoxft-uninstalled.pc.in +++ b/pangoxft-uninstalled.pc.in @@ -1,7 +1,6 @@ Name: Pango Xft Uninstalled Description: Xft font support for Pango, Not Installed Version: @VERSION@ -Requires: pango -Libs: ${pc_top_builddir}/${pcfiledir}/pango/libpangoxft-@PANGO_API_VERSION@.la @XFT_LIBS@ -Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ @X_CFLAGS@ @FREETYPE_CFLAGS@ - +Requires: pango pangoft2 xft +Libs: ${pc_top_builddir}/${pcfiledir}/pango/libpangoxft-@PANGO_API_VERSION@.la +Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ diff --git a/pangoxft.pc.in b/pangoxft.pc.in index 46c2183d..66202ec7 100644 --- a/pangoxft.pc.in +++ b/pangoxft.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: Pango Xft Description: Xft font support for Pango Version: @VERSION@ -Requires: pango pangoft2 -Libs: -L${libdir} -lpangoxft-@PANGO_API_VERSION@ @PKGCONFIG_XFT_LIBS@ -Cflags: -I${includedir}/pango-1.0 @XFT_CFLAGS@ +Requires: pango pangoft2 xft +Libs: -L${libdir} -lpangoxft-@PANGO_API_VERSION@ +Cflags: -I${includedir}/pango-1.0 |