"Fossies" - the Fresh Open Source Software Archive

Member "cups-2.3rc1/config-scripts/cups-network.m4" (21 May 2019, 2196 Bytes) of package /linux/misc/cups-2.3rc1-source.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "cups-network.m4": 2.2.11_vs_2.3b8.

    1 dnl
    2 dnl Networking stuff for CUPS.
    3 dnl
    4 dnl Copyright 2007-2016 by Apple Inc.
    5 dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
    6 dnl
    7 dnl Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
    8 dnl
    9 
   10 AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H),,[
   11 #include <sys/socket.h>
   12 #include <netinet/in.h>
   13 #include <arpa/inet.h>
   14 #include <netinet/in_systm.h>
   15 #include <netinet/ip.h>])
   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 AC_SEARCH_LIBS(__res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT),
   22     AC_SEARCH_LIBS(res_9_init, resolv bind, AC_DEFINE(HAVE_RES_INIT),
   23     AC_SEARCH_LIBS(res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT))))
   24 
   25 # Tru64 5.1b leaks file descriptors with these functions; disable until
   26 # we can come up with a test for this...
   27 if test "$host_os_name" != "osf1"; then
   28     AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
   29     AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
   30 fi
   31 
   32 AC_CHECK_MEMBER(struct sockaddr.sa_len,,, [#include <sys/socket.h>])
   33 AC_CHECK_HEADER(sys/sockio.h, AC_DEFINE(HAVE_SYS_SOCKIO_H))
   34 
   35 CUPS_DEFAULT_DOMAINSOCKET=""
   36 
   37 dnl Domain socket support...
   38 AC_ARG_WITH(domainsocket, [  --with-domainsocket     set unix domain socket name],
   39     default_domainsocket="$withval",
   40     default_domainsocket="")
   41 
   42 if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then
   43     if test "x$default_domainsocket" = x; then
   44         case "$host_os_name" in
   45             darwin*)
   46                 # Darwin and macOS do their own thing...
   47                 CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
   48                 ;;
   49             *)
   50                 # All others use FHS standard...
   51                 CUPS_DEFAULT_DOMAINSOCKET="$CUPS_STATEDIR/cups.sock"
   52                 ;;
   53         esac
   54     else
   55         CUPS_DEFAULT_DOMAINSOCKET="$default_domainsocket"
   56     fi
   57 
   58     CUPS_LISTEN_DOMAINSOCKET="Listen $CUPS_DEFAULT_DOMAINSOCKET"
   59 
   60     AC_DEFINE_UNQUOTED(CUPS_DEFAULT_DOMAINSOCKET, "$CUPS_DEFAULT_DOMAINSOCKET")
   61 else
   62     CUPS_LISTEN_DOMAINSOCKET=""
   63 fi
   64 
   65 AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
   66 AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)