summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/distcc/files/distcc-avahi-configure.patch')
-rw-r--r--sys-devel/distcc/files/distcc-avahi-configure.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys-devel/distcc/files/distcc-avahi-configure.patch b/sys-devel/distcc/files/distcc-avahi-configure.patch
new file mode 100644
index 000000000000..cc1097d643d1
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-avahi-configure.patch
@@ -0,0 +1,29 @@
+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 <sys/socket.h>])
+
+ 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)
+