- The `cupsfilter` command now shows error messages when options are used
incorrectly (Issue #88)
- Documentation fixes (Issue #92)
+- Removed support for the (long deprecated and unused) `FontPath`,
+ `LPDConfigFile`, `RIPCache`, and `SMBConfigFile` directives in `cupsd.conf`
+ and `cups-files.conf`.
CUPS v2.3.3op2 (February 1, 2021)
dnl
dnl Default cupsd configuration settings for CUPS.
dnl
+dnl Copyright © 2021 by OpenPrinting.
dnl Copyright © 2007-2018 by Apple Inc.
dnl Copyright © 2006-2007 by Easy Software Products, all rights reserved.
dnl
dnl
dnl Default languages...
-LANGUAGES="`ls -1 locale/cups_*.po 2>/dev/null | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' '`"
-
-AC_ARG_WITH(languages, [ --with-languages set installed languages, default=all ],[
- case "$withval" in
- none | no) LANGUAGES="" ;;
- all) ;;
- *) LANGUAGES="$withval" ;;
- esac])
-AC_SUBST(LANGUAGES)
+LANGUAGES="$(ls -1 locale/cups_*.po 2>/dev/null | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' ')"
+
+AC_ARG_WITH([languages], AS_HELP_STRING([--with-languages], [set installed languages, default=all]), [
+ AS_CASE(["$withval"], [none | no], [
+ LANGUAGES=""
+ ], [all], [
+ ], [*], [
+ LANGUAGES="$withval"
+ ])
+])
+AC_SUBST([LANGUAGES])
dnl macOS bundle-based localization support
-AC_ARG_WITH(bundledir, [ --with-bundledir set localization bundle directory ],
- CUPS_BUNDLEDIR="$withval",[
- if test "x$host_os_name" = xdarwin -a $host_os_version -ge 100; then
- CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
- LANGUAGES=""
- else
- CUPS_BUNDLEDIR=""
- fi])
-
-AC_SUBST(CUPS_BUNDLEDIR)
-if test "x$CUPS_BUNDLEDIR" != x; then
- AC_DEFINE_UNQUOTED(CUPS_BUNDLEDIR, "$CUPS_BUNDLEDIR")
-fi
-
-AC_ARG_WITH(bundlelang, [ --with-bundlelang set localization bundle base language (English or en) ],
- cups_bundlelang="$withval",[
- if test $host_os_version -ge 190; then
- cups_bundlelang="en"
- else
- cups_bundlelang="English"
- fi])
-
-if test "x$cups_bundlelang" != x -a "x$CUPS_BUNDLEDIR" != x; then
- CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/$cups_bundlelang.lproj"
-else
- CUPS_RESOURCEDIR=""
-fi
-AC_SUBST(CUPS_RESOURCEDIR)
+AC_ARG_WITH([bundledir], AS_HELP_STRING([--with-bundledir], [set localization bundle directory]), [
+ CUPS_BUNDLEDIR="$withval"
+], [
+ AS_IF([test "x$host_os_name" = xdarwin -a $host_os_version -ge 100], [
+ CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
+ LANGUAGES=""
+ ], [
+ CUPS_BUNDLEDIR=""
+ ])
+])
+
+AC_SUBST([CUPS_BUNDLEDIR])
+AS_IF([test "x$CUPS_BUNDLEDIR" != x], [
+ AC_DEFINE_UNQUOTED([CUPS_BUNDLEDIR], ["$CUPS_BUNDLEDIR"], [macOS bundle directory.])
+])
+
+AC_ARG_WITH([bundlelang], AS_HELP_STRING([--with-bundlelang], [set localization bundle base language (English or en)]), [
+ cups_bundlelang="$withval"
+], [
+ AS_IF([test $host_os_version -ge 190], [
+ cups_bundlelang="en"
+ ], [
+ cups_bundlelang="English"
+ ])
+])
+
+AS_IF([test "x$cups_bundlelang" != x -a "x$CUPS_BUNDLEDIR" != x], [
+ CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/$cups_bundlelang.lproj"
+], [
+ CUPS_RESOURCEDIR=""
+])
+AC_SUBST([CUPS_RESOURCEDIR])
dnl Default executable file permissions
-AC_ARG_WITH(exe_file_perm, [ --with-exe-file-perm set default executable permissions value, default=0555],
- CUPS_EXE_FILE_PERM="$withval",
- [case "$host_os_name" in
- linux* | gnu* | *-gnu)
- CUPS_EXE_FILE_PERM="755"
- ;;
- *)
- CUPS_EXE_FILE_PERM="555"
- ;;
- esac])
-AC_SUBST(CUPS_EXE_FILE_PERM)
+AC_ARG_WITH([exe_file_perm], AS_HELP_STRING([--with-exe-file-perm], [set default executable permissions value, default=0755]), [
+ CUPS_EXE_FILE_PERM="$withval"
+], [
+ CUPS_EXE_FILE_PERM="755"
+])
+AC_SUBST([CUPS_EXE_FILE_PERM])
dnl Default ConfigFilePerm
-AC_ARG_WITH(config_file_perm, [ --with-config-file-perm set default ConfigFilePerm value, default=0640],
- CUPS_CONFIG_FILE_PERM="$withval",
- [if test "x$host_os_name" = xdarwin; then
- CUPS_CONFIG_FILE_PERM="644"
- else
- CUPS_CONFIG_FILE_PERM="640"
- fi])
-AC_SUBST(CUPS_CONFIG_FILE_PERM)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_CONFIG_FILE_PERM, 0$CUPS_CONFIG_FILE_PERM)
+AC_ARG_WITH([config_file_perm], AS_HELP_STRING([--with-config-file-perm], [set default ConfigFilePerm value, default=0640]), [
+ CUPS_CONFIG_FILE_PERM="$withval"
+], [
+ CUPS_CONFIG_FILE_PERM="640"
+])
+AC_SUBST([CUPS_CONFIG_FILE_PERM])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_CONFIG_FILE_PERM], [0$CUPS_CONFIG_FILE_PERM], [Default ConfigFilePerm value.])
dnl Default permissions for cupsd
-AC_ARG_WITH(cupsd_file_perm, [ --with-cupsd-file-perm set default cupsd permissions, default=0500],
- CUPS_CUPSD_FILE_PERM="$withval",
- [case "$host_os_name" in
- linux* | gnu*)
- CUPS_CUPSD_FILE_PERM="700"
- ;;
- *)
- CUPS_CUPSD_FILE_PERM="500"
- ;;
- esac])
-AC_SUBST(CUPS_CUPSD_FILE_PERM)
+AC_ARG_WITH([cupsd_file_perm], AS_HELP_STRING([--with-cupsd-file-perm], [set default cupsd permissions, default=0700]), [
+ CUPS_CUPSD_FILE_PERM="$withval"
+], [
+ CUPS_CUPSD_FILE_PERM="700"
+])
+AC_SUBST([CUPS_CUPSD_FILE_PERM])
dnl Default LogFilePerm
-AC_ARG_WITH(log_file_perm, [ --with-log-file-perm set default LogFilePerm value, default=0644],
- CUPS_LOG_FILE_PERM="$withval",
- CUPS_LOG_FILE_PERM="644")
-AC_SUBST(CUPS_LOG_FILE_PERM)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LOG_FILE_PERM, 0$CUPS_LOG_FILE_PERM)
+AC_ARG_WITH([log_file_perm], AS_HELP_STRING([--with-log-file-perm], [set default LogFilePerm value, default=0644]), [
+ CUPS_LOG_FILE_PERM="$withval"
+], [
+ CUPS_LOG_FILE_PERM="644"
+])
+AC_SUBST([CUPS_LOG_FILE_PERM])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_LOG_FILE_PERM], [0$CUPS_LOG_FILE_PERM], [Default LogFilePerm value.])
dnl Default MaxLogSize
-AC_ARG_WITH(max_log_size, [ --with-max-log-size set default MaxLogSize value, default=1m],
- CUPS_MAX_LOG_SIZE="$withval",
- CUPS_MAX_LOG_SIZE="1m")
-AC_SUBST(CUPS_MAX_LOG_SIZE)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_MAX_LOG_SIZE, "$CUPS_MAX_LOG_SIZE")
+AC_ARG_WITH([max_log_size], AS_HELP_STRING([--with-max-log-size], [set default MaxLogSize value, default=1m]), [
+ CUPS_MAX_LOG_SIZE="$withval"
+], [
+ CUPS_MAX_LOG_SIZE="1m"
+])
+AC_SUBST([CUPS_MAX_LOG_SIZE])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_MAX_LOG_SIZE], ["$CUPS_MAX_LOG_SIZE"], [Default MaxLogSize value.])
dnl Default ErrorPolicy
-AC_ARG_WITH(error_policy, [ --with-error-policy set default ErrorPolicy value, default=stop-printer],
- CUPS_ERROR_POLICY="$withval",
- CUPS_ERROR_POLICY="stop-printer")
-AC_SUBST(CUPS_ERROR_POLICY)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_ERROR_POLICY, "$CUPS_ERROR_POLICY")
+AC_ARG_WITH([error_policy], AS_HELP_STRING([--with-error-policy], [set default ErrorPolicy value, default=stop-printer]), [
+ CUPS_ERROR_POLICY="$withval"
+], [
+ CUPS_ERROR_POLICY="stop-printer"
+])
+AC_SUBST([CUPS_ERROR_POLICY])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_ERROR_POLICY], ["$CUPS_ERROR_POLICY"], [Default ErrorPolicy value.])
dnl Default FatalErrors
-AC_ARG_WITH(fatal_errors, [ --with-fatal-errors set default FatalErrors value, default=config],
- CUPS_FATAL_ERRORS="$withval",
- CUPS_FATAL_ERRORS="config")
-AC_SUBST(CUPS_FATAL_ERRORS)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_FATAL_ERRORS, "$CUPS_FATAL_ERRORS")
+AC_ARG_WITH([fatal_errors], AS_HELP_STRING([--with-fatal-errors], [set default FatalErrors value, default=config]), [
+ CUPS_FATAL_ERRORS="$withval"
+], [
+ CUPS_FATAL_ERRORS="config"
+])
+AC_SUBST([CUPS_FATAL_ERRORS])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_FATAL_ERRORS], ["$CUPS_FATAL_ERRORS"], [Default FatalErrors value.])
dnl Default LogLevel
-AC_ARG_WITH(log_level, [ --with-log-level set default LogLevel value, default=warn],
- CUPS_LOG_LEVEL="$withval",
- CUPS_LOG_LEVEL="warn")
-AC_SUBST(CUPS_LOG_LEVEL)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LOG_LEVEL, "$CUPS_LOG_LEVEL")
+AC_ARG_WITH([log_level], AS_HELP_STRING([--with-log-level], [set default LogLevel value, default=warn]), [
+ CUPS_LOG_LEVEL="$withval"
+], [
+ CUPS_LOG_LEVEL="warn"
+])
+AC_SUBST([CUPS_LOG_LEVEL])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_LOG_LEVEL], ["$CUPS_LOG_LEVEL"], [Default LogLevel value.])
dnl Default AccessLogLevel
AC_ARG_WITH(access_log_level, [ --with-access-log-level set default AccessLogLevel value, default=none],
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_ACCESS_LOG_LEVEL, "$CUPS_ACCESS_LOG_LEVEL")
dnl Default PageLogFormat
-AC_ARG_ENABLE(page_logging, [ --enable-page-logging enable page_log by default])
-if test "x$enable_page_logging" = xyes; then
- CUPS_PAGE_LOG_FORMAT=""
-else
- CUPS_PAGE_LOG_FORMAT="PageLogFormat"
-fi
-AC_SUBST(CUPS_PAGE_LOG_FORMAT)
+AC_ARG_ENABLE([page_logging], AS_HELP_STRING([--enable-page-logging], [enable page_log by default]))
+AS_IF([test "x$enable_page_logging" = xyes], [
+ CUPS_PAGE_LOG_FORMAT=""
+], [
+ CUPS_PAGE_LOG_FORMAT="PageLogFormat"
+])
+AC_SUBST([CUPS_PAGE_LOG_FORMAT])
dnl Default SyncOnClose
-AC_ARG_ENABLE(sync_on_close, [ --enable-sync-on-close enable SyncOnClose (off by default)])
-if test "x$enable_sync_on_close" = xyes; then
- CUPS_SYNC_ON_CLOSE="Yes"
- AC_DEFINE(CUPS_DEFAULT_SYNC_ON_CLOSE)
-else
- CUPS_SYNC_ON_CLOSE="No"
-fi
-AC_SUBST(CUPS_SYNC_ON_CLOSE)
+AC_ARG_ENABLE([sync_on_close], AS_HELP_STRING([--enable-sync-on-close], [enable SyncOnClose (off by default)]))
+AS_IF([test "x$enable_sync_on_close" = xyes], [
+ CUPS_SYNC_ON_CLOSE="Yes"
+ AC_DEFINE([CUPS_DEFAULT_SYNC_ON_CLOSE], [1], [Enable SyncOnClose by default?])
+], [
+ CUPS_SYNC_ON_CLOSE="No"
+])
+AC_SUBST([CUPS_SYNC_ON_CLOSE])
dnl Default Browsing
-AC_ARG_ENABLE(browsing, [ --disable-browsing disable Browsing by default])
-if test "x$enable_browsing" = xno; then
- CUPS_BROWSING="No"
- AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSING, 0)
-else
- CUPS_BROWSING="Yes"
- AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSING, 1)
-fi
-AC_SUBST(CUPS_BROWSING)
+AC_ARG_ENABLE([browsing], AS_HELP_STRING([--disable-browsing], [disable Browsing by default]))
+AS_IF([test "x$enable_browsing" = xno], [
+ CUPS_BROWSING="No"
+ AC_DEFINE_UNQUOTED([CUPS_DEFAULT_BROWSING], [0], [Enable Browsing by default?])
+], [
+ CUPS_BROWSING="Yes"
+ AC_DEFINE_UNQUOTED([CUPS_DEFAULT_BROWSING], [1], [Enable Browsing by default?])
+])
+AC_SUBST([CUPS_BROWSING])
dnl Default BrowseLocalProtocols
-AC_ARG_WITH(local_protocols, [ --with-local-protocols set default BrowseLocalProtocols, default=""],
- default_local_protocols="$withval",
- default_local_protocols="default")
-
-if test x$with_local_protocols != xno; then
- if test "x$default_local_protocols" = "xdefault"; then
- if test "x$DNSSD_BACKEND" != "x"; then
- CUPS_BROWSE_LOCAL_PROTOCOLS="dnssd"
- else
- CUPS_BROWSE_LOCAL_PROTOCOLS=""
- fi
- else
- CUPS_BROWSE_LOCAL_PROTOCOLS="$default_local_protocols"
- fi
-else
- CUPS_BROWSE_LOCAL_PROTOCOLS=""
-fi
-
-AC_SUBST(CUPS_BROWSE_LOCAL_PROTOCOLS)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS,
- "$CUPS_BROWSE_LOCAL_PROTOCOLS")
+AC_ARG_WITH([local_protocols], AS_HELP_STRING([--with-local-protocols], [set default BrowseLocalProtocols, default=""]), [
+ default_local_protocols="$withval"
+], [
+ default_local_protocols="default"
+])
+
+AS_IF([test x$with_local_protocols != xno], [
+ AS_IF([test "x$default_local_protocols" = "xdefault"], [
+ AS_IF([test "x$DNSSD_BACKEND" != "x"], [
+ CUPS_BROWSE_LOCAL_PROTOCOLS="dnssd"
+ ], [
+ CUPS_BROWSE_LOCAL_PROTOCOLS=""
+ ])
+ ], [
+ CUPS_BROWSE_LOCAL_PROTOCOLS="$default_local_protocols"
+ ])
+], [
+ CUPS_BROWSE_LOCAL_PROTOCOLS=""
+])
+
+AC_SUBST([CUPS_BROWSE_LOCAL_PROTOCOLS])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS], ["$CUPS_BROWSE_LOCAL_PROTOCOLS"], [Default BrowseLocalProtocols value.])
dnl Default DefaultShared
-AC_ARG_ENABLE(default_shared, [ --disable-default-shared
- disable DefaultShared by default])
-if test "x$enable_default_shared" = xno; then
- CUPS_DEFAULT_SHARED="No"
- AC_DEFINE_UNQUOTED(CUPS_DEFAULT_DEFAULT_SHARED, 0)
-else
- CUPS_DEFAULT_SHARED="Yes"
- AC_DEFINE_UNQUOTED(CUPS_DEFAULT_DEFAULT_SHARED, 1)
-fi
-AC_SUBST(CUPS_DEFAULT_SHARED)
+AC_ARG_ENABLE([default_shared], AS_HELP_STRING([--disable-default-shared], [disable DefaultShared by default]))
+AS_IF([test "x$enable_default_shared" = xno], [
+ CUPS_DEFAULT_SHARED="No"
+ AC_DEFINE_UNQUOTED([CUPS_DEFAULT_DEFAULT_SHARED], [0], [Default DefaultShared value.])
+], [
+ CUPS_DEFAULT_SHARED="Yes"
+ AC_DEFINE_UNQUOTED([CUPS_DEFAULT_DEFAULT_SHARED], [1], [Default DefaultShared value.])
+])
+AC_SUBST([CUPS_DEFAULT_SHARED])
dnl Determine the correct username and group for this OS...
-AC_ARG_WITH(cups_user, [ --with-cups-user set default user for CUPS],
- CUPS_USER="$withval",
- AC_MSG_CHECKING(for default print user)
- if test x$host_os_name = xdarwin; then
- if test x`id -u _lp 2>/dev/null` = x; then
- CUPS_USER="lp";
- else
- CUPS_USER="_lp";
- fi
- AC_MSG_RESULT($CUPS_USER)
- elif test -f /etc/passwd; then
- CUPS_USER=""
- for user in lp lpd guest daemon nobody; do
- if test "`grep \^${user}: /etc/passwd`" != ""; then
- CUPS_USER="$user"
- AC_MSG_RESULT($user)
- break;
- fi
- done
-
- if test x$CUPS_USER = x; then
- CUPS_USER="nobody"
- AC_MSG_RESULT(not found, using "$CUPS_USER")
- fi
- else
- CUPS_USER="nobody"
- AC_MSG_RESULT(no password file, using "$CUPS_USER")
- fi)
-
-if test "x$CUPS_USER" = "xroot" -o "x$CUPS_USER" = "x0"; then
- AC_MSG_ERROR([The default user for CUPS cannot be root!])
-fi
-
-AC_ARG_WITH(cups_group, [ --with-cups-group set default group for CUPS],
- CUPS_GROUP="$withval",
- AC_MSG_CHECKING(for default print group)
- if test x$host_os_name = xdarwin; then
- if test x`id -g _lp 2>/dev/null` = x; then
- CUPS_GROUP="lp";
- else
- CUPS_GROUP="_lp";
- fi
- AC_MSG_RESULT($CUPS_GROUP)
- elif test -f /etc/group; then
- GROUP_LIST="_lp lp nobody"
- CUPS_GROUP=""
- for group in $GROUP_LIST; do
- if test "`grep \^${group}: /etc/group`" != ""; then
- CUPS_GROUP="$group"
- AC_MSG_RESULT($group)
- break;
- fi
- done
-
- if test x$CUPS_GROUP = x; then
- CUPS_GROUP="nobody"
- AC_MSG_RESULT(not found, using "$CUPS_GROUP")
- fi
- else
- CUPS_GROUP="nobody"
- AC_MSG_RESULT(no group file, using "$CUPS_GROUP")
- fi)
-
-if test "x$CUPS_GROUP" = "xroot" -o "x$CUPS_GROUP" = "xwheel" -o "x$CUPS_GROUP" = "x0"; then
- AC_MSG_ERROR([The default group for CUPS cannot be root!])
-fi
-
-AC_ARG_WITH(system_groups, [ --with-system-groups set default system groups for CUPS],
- CUPS_SYSTEM_GROUPS="$withval",
- if test x$host_os_name = xdarwin; then
- CUPS_SYSTEM_GROUPS="admin"
- else
- AC_MSG_CHECKING(for default system groups)
- if test -f /etc/group; then
- CUPS_SYSTEM_GROUPS=""
- GROUP_LIST="lpadmin sys system root wheel"
- for group in $GROUP_LIST; do
- if test "`grep \^${group}: /etc/group`" != ""; then
- if test "x$CUPS_SYSTEM_GROUPS" = x; then
- CUPS_SYSTEM_GROUPS="$group"
- else
- CUPS_SYSTEM_GROUPS="$CUPS_SYSTEM_GROUPS $group"
- fi
- fi
- done
-
- if test "x$CUPS_SYSTEM_GROUPS" = x; then
- CUPS_SYSTEM_GROUPS="$GROUP_LIST"
- AC_MSG_RESULT(no groups found, using "$CUPS_SYSTEM_GROUPS")
- else
- AC_MSG_RESULT("$CUPS_SYSTEM_GROUPS")
- fi
- else
- CUPS_SYSTEM_GROUPS="$GROUP_LIST"
- AC_MSG_RESULT(no group file, using "$CUPS_SYSTEM_GROUPS")
- fi
- fi)
-
-CUPS_PRIMARY_SYSTEM_GROUP="`echo $CUPS_SYSTEM_GROUPS | awk '{print $1}'`"
+AC_ARG_WITH([cups_user], AS_HELP_STRING([--with-cups-user], [set default user for CUPS]), [
+ CUPS_USER="$withval"
+], [
+ AC_MSG_CHECKING([for default print user])
+ AS_IF([test x$host_os_name = xdarwin], [
+ AS_IF([test "x$(id -u _lp 2>/dev/null)" = x], [
+ CUPS_USER="lp"
+ ], [
+ CUPS_USER="_lp"
+ ])
+ AC_MSG_RESULT([$CUPS_USER])
+ ], [test -f /etc/passwd], [
+ CUPS_USER=""
+ for user in lp lpd guest daemon nobody; do
+ AS_IF([test "$(grep \^${user}: /etc/passwd)" != ""], [
+ CUPS_USER="$user"
+ AC_MSG_RESULT([$user])
+ break
+ ])
+ done
+
+ AS_IF([test x$CUPS_USER = x], [
+ CUPS_USER="nobody"
+ AC_MSG_RESULT([not found, using "$CUPS_USER"])
+ ])
+ ], [
+ CUPS_USER="nobody"
+ AC_MSG_RESULT([no password file, using "$CUPS_USER"])
+ ])
+])
+
+AS_IF([test "x$CUPS_USER" = "xroot" -o "x$CUPS_USER" = "x0"], [
+ AC_MSG_ERROR([The default user for CUPS cannot be root.])
+])
+
+AC_ARG_WITH([cups_group], AS_HELP_STRING([--with-cups-group], [set default group for CUPS]), [
+ CUPS_GROUP="$withval"
+], [
+ AC_MSG_CHECKING([for default print group])
+ AS_IF([test x$host_os_name = xdarwin], [
+ AS_IF([test "x$(id -g _lp 2>/dev/null)" = x], [
+ CUPS_GROUP="lp"
+ ], [
+ CUPS_GROUP="_lp"
+ ])
+ AC_MSG_RESULT([$CUPS_GROUP])
+ ], [test -f /etc/group], [
+ GROUP_LIST="_lp lp nobody"
+ CUPS_GROUP=""
+ for group in $GROUP_LIST; do
+ AS_IF([test "$(grep \^${group}: /etc/group)" != ""], [
+ CUPS_GROUP="$group"
+ AC_MSG_RESULT([$group])
+ break
+ ])
+ done
+
+ AS_IF([test x$CUPS_GROUP = x], [
+ CUPS_GROUP="nobody"
+ AC_MSG_RESULT([not found, using "$CUPS_GROUP"])
+ ])
+ ], [
+ CUPS_GROUP="nobody"
+ AC_MSG_RESULT([no group file, using "$CUPS_GROUP"])
+ ])
+])
+
+AS_IF([test "x$CUPS_GROUP" = "xroot" -o "x$CUPS_GROUP" = "xwheel" -o "x$CUPS_GROUP" = "x0"], [
+ AC_MSG_ERROR([The default group for CUPS cannot be root.])
+])
+
+AC_ARG_WITH([system_groups], AS_HELP_STRING([--with-system-groups], [set default system groups for CUPS]), [
+ CUPS_SYSTEM_GROUPS="$withval"
+], [
+ AS_IF([test x$host_os_name = xdarwin], [
+ CUPS_SYSTEM_GROUPS="admin"
+ ], [
+ AC_MSG_CHECKING([for default system groups])
+ AS_IF([test -f /etc/group], [
+ CUPS_SYSTEM_GROUPS=""
+ GROUP_LIST="lpadmin sys system root wheel"
+ for group in $GROUP_LIST; do
+ AS_IF([test "$(grep \^${group}: /etc/group)" != ""], [
+ AS_IF([test "x$CUPS_SYSTEM_GROUPS" = x], [
+ CUPS_SYSTEM_GROUPS="$group"
+ ], [
+ CUPS_SYSTEM_GROUPS="$CUPS_SYSTEM_GROUPS $group"
+ ])
+ ])
+ done
+
+ AS_IF([test "x$CUPS_SYSTEM_GROUPS" = x], [
+ CUPS_SYSTEM_GROUPS="$GROUP_LIST"
+ AC_MSG_RESULT([no groups found, using "$CUPS_SYSTEM_GROUPS"])
+ ], [
+ AC_MSG_RESULT(["$CUPS_SYSTEM_GROUPS"])
+ ])
+ ], [
+ CUPS_SYSTEM_GROUPS="$GROUP_LIST"
+ AC_MSG_RESULT([no group file, using "$CUPS_SYSTEM_GROUPS"])
+ ])
+ ])
+])
+
+CUPS_PRIMARY_SYSTEM_GROUP="$(echo $CUPS_SYSTEM_GROUPS | awk '{print $1}')"
for group in $CUPS_SYSTEM_GROUPS; do
- if test "x$CUPS_GROUP" = "x$group"; then
- AC_MSG_ERROR([The default system groups cannot contain the default CUPS group!])
- fi
+ AS_IF([test "x$CUPS_GROUP" = "x$group"], [
+ AC_MSG_ERROR([The default system groups cannot contain the default CUPS group.])
+ ])
done
-AC_SUBST(CUPS_USER)
-AC_SUBST(CUPS_GROUP)
-AC_SUBST(CUPS_SYSTEM_GROUPS)
-AC_SUBST(CUPS_PRIMARY_SYSTEM_GROUP)
+AC_SUBST([CUPS_USER])
+AC_SUBST([CUPS_GROUP])
+AC_SUBST([CUPS_SYSTEM_GROUPS])
+AC_SUBST([CUPS_PRIMARY_SYSTEM_GROUP])
+
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_USER], ["$CUPS_USER"], [Default User value.])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_GROUP], ["$CUPS_GROUP"], [Default Group value.])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_SYSTEM_GROUPS], ["$CUPS_SYSTEM_GROUPS"], [Default SystemGroup value(s).])
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USER, "$CUPS_USER")
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GROUP, "$CUPS_GROUP")
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SYSTEM_GROUPS, "$CUPS_SYSTEM_GROUPS")
dnl Default printcap file...
-AC_ARG_WITH(printcap, [ --with-printcap set default printcap file],
- default_printcap="$withval",
- default_printcap="default")
-
-if test x$default_printcap != xno; then
- if test "x$default_printcap" = "xdefault"; then
- case $host_os_name in
- darwin*)
- if test $host_os_version -ge 90; then
- CUPS_DEFAULT_PRINTCAP="/Library/Preferences/org.cups.printers.plist"
- else
- CUPS_DEFAULT_PRINTCAP="/etc/printcap"
- fi
- ;;
- sunos*)
- CUPS_DEFAULT_PRINTCAP="/etc/printers.conf"
- ;;
- *)
- CUPS_DEFAULT_PRINTCAP="/etc/printcap"
- ;;
- esac
- else
- CUPS_DEFAULT_PRINTCAP="$default_printcap"
- fi
-else
- CUPS_DEFAULT_PRINTCAP=""
-fi
-
-AC_SUBST(CUPS_DEFAULT_PRINTCAP)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP")
-
-dnl Default LPD config file...
-AC_ARG_WITH(lpdconfigfile, [ --with-lpdconfigfile set default LPDConfigFile URI],
- default_lpdconfigfile="$withval",
- default_lpdconfigfile="default")
-
-if test x$default_lpdconfigfile != xno; then
- if test "x$default_lpdconfigfile" = "xdefault"; then
- case $host_os_name in
- darwin*)
- CUPS_DEFAULT_LPD_CONFIG_FILE="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
- ;;
- *)
- if test "x$XINETD" != x; then
- CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd://$XINETD/cups-lpd"
- else
- CUPS_DEFAULT_LPD_CONFIG_FILE=""
- fi
- ;;
- esac
- else
- CUPS_DEFAULT_LPD_CONFIG_FILE="$default_lpdconfigfile"
- fi
-else
- CUPS_DEFAULT_LPD_CONFIG_FILE=""
-fi
-
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG_FILE, "$CUPS_DEFAULT_LPD_CONFIG_FILE")
-AC_SUBST(CUPS_DEFAULT_LPD_CONFIG_FILE)
-
-dnl Default SMB config file...
-AC_ARG_WITH(smbconfigfile, [ --with-smbconfigfile set default SMBConfigFile URI],
- default_smbconfigfile="$withval",
- default_smbconfigfile="default")
-
-if test x$default_smbconfigfile != xno; then
- if test "x$default_smbconfigfile" = "xdefault"; then
- if test -f /etc/smb.conf; then
- CUPS_DEFAULT_SMB_CONFIG_FILE="samba:///etc/smb.conf"
- else
- CUPS_DEFAULT_SMB_CONFIG_FILE=""
- fi
- else
- CUPS_DEFAULT_SMB_CONFIG_FILE="$default_smbconfigfile"
- fi
-else
- CUPS_DEFAULT_SMB_CONFIG_FILE=""
-fi
-
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG_FILE, "$CUPS_DEFAULT_SMB_CONFIG_FILE")
-AC_SUBST(CUPS_DEFAULT_SMB_CONFIG_FILE)
+AC_ARG_WITH([printcap], AS_HELP_STRING([--with-printcap], [set default printcap file]), [
+ default_printcap="$withval"
+], [
+ default_printcap="default"
+])
+
+AS_IF([test x$default_printcap != xno], [
+ AS_IF([test "x$default_printcap" = "xdefault"], [
+ AS_CASE([$host_os_name], [darwin*], [
+ CUPS_DEFAULT_PRINTCAP="/Library/Preferences/org.cups.printers.plist"
+ ], [sunos*], [
+ CUPS_DEFAULT_PRINTCAP="/etc/printers.conf"
+ ], [*], [
+ CUPS_DEFAULT_PRINTCAP="/etc/printcap"
+ ])
+ ], [
+ CUPS_DEFAULT_PRINTCAP="$default_printcap"
+ ])
+], [
+ CUPS_DEFAULT_PRINTCAP=""
+])
+
+AC_SUBST([CUPS_DEFAULT_PRINTCAP])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_PRINTCAP], ["$CUPS_DEFAULT_PRINTCAP"], [Default Printcap value.])
dnl Default MaxCopies value...
-AC_ARG_WITH(max-copies, [ --with-max-copies set default max copies value, default=9999 ],
- CUPS_MAX_COPIES="$withval",
- CUPS_MAX_COPIES="9999")
+AC_ARG_WITH([max_copies], AS_HELP_STRING([--with-max-copies], [set default max copies value, default=9999]), [
+ CUPS_MAX_COPIES="$withval"
+], [
+ CUPS_MAX_COPIES="9999"
+])
-AC_SUBST(CUPS_MAX_COPIES)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_MAX_COPIES, $CUPS_MAX_COPIES)
+AC_SUBST([CUPS_MAX_COPIES])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_MAX_COPIES], [$CUPS_MAX_COPIES], [Default MaxCopies value.])
dnl Default raw printing state
-AC_ARG_ENABLE(raw_printing, [ --disable-raw-printing do not allow raw printing by default])
-if test "x$enable_raw_printing" != xno; then
- DEFAULT_RAW_PRINTING=""
-else
- DEFAULT_RAW_PRINTING="#"
-fi
-AC_SUBST(DEFAULT_RAW_PRINTING)
+AC_ARG_ENABLE([raw_printing], AS_HELP_STRING([--disable-raw-printing], [do not allow raw printing by default]))
+AS_IF([test "x$enable_raw_printing" != xno], [
+ DEFAULT_RAW_PRINTING=""
+], [
+ DEFAULT_RAW_PRINTING="#"
+])
+AC_SUBST([DEFAULT_RAW_PRINTING])
dnl Default SNMP options...
-AC_ARG_WITH(snmp-address, [ --with-snmp-address set SNMP query address, default=auto ],
- if test "x$withval" = x; then
- CUPS_SNMP_ADDRESS=""
- else
- CUPS_SNMP_ADDRESS="Address $withval"
- fi,
- if test "x$host_os_name" = xdarwin; then
- CUPS_SNMP_ADDRESS=""
- else
- CUPS_SNMP_ADDRESS="Address @LOCAL"
- fi)
-
-AC_ARG_WITH(snmp-community, [ --with-snmp-community set SNMP community, default=public ],
- CUPS_SNMP_COMMUNITY="Community $withval",
- CUPS_SNMP_COMMUNITY="Community public")
-
-AC_SUBST(CUPS_SNMP_ADDRESS)
-AC_SUBST(CUPS_SNMP_COMMUNITY)
+AC_ARG_WITH([snmp_address], AS_HELP_STRING([--with-snmp-address], [set SNMP query address, default=auto]), [
+ AS_IF([test "x$withval" = x], [
+ CUPS_SNMP_ADDRESS=""
+ ], [
+ CUPS_SNMP_ADDRESS="Address $withval"
+ ])
+], [
+ AS_IF([test "x$host_os_name" = xdarwin], [
+ CUPS_SNMP_ADDRESS=""
+ ], [
+ CUPS_SNMP_ADDRESS="Address @LOCAL"
+ ])
+])
+
+AC_ARG_WITH([snmp_community], AS_HELP_STRING([--with-snmp-community], [set SNMP community, default=public]), [
+ CUPS_SNMP_COMMUNITY="Community $withval"
+], [
+ CUPS_SNMP_COMMUNITY="Community public"
+])
+
+AC_SUBST([CUPS_SNMP_ADDRESS])
+AC_SUBST([CUPS_SNMP_COMMUNITY])
dnl New default port definition for IPP...
-AC_ARG_WITH(ipp-port, [ --with-ipp-port set port number for IPP, default=631 ],
- DEFAULT_IPP_PORT="$withval",
- DEFAULT_IPP_PORT="631")
+AC_ARG_WITH([ipp_port], AS_HELP_STRING([--with-ipp-port], [set port number for IPP, default=631]), [
+ DEFAULT_IPP_PORT="$withval"
+], [
+ DEFAULT_IPP_PORT="631"
+])
-AC_SUBST(DEFAULT_IPP_PORT)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
+AC_SUBST([DEFAULT_IPP_PORT])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_IPP_PORT], [$DEFAULT_IPP_PORT], [Default IPP port number.])
dnl Web interface...
-AC_ARG_ENABLE(webif, [ --enable-webif enable the web interface by default, default=no for macOS])
-case "x$enable_webif" in
- xno)
- CUPS_WEBIF=No
- CUPS_DEFAULT_WEBIF=0
- ;;
- xyes)
- CUPS_WEBIF=Yes
- CUPS_DEFAULT_WEBIF=1
- ;;
- *)
- if test $host_os_name = darwin; then
- CUPS_WEBIF=No
- CUPS_DEFAULT_WEBIF=0
- else
- CUPS_WEBIF=Yes
- CUPS_DEFAULT_WEBIF=1
- fi
- ;;
-esac
-
-AC_SUBST(CUPS_WEBIF)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
+AC_ARG_ENABLE([webif], AS_HELP_STRING([--enable-webif], [enable the web interface by default, default=no for macOS]))
+AS_CASE(["x$enable_webif"], [xno], [
+ CUPS_WEBIF=No
+ CUPS_DEFAULT_WEBIF=0
+], [xyes], [
+ CUPS_WEBIF=Yes
+ CUPS_DEFAULT_WEBIF=1
+], [*], [
+ AS_IF([test $host_os_name = darwin], [
+ CUPS_WEBIF=No
+ CUPS_DEFAULT_WEBIF=0
+ ], [
+ CUPS_WEBIF=Yes
+ CUPS_DEFAULT_WEBIF=1
+ ])
+])
+
+AC_SUBST([CUPS_WEBIF])
+AC_DEFINE_UNQUOTED([CUPS_DEFAULT_WEBIF], [$CUPS_DEFAULT_WEBIF], [Default WebInterface value.])
CUPS_SNMP_ADDRESS
DEFAULT_RAW_PRINTING
CUPS_MAX_COPIES
-CUPS_DEFAULT_SMB_CONFIG_FILE
-CUPS_DEFAULT_LPD_CONFIG_FILE
CUPS_DEFAULT_PRINTCAP
CUPS_PRIMARY_SYSTEM_GROUP
CUPS_SYSTEM_GROUPS
with_cups_group
with_system_groups
with_printcap
-with_lpdconfigfile
-with_smbconfigfile
with_max_copies
enable_raw_printing
with_snmp_address
--enable-sync-on-close enable SyncOnClose (off by default)
--disable-browsing disable Browsing by default
--disable-default-shared
- disable DefaultShared by default
+ disable DefaultShared by default
--disable-raw-printing do not allow raw printing by default
- --enable-webif enable the web interface by default, default=no for macOS
+ --enable-webif enable the web interface by default, default=no for
+ macOS
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--with-xinetd set path for xinetd config files
--with-languages set installed languages, default=all
--with-bundledir set localization bundle directory
- --with-bundlelang set localization bundle base language (English or en)
- --with-exe-file-perm set default executable permissions value, default=0555
+ --with-bundlelang set localization bundle base language (English or
+ en)
+ --with-exe-file-perm set default executable permissions value,
+ default=0755
--with-config-file-perm set default ConfigFilePerm value, default=0640
- --with-cupsd-file-perm set default cupsd permissions, default=0500
+ --with-cupsd-file-perm set default cupsd permissions, default=0700
--with-log-file-perm set default LogFilePerm value, default=0644
--with-max-log-size set default MaxLogSize value, default=1m
--with-error-policy set default ErrorPolicy value, default=stop-printer
--with-cups-group set default group for CUPS
--with-system-groups set default system groups for CUPS
--with-printcap set default printcap file
- --with-lpdconfigfile set default LPDConfigFile URI
- --with-smbconfigfile set default SMBConfigFile URI
--with-max-copies set default max copies value, default=9999
--with-snmp-address set SNMP query address, default=auto
--with-snmp-community set SNMP community, default=public
fi
-LANGUAGES="`ls -1 locale/cups_*.po 2>/dev/null | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' '`"
+LANGUAGES="$(ls -1 locale/cups_*.po 2>/dev/null | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' ')"
# Check whether --with-languages was given.
if test ${with_languages+y}
then :
withval=$with_languages;
- case "$withval" in
- none | no) LANGUAGES="" ;;
- all) ;;
- *) LANGUAGES="$withval" ;;
- esac
+ case "$withval" in #(
+ none | no) :
+
+ LANGUAGES=""
+ ;; #(
+ all) :
+
+ ;; #(
+ *) :
+
+ LANGUAGES="$withval"
+ ;; #(
+ *) :
+ ;;
+esac
+
fi
# Check whether --with-bundledir was given.
if test ${with_bundledir+y}
then :
- withval=$with_bundledir; CUPS_BUNDLEDIR="$withval"
+ withval=$with_bundledir;
+ CUPS_BUNDLEDIR="$withval"
+
else $as_nop
- if test "x$host_os_name" = xdarwin -a $host_os_version -ge 100; then
- CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
- LANGUAGES=""
- else
- CUPS_BUNDLEDIR=""
- fi
+ if test "x$host_os_name" = xdarwin -a $host_os_version -ge 100
+then :
+
+ CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
+ LANGUAGES=""
+
+else $as_nop
+
+ CUPS_BUNDLEDIR=""
+
+fi
+
fi
-if test "x$CUPS_BUNDLEDIR" != x; then
- printf "%s\n" "#define CUPS_BUNDLEDIR \"$CUPS_BUNDLEDIR\"" >>confdefs.h
+if test "x$CUPS_BUNDLEDIR" != x
+then :
+
+
+printf "%s\n" "#define CUPS_BUNDLEDIR \"$CUPS_BUNDLEDIR\"" >>confdefs.h
+
fi
# Check whether --with-bundlelang was given.
if test ${with_bundlelang+y}
then :
- withval=$with_bundlelang; cups_bundlelang="$withval"
+ withval=$with_bundlelang;
+ cups_bundlelang="$withval"
+
else $as_nop
- if test $host_os_version -ge 190; then
- cups_bundlelang="en"
- else
- cups_bundlelang="English"
- fi
+ if test $host_os_version -ge 190
+then :
+
+ cups_bundlelang="en"
+
+else $as_nop
+
+ cups_bundlelang="English"
+
fi
+fi
+
+
+if test "x$cups_bundlelang" != x -a "x$CUPS_BUNDLEDIR" != x
+then :
+
+ CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/$cups_bundlelang.lproj"
+
+else $as_nop
+
+ CUPS_RESOURCEDIR=""
-if test "x$cups_bundlelang" != x -a "x$CUPS_BUNDLEDIR" != x; then
- CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/$cups_bundlelang.lproj"
-else
- CUPS_RESOURCEDIR=""
fi
# Check whether --with-exe_file_perm was given.
if test ${with_exe_file_perm+y}
then :
- withval=$with_exe_file_perm; CUPS_EXE_FILE_PERM="$withval"
+ withval=$with_exe_file_perm;
+ CUPS_EXE_FILE_PERM="$withval"
+
else $as_nop
- case "$host_os_name" in
- linux* | gnu* | *-gnu)
- CUPS_EXE_FILE_PERM="755"
- ;;
- *)
- CUPS_EXE_FILE_PERM="555"
- ;;
- esac
+
+ CUPS_EXE_FILE_PERM="755"
+
fi
# Check whether --with-config_file_perm was given.
if test ${with_config_file_perm+y}
then :
- withval=$with_config_file_perm; CUPS_CONFIG_FILE_PERM="$withval"
+ withval=$with_config_file_perm;
+ CUPS_CONFIG_FILE_PERM="$withval"
+
else $as_nop
- if test "x$host_os_name" = xdarwin; then
- CUPS_CONFIG_FILE_PERM="644"
- else
- CUPS_CONFIG_FILE_PERM="640"
- fi
+
+ CUPS_CONFIG_FILE_PERM="640"
+
fi
+
printf "%s\n" "#define CUPS_DEFAULT_CONFIG_FILE_PERM 0$CUPS_CONFIG_FILE_PERM" >>confdefs.h
# Check whether --with-cupsd_file_perm was given.
if test ${with_cupsd_file_perm+y}
then :
- withval=$with_cupsd_file_perm; CUPS_CUPSD_FILE_PERM="$withval"
+ withval=$with_cupsd_file_perm;
+ CUPS_CUPSD_FILE_PERM="$withval"
+
else $as_nop
- case "$host_os_name" in
- linux* | gnu*)
- CUPS_CUPSD_FILE_PERM="700"
- ;;
- *)
- CUPS_CUPSD_FILE_PERM="500"
- ;;
- esac
+
+ CUPS_CUPSD_FILE_PERM="700"
+
fi
# Check whether --with-log_file_perm was given.
if test ${with_log_file_perm+y}
then :
- withval=$with_log_file_perm; CUPS_LOG_FILE_PERM="$withval"
+ withval=$with_log_file_perm;
+ CUPS_LOG_FILE_PERM="$withval"
+
else $as_nop
- CUPS_LOG_FILE_PERM="644"
+
+ CUPS_LOG_FILE_PERM="644"
+
fi
+
printf "%s\n" "#define CUPS_DEFAULT_LOG_FILE_PERM 0$CUPS_LOG_FILE_PERM" >>confdefs.h
# Check whether --with-max_log_size was given.
if test ${with_max_log_size+y}
then :
- withval=$with_max_log_size; CUPS_MAX_LOG_SIZE="$withval"
+ withval=$with_max_log_size;
+ CUPS_MAX_LOG_SIZE="$withval"
+
else $as_nop
- CUPS_MAX_LOG_SIZE="1m"
+
+ CUPS_MAX_LOG_SIZE="1m"
+
fi
+
printf "%s\n" "#define CUPS_DEFAULT_MAX_LOG_SIZE \"$CUPS_MAX_LOG_SIZE\"" >>confdefs.h
# Check whether --with-error_policy was given.
if test ${with_error_policy+y}
then :
- withval=$with_error_policy; CUPS_ERROR_POLICY="$withval"
+ withval=$with_error_policy;
+ CUPS_ERROR_POLICY="$withval"
+
else $as_nop
- CUPS_ERROR_POLICY="stop-printer"
+
+ CUPS_ERROR_POLICY="stop-printer"
+
fi
+
printf "%s\n" "#define CUPS_DEFAULT_ERROR_POLICY \"$CUPS_ERROR_POLICY\"" >>confdefs.h
# Check whether --with-fatal_errors was given.
if test ${with_fatal_errors+y}
then :
- withval=$with_fatal_errors; CUPS_FATAL_ERRORS="$withval"
+ withval=$with_fatal_errors;
+ CUPS_FATAL_ERRORS="$withval"
+
else $as_nop
- CUPS_FATAL_ERRORS="config"
+
+ CUPS_FATAL_ERRORS="config"
+
fi
+
printf "%s\n" "#define CUPS_DEFAULT_FATAL_ERRORS \"$CUPS_FATAL_ERRORS\"" >>confdefs.h
# Check whether --with-log_level was given.
if test ${with_log_level+y}
then :
- withval=$with_log_level; CUPS_LOG_LEVEL="$withval"
+ withval=$with_log_level;
+ CUPS_LOG_LEVEL="$withval"
+
else $as_nop
- CUPS_LOG_LEVEL="warn"
+
+ CUPS_LOG_LEVEL="warn"
+
fi
+
printf "%s\n" "#define CUPS_DEFAULT_LOG_LEVEL \"$CUPS_LOG_LEVEL\"" >>confdefs.h
enableval=$enable_page_logging;
fi
-if test "x$enable_page_logging" = xyes; then
- CUPS_PAGE_LOG_FORMAT=""
-else
- CUPS_PAGE_LOG_FORMAT="PageLogFormat"
+if test "x$enable_page_logging" = xyes
+then :
+
+ CUPS_PAGE_LOG_FORMAT=""
+
+else $as_nop
+
+ CUPS_PAGE_LOG_FORMAT="PageLogFormat"
+
fi
enableval=$enable_sync_on_close;
fi
-if test "x$enable_sync_on_close" = xyes; then
- CUPS_SYNC_ON_CLOSE="Yes"
- printf "%s\n" "#define CUPS_DEFAULT_SYNC_ON_CLOSE 1" >>confdefs.h
+if test "x$enable_sync_on_close" = xyes
+then :
+
+ CUPS_SYNC_ON_CLOSE="Yes"
+
+printf "%s\n" "#define CUPS_DEFAULT_SYNC_ON_CLOSE 1" >>confdefs.h
+
+
+else $as_nop
+
+ CUPS_SYNC_ON_CLOSE="No"
-else
- CUPS_SYNC_ON_CLOSE="No"
fi
enableval=$enable_browsing;
fi
-if test "x$enable_browsing" = xno; then
- CUPS_BROWSING="No"
- printf "%s\n" "#define CUPS_DEFAULT_BROWSING 0" >>confdefs.h
+if test "x$enable_browsing" = xno
+then :
+
+ CUPS_BROWSING="No"
+
+printf "%s\n" "#define CUPS_DEFAULT_BROWSING 0" >>confdefs.h
+
+
+else $as_nop
+
+ CUPS_BROWSING="Yes"
+
+printf "%s\n" "#define CUPS_DEFAULT_BROWSING 1" >>confdefs.h
-else
- CUPS_BROWSING="Yes"
- printf "%s\n" "#define CUPS_DEFAULT_BROWSING 1" >>confdefs.h
fi
# Check whether --with-local_protocols was given.
if test ${with_local_protocols+y}
then :
- withval=$with_local_protocols; default_local_protocols="$withval"
+ withval=$with_local_protocols;
+ default_local_protocols="$withval"
+
else $as_nop
- default_local_protocols="default"
+
+ default_local_protocols="default"
+
fi
-if test x$with_local_protocols != xno; then
- if test "x$default_local_protocols" = "xdefault"; then
- if test "x$DNSSD_BACKEND" != "x"; then
- CUPS_BROWSE_LOCAL_PROTOCOLS="dnssd"
- else
- CUPS_BROWSE_LOCAL_PROTOCOLS=""
- fi
- else
- CUPS_BROWSE_LOCAL_PROTOCOLS="$default_local_protocols"
- fi
-else
- CUPS_BROWSE_LOCAL_PROTOCOLS=""
+if test x$with_local_protocols != xno
+then :
+
+ if test "x$default_local_protocols" = "xdefault"
+then :
+
+ if test "x$DNSSD_BACKEND" != "x"
+then :
+
+ CUPS_BROWSE_LOCAL_PROTOCOLS="dnssd"
+
+else $as_nop
+
+ CUPS_BROWSE_LOCAL_PROTOCOLS=""
+
+fi
+
+else $as_nop
+
+ CUPS_BROWSE_LOCAL_PROTOCOLS="$default_local_protocols"
+
+fi
+
+else $as_nop
+
+ CUPS_BROWSE_LOCAL_PROTOCOLS=""
+
fi
+
printf "%s\n" "#define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS \"$CUPS_BROWSE_LOCAL_PROTOCOLS\"" >>confdefs.h
enableval=$enable_default_shared;
fi
-if test "x$enable_default_shared" = xno; then
- CUPS_DEFAULT_SHARED="No"
- printf "%s\n" "#define CUPS_DEFAULT_DEFAULT_SHARED 0" >>confdefs.h
+if test "x$enable_default_shared" = xno
+then :
+
+ CUPS_DEFAULT_SHARED="No"
+
+printf "%s\n" "#define CUPS_DEFAULT_DEFAULT_SHARED 0" >>confdefs.h
+
+
+else $as_nop
+
+ CUPS_DEFAULT_SHARED="Yes"
+
+printf "%s\n" "#define CUPS_DEFAULT_DEFAULT_SHARED 1" >>confdefs.h
-else
- CUPS_DEFAULT_SHARED="Yes"
- printf "%s\n" "#define CUPS_DEFAULT_DEFAULT_SHARED 1" >>confdefs.h
fi
# Check whether --with-cups_user was given.
if test ${with_cups_user+y}
then :
- withval=$with_cups_user; CUPS_USER="$withval"
+ withval=$with_cups_user;
+ CUPS_USER="$withval"
+
else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default print user" >&5
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default print user" >&5
printf %s "checking for default print user... " >&6; }
- if test x$host_os_name = xdarwin; then
- if test x`id -u _lp 2>/dev/null` = x; then
- CUPS_USER="lp";
- else
- CUPS_USER="_lp";
- fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUPS_USER" >&5
+ if test x$host_os_name = xdarwin
+then :
+
+ if test "x$(id -u _lp 2>/dev/null)" = x
+then :
+
+ CUPS_USER="lp"
+
+else $as_nop
+
+ CUPS_USER="_lp"
+
+fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUPS_USER" >&5
printf "%s\n" "$CUPS_USER" >&6; }
- elif test -f /etc/passwd; then
- CUPS_USER=""
- for user in lp lpd guest daemon nobody; do
- if test "`grep \^${user}: /etc/passwd`" != ""; then
- CUPS_USER="$user"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $user" >&5
+
+elif test -f /etc/passwd
+then :
+
+ CUPS_USER=""
+ for user in lp lpd guest daemon nobody; do
+ if test "$(grep \^${user}: /etc/passwd)" != ""
+then :
+
+ CUPS_USER="$user"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $user" >&5
printf "%s\n" "$user" >&6; }
- break;
- fi
- done
+ break
+
+fi
+ done
+
+ if test x$CUPS_USER = x
+then :
+
+ CUPS_USER="nobody"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found, using \"$CUPS_USER\"" >&5
+printf "%s\n" "not found, using \"$CUPS_USER\"" >&6; }
+
+fi
+
+else $as_nop
+
+ CUPS_USER="nobody"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no password file, using \"$CUPS_USER\"" >&5
+printf "%s\n" "no password file, using \"$CUPS_USER\"" >&6; }
+
+fi
- if test x$CUPS_USER = x; then
- CUPS_USER="nobody"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-printf "%s\n" "not found" >&6; }
- fi
- else
- CUPS_USER="nobody"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no password file" >&5
-printf "%s\n" "no password file" >&6; }
- fi
fi
-if test "x$CUPS_USER" = "xroot" -o "x$CUPS_USER" = "x0"; then
- as_fn_error $? "The default user for CUPS cannot be root!" "$LINENO" 5
+if test "x$CUPS_USER" = "xroot" -o "x$CUPS_USER" = "x0"
+then :
+
+ as_fn_error $? "The default user for CUPS cannot be root." "$LINENO" 5
+
fi
# Check whether --with-cups_group was given.
if test ${with_cups_group+y}
then :
- withval=$with_cups_group; CUPS_GROUP="$withval"
+ withval=$with_cups_group;
+ CUPS_GROUP="$withval"
+
else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default print group" >&5
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default print group" >&5
printf %s "checking for default print group... " >&6; }
- if test x$host_os_name = xdarwin; then
- if test x`id -g _lp 2>/dev/null` = x; then
- CUPS_GROUP="lp";
- else
- CUPS_GROUP="_lp";
- fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUPS_GROUP" >&5
+ if test x$host_os_name = xdarwin
+then :
+
+ if test "x$(id -g _lp 2>/dev/null)" = x
+then :
+
+ CUPS_GROUP="lp"
+
+else $as_nop
+
+ CUPS_GROUP="_lp"
+
+fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUPS_GROUP" >&5
printf "%s\n" "$CUPS_GROUP" >&6; }
- elif test -f /etc/group; then
- GROUP_LIST="_lp lp nobody"
- CUPS_GROUP=""
- for group in $GROUP_LIST; do
- if test "`grep \^${group}: /etc/group`" != ""; then
- CUPS_GROUP="$group"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $group" >&5
+
+elif test -f /etc/group
+then :
+
+ GROUP_LIST="_lp lp nobody"
+ CUPS_GROUP=""
+ for group in $GROUP_LIST; do
+ if test "$(grep \^${group}: /etc/group)" != ""
+then :
+
+ CUPS_GROUP="$group"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $group" >&5
printf "%s\n" "$group" >&6; }
- break;
- fi
- done
+ break
+
+fi
+ done
+
+ if test x$CUPS_GROUP = x
+then :
+
+ CUPS_GROUP="nobody"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found, using \"$CUPS_GROUP\"" >&5
+printf "%s\n" "not found, using \"$CUPS_GROUP\"" >&6; }
- if test x$CUPS_GROUP = x; then
- CUPS_GROUP="nobody"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-printf "%s\n" "not found" >&6; }
- fi
- else
- CUPS_GROUP="nobody"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no group file" >&5
-printf "%s\n" "no group file" >&6; }
- fi
fi
+else $as_nop
+
+ CUPS_GROUP="nobody"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no group file, using \"$CUPS_GROUP\"" >&5
+printf "%s\n" "no group file, using \"$CUPS_GROUP\"" >&6; }
+
+fi
+
+fi
+
+
+if test "x$CUPS_GROUP" = "xroot" -o "x$CUPS_GROUP" = "xwheel" -o "x$CUPS_GROUP" = "x0"
+then :
+
+ as_fn_error $? "The default group for CUPS cannot be root." "$LINENO" 5
-if test "x$CUPS_GROUP" = "xroot" -o "x$CUPS_GROUP" = "xwheel" -o "x$CUPS_GROUP" = "x0"; then
- as_fn_error $? "The default group for CUPS cannot be root!" "$LINENO" 5
fi
# Check whether --with-system_groups was given.
if test ${with_system_groups+y}
then :
- withval=$with_system_groups; CUPS_SYSTEM_GROUPS="$withval"
+ withval=$with_system_groups;
+ CUPS_SYSTEM_GROUPS="$withval"
+
+else $as_nop
+
+ if test x$host_os_name = xdarwin
+then :
+
+ CUPS_SYSTEM_GROUPS="admin"
+
else $as_nop
- if test x$host_os_name = xdarwin; then
- CUPS_SYSTEM_GROUPS="admin"
- else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default system groups" >&5
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default system groups" >&5
printf %s "checking for default system groups... " >&6; }
- if test -f /etc/group; then
- CUPS_SYSTEM_GROUPS=""
- GROUP_LIST="lpadmin sys system root wheel"
- for group in $GROUP_LIST; do
- if test "`grep \^${group}: /etc/group`" != ""; then
- if test "x$CUPS_SYSTEM_GROUPS" = x; then
- CUPS_SYSTEM_GROUPS="$group"
- else
- CUPS_SYSTEM_GROUPS="$CUPS_SYSTEM_GROUPS $group"
- fi
- fi
- done
+ if test -f /etc/group
+then :
- if test "x$CUPS_SYSTEM_GROUPS" = x; then
- CUPS_SYSTEM_GROUPS="$GROUP_LIST"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no groups found" >&5
-printf "%s\n" "no groups found" >&6; }
- else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$CUPS_SYSTEM_GROUPS\"" >&5
+ CUPS_SYSTEM_GROUPS=""
+ GROUP_LIST="lpadmin sys system root wheel"
+ for group in $GROUP_LIST; do
+ if test "$(grep \^${group}: /etc/group)" != ""
+then :
+
+ if test "x$CUPS_SYSTEM_GROUPS" = x
+then :
+
+ CUPS_SYSTEM_GROUPS="$group"
+
+else $as_nop
+
+ CUPS_SYSTEM_GROUPS="$CUPS_SYSTEM_GROUPS $group"
+
+fi
+
+fi
+ done
+
+ if test "x$CUPS_SYSTEM_GROUPS" = x
+then :
+
+ CUPS_SYSTEM_GROUPS="$GROUP_LIST"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no groups found, using \"$CUPS_SYSTEM_GROUPS\"" >&5
+printf "%s\n" "no groups found, using \"$CUPS_SYSTEM_GROUPS\"" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$CUPS_SYSTEM_GROUPS\"" >&5
printf "%s\n" "\"$CUPS_SYSTEM_GROUPS\"" >&6; }
- fi
- else
- CUPS_SYSTEM_GROUPS="$GROUP_LIST"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no group file" >&5
-printf "%s\n" "no group file" >&6; }
- fi
- fi
+
+fi
+
+else $as_nop
+
+ CUPS_SYSTEM_GROUPS="$GROUP_LIST"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no group file, using \"$CUPS_SYSTEM_GROUPS\"" >&5
+printf "%s\n" "no group file, using \"$CUPS_SYSTEM_GROUPS\"" >&6; }
+
+fi
+
+fi
+
fi
-CUPS_PRIMARY_SYSTEM_GROUP="`echo $CUPS_SYSTEM_GROUPS | awk '{print $1}'`"
+CUPS_PRIMARY_SYSTEM_GROUP="$(echo $CUPS_SYSTEM_GROUPS | awk '{print $1}')"
for group in $CUPS_SYSTEM_GROUPS; do
- if test "x$CUPS_GROUP" = "x$group"; then
- as_fn_error $? "The default system groups cannot contain the default CUPS group!" "$LINENO" 5
- fi
+ if test "x$CUPS_GROUP" = "x$group"
+then :
+
+ as_fn_error $? "The default system groups cannot contain the default CUPS group." "$LINENO" 5
+
+fi
done
+
printf "%s\n" "#define CUPS_DEFAULT_USER \"$CUPS_USER\"" >>confdefs.h
+
printf "%s\n" "#define CUPS_DEFAULT_GROUP \"$CUPS_GROUP\"" >>confdefs.h
+
printf "%s\n" "#define CUPS_DEFAULT_SYSTEM_GROUPS \"$CUPS_SYSTEM_GROUPS\"" >>confdefs.h
+
# Check whether --with-printcap was given.
if test ${with_printcap+y}
then :
- withval=$with_printcap; default_printcap="$withval"
+ withval=$with_printcap;
+ default_printcap="$withval"
+
else $as_nop
- default_printcap="default"
-fi
+ default_printcap="default"
-if test x$default_printcap != xno; then
- if test "x$default_printcap" = "xdefault"; then
- case $host_os_name in
- darwin*)
- if test $host_os_version -ge 90; then
- CUPS_DEFAULT_PRINTCAP="/Library/Preferences/org.cups.printers.plist"
- else
- CUPS_DEFAULT_PRINTCAP="/etc/printcap"
- fi
- ;;
- sunos*)
- CUPS_DEFAULT_PRINTCAP="/etc/printers.conf"
- ;;
- *)
- CUPS_DEFAULT_PRINTCAP="/etc/printcap"
- ;;
- esac
- else
- CUPS_DEFAULT_PRINTCAP="$default_printcap"
- fi
-else
- CUPS_DEFAULT_PRINTCAP=""
fi
-printf "%s\n" "#define CUPS_DEFAULT_PRINTCAP \"$CUPS_DEFAULT_PRINTCAP\"" >>confdefs.h
-
-
+if test x$default_printcap != xno
+then :
-# Check whether --with-lpdconfigfile was given.
-if test ${with_lpdconfigfile+y}
+ if test "x$default_printcap" = "xdefault"
then :
- withval=$with_lpdconfigfile; default_lpdconfigfile="$withval"
-else $as_nop
- default_lpdconfigfile="default"
-fi
+ case $host_os_name in #(
+ darwin*) :
-if test x$default_lpdconfigfile != xno; then
- if test "x$default_lpdconfigfile" = "xdefault"; then
- case $host_os_name in
- darwin*)
- CUPS_DEFAULT_LPD_CONFIG_FILE="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
- ;;
- *)
- if test "x$XINETD" != x; then
- CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd://$XINETD/cups-lpd"
- else
- CUPS_DEFAULT_LPD_CONFIG_FILE=""
- fi
- ;;
- esac
- else
- CUPS_DEFAULT_LPD_CONFIG_FILE="$default_lpdconfigfile"
- fi
-else
- CUPS_DEFAULT_LPD_CONFIG_FILE=""
-fi
+ CUPS_DEFAULT_PRINTCAP="/Library/Preferences/org.cups.printers.plist"
+ ;; #(
+ sunos*) :
-printf "%s\n" "#define CUPS_DEFAULT_LPD_CONFIG_FILE \"$CUPS_DEFAULT_LPD_CONFIG_FILE\"" >>confdefs.h
+ CUPS_DEFAULT_PRINTCAP="/etc/printers.conf"
+ ;; #(
+ *) :
+ CUPS_DEFAULT_PRINTCAP="/etc/printcap"
+ ;; #(
+ *) :
+ ;;
+esac
+else $as_nop
+ CUPS_DEFAULT_PRINTCAP="$default_printcap"
-# Check whether --with-smbconfigfile was given.
-if test ${with_smbconfigfile+y}
-then :
- withval=$with_smbconfigfile; default_smbconfigfile="$withval"
-else $as_nop
- default_smbconfigfile="default"
fi
+else $as_nop
+
+ CUPS_DEFAULT_PRINTCAP=""
-if test x$default_smbconfigfile != xno; then
- if test "x$default_smbconfigfile" = "xdefault"; then
- if test -f /etc/smb.conf; then
- CUPS_DEFAULT_SMB_CONFIG_FILE="samba:///etc/smb.conf"
- else
- CUPS_DEFAULT_SMB_CONFIG_FILE=""
- fi
- else
- CUPS_DEFAULT_SMB_CONFIG_FILE="$default_smbconfigfile"
- fi
-else
- CUPS_DEFAULT_SMB_CONFIG_FILE=""
fi
-printf "%s\n" "#define CUPS_DEFAULT_SMB_CONFIG_FILE \"$CUPS_DEFAULT_SMB_CONFIG_FILE\"" >>confdefs.h
+printf "%s\n" "#define CUPS_DEFAULT_PRINTCAP \"$CUPS_DEFAULT_PRINTCAP\"" >>confdefs.h
+
-# Check whether --with-max-copies was given.
+# Check whether --with-max_copies was given.
if test ${with_max_copies+y}
then :
- withval=$with_max_copies; CUPS_MAX_COPIES="$withval"
+ withval=$with_max_copies;
+ CUPS_MAX_COPIES="$withval"
+
else $as_nop
- CUPS_MAX_COPIES="9999"
+
+ CUPS_MAX_COPIES="9999"
+
fi
+
printf "%s\n" "#define CUPS_DEFAULT_MAX_COPIES $CUPS_MAX_COPIES" >>confdefs.h
enableval=$enable_raw_printing;
fi
-if test "x$enable_raw_printing" != xno; then
- DEFAULT_RAW_PRINTING=""
-else
- DEFAULT_RAW_PRINTING="#"
+if test "x$enable_raw_printing" != xno
+then :
+
+ DEFAULT_RAW_PRINTING=""
+
+else $as_nop
+
+ DEFAULT_RAW_PRINTING="#"
+
fi
-# Check whether --with-snmp-address was given.
+# Check whether --with-snmp_address was given.
if test ${with_snmp_address+y}
then :
- withval=$with_snmp_address; if test "x$withval" = x; then
- CUPS_SNMP_ADDRESS=""
- else
- CUPS_SNMP_ADDRESS="Address $withval"
- fi
+ withval=$with_snmp_address;
+ if test "x$withval" = x
+then :
+
+ CUPS_SNMP_ADDRESS=""
+
else $as_nop
- if test "x$host_os_name" = xdarwin; then
- CUPS_SNMP_ADDRESS=""
- else
- CUPS_SNMP_ADDRESS="Address @LOCAL"
- fi
+
+ CUPS_SNMP_ADDRESS="Address $withval"
+
fi
+else $as_nop
+
+ if test "x$host_os_name" = xdarwin
+then :
+
+ CUPS_SNMP_ADDRESS=""
+
+else $as_nop
+ CUPS_SNMP_ADDRESS="Address @LOCAL"
-# Check whether --with-snmp-community was given.
+fi
+
+fi
+
+
+
+# Check whether --with-snmp_community was given.
if test ${with_snmp_community+y}
then :
- withval=$with_snmp_community; CUPS_SNMP_COMMUNITY="Community $withval"
+ withval=$with_snmp_community;
+ CUPS_SNMP_COMMUNITY="Community $withval"
+
else $as_nop
- CUPS_SNMP_COMMUNITY="Community public"
+
+ CUPS_SNMP_COMMUNITY="Community public"
+
fi
-# Check whether --with-ipp-port was given.
+# Check whether --with-ipp_port was given.
if test ${with_ipp_port+y}
then :
- withval=$with_ipp_port; DEFAULT_IPP_PORT="$withval"
+ withval=$with_ipp_port;
+ DEFAULT_IPP_PORT="$withval"
+
else $as_nop
- DEFAULT_IPP_PORT="631"
+
+ DEFAULT_IPP_PORT="631"
+
fi
+
printf "%s\n" "#define CUPS_DEFAULT_IPP_PORT $DEFAULT_IPP_PORT" >>confdefs.h
enableval=$enable_webif;
fi
-case "x$enable_webif" in
- xno)
- CUPS_WEBIF=No
- CUPS_DEFAULT_WEBIF=0
- ;;
- xyes)
- CUPS_WEBIF=Yes
- CUPS_DEFAULT_WEBIF=1
- ;;
- *)
- if test $host_os_name = darwin; then
- CUPS_WEBIF=No
- CUPS_DEFAULT_WEBIF=0
- else
- CUPS_WEBIF=Yes
- CUPS_DEFAULT_WEBIF=1
- fi
- ;;
+case "x$enable_webif" in #(
+ xno) :
+
+ CUPS_WEBIF=No
+ CUPS_DEFAULT_WEBIF=0
+ ;; #(
+ xyes) :
+
+ CUPS_WEBIF=Yes
+ CUPS_DEFAULT_WEBIF=1
+ ;; #(
+ *) :
+
+ if test $host_os_name = darwin
+then :
+
+ CUPS_WEBIF=No
+ CUPS_DEFAULT_WEBIF=0
+
+else $as_nop
+
+ CUPS_WEBIF=Yes
+ CUPS_DEFAULT_WEBIF=1
+
+fi
+ ;; #(
+ *) :
+ ;;
esac
+
printf "%s\n" "#define CUPS_DEFAULT_WEBIF $CUPS_DEFAULT_WEBIF" >>confdefs.h
File devices cannot be used with "raw" print queues - a PPD file is required.
The specified file is overwritten for every print job.
Writing to directories is not supported.
-<dt><a name="FontPath"></a><b>FontPath </b><i>directory[:...:directoryN]</i>
-<dd style="margin-left: 5.0em">Specifies a colon separated list of directories where fonts can be found.
-On Linux the
-<b>font-config</b>(1)
-mechanism is used instead.
-On macOS the Font Book application manages system-installed fonts.
-<dt><a name="LPDConfigFile"></a><b> LPDConfigFile </b><i>filename</i>
-<dd style="margin-left: 5.0em">Specifies the LPD service configuration file to update.
<dt><a name="Printcap"></a><b>Printcap </b><i>filename</i>
<dd style="margin-left: 5.0em">Specifies a file that is filled with a list of local print queues.
<dt><a name="PrintcapFormat"></a><b>PrintcapFormat bsd</b>
"bsd" is the historical LPD printcap file format.
"plist" is the Apple plist file format.
"solaris" is the historical Solaris LPD printcap file format.
-<dt><a name="SMBConfigFile"></a><b>SMBConfigFile </b><i>filename</i>
-<dd style="margin-left: 5.0em">Specifies the SMB service configuration file to update.
</dl>
<h2 class="title"><a name="NOTES">Notes</a></h2>
The scheduler MUST be restarted manually after making changes to the <b>cups-files.conf</b> file.
<b>subscriptions.conf</b>(5),
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2020 by Michael R Sweet
-<br>
-Copyright © 2021 by OpenPrinting.
+Copyright © 2020-2021 by OpenPrinting.
</body>
</html>
CUPS Online Help (<a href="http://localhost:631/help)">http://localhost:631/help)</a>,
RFC 2569
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2020 by Michael R Sweet
-Copyright © 2021 by OpenPrinting.
+Copyright © 2020-2021 by OpenPrinting.
</body>
</html>
The default is the empty string, which disables page logging.
The string "%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}" creates a page log with the standard items.
Use "%{job-impressions-completed}" to insert the number of pages (sides) that were printed, or "%{job-media-sheets-completed}" to insert the number of sheets that were printed.
-<dt><a name="RIPCache"></a><b>RIPCache </b><i>size</i>
-<dd style="margin-left: 5.0em">Specifies the maximum amount of memory to use when converting documents into bitmaps for a printer.
-The default is "128m".
</dl>
<h2 class="title"><a name="NOTES">Notes</a></h2>
File, directory, and user configuration directives that used to be allowed in the <b>cupsd.conf</b> file are now stored in the
<b>subscriptions.conf</b>(5),
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2020 by Michael R Sweet
-<br>
-Copyright © 2021 by OpenPrinting.
+Copyright © 2020-2021 by OpenPrinting.
</body>
</html>
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH cups-files.conf 5 "CUPS" "2021-02-28" "OpenPrinting"
+.TH cups-files.conf 5 "CUPS" "2021-03-06" "OpenPrinting"
.SH NAME
cups\-files.conf \- file and directory configuration file for cups
.SH DESCRIPTION
File devices cannot be used with "raw" print queues - a PPD file is required.
The specified file is overwritten for every print job.
Writing to directories is not supported.
-.\"#FontPath
-.TP 5
-\fBFontPath \fIdirectory[:...:directoryN]\fR
-Specifies a colon separated list of directories where fonts can be found.
-On Linux the
-.BR font-config (1)
-mechanism is used instead.
-On macOS the Font Book application manages system-installed fonts.
-.\"#LPDConfigFile
-.TP 5
-\fB LPDConfigFile \fIfilename\fR
-Specifies the LPD service configuration file to update.
.\"#Printcap
.TP 5
\fBPrintcap \fIfilename\fR
"bsd" is the historical LPD printcap file format.
"plist" is the Apple plist file format.
"solaris" is the historical Solaris LPD printcap file format.
-.\"#SMBConfigFile
-.TP 5
-\fBSMBConfigFile \fIfilename\fR
-Specifies the SMB service configuration file to update.
.SH NOTES
The scheduler MUST be restarted manually after making changes to the \fBcups-files.conf\fR file.
On Linux this is typically done using the
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH cupsd.conf 5 "CUPS" "2021-02-28" "OpenPrinting"
+.TH cupsd.conf 5 "CUPS" "2021-03-06" "OpenPrinting"
.SH NAME
cupsd.conf \- server configuration file for cups
.SH DESCRIPTION
The default is the empty string, which disables page logging.
The string "%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}" creates a page log with the standard items.
Use "%{job-impressions-completed}" to insert the number of pages (sides) that were printed, or "%{job-media-sheets-completed}" to insert the number of sheets that were printed.
-.\"#RIPCache
-.TP 5
-\fBRIPCache \fIsize\fR
-Specifies the maximum amount of memory to use when converting documents into bitmaps for a printer.
-The default is "128m".
.SH NOTES
File, directory, and user configuration directives that used to be allowed in the \fBcupsd.conf\fR file are now stored in the
.BR cups-files.conf (5)
/*
* Configuration routines for the CUPS scheduler.
*
+ * Copyright © 2021 by OpenPrinting.
* Copyright © 2007-2018 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
*
{ "PreserveJobFiles", &JobFiles, CUPSD_VARTYPE_TIME },
{ "PreserveJobHistory", &JobHistory, CUPSD_VARTYPE_TIME },
{ "ReloadTimeout", &ReloadTimeout, CUPSD_VARTYPE_TIME },
- { "RIPCache", &RIPCache, CUPSD_VARTYPE_STRING },
{ "RootCertDuration", &RootCertDuration, CUPSD_VARTYPE_TIME },
{ "ServerAdmin", &ServerAdmin, CUPSD_VARTYPE_STRING },
{ "ServerName", &ServerName, CUPSD_VARTYPE_STRING },
{ "DocumentRoot", &DocumentRoot, CUPSD_VARTYPE_STRING },
{ "ErrorLog", &ErrorLog, CUPSD_VARTYPE_STRING },
{ "FileDevice", &FileDevice, CUPSD_VARTYPE_BOOLEAN },
- { "FontPath", &FontPath, CUPSD_VARTYPE_STRING },
{ "LogFilePerm", &LogFilePerm, CUPSD_VARTYPE_PERM },
- { "LPDConfigFile", &LPDConfigFile, CUPSD_VARTYPE_STRING },
{ "PageLog", &PageLog, CUPSD_VARTYPE_STRING },
{ "Printcap", &Printcap, CUPSD_VARTYPE_STRING },
{ "RemoteRoot", &RemoteRoot, CUPSD_VARTYPE_STRING },
{ "ServerKeychain", &ServerKeychain, CUPSD_VARTYPE_PATHNAME },
#endif /* HAVE_SSL */
{ "ServerRoot", &ServerRoot, CUPSD_VARTYPE_PATHNAME },
- { "SMBConfigFile", &SMBConfigFile, CUPSD_VARTYPE_STRING },
{ "StateDir", &StateDir, CUPSD_VARTYPE_STRING },
{ "SyncOnClose", &SyncOnClose, CUPSD_VARTYPE_BOOLEAN },
#ifdef HAVE_AUTHORIZATION_H
"%p %u %j %T %P %C %{job-billing} "
"%{job-originating-host-name} %{job-name} %{media} %{sides}");
cupsdSetString(&Printcap, CUPS_DEFAULT_PRINTCAP);
- cupsdSetString(&FontPath, CUPS_FONTPATH);
cupsdSetString(&RemoteRoot, "remroot");
cupsdSetStringf(&ServerHeader, "CUPS/%d.%d IPP/2.1", CUPS_VERSION_MAJOR,
CUPS_VERSION_MINOR);
cupsdClearString(&DefaultPaperSize);
- cupsdSetString(&RIPCache, "128m");
-
cupsdSetString(&TempDir, NULL);
#ifdef HAVE_GSSAPI
cupsdClearString(&DNSSDHostName);
#endif /* HAVE_DNSSD || HAVE_AVAHI */
- cupsdSetString(&LPDConfigFile, CUPS_DEFAULT_LPD_CONFIG_FILE);
- cupsdSetString(&SMBConfigFile, CUPS_DEFAULT_SMB_CONFIG_FILE);
-
cupsdSetString(&ErrorPolicy, CUPS_DEFAULT_ERROR_POLICY);
JobHistory = DEFAULT_HISTORY;
!_cups_strcasecmp(line, "ErrorLog") ||
!_cups_strcasecmp(line, "FatalErrors") ||
!_cups_strcasecmp(line, "FileDevice") ||
- !_cups_strcasecmp(line, "FontPath") ||
!_cups_strcasecmp(line, "Group") ||
!_cups_strcasecmp(line, "LogFilePerm") ||
- !_cups_strcasecmp(line, "LPDConfigFile") ||
!_cups_strcasecmp(line, "PageLog") ||
!_cups_strcasecmp(line, "PassEnv") ||
!_cups_strcasecmp(line, "Printcap") ||
!_cups_strcasecmp(line, "ServerKeychain") ||
!_cups_strcasecmp(line, "ServerRoot") ||
!_cups_strcasecmp(line, "SetEnv") ||
- !_cups_strcasecmp(line, "SMBConfigFile") ||
!_cups_strcasecmp(line, "StateDir") ||
!_cups_strcasecmp(line, "SystemGroup") ||
!_cups_strcasecmp(line, "SystemGroupAuthKey") ||
/*
* Configuration file definitions for the CUPS scheduler.
*
+ * Copyright © 2021 by OpenPrinting.
* Copyright © 2007-2018 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
*
/* Default paper size */
*ErrorPolicy VALUE(NULL),
/* Default printer-error-policy */
- *RIPCache VALUE(NULL),
- /* Amount of memory for RIPs */
*TempDir VALUE(NULL),
/* Temporary directory */
*Printcap VALUE(NULL),
/* Printcap file */
- *FontPath VALUE(NULL),
- /* Font search path */
*RemoteRoot VALUE(NULL),
/* Remote root user */
*Classification VALUE(NULL);
*/
static char *DataDir = NULL;/* CUPS_DATADIR environment variable */
-static char *FontPath = NULL;
- /* CUPS_FONTPATH environment variable */
static mime_filter_t GZIPFilter = /* gziptoany filter */
{
NULL, /* Source type */
/* CUPS_SERVERBIN environment variable */
static char *ServerRoot = NULL;
/* CUPS_SERVERROOT environment variable */
-static char *RIPCache = NULL;
- /* RIP_MAX_CACHE environment variable */
static char TempFile[1024] = "";
/* Temporary file */
snprintf(content_type, sizeof(content_type), "CONTENT_TYPE=%s/%s",
srctype->super, srctype->type);
snprintf(cups_datadir, sizeof(cups_datadir), "CUPS_DATADIR=%s", DataDir);
- snprintf(cups_fontpath, sizeof(cups_fontpath), "CUPS_FONTPATH=%s", FontPath);
snprintf(cups_serverbin, sizeof(cups_serverbin), "CUPS_SERVERBIN=%s",
ServerBin);
snprintf(cups_serverroot, sizeof(cups_serverroot), "CUPS_SERVERROOT=%s",
#else
snprintf(ppd, sizeof(ppd), "PPD=%s/model/laserjet.ppd", DataDir);
#endif /* __APPLE__ */
- snprintf(rip_max_cache, sizeof(rip_max_cache), "RIP_MAX_CACHE=%s", RIPCache);
snprintf(userenv, sizeof(userenv), "USER=%s", user);
if (printer &&
else
set_string(&DataDir, CUPS_DATADIR);
- if ((temp = getenv("CUPS_FONTPATH")) != NULL)
- set_string(&FontPath, temp);
- else
- set_string(&FontPath, CUPS_FONTPATH);
-
- set_string(&RIPCache, "128m");
-
if ((temp = getenv("CUPS_SERVERBIN")) != NULL)
set_string(&ServerBin, temp);
else
{
if (!_cups_strcasecmp(line, "DataDir"))
set_string(&DataDir, ptr);
- else if (!_cups_strcasecmp(line, "FontPath"))
- set_string(&FontPath, ptr);
- else if (!_cups_strcasecmp(line, "RIPCache"))
- set_string(&RIPCache, ptr);
else if (!_cups_strcasecmp(line, "ServerBin"))
set_string(&ServerBin, ptr);
else if (!_cups_strcasecmp(line, "ServerRoot"))
/*
* Directory services routines for the CUPS scheduler.
*
+ * Copyright © 2021 by OpenPrinting.
* Copyright © 2007-2018 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
*
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
static char *get_auth_info_required(cupsd_printer_t *p,
char *buffer, size_t bufsize);
-#endif /* HAVE_DNSSD || HAVE_AVAHI */
-#ifdef __APPLE__
-static int get_hostconfig(const char *name);
-#endif /* __APPLE__ */
-static void update_lpd(int onoff);
-static void update_smb(int onoff);
-
-
-#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
# ifdef __APPLE__
static void dnssdAddAlias(const void *key, const void *value,
void *context);
# endif /* __APPLE__ */
-static cupsd_txt_t dnssdBuildTxtRecord(cupsd_printer_t *p, int for_lpd);
+static cupsd_txt_t dnssdBuildTxtRecord(cupsd_printer_t *p);
# ifdef HAVE_AVAHI
static void dnssdClientCallback(AvahiClient *c, AvahiClientState state, void *userdata);
# endif /* HAVE_AVAHI */
}
#endif /* HAVE_DNSSD || HAVE_AVAHI */
- /*
- * Enable LPD and SMB printer sharing as needed through external programs...
- */
-
- if (BrowseLocalProtocols & BROWSE_LPD)
- update_lpd(1);
-
- if (BrowseLocalProtocols & BROWSE_SMB)
- update_smb(1);
-
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
/*
* Register the individual printers
if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDMaster)
dnssdStop();
#endif /* HAVE_DNSSD || HAVE_AVAHI */
-
- /*
- * Disable LPD and SMB printer sharing as needed through external programs...
- */
-
- if (BrowseLocalProtocols & BROWSE_LPD)
- update_lpd(0);
-
- if (BrowseLocalProtocols & BROWSE_SMB)
- update_smb(0);
}
static cupsd_txt_t /* O - TXT record */
dnssdBuildTxtRecord(
- cupsd_printer_t *p, /* I - Printer information */
- int for_lpd) /* I - 1 = LPD, 0 = IPP */
+ cupsd_printer_t *p) /* I - Printer information */
{
int i, /* Looping var */
count; /* Count of key/value pairs */
count = 0;
- if (!for_lpd || (BrowseLocalProtocols & BROWSE_LPD))
- {
- keyvalue[count ][0] = "txtvers";
- keyvalue[count++][1] = "1";
+ keyvalue[count ][0] = "txtvers";
+ keyvalue[count++][1] = "1";
- keyvalue[count ][0] = "qtotal";
- keyvalue[count++][1] = "1";
+ keyvalue[count ][0] = "qtotal";
+ keyvalue[count++][1] = "1";
- keyvalue[count ][0] = "rp";
- keyvalue[count++][1] = rp_str;
- if (for_lpd)
- strlcpy(rp_str, p->name, sizeof(rp_str));
- else
- snprintf(rp_str, sizeof(rp_str), "%s/%s",
- (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers",
- p->name);
+ keyvalue[count ][0] = "rp";
+ keyvalue[count++][1] = rp_str;
+ snprintf(rp_str, sizeof(rp_str), "%s/%s", (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", p->name);
- keyvalue[count ][0] = "ty";
- keyvalue[count++][1] = p->make_model ? p->make_model : "Unknown";
+ keyvalue[count ][0] = "ty";
+ keyvalue[count++][1] = p->make_model ? p->make_model : "Unknown";
+
+ /*
+ * Get the hostname for the admin page...
+ */
+ if (strchr(DNSSDHostName, '.'))
+ {
/*
- * Get the hostname for the admin page...
+ * Use the provided hostname, but make sure it ends with a period...
*/
- if (strchr(DNSSDHostName, '.'))
- {
- /*
- * Use the provided hostname, but make sure it ends with a period...
- */
-
- if ((ptr = DNSSDHostName + strlen(DNSSDHostName) - 1) >= DNSSDHostName && *ptr == '.')
- strlcpy(admin_hostname, DNSSDHostName, sizeof(admin_hostname));
- else
- snprintf(admin_hostname, sizeof(admin_hostname), "%s.", DNSSDHostName);
- }
+ if ((ptr = DNSSDHostName + strlen(DNSSDHostName) - 1) >= DNSSDHostName && *ptr == '.')
+ strlcpy(admin_hostname, DNSSDHostName, sizeof(admin_hostname));
else
- {
- /*
- * Unqualified hostname gets ".local." added to it...
- */
-
- snprintf(admin_hostname, sizeof(admin_hostname), "%s.local.", DNSSDHostName);
- }
-
+ snprintf(admin_hostname, sizeof(admin_hostname), "%s.", DNSSDHostName);
+ }
+ else
+ {
/*
- * Get the URL scheme for the admin page...
+ * Unqualified hostname gets ".local." added to it...
*/
+ snprintf(admin_hostname, sizeof(admin_hostname), "%s.local.", DNSSDHostName);
+ }
+
+ /*
+ * Get the URL scheme for the admin page...
+ */
+
# ifdef HAVE_SSL
- for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners); lis; lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
+ for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners); lis; lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
+ {
+ if (lis->encryption != HTTP_ENCRYPTION_NEVER)
{
- if (lis->encryption != HTTP_ENCRYPTION_NEVER)
- {
- admin_scheme = "https";
- break;
- }
+ admin_scheme = "https";
+ break;
}
+ }
# endif /* HAVE_SSL */
- httpAssembleURIf(HTTP_URI_CODING_ALL, adminurl_str, sizeof(adminurl_str), admin_scheme, NULL, admin_hostname, DNSSDPort, "/%s/%s", (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", p->name);
- keyvalue[count ][0] = "adminurl";
- keyvalue[count++][1] = adminurl_str;
+ httpAssembleURIf(HTTP_URI_CODING_ALL, adminurl_str, sizeof(adminurl_str), admin_scheme, NULL, admin_hostname, DNSSDPort, "/%s/%s", (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", p->name);
+ keyvalue[count ][0] = "adminurl";
+ keyvalue[count++][1] = adminurl_str;
- if (p->location)
- {
- keyvalue[count ][0] = "note";
- keyvalue[count++][1] = p->location;
- }
+ if (p->location)
+ {
+ keyvalue[count ][0] = "note";
+ keyvalue[count++][1] = p->location;
+ }
- keyvalue[count ][0] = "priority";
- keyvalue[count++][1] = for_lpd ? "100" : "0";
+ keyvalue[count ][0] = "priority";
+ keyvalue[count++][1] = "0";
- keyvalue[count ][0] = "product";
- keyvalue[count++][1] = p->pc && p->pc->product ? p->pc->product : "Unknown";
+ keyvalue[count ][0] = "product";
+ keyvalue[count++][1] = p->pc && p->pc->product ? p->pc->product : "Unknown";
- keyvalue[count ][0] = "pdl";
- keyvalue[count++][1] = p->pdl ? p->pdl : "application/postscript";
+ keyvalue[count ][0] = "pdl";
+ keyvalue[count++][1] = p->pdl ? p->pdl : "application/postscript";
- if (get_auth_info_required(p, air_str, sizeof(air_str)))
- {
- keyvalue[count ][0] = "air";
- keyvalue[count++][1] = air_str;
- }
+ if (get_auth_info_required(p, air_str, sizeof(air_str)))
+ {
+ keyvalue[count ][0] = "air";
+ keyvalue[count++][1] = air_str;
+ }
- keyvalue[count ][0] = "UUID";
- keyvalue[count++][1] = p->uuid + 9;
+ keyvalue[count ][0] = "UUID";
+ keyvalue[count++][1] = p->uuid + 9;
- #ifdef HAVE_SSL
- keyvalue[count ][0] = "TLS";
- keyvalue[count++][1] = "1.2";
- #endif /* HAVE_SSL */
+#ifdef HAVE_SSL
+ keyvalue[count ][0] = "TLS";
+ keyvalue[count++][1] = "1.2";
+#endif /* HAVE_SSL */
- if (p->type & CUPS_PRINTER_FAX)
- {
- keyvalue[count ][0] = "Fax";
- keyvalue[count++][1] = "T";
- keyvalue[count ][0] = "rfo";
- keyvalue[count++][1] = rp_str;
- }
+ if (p->type & CUPS_PRINTER_FAX)
+ {
+ keyvalue[count ][0] = "Fax";
+ keyvalue[count++][1] = "T";
+ keyvalue[count ][0] = "rfo";
+ keyvalue[count++][1] = rp_str;
+ }
- if (p->type & CUPS_PRINTER_COLOR)
- {
- keyvalue[count ][0] = "Color";
- keyvalue[count++][1] = (p->type & CUPS_PRINTER_COLOR) ? "T" : "F";
- }
+ if (p->type & CUPS_PRINTER_COLOR)
+ {
+ keyvalue[count ][0] = "Color";
+ keyvalue[count++][1] = (p->type & CUPS_PRINTER_COLOR) ? "T" : "F";
+ }
- if (p->type & CUPS_PRINTER_DUPLEX)
- {
- keyvalue[count ][0] = "Duplex";
- keyvalue[count++][1] = (p->type & CUPS_PRINTER_DUPLEX) ? "T" : "F";
- }
+ if (p->type & CUPS_PRINTER_DUPLEX)
+ {
+ keyvalue[count ][0] = "Duplex";
+ keyvalue[count++][1] = (p->type & CUPS_PRINTER_DUPLEX) ? "T" : "F";
+ }
- if (p->type & CUPS_PRINTER_STAPLE)
- {
- keyvalue[count ][0] = "Staple";
- keyvalue[count++][1] = (p->type & CUPS_PRINTER_STAPLE) ? "T" : "F";
- }
+ if (p->type & CUPS_PRINTER_STAPLE)
+ {
+ keyvalue[count ][0] = "Staple";
+ keyvalue[count++][1] = (p->type & CUPS_PRINTER_STAPLE) ? "T" : "F";
+ }
- if (p->type & CUPS_PRINTER_COPIES)
- {
- keyvalue[count ][0] = "Copies";
- keyvalue[count++][1] = (p->type & CUPS_PRINTER_COPIES) ? "T" : "F";
- }
+ if (p->type & CUPS_PRINTER_COPIES)
+ {
+ keyvalue[count ][0] = "Copies";
+ keyvalue[count++][1] = (p->type & CUPS_PRINTER_COPIES) ? "T" : "F";
+ }
- if (p->type & CUPS_PRINTER_COLLATE)
- {
- keyvalue[count ][0] = "Collate";
- keyvalue[count++][1] = (p->type & CUPS_PRINTER_COLLATE) ? "T" : "F";
- }
+ if (p->type & CUPS_PRINTER_COLLATE)
+ {
+ keyvalue[count ][0] = "Collate";
+ keyvalue[count++][1] = (p->type & CUPS_PRINTER_COLLATE) ? "T" : "F";
+ }
- if (p->type & CUPS_PRINTER_PUNCH)
- {
- keyvalue[count ][0] = "Punch";
- keyvalue[count++][1] = (p->type & CUPS_PRINTER_PUNCH) ? "T" : "F";
- }
+ if (p->type & CUPS_PRINTER_PUNCH)
+ {
+ keyvalue[count ][0] = "Punch";
+ keyvalue[count++][1] = (p->type & CUPS_PRINTER_PUNCH) ? "T" : "F";
+ }
- if (p->type & CUPS_PRINTER_BIND)
- {
- keyvalue[count ][0] = "Bind";
- keyvalue[count++][1] = (p->type & CUPS_PRINTER_BIND) ? "T" : "F";
- }
+ if (p->type & CUPS_PRINTER_BIND)
+ {
+ keyvalue[count ][0] = "Bind";
+ keyvalue[count++][1] = (p->type & CUPS_PRINTER_BIND) ? "T" : "F";
+ }
- if (p->type & CUPS_PRINTER_SORT)
- {
- keyvalue[count ][0] = "Sort";
- keyvalue[count++][1] = (p->type & CUPS_PRINTER_SORT) ? "T" : "F";
- }
+ if (p->type & CUPS_PRINTER_SORT)
+ {
+ keyvalue[count ][0] = "Sort";
+ keyvalue[count++][1] = (p->type & CUPS_PRINTER_SORT) ? "T" : "F";
+ }
- if (p->type & CUPS_PRINTER_MFP)
- {
- keyvalue[count ][0] = "Scan";
- keyvalue[count++][1] = (p->type & CUPS_PRINTER_MFP) ? "T" : "F";
- }
+ if (p->type & CUPS_PRINTER_MFP)
+ {
+ keyvalue[count ][0] = "Scan";
+ keyvalue[count++][1] = (p->type & CUPS_PRINTER_MFP) ? "T" : "F";
+ }
- snprintf(type_str, sizeof(type_str), "0x%X", p->type | CUPS_PRINTER_REMOTE);
- snprintf(state_str, sizeof(state_str), "%d", p->state);
+ snprintf(type_str, sizeof(type_str), "0x%X", p->type | CUPS_PRINTER_REMOTE);
+ snprintf(state_str, sizeof(state_str), "%d", p->state);
- keyvalue[count ][0] = "printer-state";
- keyvalue[count++][1] = state_str;
+ keyvalue[count ][0] = "printer-state";
+ keyvalue[count++][1] = state_str;
- keyvalue[count ][0] = "printer-type";
- keyvalue[count++][1] = type_str;
- }
+ keyvalue[count ][0] = "printer-type";
+ keyvalue[count++][1] = type_str;
/*
* Then pack them into a proper txt record...
int from_callback) /* I - Called from callback? */
{
char name[256]; /* Service name */
- int printer_port; /* LPD port number */
int status; /* Registration status */
- cupsd_txt_t ipp_txt, /* IPP(S) TXT record */
- printer_txt; /* LPD TXT record */
+ cupsd_txt_t ipp_txt; /* IPP(S) TXT record */
cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdRegisterPrinter(%s) %s", p->name,
* Register IPP and LPD...
*
* We always must register the "_printer" service type in order to reserve
- * our name, but use port number 0 if we haven't actually configured cups-lpd
- * to share via LPD...
+ * our name, but use port number 0 so that we don't have clients using LPD...
*/
- ipp_txt = dnssdBuildTxtRecord(p, 0);
- printer_txt = dnssdBuildTxtRecord(p, 1);
+ ipp_txt = dnssdBuildTxtRecord(p);
- if (BrowseLocalProtocols & BROWSE_LPD)
- printer_port = 515;
- else
- printer_port = 0;
-
- status = dnssdRegisterInstance(NULL, p, name, "_printer._tcp", NULL, printer_port, &printer_txt, 0, from_callback);
+ status = dnssdRegisterInstance(NULL, p, name, "_printer._tcp", NULL, 0, NULL, 0, from_callback);
# ifdef HAVE_SSL
if (status)
}
dnssdFreeTxtRecord(&ipp_txt);
- dnssdFreeTxtRecord(&printer_txt);
if (status)
{
return ("none");
}
#endif /* HAVE_DNSSD || HAVE_AVAHI */
-
-
-#ifdef __APPLE__
-/*
- * 'get_hostconfig()' - Get an /etc/hostconfig service setting.
- */
-
-static int /* O - 1 for YES or AUTOMATIC, 0 for NO */
-get_hostconfig(const char *name) /* I - Name of service */
-{
- cups_file_t *fp; /* Hostconfig file */
- char line[1024], /* Line from file */
- *ptr; /* Pointer to value */
- int state = 1; /* State of service */
-
-
- /*
- * Try opening the /etc/hostconfig file; if we can't open it, assume that
- * the service is enabled/auto.
- */
-
- if ((fp = cupsFileOpen("/etc/hostconfig", "r")) != NULL)
- {
- /*
- * Read lines from the file until we find the service...
- */
-
- while (cupsFileGets(fp, line, sizeof(line)))
- {
- if (line[0] == '#' || (ptr = strchr(line, '=')) == NULL)
- continue;
-
- *ptr++ = '\0';
-
- if (!_cups_strcasecmp(line, name))
- {
- /*
- * Found the service, see if it is set to "-NO-"...
- */
-
- if (!_cups_strncasecmp(ptr, "-NO-", 4))
- state = 0;
- break;
- }
- }
-
- cupsFileClose(fp);
- }
-
- return (state);
-}
-#endif /* __APPLE__ */
-
-
-/*
- * 'update_lpd()' - Update the LPD configuration as needed.
- */
-
-static void
-update_lpd(int onoff) /* - 1 = turn on, 0 = turn off */
-{
- if (!LPDConfigFile)
- return;
-
-#ifdef __APPLE__
- /*
- * Allow /etc/hostconfig CUPS_LPD service setting to override cupsd.conf
- * setting for backwards-compatibility.
- */
-
- if (onoff && !get_hostconfig("CUPS_LPD"))
- onoff = 0;
-#endif /* __APPLE__ */
-
- if (!strncmp(LPDConfigFile, "xinetd:///", 10))
- {
- /*
- * Enable/disable LPD via the xinetd.d config file for cups-lpd...
- */
-
- char newfile[1024]; /* New cups-lpd.N file */
- cups_file_t *ofp, /* Original file pointer */
- *nfp; /* New file pointer */
- char line[1024]; /* Line from file */
-
-
- snprintf(newfile, sizeof(newfile), "%s.N", LPDConfigFile + 9);
-
- if ((ofp = cupsFileOpen(LPDConfigFile + 9, "r")) == NULL)
- {
- cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to open \"%s\" - %s",
- LPDConfigFile + 9, strerror(errno));
- return;
- }
-
- if ((nfp = cupsFileOpen(newfile, "w")) == NULL)
- {
- cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to create \"%s\" - %s",
- newfile, strerror(errno));
- cupsFileClose(ofp);
- return;
- }
-
- /*
- * Copy all of the lines from the cups-lpd file...
- */
-
- while (cupsFileGets(ofp, line, sizeof(line)))
- {
- if (line[0] == '{')
- {
- cupsFilePrintf(nfp, "%s\n", line);
- snprintf(line, sizeof(line), "\tdisable = %s",
- onoff ? "no" : "yes");
- }
- else if (!strstr(line, "disable ="))
- cupsFilePrintf(nfp, "%s\n", line);
- }
-
- cupsFileClose(nfp);
- cupsFileClose(ofp);
- rename(newfile, LPDConfigFile + 9);
- }
-#ifdef __APPLE__
- else if (!strncmp(LPDConfigFile, "launchd:///", 11))
- {
- /*
- * Enable/disable LPD via the launchctl command...
- */
-
- char *argv[5], /* Arguments for command */
- *envp[MAX_ENV]; /* Environment for command */
- int pid; /* Process ID */
-
-
- cupsdLoadEnv(envp, (int)(sizeof(envp) / sizeof(envp[0])));
- argv[0] = (char *)"launchctl";
- argv[1] = (char *)(onoff ? "load" : "unload");
- argv[2] = (char *)"-w";
- argv[3] = LPDConfigFile + 10;
- argv[4] = NULL;
-
- cupsdStartProcess("/bin/launchctl", argv, envp, -1, -1, -1, -1, -1, 1,
- NULL, NULL, &pid);
- }
-#endif /* __APPLE__ */
- else
- cupsdLogMessage(CUPSD_LOG_INFO, "Unknown LPDConfigFile scheme!");
-}
-
-
-/*
- * 'update_smb()' - Update the SMB configuration as needed.
- */
-
-static void
-update_smb(int onoff) /* I - 1 = turn on, 0 = turn off */
-{
- if (!SMBConfigFile)
- return;
-
- if (!strncmp(SMBConfigFile, "samba:///", 9))
- {
- /*
- * Enable/disable SMB via the specified smb.conf config file...
- */
-
- char newfile[1024]; /* New smb.conf.N file */
- cups_file_t *ofp, /* Original file pointer */
- *nfp; /* New file pointer */
- char line[1024]; /* Line from file */
- int in_printers; /* In [printers] section? */
-
-
- snprintf(newfile, sizeof(newfile), "%s.N", SMBConfigFile + 8);
-
- if ((ofp = cupsFileOpen(SMBConfigFile + 8, "r")) == NULL)
- {
- cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to open \"%s\" - %s",
- SMBConfigFile + 8, strerror(errno));
- return;
- }
-
- if ((nfp = cupsFileOpen(newfile, "w")) == NULL)
- {
- cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to create \"%s\" - %s",
- newfile, strerror(errno));
- cupsFileClose(ofp);
- return;
- }
-
- /*
- * Copy all of the lines from the smb.conf file...
- */
-
- in_printers = 0;
-
- while (cupsFileGets(ofp, line, sizeof(line)))
- {
- if (in_printers && strstr(line, "printable ="))
- snprintf(line, sizeof(line), " printable = %s",
- onoff ? "yes" : "no");
-
- cupsFilePrintf(nfp, "%s\n", line);
-
- if (line[0] == '[')
- in_printers = !strcmp(line, "[printers]");
- }
-
- cupsFileClose(nfp);
- cupsFileClose(ofp);
- rename(newfile, SMBConfigFile + 8);
- }
- else
- cupsdLogMessage(CUPSD_LOG_INFO, "Unknown SMBConfigFile scheme!");
-}
/*
* Directory services definitions for the CUPS scheduler.
*
- * Copyright 2007-2017 by Apple Inc.
- * Copyright 1997-2007 by Easy Software Products, all rights reserved.
+ * Copyright © 2021 by OpenPrinting.
+ * Copyright © 2007-2017 by Apple Inc.
+ * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
*
- * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
+ * Licensed under Apache License v2.0. See the file "LICENSE" for more
+ * information.
*/
/*
*/
#define BROWSE_DNSSD 1 /* DNS Service Discovery (aka Bonjour) */
-#define BROWSE_SMB 2 /* SMB/Samba */
-#define BROWSE_LPD 4 /* LPD via xinetd or launchd */
-#define BROWSE_ALL 7 /* All protocols */
+#define BROWSE_ALL 1 /* All protocols */
/*
/* Service reference for the web interface */
#endif /* HAVE_DNSSD || HAVE_AVAHI */
-VAR char *LPDConfigFile VALUE(NULL),
- /* LPD configuration file */
- *SMBConfigFile VALUE(NULL);
- /* SMB configuration file */
-
/*
* Prototypes...
/*
* Environment management routines for the CUPS scheduler.
*
- * Copyright 2007-2016 by Apple Inc.
- * Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ * Copyright © 2021 by OpenPrinting.
+ * Copyright © 2007-2016 by Apple Inc.
+ * Copyright © 1997-2006 by Easy Software Products, all rights reserved.
*
- * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
+ * Licensed under Apache License v2.0. See the file "LICENSE" for more
+ * information.
*/
/*
set_if_undefined("CUPS_CACHEDIR", CacheDir);
set_if_undefined("CUPS_DATADIR", DataDir);
set_if_undefined("CUPS_DOCROOT", DocumentRoot);
- set_if_undefined("CUPS_FONTPATH", FontPath);
set_if_undefined("CUPS_REQUESTROOT", RequestRoot);
set_if_undefined("CUPS_SERVERBIN", ServerBin);
set_if_undefined("CUPS_SERVERROOT", ServerRoot);
}
}
}
- snprintf(rip_max_cache, sizeof(rip_max_cache), "RIP_MAX_CACHE=%s", RIPCache);
if (job->printer->num_auth_info_required == 1)
snprintf(auth_info_required, sizeof(auth_info_required),
ServerBin $BASE/bin
CacheDir $BASE/share
DataDir $BASE/share
-FontPath $BASE/share/fonts
DocumentRoot $root/doc
RequestRoot $BASE/spool
TempDir $BASE/spool/temp