]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-defaults.m4
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / config-scripts / cups-defaults.m4
index a568edb217edf2579d0bb0ba4841fea85bd362fb..8c12cad8fc5164de8981d035e1675af23d9e57f8 100644 (file)
@@ -1,20 +1,14 @@
 dnl
-dnl "$Id: cups-defaults.m4 7959 2008-09-17 19:30:58Z mike $"
+dnl Default cupsd configuration settings for CUPS.
 dnl
-dnl   Default cupsd configuration settings for CUPS.
+dnl Copyright 2007-2017 by Apple Inc.
+dnl Copyright 2006-2007 by Easy Software Products, all rights reserved.
 dnl
-dnl   Copyright 2007-2011 by Apple Inc.
-dnl   Copyright 2006-2007 by Easy Software Products, all rights reserved.
-dnl
-dnl   These coded instructions, statements, and computer programs are the
-dnl   property of Apple Inc. and are protected by Federal copyright
-dnl   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
-dnl   which should have been included with this file.  If this file is
-dnl   file is missing or damaged, see the license at "http://www.cups.org/".
+dnl Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
 dnl
 
 dnl Default languages...
-LANGUAGES="`ls -1 locale/cups_*.po | 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' ' '`"
 
 AC_ARG_WITH(languages, [  --with-languages        set installed languages, default=all ],[
        case "$withval" in
@@ -24,10 +18,10 @@ AC_ARG_WITH(languages, [  --with-languages        set installed languages, defau
        esac])
 AC_SUBST(LANGUAGES)
 
-dnl Mac OS X bundle-based localization support
-AC_ARG_WITH(bundledir, [  --with-bundledir     set Mac OS X localization bundle directory ],
+dnl macOS bundle-based localization support
+AC_ARG_WITH(bundledir, [  --with-bundledir        set macOS localization bundle directory ],
        CUPS_BUNDLEDIR="$withval",
-       if test "x$uname" = xDarwin -a $uversion -ge 100; then
+       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
@@ -39,17 +33,43 @@ if test "x$CUPS_BUNDLEDIR" != x; then
        AC_DEFINE_UNQUOTED(CUPS_BUNDLEDIR, "$CUPS_BUNDLEDIR")
 fi
 
+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*)
+                       CUPS_EXE_FILE_PERM="755"
+                       ;;
+               *)
+                       CUPS_EXE_FILE_PERM="555"
+                       ;;
+       esac])
+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$uname" = xDarwin; then
+       [if test "x$host_os_name" = xdarwin; then
                CUPS_CONFIG_FILE_PERM="644"
        else
                CUPS_CONFIG_FILE_PERM="640"
-       fi)
+       fi])
 AC_SUBST(CUPS_CONFIG_FILE_PERM)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_CONFIG_FILE_PERM, 0$CUPS_CONFIG_FILE_PERM)
 
