Re: Small improvement to build Pango with uninstalled GLib.
- From: Behdad Esfahbod <behdad behdad org>
- To: mpsuzuki hiroshima-u ac jp
- Cc: gtk-i18n-list gnome org
- Subject: Re: Small improvement to build Pango with uninstalled GLib.
- Date: Thu, 22 Oct 2009 17:25:18 -0400
Thanks again. Pushed to master with minor modification.
behdad
On 10/09/2009 01:50 PM, mpsuzuki hiroshima-u ac jp wrote:
Hi,
Recently I'm trying to build Gtk+-related components
with the libraries that are built but not installed
yet ("uninstalled" in pkg-config terminology).
I propose a small improvement to build Pango with
uninstalled GLib.
In pango-x.y.z/pango/Makefile.am, glib-mkenums is
invoked directly. It is not found in PATH when GLib
is built but uninstalled. The path to uninstalled
glib-mkenums can be obtained by
pkg-config --variable=glib_mkenums glib-2.0
or AM_PATH_GLIB_2_0() macro in configure.in setups
the make variable GLIB_MKENUMS (and other GLib commands).
It seems that Pango configure.in setups GLib-related
CFLAGS carefully for thread-safety, so I don't use
AM_PATH_GLIB_2_0() and set only GLIB_MKENUMS by pkg-config
in attached patch.
Behdad, could you review the patch?
Regards,
mpsuzuki
diff --git a/configure.in b/configure.in
index 0879b14..493f86b 100644
--- a/configure.in
+++ b/configure.in
@@ -472,6 +472,10 @@ PKG_CHECK_MODULES(GLIB, $GLIB_MODULES, :,
*** Glib $GLIB_REQUIRED_VERSION or better is required. The latest version of
*** Glib is always available from ftp://ftp.gtk.org/.]))
+# Setup GLIB_MKENUMS to use glib-mkenums even if GLib is uninstalled.
+GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+AC_SUBST(GLIB_MKENUMS)
+
# Add in gthread-2.0 to CFLAGS but not to LIBS so we get any
# necesary defines for thread-safety.
GLIB_CFLAGS=`$PKG_CONFIG --cflags $GLIB_MODULES gthread-2.0`
diff --git a/pango/Makefile.am b/pango/Makefile.am
index bce92c4..f4ee060 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -130,10 +130,11 @@ pangoinclude_HEADERS = \
pango-features.h \
pango-enum-types.h
+GLIB_MKENUMS = @GLIB_MKENUMS@
pango-enum-types.h: s-enum-types-h
$(AM_V_GEN) true
s-enum-types-h: @REBUILD@ $(pango_headers) Makefile
- $(AM_V_GEN) ( cd $(srcdir)&& glib-mkenums \
+ $(AM_V_GEN) ( cd $(srcdir)&& $(GLIB_MKENUMS) \
--fhead "#ifndef __PANGO_ENUM_TYPES_H__\n#define __PANGO_ENUM_TYPES_H__\n\n#include<glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename \" */\n" \
--vhead "GType @enum_name _get_type (void);\n#define @ENUMPREFIX _TYPE_@ENUMSHORT@ (@enum_name _get_type())\n" \
@@ -146,7 +147,7 @@ s-enum-types-h: @REBUILD@ $(pango_headers) Makefile
pango-enum-types.c: s-enum-types-c
$(AM_V_GEN) true
s-enum-types-c: @REBUILD@ $(pango_headers) Makefile
- $(AM_V_GEN) ( cd $(srcdir)&& glib-mkenums \
+ $(AM_V_GEN) ( cd $(srcdir)&& $(GLIB_MKENUMS) \
--fhead "#include<pango.h>" \
--fprod "\n/* enumerations from \"@filename \" */" \
--vhead "GType\n enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G Type@Value values[] = {" \
[
Date Prev][Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]