]> git.ipfire.org Git - thirdparty/cups.git/blame - config-scripts/cups-network.m4
Load cups into easysw/current.
[thirdparty/cups.git] / config-scripts / cups-network.m4
CommitLineData
ef416fc2 1dnl
bc44d920 2dnl "$Id: cups-network.m4 6649 2007-07-11 21:46:42Z mike $"
ef416fc2 3dnl
4dnl Networking stuff for the Common UNIX Printing System (CUPS).
5dnl
bc44d920 6dnl Copyright 2007 by Apple Inc.
ef416fc2 7dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
8dnl
9dnl These coded instructions, statements, and computer programs are the
bc44d920 10dnl property of Apple Inc. and are protected by Federal copyright
11dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
12dnl which should have been included with this file. If this file is
13dnl file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 14dnl
15
16AC_SEARCH_LIBS(socket, socket)
17AC_SEARCH_LIBS(gethostbyaddr, nsl)
ef416fc2 18AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
ef416fc2 19AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
20AC_SEARCH_LIBS(rresvport_af, nsl, AC_DEFINE(HAVE_RRESVPORT_AF))
21
2abf387c 22# Tru64 5.1b leaks file descriptors with these functions; disable until
23# we can come up with a test for this...
24if test "$uname" != "OSF1"; then
25 AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
26 AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
27fi
28
ef416fc2 29AC_CHECK_MEMBER(struct sockaddr.sa_len,,, [#include <sys/socket.h>])
30AC_CHECK_HEADER(sys/sockio.h, AC_DEFINE(HAVE_SYS_SOCKIO_H))
31
32if test "$uname" = "SunOS"; then
33 case "$uversion" in
34 55* | 56*)
35 maxfiles=1024
36 ;;
37 *)
38 maxfiles=4096
39 ;;
40 esac
41else
42 maxfiles=4096
43fi
44
f7deaa1a 45AC_ARG_WITH(maxfiles, [ --with-maxfiles=N set maximum number of file descriptors for scheduler ],
ef416fc2 46 maxfiles=$withval)
47
48AC_DEFINE_UNQUOTED(CUPS_MAX_FDS, $maxfiles)
49
50CUPS_DEFAULT_DOMAINSOCKET=""
51
52dnl Domain socket support...
53AC_ARG_WITH(domainsocket, [ --with-domainsocket set unix domain socket name],
54 default_domainsocket="$withval",
55 default_domainsocket="")
56
57if 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")
76else
77 CUPS_LISTEN_DOMAINSOCKET=""
78fi
79
80AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
81AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
82
7594b224 83AC_CHECK_HEADERS(AppleTalk/at_proto.h,AC_DEFINE(HAVE_APPLETALK_AT_PROTO_H),,
84 [#include <netat/appletalk.h>])
85
ef416fc2 86dnl
bc44d920 87dnl End of "$Id: cups-network.m4 6649 2007-07-11 21:46:42Z mike $".
ef416fc2 88dnl