]> git.ipfire.org Git - thirdparty/cups.git/blob - config-scripts/cups-network.m4
Load cups into easysw/current.
[thirdparty/cups.git] / config-scripts / cups-network.m4
1 dnl
2 dnl "$Id: cups-network.m4 6649 2007-07-11 21:46:42Z mike $"
3 dnl
4 dnl Networking stuff for the Common UNIX Printing System (CUPS).
5 dnl
6 dnl Copyright 2007 by Apple Inc.
7 dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
8 dnl
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/".
14 dnl
15
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))
21
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))
27 fi
28
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))
31
32 if test "$uname" = "SunOS"; then
33 case "$uversion" in
34 55* | 56*)
35 maxfiles=1024
36 ;;
37 *)
38 maxfiles=4096
39 ;;
40 esac
41 else
42 maxfiles=4096
43 fi
44
45 AC_ARG_WITH(maxfiles, [ --with-maxfiles=N set maximum number of file descriptors for scheduler ],
46 maxfiles=$withval)
47
48 AC_DEFINE_UNQUOTED(CUPS_MAX_FDS, $maxfiles)
49
50 CUPS_DEFAULT_DOMAINSOCKET=""
51
52 dnl Domain socket support...
53 AC_ARG_WITH(domainsocket, [ --with-domainsocket set unix domain socket name],
54 default_domainsocket="$withval",
55 default_domainsocket="")
56
57 if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then
58 if test "x$default_domainsocket" = x; then
59 case "$uname" in
60 Darwin*)
61 # Darwin and MaxOS X do their own thing...
62 CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
63 ;;
64 *)
65 # All others use FHS standard...
66 CUPS_DEFAULT_DOMAINSOCKET="$CUPS_STATEDIR/cups.sock"
67 ;;
68 esac
69 else
70 CUPS_DEFAULT_DOMAINSOCKET="$default_domainsocket"
71 fi
72
73 CUPS_LISTEN_DOMAINSOCKET="Listen $CUPS_DEFAULT_DOMAINSOCKET"
74
75 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_DOMAINSOCKET, "$CUPS_DEFAULT_DOMAINSOCKET")
76 else
77 CUPS_LISTEN_DOMAINSOCKET=""
78 fi
79
80 AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
81 AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
82
83 AC_CHECK_HEADERS(AppleTalk/at_proto.h,AC_DEFINE(HAVE_APPLETALK_AT_PROTO_H),,
84 [#include <netat/appletalk.h>])
85
86 dnl
87 dnl End of "$Id: cups-network.m4 6649 2007-07-11 21:46:42Z mike $".
88 dnl