]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-common.m4
Add libcups component name, localization bundle support for iOS.
[thirdparty/cups.git] / config-scripts / cups-common.m4
index fbba71503a8fc451b079f7f078298c176c5e23da..df1b1549a907e1f8a89b29898181a13e94325875 100644 (file)
@@ -1,14 +1,11 @@
 dnl
 dnl Common configuration stuff for CUPS.
 dnl
-dnl Copyright 2007-2016 by Apple Inc.
-dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
+dnl Copyright © 2007-2018 by Apple Inc.
+dnl Copyright © 1997-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 Set the name of the config header file...
@@ -45,6 +42,7 @@ AC_PATH_PROG(CHMOD,chmod)
 AC_PATH_PROG(GZIP,gzip)
 AC_PATH_PROG(LD,ld)
 AC_PATH_PROG(LN,ln)
+AC_PATH_PROG(MKDIR,mkdir)
 AC_PATH_PROG(MV,mv)
 AC_PATH_PROG(RM,rm)
 AC_PATH_PROG(RMDIR,rmdir)
@@ -129,7 +127,6 @@ AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
 AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
 AC_CHECK_HEADER(sys/param.h,AC_DEFINE(HAVE_SYS_PARAM_H))
 AC_CHECK_HEADER(sys/ucred.h,AC_DEFINE(HAVE_SYS_UCRED_H))
-AC_CHECK_HEADER(asl.h,AC_DEFINE(HAVE_ASL_H))
 
 dnl Checks for iconv.h and iconv_open
 AC_CHECK_HEADER(iconv.h,
@@ -162,7 +159,7 @@ AC_CHECK_FUNCS(statfs statvfs)
 
 dnl Checks for string functions.
 AC_CHECK_FUNCS(strdup strlcat strlcpy)
-if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then
+if test "$host_os_name" = "hp-ux" -a "$host_os_version" = "1020"; then
        echo Forcing snprintf emulation for HP-UX.
 else
        AC_CHECK_FUNCS(snprintf vsnprintf)
@@ -181,8 +178,8 @@ dnl Check for vsyslog function.
 AC_CHECK_FUNCS(vsyslog)
 
 dnl Checks for signal functions.
-case "$uname" in
-       Linux | GNU)
+case "$host_os_name" in
+       linux* | gnu*)
                # Do not use sigset on Linux or GNU HURD
                ;;
        *)
@@ -230,7 +227,7 @@ AC_SUBST(LIBUSB)
 AC_SUBST(USBQUIRKS)
 
 if test "x$PKGCONFIG" != x; then
-       if test x$enable_libusb != xno -a $uname != Darwin; then
+       if test x$enable_libusb != xno -a $host_os_name != darwin; then
                AC_MSG_CHECKING(for libusb-1.0)
                if $PKGCONFIG --exists libusb-1.0; then
                        AC_MSG_RESULT(yes)
@@ -278,8 +275,8 @@ AC_SUBST(INSTALL_GZIP)
 AC_SUBST(LIBZ)
 
 dnl Flags for "ar" command...
-case $uname in
-        Darwin* | *BSD*)
+case $host_os_name in
+        darwin* | *bsd*)
                 ARFLAGS="-rcv"
                 ;;
         *)
@@ -306,7 +303,7 @@ fi
 LIBS="$SAVELIBS"
 
 dnl Check for DBUS support
-AC_ARG_ENABLE(dbus, [  --disable-dbus           build without DBUS support])
+AC_ARG_ENABLE(dbus, [  --disable-dbus          build without DBUS support])
 AC_ARG_WITH(dbusdir, [  --with-dbusdir          set DBUS configuration directory ],
        DBUSDIR="$withval")
 
@@ -314,7 +311,7 @@ DBUSDIR=""
 DBUS_NOTIFIER=""
 DBUS_NOTIFIERLIBS=""
 
-if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$uname" != xDarwin; then
+if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$host_os_name" != xdarwin; then
        AC_MSG_CHECKING(for DBUS)
        if $PKGCONFIG --exists dbus-1; then
                AC_MSG_RESULT(yes)
@@ -348,8 +345,8 @@ CUPS_DEFAULT_SYSTEM_AUTHKEY=""
 CUPS_SYSTEM_AUTHKEY=""
 INSTALLXPC=""
 
-case $uname in
-        Darwin*)
+case $host_os_name in
+        darwin*)
                 BACKLIBS="$BACKLIBS -framework IOKit"
                 SERVERLIBS="$SERVERLIBS -framework IOKit -weak_framework ApplicationServices"
                 LIBS="-framework SystemConfiguration -framework CoreFoundation -framework Security $LIBS"
@@ -389,28 +386,23 @@ case $uname in
                        if test "x$default_adminkey" != xdefault; then
                                CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey $default_adminkey"
                                CUPS_DEFAULT_SYSTEM_AUTHKEY="$default_adminkey"
-                       elif grep -q system.print.operator /etc/authorization; then
+                       else
                                CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.print.admin"
                                CUPS_DEFAULT_SYSTEM_AUTHKEY="system.print.admin"
-                       else
-                               CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences"
-                               CUPS_DEFAULT_SYSTEM_AUTHKEY="system.preferences"
                        fi
 
                        if test "x$default_operkey" != xdefault; then
                                CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY($default_operkey) @admin @lpadmin"
-                       elif grep -q system.print.operator /etc/authorization; then
-                               CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.operator) @admin @lpadmin"
                        else
-                               CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.admin) @admin @lpadmin"
+                               CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.operator) @admin @lpadmin"
                        fi])
                AC_CHECK_HEADER(Security/SecBasePriv.h,AC_DEFINE(HAVE_SECBASEPRIV_H))
 
                dnl Check for sandbox/Seatbelt support
-               if test $uversion -ge 100; then
+               if test $host_os_version -ge 100; then
                        AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H))
                fi
-               if test $uversion -ge 110 -a $uversion -lt 120; then
+               if test $host_os_version -ge 110 -a $host_os_version -lt 120; then
                        # Broken public headers in 10.7.x...
                        AC_MSG_CHECKING(for sandbox/private.h presence)
                        if test -f /usr/local/include/sandbox/private.h; then
@@ -441,16 +433,21 @@ COMPONENTS="all"
 
 AC_ARG_WITH(components, [  --with-components       set components to build:
                            - "all" (default) builds everything
-                           - "core" builds libcups and ipptool],
+                           - "core" builds libcups and ipptool
+                           - "libcups" builds just libcups],
        COMPONENTS="$withval")
 
 case "$COMPONENTS" in
        all)
-               BUILDDIRS="filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
+               BUILDDIRS="test filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
                ;;
 
        core)
-               BUILDDIRS="data locale"
+               BUILDDIRS="test locale"
+               ;;
+
+       libcups)
+               BUILDDIRS="locale"
                ;;
 
        *)