0d86476
diff -up cups-1.5.2/config.h.in.avahi-1-config cups-1.5.2/config.h.in
0d86476
--- cups-1.5.2/config.h.in.avahi-1-config	2011-06-16 21:12:16.000000000 +0100
0d86476
+++ cups-1.5.2/config.h.in	2012-03-14 15:04:51.365347165 +0000
9829b01
@@ -390,6 +390,13 @@
9829b01
 
9829b01
 
9829b01
 /*
9829b01
+ * Do we have Avahi for DNS Service Discovery?
9829b01
+ */
9829b01
+
9829b01
+#undef HAVE_AVAHI
9829b01
+
9829b01
+
9829b01
+/*
9829b01
  * Do we have <sys/ioctl.h>?
9829b01
  */
9829b01
 
0d86476
diff -up cups-1.5.2/config-scripts/cups-dnssd.m4.avahi-1-config cups-1.5.2/config-scripts/cups-dnssd.m4
0d86476
--- cups-1.5.2/config-scripts/cups-dnssd.m4.avahi-1-config	2011-05-12 06:21:56.000000000 +0100
0d86476
+++ cups-1.5.2/config-scripts/cups-dnssd.m4	2012-03-14 15:04:51.365347165 +0000
9829b01
@@ -23,6 +23,21 @@ AC_ARG_WITH(dnssd-includes, [  --with-dn
9829b01
 DNSSDLIBS=""
9829b01
 DNSSD_BACKEND=""
9829b01
 
9829b01
+AC_ARG_ENABLE(avahi, [  --enable-avahi          turn on DNS Service Discovery support, default=no],
9829b01
+	      [if test x$enable_avahi = xyes; then
9829b01
+		       AC_MSG_CHECKING(for Avahi)
9829b01
+		       if $PKGCONFIG --exists avahi-client; then
9829b01
+			       AC_MSG_RESULT(yes)
9829b01
+			       CFLAGS="$CFLAGS `$PKGCONFIG --cflags avahi-client`"
9829b01
+			       DNSSDLIBS="`$PKGCONFIG --libs avahi-client`"
9829b01
+			       DNSSD_BACKEND="dnssd"
9829b01
+			       AC_DEFINE(HAVE_AVAHI)
9829b01
+			       enable_dnssd=no
9829b01
+		       else
9829b01
+			       AC_MSG_RESULT(no)
9829b01
+		       fi
9829b01
+	       fi])
9829b01
+
9829b01
 if test x$enable_dnssd != xno; then
9829b01
 	AC_CHECK_HEADER(dns_sd.h, [
9829b01
 		case "$uname" in