From bc234e38000505a800c3f2ecac9d09605070f685 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 21 Aug 2006 11:31:51 +0000 Subject: [PATCH] configure.ac: If pygobject is available, only build with it, else try to find pygtk to stay compatible with older ver... Original commit message from CVS: * configure.ac: If pygobject is available, only build with it, else try to find pygtk to stay compatible with older version. * gst/Makefile.am: Switch to pygobject CFLAGS. * testsuite/Makefile.am: Switch to pygobject CFLAGS. --- ChangeLog | 10 ++++++++++ configure.ac | 29 +++++++++++------------------ gst/Makefile.am | 3 +-- testsuite/Makefile.am | 3 ++- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1cfefa07d3..f257cee3aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-08-21 Edward Hervey + + * configure.ac: + If pygobject is available, only build with it, else try to find pygtk + to stay compatible with older version. + * gst/Makefile.am: + Switch to pygobject CFLAGS. + * testsuite/Makefile.am: + Switch to pygobject CFLAGS. + 2006-08-08 Edward Hervey * codegen/codegen.py: diff --git a/configure.ac b/configure.ac index 7a999c5b9c..ee03c1ed1a 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,7 @@ AC_SUBST(ACLOCAL_AMFLAGS, "-I common/m4") dnl required versions of other packages AC_SUBST(PYGTK_REQ, 2.6.3) +AC_SUBST(PYGOBJECT_REQ, 2.11.2) AC_SUBST(GLIB_REQ, 2.8.0) AC_SUBST(GTK_REQ, 2.6.0) AC_SUBST(GST_REQ, 0.10.2) @@ -205,25 +206,17 @@ AC_SUBST(GST_PLUGINS_BASE_LIBS) AC_SUBST(GST_PLUGINS_BASE_CFLAGS) -dnl check for pygtk -PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ) -AC_SUBST(PYGTK_CFLAGS) +dnl check for pygobject +PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= $PYGOBJECT_REQ, + HAVE_PYGOBJECT="yes", HAVE_PYGOBJECT="no") -AC_MSG_CHECKING(for pygtk defs) -PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0` -AC_SUBST(PYGTK_DEFSDIR) -AC_MSG_RESULT($PYGTK_DEFSDIR) - -AC_MSG_CHECKING(for pygtk h2def) -PYGTK_H2DEF=`$PKG_CONFIG --variable=codegendir pygtk-2.0`/h2def.py -AC_SUBST(PYGTK_H2DEF) -AC_MSG_RESULT($PYGTK_H2DEF) - -AC_MSG_CHECKING(for pygtk codegen) -PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py" -dnl PYGTK_CODEGEN="$PYTHON \$(top_srcdir)/codegen/codegen.py" -AC_SUBST(PYGTK_CODEGEN) -AC_MSG_RESULT($PYGTK_CODEGEN) +if test "x$HAVE_PYGOBJECT" = "xno"; then + dnl If we don't have pygobject, then check for pygtk + dnl check for pygtk + PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ) + PYGOBJET_CFLAGS="\$(PYGTK_CFLAGS)" +fi +AC_SUBST(PYGOBJECT_CFLAGS) dnl define an ERROR_CFLAGS Makefile variable GST_SET_ERROR_CFLAGS($GST_CVS) diff --git a/gst/Makefile.am b/gst/Makefile.am index 12d26c39a8..16ad8ff074 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -1,4 +1,4 @@ -common_cflags = $(PYGTK_CFLAGS) $(GST_CFLAGS) $(GST_OPTION_CFLAGS) -fno-strict-aliasing +common_cflags = $(PYGOBJECT_CFLAGS) $(GST_CFLAGS) $(GST_OPTION_CFLAGS) -fno-strict-aliasing common_libadd = $(GST_LIBS) $(GST_OPTION_LIBS) common_ldflags = -module -avoid-version @@ -32,7 +32,6 @@ versioned_overrides = \ INCLUDES = $(PYTHON_INCLUDES) EXTRA_DIST = $(defs_DATA) $(versioned_overrides) common.h arg-types.py -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ GEN_FILES = arg-types.py gst-types.defs libs.defs base.defs # GStreamer bindings diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index b0833c5355..6020383c30 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -1,6 +1,6 @@ INCLUDES = \ $(PYTHON_INCLUDES) \ - $(PYGTK_CFLAGS) \ + $(PYGOBJET_CFLAGS) \ $(PYGST_CFLAGS) \ $(GST_CFLAGS) @@ -9,6 +9,7 @@ linked_LIBS = testhelper.la testhelper_la_LDFLAGS = -module -avoid-version testhelper_la_LIBADD = $(GLIB_LIBS) +testhelper_la_CFLAGS = $(PYGOBJECT_CFLAGS) testhelper_la_SOURCES = \ testhelpermodule.c \ test-object.c