pango r2559 - trunk



Author: behdad
Date: Tue Jan 29 22:38:29 2008
New Revision: 2559
URL: http://svn.gnome.org/viewvc/pango?rev=2559&view=rev

Log:
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.



Modified:
   trunk/configure.in
   trunk/pango-uninstalled.pc.in
   trunk/pango.pc.in
   trunk/pangocairo-uninstalled.pc.in
   trunk/pangocairo.pc.in
   trunk/pangoft2-uninstalled.pc.in
   trunk/pangoft2.pc.in
   trunk/pangowin32.pc.in
   trunk/pangox-uninstalled.pc.in
   trunk/pangox.pc.in
   trunk/pangoxft-uninstalled.pc.in
   trunk/pangoxft.pc.in

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue Jan 29 22:38:29 2008
@@ -222,44 +222,28 @@
 #
 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 @@
   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_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 @@
 # 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 @@
 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)
 

Modified: trunk/pango-uninstalled.pc.in
==============================================================================
--- trunk/pango-uninstalled.pc.in	(original)
+++ trunk/pango-uninstalled.pc.in	Tue Jan 29 22:38:29 2008
@@ -2,6 +2,5 @@
 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@
-

Modified: trunk/pango.pc.in
==============================================================================
--- trunk/pango.pc.in	(original)
+++ trunk/pango.pc.in	Tue Jan 29 22:38:29 2008
@@ -11,4 +11,3 @@
 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
-

Modified: trunk/pangocairo-uninstalled.pc.in
==============================================================================
--- trunk/pangocairo-uninstalled.pc.in	(original)
+++ trunk/pangocairo-uninstalled.pc.in	Tue Jan 29 22:38:29 2008
@@ -2,6 +2,5 @@
 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@
-

Modified: trunk/pangocairo.pc.in
==============================================================================
--- trunk/pangocairo.pc.in	(original)
+++ trunk/pangocairo.pc.in	Tue Jan 29 22:38:29 2008
@@ -7,5 +7,5 @@
 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

Modified: trunk/pangoft2-uninstalled.pc.in
==============================================================================
--- trunk/pangoft2-uninstalled.pc.in	(original)
+++ trunk/pangoft2-uninstalled.pc.in	Tue Jan 29 22:38:29 2008
@@ -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@
 

Modified: trunk/pangoft2.pc.in
==============================================================================
--- trunk/pangoft2.pc.in	(original)
+++ trunk/pangoft2.pc.in	Tue Jan 29 22:38:29 2008
@@ -3,10 +3,9 @@
 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

Modified: trunk/pangowin32.pc.in
==============================================================================
--- trunk/pangowin32.pc.in	(original)
+++ trunk/pangowin32.pc.in	Tue Jan 29 22:38:29 2008
@@ -7,6 +7,5 @@
 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
-

Modified: trunk/pangox-uninstalled.pc.in
==============================================================================
--- trunk/pangox-uninstalled.pc.in	(original)
+++ trunk/pangox-uninstalled.pc.in	Tue Jan 29 22:38:29 2008
@@ -3,4 +3,4 @@
 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@

Modified: trunk/pangox.pc.in
==============================================================================
--- trunk/pangox.pc.in	(original)
+++ trunk/pangox.pc.in	Tue Jan 29 22:38:29 2008
@@ -7,6 +7,5 @@
 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@
-

Modified: trunk/pangoxft-uninstalled.pc.in
==============================================================================
--- trunk/pangoxft-uninstalled.pc.in	(original)
+++ trunk/pangoxft-uninstalled.pc.in	Tue Jan 29 22:38:29 2008
@@ -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@

Modified: trunk/pangoxft.pc.in
==============================================================================
--- trunk/pangoxft.pc.in	(original)
+++ trunk/pangoxft.pc.in	Tue Jan 29 22:38:29 2008
@@ -6,6 +6,6 @@
 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]