2 # Process this file with autoconf to produce a configure script.
6 # This file is part of avahi.
8 # avahi is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU Lesser General Public License as
10 # published by the Free Software Foundation; either version 2 of the
11 # License, or (at your option) any later version.
13 # avahi is distributed in the hope that it will be useful, but WITHOUT
14 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 # License for more details.
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with avahi; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24 AC_INIT([avahi],[0.6.15],[avahi (at) lists (dot) freedesktop (dot) org])
25 AC_CONFIG_SRCDIR([avahi-core/server.c])
26 AC_CONFIG_HEADERS([config.h])
27 AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
29 AC_SUBST(PACKAGE_URL, [http://avahi.org/])
31 AC_SUBST(LIBAVAHI_COMMON_VERSION_INFO, [7:3:4])
32 AC_SUBST(LIBAVAHI_CORE_VERSION_INFO, [4:4:0])
33 AC_SUBST(LIBAVAHI_CLIENT_VERSION_INFO, [5:1:2])
34 AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [1:1:0])
35 AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [1:1:0])
36 AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [1:1:0])
37 AC_SUBST(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO, [1:0:0])
38 AC_SUBST(LIBAVAHI_COMPAT_HOWL_VERSION_INFO, [0:0:0])
39 AC_SUBST(HOWL_COMPAT_VERSION, [0.9.8])
41 if type -p stow > /dev/null && test -d /usr/local/stow ; then
42 AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
43 ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
46 # Checks for programs.
54 AC_PROG_GCC_TRADITIONAL
59 ACX_PTHREAD(,AC_MSG_ERROR([Missing POSIX Threads support]))
64 AC_CHECK_HEADER(linux/netlink.h,
66 AC_DEFINE([HAVE_NETLINK],[],[Support for Linux netlink])
68 #include <sys/socket.h>
69 #include <asm/types.h>
72 AM_CONDITIONAL(HAVE_NETLINK, [ test x"$HAVE_NETLINK" = xyes ])
75 # Check for net/route.h
77 AC_CHECK_HEADER(net/route.h,
79 AC_DEFINE([HAVE_PF_ROUTE],[],[Support for PF_ROUTE])
81 #include <sys/types.h>
82 #include <sys/socket.h>
85 AM_CONDITIONAL(HAVE_PF_ROUTE, [ test x"$HAVE_PF_ROUTE" = xyes ])
88 # Check for sys/filio.h; needed for FIONREAD on Solaris
90 AC_CHECK_HEADER(sys/filio.h,
92 AC_DEFINE([HAVE_SYS_FILIO_H],[],[Support for sys/filio.h])
96 AM_CONDITIONAL(HAVE_SYS_FILIO_H, [ test x"$HAVE_SYS_FILIO_H" = xyes ])
99 # Check for sys/sysctl.h; not present on Solaris
101 AC_CHECK_HEADER(sys/sysctl.h,
103 AC_DEFINE([HAVE_SYS_SYSCTL_H],[],[Support for sys/sysctl.h])
105 #include <sys/types.h>
106 #include <sys/socket.h>
107 #include <sys/param.h>
110 AM_CONDITIONAL(HAVE_SYS_SYSCTL_H, [ test x"$HAVE_SYS_SYSCTL_H" = xyes ])
113 # Check for lifconf struct; only present on Solaris
115 AC_MSG_CHECKING(for struct lifconf)
116 AC_CACHE_VAL(avahi_cv_has_struct_lifconf,
118 [#include <sys/socket.h>
120 ],[sizeof (struct lifconf);],
121 avahi_cv_has_struct_lifconf=yes,avahi_cv_has_struct_lifconf=no)])
122 AC_MSG_RESULT($avahi_cv_has_struct_lifconf)
123 if test $avahi_cv_has_struct_lifconf = yes; then
124 AC_DEFINE(HAVE_STRUCT_LIFCONF,1,[Define if there is a struct lifconf.])
128 # Check for struct ip_mreqn
130 AC_MSG_CHECKING(for struct ip_mreqn)
131 AC_TRY_COMPILE([#include <netinet/in.h>], [
132 struct ip_mreqn mreq;
133 mreq.imr_address.s_addr = 0;
137 AC_DEFINE([HAVE_STRUCT_IP_MREQN],[],[Support for struct ip_mreqn])
139 # We'll just have to try and use struct ip_mreq
141 AC_MSG_CHECKING(for struct ip_mreq)
142 AC_TRY_COMPILE([#include <netinet/in.h>], [
144 mreq.imr_interface.s_addr = 0;
148 AC_DEFINE([HAVE_STRUCT_IP_MREQ],[],[Support for struct ip_mreq])
150 # No multicast support
156 # Detecting the linux distribution for specific things like init scripts.
158 AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of debian, gentoo, archlinux, fedora, mandriva, darwin, netbsd, freebsd, slackware or none]))
159 if test "z$with_distro" = "z"; then
160 AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
161 AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
162 AC_CHECK_FILE(/etc/arch-release,with_distro="archlinux")
163 AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
164 AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora")
165 AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
166 AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
167 if test "z$with_distro" = "z"; then
168 with_distro=`uname -s`
171 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
174 debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|slackware|none)
177 AC_MSG_WARN([Your distribution (${with_distro}) is supported but no init script exist yet! (patches welcome)])
180 AC_MSG_ERROR([Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO, set DISTRO to none if your distribution is not supported.])
183 AC_MSG_ERROR([Your distribution (${with_distro}) is not yet supported, init scripts and D-Bus configuration will not be installed! (patches welcome), you can specify --with-distro=none to skip this check])
187 AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
188 AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
189 AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
190 AM_CONDITIONAL(TARGET_ARCHLINUX, test x"$with_distro" = xarchlinux)
191 AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
192 AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
193 AM_CONDITIONAL(TARGET_DARWIN, test x"$with_distro" = xdarwin)
194 AM_CONDITIONAL(TARGET_NETBSD, test x"$with_distro" = xnetbsd)
195 AM_CONDITIONAL(TARGET_FREEBSD, test x"$with_distro" = xfreebsd)
196 AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
199 AC_LANG_CONFTEST([int main() {}])
200 $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
206 # If using GCC specify some additional parameters
207 if test "x$GCC" = "xyes" ; then
209 DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline"
211 if test "x$HAVE_NETLINK" = "xyes" ; then
212 # Test whether rtnetlink.h can be included when compiled with -std=c99
213 # some distributions (e.g. archlinux) have broken headers that dont
214 # define __u64 with -std=c99
215 AC_MSG_CHECKING([checking whether rtnetlink.h can be included with -std=c99])
218 AC_TRY_COMPILE([#include <linux/rtnetlink.h>], [],
219 use_stdc99=yes, use_stdc99=no)
221 if test x"$use_stdc99" = xyes; then
222 DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
230 DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
233 for flag in $DESIRED_FLAGS ; do
234 AC_MSG_CHECKING([whether $CC accepts $flag])
235 if test_gcc_flag $flag ; then
236 CFLAGS="$CFLAGS $flag"
244 # Checks for header files.
246 AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h netdb.h syslog.h])
249 # Checks for typedefs, structures, and compiler characteristics.
255 # Checks for library functions.
257 AC_FUNC_SELECT_ARGTYPES
260 AC_CHECK_FUNCS([gethostname memchr memmove memset mkdir select socket strchr strcspn strdup strerror strrchr strspn strstr uname setresuid setreuid setresgid setregid strcasecmp gettimeofday putenv strncasecmp strlcpy gethostbyname seteuid setegid setproctitle getprogname])
267 AC_CHECK_DECLS(environ)
270 AC_CHECK_HEADERS([sys/capability.h],,enable_chroot=no)
271 AC_CHECK_HEADERS([sys/prctl.h],,enable_chroot=no)
272 AC_CHECK_FUNCS([chroot],,enable_chroot=no)
274 AM_CONDITIONAL(ENABLE_CHROOT, test "x$enable_chroot" = "xyes")
276 if test "x$enable_chroot" = "xyes" ; then
277 AC_DEFINE([ENABLE_CHROOT], 1, [Enable chroot() usage])
280 AC_CHECK_LIB(dl, dlopen, [ AC_CHECK_HEADERS(dlfcn.h, HAVE_DLOPEN=yes, HAVE_DLOPEN=no) ], HAVE_DLOPEN=no)
281 if test "x$HAVE_DLOPEN" = "xyes" ; then
282 AC_DEFINE([HAVE_DLOPEN],1,[Have dlopen()])
284 AM_CONDITIONAL(HAVE_DLOPEN, test "x$HAVE_DLOPEN" = "xyes")
286 # Check for pkg-config manually first, as if its not installed the
287 # PKG_PROG_PKG_CONFIG macro won't be defined.
288 AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
290 if test x"$have_pkg_config" = "xno"; then
291 AC_MSG_ERROR(pkg-config is required to install this program)
300 AS_HELP_STRING([--disable-glib],[Disable use of GLib]),
301 [case "${enableval}" in
302 yes) HAVE_GLIB=yes ;;
304 *) AC_MSG_ERROR(bad value ${enableval} for --enable-glib) ;;
308 if test "x$HAVE_GLIB" = "xyes" ; then
309 PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ])
310 AC_SUBST(GLIB20_CFLAGS)
311 AC_SUBST(GLIB20_LIBS)
313 AM_CONDITIONAL(HAVE_GLIB, test "x$HAVE_GLIB" = "xyes")
319 AS_HELP_STRING([--disable-qt3],[Disable building of Qt3 mainloop integration]),
320 [case "${enableval}" in
323 *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt3) ;;
327 if test "x$HAVE_QT3" = "xyes" ; then
328 PKG_CHECK_MODULES( QT3, [ qt-mt >= 3.0.0 ])
331 QT3_PREFIX="`$PKG_CONFIG --variable=prefix qt-mt`/bin"
333 AC_CHECK_FILE( "$QT3_PREFIX/moc-qt3", [ MOC_QT3=$QT3_PREFIX/moc-qt3 ], [
334 AC_CHECK_FILE("$QT3_PREFIX/moc", [ MOC_QT3=$QT3_PREFIX/moc ], [
335 AC_MSG_ERROR([Couldn't find QT3 moc])])])
338 AM_CONDITIONAL(HAVE_QT3, test "x$HAVE_QT3" = "xyes")
344 AS_HELP_STRING([--disable-qt4],[Disable building of Qt4Core mainloop integration]),
345 [case "${enableval}" in
348 *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt4) ;;
352 if test "x$HAVE_QT4" = "xyes" ; then
353 PKG_CHECK_MODULES( QT4, [ QtCore >= 4.0.0 ])
356 QT4_PREFIX="`$PKG_CONFIG --variable=prefix QtCore`/bin"
358 AC_CHECK_FILE( "$QT4_PREFIX/moc-qt4", [ MOC_QT4=$QT4_PREFIX/moc-qt4 ], [
359 AC_CHECK_FILE("$QT4_PREFIX/moc", [ MOC_QT4=$QT4_PREFIX/moc ], [
360 AC_MSG_ERROR([Couldn't find QT4 moc])])])
363 AM_CONDITIONAL(HAVE_QT4, test "x$HAVE_QT4" = "xyes")
369 AS_HELP_STRING([--disable-gtk],[Disable use of GTK+]),
370 [case "${enableval}" in
373 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk) ;;
377 if test "x$HAVE_GTK" = "xyes" ; then
379 PKG_CHECK_MODULES(GTK20, [ gtk+-2.0 >= 2.4.0 ])
380 AC_SUBST(GTK20_CFLAGS)
383 # Check for GLADE 2.0
384 PKG_CHECK_MODULES(GLADE20, [ libglade-2.0 >= 2.4.0 ])
385 AC_SUBST(GLADE20_CFLAGS)
386 AC_SUBST(GLADE20_LIBS)
388 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
394 AS_HELP_STRING([--disable-dbus],[Disable use of D-Bus]),
395 [case "${enableval}" in
396 yes) HAVE_DBUS=yes ;;
398 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbus) ;;
402 AC_ARG_WITH(dbus-sys, AS_HELP_STRING([--with-dbus-sys=<dir>], [Path to D-Bus system.d directory]))
403 AC_ARG_WITH(dbus-system-socket, AS_HELP_STRING([--with-dbus-system-address=<address>], [Path to the D-Bus system socket, you probably want to put unix:path= at the start. Only needed for very old D-Bus releases]))
405 DBUS_VERSION="Disabled"
406 DBUS_SYS_DIR="Disabled"
407 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="Disabled"
408 if test "x$HAVE_DBUS" = "xyes" ; then
409 PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 0.34 ])
411 AC_DEFINE(HAVE_DBUS, 1, [Whether we have D-Bus or not])
413 DBUS_VERSION=`$PKG_CONFIG dbus-1 --modversion`
414 DBUS_VERSION_MAJOR=`echo $DBUS_VERSION | awk -F. '{print $1}'`
415 DBUS_VERSION_MINOR=`echo $DBUS_VERSION | awk -F. '{print $2}'`
416 DBUS_VERSION_MICRO=`echo $DBUS_VERSION | awk -F. '{print $3}'`
417 if test "z$DBUS_VERSION_MAJOR" = "z"; then
418 DBUS_VERSION_MAJOR="0"
420 if test "z$DBUS_VERSION_MINOR" = "z"; then
421 DBUS_VERSION_MINOR="0"
423 if test "z$DBUS_VERSION_MICRO" = "z"; then
424 DBUS_VERSION_MICRO="0"
427 if test "z$DBUS_VERSION_MAJOR" = "z0" -a "z$DBUS_VERSION_MINOR" = "z0" -a "z$DBUS_VERSION_MICRO" = "z0"; then
428 echo "Error: Couldn't determine the version of your D-Bus package."
429 echo " This is probably an error in this script, please report it"
430 echo " along with the following information:"
431 echo " Base D-Buss version ='$DBUS_VERSION'"
432 echo " DBUS_VERSION_MAJOR='$DBUS_VERSION_MAJOR'"
433 echo " DBUS_VERSION_MINOR='$DBUS_VERSION_MINOR'"
434 echo " DBUS_VERSION_MICRO='$DBUS_VERSION_MICRO'"
437 echo "Your D-Bus version is $DBUS_VERSION_MAJOR,$DBUS_VERSION_MINOR,$DBUS_VERSION_MICRO."
438 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
439 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
440 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
443 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
444 AC_SUBST(DBUS_CFLAGS)
447 if ! test -z "$with_dbus_sys" ; then
448 DBUS_SYS_DIR="$with_dbus_sys"
450 DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
452 AC_SUBST(DBUS_SYS_DIR)
454 if ! test -z "$with_dbus_system_address" ; then
455 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="$with_dbus_system_address"
457 # This is ugly, but D-Bus doesn't export this address for us
458 # so we have to guess, pretty much all setups i've seen have
459 # it in /var/lib/dbus or /var/run/dbus, and its defaulted to
460 # /var/run upstream so we will try guess first then default
463 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=/var/run/dbus/system_bus_socket"
464 TRY_SOCKETS="/var/lib/dbus/system_bus_socket /var/run/dbus/system_bus_socket ${localstatedir}/run/dbus/system_bus_socket ${prefix}/var/run/dbus/system_bus_socket"
465 for sock in $TRY_SOCKETS; do
466 if test -S $sock; then
467 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$sock"
471 AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)
474 LIBS="$LIBS $DBUS_LIBS"
475 AC_CHECK_FUNCS([dbus_connection_close dbus_bus_get_private])
478 AM_CONDITIONAL(HAVE_DBUS, test "x$HAVE_DBUS" = "xyes")
484 AS_HELP_STRING([--disable-expat],[Disable use of Expat]),
485 [case "${enableval}" in
486 yes) HAVE_EXPAT=yes ;;
488 *) AC_MSG_ERROR(bad value ${enableval} for --enable-expat) ;;
492 if test "x$HAVE_EXPAT" = "xyes" ; then
493 AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
495 if ! $have_expat ; then
496 AC_MSG_ERROR([*** libexpat not found ***])
499 AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
508 AS_HELP_STRING([--enable-dbm],[Enable use of DBM]),
509 [case "${enableval}" in
512 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbm) ;;
517 AS_HELP_STRING([--disable-gdbm],[Disable use of GDBM]),
518 [case "${enableval}" in
519 yes) HAVE_GDBM=yes ;;
521 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gdbm) ;;
525 if test "x$HAVE_GDBM" = "xyes" ; then
526 if test "x$HAVE_DBM" = "xyes" ; then
527 AC_MSG_ERROR([*** --enable-gdbm and --enable-dbm both specified ***])
529 AC_CHECK_LIB(gdbm, gdbm_open, [ AC_CHECK_HEADERS(gdbm.h, have_gdbm=true, have_gdbm=false) ], have_gdbm=false)
531 if ! $have_gdbm ; then
532 AC_MSG_ERROR([*** libgdbm not found ***])
534 AC_DEFINE([HAVE_GDBM],[],[Support for GDBM])
536 if test "x$HAVE_DBM" = "xyes" ; then
537 AC_CHECK_HEADERS(ndbm.h, have_dbm=true, have_dbm=false)
539 if ! $have_dbm ; then
540 AC_MSG_ERROR([*** dbm not found ***])
542 AC_DEFINE([HAVE_DBM],[],[Support for DBM])
545 AM_CONDITIONAL(HAVE_GDBM, test "x$HAVE_GDBM" = "xyes")
546 AM_CONDITIONAL(HAVE_DBM, test "x$HAVE_DBM" = "xyes")
551 AC_ARG_ENABLE(libdaemon,
552 AS_HELP_STRING([--disable-libdaemon],[Disable use of libdaemon]),
553 [case "${enableval}" in
554 yes) HAVE_LIBDAEMON=yes ;;
555 no) HAVE_LIBDAEMON=no ;;
556 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libdaemon) ;;
558 [HAVE_LIBDAEMON=yes])
560 if test "x$HAVE_LIBDAEMON" = "xyes" ; then
561 PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
562 AC_SUBST(LIBDAEMON_CFLAGS)
563 AC_SUBST(LIBDAEMON_LIBS)
565 AM_CONDITIONAL(HAVE_LIBDAEMON, test "x$HAVE_LIBDAEMON" = "xyes")
570 AC_ARG_ENABLE(python,
571 AS_HELP_STRING([--disable-python], [Disable scripts that depends on python]),
572 [case "${enableval}" in
573 yes) HAVE_PYTHON=yes ;;
574 no) HAVE_PYTHON=no ;;
575 *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;;
576 esac],[HAVE_PYTHON=yes])
581 if test "x$HAVE_PYTHON" = "xyes" ; then
582 AM_PATH_PYTHON([2.4])
585 AS_HELP_STRING([--disable-pygtk],[Disable use of GTK in Python]),
586 [case "${enableval}" in
587 yes) HAVE_PYGTK=yes ;;
589 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pygtk) ;;
593 if test "x$HAVE_PYGTK" = "xyes" ; then
594 AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module gtk)])
598 if test "x$HAVE_DBUS" = "xyes" ; then
599 AC_ARG_ENABLE(python-dbus,
600 AS_HELP_STRING([--disable-python-dbus],[Disable use of D-Bus in Python]),
601 [case "${enableval}" in
602 yes) HAVE_PYTHON_DBUS=yes ;;
603 no) HAVE_PYTHON_DBUS=no ;;
604 *) AC_MSG_ERROR(bad value ${enableval} for --enable-python-dbus) ;;
606 [HAVE_PYTHON_DBUS=yes])
608 if test "x$HAVE_PYTHON_DBUS" = "xyes"; then
609 AM_CHECK_PYMOD(dbus,,,[AC_MSG_ERROR(Could not find Python module dbus)])
612 AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)])
613 if test "x$HAVE_GDBM" = "xyes"; then
614 AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)])
616 if test "x$HAVE_DBM" = "xyes"; then
617 AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)])
621 AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
622 AM_CONDITIONAL(HAVE_PYGTK, test "x$HAVE_PYGTK" = "xyes")
623 AM_CONDITIONAL(HAVE_PYTHON_DBUS, test "x$HAVE_PYTHON_DBUS" = "xyes")
626 # Check for mono stuff
629 if test "x$HAVE_DBUS" = "xyes" ; then
631 AS_HELP_STRING([--disable-mono],[Disable mono bindings]),
632 [case "${enableval}" in
633 yes) HAVE_MONO=yes ;;
635 *) AC_MSG_ERROR(bad value ${enableval} for --enable-mono) ;;
639 if test "x$HAVE_MONO" = "xyes" ; then
640 AC_PATH_PROG(MCS, mcs)
641 if test "x$MCS" = "x" ; then
642 AC_MSG_ERROR([Can not find "mcs" - The Mono C-Sharp Compiler) in your PATH])
645 AC_PATH_PROG(GACUTIL, gacutil)
646 if test "x$GACUTIL" = "x" ; then
647 AC_MSG_ERROR([Can not find "gacutil" in your PATH])
654 AM_CONDITIONAL(HAVE_MONO, test "x$HAVE_MONO" = "xyes")
657 # Check for monodoc stuff
660 AC_ARG_ENABLE(monodoc,
661 AS_HELP_STRING([--disable-monodoc],[Disable documentation for mono bindings]),
662 [case "${enableval}" in
663 yes) HAVE_MONODOC=yes ;;
664 no) HAVE_MONODOC=no ;;
665 *) AC_MSG_ERROR(bad value ${enableval} for --enable-monodoc) ;;
669 if test "x$HAVE_MONO" = "xyes" && test "x$HAVE_MONODOC" = "xyes" ; then
670 PKG_CHECK_MODULES(MONODOC, [monodoc >= 1.1.8])
671 MONODOC_DIR=`$PKG_CONFIG --variable=sourcesdir monodoc`
673 AC_PATH_PROG(MONODOCER, monodocer)
674 AC_PATH_PROG(MDASSEMBLER, mdassembler)
676 AC_SUBST(MONODOC_DIR)
678 AC_SUBST(MDASSEMBLER)
680 AM_CONDITIONAL(HAVE_MONODOC, test "x$HAVE_MONODOC" = "xyes")
685 AC_ARG_ENABLE(autoipd,
686 AS_HELP_STRING([--disable-autoipd],[Disable building of avahi-autoipd]),
687 [case "${enableval}" in
688 yes) ENABLE_AUTOIPD=yes ;;
689 no) ENABLE_AUTOIPD=no ;;
690 *) AC_MSG_ERROR(bad value ${enableval} for --disable-autoipd) ;;
692 [ENABLE_AUTOIPD=yes])
694 AM_CONDITIONAL(ENABLE_AUTOIPD, test "x$ENABLE_AUTOIPD" = "xyes")
697 # Defining users and groups
699 AC_ARG_WITH(avahi_user, AS_HELP_STRING([--with-avahi-user=<user>],[User for running avahi-daemon (avahi)]))
700 if test -z "$with_avahi_user" ; then
703 AVAHI_USER=$with_avahi_user
706 AC_DEFINE_UNQUOTED(AVAHI_USER,"$AVAHI_USER", [User for running the Avahi daemon])
708 AC_ARG_WITH(avahi_group,AS_HELP_STRING([--with-avahi-group=<group>],[Group for running avahi-daemon (avahi)]))
709 if test -z "$with_avahi_group" ; then
712 AVAHI_GROUP=$with_avahi_group
714 AC_SUBST(AVAHI_GROUP)
715 AC_DEFINE_UNQUOTED(AVAHI_GROUP,"$AVAHI_GROUP", [Group for Avahi])
717 AC_ARG_WITH(avahi_priv_access_group,AS_HELP_STRING([--with-avahi-priv-access-group=<group>],[Priviliged access group for Avahi clients (netdev)]))
718 if test -z "$with_avahi_priv_access_group" ; then
719 AVAHI_PRIV_ACCESS_GROUP=netdev
721 AVAHI_PRIV_ACCESS_GROUP=$with_avahi_priv_access_group
723 AC_SUBST(AVAHI_PRIV_ACCESS_GROUP)
724 AC_DEFINE_UNQUOTED(AVAHI_PRIV_ACCESS_GROUP,"$AVAHI_PRIV_ACCESS_GROUP", [Privileged access group for Avahi clients])
726 AC_ARG_WITH(autoipd_user, AS_HELP_STRING([--with-autipd-user=<user>],[User for running the avahi-autoipd daemon (avahi-autoipd)]))
727 if test -z "$with_autoipd_user" ; then
728 AVAHI_AUTOIPD_USER=avahi-autoipd
730 AVAHI_AUTOIPD_USER=$with_autoipd_user
732 AC_SUBST(AVAHI_AUTOIPD_USER)
733 AC_DEFINE_UNQUOTED(AVAHI_AUTOIPD_USER,"$AVAHI_AUTOIPD_USER", [User for running the avahi-autoipd daemon])
735 AC_ARG_WITH(autoipd_group,AS_HELP_STRING([--with-autoipd-group=<group>],[Group for running the avahi-autoipd daemon (avahi-autoipd)]))
736 if test -z "$with_autoipd_group" ; then
737 AVAHI_AUTOIPD_GROUP=avahi-autoipd
739 AVAHI_AUTOIPD_GROUP=$with_autoipd_group
741 AC_SUBST(AVAHI_AUTOIPD_GROUP)
742 AC_DEFINE_UNQUOTED(AVAHI_AUTOIPD_GROUP,"$AVAHI_AUTOIPD_GROUP", [Group for running the avahi-autoipd daemon])
747 avahi_runtime_dir="${localstatedir}/run"
748 avahi_socket="${avahi_runtime_dir}/avahi-daemon/socket"
749 AC_SUBST(avahi_runtime_dir)
750 AC_SUBST(avahi_socket)
753 # Avahi interfaces dir
755 if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
756 interfacesdir="${datadir}/${PACKAGE}/interfaces/"
757 AC_SUBST(interfacesdir)
771 DX_INIT_DOXYGEN(avahi, doxygen.cfg, doxygen)
773 AC_ARG_ENABLE(core-docs,
774 AS_HELP_STRING([--enable-core-docs],[Enable building of documentation for avahi-core]),
775 [case "${enableval}" in
776 yes) ENABLE_CORE_DOCS=yes ;;
777 no) ENABLE_CORE_DOCS=no ;;
778 *) AC_MSG_ERROR([bad value ${enableval} for --enable-core-docs]) ;;
779 esac],[ENABLE_CORE_DOCS=no])
781 AM_CONDITIONAL([ENABLE_CORE_DOCS], [test "x$ENABLE_CORE_DOCS" = xyes])
784 # Build and Install man pages
786 AC_ARG_ENABLE(manpages,
787 AS_HELP_STRING([--disable-manpages],[Disable building and installation of man pages]),
788 [case "${enableval}" in
791 *) AC_MSG_ERROR([bad value ${enableval} for --disable-manpages]) ;;
792 esac],[manpages=yes])
794 if test x$manpages = xyes ; then
796 # XMLTOMAN manpage generation
798 AC_ARG_ENABLE(xmltoman,
799 AS_HELP_STRING([--disable-xmltoman],[Disable rebuilding of man pages with xmltoman]),
800 [case "${enableval}" in
803 *) AC_MSG_ERROR([bad value ${enableval} for --disable-xmltoman]) ;;
804 esac],[xmltoman=yes])
806 if test x$xmltoman = xyes ; then
807 AC_CHECK_PROG(have_xmltoman, xmltoman, yes, no)
810 if test x$have_xmltoman = xno -o x$xmltoman = xno; then
811 if ! test -e man/avahi-daemon.8 ; then
812 AC_MSG_ERROR([*** xmltoman was not found or was disabled, it is required to build the manpages as they have not been pre-built, install xmltoman, pass --disable-manpages or dont pass --disable-xmltoman])
815 AC_MSG_WARN([*** Not rebuilding man pages as xmltoman is not found ***])
819 AM_CONDITIONAL([USE_XMLTOMAN], [test "x$xmltoman" = xyes])
820 AM_CONDITIONAL([BUILD_MANPAGES], [test "x$manpages" = xyes])
823 # Conditionally compile test and example programs
826 AS_HELP_STRING([--enable-tests],[Enable building of tests and examples]),
827 [case "${enableval}" in
828 yes) ENABLE_TESTS=yes ;;
829 no) ENABLE_TESTS=no ;;
830 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tests) ;;
834 AM_CONDITIONAL([ENABLE_TESTS], [test "x$ENABLE_TESTS" = "xyes"])
837 # Optionally enable libdns_sd compatibility support
839 AC_ARG_ENABLE(compat-libdns_sd,
840 AS_HELP_STRING([--enable-compat-libdns_sd],[Enable compatibility layer for libdns_sd]),
841 [case "${enableval}" in
842 yes) ENABLE_COMPAT_LIBDNS_SD=yes ;;
843 no) ENABLE_COMPAT_LIBDNS_SD=no ;;
844 *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libdns_sd) ;;
846 [ENABLE_COMPAT_LIBDNS_SD=no])
848 AM_CONDITIONAL([ENABLE_COMPAT_LIBDNS_SD], [test "x$ENABLE_COMPAT_LIBDNS_SD" = "xyes"])
851 # Optionally enable HOWL compatibility support
853 AC_ARG_ENABLE(compat-howl,
854 AS_HELP_STRING([--enable-compat-howl],[Enable compatibility layer for HOWL]),
855 [case "${enableval}" in
856 yes) ENABLE_COMPAT_HOWL=yes ;;
857 no) ENABLE_COMPAT_HOWL=no ;;
858 *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-howl) ;;
860 [ENABLE_COMPAT_HOWL=no])
862 AM_CONDITIONAL([ENABLE_COMPAT_HOWL], [test "x$ENABLE_COMPAT_HOWL" = "xyes"])
865 # ==========================================================================
868 avahi-common/Makefile
872 avahi-daemon/Makefile
873 avahi-daemon/avahi-dbus.conf
874 avahi-discover-standalone/Makefile
875 avahi-client/Makefile
877 initscript/debian/Makefile
878 initscript/gentoo/Makefile
879 initscript/archlinux/Makefile
880 initscript/suse/Makefile
881 initscript/fedora/Makefile
882 initscript/mandriva/Makefile
883 initscript/darwin/Makefile
884 initscript/freebsd/Makefile
885 initscript/slackware/Makefile
886 avahi-dnsconfd/Makefile
888 avahi-python/Makefile
889 avahi-python/avahi/Makefile
894 service-type-database/Makefile
896 avahi-compat-libdns_sd/Makefile
897 avahi-compat-howl/Makefile
898 avahi-compat-howl/samples/Makefile
899 avahi-autoipd/Makefile
903 # ==========================================================================
905 ---{ $PACKAGE_NAME $VERSION }---
908 sysconfdir: ${sysconfdir}
909 localstatedir: ${localstatedir}
910 avahi socket: ${avahi_socket}
911 dbus-1 system.d dir: ${DBUS_SYS_DIR}
912 dbus-1 version: ${DBUS_VERSION}
913 dbus-1 system socket: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
916 Enable GLIB: ${HAVE_GLIB}
917 Enable GTK: ${HAVE_GTK}
918 Enable D-Bus: ${HAVE_DBUS}
919 Enable Expat: ${HAVE_EXPAT}
920 Enable GDBM: ${HAVE_GDBM}
921 Enable DBM: ${HAVE_DBM}
922 Enable libdaemon: ${HAVE_LIBDAEMON}
923 Enable Python: ${HAVE_PYTHON}
924 Enable pygtk: ${HAVE_PYGTK}
925 Enable python-dbus: ${HAVE_PYTHON_DBUS}
926 Enable QT3: ${HAVE_QT3}
927 Enable QT4: ${HAVE_QT4}
928 Enable Mono: ${HAVE_MONO}
929 Enable Monodoc: ${HAVE_MONODOC}
930 Distribution/OS: ${with_distro}
931 User for avahi-daemon: ${AVAHI_USER}
932 Group for avahi-daemon: ${AVAHI_GROUP}
933 Priviliged access group for Avahi clients: ${AVAHI_PRIV_ACCESS_GROUP}
934 User for avahi-autopid: ${AVAHI_AUTOIPD_USER}
935 Group for avahi-autoipd: ${AVAHI_AUTOIPD_GROUP}
936 Enable chroot(): ${enable_chroot}
939 BUILD_DAEMON="no (You need libdaemon and expat!)"
941 if test "x$HAVE_EXPAT" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then
945 BUILD_PYTHON="no (You need python, pygtk and python-dbus!)"
947 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
951 BUILD_CLIENT="no (You need avahi-daemon and D-Bus!)"
953 if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
957 if test "x$ENABLE_COMPAT_LIBDNS_SD" = "xyes" -a "x$BUILD_CLIENT" != "xyes" ; then
958 ENABLE_COMPAT_LIBDNS_SD="no (You need libavahi-client!)"
960 if test "x$ENABLE_COMPAT_HOWL" = "xyes" -a "x$BUILD_CLIENT" != "xyes" ; then
961 ENABLE_COMPAT_HOWL="no (You need libavahi-client!)"
966 Building libavahi-core yes
967 Building avahi-daemon: ${BUILD_DAEMON}
968 Building avahi-dnsconfd: ${BUILD_DAEMON}
969 Building libavahi-client: ${BUILD_CLIENT}
970 Building avahi-utils: ${BUILD_CLIENT}
971 Building avahi-python: ${BUILD_PYTHON}
972 Building libavahi-glib: ${HAVE_GLIB}
973 Building avahi-discover-standalone: ${HAVE_GTK}
974 Building libavahi-qt3: ${HAVE_QT3}
975 Building libavahi-qt4: ${HAVE_QT4}
976 Building avahi-sharp: ${HAVE_MONO}
977 Building avahi-compat-libdns_sd: ${ENABLE_COMPAT_LIBDNS_SD}
978 Building avahi-compat-howl: ${ENABLE_COMPAT_HOWL}
979 Building tests: ${ENABLE_TESTS}
980 Building avahi-core documentation: ${ENABLE_CORE_DOCS}
981 Building avahi-autoipd: ${ENABLE_AUTOIPD}