2 dnl "$Id: cups-opsys.m4 4833 2005-11-12 21:46:52Z mike $"
4 dnl Operating system stuff for the Common UNIX Printing System (CUPS).
6 dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
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
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
20 dnl Voice: (301) 373-9600
21 dnl EMail: cups-info@cups.org
22 dnl WWW: http://www.cups.org
25 dnl Get the operating system and version number...
27 uversion=`uname -r | sed -e '1,$s/[[^0-9]]//g'`
40 dnl Determine the correct username and group for this OS...
41 AC_ARG_WITH(cups-user, [ --with-cups-user set default user for CUPS],
43 AC_MSG_CHECKING(for default print user)
44 if test -f /etc/passwd; then
46 for user in lp lpd guest daemon nobody; do
47 if test "`grep \^${user}: /etc/passwd`" != ""; then
54 if test x$CUPS_USER = x; then
55 CUPS_USER="${USER:=nobody}"
56 AC_MSG_RESULT(not found, using "$CUPS_USER")
59 CUPS_USER="${USER:=nobody}"
60 AC_MSG_RESULT(no password file, using "$CUPS_USER")
63 AC_ARG_WITH(cups-group, [ --with-cups-group set default group for CUPS],
64 CUPS_GROUP="$withval",
65 AC_MSG_CHECKING(for default print group)
66 if test -f /etc/group; then
67 if test x$uname = xDarwin; then
70 GROUP_LIST="lpadmin sys system root"
74 for group in $GROUP_LIST; do
75 if test "`grep \^${group}: /etc/group`" != ""; then
82 if test x$CUPS_GROUP = x; then
83 CUPS_GROUP="${GROUP:=nobody}"
84 AC_MSG_RESULT(not found, using "$CUPS_GROUP")
87 CUPS_GROUP="${GROUP:=nobody}"
88 AC_MSG_RESULT(no group file, using "$CUPS_GROUP")
94 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USER, "$CUPS_USER")
95 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GROUP, "$CUPS_GROUP")
98 dnl "$Id: cups-opsys.m4 4833 2005-11-12 21:46:52Z mike $"