[pango] Allow using uninstalled glib



commit 1038b7959944dd25d7c2a76a3c769eb26b5fd6a2
Author: Behdad Esfahbod <behdad behdad org>
Date:   Thu Oct 22 17:24:21 2009 -0400

    Allow using uninstalled glib
    
    Reported by mpsuzuki on gtk-i18n-list on 2009-10-09.

 configure.in      |    5 +++++
 pango/Makefile.am |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/configure.in b/configure.in
index 3801fd8..ba17346 100644
--- a/configure.in
+++ b/configure.in
@@ -470,6 +470,11 @@ 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..ef0245c 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -133,7 +133,7 @@ pangoinclude_HEADERS =	   \
 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 +146,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]