]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-network.m4
Fix an issue with `PreserveJobHistory` and time values (Issue #5538)
[thirdparty/cups.git] / config-scripts / cups-network.m4
index abe2ebcf0b1e304e7bfdf9993d64b2a5d837fb13..2854708b5c77e3342a4a7006f55c7000f8660f95 100644 (file)
@@ -1,36 +1,30 @@
 dnl
-dnl "$Id: cups-network.m4 6049 2006-10-20 15:07:21Z mike $"
+dnl Networking stuff for CUPS.
 dnl
-dnl   Networking stuff for the Common UNIX Printing System (CUPS).
+dnl Copyright 2007-2016 by Apple Inc.
+dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
 dnl
-dnl   Copyright 1997-2005 by Easy Software Products, all rights reserved.
-dnl
-dnl   These coded instructions, statements, and computer programs are the
-dnl   property of Easy Software Products and are protected by Federal
-dnl   copyright law.  Distribution and use rights are outlined in the file
-dnl   "LICENSE.txt" which should have been included with this file.  If this
-dnl   file is missing or damaged please contact Easy Software Products
-dnl   at:
-dnl
-dnl       Attn: CUPS Licensing Information
-dnl       Easy Software Products
-dnl       44141 Airport View Drive, Suite 204
-dnl       Hollywood, Maryland 20636 USA
-dnl
-dnl       Voice: (301) 373-9600
-dnl       EMail: cups-info@cups.org
-dnl         WWW: http://www.cups.org
+dnl Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
 dnl
 
+AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H),,[
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>])
 AC_SEARCH_LIBS(socket, socket)
 AC_SEARCH_LIBS(gethostbyaddr, nsl)
 AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
 AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
 AC_SEARCH_LIBS(rresvport_af, nsl, AC_DEFINE(HAVE_RRESVPORT_AF))
+AC_SEARCH_LIBS(__res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT),
+       AC_SEARCH_LIBS(res_9_init, resolv bind, AC_DEFINE(HAVE_RES_INIT),
+       AC_SEARCH_LIBS(res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT))))
 
 # Tru64 5.1b leaks file descriptors with these functions; disable until
 # we can come up with a test for this...
-if test "$uname" != "OSF1"; then
+if test "$host_os_name" != "osf1"; then
        AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
        AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
 fi
@@ -38,24 +32,6 @@ fi
 AC_CHECK_MEMBER(struct sockaddr.sa_len,,, [#include <sys/socket.h>])
 AC_CHECK_HEADER(sys/sockio.h, AC_DEFINE(HAVE_SYS_SOCKIO_H))
 
-if test "$uname" = "SunOS"; then
-       case "$uversion" in
-               55* | 56*)
-                       maxfiles=1024
-                       ;;
-               *)
-                       maxfiles=4096
-                       ;;
-       esac
-else
-       maxfiles=4096
-fi
-
-AC_ARG_WITH(maxfiles, [  --with-maxfiles=N       set maximum number of file descriptors for scheduler (deprecated) ],
-       maxfiles=$withval)
-
-AC_DEFINE_UNQUOTED(CUPS_MAX_FDS, $maxfiles)
-
 CUPS_DEFAULT_DOMAINSOCKET=""
 
 dnl Domain socket support...
@@ -65,9 +41,9 @@ AC_ARG_WITH(domainsocket, [  --with-domainsocket     set unix domain socket name
 
 if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then
        if test "x$default_domainsocket" = x; then
-               case "$uname" in
-                       Darwin*)
-                               # Darwin and MaxOS X do their own thing...
+               case "$host_os_name" in
+                       darwin*)
+                               # Darwin and macOS do their own thing...
                                CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
                                ;;
                        *)
@@ -88,7 +64,3 @@ fi
 
 AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
 AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
-
-dnl
-dnl End of "$Id: cups-network.m4 6049 2006-10-20 15:07:21Z mike $".
-dnl