]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-dnssd.m4
Merge changes from CUPS 1.4svn-r7961.
[thirdparty/cups.git] / config-scripts / cups-dnssd.m4
index acdc98a0236bffeef9a72c37a5db1f14c040fff7..a13006015af352058faf7418c681c4f535edb262 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id$"
+dnl "$Id: cups-dnssd.m4 7890 2008-08-29 22:19:39Z mike $"
 dnl
 dnl   DNS Service Discovery (aka Bonjour) stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -7,8 +7,13 @@ dnl   http://www.dns-sd.org
 dnl   http://www.multicastdns.org/
 dnl   http://developer.apple.com/networking/bonjour/
 dnl
-dnl   Copyright ...
+dnl   Copyright 2007-2008 by Apple Inc.
 dnl
+dnl   These coded instructions, statements, and computer programs are the
+dnl   property of Apple Inc. and are protected by Federal copyright
+dnl   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+dnl   which should have been included with this file.  If this file is
+dnl   file is missing or damaged, see the license at "http://www.cups.org/".
 dnl
 
 AC_ARG_ENABLE(dnssd, [  --enable-dnssd          turn on DNS Service Discovery support, default=yes])
@@ -17,31 +22,35 @@ AC_ARG_WITH(dnssd-libs, [  --with-dnssd-libs       set directory for DNS Service
        DSOFLAGS="-L$withval $DSOFLAGS",)
 AC_ARG_WITH(dnssd-includes, [  --with-dnssd-includes   set directory for DNS Service Discovery includes],
        CFLAGS="-I$withval $CFLAGS"
-       CXXFLAGS="-I$withval $CXXFLAGS"
        CPPFLAGS="-I$withval $CPPFLAGS",)
 
 DNSSDLIBS=""
+DNSSD_BACKEND=""
 
 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)
+                               DNSSD_BACKEND="dnssd"
                                ;;
                        *)
                                # All others...
-                               DNSSDLIBS="???"
+                               AC_CHECK_LIB(dns_sd,TXTRecordGetValuePtr,
+                                       AC_DEFINE(HAVE_DNSSD)
+                                       DNSSDLIBS="-ldns_sd")
                                ;;
                esac
        ])
 fi
 
 AC_SUBST(DNSSDLIBS)
+AC_SUBST(DNSSD_BACKEND)
 
 dnl
-dnl End of "$Id$".
+dnl End of "$Id: cups-dnssd.m4 7890 2008-08-29 22:19:39Z mike $".
 dnl