summaryrefslogtreecommitdiff
path: root/~mtjm/cups-usblp/cups-avahi-1-config.patch
blob: 516e01fa942f1fcf20a23a2ec2bd845f491b00d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
diff -up cups-1.5.2/config.h.in.avahi-1-config cups-1.5.2/config.h.in
--- cups-1.5.2/config.h.in.avahi-1-config	2011-06-16 21:12:16.000000000 +0100
+++ cups-1.5.2/config.h.in	2012-03-14 15:04:51.365347165 +0000
@@ -390,6 +390,13 @@
 
 
 /*
+ * Do we have Avahi for DNS Service Discovery?
+ */
+
+#undef HAVE_AVAHI
+
+
+/*
  * Do we have <sys/ioctl.h>?
  */
 
diff -up cups-1.5.2/config-scripts/cups-dnssd.m4.avahi-1-config cups-1.5.2/config-scripts/cups-dnssd.m4
--- cups-1.5.2/config-scripts/cups-dnssd.m4.avahi-1-config	2011-05-12 06:21:56.000000000 +0100
+++ cups-1.5.2/config-scripts/cups-dnssd.m4	2012-03-14 15:04:51.365347165 +0000
@@ -23,6 +23,21 @@ AC_ARG_WITH(dnssd-includes, [  --with-dn
 DNSSDLIBS=""
 DNSSD_BACKEND=""
 
+AC_ARG_ENABLE(avahi, [  --enable-avahi          turn on DNS Service Discovery support, default=no],
+	      [if test x$enable_avahi = xyes; then
+		       AC_MSG_CHECKING(for Avahi)
+		       if $PKGCONFIG --exists avahi-client; then
+			       AC_MSG_RESULT(yes)
+			       CFLAGS="$CFLAGS `$PKGCONFIG --cflags avahi-client`"
+			       DNSSDLIBS="`$PKGCONFIG --libs avahi-client`"
+			       DNSSD_BACKEND="dnssd"
+			       AC_DEFINE(HAVE_AVAHI)
+			       enable_dnssd=no
+		       else
+			       AC_MSG_RESULT(no)
+		       fi
+	       fi])
+
 if test x$enable_dnssd != xno; then
 	AC_CHECK_HEADER(dns_sd.h, [
 		case "$uname" in