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