]> git.ipfire.org Git - thirdparty/cups.git/blame_incremental - config-scripts/cups-dnssd.m4
Merge final 1.4.0 (r8761) changes.
[thirdparty/cups.git] / config-scripts / cups-dnssd.m4
... / ...
CommitLineData
1dnl
2dnl "$Id: cups-dnssd.m4 7890 2008-08-29 22:19:39Z mike $"
3dnl
4dnl DNS Service Discovery (aka Bonjour) stuff for the Common UNIX Printing System (CUPS).
5dnl
6dnl http://www.dns-sd.org
7dnl http://www.multicastdns.org/
8dnl http://developer.apple.com/networking/bonjour/
9dnl
10dnl Copyright 2007-2009 by Apple Inc.
11dnl
12dnl These coded instructions, statements, and computer programs are the
13dnl property of Apple Inc. and are protected by Federal copyright
14dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
15dnl which should have been included with this file. If this file is
16dnl file is missing or damaged, see the license at "http://www.cups.org/".
17dnl
18
19AC_ARG_ENABLE(dnssd, [ --disable-dnssd disable DNS Service Discovery support])
20AC_ARG_WITH(dnssd-libs, [ --with-dnssd-libs set directory for DNS Service Discovery library],
21 LDFLAGS="-L$withval $LDFLAGS"
22 DSOFLAGS="-L$withval $DSOFLAGS",)
23AC_ARG_WITH(dnssd-includes, [ --with-dnssd-includes set directory for DNS Service Discovery includes],
24 CFLAGS="-I$withval $CFLAGS"
25 CPPFLAGS="-I$withval $CPPFLAGS",)
26
27DNSSDLIBS=""
28DNSSD_BACKEND=""
29
30if test x$enable_dnssd != xno; then
31 AC_CHECK_HEADER(dns_sd.h, [
32 case "$uname" in
33 Darwin*)
34 # Darwin and MacOS X...
35 AC_DEFINE(HAVE_DNSSD)
36 AC_DEFINE(HAVE_COREFOUNDATION)
37 AC_DEFINE(HAVE_SYSTEMCONFIGURATION)
38 DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
39 DNSSD_BACKEND="dnssd"
40 ;;
41 *)
42 # All others...
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)
53 AC_DEFINE(HAVE_DNSSD)
54 DNSSDLIBS="-ldns_sd"
55 DNSSD_BACKEND="dnssd",
56 AC_MSG_RESULT(no))
57 LIBS="$SAVELIBS"
58 ;;
59 esac
60 ])
61fi
62
63AC_SUBST(DNSSDLIBS)
64AC_SUBST(DNSSD_BACKEND)
65
66dnl
67dnl End of "$Id: cups-dnssd.m4 7890 2008-08-29 22:19:39Z mike $".
68dnl