patch to improve uninstalled pango handling
[email protected] Fri, 23 Oct 2009 20:11:30 +0900
| Newsgroups | gmane.comp.gnome.lib.librsvg.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Fri, 23 Oct 2009 19:41:24 +0900 [email protected] wrote: >Attached is a patch to improve configure's handling of >uninstalled Gtk+. The Gtk+ library itself is detected >by pkg-config, so uninstalled Gtk+ can be detected. >However, in later, configure lookup the command >"gdk-pixbuf-query-loaders" listing available gdk-pixbuf >backend for various image file format. configure lookups >it by normal AC_PATH_PROG() macro. Therefore, when Gtk+ >is installed to system and the user is trying to build >librsvg with uninstalled Gtk+, gdk-pixbuf-query-loaders >from system is used. Attached is a similar patch to improve configure's handling of uninstalled Pango. Also the list of Pango's backends should be written a file, private list is needed to use uninstalled Pango, and the environment variable PANGO_RC_FILE is needed to guide Gtk+ application to refer the private list of uninstalled Pango backends. The patch should be used with previous Gtk+ patch. Regards, mpsuzuki diff --git a/configure.in b/configure.in index c144ddf..761db17 100644 --- a/configure.in +++ b/configure.in @@ -257,6 +257,33 @@ AM_CONDITIONAL(ENABLE_GTK_ENGINE, test "x$enable_gtk_theme" = "xyes") m4_pattern_allow([PKG_CONFIG_DISABLE_UNINSTALLED]) m4_pattern_allow([PKG_CONFIG_TOP_BUILD_DIR]) +SET_PANGO_RC_FILE= +pango_installed=`env PKG_CONFIG_DISABLE_UNINSTALLED=yes $PKG_CONFIG --uninstalled pango && echo yes || echo no` +if test "x${pango_installed}" = "xno"; then + AC_MSG_WARN([check uninstalled pango-querymodules]) + for pango_libs_arg in `env PKG_CONFIG_TOP_BUILD_DIR=. $PKG_CONFIG pango --libs` + do + case ${pango_libs_arg} in + -*) ;; + *libpango*la) + case `basename ${pango_libs_arg}` in + libpango*.la) + pango_builddir=`dirname ${pango_libs_arg}` + AC_MSG_WARN([generate pango.modules and pangorc for libraries in ${pango_builddir}]) + ${pango_builddir}/pango-querymodules ${pango_builddir}/../modules/*/*.la > pango.modules + echo > pangorc '[[Pango]]' + echo >> pangorc 'ModuleFiles = '`pwd`/pango.modules + SET_PANGO_RC_FILE='PANGO_RC_FILE=${top_builddir}/pangorc' + ;; + *) ;; + esac + ;; + *) ;; + esac + done +fi +AC_SUBST(SET_PANGO_RC_FILE) + SET_GDK_PIXBUF_LOADERS= gdk_installed=`env PKG_CONFIG_DISABLE_UNINSTALLED=yes $PKG_CONFIG --uninstalled gdk-pixbuf-2.0 && echo yes || echo no` diff --git a/tests/Makefile.am b/tests/Makefile.am index d2c8aab..77d2afc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,6 +2,7 @@ SUBDIRS=pdiff . TESTS = rsvg-test TESTS_ENVIRONMENT = \ + $(SET_PANGO_RC_FILE) \ $(SET_GDK_PIXBUF_LOADERS) LDADD = $(top_builddir)/librsvg-2.la \ ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference