summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2001-07-02 01:36:20 +0000
committerJames Henstridge <jamesh@src.gnome.org>2001-07-02 01:36:20 +0000
commita1ad6a7ed6eadfd4cee338c7b611c3d424d26ec1 (patch)
tree6a6ba85890774226977fa2d136a7da960679ad82
parentad78644778f2995b323bbd59c3537d9ed8c6b4a2 (diff)
downloadpygtk-a1ad6a7ed6eadfd4cee338c7b611c3d424d26ec1.tar.gz
fix up makefile rules to build the pango module.
2001-07-02 James Henstridge <james@daa.com.au> * Makefile.am (pangomodule_la_SOURCES): fix up makefile rules to build the pango module. * pango.override: changes so that it builds properly. * configure.in: add line to check for pango and set PANGO_CFLAGS and PANGO_LIBS.
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.am3
-rw-r--r--configure.in5
-rw-r--r--pango.override17
4 files changed, 32 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b2e200a0..a4cc3bda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2001-07-02 James Henstridge <james@daa.com.au>
+ * Makefile.am (pangomodule_la_SOURCES): fix up makefile rules to
+ build the pango module.
+
+ * pango.override: changes so that it builds properly.
+
+ * configure.in: add line to check for pango and set PANGO_CFLAGS
+ and PANGO_LIBS.
+
* Makefile.am (pangomodule_la_SOURCES): add rules to build pango
module.
diff --git a/Makefile.am b/Makefile.am
index e574f383..f5fef185 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = 1.4a
SUBDIRS = codegen gtk
-INCLUDES = $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+INCLUDES = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) $(PANGO_CFLAGS)
pyexec_LTLIBRARIES = ExtensionClass.la gobjectmodule.la pangomodule.la
@@ -25,6 +25,7 @@ pangomodule_la_LDFLAGS = -module -avoid-version \
pangomodule_la_SOURCES = \
pangomodule.c \
pango.c
+pangomodule_la_LIBADD = $(PANGO_LIBS)
$(srcdir)/pango.c: $(srcdir)/pango.defs $(srcdir)/pango.override
-chmod a+w $(srcdir)
diff --git a/configure.in b/configure.in
index b5517083..dd563973 100644
--- a/configure.in
+++ b/configure.in
@@ -29,8 +29,13 @@ else
fi
AM_PATH_GLIB_2_0(1.3.7,,[AC_MSG_ERROR(maybe you want the gtk-gnome-1-2 branch?)],gobject)
+PKG_CHECK_MODULES(PANGO, pango >= 0.17,,[AC_MSG_ERROR(maybe you want the gtk-gnome-1-2 branch?)])
AM_PATH_GTK_2_0(1.3.7,,[AC_MSG_ERROR(maybe you want the gtk-gnome-1-2 branch?)],$extra_mods)
+dnl this is so that automake picks up the SUBSTs. autoconf already has them
+AC_SUBST(PANGO_CFLAGS)
+AC_SUBST(PANGO_LIBS)
+
dnl AM_PATH_GDK_IMLIB(1.8, build_imlib=true, build_imlib=false)
dnl AM_CONDITIONAL(BUILD_IMLIB, $build_imlib)
diff --git a/pango.override b/pango.override
index a857a92d..e1bda477 100644
--- a/pango.override
+++ b/pango.override
@@ -4,5 +4,22 @@ headers
#define NO_IMPORT_PYGOBJECT
#include <pygobject.h>
#include <pango/pango.h>
+
+static PyExtensionClass *_PyGObject_Type;
+#define PyGObject_Type (*_PyGObject_Type)
+
%%
init
+
+{
+ PyObject *pygobject = PyImport_ImportModule("gobject");
+ if (pygobject != NULL) {
+ PyObject *module_dict = PyModule_GetDict(pygobject);
+
+ _PyGObject_Type = (PyExtensionClass *)PyDict_GetItemString(module_dict,
+ "GObject");
+ } else {
+ Py_FatalError("could not import gobject");
+ return;
+ }
+}