]>
Commit | Line | Data |
---|---|---|
f7deaa1a | 1 | dnl |
b19ccc9e | 2 | dnl "$Id: cups-dnssd.m4 7890 2008-08-29 22:19:39Z mike $" |
f7deaa1a | 3 | dnl |
4 | dnl DNS Service Discovery (aka Bonjour) stuff for the Common UNIX Printing System (CUPS). | |
5 | dnl | |
6 | dnl http://www.dns-sd.org | |
7 | dnl http://www.multicastdns.org/ | |
8 | dnl http://developer.apple.com/networking/bonjour/ | |
9 | dnl | |
bf3816c7 | 10 | dnl Copyright 2007-2009 by Apple Inc. |
f7deaa1a | 11 | dnl |
bc44d920 | 12 | dnl These coded instructions, statements, and computer programs are the |
13 | dnl property of Apple Inc. and are protected by Federal copyright | |
14 | dnl law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
15 | dnl which should have been included with this file. If this file is | |
16 | dnl file is missing or damaged, see the license at "http://www.cups.org/". | |
f7deaa1a | 17 | dnl |
18 | ||
bf3816c7 | 19 | AC_ARG_ENABLE(dnssd, [ --disable-dnssd disable DNS Service Discovery support]) |
09a101d6 | 20 | AC_ARG_WITH(dnssd-libs, [ --with-dnssd-libs set directory for DNS Service Discovery library], |
f7deaa1a | 21 | LDFLAGS="-L$withval $LDFLAGS" |
22 | DSOFLAGS="-L$withval $DSOFLAGS",) | |
09a101d6 | 23 | AC_ARG_WITH(dnssd-includes, [ --with-dnssd-includes set directory for DNS Service Discovery includes], |
f7deaa1a | 24 | CFLAGS="-I$withval $CFLAGS" |
f7deaa1a | 25 | CPPFLAGS="-I$withval $CPPFLAGS",) |
26 | ||
27 | DNSSDLIBS="" | |
c5571a1d | 28 | DNSSD_BACKEND="" |
f7deaa1a | 29 | |
30 | if test x$enable_dnssd != xno; then | |
31 | AC_CHECK_HEADER(dns_sd.h, [ | |
f7deaa1a | 32 | case "$uname" in |
33 | Darwin*) | |
34 | # Darwin and MacOS X... | |
cc0d019f | 35 | AC_DEFINE(HAVE_DNSSD) |
f7deaa1a | 36 | AC_DEFINE(HAVE_COREFOUNDATION) |
37 | AC_DEFINE(HAVE_SYSTEMCONFIGURATION) | |
d1c13e16 | 38 | DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration" |
c5571a1d | 39 | DNSSD_BACKEND="dnssd" |
f7deaa1a | 40 | ;; |
41 | *) | |
42 | # All others... | |
d1c13e16 MS |
43 | AC_MSG_CHECKING(for current version of dns_sd library) |
44 | SAVELIBS="$LIBS" | |
45 | LIBS="$LIBS -ldns_sd" | |
46 | AC_TRY_COMPILE([#include <dns_sd.h], | |
47 | [int constant = kDNSServiceFlagsShareConnection; | |
48 | unsigned char txtRecord[100]; | |
49 | uint8_t valueLen; | |
50 | TXTRecordGetValuePtr(sizeof(txtRecord), | |
51 | txtRecord, "value", &valueLen);], | |
52 | AC_MSG_RESULT(yes) | |
cc0d019f | 53 | AC_DEFINE(HAVE_DNSSD) |
d1c13e16 MS |
54 | DNSSDLIBS="-ldns_sd" |
55 | DNSSD_BACKEND="dnssd", | |
56 | AC_MSG_RESULT(no)) | |
57 | LIBS="$SAVELIBS" | |
f7deaa1a | 58 | ;; |
59 | esac | |
60 | ]) | |
61 | fi | |
62 | ||
63 | AC_SUBST(DNSSDLIBS) | |
c5571a1d | 64 | AC_SUBST(DNSSD_BACKEND) |
f7deaa1a | 65 | |
66 | dnl | |
b19ccc9e | 67 | dnl End of "$Id: cups-dnssd.m4 7890 2008-08-29 22:19:39Z mike $". |
f7deaa1a | 68 | dnl |