]> git.ipfire.org Git - thirdparty/cups.git/blob - config-scripts/cups-dnssd.m4
Merge changes from CUPS 1.4svn-r7242.
[thirdparty/cups.git] / config-scripts / cups-dnssd.m4
1 dnl
2 dnl "$Id$"
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
10 dnl Copyright 2007-2008 by Apple Inc.
11 dnl
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/".
17 dnl
18
19 AC_ARG_ENABLE(dnssd, [ --enable-dnssd turn on DNS Service Discovery support, default=yes])
20 AC_ARG_WITH(dnssd-libs, [ --with-dnssd-libs set directory for DNS Service Discovery library],
21 LDFLAGS="-L$withval $LDFLAGS"
22 DSOFLAGS="-L$withval $DSOFLAGS",)
23 AC_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
27 DNSSDLIBS=""
28
29 if test x$enable_dnssd != xno; then
30 AC_CHECK_HEADER(dns_sd.h, [
31 case "$uname" in
32 Darwin*)
33 # Darwin and MacOS X...
34 DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
35 AC_DEFINE(HAVE_DNSSD)
36 AC_DEFINE(HAVE_COREFOUNDATION)
37 AC_DEFINE(HAVE_SYSTEMCONFIGURATION)
38 ;;
39 *)
40 # All others...
41 AC_CHECK_LIB(dns_sd,DNSServiceProcessResult,
42 AC_DEFINE(HAVE_DNSSD)
43 DNSSDLIBS="-ldns_sd")
44 ;;
45 esac
46 ])
47 fi
48
49 AC_SUBST(DNSSDLIBS)
50
51 dnl
52 dnl End of "$Id$".
53 dnl