]> 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 6049 2006-10-20 15:07:21Z mike $"
3 dnl
4 dnl Networking stuff for the Common UNIX Printing System (CUPS).
5 dnl
6 dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
7 dnl
8 dnl These coded instructions, statements, and computer programs are the
9 dnl property of Easy Software Products and are protected by Federal
10 dnl copyright law. Distribution and use rights are outlined in the file
11 dnl "LICENSE.txt" which should have been included with this file. If this
12 dnl file is missing or damaged please contact Easy Software Products
13 dnl at:
14 dnl
15 dnl Attn: CUPS Licensing Information
16 dnl Easy Software Products
17 dnl 44141 Airport View Drive, Suite 204
18 dnl Hollywood, Maryland 20636 USA
19 dnl
20 dnl Voice: (301) 373-9600
21 dnl EMail: cups-info@cups.org
22 dnl WWW: http://www.cups.org
23 dnl
24
25 AC_SEARCH_LIBS(socket, socket)
26 AC_SEARCH_LIBS(gethostbyaddr, nsl)
27 AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
28 AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
29 AC_SEARCH_LIBS(rresvport_af, nsl, AC_DEFINE(HAVE_RRESVPORT_AF))
30
31 # Tru64 5.1b leaks file descriptors with these functions; disable until
32 # we can come up with a test for this...
33 if test "$uname" != "OSF1"; then
34 AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
35 AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
36 fi
37
38 AC_CHECK_MEMBER(struct sockaddr.sa_len,,, [#include <sys/socket.h>])
39 AC_CHECK_HEADER(sys/sockio.h, AC_DEFINE(HAVE_SYS_SOCKIO_H))
40
41 if test "$uname" = "SunOS"; then
42 case "$uversion" in
43 55* | 56*)
44 maxfiles=1024
45 ;;
46 *)
47 maxfiles=4096
48 ;;
49 esac
50 else
51 maxfiles=4096
52 fi
53
54 AC_ARG_WITH(maxfiles, [ --with-maxfiles=N set maximum number of file descriptors for scheduler (deprecated) ],
55 maxfiles=$withval)
56
57 AC_DEFINE_UNQUOTED(CUPS_MAX_FDS, $maxfiles)
58
59 CUPS_DEFAULT_DOMAINSOCKET=""
60
61 dnl Domain socket support...
62 AC_ARG_WITH(domainsocket, [ --with-domainsocket set unix domain socket name],
63 default_domainsocket="$withval",
64 default_domainsocket="")
65
66 if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then
67 if test "x$default_domainsocket" = x; then
68 case "$uname" in
69 Darwin*)
70 # Darwin and MaxOS X do their own thing...
71 CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
72 ;;
73 *)
74 # All others use FHS standard...
75 CUPS_DEFAULT_DOMAINSOCKET="$CUPS_STATEDIR/cups.sock"
76 ;;
77 esac
78 else
79 CUPS_DEFAULT_DOMAINSOCKET="$default_domainsocket"
80 fi
81
82 CUPS_LISTEN_DOMAINSOCKET="Listen $CUPS_DEFAULT_DOMAINSOCKET"
83
84 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_DOMAINSOCKET, "$CUPS_DEFAULT_DOMAINSOCKET")
85 else
86 CUPS_LISTEN_DOMAINSOCKET=""
87 fi
88
89 AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
90 AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
91
92 dnl
93 dnl End of "$Id: cups-network.m4 6049 2006-10-20 15:07:21Z mike $".
94 dnl