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