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.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])
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, [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])
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])
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}"
49 # Checks for programs.
57 AC_PROG_GCC_TRADITIONAL
62 AC_CACHE_CHECK([whether the C++ compiler works], [avahi_cv_sys_cxx_works], [
64 AC_COMPILE_IFELSE([int main() { return 0; }], [avahi_cv_sys_cxx_works=yes],
65 [avahi_cv_sys_cxx_works=no])
68 [ if [ "x$avahi_cv_sys_cxx_works" = "xno" ]; then ]
69 AC_MSG_FAILURE([The C++ compiler does not work])
72 ACX_PTHREAD(,AC_MSG_ERROR([Missing POSIX Threads support]))
77 AC_CHECK_HEADER(linux/netlink.h,
79 AC_DEFINE([HAVE_NETLINK],[],[Support for Linux netlink])
81 #include <sys/socket.h>
82 #include <asm/types.h>
85 AM_CONDITIONAL(HAVE_NETLINK, [ test x"$HAVE_NETLINK" = xyes ])
88 # Check for net/route.h
90 AC_CHECK_HEADER(net/route.h,
92 AC_DEFINE([HAVE_PF_ROUTE],[],[Support for PF_ROUTE])
94 #include <sys/types.h>
95 #include <sys/socket.h>
98 AM_CONDITIONAL(HAVE_PF_ROUTE, [ test x"$HAVE_PF_ROUTE" = xyes ])
101 # Check for sys/filio.h; needed for FIONREAD on Solaris
103 AC_CHECK_HEADER(sys/filio.h,
105 AC_DEFINE([HAVE_SYS_FILIO_H],[],[Support for sys/filio.h])
109 AM_CONDITIONAL(HAVE_SYS_FILIO_H, [ test x"$HAVE_SYS_FILIO_H" = xyes ])
112 # Check for sys/sysctl.h; not present on Solaris
114 AC_CHECK_HEADER(sys/sysctl.h,
116 AC_DEFINE([HAVE_SYS_SYSCTL_H],[],[Support for sys/sysctl.h])
118 #include <sys/types.h>
119 #include <sys/socket.h>
120 #include <sys/param.h>
123 AM_CONDITIONAL(HAVE_SYS_SYSCTL_H, [ test x"$HAVE_SYS_SYSCTL_H" = xyes ])
126 # Check for lifconf struct; only present on Solaris
128 AC_MSG_CHECKING(for struct lifconf)
129 AC_CACHE_VAL(avahi_cv_has_struct_lifconf,
131 [#include <sys/socket.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.])
141 # Check for struct ip_mreqn
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;
150 AC_DEFINE([HAVE_STRUCT_IP_MREQN],[],[Support for struct ip_mreqn])
152 # We'll just have to try and use struct ip_mreq
154 AC_MSG_CHECKING(for struct ip_mreq)
155 AC_TRY_COMPILE([#include <netinet/in.h>], [
157 mreq.imr_interface.s_addr = 0;
161 AC_DEFINE([HAVE_STRUCT_IP_MREQ],[],[Support for struct ip_mreq])
163 # No multicast support
169 # Detecting the linux distribution for specific things like init scripts.
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`
184 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
187 debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|slackware|none)
190 AC_MSG_WARN([Your distribution (${with_distro}) is supported but no init script exist yet! (patches welcome)])
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.])
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])
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)
212 AC_LANG_CONFTEST([int main() {}])
213 $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
219 # If using GCC specify some additional parameters
220 if test "x$GCC" = "xyes" ; then
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"
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])
231 AC_TRY_COMPILE([#include <linux/rtnetlink.h>], [],
232 use_stdc99=yes, use_stdc99=no)
234 if test x"$use_stdc99" = xyes; then
235 DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
243 DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
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"
257 # Checks for header files.
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])
262 # Checks for typedefs, structures, and compiler characteristics.
268 # Checks for library functions.
270 AC_FUNC_SELECT_ARGTYPES
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])
280 AC_CHECK_DECLS(environ)
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)
287 AM_CONDITIONAL(ENABLE_CHROOT, test "x$enable_chroot" = "xyes")
289 if test "x$enable_chroot" = "xyes" ; then
290 AC_DEFINE([ENABLE_CHROOT], 1, [Enable chroot() usage])
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()])
297 AM_CONDITIONAL(HAVE_DLOPEN, test "x$HAVE_DLOPEN" = "xyes")
299 # Check for pkg-config manually first, as if its not installed the
300 # PKG_PROG_PKG_CONFIG macro won't be defined.
301 AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
303 if test x"$have_pkg_config" = "xno"; then
304 AC_MSG_ERROR(pkg-config is required to install this program)
313 AS_HELP_STRING([--disable-glib],[Disable use of GLib]),
314 [case "${enableval}" in
315 yes) HAVE_GLIB=yes ;;
317 *) AC_MSG_ERROR(bad value ${enableval} for --enable-glib) ;;
321 if test "x$HAVE_GLIB" = "xyes" ; then
322 PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ])
323 AC_SUBST(GLIB20_CFLAGS)
324 AC_SUBST(GLIB20_LIBS)
326 AM_CONDITIONAL(HAVE_GLIB, test "x$HAVE_GLIB" = "xyes")
332 AS_HELP_STRING([--disable-qt3],[Disable building of Qt3 mainloop integration]),
333 [case "${enableval}" in
336 *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt3) ;;
340 if test "x$HAVE_QT3" = "xyes" ; then
341 PKG_CHECK_MODULES( QT3, [ qt-mt >= 3.0.0 ])
344 QT3_PREFIX="`$PKG_CONFIG --variable=prefix qt-mt`/bin"
346 AC_CHECK_FILE( "$QT3_PREFIX/moc-qt3", [ MOC_QT3=$QT3_PREFIX/moc-qt3 ], [
347 AC_CHECK_FILE("$QT3_PREFIX/moc", [ MOC_QT3=$QT3_PREFIX/moc ], [
348 AC_MSG_ERROR([Couldn't find QT3 moc])])])
351 AM_CONDITIONAL(HAVE_QT3, test "x$HAVE_QT3" = "xyes")
357 AS_HELP_STRING([--disable-qt4],[Disable building of Qt4Core mainloop integration]),
358 [case "${enableval}" in
361 *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt4) ;;
365 if test "x$HAVE_QT4" = "xyes" ; then
366 PKG_CHECK_MODULES( QT4, [ QtCore >= 4.0.0 ])
369 QT4_PREFIX="`$PKG_CONFIG --variable=prefix QtCore`/bin"
371 AC_CHECK_FILE( "$QT4_PREFIX/moc-qt4", [ MOC_QT4=$QT4_PREFIX/moc-qt4 ], [
372 AC_CHECK_FILE("$QT4_PREFIX/moc", [ MOC_QT4=$QT4_PREFIX/moc ], [
373 AC_MSG_ERROR([Couldn't find QT4 moc])])])
376 AM_CONDITIONAL(HAVE_QT4, test "x$HAVE_QT4" = "xyes")
382 AS_HELP_STRING([--disable-gtk],[Disable use of GTK+]),
383 [case "${enableval}" in
386 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk) ;;
390 if test "x$HAVE_GTK" = "xyes" ; then
392 PKG_CHECK_MODULES(GTK20, [ gtk+-2.0 >= 2.4.0 ])
393 AC_SUBST(GTK20_CFLAGS)
396 # Check for GLADE 2.0
397 PKG_CHECK_MODULES(GLADE20, [ libglade-2.0 >= 2.4.0 ])
398 AC_SUBST(GLADE20_CFLAGS)
399 AC_SUBST(GLADE20_LIBS)
401 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
407 AS_HELP_STRING([--disable-dbus],[Disable use of D-Bus]),
408 [case "${enableval}" in
409 yes) HAVE_DBUS=yes ;;
411 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbus) ;;
415 AC_ARG_WITH(dbus-sys, AS_HELP_STRING([--with-dbus-sys=<dir>], [Path to D-Bus system.d directory]))
416 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]))
418 DBUS_VERSION="Disabled"
419 DBUS_SYS_DIR="Disabled"
420 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="Disabled"
421 if test "x$HAVE_DBUS" = "xyes" ; then
422 PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 0.34 ])
424 AC_DEFINE(HAVE_DBUS, 1, [Whether we have D-Bus or not])
426 DBUS_VERSION=`$PKG_CONFIG dbus-1 --modversion`
427 DBUS_VERSION_MAJOR=`echo $DBUS_VERSION | awk -F. '{print $1}'`
428 DBUS_VERSION_MINOR=`echo $DBUS_VERSION | awk -F. '{print $2}'`
429 DBUS_VERSION_MICRO=`echo $DBUS_VERSION | awk -F. '{print $3}'`
430 if test "z$DBUS_VERSION_MAJOR" = "z"; then
431 DBUS_VERSION_MAJOR="0"
433 if test "z$DBUS_VERSION_MINOR" = "z"; then
434 DBUS_VERSION_MINOR="0"
436 if test "z$DBUS_VERSION_MICRO" = "z"; then
437 DBUS_VERSION_MICRO="0"
440 if test "z$DBUS_VERSION_MAJOR" = "z0" -a "z$DBUS_VERSION_MINOR" = "z0" -a "z$DBUS_VERSION_MICRO" = "z0"; then
441 echo "Error: Couldn't determine the version of your D-Bus package."
442 echo " This is probably an error in this script, please report it"
443 echo " along with the following information:"
444 echo " Base D-Buss version ='$DBUS_VERSION'"
445 echo " DBUS_VERSION_MAJOR='$DBUS_VERSION_MAJOR'"
446 echo " DBUS_VERSION_MINOR='$DBUS_VERSION_MINOR'"
447 echo " DBUS_VERSION_MICRO='$DBUS_VERSION_MICRO'"
450 echo "Your D-Bus version is $DBUS_VERSION_MAJOR,$DBUS_VERSION_MINOR,$DBUS_VERSION_MICRO."
451 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
452 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
453 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
456 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
457 AC_SUBST(DBUS_CFLAGS)
460 if ! test -z "$with_dbus_sys" ; then
461 DBUS_SYS_DIR="$with_dbus_sys"
463 DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
465 AC_SUBST(DBUS_SYS_DIR)
467 if ! test -z "$with_dbus_system_address" ; then
468 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="$with_dbus_system_address"
470 # This is ugly, but D-Bus doesn't export this address for us
471 # so we have to guess, pretty much all setups i've seen have
472 # it in /var/lib/dbus or /var/run/dbus, and its defaulted to
473 # /var/run upstream so we will try guess first then default
476 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=/var/run/dbus/system_bus_socket"
477 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"
478 for sock in $TRY_SOCKETS; do
479 if test -S $sock; then
480 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$sock"
484 AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)
487 LIBS="$LIBS $DBUS_LIBS"
488 AC_CHECK_FUNCS([dbus_connection_close dbus_bus_get_private])
491 AM_CONDITIONAL(HAVE_DBUS, test "x$HAVE_DBUS" = "xyes")
497 AS_HELP_STRING([--disable-expat],[Disable use of Expat]),
498 [case "${enableval}" in
499 yes) HAVE_EXPAT=yes ;;
501 *) AC_MSG_ERROR(bad value ${enableval} for --enable-expat) ;;
505 if test "x$HAVE_EXPAT" = "xyes" ; then
506 AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
508 if ! $have_expat ; then
509 AC_MSG_ERROR([*** libexpat not found ***])
512 AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
521 AS_HELP_STRING([--enable-dbm],[Enable use of DBM]),
522 [case "${enableval}" in
525 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbm) ;;
530 AS_HELP_STRING([--disable-gdbm],[Disable use of GDBM]),
531 [case "${enableval}" in
532 yes) HAVE_GDBM=yes ;;
534 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gdbm) ;;
538 if test "x$HAVE_GDBM" = "xyes" ; then
539 if test "x$HAVE_DBM" = "xyes" ; then
540 AC_MSG_ERROR([*** --enable-gdbm and --enable-dbm both specified ***])
542 AC_CHECK_LIB(gdbm, gdbm_open, [ AC_CHECK_HEADERS(gdbm.h, have_gdbm=true, have_gdbm=false) ], have_gdbm=false)
544 if ! $have_gdbm ; then
545 AC_MSG_ERROR([*** libgdbm not found ***])
547 AC_DEFINE([HAVE_GDBM],[],[Support for GDBM])
549 if test "x$HAVE_DBM" = "xyes" ; then
550 AC_CHECK_HEADERS(ndbm.h, have_dbm=true, have_dbm=false)
552 if ! $have_dbm ; then
553 AC_MSG_ERROR([*** dbm not found ***])
555 AC_DEFINE([HAVE_DBM],[],[Support for DBM])
558 AM_CONDITIONAL(HAVE_GDBM, test "x$HAVE_GDBM" = "xyes")
559 AM_CONDITIONAL(HAVE_DBM, test "x$HAVE_DBM" = "xyes")
564 AC_ARG_ENABLE(libdaemon,
565 AS_HELP_STRING([--disable-libdaemon],[Disable use of libdaemon]),
566 [case "${enableval}" in
567 yes) HAVE_LIBDAEMON=yes ;;
568 no) HAVE_LIBDAEMON=no ;;
569 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libdaemon) ;;
571 [HAVE_LIBDAEMON=yes])
573 if test "x$HAVE_LIBDAEMON" = "xyes" ; then
574 PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
575 AC_SUBST(LIBDAEMON_CFLAGS)
576 AC_SUBST(LIBDAEMON_LIBS)
578 AM_CONDITIONAL(HAVE_LIBDAEMON, test "x$HAVE_LIBDAEMON" = "xyes")
583 AC_ARG_ENABLE(python,
584 AS_HELP_STRING([--disable-python], [Disable scripts that depends on python]),
585 [case "${enableval}" in
586 yes) HAVE_PYTHON=yes ;;
587 no) HAVE_PYTHON=no ;;
588 *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;;
589 esac],[HAVE_PYTHON=yes])
594 if test "x$HAVE_PYTHON" = "xyes" ; then
595 AM_PATH_PYTHON([2.4])
598 AS_HELP_STRING([--disable-pygtk],[Disable use of GTK in Python]),
599 [case "${enableval}" in
600 yes) HAVE_PYGTK=yes ;;
602 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pygtk) ;;
606 if test "x$HAVE_PYGTK" = "xyes" ; then
607 AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module gtk)])
611 if test "x$HAVE_DBUS" = "xyes" ; then
612 AC_ARG_ENABLE(python-dbus,
613 AS_HELP_STRING([--disable-python-dbus],[Disable use of D-Bus in Python]),
614 [case "${enableval}" in
615 yes) HAVE_PYTHON_DBUS=yes ;;
616 no) HAVE_PYTHON_DBUS=no ;;
617 *) AC_MSG_ERROR(bad value ${enableval} for --enable-python-dbus) ;;
619 [HAVE_PYTHON_DBUS=yes])
621 if test "x$HAVE_PYTHON_DBUS" = "xyes"; then
622 AM_CHECK_PYMOD(dbus,,,[AC_MSG_ERROR(Could not find Python module dbus)])
625 AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)])
626 if test "x$HAVE_GDBM" = "xyes"; then
627 AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)])
629 if test "x$HAVE_DBM" = "xyes"; then
630 AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)])
634 AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
635 AM_CONDITIONAL(HAVE_PYGTK, test "x$HAVE_PYGTK" = "xyes")
636 AM_CONDITIONAL(HAVE_PYTHON_DBUS, test "x$HAVE_PYTHON_DBUS" = "xyes")
639 # Check for mono stuff
642 if test "x$HAVE_DBUS" = "xyes" ; then
644 AS_HELP_STRING([--disable-mono],[Disable mono bindings]),
645 [case "${enableval}" in
646 yes) HAVE_MONO=yes ;;
648 *) AC_MSG_ERROR(bad value ${enableval} for --enable-mono) ;;
652 if test "x$HAVE_MONO" = "xyes" ; then
653 AC_PATH_PROG(MCS, mcs)
654 if test "x$MCS" = "x" ; then
655 AC_MSG_ERROR([Can not find "mcs" - The Mono C-Sharp Compiler) in your PATH])
658 AC_PATH_PROG(GACUTIL, gacutil)
659 if test "x$GACUTIL" = "x" ; then
660 AC_MSG_ERROR([Can not find "gacutil" in your PATH])
667 AM_CONDITIONAL(HAVE_MONO, test "x$HAVE_MONO" = "xyes")
670 # Check for monodoc stuff
673 AC_ARG_ENABLE(monodoc,
674 AS_HELP_STRING([--disable-monodoc],[Disable documentation for mono bindings]),
675 [case "${enableval}" in
676 yes) HAVE_MONODOC=yes ;;
677 no) HAVE_MONODOC=no ;;
678 *) AC_MSG_ERROR(bad value ${enableval} for --enable-monodoc) ;;
682 if test "x$HAVE_MONO" = "xyes" && test "x$HAVE_MONODOC" = "xyes" ; then
683 PKG_CHECK_MODULES(MONODOC, [monodoc >= 1.1.8])
684 MONODOC_DIR=`$PKG_CONFIG --variable=sourcesdir monodoc`
686 AC_PATH_PROG(MONODOCER, monodocer)
687 AC_PATH_PROG(MDASSEMBLER, mdassembler)
689 AC_SUBST(MONODOC_DIR)
691 AC_SUBST(MDASSEMBLER)
693 AM_CONDITIONAL(HAVE_MONODOC, test "x$HAVE_MONODOC" = "xyes")
698 AC_ARG_ENABLE(autoipd,
699 AS_HELP_STRING([--disable-autoipd],[Disable building of avahi-autoipd]),
700 [case "${enableval}" in
701 yes) ENABLE_AUTOIPD=yes ;;
702 no) ENABLE_AUTOIPD=no ;;
703 *) AC_MSG_ERROR(bad value ${enableval} for --disable-autoipd) ;;
705 [ENABLE_AUTOIPD=yes])
707 AM_CONDITIONAL(ENABLE_AUTOIPD, test "x$ENABLE_AUTOIPD" = "xyes")
710 # Defining users and groups
712 AC_ARG_WITH(avahi_user, AS_HELP_STRING([--with-avahi-user=<user>],[User for running avahi-daemon (avahi)]))
713 if test -z "$with_avahi_user" ; then
716 AVAHI_USER=$with_avahi_user
719 AC_DEFINE_UNQUOTED(AVAHI_USER,"$AVAHI_USER", [User for running the Avahi daemon])
721 AC_ARG_WITH(avahi_group,AS_HELP_STRING([--with-avahi-group=<group>],[Group for running avahi-daemon (avahi)]))
722 if test -z "$with_avahi_group" ; then
725 AVAHI_GROUP=$with_avahi_group
727 AC_SUBST(AVAHI_GROUP)
728 AC_DEFINE_UNQUOTED(AVAHI_GROUP,"$AVAHI_GROUP", [Group for Avahi])
730 AC_ARG_WITH(avahi_priv_access_group,AS_HELP_STRING([--with-avahi-priv-access-group=<group>],[Priviliged access group for Avahi clients (netdev)]))
731 if test -z "$with_avahi_priv_access_group" ; then
732 AVAHI_PRIV_ACCESS_GROUP=netdev
734 AVAHI_PRIV_ACCESS_GROUP=$with_avahi_priv_access_group
736 AC_SUBST(AVAHI_PRIV_ACCESS_GROUP)
737 AC_DEFINE_UNQUOTED(AVAHI_PRIV_ACCESS_GROUP,"$AVAHI_PRIV_ACCESS_GROUP", [Privileged access group for Avahi clients])
739 AC_ARG_WITH(autoipd_user, AS_HELP_STRING([--with-autipd-user=<user>],[User for running the avahi-autoipd daemon (avahi-autoipd)]))
740 if test -z "$with_autoipd_user" ; then
741 AVAHI_AUTOIPD_USER=avahi-autoipd
743 AVAHI_AUTOIPD_USER=$with_autoipd_user
745 AC_SUBST(AVAHI_AUTOIPD_USER)
746 AC_DEFINE_UNQUOTED(AVAHI_AUTOIPD_USER,"$AVAHI_AUTOIPD_USER", [User for running the avahi-autoipd daemon])
748 AC_ARG_WITH(autoipd_group,AS_HELP_STRING([--with-autoipd-group=<group>],[Group for running the avahi-autoipd daemon (avahi-autoipd)]))
749 if test -z "$with_autoipd_group" ; then
750 AVAHI_AUTOIPD_GROUP=avahi-autoipd
752 AVAHI_AUTOIPD_GROUP=$with_autoipd_group
754 AC_SUBST(AVAHI_AUTOIPD_GROUP)
755 AC_DEFINE_UNQUOTED(AVAHI_AUTOIPD_GROUP,"$AVAHI_AUTOIPD_GROUP", [Group for running the avahi-autoipd daemon])
760 avahi_runtime_dir="${localstatedir}/run"
761 avahi_socket="${avahi_runtime_dir}/avahi-daemon/socket"
762 AC_SUBST(avahi_runtime_dir)
763 AC_SUBST(avahi_socket)
766 # Avahi interfaces dir
768 if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
769 interfacesdir="${datadir}/${PACKAGE}/interfaces/"
770 AC_SUBST(interfacesdir)
784 DX_INIT_DOXYGEN(avahi, doxygen.cfg, doxygen)
786 AC_ARG_ENABLE(core-docs,
787 AS_HELP_STRING([--enable-core-docs],[Enable building of documentation for avahi-core]),
788 [case "${enableval}" in
789 yes) ENABLE_CORE_DOCS=yes ;;
790 no) ENABLE_CORE_DOCS=no ;;
791 *) AC_MSG_ERROR([bad value ${enableval} for --enable-core-docs]) ;;
792 esac],[ENABLE_CORE_DOCS=no])
794 AM_CONDITIONAL([ENABLE_CORE_DOCS], [test "x$ENABLE_CORE_DOCS" = xyes])
797 # Build and Install man pages
799 AC_ARG_ENABLE(manpages,
800 AS_HELP_STRING([--disable-manpages],[Disable building and installation of man pages]),
801 [case "${enableval}" in
804 *) AC_MSG_ERROR([bad value ${enableval} for --disable-manpages]) ;;
805 esac],[manpages=yes])
807 if test x$manpages = xyes ; then
809 # XMLTOMAN manpage generation
811 AC_ARG_ENABLE(xmltoman,
812 AS_HELP_STRING([--disable-xmltoman],[Disable rebuilding of man pages with xmltoman]),
813 [case "${enableval}" in
816 *) AC_MSG_ERROR([bad value ${enableval} for --disable-xmltoman]) ;;
817 esac],[xmltoman=yes])
819 if test x$xmltoman = xyes ; then
820 AC_CHECK_PROG(have_xmltoman, xmltoman, yes, no)
823 if test x$have_xmltoman = xno -o x$xmltoman = xno; then
824 if ! test -e man/avahi-daemon.8 ; then
825 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])
828 AC_MSG_WARN([*** Not rebuilding man pages as xmltoman is not found ***])
832 AM_CONDITIONAL([USE_XMLTOMAN], [test "x$xmltoman" = xyes])
833 AM_CONDITIONAL([BUILD_MANPAGES], [test "x$manpages" = xyes])
836 # Conditionally compile test and example programs
839 AS_HELP_STRING([--enable-tests],[Enable building of tests and examples]),
840 [case "${enableval}" in
841 yes) ENABLE_TESTS=yes ;;
842 no) ENABLE_TESTS=no ;;
843 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tests) ;;
847 AM_CONDITIONAL([ENABLE_TESTS], [test "x$ENABLE_TESTS" = "xyes"])
850 # Optionally enable libdns_sd compatibility support
852 AC_ARG_ENABLE(compat-libdns_sd,
853 AS_HELP_STRING([--enable-compat-libdns_sd],[Enable compatibility layer for libdns_sd]),
854 [case "${enableval}" in
855 yes) ENABLE_COMPAT_LIBDNS_SD=yes ;;
856 no) ENABLE_COMPAT_LIBDNS_SD=no ;;
857 *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libdns_sd) ;;
859 [ENABLE_COMPAT_LIBDNS_SD=no])
861 AM_CONDITIONAL([ENABLE_COMPAT_LIBDNS_SD], [test "x$ENABLE_COMPAT_LIBDNS_SD" = "xyes"])
864 # Optionally enable HOWL compatibility support
866 AC_ARG_ENABLE(compat-howl,
867 AS_HELP_STRING([--enable-compat-howl],[Enable compatibility layer for HOWL]),
868 [case "${enableval}" in
869 yes) ENABLE_COMPAT_HOWL=yes ;;
870 no) ENABLE_COMPAT_HOWL=no ;;
871 *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-howl) ;;
873 [ENABLE_COMPAT_HOWL=no])
875 AM_CONDITIONAL([ENABLE_COMPAT_HOWL], [test "x$ENABLE_COMPAT_HOWL" = "xyes"])
878 # ==========================================================================
881 avahi-common/Makefile
885 avahi-daemon/Makefile
886 avahi-daemon/avahi-dbus.conf
887 avahi-discover-standalone/Makefile
888 avahi-client/Makefile
890 initscript/debian/Makefile
891 initscript/gentoo/Makefile
892 initscript/archlinux/Makefile
893 initscript/suse/Makefile
894 initscript/fedora/Makefile
895 initscript/mandriva/Makefile
896 initscript/darwin/Makefile
897 initscript/freebsd/Makefile
898 initscript/slackware/Makefile
899 avahi-dnsconfd/Makefile
901 avahi-python/Makefile
902 avahi-python/avahi/Makefile
907 service-type-database/Makefile
909 avahi-compat-libdns_sd/Makefile
910 avahi-compat-howl/Makefile
911 avahi-compat-howl/samples/Makefile
912 avahi-autoipd/Makefile
917 # ==========================================================================
919 ---{ $PACKAGE_NAME $VERSION }---
922 sysconfdir: ${sysconfdir}
923 localstatedir: ${localstatedir}
924 avahi socket: ${avahi_socket}
925 dbus-1 system.d dir: ${DBUS_SYS_DIR}
926 dbus-1 version: ${DBUS_VERSION}
927 dbus-1 system socket: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
930 Enable GLIB: ${HAVE_GLIB}
931 Enable GTK: ${HAVE_GTK}
932 Enable D-Bus: ${HAVE_DBUS}
933 Enable Expat: ${HAVE_EXPAT}
934 Enable GDBM: ${HAVE_GDBM}
935 Enable DBM: ${HAVE_DBM}
936 Enable libdaemon: ${HAVE_LIBDAEMON}
937 Enable Python: ${HAVE_PYTHON}
938 Enable pygtk: ${HAVE_PYGTK}
939 Enable python-dbus: ${HAVE_PYTHON_DBUS}
940 Enable QT3: ${HAVE_QT3}
941 Enable QT4: ${HAVE_QT4}
942 Enable Mono: ${HAVE_MONO}
943 Enable Monodoc: ${HAVE_MONODOC}
944 Distribution/OS: ${with_distro}
945 User for avahi-daemon: ${AVAHI_USER}
946 Group for avahi-daemon: ${AVAHI_GROUP}
947 Priviliged access group for Avahi clients: ${AVAHI_PRIV_ACCESS_GROUP}
948 User for avahi-autoipd: ${AVAHI_AUTOIPD_USER}
949 Group for avahi-autoipd: ${AVAHI_AUTOIPD_GROUP}
950 Enable chroot(): ${enable_chroot}
953 BUILD_DAEMON="no (You need libdaemon and expat!)"
955 if test "x$HAVE_EXPAT" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then
959 BUILD_PYTHON="no (You need python, pygtk and python-dbus!)"
961 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
965 BUILD_CLIENT="no (You need avahi-daemon and D-Bus!)"
967 if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
971 if test "x$ENABLE_COMPAT_LIBDNS_SD" = "xyes" -a "x$BUILD_CLIENT" != "xyes" ; then
972 ENABLE_COMPAT_LIBDNS_SD="no (You need libavahi-client!)"
974 if test "x$ENABLE_COMPAT_HOWL" = "xyes" -a "x$BUILD_CLIENT" != "xyes" ; then
975 ENABLE_COMPAT_HOWL="no (You need libavahi-client!)"
979 if test "x$HAVE_GTK" = "xyes" -a "x$BUILD_CLIENT" = "xyes" ; then
984 Building libavahi-core yes
985 Building avahi-daemon: ${BUILD_DAEMON}
986 Building avahi-dnsconfd: ${BUILD_DAEMON}
987 Building libavahi-client: ${BUILD_CLIENT}
988 Building avahi-utils: ${BUILD_CLIENT}
989 Building avahi-python: ${BUILD_PYTHON}
990 Building libavahi-glib: ${HAVE_GLIB}
991 Building avahi-discover-standalone: ${HAVE_GTK}
992 Building libavahi-qt3: ${HAVE_QT3}
993 Building libavahi-qt4: ${HAVE_QT4}
994 Building avahi-sharp: ${HAVE_MONO}
995 Building avahi-compat-libdns_sd: ${ENABLE_COMPAT_LIBDNS_SD}
996 Building avahi-compat-howl: ${ENABLE_COMPAT_HOWL}
997 Building tests: ${ENABLE_TESTS}
998 Building avahi-core documentation: ${ENABLE_CORE_DOCS}
999 Building avahi-autoipd: ${ENABLE_AUTOIPD}
1000 Building libavahi-ui: ${BUILD_UI}