From 142124dae6f043085aba59fca4657c56b2b23b65 Mon Sep 17 00:00:00 2001 From: Andreas Henriksson Date: Mon, 17 Oct 2016 00:42:39 +0200 Subject: [PATCH] Update build-system for avahi-discover py3/pygobject conversion This is a followup to PR #36 updating the build system to look for pygobject instead of pygtk. --- avahi-python/avahi-discover/Makefile.am | 2 +- configure.ac | 27 +++++++++++++------------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/avahi-python/avahi-discover/Makefile.am b/avahi-python/avahi-discover/Makefile.am index d16bd11ca..5fc4b25f0 100644 --- a/avahi-python/avahi-discover/Makefile.am +++ b/avahi-python/avahi-discover/Makefile.am @@ -24,7 +24,7 @@ EXTRA_DIST = \ if HAVE_PYTHON if HAVE_PYTHON_DBUS -if HAVE_PYGTK +if HAVE_PYGOBJECT pythonscripts = diff --git a/configure.ac b/configure.ac index 607d3343f..b31aaefe3 100644 --- a/configure.ac +++ b/configure.ac @@ -789,22 +789,23 @@ AC_ARG_ENABLE(python, esac],[HAVE_PYTHON=yes]) HAVE_PYTHON_DBUS=no -HAVE_PYGTK=no +HAVE_PYGOBJECT=no if test "x$HAVE_PYTHON" = "xyes" ; then AM_PATH_PYTHON([2.4]) - AC_ARG_ENABLE(pygtk, - AS_HELP_STRING([--disable-pygtk],[Disable use of GTK in Python]), + AC_ARG_ENABLE(pygobject, + AS_HELP_STRING([--disable-pygobject],[Disable use of Python GObject]), [case "${enableval}" in - yes) HAVE_PYGTK=yes ;; - no) HAVE_PYGTK=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-pygtk) ;; + yes) HAVE_PYGOBJECT=yes ;; + no) HAVE_PYGOBJECT=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-pygobject) ;; esac], - [HAVE_PYGTK=yes]) + [HAVE_PYGOBJECT=yes]) - if test "x$HAVE_PYGTK" = "xyes" ; then - AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module gtk)]) + if test "x$HAVE_PYGOBJECT" = "xyes" ; then + PKG_CHECK_MODULES([PYGOBJECT],[pygobject-2.0],, + [AC_MSG_ERROR(Could not find Python GObject)]) fi @@ -832,7 +833,7 @@ if test "x$HAVE_PYTHON" = "xyes" ; then fi fi AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ]) -AM_CONDITIONAL(HAVE_PYGTK, test "x$HAVE_PYGTK" = "xyes") +AM_CONDITIONAL(HAVE_PYGOBJECT, test "x$HAVE_PYGOBJECT" = "xyes") AM_CONDITIONAL(HAVE_PYTHON_DBUS, test "x$HAVE_PYTHON_DBUS" = "xyes") # @@ -1153,7 +1154,7 @@ echo " Enable DBM: ${HAVE_DBM} Enable libdaemon: ${HAVE_LIBDAEMON} Enable Python: ${HAVE_PYTHON} - Enable pygtk: ${HAVE_PYGTK} + Enable pygobject: ${HAVE_PYGOBJECT} Enable python-dbus: ${HAVE_PYTHON_DBUS} Enable QT3: ${HAVE_QT3} Enable QT4: ${HAVE_QT4} @@ -1177,9 +1178,9 @@ if test "x$HAVE_XML" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then BUILD_DAEMON=yes fi -BUILD_PYTHON="no (You need python, pygtk and python-dbus!)" +BUILD_PYTHON="no (You need python, pygobject and python-dbus!)" -if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" -a "x$HAVE_PYTHON" = "xyes" -a "x$HAVE_PYTHON_DBUS" = "xyes" -a "x$HAVE_PYGTK" = "xyes" ; then +if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" -a "x$HAVE_PYTHON" = "xyes" -a "x$HAVE_PYTHON_DBUS" = "xyes" -a "x$HAVE_PYGOBJECT" = "xyes" ; then BUILD_PYTHON=yes fi