2 dnl "$Id: cups-network.m4 6649 2007-07-11 21:46:42Z mike $"
4 dnl Networking stuff for the Common UNIX Printing System (CUPS).
6 dnl Copyright 2007 by Apple Inc.
7 dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
9 dnl These coded instructions, statements, and computer programs are the
10 dnl property of Apple Inc. and are protected by Federal copyright
11 dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 dnl which should have been included with this file. If this file is
13 dnl file is missing or damaged, see the license at "http://www.cups.org/".
16 AC_SEARCH_LIBS(socket, socket)
17 AC_SEARCH_LIBS(gethostbyaddr, nsl)
18 AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
19 AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
20 AC_SEARCH_LIBS(rresvport_af, nsl, AC_DEFINE(HAVE_RRESVPORT_AF))
22 # Tru64 5.1b leaks file descriptors with these functions; disable until
23 # we can come up with a test for this...
24 if test "$uname" != "OSF1"; then
25 AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
26 AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
29 AC_CHECK_MEMBER(struct sockaddr.sa_len,,, [#include <sys/socket.h>])
30 AC_CHECK_HEADER(sys/sockio.h, AC_DEFINE(HAVE_SYS_SOCKIO_H))
32 if test "$uname" = "SunOS"; then
45 AC_ARG_WITH(maxfiles, [ --with-maxfiles=N set maximum number of file descriptors for scheduler ],
48 AC_DEFINE_UNQUOTED(CUPS_MAX_FDS, $maxfiles)
50 CUPS_DEFAULT_DOMAINSOCKET=""
52 dnl Domain socket support...
53 AC_ARG_WITH(domainsocket, [ --with-domainsocket set unix domain socket name],
54 default_domainsocket="$withval",
55 default_domainsocket="")
57 if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then
58 if test "x$default_domainsocket" = x; then
61 # Darwin and MaxOS X do their own thing...
62 CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
65 # All others use FHS standard...
66 CUPS_DEFAULT_DOMAINSOCKET="$CUPS_STATEDIR/cups.sock"
70 CUPS_DEFAULT_DOMAINSOCKET="$default_domainsocket"
73 CUPS_LISTEN_DOMAINSOCKET="Listen $CUPS_DEFAULT_DOMAINSOCKET"
75 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_DOMAINSOCKET, "$CUPS_DEFAULT_DOMAINSOCKET")
77 CUPS_LISTEN_DOMAINSOCKET=""
80 AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
81 AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
83 AC_CHECK_HEADERS(AppleTalk/at_proto.h,AC_DEFINE(HAVE_APPLETALK_AT_PROTO_H),,
84 [#include <netat/appletalk.h>])
87 dnl End of "$Id: cups-network.m4 6649 2007-07-11 21:46:42Z mike $".