diff -ur distcc-2.18.3.old/configure.ac distcc-2.18.3/configure.ac --- distcc-2.18.3.old/configure.ac 2008-01-01 21:08:02.000000000 +0200 +++ distcc-2.18.3/configure.ac 2008-01-01 21:09:56.000000000 +0200 @@ -387,14 +387,18 @@ [#include ]) dnl check for avahi +AC_ARG_ENABLE(avahi, AC_HELP_STRING([--enable-avahi], [enable avahi support]), [], [enable_avahi=auto]) +ZEROCONF_DISTCC_OBJS="" +ZEROCONF_DISTCCD_OBJS="" PKG_CHECK_MODULES(AVAHI, [avahi-client >= 0.6.5], -[AC_DEFINE(HAVE_AVAHI, 1, [defined if Avahi is available]) -CFLAGS="$CFLAGS $AVAHI_CFLAGS" -LIBS="$LIBS $AVAHI_LIBS" -ZEROCONF_DISTCC_OBJS="src/zeroconf.o src/gcc-id.o" -ZEROCONF_DISTCCD_OBJS="src/zeroconf-reg.o src/gcc-id.o"], -[ZEROCONF_DISTCC_OBJS="" -ZEROCONF_DISTCCD_OBJS=""]) +[if test x"${enable_avahi}" = x"yes" || test x"${enable_avahi}" = x"auto"; then + AC_DEFINE(HAVE_AVAHI, 1, [defined if Avahi is available]) + CFLAGS="$CFLAGS $AVAHI_CFLAGS" + LIBS="$LIBS $AVAHI_LIBS" + ZEROCONF_DISTCC_OBJS="src/zeroconf.o src/gcc-id.o" + ZEROCONF_DISTCCD_OBJS="src/zeroconf-reg.o src/gcc-id.o" +fi], +[test x"${enable_avahi}" = x"yes" && AC_MSG_ERROR(avahi support needs avahi-client >= 0.6.5 installed)]) AC_SUBST(ZEROCONF_DISTCC_OBJS) AC_SUBST(ZEROCONF_DISTCCD_OBJS)