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.9],[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, [6:0:3])
32 AC_SUBST(LIBAVAHI_CORE_VERSION_INFO, [4:1:0])
33 AC_SUBST(LIBAVAHI_CLIENT_VERSION_INFO, [4:1:1])
34 AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [1:0: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])
107 AM_CONDITIONAL(HAVE_SYS_SYSCTL_H, [ test x"$HAVE_SYS_SYSCTL_H" = xyes ])
110 # Check for struct ip_mreqn
112 AC_MSG_CHECKING(for struct ip_mreqn)
113 AC_TRY_COMPILE([#include <netinet/in.h>], [
114 struct ip_mreqn mreq;
115 mreq.imr_address.s_addr = 0;
119 AC_DEFINE([HAVE_STRUCT_IP_MREQN],[],[Support for struct ip_mreqn])
121 # We'll just have to try and use struct ip_mreq
123 AC_MSG_CHECKING(for struct ip_mreq)
124 AC_TRY_COMPILE([#include <netinet/in.h>], [
126 mreq.imr_interface.s_addr = 0;
130 AC_DEFINE([HAVE_STRUCT_IP_MREQ],[],[Support for struct ip_mreq])
132 # No multicast support
138 # Detecting the linux distribution for specific things like init scripts.
140 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]))
141 if test "z$with_distro" = "z"; then
142 AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
143 AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
144 AC_CHECK_FILE(/etc/arch-release,with_distro="archlinux")
145 AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
146 AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora")
147 AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
148 AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
149 if test "z$with_distro" = "z"; then
150 with_distro=`uname -s`
153 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
156 debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|slackware|none)
159 AC_MSG_WARN([Your distribution (${with_distro}) is supported but no init script exist yet! (patches welcome)])
162 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.])
165 AC_MSG_ERROR([Your distribution (${with_distro}) is not yet supported, init scripts and dbus configuration will not be installed! (patches welcome), you can specify --with-distro=none to skip this check])
169 AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
170 AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
171 AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
172 AM_CONDITIONAL(TARGET_ARCHLINUX, test x"$with_distro" = xarchlinux)
173 AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
174 AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
175 AM_CONDITIONAL(TARGET_DARWIN, test x"$with_distro" = xdarwin)
176 AM_CONDITIONAL(TARGET_NETBSD, test x"$with_distro" = xnetbsd)
177 AM_CONDITIONAL(TARGET_FREEBSD, test x"$with_distro" = xfreebsd)
178 AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
181 AC_LANG_CONFTEST([int main() {}])
182 $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
188 # If using GCC specify some additional parameters
189 if test "x$GCC" = "xyes" ; then
191 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"
193 if test "x$HAVE_NETLINK" = "xyes" ; then
194 # Test whether rtnetlink.h can be included when compiled with -std=c99
195 # some distributions (e.g. archlinux) have broken headers that dont
196 # define __u64 with -std=c99
197 AC_MSG_CHECKING([checking whether rtnetlink.h can be included with -std=c99])
200 AC_TRY_COMPILE([#include <linux/rtnetlink.h>], [],
201 use_stdc99=yes, use_stdc99=no)
203 if test x"$use_stdc99" = xyes; then
204 DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
212 DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
215 for flag in $DESIRED_FLAGS ; do
216 AC_MSG_CHECKING([whether $CC accepts $flag])
217 if test_gcc_flag $flag ; then
218 CFLAGS="$CFLAGS $flag"
226 # Checks for header files.
228 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])
231 # Checks for typedefs, structures, and compiler characteristics.
237 # Checks for library functions.
239 AC_FUNC_SELECT_ARGTYPES
242 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])
249 AC_CHECK_DECLS(environ)
252 AC_CHECK_HEADERS([sys/capability.h],,enable_chroot=no)
253 AC_CHECK_HEADERS([sys/prctl.h],,enable_chroot=no)
254 AC_CHECK_FUNCS([chroot],,enable_chroot=no)
256 AM_CONDITIONAL(ENABLE_CHROOT, test "x$enable_chroot" = "xyes")
258 if test "x$enable_chroot" = "xyes" ; then
259 AC_DEFINE([ENABLE_CHROOT], 1, [Enable chroot() usage])
262 AC_CHECK_LIB(dl, dlopen, [ AC_CHECK_HEADERS(dlfcn.h, HAVE_DLOPEN=yes, HAVE_DLOPEN=no) ], HAVE_DLOPEN=no)
263 if test "x$HAVE_DLOPEN" = "xyes" ; then
264 AC_DEFINE([HAVE_DLOPEN],1,[Have dlopen()])
266 AM_CONDITIONAL(HAVE_DLOPEN, test "x$HAVE_DLOPEN" = "xyes")
268 # Check for pkg-config manually first, as if its not installed the
269 # PKG_PROG_PKG_CONFIG macro won't be defined.
270 AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
272 if test x"$have_pkg_config" = "xno"; then
273 AC_MSG_ERROR(pkg-config is required to install this program)
282 AS_HELP_STRING([--disable-glib],[Disable use of GLib]),
283 [case "${enableval}" in
284 yes) HAVE_GLIB=yes ;;
286 *) AC_MSG_ERROR(bad value ${enableval} for --enable-glib) ;;
290 if test "x$HAVE_GLIB" = "xyes" ; then
291 PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ])
292 AC_SUBST(GLIB20_CFLAGS)
293 AC_SUBST(GLIB20_LIBS)
295 AM_CONDITIONAL(HAVE_GLIB, test "x$HAVE_GLIB" = "xyes")
301 AS_HELP_STRING([--disable-qt3],[Disable building of Qt3 mainloop integration]),
302 [case "${enableval}" in
305 *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt3) ;;
309 if test "x$HAVE_QT3" = "xyes" ; then
310 PKG_CHECK_MODULES( QT3, [ qt-mt >= 3.0.0 ])
313 QT3_PREFIX="`$PKG_CONFIG --variable=prefix qt-mt`/bin"
315 AC_CHECK_FILE( "$QT3_PREFIX/moc-qt3", [ MOC_QT3=$QT3_PREFIX/moc-qt3 ], [
316 AC_CHECK_FILE("$QT3_PREFIX/moc", [ MOC_QT3=$QT3_PREFIX/moc ], [
317 AC_MSG_ERROR([Couldn't find QT3 moc])])])
320 AM_CONDITIONAL(HAVE_QT3, test "x$HAVE_QT3" = "xyes")
326 AS_HELP_STRING([--disable-qt4],[Disable building of Qt4Core mainloop integration]),
327 [case "${enableval}" in
330 *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt4) ;;
334 if test "x$HAVE_QT4" = "xyes" ; then
335 PKG_CHECK_MODULES( QT4, [ QtCore >= 4.0.0 ])
338 QT4_PREFIX="`$PKG_CONFIG --variable=prefix QtCore`/bin"
340 AC_CHECK_FILE( "$QT4_PREFIX/moc-qt4", [ MOC_QT4=$QT4_PREFIX/moc-qt4 ], [
341 AC_CHECK_FILE("$QT4_PREFIX/moc", [ MOC_QT4=$QT4_PREFIX/moc ], [
342 AC_MSG_ERROR([Couldn't find QT4 moc])])])
345 AM_CONDITIONAL(HAVE_QT4, test "x$HAVE_QT4" = "xyes")
351 AS_HELP_STRING([--disable-gtk],[Disable use of GTK+]),
352 [case "${enableval}" in
355 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk) ;;
359 if test "x$HAVE_GTK" = "xyes" ; then
361 PKG_CHECK_MODULES(GTK20, [ gtk+-2.0 >= 2.4.0 ])
362 AC_SUBST(GTK20_CFLAGS)
365 # Check for GLADE 2.0
366 PKG_CHECK_MODULES(GLADE20, [ libglade-2.0 >= 2.4.0 ])
367 AC_SUBST(GLADE20_CFLAGS)
368 AC_SUBST(GLADE20_LIBS)
370 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
376 AS_HELP_STRING([--disable-dbus],[Disable use of D-BUS]),
377 [case "${enableval}" in
378 yes) HAVE_DBUS=yes ;;
380 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbus) ;;
384 AC_ARG_WITH(dbus-sys, AS_HELP_STRING([--with-dbus-sys=<dir>], [where D-BUS system.d directory is]))
385 AC_ARG_WITH(dbus-system-socket, AS_HELP_STRING([--with-dbus-system-address=<address>], [where the dbus system socket is, you probably want to put unix:path= at the start]))
387 DBUS_VERSION="Disabled"
388 DBUS_SYS_DIR="Disabled"
389 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="Disabled"
390 if test "x$HAVE_DBUS" = "xyes" ; then
391 PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 0.34 ])
393 AC_DEFINE(HAVE_DBUS, 1, [Whether we have D-BUS or not])
395 DBUS_VERSION=`$PKG_CONFIG dbus-1 --modversion`
396 DBUS_VERSION_MAJOR=`echo $DBUS_VERSION | awk -F. '{print $1}'`
397 DBUS_VERSION_MINOR=`echo $DBUS_VERSION | awk -F. '{print $2}'`
398 DBUS_VERSION_MICRO=`echo $DBUS_VERSION | awk -F. '{print $3}'`
399 if test "z$DBUS_VERSION_MAJOR" = "z"; then
400 DBUS_VERSION_MAJOR="0"
402 if test "z$DBUS_VERSION_MINOR" = "z"; then
403 DBUS_VERSION_MINOR="0"
405 if test "z$DBUS_VERSION_MICRO" = "z"; then
406 DBUS_VERSION_MICRO="0"
409 if test "z$DBUS_VERSION_MAJOR" = "z0" -a "z$DBUS_VERSION_MINOR" = "z0" -a "z$DBUS_VERSION_MICRO" = "z0"; then
410 echo "Error: Couldn't determine the version of your DBUS package."
411 echo " This is probably an error in this script, please report it"
412 echo " along with the following information:"
413 echo " Base DBUS version ='$DBUS_VERSION'"
414 echo " DBUS_VERSION_MAJOR='$DBUS_VERSION_MAJOR'"
415 echo " DBUS_VERSION_MINOR='$DBUS_VERSION_MINOR'"
416 echo " DBUS_VERSION_MICRO='$DBUS_VERSION_MICRO'"
419 echo "Your dbus version is $DBUS_VERSION_MAJOR,$DBUS_VERSION_MINOR,$DBUS_VERSION_MICRO."
420 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
421 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
422 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
425 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
426 AC_SUBST(DBUS_CFLAGS)
429 if ! test -z "$with_dbus_sys" ; then
430 DBUS_SYS_DIR="$with_dbus_sys"
432 DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
434 AC_SUBST(DBUS_SYS_DIR)
436 if ! test -z "$with_dbus_system_address" ; then
437 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="$with_dbus_system_address"
439 # This is ugly, but D-BUS doesn't export this address for us
440 # so we have to guess, pretty much all setups i've seen have
441 # it in /var/lib/dbus or /var/run/dbus, and its defaulted to
442 # /var/run upstream so we will try guess first then default
445 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=/var/run/dbus/system_bus_socket"
446 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"
447 for sock in $TRY_SOCKETS; do
448 if test -S $sock; then
449 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$sock"
453 AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)
456 AM_CONDITIONAL(HAVE_DBUS, test "x$HAVE_DBUS" = "xyes")
462 AS_HELP_STRING([--disable-expat],[Disable use of Expat]),
463 [case "${enableval}" in
464 yes) HAVE_EXPAT=yes ;;
466 *) AC_MSG_ERROR(bad value ${enableval} for --enable-expat) ;;
470 if test "x$HAVE_EXPAT" = "xyes" ; then
471 AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
473 if ! $have_expat ; then
474 AC_MSG_ERROR([*** libexpat not found ***])
477 AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
483 AS_HELP_STRING([--disable-gdbm],[Disable use of GDBM]),
484 [case "${enableval}" in
485 yes) HAVE_GDBM=yes ;;
487 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gdbm) ;;
491 if test "x$HAVE_GDBM" = "xyes" ; then
492 AC_CHECK_LIB(gdbm, gdbm_open, [ AC_CHECK_HEADERS(gdbm.h, have_gdbm=true, have_gdbm=false) ], have_gdbm=false)
494 if ! $have_gdbm ; then
495 AC_MSG_ERROR([*** libgdbm not found ***])
497 AC_DEFINE([HAVE_GDBM],[],[Support for GDBM])
499 AM_CONDITIONAL(HAVE_GDBM, test "x$HAVE_GDBM" = "xyes")
504 AC_ARG_ENABLE(libdaemon,
505 AS_HELP_STRING([--disable-libdaemon],[Disable use of libdaemon]),
506 [case "${enableval}" in
507 yes) HAVE_LIBDAEMON=yes ;;
508 no) HAVE_LIBDAEMON=no ;;
509 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libdaemon) ;;
511 [HAVE_LIBDAEMON=yes])
513 if test "x$HAVE_LIBDAEMON" = "xyes" ; then
514 PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
515 AC_SUBST(LIBDAEMON_CFLAGS)
516 AC_SUBST(LIBDAEMON_LIBS)
518 AM_CONDITIONAL(HAVE_LIBDAEMON, test "x$HAVE_LIBDAEMON" = "xyes")
523 AC_ARG_ENABLE(python,
524 AS_HELP_STRING([--disable-python], [Disable scripts that depends on python]),
525 [case "${enableval}" in
526 yes) HAVE_PYTHON=yes ;;
527 no) HAVE_PYTHON=no ;;
528 *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;;
529 esac],[HAVE_PYTHON=yes])
534 if test "x$HAVE_PYTHON" = "xyes" ; then
535 AM_PATH_PYTHON([2.4])
538 AS_HELP_STRING([--disable-pygtk],[Disable use of GTK in Python]),
539 [case "${enableval}" in
540 yes) HAVE_PYGTK=yes ;;
542 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pygtk) ;;
546 if test "x$HAVE_PYGTK" = "xyes" ; then
547 AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module gtk)])
551 if test "x$HAVE_DBUS" = "xyes" ; then
552 AC_ARG_ENABLE(python-dbus,
553 AS_HELP_STRING([--disable-python-dbus],[Disable use of D-BUS in Python]),
554 [case "${enableval}" in
555 yes) HAVE_PYTHON_DBUS=yes ;;
556 no) HAVE_PYTHON_DBUS=no ;;
557 *) AC_MSG_ERROR(bad value ${enableval} for --enable-python-dbus) ;;
559 [HAVE_PYTHON_DBUS=yes])
561 if test "x$HAVE_PYTHON_DBUS" = "xyes"; then
562 AM_CHECK_PYMOD(dbus,,,[AC_MSG_ERROR(Could not find Python module dbus)])
565 AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)])
566 if test "x$HAVE_GDBM" = "xyes"; then
567 AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)])
571 AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
572 AM_CONDITIONAL(HAVE_PYGTK, test "x$HAVE_PYGTK" = "xyes")
573 AM_CONDITIONAL(HAVE_PYTHON_DBUS, test "x$HAVE_PYTHON_DBUS" = "xyes")
576 # Check for mono stuff
579 if test "x$HAVE_DBUS" = "xyes" ; then
581 AS_HELP_STRING([--disable-mono],[Disable mono bindings]),
582 [case "${enableval}" in
583 yes) HAVE_MONO=yes ;;
585 *) AC_MSG_ERROR(bad value ${enableval} for --enable-mono) ;;
589 if test "x$HAVE_MONO" = "xyes" ; then
590 AC_PATH_PROG(MCS, mcs)
591 if test "x$MCS" = "x" ; then
592 AC_MSG_ERROR([Can not find "mcs" - The Mono C-Sharp Compiler) in your PATH])
595 AC_PATH_PROG(GACUTIL, gacutil)
596 if test "x$GACUTIL" = "x" ; then
597 AC_MSG_ERROR([Can not find "gacutil" in your PATH])
604 AM_CONDITIONAL(HAVE_MONO, test "x$HAVE_MONO" = "xyes")
607 # Check for monodoc stuff
610 AC_ARG_ENABLE(monodoc,
611 AS_HELP_STRING([--disable-monodoc],[Disable documentation for mono bindings]),
612 [case "${enableval}" in
613 yes) HAVE_MONODOC=yes ;;
614 no) HAVE_MONODOC=no ;;
615 *) AC_MSG_ERROR(bad value ${enableval} for --enable-monodoc) ;;
619 if test "x$HAVE_MONO" = "xyes" && test "x$HAVE_MONODOC" = "xyes" ; then
620 PKG_CHECK_MODULES(MONODOC, [monodoc >= 1.1.8])
621 MONODOC_DIR=`$PKG_CONFIG --variable=sourcesdir monodoc`
623 AC_PATH_PROG(MONODOCER, monodocer)
624 AC_PATH_PROG(MDASSEMBLER, mdassembler)
626 AC_SUBST(MONODOC_DIR)
628 AC_SUBST(MDASSEMBLER)
630 AM_CONDITIONAL(HAVE_MONODOC, test "x$HAVE_MONODOC" = "xyes")
633 # Defining Avahi User and Group.
635 AC_ARG_WITH(avahi_user, AS_HELP_STRING([--with-avahi-user=<user>],[User for running the Avahi daemon (avahi)]))
636 if test -z "$with_avahi_user" ; then
639 AVAHI_USER=$with_avahi_user
642 AC_DEFINE_UNQUOTED(AVAHI_USER,"$AVAHI_USER", [User for running the Avahi daemon])
644 AC_ARG_WITH(avahi_group,AS_HELP_STRING([--with-avahi-group=<group>],[Group for Avahi (avahi)]))
645 if test -z "$with_avahi_group" ; then
648 AVAHI_GROUP=$with_avahi_group
650 AC_SUBST(AVAHI_GROUP)
651 AC_DEFINE_UNQUOTED(AVAHI_GROUP,"$AVAHI_GROUP", [Group for Avahi])
656 avahi_runtime_dir="${localstatedir}/run"
657 avahi_socket="${avahi_runtime_dir}/avahi-daemon/socket"
658 AC_SUBST(avahi_runtime_dir)
659 AC_SUBST(avahi_socket)
662 # Avahi interfaces dir
664 if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
665 interfacesdir="${datadir}/${PACKAGE}/interfaces/"
666 AC_SUBST(interfacesdir)
680 DX_INIT_DOXYGEN(avahi, doxygen.cfg, doxygen)
683 # Build and Install man pages
685 AC_ARG_ENABLE(manpages,
686 AS_HELP_STRING([--disable-manpages],[Disable building and installation of man pages]),
687 [case "${enableval}" in
690 *) AC_MSG_ERROR([bad value ${enableval} for --disable-manpages]) ;;
691 esac],[manpages=yes])
693 if test x$manpages = xyes ; then
695 # XMLTOMAN manpage generation
697 AC_ARG_ENABLE(xmltoman,
698 AS_HELP_STRING([--disable-xmltoman],[Disable rebuilding of man pages with xmltoman]),
699 [case "${enableval}" in
702 *) AC_MSG_ERROR([bad value ${enableval} for --disable-xmltoman]) ;;
703 esac],[xmltoman=yes])
705 if test x$xmltoman = xyes ; then
706 AC_CHECK_PROG(have_xmltoman, xmltoman, yes, no)
709 if test x$have_xmltoman = xno -o x$xmltoman = xno; then
710 if ! test -e man/avahi-daemon.8 ; then
711 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])
714 AC_MSG_WARN([*** Not rebuilding man pages as xmltoman is not found ***])
718 AM_CONDITIONAL([USE_XMLTOMAN], [test "x$xmltoman" = xyes])
719 AM_CONDITIONAL([BUILD_MANPAGES], [test "x$manpages" = xyes])
722 # Conditionally compile test and example programs
725 AS_HELP_STRING([--enable-tests],[Enable building of tests and examples]),
726 [case "${enableval}" in
727 yes) ENABLE_TESTS=yes ;;
728 no) ENABLE_TESTS=no ;;
729 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tests) ;;
733 AM_CONDITIONAL([ENABLE_TESTS], [test "x$ENABLE_TESTS" = "xyes"])
736 # Optionally enable libdns_sd compatibility support
738 AC_ARG_ENABLE(compat-libdns_sd,
739 AS_HELP_STRING([--enable-compat-libdns_sd],[Enable compatibility layer for libdns_sd]),
740 [case "${enableval}" in
741 yes) ENABLE_COMPAT_LIBDNS_SD=yes ;;
742 no) ENABLE_COMPAT_LIBDNS_SD=no ;;
743 *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libdns_sd) ;;
745 [ENABLE_COMPAT_LIBDNS_SD=no])
747 AM_CONDITIONAL([ENABLE_COMPAT_LIBDNS_SD], [test "x$ENABLE_COMPAT_LIBDNS_SD" = "xyes"])
750 # Optionally enable HOWL compatibility support
752 AC_ARG_ENABLE(compat-howl,
753 AS_HELP_STRING([--enable-compat-howl],[Enable compatibility layer for HOWL]),
754 [case "${enableval}" in
755 yes) ENABLE_COMPAT_HOWL=yes ;;
756 no) ENABLE_COMPAT_HOWL=no ;;
757 *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-howl) ;;
759 [ENABLE_COMPAT_HOWL=no])
761 AM_CONDITIONAL([ENABLE_COMPAT_HOWL], [test "x$ENABLE_COMPAT_HOWL" = "xyes"])
764 # ==========================================================================
767 avahi-common/Makefile
771 avahi-daemon/Makefile
772 avahi-daemon/avahi-dbus.conf
773 avahi-discover-standalone/Makefile
774 avahi-client/Makefile
776 initscript/debian/Makefile
777 initscript/gentoo/Makefile
778 initscript/archlinux/Makefile
779 initscript/suse/Makefile
780 initscript/fedora/Makefile
781 initscript/mandriva/Makefile
782 initscript/darwin/Makefile
783 initscript/freebsd/Makefile
784 initscript/slackware/Makefile
785 avahi-dnsconfd/Makefile
787 avahi-python/Makefile
788 avahi-python/avahi/Makefile
793 service-type-database/Makefile
795 avahi-compat-libdns_sd/Makefile
796 avahi-compat-howl/Makefile
797 avahi-compat-howl/samples/Makefile
801 # ==========================================================================
803 ---{ $PACKAGE_NAME $VERSION }---
806 sysconfdir: ${sysconfdir}
807 localstatedir: ${localstatedir}
808 avahi socket: ${avahi_socket}
809 dbus-1 system.d dir: ${DBUS_SYS_DIR}
810 dbus-1 version: ${DBUS_VERSION}
811 dbus-1 system socket ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
814 Enable GLIB: ${HAVE_GLIB}
815 Enable GTK: ${HAVE_GTK}
816 Enable D-BUS: ${HAVE_DBUS}
817 Enable Expat: ${HAVE_EXPAT}
818 Enable GDBM: ${HAVE_GDBM}
819 Enable libdaemon: ${HAVE_LIBDAEMON}
820 Enable Python: ${HAVE_PYTHON}
821 Enable pygtk: ${HAVE_PYGTK}
822 Enable python-dbus: ${HAVE_PYTHON_DBUS}
823 Enable QT3: ${HAVE_QT3}
824 Enable QT4: ${HAVE_QT4}
825 Enable Mono: ${HAVE_MONO}
826 Enable Monodoc: ${HAVE_MONODOC}
827 Distribution/OS: ${with_distro}
828 User for Avahi: ${AVAHI_USER}
829 Group for Avahi: ${AVAHI_GROUP}
830 Enable chroot(): ${enable_chroot}
833 BUILD_DAEMON="no (You need libdaemon and expat!)"
835 if test "x$HAVE_EXPAT" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then
839 BUILD_PYTHON="no (You need python, pygtk and python-dbus!)"
841 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
845 BUILD_CLIENT="no (You need avahi-daemon and dbus!)"
847 if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
851 if test "x$ENABLE_COMPAT_LIBDNS_SD" = "xyes" -a "x$BUILD_CLIENT" != "xyes" ; then
852 ENABLE_COMPAT_LIBDNS_SD="no (You need libavahi-client!)"
854 if test "x$ENABLE_COMPAT_HOWL" = "xyes" -a "x$BUILD_CLIENT" != "xyes" ; then
855 ENABLE_COMPAT_HOWL="no (You need libavahi-client!)"
860 Building libavahi-core yes
861 Building avahi-daemon: ${BUILD_DAEMON}
862 Building avahi-dnsconfd: ${BUILD_DAEMON}
863 Building libavahi-client: ${BUILD_CLIENT}
864 Building avahi-utils: ${BUILD_CLIENT}
865 Building avahi-python: ${BUILD_PYTHON}
866 Building libavahi-glib: ${HAVE_GLIB}
867 Building avahi-discover-standalone: ${HAVE_GTK}
868 Building libavahi-qt3: ${HAVE_QT3}
869 Building libavahi-qt4: ${HAVE_QT4}
870 Building avahi-sharp: ${HAVE_MONO}
871 Building avahi-compat-libdns_sd: ${ENABLE_COMPAT_LIBDNS_SD}
872 Building avahi-compat-howl: ${ENABLE_COMPAT_HOWL}
873 Building tests: ${ENABLE_TESTS}