# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
-include aminclude.am
+ACLOCAL_AMFLAGS = -I common
+
+include $(srcdir)/common/doxygen.mk
EXTRA_DIST = bootstrap.sh LICENSE $(DX_CONFIG)
-SUBDIRS = avahi-common avahi-core avahi-discover avahi-client avahi-daemon initscript avahi-dnsconfd avahi-utils examples
+SUBDIRS = common avahi-common avahi-core avahi-discover avahi-client avahi-daemon initscript avahi-dnsconfd avahi-utils examples
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = avahi-core.pc
SUBDIRS=avahi
-avahiscriptsdir = $(bindir)
-
if HAVE_PYTHON
-avahiscripts_SCRIPTS = avahi-publish-address avahi-publish-service avahi-dump-all
+bin_SCRIPTS = avahi-publish-address avahi-publish-service avahi-dump-all
endif
-EXTRA_DITS = avahi-publish-address.in avahi-publish-service.in avahi-dump-all.in
+CLEANFILES = $(bin_SCRIPTS)
try:
opts, args = getopt.getopt(sys.argv[1:], "d:H:", ["help", "domain=", "host="])
except getopt.GetoptError:
- usage(2)
+ pass
domain = ""
host = ""
host = a
if len(args) < 3:
- sys.stderr.write("Invalid number of arguments\n")
- sys.exit(1)
+ usage(2)
name = args[0]
stype = args[1]
endif
EXTRA_DIST = __init__.py SimpleGladeApp.py
+
+clean-local:
+ rm -rf *.pyc *.pyo
rm -rf autom4te.cache
rm -f config.cache
- run_versioned aclocal 1.9
+ run_versioned aclocal 1.9 -I common
libtoolize -c --force
autoheader
run_versioned automake 1.9 -a -c --foreign
--- /dev/null
+EXTRA_DIST = \
+ doxygen.m4 \
+ doxygen.mk
+
fi
AM_CONDITIONAL(ENABLE_GTK, test "x$ENABLE_GTK" = "xyes")
+#
+# Doxygen
+#
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN(avahi, doxygen.cfg, doxygen)
+#
+# D-BUS
+#
AC_ARG_ENABLE(dbus,
AC_HELP_STRING([--enable-dbus],[use DBus (default=yes)]),
[case "${enableval}" in
AM_CONDITIONAL(ENABLE_DBUS, test "x$ENABLE_DBUS" = "xyes")
+#
+# Expat
+#
AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
if ! $have_expat ; then
AC_MSG_ERROR([*** libexpat not found ***])
fi
+#
+# LibDaemon
+#
PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
AC_SUBST(LIBDAEMON_CFLAGS)
AC_SUBST(LIBDAEMON_LIBS)
AC_SUBST(avahi_runtime_dir)
AC_SUBST(avahi_socket)
-AM_PATH_PYTHON(2.4, [HAVE_PYTHON=yes], [HAVE_PYTHON=no])
+#
+# Python stuff
+#
+AC_SUBST(PYGTK_REQ, 2.6.0)
+
+AM_PATH_PYTHON(2.4)
+AM_PYTHON_CHECK_VERSION("$PYTHON", 2.4, [HAVE_PYTHON=yes], [HAVE_PYTHON=no])
AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = xyes ])
+# check for pygtk
+PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ)
+PYGTK_DIR="`$PKG_CONFIG --variable=pyexecdir pygtk-2.0`"
+AC_SUBST(PYGTK_DIR)
+AC_MSG_NOTICE(Using pygtk installed in $PYGTK_DIR)
+PYGTK_VERSION="`$PKG_CONFIG --modversion pygtk-2.0`"
+if test "x$PYGTK_VERSION" = "x2.5.2"
+then
+ AC_MSG_ERROR([PyGTK 2.5.2 contains known bugs, please install other version])
+fi
+export PYTHONPATH=$PYGTK_DIR:$PYTHONPATH
+
+# check for gtk.glade
+AC_MSG_CHECKING(for gtk.glade)
+prog="
+import sys
+try:
+ import gtk.glade
+except RuntimeError:
+ sys.exit(0)
+except ImportError:
+ sys.exit(1)
+sys.exit(0)
+"
+
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
+then
+ AC_MSG_RESULT(found)
+else
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR([You need to have python libglade bindings installed])
+fi
+
+dnl ==========================================================================
AC_CONFIG_FILES([
Makefile
avahi-core.pc
avahi-utils/avahi-publish-address
avahi-utils/avahi-discover
examples/Makefile
+common/Makefile
])
AC_OUTPUT
+++ /dev/null
-#!/bin/sh
-
-# py-compile - Compile a Python program
-# Copyright 2000, 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# called as "py-compile [--basedir DIR] PY_FILES ...
-
-if [ -z "$PYTHON" ]; then
- PYTHON=python
-fi
-
-basedir=
-
-case "$1" in
- --basedir)
- basedir=$2
- shift 2
- ;;
- --help)
- echo "Usage: py-compile [--basedir DIR] PY_FILES ..."
- echo "Byte compile some python scripts. This should be performed"
- echo "after they have been moved to the final installation location"
- exit 0
- ;;
- --version)
- echo "py-compile version 0.0"
- exit 0
- ;;
-esac
-
-if [ $# = 0 ]; then
- echo "No files given to $0" 1>&2
- exit 1
-fi
-
-# if basedir was given, then it should be prepended to filenames before
-# byte compilation.
-if [ -z "$basedir" ]; then
- trans="path = file"
-else
- trans="path = os.path.join('$basedir', file)"
-fi
-
-$PYTHON -c "
-import sys, os, string, py_compile
-
-files = '''$*'''
-print 'Byte-compiling python modules...'
-for file in string.split(files):
- $trans
- if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'):
- continue
- print file,
- sys.stdout.flush()
- py_compile.compile(path)
-print" || exit $?
-
-# this will fail for python < 1.5, but that doesn't matter ...
-$PYTHON -O -c "
-import sys, os, string, py_compile
-
-files = '''$*'''
-print 'Byte-compiling python modules (optimized versions) ...'
-for file in string.split(files):
- $trans
- if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'):
- continue
- print file,
- sys.stdout.flush()
- py_compile.compile(path)
-print" 2>/dev/null || :
-