Index: config-scripts/cups-dnssd.m4
===================================================================
--- config-scripts/cups-dnssd.m4	(revision 6690)
+++ config-scripts/cups-dnssd.m4	(working copy)
@@ -29,17 +29,19 @@
 
 if test x$enable_dnssd != xno; then
 	AC_CHECK_HEADER(dns_sd.h, [
-		AC_DEFINE(HAVE_DNSSD)
 		case "$uname" in
 			Darwin*)
 				# Darwin and MacOS X...
 				DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
+				AC_DEFINE(HAVE_DNSSD)
 				AC_DEFINE(HAVE_COREFOUNDATION)
 				AC_DEFINE(HAVE_SYSTEMCONFIGURATION)
 				;;
 			*)
 				# All others...
-				DNSSDLIBS="???"
+				AC_CHECK_LIB(dns_sd,DNSServiceProcessResult,
+					AC_DEFINE(HAVE_DNSSD)
+					DNSSDLIBS="-ldns_sd")
 				;;
 		esac
 	])
Index: scheduler/dirsvc.c
===================================================================
--- scheduler/dirsvc.c	(revision 6690)
+++ scheduler/dirsvc.c	(working copy)
@@ -65,14 +65,15 @@
 
 #ifdef HAVE_DNSSD
 #  include <dns_sd.h>
-#  include <nameser.h>
-#  include <nameser.h>
-#  ifdef HAVE_COREFOUNDATION
-#    include <CoreFoundation/CoreFoundation.h>
-#  endif /* HAVE_COREFOUNDATION */
-#  ifdef HAVE_SYSTEMCONFIGURATION
-#    include <SystemConfiguration/SystemConfiguration.h>
-#  endif /* HAVE_SYSTEMCONFIGURATION */
+#  ifdef __APPLE__
+#    include <nameser.h>
+#    ifdef HAVE_COREFOUNDATION
+#      include <CoreFoundation/CoreFoundation.h>
+#    endif /* HAVE_COREFOUNDATION */
+#    ifdef HAVE_SYSTEMCONFIGURATION
+#      include <SystemConfiguration/SystemConfiguration.h>
+#    endif /* HAVE_SYSTEMCONFIGURATION */
+#  endif /* __APPLE__ */
 #endif /* HAVE_DNSSD */
 
 
