From 1038b7959944dd25d7c2a76a3c769eb26b5fd6a2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 22 Oct 2009 17:24:21 -0400 Subject: [PATCH] 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 \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 " \ --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[] = {" \ -- 2.7.4