Allow using uninstalled glib
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 22 Oct 2009 21:24:21 +0000 (17:24 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 22 Oct 2009 21:24:21 +0000 (17:24 -0400)
Reported by mpsuzuki on gtk-i18n-list on 2009-10-09.

configure.in
pango/Makefile.am

index 3801fd8..ba17346 100644 (file)
@@ -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`
index bce92c4..ef0245c 100644 (file)
@@ -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[] = {"     \