]> git.meshlink.io Git - catta/blob - configure.ac
Add inotify support for /ect/avahi/services and /etc/avahi/hosts. Based on a patch...
[catta] / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 # $Id$
5
6 # This file is part of avahi.
7 #
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.
12 #
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.
17 #
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
21 # USA.
22
23 AC_PREREQ(2.57)
24 AC_INIT([avahi],[0.6.17],[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])
28
29 AC_SUBST(PACKAGE_URL, [http://avahi.org/])
30
31 AC_SUBST(LIBAVAHI_COMMON_VERSION_INFO, [7:3:4])
32 AC_SUBST(LIBAVAHI_CORE_VERSION_INFO, [5:0:0])
33 AC_SUBST(LIBAVAHI_CLIENT_VERSION_INFO, [5:2: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_UI_VERSION_INFO, [0:0:0])
38
39 # Do not touch these, since they we took this version-info from upstream HOWL/Bonjour
40 AC_SUBST(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO, [1:0:0])
41 AC_SUBST(LIBAVAHI_COMPAT_HOWL_VERSION_INFO, [0:0:0])
42 AC_SUBST(HOWL_COMPAT_VERSION, [0.9.8])
43
44 if type -p stow > /dev/null && test -d /usr/local/stow ; then
45     AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
46     ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
47 fi
48
49 # Checks for programs.
50 AC_PROG_CC
51 AC_PROG_CXX
52 AC_GNU_SOURCE
53 AC_PROG_CPP
54 AC_PROG_INSTALL
55 AC_PROG_LN_S
56 AC_PROG_MAKE_SET
57 AC_PROG_GCC_TRADITIONAL
58
59 # libtool stuff
60 AC_PROG_LIBTOOL
61
62 AC_CACHE_CHECK([whether the C++ compiler works], [avahi_cv_sys_cxx_works], [
63     AC_LANG_PUSH([C++])
64     AC_COMPILE_IFELSE([int main() { return 0; }], [avahi_cv_sys_cxx_works=yes],
65         [avahi_cv_sys_cxx_works=no])
66     AC_LANG_POP([C++])
67     ])
68 [ if [ "x$avahi_cv_sys_cxx_works" = "xno" ]; then ]
69     AC_MSG_FAILURE([The C++ compiler does not work])
70 [ fi ]
71
72 ACX_PTHREAD(,AC_MSG_ERROR([Missing POSIX Threads support]))
73
74 #
75 # Check for netlink.h
76 #
77 AC_CHECK_HEADER(linux/netlink.h, 
78 HAVE_NETLINK=yes
79 AC_DEFINE([HAVE_NETLINK],[],[Support for Linux netlink])
80 , [], [
81 #include <sys/socket.h>
82 #include <asm/types.h>
83 ])
84
85 AM_CONDITIONAL(HAVE_NETLINK, [ test x"$HAVE_NETLINK" = xyes ])
86
87 #
88 # Check for net/route.h
89 #
90 AC_CHECK_HEADER(net/route.h, 
91 HAVE_PF_ROUTE=yes
92 AC_DEFINE([HAVE_PF_ROUTE],[],[Support for PF_ROUTE])
93 , [], [
94 #include <sys/types.h>
95 #include <sys/socket.h>
96 ])
97
98 AM_CONDITIONAL(HAVE_PF_ROUTE, [ test x"$HAVE_PF_ROUTE" = xyes ])
99
100 #
101 # Check for sys/filio.h; needed for FIONREAD on Solaris
102 #
103 AC_CHECK_HEADER(sys/filio.h, 
104 HAVE_SYS_FILIO_H=yes
105 AC_DEFINE([HAVE_SYS_FILIO_H],[],[Support for sys/filio.h])
106 , [], [
107 ])
108
109 AM_CONDITIONAL(HAVE_SYS_FILIO_H, [ test x"$HAVE_SYS_FILIO_H" = xyes ])
110
111 #
112 # Check for sys/sysctl.h; not present on Solaris
113 #
114 AC_CHECK_HEADER(sys/sysctl.h, 
115 HAVE_SYS_SYSCTL=yes
116 AC_DEFINE([HAVE_SYS_SYSCTL_H],[],[Support for sys/sysctl.h])
117 , [], [
118 #include <sys/types.h>
119 #include <sys/socket.h>
120 #include <sys/param.h>
121 ])
122
123 AM_CONDITIONAL(HAVE_SYS_SYSCTL_H, [ test x"$HAVE_SYS_SYSCTL_H" = xyes ])
124
125 #
126 # Check for lifconf struct; only present on Solaris
127 #
128 AC_MSG_CHECKING(for struct lifconf)
129 AC_CACHE_VAL(avahi_cv_has_struct_lifconf,
130 [AC_TRY_COMPILE(
131 [#include <sys/socket.h>
132 #include <net/if.h>
133 ],[sizeof (struct lifconf);],
134 avahi_cv_has_struct_lifconf=yes,avahi_cv_has_struct_lifconf=no)])
135 AC_MSG_RESULT($avahi_cv_has_struct_lifconf)
136 if test $avahi_cv_has_struct_lifconf = yes; then
137     AC_DEFINE(HAVE_STRUCT_LIFCONF,1,[Define if there is a struct lifconf.])
138 fi
139
140 #
141 # Check for struct ip_mreqn
142 #
143 AC_MSG_CHECKING(for struct ip_mreqn)
144 AC_TRY_COMPILE([#include <netinet/in.h>], [
145         struct ip_mreqn mreq;
146         mreq.imr_address.s_addr = 0;
147 ], [
148         # Yes, we have it...
149         AC_MSG_RESULT(yes)
150         AC_DEFINE([HAVE_STRUCT_IP_MREQN],[],[Support for struct ip_mreqn])
151 ], [
152         # We'll just have to try and use struct ip_mreq
153         AC_MSG_RESULT(no)
154         AC_MSG_CHECKING(for struct ip_mreq)
155         AC_TRY_COMPILE([#include <netinet/in.h>], [
156                 struct ip_mreq mreq;
157                 mreq.imr_interface.s_addr = 0;
158         ], [
159                 # Yes, we have it...
160                 AC_MSG_RESULT(yes)
161                 AC_DEFINE([HAVE_STRUCT_IP_MREQ],[],[Support for struct ip_mreq])
162         ], [
163                 # No multicast support
164                         AC_MSG_RESULT(no)
165         ])
166 ])
167
168 #
169 # Detecting the linux distribution for specific things like init scripts.
170 #
171 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]))
172 if test "z$with_distro" = "z"; then
173     AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
174     AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
175     AC_CHECK_FILE(/etc/arch-release,with_distro="archlinux")
176     AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
177     AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora")
178     AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
179     AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
180     if test "z$with_distro" = "z"; then
181         with_distro=`uname -s`
182     fi
183 fi
184 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
185
186 case $with_distro in
187     debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|slackware|none)
188      ;;
189     netbsd)
190      AC_MSG_WARN([Your distribution (${with_distro}) is supported but no init script exist yet! (patches welcome)])
191      ;;
192     linux)
193      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.])
194      ;;
195     *)
196      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])
197      ;;
198 esac
199
200 AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
201 AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
202 AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
203 AM_CONDITIONAL(TARGET_ARCHLINUX, test x"$with_distro" = xarchlinux)
204 AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
205 AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
206 AM_CONDITIONAL(TARGET_DARWIN, test x"$with_distro" = xdarwin)
207 AM_CONDITIONAL(TARGET_NETBSD, test x"$with_distro" = xnetbsd)
208 AM_CONDITIONAL(TARGET_FREEBSD, test x"$with_distro" = xfreebsd)
209 AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
210
211 test_gcc_flag() {
212     AC_LANG_CONFTEST([int main() {}])
213     $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
214     ret=$?
215     rm -f conftest.o
216     return $ret
217 }
218
219 # If using GCC specify some additional parameters
220 if test "x$GCC" = "xyes" ; then
221
222     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 -fPIC"
223
224     if test "x$HAVE_NETLINK" = "xyes" ; then
225         # Test whether rtnetlink.h can be included when compiled with -std=c99
226         # some distributions (e.g. archlinux) have broken headers that dont
227         # define __u64 with -std=c99
228         AC_MSG_CHECKING([checking whether rtnetlink.h can be included with -std=c99])
229         OLDCFLAGS="$CFLAGS"
230         CFLAGS="-std=c99"
231         AC_TRY_COMPILE([#include <linux/rtnetlink.h>], [],
232             use_stdc99=yes, use_stdc99=no)
233
234         if test x"$use_stdc99" = xyes; then
235             DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
236             AC_MSG_RESULT([yes])
237         else
238             AC_MSG_RESULT([no])
239         fi
240
241         CFLAGS="$OLDCFLAGS"
242     else
243         DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
244     fi
245
246     for flag in $DESIRED_FLAGS ; do
247         AC_MSG_CHECKING([whether $CC accepts $flag])
248         if test_gcc_flag $flag ; then 
249            CFLAGS="$CFLAGS $flag"
250            AC_MSG_RESULT([yes])
251         else
252            AC_MSG_RESULT([no])
253         fi
254     done 
255 fi
256
257 # Checks for header files.
258 AC_HEADER_STDC
259 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])
260 AC_HEADER_STDBOOL
261
262 # Checks for typedefs, structures, and compiler characteristics.
263 AC_C_CONST
264 AC_TYPE_SIZE_T
265 AC_HEADER_TIME
266 AC_HEADER_SYS_WAIT
267
268 # Checks for library functions.
269 AC_FUNC_MEMCMP
270 AC_FUNC_SELECT_ARGTYPES
271 AC_FUNC_MALLOC
272 AC_FUNC_REALLOC
273 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])
274
275 AC_FUNC_CHOWN
276 AC_FUNC_STAT
277 AC_TYPE_MODE_T
278 AC_TYPE_PID_T
279
280 AC_CHECK_DECLS(environ)
281
282 enable_chroot=yes
283 AC_CHECK_HEADERS([sys/capability.h],,enable_chroot=no)
284 AC_CHECK_HEADERS([sys/prctl.h],,enable_chroot=no)
285 AC_CHECK_FUNCS([chroot],,enable_chroot=no)
286
287 AM_CONDITIONAL(ENABLE_CHROOT, test "x$enable_chroot" = "xyes")
288
289 if test "x$enable_chroot" = "xyes" ; then
290    AC_DEFINE([ENABLE_CHROOT], 1, [Enable chroot() usage])
291 fi
292
293 AC_CHECK_LIB(dl, dlopen, [ AC_CHECK_HEADERS(dlfcn.h, HAVE_DLOPEN=yes, HAVE_DLOPEN=no) ], HAVE_DLOPEN=no)
294 if test "x$HAVE_DLOPEN" = "xyes" ; then
295     AC_DEFINE([HAVE_DLOPEN],1,[Have dlopen()])
296 fi
297 AM_CONDITIONAL(HAVE_DLOPEN, test "x$HAVE_DLOPEN" = "xyes")
298
299 have_inotify=no
300 AC_CHECK_HEADERS([linux/inotify.h], [have_inotify=yes])
301 AC_CHECK_HEADERS([sys/inotify.h], [have_inotify=yes])
302
303 AM_CONDITIONAL(HAVE_INOTIFY, test "x$have_inotify" = "xyes")
304
305 if test "x$have_inotify" = "xyes" ; then
306    AC_DEFINE([HAVE_INOTIFY], 1, [Enable Linux inotify() usage])
307 fi
308
309 # Check for pkg-config manually first, as if its not installed the
310 # PKG_PROG_PKG_CONFIG macro won't be defined.
311 AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
312
313 if test x"$have_pkg_config" = "xno"; then
314     AC_MSG_ERROR(pkg-config is required to install this program)
315 fi
316
317 PKG_PROG_PKG_CONFIG
318
319 #
320 # Check for GLIB 2.0
321 #
322 AC_ARG_ENABLE(glib,
323         AS_HELP_STRING([--disable-glib],[Disable use of GLib]),
324         [case "${enableval}" in
325                 yes) HAVE_GLIB=yes ;;
326                 no)  HAVE_GLIB=no ;;
327                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-glib) ;;
328         esac],
329         [HAVE_GLIB=yes])
330
331 if test "x$HAVE_GLIB" = "xyes" ; then
332         PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ])
333         AC_SUBST(GLIB20_CFLAGS)
334         AC_SUBST(GLIB20_LIBS)
335 fi
336 AM_CONDITIONAL(HAVE_GLIB, test "x$HAVE_GLIB" = "xyes")
337
338 #
339 # Check for Qt 3
340 #
341 AC_ARG_ENABLE(qt3,
342         AS_HELP_STRING([--disable-qt3],[Disable building of Qt3 mainloop integration]),
343         [case "${enableval}" in
344                 yes) HAVE_QT3=yes ;;
345                 no)  HAVE_QT3=no ;;
346                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt3) ;;
347         esac],
348         [HAVE_QT3=yes])
349
350 if test "x$HAVE_QT3" = "xyes" ; then
351         PKG_CHECK_MODULES( QT3, [ qt-mt >= 3.0.0 ])
352         AC_SUBST(QT3_CFLAGS)
353         AC_SUBST(QT3_LIBS)
354             QT3_PREFIX="`$PKG_CONFIG --variable=prefix qt-mt`/bin"
355         MOC_QT3="no"
356             AC_CHECK_FILE( "$QT3_PREFIX/moc-qt3", [ MOC_QT3=$QT3_PREFIX/moc-qt3 ], [
357                     AC_CHECK_FILE("$QT3_PREFIX/moc", [ MOC_QT3=$QT3_PREFIX/moc ], [ 
358                 AC_MSG_ERROR([Couldn't find QT3 moc])])])
359         AC_SUBST(MOC_QT3)
360 fi
361 AM_CONDITIONAL(HAVE_QT3, test "x$HAVE_QT3" = "xyes")
362
363 #
364 # Check for Qt 4
365 #
366 AC_ARG_ENABLE(qt4,
367         AS_HELP_STRING([--disable-qt4],[Disable building of Qt4Core mainloop integration]),
368         [case "${enableval}" in
369                 yes) HAVE_QT4=yes ;;
370                 no)  HAVE_QT4=no ;;
371                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt4) ;;
372         esac],
373         [HAVE_QT4=yes])
374
375 if test "x$HAVE_QT4" = "xyes" ; then
376         PKG_CHECK_MODULES( QT4, [ QtCore >= 4.0.0 ])
377         AC_SUBST(QT4_CFLAGS)
378         AC_SUBST(QT4_LIBS)
379             QT4_PREFIX="`$PKG_CONFIG --variable=prefix QtCore`/bin"
380         MOC_QT4="no"
381             AC_CHECK_FILE( "$QT4_PREFIX/moc-qt4", [ MOC_QT4=$QT4_PREFIX/moc-qt4 ], [
382                AC_CHECK_FILE("$QT4_PREFIX/moc", [ MOC_QT4=$QT4_PREFIX/moc ], [ 
383                AC_MSG_ERROR([Couldn't find QT4 moc])])])
384         AC_SUBST(MOC_QT4)
385 fi
386 AM_CONDITIONAL(HAVE_QT4, test "x$HAVE_QT4" = "xyes")
387
388 #
389 # Check for GTK+
390 #
391 AC_ARG_ENABLE(gtk,
392         AS_HELP_STRING([--disable-gtk],[Disable use of GTK+]),
393         [case "${enableval}" in
394                 yes) HAVE_GTK=yes ;;
395                 no)  HAVE_GTK=no ;;
396                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk) ;;
397         esac],
398         [HAVE_GTK=yes])
399
400 if test "x$HAVE_GTK" = "xyes" ; then
401         # Check for GTK 2.0
402         PKG_CHECK_MODULES(GTK20, [ gtk+-2.0 >= 2.4.0 ])
403         AC_SUBST(GTK20_CFLAGS)
404         AC_SUBST(GTK20_LIBS)
405         
406         # Check for GLADE 2.0
407         PKG_CHECK_MODULES(GLADE20, [ libglade-2.0 >= 2.4.0 ])
408         AC_SUBST(GLADE20_CFLAGS)
409         AC_SUBST(GLADE20_LIBS)
410 fi
411 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
412
413 #
414 # D-Bus
415 #
416 AC_ARG_ENABLE(dbus,
417         AS_HELP_STRING([--disable-dbus],[Disable use of D-Bus]),
418         [case "${enableval}" in
419                 yes) HAVE_DBUS=yes ;;
420                 no)  HAVE_DBUS=no ;;
421                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbus) ;;
422         esac],
423         [HAVE_DBUS=yes]) 
424
425 AC_ARG_WITH(dbus-sys, AS_HELP_STRING([--with-dbus-sys=<dir>], [Path to D-Bus system.d directory]))
426 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]))
427
428 DBUS_VERSION="Disabled"
429 DBUS_SYS_DIR="Disabled"
430 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="Disabled"
431 if test "x$HAVE_DBUS" = "xyes" ; then
432     PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 0.34 ])
433
434     AC_DEFINE(HAVE_DBUS, 1, [Whether we have D-Bus or not])
435
436     DBUS_VERSION=`$PKG_CONFIG dbus-1 --modversion`
437     DBUS_VERSION_MAJOR=`echo $DBUS_VERSION | awk -F. '{print $1}'`
438     DBUS_VERSION_MINOR=`echo $DBUS_VERSION | awk -F. '{print $2}'`
439     DBUS_VERSION_MICRO=`echo $DBUS_VERSION | awk -F. '{print $3}'`
440     if test "z$DBUS_VERSION_MAJOR" = "z"; then
441         DBUS_VERSION_MAJOR="0"
442     fi
443     if test "z$DBUS_VERSION_MINOR" = "z"; then
444         DBUS_VERSION_MINOR="0"
445     fi
446     if test "z$DBUS_VERSION_MICRO" = "z"; then
447         DBUS_VERSION_MICRO="0"
448     fi
449
450     if test "z$DBUS_VERSION_MAJOR" = "z0" -a "z$DBUS_VERSION_MINOR" = "z0" -a "z$DBUS_VERSION_MICRO" = "z0"; then
451         echo "Error: Couldn't determine the version of your D-Bus package."
452         echo "  This is probably an error in this script, please report it"
453         echo "  along with the following information:"
454         echo "      Base D-Buss version ='$DBUS_VERSION'"
455         echo "      DBUS_VERSION_MAJOR='$DBUS_VERSION_MAJOR'"
456         echo "      DBUS_VERSION_MINOR='$DBUS_VERSION_MINOR'"
457         echo "      DBUS_VERSION_MICRO='$DBUS_VERSION_MICRO'"
458         exit 1
459     else
460         echo "Your D-Bus version is $DBUS_VERSION_MAJOR,$DBUS_VERSION_MINOR,$DBUS_VERSION_MICRO."
461         DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
462         DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
463         DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
464     fi
465
466     DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
467     AC_SUBST(DBUS_CFLAGS)
468     AC_SUBST(DBUS_LIBS)
469
470     if ! test -z "$with_dbus_sys" ; then
471         DBUS_SYS_DIR="$with_dbus_sys"
472     else
473         DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
474     fi
475     AC_SUBST(DBUS_SYS_DIR)
476
477     if ! test -z "$with_dbus_system_address" ; then
478         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="$with_dbus_system_address"
479     else
480         # This is ugly, but D-Bus doesn't export this address for us
481         # so we have to guess, pretty much all setups i've seen have 
482         # it in /var/lib/dbus or /var/run/dbus, and its defaulted to
483         # /var/run upstream so we will try guess first then default
484         # to /var/run/dbus.
485
486         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=/var/run/dbus/system_bus_socket"
487         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"
488         for sock in $TRY_SOCKETS; do
489             if test -S $sock; then
490                 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$sock"
491             fi
492         done
493     fi
494     AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)
495     
496     SAVED_LIBS="$LIBS"
497     LIBS="$LIBS $DBUS_LIBS"
498     AC_CHECK_FUNCS([dbus_connection_close dbus_bus_get_private])
499     LIBS="$SAVED_LIBS"
500 fi
501 AM_CONDITIONAL(HAVE_DBUS, test "x$HAVE_DBUS" = "xyes")
502
503 #
504 # Expat
505 #
506 AC_ARG_ENABLE(expat,
507         AS_HELP_STRING([--disable-expat],[Disable use of Expat]),
508         [case "${enableval}" in
509                 yes) HAVE_EXPAT=yes ;;
510                 no)  HAVE_EXPAT=no ;;
511                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-expat) ;;
512         esac],
513         [HAVE_EXPAT=yes]) 
514
515 if test "x$HAVE_EXPAT" = "xyes" ; then
516     AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
517
518     if ! $have_expat ; then
519         AC_MSG_ERROR([*** libexpat not found ***])
520     fi
521 fi
522 AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
523
524 #
525 # GDBM
526 #
527 #
528 # Check for dbm
529 #
530 AC_ARG_ENABLE(dbm,
531         AS_HELP_STRING([--enable-dbm],[Enable use of DBM]),
532         [case "${enableval}" in
533                 yes) HAVE_DBM=yes ;;
534                 no)  HAVE_DBM=no ;;
535                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbm) ;;
536         esac],
537         [HAVE_DBM=no]) 
538
539 AC_ARG_ENABLE(gdbm,
540         AS_HELP_STRING([--disable-gdbm],[Disable use of GDBM]),
541         [case "${enableval}" in
542                 yes) HAVE_GDBM=yes ;;
543                 no)  HAVE_GDBM=no ;;
544                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gdbm) ;;
545         esac],
546         [HAVE_GDBM=yes]) 
547
548 if test "x$HAVE_GDBM" = "xyes" ; then
549     if test "x$HAVE_DBM" = "xyes" ; then
550         AC_MSG_ERROR([*** --enable-gdbm and --enable-dbm both specified ***])
551     fi
552     AC_CHECK_LIB(gdbm, gdbm_open, [ AC_CHECK_HEADERS(gdbm.h, have_gdbm=true, have_gdbm=false) ], have_gdbm=false)
553
554     if ! $have_gdbm ; then
555         AC_MSG_ERROR([*** libgdbm not found ***])
556     fi
557     AC_DEFINE([HAVE_GDBM],[],[Support for GDBM])
558 else
559     if test "x$HAVE_DBM" = "xyes" ; then
560         AC_CHECK_HEADERS(ndbm.h, have_dbm=true, have_dbm=false)
561
562         if ! $have_dbm ; then
563             AC_MSG_ERROR([*** dbm not found ***])
564         fi
565         AC_DEFINE([HAVE_DBM],[],[Support for DBM])
566     fi
567 fi
568 AM_CONDITIONAL(HAVE_GDBM, test "x$HAVE_GDBM" = "xyes")
569 AM_CONDITIONAL(HAVE_DBM, test "x$HAVE_DBM" = "xyes")
570
571 #
572 # libdaemon
573 #
574 AC_ARG_ENABLE(libdaemon,
575         AS_HELP_STRING([--disable-libdaemon],[Disable use of libdaemon]),
576         [case "${enableval}" in
577                 yes) HAVE_LIBDAEMON=yes ;;
578                 no)  HAVE_LIBDAEMON=no ;;
579                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libdaemon) ;;
580         esac],
581         [HAVE_LIBDAEMON=yes]) 
582
583 if test "x$HAVE_LIBDAEMON" = "xyes" ; then
584     PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
585     AC_SUBST(LIBDAEMON_CFLAGS)
586     AC_SUBST(LIBDAEMON_LIBS)
587 fi
588 AM_CONDITIONAL(HAVE_LIBDAEMON, test "x$HAVE_LIBDAEMON" = "xyes")
589
590 #
591 # Python stuff
592 #
593 AC_ARG_ENABLE(python,
594     AS_HELP_STRING([--disable-python], [Disable scripts that depends on python]),
595     [case "${enableval}" in
596           yes) HAVE_PYTHON=yes ;;
597           no)  HAVE_PYTHON=no ;;
598           *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;;
599     esac],[HAVE_PYTHON=yes])
600
601 HAVE_PYTHON_DBUS=no
602 HAVE_PYGTK=no
603
604 if test "x$HAVE_PYTHON" = "xyes" ; then
605     AM_PATH_PYTHON([2.4])
606
607     AC_ARG_ENABLE(pygtk,
608         AS_HELP_STRING([--disable-pygtk],[Disable use of GTK in Python]),
609         [case "${enableval}" in
610                 yes) HAVE_PYGTK=yes ;;
611                 no)  HAVE_PYGTK=no ;;
612                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pygtk) ;;
613         esac],
614         [HAVE_PYGTK=yes])
615     
616     if test "x$HAVE_PYGTK" = "xyes" ; then
617         AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module gtk)])
618     fi
619
620
621     if test "x$HAVE_DBUS" = "xyes" ; then
622         AC_ARG_ENABLE(python-dbus,
623             AS_HELP_STRING([--disable-python-dbus],[Disable use of D-Bus in Python]),
624             [case "${enableval}" in
625                    yes) HAVE_PYTHON_DBUS=yes ;;
626                    no)  HAVE_PYTHON_DBUS=no ;;
627                    *) AC_MSG_ERROR(bad value ${enableval} for --enable-python-dbus) ;;
628             esac],
629             [HAVE_PYTHON_DBUS=yes])
630     
631         if test "x$HAVE_PYTHON_DBUS" = "xyes"; then
632             AM_CHECK_PYMOD(dbus,,,[AC_MSG_ERROR(Could not find Python module dbus)])
633         fi
634
635         AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)])
636         if test "x$HAVE_GDBM" = "xyes"; then
637             AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)])
638         fi
639         if test "x$HAVE_DBM" = "xyes"; then
640             AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)])
641         fi
642     fi
643 fi
644 AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
645 AM_CONDITIONAL(HAVE_PYGTK, test "x$HAVE_PYGTK" = "xyes")
646 AM_CONDITIONAL(HAVE_PYTHON_DBUS, test "x$HAVE_PYTHON_DBUS" = "xyes")
647
648 #
649 # Check for mono stuff
650 #
651 HAVE_MONO=no
652 if test "x$HAVE_DBUS" = "xyes" ; then
653     AC_ARG_ENABLE(mono,
654             AS_HELP_STRING([--disable-mono],[Disable mono bindings]),
655             [case "${enableval}" in
656                     yes) HAVE_MONO=yes ;;
657                     no)  HAVE_MONO=no ;;
658                     *) AC_MSG_ERROR(bad value ${enableval} for --enable-mono) ;;
659             esac],
660             [HAVE_MONO=yes])
661
662     if test "x$HAVE_MONO" = "xyes" ; then
663         AC_PATH_PROG(MCS, mcs)
664         if test "x$MCS" = "x" ; then
665             AC_MSG_ERROR([Can not find "mcs" - The Mono C-Sharp Compiler) in your PATH])
666         fi
667
668         AC_PATH_PROG(GACUTIL, gacutil)
669         if test "x$GACUTIL" = "x" ; then
670             AC_MSG_ERROR([Can not find "gacutil" in your PATH])
671         fi
672
673         AC_SUBST(MCS)
674         AC_SUBST(GACUTIL)
675     fi
676 fi
677 AM_CONDITIONAL(HAVE_MONO, test "x$HAVE_MONO" = "xyes")
678
679 #
680 # Check for monodoc stuff
681 #
682 HAVE_MONODOC=no
683 AC_ARG_ENABLE(monodoc,
684         AS_HELP_STRING([--disable-monodoc],[Disable documentation for mono bindings]),
685         [case "${enableval}" in
686                 yes) HAVE_MONODOC=yes ;;
687                 no)  HAVE_MONODOC=no ;;
688                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-monodoc) ;;
689         esac],
690         [HAVE_MONODOC=yes])
691
692 if test "x$HAVE_MONO" = "xyes" && test "x$HAVE_MONODOC" = "xyes" ; then
693         PKG_CHECK_MODULES(MONODOC, [monodoc >= 1.1.8])
694         MONODOC_DIR=`$PKG_CONFIG --variable=sourcesdir monodoc`        
695
696         AC_PATH_PROG(MONODOCER, monodocer)
697         AC_PATH_PROG(MDASSEMBLER, mdassembler)
698
699         AC_SUBST(MONODOC_DIR)
700         AC_SUBST(MONODOCER)
701         AC_SUBST(MDASSEMBLER)
702 fi
703 AM_CONDITIONAL(HAVE_MONODOC, test "x$HAVE_MONODOC" = "xyes")
704
705 #
706 # Build autoipd?
707 #
708 AC_ARG_ENABLE(autoipd,
709         AS_HELP_STRING([--disable-autoipd],[Disable building of avahi-autoipd]),
710         [case "${enableval}" in
711                 yes) ENABLE_AUTOIPD=yes ;;
712                 no)  ENABLE_AUTOIPD=no ;;
713                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-autoipd) ;;
714         esac],
715         [ENABLE_AUTOIPD=yes])
716
717 AM_CONDITIONAL(ENABLE_AUTOIPD, test "x$ENABLE_AUTOIPD" = "xyes")
718
719 #
720 # Defining users and groups
721 #
722 AC_ARG_WITH(avahi_user, AS_HELP_STRING([--with-avahi-user=<user>],[User for running avahi-daemon (avahi)]))
723 if test -z "$with_avahi_user" ; then
724     AVAHI_USER=avahi
725 else
726     AVAHI_USER=$with_avahi_user
727 fi
728 AC_SUBST(AVAHI_USER)
729 AC_DEFINE_UNQUOTED(AVAHI_USER,"$AVAHI_USER", [User for running the Avahi daemon])
730
731 AC_ARG_WITH(avahi_group,AS_HELP_STRING([--with-avahi-group=<group>],[Group for running avahi-daemon (avahi)]))
732 if test -z "$with_avahi_group" ; then
733     AVAHI_GROUP=avahi
734 else
735     AVAHI_GROUP=$with_avahi_group
736 fi
737 AC_SUBST(AVAHI_GROUP)
738 AC_DEFINE_UNQUOTED(AVAHI_GROUP,"$AVAHI_GROUP", [Group for Avahi])
739
740 AC_ARG_WITH(avahi_priv_access_group,AS_HELP_STRING([--with-avahi-priv-access-group=<group>],[Priviliged access group for Avahi clients (netdev)]))
741 if test -z "$with_avahi_priv_access_group" ; then
742     AVAHI_PRIV_ACCESS_GROUP=netdev
743 else
744     AVAHI_PRIV_ACCESS_GROUP=$with_avahi_priv_access_group
745 fi
746 AC_SUBST(AVAHI_PRIV_ACCESS_GROUP)
747 AC_DEFINE_UNQUOTED(AVAHI_PRIV_ACCESS_GROUP,"$AVAHI_PRIV_ACCESS_GROUP", [Privileged access group for Avahi clients])
748
749 AC_ARG_WITH(autoipd_user, AS_HELP_STRING([--with-autoipd-user=<user>],[User for running the avahi-autoipd daemon (avahi-autoipd)]))
750 if test -z "$with_autoipd_user" ; then
751     AVAHI_AUTOIPD_USER=avahi-autoipd
752 else
753     AVAHI_AUTOIPD_USER=$with_autoipd_user
754 fi
755 AC_SUBST(AVAHI_AUTOIPD_USER)
756 AC_DEFINE_UNQUOTED(AVAHI_AUTOIPD_USER,"$AVAHI_AUTOIPD_USER", [User for running the avahi-autoipd daemon])
757
758 AC_ARG_WITH(autoipd_group,AS_HELP_STRING([--with-autoipd-group=<group>],[Group for running the avahi-autoipd daemon (avahi-autoipd)]))
759 if test -z "$with_autoipd_group" ; then
760     AVAHI_AUTOIPD_GROUP=avahi-autoipd
761 else
762     AVAHI_AUTOIPD_GROUP=$with_autoipd_group
763 fi
764 AC_SUBST(AVAHI_AUTOIPD_GROUP)
765 AC_DEFINE_UNQUOTED(AVAHI_AUTOIPD_GROUP,"$AVAHI_AUTOIPD_GROUP", [Group for running the avahi-autoipd daemon])
766
767 #
768 # Avahi runtime dir
769 #
770 avahi_runtime_dir="${localstatedir}/run"
771 avahi_socket="${avahi_runtime_dir}/avahi-daemon/socket"
772 AC_SUBST(avahi_runtime_dir)
773 AC_SUBST(avahi_socket)
774
775 #
776 # Avahi interfaces dir
777 #
778 if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
779         interfacesdir="${datadir}/${PACKAGE}/interfaces/"
780         AC_SUBST(interfacesdir)
781 fi
782
783 #
784 # Doxygen
785 #
786 DX_HTML_FEATURE(ON)
787 DX_CHM_FEATURE(OFF)
788 DX_CHI_FEATURE(OFF)
789 DX_MAN_FEATURE(OFF)
790 DX_RTF_FEATURE(OFF)
791 DX_XML_FEATURE(OFF)
792 DX_PDF_FEATURE(OFF)
793 DX_PS_FEATURE(OFF)
794 DX_INIT_DOXYGEN(avahi, doxygen.cfg, doxygen)
795
796 AC_ARG_ENABLE(core-docs,
797         AS_HELP_STRING([--enable-core-docs],[Enable building of documentation for avahi-core]),
798 [case "${enableval}" in
799   yes) ENABLE_CORE_DOCS=yes ;;
800   no)  ENABLE_CORE_DOCS=no ;;
801   *) AC_MSG_ERROR([bad value ${enableval} for --enable-core-docs]) ;;
802 esac],[ENABLE_CORE_DOCS=no])
803
804 AM_CONDITIONAL([ENABLE_CORE_DOCS], [test "x$ENABLE_CORE_DOCS" = xyes])
805
806 #
807 # Build and Install man pages
808 #
809 AC_ARG_ENABLE(manpages,
810         AS_HELP_STRING([--disable-manpages],[Disable building and installation of man pages]),
811 [case "${enableval}" in
812   yes) manpages=yes ;;
813   no)  manpages=no ;;
814   *) AC_MSG_ERROR([bad value ${enableval} for --disable-manpages]) ;;
815 esac],[manpages=yes])
816
817 if test x$manpages = xyes ; then
818     #
819     # XMLTOMAN manpage generation
820     #
821     AC_ARG_ENABLE(xmltoman,
822     AS_HELP_STRING([--disable-xmltoman],[Disable rebuilding of man pages with xmltoman]),
823     [case "${enableval}" in
824       yes) xmltoman=yes ;;
825       no)  xmltoman=no ;;
826       *) AC_MSG_ERROR([bad value ${enableval} for --disable-xmltoman]) ;;
827     esac],[xmltoman=yes])
828     
829     if test x$xmltoman = xyes ; then
830         AC_CHECK_PROG(have_xmltoman, xmltoman, yes, no)
831     fi
832
833     if test x$have_xmltoman = xno -o x$xmltoman = xno; then
834         if ! test -e man/avahi-daemon.8 ; then
835             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])
836             exit 1
837         fi
838         AC_MSG_WARN([*** Not rebuilding man pages as xmltoman is not found ***])
839         xmltoman=no
840     fi
841 fi
842 AM_CONDITIONAL([USE_XMLTOMAN], [test "x$xmltoman" = xyes])
843 AM_CONDITIONAL([BUILD_MANPAGES], [test "x$manpages" = xyes])
844
845 #
846 # Conditionally compile test and example programs
847 #
848 AC_ARG_ENABLE(tests,
849         AS_HELP_STRING([--enable-tests],[Enable building of tests and examples]),
850         [case "${enableval}" in
851                 yes) ENABLE_TESTS=yes ;;
852                 no)  ENABLE_TESTS=no ;;
853                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tests) ;;
854         esac],
855         [ENABLE_TESTS=no])
856
857 AM_CONDITIONAL([ENABLE_TESTS], [test "x$ENABLE_TESTS" = "xyes"])
858
859 #
860 # Optionally enable libdns_sd compatibility support
861 #
862 AC_ARG_ENABLE(compat-libdns_sd,
863         AS_HELP_STRING([--enable-compat-libdns_sd],[Enable compatibility layer for libdns_sd]),
864         [case "${enableval}" in
865                 yes) ENABLE_COMPAT_LIBDNS_SD=yes ;;
866                 no)  ENABLE_COMPAT_LIBDNS_SD=no ;;
867                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libdns_sd) ;;
868         esac],
869         [ENABLE_COMPAT_LIBDNS_SD=no])
870
871 AM_CONDITIONAL([ENABLE_COMPAT_LIBDNS_SD], [test "x$ENABLE_COMPAT_LIBDNS_SD" = "xyes"])
872
873 #
874 # Optionally enable HOWL compatibility support
875 #
876 AC_ARG_ENABLE(compat-howl,
877         AS_HELP_STRING([--enable-compat-howl],[Enable compatibility layer for HOWL]),
878         [case "${enableval}" in
879                 yes) ENABLE_COMPAT_HOWL=yes ;;
880                 no)  ENABLE_COMPAT_HOWL=no ;;
881                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-howl) ;;
882         esac],
883         [ENABLE_COMPAT_HOWL=no])
884
885 AM_CONDITIONAL([ENABLE_COMPAT_HOWL], [test "x$ENABLE_COMPAT_HOWL" = "xyes"])
886
887
888 # ==========================================================================
889 AC_CONFIG_FILES([
890 Makefile 
891 avahi-common/Makefile 
892 avahi-core/Makefile 
893 avahi-glib/Makefile 
894 avahi-qt/Makefile
895 avahi-daemon/Makefile 
896 avahi-daemon/avahi-dbus.conf
897 avahi-discover-standalone/Makefile 
898 avahi-client/Makefile 
899 initscript/Makefile 
900 initscript/debian/Makefile
901 initscript/gentoo/Makefile
902 initscript/archlinux/Makefile
903 initscript/suse/Makefile
904 initscript/fedora/Makefile
905 initscript/mandriva/Makefile
906 initscript/darwin/Makefile
907 initscript/freebsd/Makefile
908 initscript/slackware/Makefile
909 avahi-dnsconfd/Makefile
910 avahi-utils/Makefile
911 avahi-python/Makefile
912 avahi-python/avahi/Makefile
913 examples/Makefile
914 common/Makefile
915 man/Makefile
916 tests/Makefile
917 service-type-database/Makefile
918 avahi-sharp/Makefile
919 avahi-compat-libdns_sd/Makefile
920 avahi-compat-howl/Makefile
921 avahi-compat-howl/samples/Makefile
922 avahi-autoipd/Makefile
923 avahi-ui/Makefile
924 ])
925 AC_OUTPUT
926
927 # ==========================================================================
928 echo "
929  ---{ $PACKAGE_NAME $VERSION }---
930
931     prefix:                                    ${prefix}
932     sysconfdir:                                ${sysconfdir}
933     localstatedir:                             ${localstatedir}
934     avahi socket:                              ${avahi_socket}
935     dbus-1 system.d dir:                       ${DBUS_SYS_DIR}
936     dbus-1 version:                            ${DBUS_VERSION}
937     dbus-1 system socket:                      ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
938     C Compiler:                                ${CC}
939     CFLAGS:                                    ${CFLAGS}
940     Enable GLIB:                               ${HAVE_GLIB}
941     Enable GTK:                                ${HAVE_GTK}
942     Enable D-Bus:                              ${HAVE_DBUS}
943     Enable Expat:                              ${HAVE_EXPAT}
944     Enable GDBM:                               ${HAVE_GDBM}
945     Enable DBM:                                ${HAVE_DBM}
946     Enable libdaemon:                          ${HAVE_LIBDAEMON}
947     Enable Python:                             ${HAVE_PYTHON}
948     Enable pygtk:                              ${HAVE_PYGTK}
949     Enable python-dbus:                        ${HAVE_PYTHON_DBUS}
950     Enable QT3:                                ${HAVE_QT3}
951     Enable QT4:                                ${HAVE_QT4}
952     Enable Mono:                               ${HAVE_MONO}
953     Enable Monodoc:                            ${HAVE_MONODOC}
954     Distribution/OS:                           ${with_distro}
955     User for avahi-daemon:                     ${AVAHI_USER}
956     Group for avahi-daemon:                    ${AVAHI_GROUP}
957     Priviliged access group for Avahi clients: ${AVAHI_PRIV_ACCESS_GROUP}
958     User for avahi-autoipd:                    ${AVAHI_AUTOIPD_USER}
959     Group for avahi-autoipd:                   ${AVAHI_AUTOIPD_GROUP}
960     Enable chroot():                           ${enable_chroot}
961     Enable Linux inotify:                      ${have_inotify}
962 "
963
964 BUILD_DAEMON="no   (You need libdaemon and expat!)"
965
966 if test "x$HAVE_EXPAT" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then
967     BUILD_DAEMON=yes
968 fi
969
970 BUILD_PYTHON="no   (You need python, pygtk and python-dbus!)"
971
972 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
973     BUILD_PYTHON=yes
974 fi
975
976 BUILD_CLIENT="no   (You need avahi-daemon and D-Bus!)"
977
978 if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
979     BUILD_CLIENT=yes
980 fi
981
982 if test "x$ENABLE_COMPAT_LIBDNS_SD" = "xyes" -a "x$BUILD_CLIENT" != "xyes" ; then
983    ENABLE_COMPAT_LIBDNS_SD="no   (You need libavahi-client!)"
984 fi
985 if test "x$ENABLE_COMPAT_HOWL" = "xyes" -a "x$BUILD_CLIENT" != "xyes" ; then
986    ENABLE_COMPAT_HOWL="no   (You need libavahi-client!)"
987 fi
988
989 BUILD_UI="no"
990 if test "x$HAVE_GTK" = "xyes" -a "x$BUILD_CLIENT" = "xyes" ; then
991    BUILD_UI="yes"
992 fi
993
994 echo "\
995     Building libavahi-core              yes
996     Building avahi-daemon:              ${BUILD_DAEMON}
997     Building avahi-dnsconfd:            ${BUILD_DAEMON}
998     Building libavahi-client:           ${BUILD_CLIENT}
999     Building avahi-utils:               ${BUILD_CLIENT}
1000     Building avahi-python:              ${BUILD_PYTHON}
1001     Building libavahi-glib:             ${HAVE_GLIB}
1002     Building avahi-discover-standalone: ${HAVE_GTK}
1003     Building libavahi-qt3:              ${HAVE_QT3}
1004     Building libavahi-qt4:              ${HAVE_QT4}
1005     Building avahi-sharp:               ${HAVE_MONO}
1006     Building avahi-compat-libdns_sd:    ${ENABLE_COMPAT_LIBDNS_SD}
1007     Building avahi-compat-howl:         ${ENABLE_COMPAT_HOWL}
1008     Building tests:                     ${ENABLE_TESTS}
1009     Building avahi-core documentation:  ${ENABLE_CORE_DOCS}
1010     Building avahi-autoipd:             ${ENABLE_AUTOIPD}
1011     Building libavahi-ui:               ${BUILD_UI}
1012 "