Skip to content

Commit

Permalink
Update build-system for avahi-discover py3/pygobject conversion
Browse files Browse the repository at this point in the history
This is a followup to PR #36 updating the build system to look for
pygobject instead of pygtk.
  • Loading branch information
andhe authored and takluyver committed Oct 24, 2016
1 parent bbcb070 commit 142124d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion avahi-python/avahi-discover/Makefile.am
Expand Up @@ -24,7 +24,7 @@ EXTRA_DIST = \

if HAVE_PYTHON
if HAVE_PYTHON_DBUS
if HAVE_PYGTK
if HAVE_PYGOBJECT

pythonscripts =

Expand Down
27 changes: 14 additions & 13 deletions configure.ac
Expand Up @@ -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


Expand Down Expand Up @@ -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")

#
Expand Down Expand Up @@ -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}
Expand All @@ -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

Expand Down

0 comments on commit 142124d

Please sign in to comment.