]> 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 69699fb85e383f6e01ffa507d82752c4cc1d5e83..8c12cad8fc5164de8981d035e1675af23d9e57f8 100644 (file)
@@ -1,16 +1,10 @@
 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-2012 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...
@@ -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,21 +33,41 @@ 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",
-       CUPS_CUPSD_FILE_PERM="500")
+       [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
@@ -78,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
@@ -102,7 +125,7 @@ AC_ARG_WITH(local_protocols, [  --with-local-protocols  set default BrowseLocalP
 
 if test x$with_local_protocols != xno; then
        if test "x$default_local_protocols" = "xdefault"; then
-               if test "x$DNSSDLIBS" != "x"; then
+               if test "x$DNSSD_BACKEND" != "x"; then
                        CUPS_BROWSE_LOCAL_PROTOCOLS="dnssd"
                else
                        CUPS_BROWSE_LOCAL_PROTOCOLS=""
@@ -134,7 +157,7 @@ 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
@@ -167,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
@@ -200,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)
@@ -253,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"
                                ;;
                        *)
@@ -285,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"
                                ;;
                        *)
@@ -305,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],
@@ -326,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 ],
@@ -351,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"
@@ -373,7 +398,7 @@ AC_SUBST(DEFAULT_IPP_PORT)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
 
 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
@@ -384,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
@@ -396,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