]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-defaults.m4
Add libcups component name, localization bundle support for iOS.
[thirdparty/cups.git] / config-scripts / cups-defaults.m4
index 3e87de4fec6aacb133525e55d9910b27db55cb0b..43f034d7ba6fff377a71525599579d2bdc668f0f 100644 (file)
@@ -1,16 +1,11 @@
 dnl
-dnl "$Id$"
+dnl Default cupsd configuration settings for CUPS.
 dnl
-dnl   Default cupsd configuration settings for CUPS.
+dnl Copyright © 2007-2018 by Apple Inc.
+dnl Copyright © 2006-2007 by Easy Software Products, all rights reserved.
 dnl
-dnl   Copyright 2007-2014 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
+dnl information.
 dnl
 
 dnl Default languages...
@@ -24,36 +19,74 @@ AC_ARG_WITH(languages, [  --with-languages        set installed languages, defau
        esac])
 AC_SUBST(LANGUAGES)
 
-dnl OS X bundle-based localization support
-AC_ARG_WITH(bundledir, [  --with-bundledir        set OS X localization bundle directory ],
-       CUPS_BUNDLEDIR="$withval",
-       if test "x$uname" = xDarwin -a $uversion -ge 100; then
+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)
+       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])
+else
+       cups_bundlelang=""
+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)
+
+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
@@ -85,7 +118,7 @@ AC_SUBST(CUPS_ACCESS_LOG_LEVEL)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_ACCESS_LOG_LEVEL, "$CUPS_ACCESS_LOG_LEVEL")
 
 dnl Default PageLogFormat
-AC_ARG_WITH(page_logging, [  --enable-page-logging   enable page_log by default])
+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
@@ -143,7 +176,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
@@ -176,7 +209,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
@@ -209,7 +242,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)
@@ -262,15 +295,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"
                                ;;
                        *)
@@ -294,8 +327,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"
                                ;;
                        *)
@@ -362,7 +395,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"
@@ -384,7 +417,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 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
@@ -395,7 +428,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
@@ -407,7 +440,3 @@ esac
 
 AC_SUBST(CUPS_WEBIF)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
-
-dnl
-dnl End of "$Id$".
-dnl