]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Allow D-BUS to be used on other platforms (STR #2702)
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 11 Feb 2008 22:43:14 +0000 (22:43 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 11 Feb 2008 22:43:14 +0000 (22:43 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@7294 7a7537e8-13f0-0310-91df-b6672ffda945

config-scripts/cups-common.m4
config-scripts/cups-defaults.m4

index 879ffce6f890fd47757ea80ecd2be7caad20e6d1..369eba217326e24f935f2433bc030da710c070d0 100644 (file)
@@ -19,7 +19,7 @@ AC_PREREQ(2.60)
 dnl Set the name of the config header file...
 AC_CONFIG_HEADER(config.h)
 
-dnl Versio number information...
+dnl Version number information...
 CUPS_VERSION="1.4svn"
 CUPS_REVISION=""
 if test -z "$CUPS_REVISION" -a -d .svn; then
@@ -178,26 +178,58 @@ esac
 
 AC_SUBST(ARFLAGS)
 
-dnl Extra platform-specific libraries...
+dnl Prep libraries specifically for cupsd and backends...
 BACKLIBS=""
 CUPSDLIBS=""
-DBUSDIR=""
-CUPS_DEFAULT_PRINTADMIN_AUTH="@SYSTEM"
-CUPS_SYSTEM_AUTHKEY=""
+AC_SUBST(BACKLIBS)
+AC_SUBST(CUPSDLIBS)
+
+dnl See if we have POSIX ACL support...
+SAVELIBS="$LIBS"
+LIBS=""
+AC_SEARCH_LIBS(acl_init, acl, AC_DEFINE(HAVE_ACL_INIT))
+CUPSDLIBS="$CUPSDLIBS $LIBS"
+LIBS="$SAVELIBS"
 
+dnl Check for DBUS support
 AC_ARG_ENABLE(dbus, [  --enable-dbus           enable DBUS support, default=auto])
+AC_ARG_WITH(dbusdir, [  --with-dbusdir          set DBUS configuration directory ],
+       DBUSDIR="$withval"
+       DBUSDIR="/etc/dbus-1")
+
+if test "x$enable_dbus" != xno; then
+       AC_PATH_PROG(PKGCONFIG, pkg-config)
+       if test "x$PKGCONFIG" != x; then
+               AC_MSG_CHECKING(for DBUS)
+               if $PKGCONFIG --exists dbus-1; then
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_DBUS)
+                       CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
+                       CUPSDLIBS="$CUPSDLIBS `$PKGCONFIG --libs dbus-1`"
+                       AC_CHECK_LIB(dbus-1,
+                           dbus_message_iter_init_append,
+                           AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
+               else
+                       AC_MSG_RESULT(no)
+                       DBUSDIR=""
+               fi
+       fi
+fi
 
+AC_SUBST(DBUSDIR)
+
+dnl Extra platform-specific libraries...
+CUPS_DEFAULT_PRINTADMIN_AUTH="@SYSTEM"
+CUPS_SYSTEM_AUTHKEY=""
 FONTS="fonts"
-AC_SUBST(FONTS)
 LEGACY_BACKENDS="parallel scsi"
-AC_SUBST(LEGACY_BACKENDS)
 
 case $uname in
         Darwin*)
                FONTS=""
                LEGACY_BACKENDS=""
-                BACKLIBS="-framework IOKit"
-                CUPSDLIBS="-sectorder __TEXT __text cupsd.order -e start -framework IOKit -framework SystemConfiguration"
+                BACKLIBS="$BACKLIBS -framework IOKit"
+                CUPSDLIBS="$CUPSDLIBS -sectorder __TEXT __text cupsd.order -e start -framework IOKit -framework SystemConfiguration"
                 LIBS="-framework SystemConfiguration -framework CoreFoundation $LIBS"
 
                dnl Check for framework headers...
@@ -227,53 +259,13 @@ case $uname in
                dnl Check for sandbox/Seatbelt support
                AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H))
                 ;;
-
-       Linux*)
-               dnl Check for DBUS support
-               if test "x$enable_dbus" != xno; then
-                       AC_PATH_PROG(PKGCONFIG, pkg-config)
-                       if test "x$PKGCONFIG" != x; then
-                               AC_MSG_CHECKING(for DBUS)
-                               if $PKGCONFIG --exists dbus-1; then
-                                       AC_MSG_RESULT(yes)
-                                       AC_DEFINE(HAVE_DBUS)
-                                       CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
-                                       CUPSDLIBS="`$PKGCONFIG --libs dbus-1`"
-                                       AC_ARG_WITH(dbusdir, [  --with-dbusdir          set DBUS configuration directory ], dbusdir="$withval", dbusdir="/etc/dbus-1")
-                                       DBUSDIR="$dbusdir"
-                                       AC_CHECK_LIB(dbus-1,
-                                           dbus_message_iter_init_append,
-                                           AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
-                               else
-                                       AC_MSG_RESULT(no)
-                               fi
-                       fi
-               fi
-               ;;
 esac
 
 AC_SUBST(CUPS_DEFAULT_PRINTADMIN_AUTH)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTADMIN_AUTH, "$CUPS_DEFAULT_PRINTADMIN_AUTH")
 AC_SUBST(CUPS_SYSTEM_AUTHKEY)
-
-dnl See if we have POSIX ACL support...
-SAVELIBS="$LIBS"
-LIBS=""
-AC_SEARCH_LIBS(acl_init, acl, AC_DEFINE(HAVE_ACL_INIT))
-CUPSDLIBS="$CUPSDLIBS $LIBS"
-LIBS="$SAVELIBS"
-
-AC_SUBST(BACKLIBS)
-AC_SUBST(CUPSDLIBS)
-AC_SUBST(DBUSDIR)
-
-dnl New default port definition for IPP...
-AC_ARG_WITH(ipp-port, [  --with-ipp-port         set default port number for IPP ],
-       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(FONTS)
+AC_SUBST(LEGACY_BACKENDS)
 
 dnl
 dnl End of "$Id$".
index 0bcbfaa158ea5f210ea6093fffacc39c602328fb..1b11dfb9769d2d516e7d263238cc1b3d24fa7918 100644 (file)
@@ -4,7 +4,7 @@ dnl
 dnl   Default cupsd configuration settings for the Common UNIX Printing System
 dnl   (CUPS).
 dnl
-dnl   Copyright 2007 by Apple Inc.
+dnl   Copyright 2007-2008 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
@@ -337,6 +337,14 @@ AC_ARG_WITH(snmp-community, [  --with-snmp-community   set SNMP community, defau
 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 default port number for IPP ],
+       DEFAULT_IPP_PORT="$withval",
+       DEFAULT_IPP_PORT="631")
+
+AC_SUBST(DEFAULT_IPP_PORT)
+AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
+
 dnl
 dnl End of "$Id$".
 dnl