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.4],[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, [5:0:2])
32 AC_SUBST(LIBAVAHI_CORE_VERSION_INFO, [3:3:0])
33 AC_SUBST(LIBAVAHI_CLIENT_VERSION_INFO, [3:2:0])
34 AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [1:0:0])
35 AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [1:0:0])
36 AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [1:0: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 struct ip_mreqn
90 AC_MSG_CHECKING(for struct ip_mreqn)
91 AC_TRY_COMPILE([#include <netinet/in.h>], [
93 mreq.imr_address.s_addr = 0;
97 AC_DEFINE([HAVE_STRUCT_IP_MREQN],[],[Support for struct ip_mreqn])
99 # We'll just have to try and use struct ip_mreq
101 AC_MSG_CHECKING(for struct ip_mreq)
102 AC_TRY_COMPILE([#include <netinet/in.h>], [
104 mreq.imr_interface.s_addr = 0;
108 AC_DEFINE([HAVE_STRUCT_IP_MREQ],[],[Support for struct ip_mreq])
110 # No multicast support
116 # Detecting the linux distribution for specific things like init scripts.
118 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 or none]))
119 if test "z$with_distro" = "z"; then
120 AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
121 AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
122 AC_CHECK_FILE(/etc/arch-release,with_distro="archlinux")
123 AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
124 AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora")
125 AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
126 if test "z$with_distro" = "z"; then
127 with_distro=`uname -s`
130 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
133 debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|none)
136 AC_MSG_WARN([Your distribution (${with_distro}) is supported but no init script exist yet! (patches welcome)])
139 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.])
142 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])
146 AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
147 AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
148 AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
149 AM_CONDITIONAL(TARGET_ARCHLINUX, test x"$with_distro" = xarchlinux)
150 AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
151 AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
152 AM_CONDITIONAL(TARGET_DARWIN, test x"$with_distro" = xdarwin)
153 AM_CONDITIONAL(TARGET_NETBSD, test x"$with_distro" = xnetbsd)
154 AM_CONDITIONAL(TARGET_FREEBSD, test x"$with_distro" = xfreebsd)
157 AC_LANG_CONFTEST([int main() {}])
158 $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
164 # If using GCC specify some additional parameters
165 if test "x$GCC" = "xyes" ; then
167 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"
169 if test "x$HAVE_NETLINK" = "xyes" ; then
170 # Test whether rtnetlink.h can be included when compiled with -std=c99
171 # some distributions (e.g. archlinux) have broken headers that dont
172 # define __u64 with -std=c99
173 AC_MSG_CHECKING([checking whether rtnetlink.h can be included with -std=c99])
176 AC_TRY_COMPILE([#include <linux/rtnetlink.h>], [],
177 use_stdc99=yes, use_stdc99=no)
179 if test x"$use_stdc99" = xyes; then
180 DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
188 DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
191 for flag in $DESIRED_FLAGS ; do
192 AC_MSG_CHECKING([whether $CC accepts $flag])
193 if test_gcc_flag $flag ; then
194 CFLAGS="$CFLAGS $flag"
202 # Checks for header files.
204 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])
207 # Checks for typedefs, structures, and compiler characteristics.
213 # Checks for library functions.
215 AC_FUNC_SELECT_ARGTYPES
218 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])
225 AC_CHECK_DECLS(environ)
228 AC_CHECK_HEADERS([sys/capability.h],,enable_chroot=no)
229 AC_CHECK_HEADERS([sys/prctl.h],,enable_chroot=no)
230 AC_CHECK_FUNCS([chroot],,enable_chroot=no)
232 AM_CONDITIONAL(ENABLE_CHROOT, test "x$enable_chroot" = "xyes")
234 if test "x$enable_chroot" = "xyes" ; then
235 AC_DEFINE([ENABLE_CHROOT], 1, [Enable chroot() usage])
238 AC_CHECK_LIB(dl, dlopen, [ AC_CHECK_HEADERS(dlfcn.h, HAVE_DLOPEN=yes, HAVE_DLOPEN=no) ], HAVE_DLOPEN=no)
239 if test "x$HAVE_DLOPEN" = "xyes" ; then
240 AC_DEFINE([HAVE_DLOPEN],1,[Have dlopen()])
242 AM_CONDITIONAL(HAVE_DLOPEN, test "x$HAVE_DLOPEN" = "xyes")
244 # Check for pkg-config manually first, as if its not installed the
245 # PKG_PROG_PKG_CONFIG macro won't be defined.
246 AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
248 if test x"$have_pkg_config" = "xno"; then
249 AC_MSG_ERROR(pkg-config is required to install this program)
258 AS_HELP_STRING([--disable-glib],[Disable use of GLib]),
259 [case "${enableval}" in
260 yes) HAVE_GLIB=yes ;;
262 *) AC_MSG_ERROR(bad value ${enableval} for --enable-glib) ;;
266 if test "x$HAVE_GLIB" = "xyes" ; then
267 PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ])
268 AC_SUBST(GLIB20_CFLAGS)
269 AC_SUBST(GLIB20_LIBS)
271 AM_CONDITIONAL(HAVE_GLIB, test "x$HAVE_GLIB" = "xyes")
277 AS_HELP_STRING([--disable-qt3],[Disable building of Qt3 mainloop integration]),
278 [case "${enableval}" in
281 *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt3) ;;
285 if test "x$HAVE_QT3" = "xyes" ; then
286 PKG_CHECK_MODULES( QT3, [ qt-mt >= 3.0.0 ])
289 QT3_PREFIX="`$PKG_CONFIG --variable=prefix qt-mt`/bin"
291 AC_CHECK_FILE( "$QT3_PREFIX/moc-qt3", [ MOC_QT3=$QT3_PREFIX/moc-qt3 ], [
292 AC_CHECK_FILE("$QT3_PREFIX/moc", [ MOC_QT3=$QT3_PREFIX/moc ], [
293 AC_MSG_ERROR([Couldn't find QT3 moc])])])
296 AM_CONDITIONAL(HAVE_QT3, test "x$HAVE_QT3" = "xyes")
302 AS_HELP_STRING([--disable-qt4],[Disable building of Qt4Core mainloop integration]),
303 [case "${enableval}" in
306 *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt4) ;;
310 if test "x$HAVE_QT4" = "xyes" ; then
311 PKG_CHECK_MODULES( QT4, [ QtCore >= 4.0.0 ])
314 QT4_PREFIX="`$PKG_CONFIG --variable=prefix QtCore`/bin"
316 AC_CHECK_FILE( "$QT4_PREFIX/moc-qt4", [ MOC_QT4=$QT4_PREFIX/moc-qt4 ], [
317 AC_CHECK_FILE("$QT4_PREFIX/moc", [ MOC_QT4=$QT4_PREFIX/moc ], [
318 AC_MSG_ERROR([Couldn't find QT4 moc])])])
321 AM_CONDITIONAL(HAVE_QT4, test "x$HAVE_QT4" = "xyes")
327 AS_HELP_STRING([--disable-gtk],[Disable use of GTK+]),
328 [case "${enableval}" in
331 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk) ;;
335 if test "x$HAVE_GTK" = "xyes" ; then
337 PKG_CHECK_MODULES(GTK20, [ gtk+-2.0 >= 2.4.0 ])
338 AC_SUBST(GTK20_CFLAGS)
341 # Check for GLADE 2.0
342 PKG_CHECK_MODULES(GLADE20, [ libglade-2.0 >= 2.4.0 ])
343 AC_SUBST(GLADE20_CFLAGS)
344 AC_SUBST(GLADE20_LIBS)
346 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
352 AS_HELP_STRING([--disable-dbus],[Disable use of D-BUS]),
353 [case "${enableval}" in
354 yes) HAVE_DBUS=yes ;;
356 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbus) ;;
360 AC_ARG_WITH(dbus-sys, AS_HELP_STRING([--with-dbus-sys=<dir>], [where D-BUS system.d directory is]))
361 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]))
363 DBUS_VERSION="Disabled"
364 DBUS_SYS_DIR="Disabled"
365 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="Disabled"
366 if test "x$HAVE_DBUS" = "xyes" ; then
367 PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 0.34 ])
369 AC_DEFINE(HAVE_DBUS, 1, [Whether we have D-BUS or not])
371 DBUS_VERSION=`$PKG_CONFIG dbus-1 --modversion`
372 DBUS_VERSION_MAJOR=`echo $DBUS_VERSION | awk -F. '{print $1}'`
373 DBUS_VERSION_MINOR=`echo $DBUS_VERSION | awk -F. '{print $2}'`
374 DBUS_VERSION_MICRO=`echo $DBUS_VERSION | awk -F. '{print $3}'`
375 if test "z$DBUS_VERSION_MAJOR" = "z"; then
376 DBUS_VERSION_MAJOR="0"
378 if test "z$DBUS_VERSION_MINOR" = "z"; then
379 DBUS_VERSION_MINOR="0"
381 if test "z$DBUS_VERSION_MICRO" = "z"; then
382 DBUS_VERSION_MICRO="0"
385 if test "z$DBUS_VERSION_MAJOR" = "z0" -a "z$DBUS_VERSION_MINOR" = "z0" -a "z$DBUS_VERSION_MICRO" = "z0"; then
386 echo "Error: Couldn't determine the version of your DBUS package."
387 echo " This is probably an error in this script, please report it"
388 echo " along with the following information:"
389 echo " Base DBUS version ='$DBUS_VERSION'"
390 echo " DBUS_VERSION_MAJOR='$DBUS_VERSION_MAJOR'"
391 echo " DBUS_VERSION_MINOR='$DBUS_VERSION_MINOR'"
392 echo " DBUS_VERSION_MICRO='$DBUS_VERSION_MICRO'"
395 echo "Your dbus version is $DBUS_VERSION_MAJOR,$DBUS_VERSION_MINOR,$DBUS_VERSION_MICRO."
396 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
397 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
398 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
401 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
402 AC_SUBST(DBUS_CFLAGS)
405 if ! test -z "$with_dbus_sys" ; then
406 DBUS_SYS_DIR="$with_dbus_sys"
408 DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
410 AC_SUBST(DBUS_SYS_DIR)
412 if ! test -z "$with_dbus_system_address" ; then
413 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="$with_dbus_system_address"
415 # This is ugly, but D-BUS doesn't export this address for us
416 # so we have to guess, pretty much all setups i've seen have
417 # it in /var/lib/dbus or /var/run/dbus, and its defaulted to
418 # /var/run upstream so we will try guess first then default
421 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=/var/run/dbus/system_bus_socket"
422 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"
423 for sock in $TRY_SOCKETS; do
424 if test -S $sock; then
425 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$sock"
429 AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)
432 AM_CONDITIONAL(HAVE_DBUS, test "x$HAVE_DBUS" = "xyes")
438 AS_HELP_STRING([--disable-expat],[Disable use of Expat]),
439 [case "${enableval}" in
440 yes) HAVE_EXPAT=yes ;;
442 *) AC_MSG_ERROR(bad value ${enableval} for --enable-expat) ;;
446 if test "x$HAVE_EXPAT" = "xyes" ; then
447 AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
449 if ! $have_expat ; then
450 AC_MSG_ERROR([*** libexpat not found ***])
453 AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
459 AS_HELP_STRING([--disable-gdbm],[Disable use of GDBM]),
460 [case "${enableval}" in
461 yes) HAVE_GDBM=yes ;;
463 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gdbm) ;;
467 if test "x$HAVE_GDBM" = "xyes" ; then
468 AC_CHECK_LIB(gdbm, gdbm_open, [ AC_CHECK_HEADERS(gdbm.h, have_gdbm=true, have_gdbm=false) ], have_gdbm=false)
470 if ! $have_gdbm ; then
471 AC_MSG_ERROR([*** libgdbm not found ***])
473 AC_DEFINE([HAVE_GDBM],[],[Support for GDBM])
475 AM_CONDITIONAL(HAVE_GDBM, test "x$HAVE_GDBM" = "xyes")
480 AC_ARG_ENABLE(libdaemon,
481 AS_HELP_STRING([--disable-libdaemon],[Disable use of libdaemon]),
482 [case "${enableval}" in
483 yes) HAVE_LIBDAEMON=yes ;;
484 no) HAVE_LIBDAEMON=no ;;
485 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libdaemon) ;;
487 [HAVE_LIBDAEMON=yes])
489 if test "x$HAVE_LIBDAEMON" = "xyes" ; then
490 PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
491 AC_SUBST(LIBDAEMON_CFLAGS)
492 AC_SUBST(LIBDAEMON_LIBS)
494 AM_CONDITIONAL(HAVE_LIBDAEMON, test "x$HAVE_LIBDAEMON" = "xyes")
499 AC_ARG_ENABLE(python,
500 AS_HELP_STRING([--disable-python], [Disable scripts that depends on python]),
501 [case "${enableval}" in
502 yes) HAVE_PYTHON=yes ;;
503 no) HAVE_PYTHON=no ;;
504 *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;;
505 esac],[HAVE_PYTHON=yes])
510 if test "x$HAVE_PYTHON" = "xyes" ; then
511 AM_PATH_PYTHON([2.4])
514 AS_HELP_STRING([--disable-pygtk],[Disable use of GTK in Python]),
515 [case "${enableval}" in
516 yes) HAVE_PYGTK=yes ;;
518 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pygtk) ;;
522 if test "x$HAVE_PYGTK" = "xyes" ; then
523 AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module gtk)])
527 if test "x$HAVE_DBUS" = "xyes" ; then
528 AC_ARG_ENABLE(python-dbus,
529 AS_HELP_STRING([--disable-python-dbus],[Disable use of D-BUS in Python]),
530 [case "${enableval}" in
531 yes) HAVE_PYTHON_DBUS=yes ;;
532 no) HAVE_PYTHON_DBUS=no ;;
533 *) AC_MSG_ERROR(bad value ${enableval} for --enable-python-dbus) ;;
535 [HAVE_PYTHON_DBUS=yes])
537 if test "x$HAVE_PYTHON_DBUS" = "xyes"; then
538 AM_CHECK_PYMOD(dbus,,,[AC_MSG_ERROR(Could not find Python module dbus)])
541 AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)])
542 AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)])
545 AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
546 AM_CONDITIONAL(HAVE_PYGTK, test "x$HAVE_PYGTK" = "xyes")
547 AM_CONDITIONAL(HAVE_PYTHON_DBUS, test "x$HAVE_PYTHON_DBUS" = "xyes")
550 # Check for mono stuff
553 if test "x$HAVE_DBUS" = "xyes" ; then
555 AS_HELP_STRING([--disable-mono],[Disable mono bindings]),
556 [case "${enableval}" in
557 yes) HAVE_MONO=yes ;;
559 *) AC_MSG_ERROR(bad value ${enableval} for --enable-mono) ;;
563 if test "x$HAVE_MONO" = "xyes" ; then
564 AC_PATH_PROG(MCS, mcs)
565 if test "x$MCS" = "x" ; then
566 AC_MSG_ERROR([Can not find "mcs" in your PATH])
569 AC_PATH_PROG(GACUTIL, gacutil)
570 if test "x$GACUTIL" = "x" ; then
571 AC_MSG_ERROR([Can not find "gacutil" in your PATH])
578 AM_CONDITIONAL(HAVE_MONO, test "x$HAVE_MONO" = "xyes")
581 # Check for monodoc stuff
584 AC_ARG_ENABLE(monodoc,
585 AS_HELP_STRING([--disable-monodoc],[Disable documentation for mono bindings]),
586 [case "${enableval}" in
587 yes) HAVE_MONODOC=yes ;;
588 no) HAVE_MONODOC=no ;;
589 *) AC_MSG_ERROR(bad value ${enableval} for --enable-monodoc) ;;
593 if test "x$HAVE_MONO" = "xyes" && test "x$HAVE_MONODOC" = "xyes" ; then
594 PKG_CHECK_MODULES(MONODOC, [monodoc >= 1.1.8])
595 MONODOC_DIR=`$PKG_CONFIG --variable=sourcesdir monodoc`
597 AC_PATH_PROG(MONODOCER, monodocer)
598 AC_PATH_PROG(MDASSEMBLER, mdassembler)
600 AC_SUBST(MONODOC_DIR)
602 AC_SUBST(MDASSEMBLER)
604 AM_CONDITIONAL(HAVE_MONODOC, test "x$HAVE_MONODOC" = "xyes")
607 # Defining Avahi User and Group.
609 AC_ARG_WITH(avahi_user, AS_HELP_STRING([--with-avahi-user=<user>],[User for running the Avahi daemon (avahi)]))
610 if test -z "$with_avahi_user" ; then
613 AVAHI_USER=$with_avahi_user
616 AC_DEFINE_UNQUOTED(AVAHI_USER,"$AVAHI_USER", [User for running the Avahi daemon])
618 AC_ARG_WITH(avahi_group,AS_HELP_STRING([--with-avahi-group=<group>],[Group for Avahi (avahi)]))
619 if test -z "$with_avahi_group" ; then
622 AVAHI_GROUP=$with_avahi_group
624 AC_SUBST(AVAHI_GROUP)
625 AC_DEFINE_UNQUOTED(AVAHI_GROUP,"$AVAHI_GROUP", [Group for Avahi])
630 avahi_runtime_dir="${localstatedir}/run"
631 avahi_socket="${avahi_runtime_dir}/avahi-daemon/socket"
632 AC_SUBST(avahi_runtime_dir)
633 AC_SUBST(avahi_socket)
636 # Avahi interfaces dir
638 if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
639 interfacesdir="${datadir}/${PACKAGE}/interfaces/"
640 AC_SUBST(interfacesdir)
654 DX_INIT_DOXYGEN(avahi, doxygen.cfg, doxygen)
657 # Build and Install man pages
659 AC_ARG_ENABLE(manpages,
660 AS_HELP_STRING([--disable-manpages],[Disable building and installation of man pages]),
661 [case "${enableval}" in
664 *) AC_MSG_ERROR([bad value ${enableval} for --disable-manpages]) ;;
665 esac],[manpages=yes])
667 if test x$manpages = xyes ; then
669 # XMLTOMAN manpage generation
671 AC_ARG_ENABLE(xmltoman,
672 AS_HELP_STRING([--disable-xmltoman],[Disable rebuilding of man pages with xmltoman]),
673 [case "${enableval}" in
676 *) AC_MSG_ERROR([bad value ${enableval} for --disable-xmltoman]) ;;
677 esac],[xmltoman=yes])
679 if test x$xmltoman = xyes ; then
680 AC_CHECK_PROG(have_xmltoman, xmltoman, yes, no)
683 if test x$have_xmltoman = xno -o x$xmltoman = xno; then
684 if ! test -e man/avahi-daemon.8 ; then
685 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])
688 AC_MSG_WARN([*** Not rebuilding man pages as xmltoman is not found ***])
692 AM_CONDITIONAL([USE_XMLTOMAN], [test "x$xmltoman" = xyes])
693 AM_CONDITIONAL([BUILD_MANPAGES], [test "x$manpages" = xyes])
696 # Conditionally compile test and example programs
699 AS_HELP_STRING([--enable-tests],[Enable building of tests and examples]),
700 [case "${enableval}" in
701 yes) ENABLE_TESTS=yes ;;
702 no) ENABLE_TESTS=no ;;
703 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tests) ;;
707 AM_CONDITIONAL([ENABLE_TESTS], [test "x$ENABLE_TESTS" = "xyes"])
710 # Optionally enable libdns_sd compatibility support
712 AC_ARG_ENABLE(compat-libdns_sd,
713 AS_HELP_STRING([--enable-compat-libdns_sd],[Enable compatibility layer for libdns_sd]),
714 [case "${enableval}" in
715 yes) ENABLE_COMPAT_LIBDNS_SD=yes ;;
716 no) ENABLE_COMPAT_LIBDNS_SD=no ;;
717 *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libdns_sd) ;;
719 [ENABLE_COMPAT_LIBDNS_SD=no])
721 AM_CONDITIONAL([ENABLE_COMPAT_LIBDNS_SD], [test "x$ENABLE_COMPAT_LIBDNS_SD" = "xyes"])
724 # Optionally enable HOWL compatibility support
726 AC_ARG_ENABLE(compat-howl,
727 AS_HELP_STRING([--enable-compat-howl],[Enable compatibility layer for HOWL]),
728 [case "${enableval}" in
729 yes) ENABLE_COMPAT_HOWL=yes ;;
730 no) ENABLE_COMPAT_HOWL=no ;;
731 *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-howl) ;;
733 [ENABLE_COMPAT_HOWL=no])
735 AM_CONDITIONAL([ENABLE_COMPAT_HOWL], [test "x$ENABLE_COMPAT_HOWL" = "xyes"])
738 # ==========================================================================
741 avahi-common/Makefile
745 avahi-daemon/Makefile
746 avahi-daemon/avahi-dbus.conf
747 avahi-discover-standalone/Makefile
748 avahi-client/Makefile
750 initscript/debian/Makefile
751 initscript/gentoo/Makefile
752 initscript/archlinux/Makefile
753 initscript/suse/Makefile
754 initscript/fedora/Makefile
755 initscript/mandriva/Makefile
756 initscript/darwin/Makefile
757 initscript/freebsd/Makefile
758 avahi-dnsconfd/Makefile
760 avahi-python/Makefile
761 avahi-python/avahi/Makefile
766 service-type-database/Makefile
768 avahi-compat-libdns_sd/Makefile
769 avahi-compat-howl/Makefile
770 avahi-compat-howl/samples/Makefile
774 # ==========================================================================
776 ---{ $PACKAGE_NAME $VERSION }---
779 sysconfdir: ${sysconfdir}
780 localstatedir: ${localstatedir}
781 avahi socket: ${avahi_socket}
782 dbus-1 system.d dir: ${DBUS_SYS_DIR}
783 dbus-1 version: ${DBUS_VERSION}
784 dbus-1 system socket ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
787 Enable GLIB: ${HAVE_GLIB}
788 Enable GTK: ${HAVE_GTK}
789 Enable D-BUS: ${HAVE_DBUS}
790 Enable Expat: ${HAVE_EXPAT}
791 Enable GDBM: ${HAVE_GDBM}
792 Enable libdaemon: ${HAVE_LIBDAEMON}
793 Enable Python: ${HAVE_PYTHON}
794 Enable pygtk: ${HAVE_PYGTK}
795 Enable python-dbus: ${HAVE_PYTHON_DBUS}
796 Enable QT3: ${HAVE_QT3}
797 Enable QT4: ${HAVE_QT4}
798 Enable Mono: ${HAVE_MONO}
799 Enable Monodoc: ${HAVE_MONODOC}
800 Distribution/OS: ${with_distro}
801 User for Avahi: ${AVAHI_USER}
802 Group for Avahi: ${AVAHI_GROUP}
803 Enable chroot(): ${enable_chroot}
806 BUILD_DAEMON="no (You need libdaemon and expat!)"
808 if test "x$HAVE_EXPAT" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then
812 BUILD_PYTHON="no (You need python, pygtk and python-dbus!)"
814 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
818 BUILD_CLIENT="no (You need avahi-daemon and dbus!)"
820 if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
824 if test "x$ENABLE_COMPAT_LIBDNS_SD" = "xyes" -a "x$BUILD_CLIENT" != "xyes" ; then
825 ENABLE_COMPAT_LIBDNS_SD="no (You need libavahi-client!)"
827 if test "x$ENABLE_COMPAT_HOWL" = "xyes" -a "x$BUILD_CLIENT" != "xyes" ; then
828 ENABLE_COMPAT_HOWL="no (You need libavahi-client!)"
833 Building libavahi-core yes
834 Building avahi-daemon: ${BUILD_DAEMON}
835 Building avahi-dnsconfd: ${BUILD_DAEMON}
836 Building libavahi-client: ${BUILD_CLIENT}
837 Building avahi-utils: ${BUILD_CLIENT}
838 Building avahi-python: ${BUILD_PYTHON}
839 Building libavahi-glib: ${HAVE_GLIB}
840 Building avahi-discover-standalone: ${HAVE_GTK}
841 Building libavahi-qt3: ${HAVE_QT3}
842 Building libavahi-qt4: ${HAVE_QT4}
843 Building avahi-sharp: ${HAVE_MONO}
844 Building avahi-compat-libdns_sd: ${ENABLE_COMPAT_LIBDNS_SD}
845 Building avahi-compat-howl: ${ENABLE_COMPAT_HOWL}
846 Building tests: ${ENABLE_TESTS}