+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)
+
 dnl Default LogFilePerm
 AC_ARG_WITH(log_file_perm, [  --with-log-file-perm    set default LogFilePerm value, default=0644],
        CUPS_LOG_FILE_PERM="$withval",
@@ -64,7 +84,6 @@ AC_ARG_WITH(fatal_errors, [  --with-fatal-errors     set default FatalErrors val
 AC_SUBST(CUPS_FATAL_ERRORS)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_FATAL_ERRORS, "$CUPS_FATAL_ERRORS")
 
-
 dnl Default LogLevel
 AC_ARG_WITH(log_level, [  --with-log-level        set default LogLevel value, default=warn],
        CUPS_LOG_LEVEL="$withval",
@@ -73,12 +92,21 @@ AC_SUBST(CUPS_LOG_LEVEL)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LOG_LEVEL, "$CUPS_LOG_LEVEL")
 
 dnl Default AccessLogLevel
-AC_ARG_WITH(access_log_level, [  --with-access-log-level set default AccessLogLevel value, default=actions],
+AC_ARG_WITH(access_log_level, [  --with-access-log-level set default AccessLogLevel value, default=none],
        CUPS_ACCESS_LOG_LEVEL="$withval",
-       CUPS_ACCESS_LOG_LEVEL="actions")
+       CUPS_ACCESS_LOG_LEVEL="none")
 AC_SUBST(CUPS_ACCESS_LOG_LEVEL)
 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)
+
 dnl Default Browsing
 AC_ARG_ENABLE(browsing, [  --disable-browsing      disable Browsing by default])
 if test "x$enable_browsing" = xno; then
@@ -91,16 +119,16 @@ fi
 AC_SUBST(CUPS_BROWSING)
 
 dnl Default BrowseLocalProtocols
-AC_ARG_WITH(local_protocols, [  --with-local-protocols  set default BrowseLocalProtocols, default="CUPS"],
+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$DNSSDLIBS" != "x"; then
-               CUPS_BROWSE_LOCAL_PROTOCOLS="CUPS dnssd"
-       else
-               CUPS_BROWSE_LOCAL_PROTOCOLS="CUPS"
+               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"
@@ -113,41 +141,6 @@ AC_SUBST(CUPS_BROWSE_LOCAL_PROTOCOLS)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS,
        "$CUPS_BROWSE_LOCAL_PROTOCOLS")
 
-dnl Default BrowseRemoteProtocols
-AC_ARG_WITH(remote_protocols, [  --with-remote-protocols set default BrowseRemoteProtocols, default="CUPS"],
-       default_remote_protocols="$withval",
-       default_remote_protocols="default")
-
-if test x$with_remote_protocols != xno; then
-       if test "x$default_remote_protocols" = "xdefault"; then
-               if test "$uname" = "Darwin" -a $uversion -ge 90; then
-                       CUPS_BROWSE_REMOTE_PROTOCOLS=""
-               else
-                       CUPS_BROWSE_REMOTE_PROTOCOLS="CUPS"
-               fi
-       else
-               CUPS_BROWSE_REMOTE_PROTOCOLS="$default_remote_protocols"
-       fi
-else
-       CUPS_BROWSE_REMOTE_PROTOCOLS=""
-fi
-
-AC_SUBST(CUPS_BROWSE_REMOTE_PROTOCOLS)
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS,
-       "$CUPS_BROWSE_REMOTE_PROTOCOLS")
-
-dnl Default BrowseShortNames
-AC_ARG_ENABLE(browse_short, [  --disable-browse-short-names
-                         disable BrowseShortNames by default])
-if test "x$enable_browse_short" = xno; then
-       CUPS_BROWSE_SHORT_NAMES="No"
-       AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_SHORT_NAMES, 0)
-else
-       CUPS_BROWSE_SHORT_NAMES="Yes"
-       AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_SHORT_NAMES, 1)
-fi
-AC_SUBST(CUPS_BROWSE_SHORT_NAMES)
-
 dnl Default DefaultShared
 AC_ARG_ENABLE(default_shared, [  --disable-default-shared
                          disable DefaultShared by default])
@@ -160,43 +153,11 @@ else
 fi
 AC_SUBST(CUPS_DEFAULT_SHARED)
 
-dnl Default ImplicitClasses
-AC_ARG_ENABLE(implicit, [  --disable-implicit-classes
-                          disable ImplicitClasses by default])
-if test "x$enable_implicit" = xno; then
-       CUPS_IMPLICIT_CLASSES="No"
-       AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IMPLICIT_CLASSES, 0)
-else
-       CUPS_IMPLICIT_CLASSES="Yes"
-       AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IMPLICIT_CLASSES, 1)
-fi
-AC_SUBST(CUPS_IMPLICIT_CLASSES)
-
-dnl Default UseNetworkDefault
-AC_ARG_ENABLE(use_network_default, [  --enable-use-network-default
-                          set UseNetworkDefault to Yes by default])
-if test "x$enable_use_network_default" != xno; then
-       AC_MSG_CHECKING(whether to use network default printers)
-       if test "x$enable_use_network_default" = xyes -o $uname != Darwin; then
-               CUPS_USE_NETWORK_DEFAULT="Yes"
-               AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USE_NETWORK_DEFAULT, 1)
-               AC_MSG_RESULT(yes)
-       else
-               CUPS_USE_NETWORK_DEFAULT="No"
-               AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USE_NETWORK_DEFAULT, 0)
-               AC_MSG_RESULT(no)
-       fi
-else
-       CUPS_USE_NETWORK_DEFAULT="No"
-       AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USE_NETWORK_DEFAULT, 0)
-fi
-AC_SUBST(CUPS_USE_NETWORK_DEFAULT)
-
 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$uname = xDarwin; then
+       if test x$host_os_name = xdarwin; then
                if test x`id -u _lp 2>/dev/null` = x; then
                        CUPS_USER="lp";
                else
@@ -229,7 +190,7 @@ 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$uname = xDarwin; then
+       if test x$host_os_name = xdarwin; then
                if test x`id -g _lp 2>/dev/null` = x; then
                        CUPS_GROUP="lp";
                else
