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