@@ -262,7 +223,7 @@ fi
 
 AC_ARG_WITH(system_groups, [  --with-system-groups    set default system groups for CUPS],
        CUPS_SYSTEM_GROUPS="$withval",
-       if test x$uname = xDarwin; then
+       if test x$host_os_name = xdarwin; then
                CUPS_SYSTEM_GROUPS="admin"
        else
                AC_MSG_CHECKING(for default system groups)
@@ -315,15 +276,15 @@ AC_ARG_WITH(printcap, [  --with-printcap         set default printcap file],
 
 if test x$default_printcap != xno; then
        if test "x$default_printcap" = "xdefault"; then
-               case $uname in
-                       Darwin*)
-                               if test $uversion -ge 90; 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*)
+                       sunos*)
                                CUPS_DEFAULT_PRINTCAP="/etc/printers.conf"
                                ;;
                        *)
@@ -347,8 +308,8 @@ AC_ARG_WITH(lpdconfigfile, [  --with-lpdconfigfile    set default LPDConfigFile
 
 if test x$default_lpdconfigfile != xno; then
        if test "x$default_lpdconfigfile" = "xdefault"; then
-               case $uname in
-                       Darwin*)
+               case $host_os_name in
+                       darwin*)
                                CUPS_DEFAULT_LPD_CONFIG_FILE="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
                                ;;
                        *)
@@ -367,6 +328,7 @@ else
 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],
@@ -388,6 +350,7 @@ else
 fi
 
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG_FILE, "$CUPS_DEFAULT_SMB_CONFIG_FILE")
+AC_SUBST(CUPS_DEFAULT_SMB_CONFIG_FILE)
 
 dnl Default MaxCopies value...
 AC_ARG_WITH(max-copies, [  --with-max-copies       set default max copies value, default=9999 ],
@@ -413,7 +376,7 @@ AC_ARG_WITH(snmp-address, [  --with-snmp-address     set SNMP query address, def
        else
                CUPS_SNMP_ADDRESS="Address $withval"
        fi,
-       if test "x$uname" = xDarwin; then
+       if test "x$host_os_name" = xdarwin; then
                CUPS_SNMP_ADDRESS=""
        else
                CUPS_SNMP_ADDRESS="Address @LOCAL"
@@ -434,54 +397,8 @@ AC_ARG_WITH(ipp-port, [  --with-ipp-port         set port number for IPP, defaul
 AC_SUBST(DEFAULT_IPP_PORT)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
 
-dnl Filters
-AC_ARG_ENABLE(bannertops, [  --enable-bannertops     always build the banner filter ])
-AC_ARG_ENABLE(texttops, [  --enable-texttops       always build the text filter ])
-
-if test "x$enable_bannertops" = xno; then
-       BANNERTOPS=""
-       DEFAULT_BANNERTOPS="#"
-elif test "x$enable_bannertops" = xyes; then
-       BANNERTOPS="bannertops"
-       DEFAULT_BANNERTOPS=""
-elif test $uname = Darwin; then
-       BANNERTOPS=""
-       DEFAULT_BANNERTOPS="#"
-else
-       BANNERTOPS="bannertops"
-       DEFAULT_BANNERTOPS=""
-fi
-
-if test "x$enable_texttops" = xno; then
-       TEXTTOPS=""
-       DEFAULT_TEXTTOPS="#"
-elif test "x$enable_texttops" = xyes; then
-       TEXTTOPS="texttops"
-       DEFAULT_TEXTTOPS=""
-elif test $uname = Darwin; then
-       TEXTTOPS=""
-       DEFAULT_TEXTTOPS="#"
-else
-       TEXTTOPS="texttops"
-       DEFAULT_TEXTTOPS=""
-fi
-
-AC_SUBST(BANNERTOPS)
-AC_SUBST(DEFAULT_BANNERTOPS)
-AC_SUBST(DEFAULT_TEXTTOPS)
-AC_SUBST(TEXTTOPS)
-
-dnl Fonts
-if test "x$BANNERTOPS" = x -a "x$TEXTTOPS" = x; then
-       FONTS=""
-else
-       FONTS="fonts"
-fi
-
-AC_SUBST(FONTS)
-
 dnl Web interface...
-AC_ARG_ENABLE(webif, [  --enable-webif          enable the web interface by default, default=no for Mac OS X])
+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
@@ -492,7 +409,7 @@ case "x$enable_webif" in
                CUPS_DEFAULT_WEBIF=1
                ;;
        *)
-               if test $uname = Darwin; then
+               if test $host_os_name = darwin; then
                        CUPS_WEBIF=No
                        CUPS_DEFAULT_WEBIF=0
                else
@@ -504,7 +421,3 @@ esac
 
 AC_SUBST(CUPS_WEBIF)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
-
-dnl
-dnl End of "$Id: cups-defaults.m4 7959 2008-09-17 19:30:58Z mike $".
-dnl