]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-common.m4
Load cups into easysw/current.
[thirdparty/cups.git] / config-scripts / cups-common.m4
index 3a9d68d5026cd7129d41aa827af20a318294bf76..03a348031ada76603bb3e3ba5df3de98ad95dedb 100644 (file)
@@ -1,9 +1,9 @@
 dnl
-dnl "$Id: cups-common.m4 181 2006-06-22 20:01:18Z jlovell $"
+dnl "$Id: cups-common.m4 6304 2007-02-22 22:06:23Z mike $"
 dnl
 dnl   Common configuration stuff for the Common UNIX Printing System (CUPS).
 dnl
-dnl   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+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 Easy Software Products and are protected by Federal
@@ -132,6 +132,7 @@ AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H))
 AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
 AC_CHECK_HEADER(usersec.h,AC_DEFINE(HAVE_USERSEC_H))
 AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
+AC_CHECK_HEADER(scsi/sg.h,AC_DEFINE(HAVE_SCSI_SG_H))
 
 dnl Checks for string functions.
 AC_CHECK_FUNCS(strdup strcasecmp strncasecmp strlcat strlcpy)
@@ -191,6 +192,7 @@ dnl Extra platform-specific libraries...
 BACKLIBS=""
 CUPSDLIBS=""
 DBUSDIR=""
+CUPS_SYSTEM_AUTHKEY=""
 
 AC_ARG_ENABLE(dbus, [  --enable-dbus           enable DBUS support, default=auto])
 
@@ -221,6 +223,12 @@ case $uname in
                dnl Check for notify_post support
                AC_CHECK_HEADER(notify.h,AC_DEFINE(HAVE_NOTIFY_H))
                AC_CHECK_FUNCS(notify_post)
+
+               dnl Check for Authorization Services support
+               AC_CHECK_HEADER(Security/Authorization.h, [
+                       AC_DEFINE(HAVE_AUTHORIZATION_H)
+                       CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences"])
+               AC_CHECK_HEADER(Security/SecBasePriv.h,AC_DEFINE(HAVE_SECBASEPRIV_H))
                 ;;
 
        Linux*)
@@ -231,12 +239,14 @@ case $uname in
                                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)
-                                           CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
-                                           CUPSDLIBS="`$PKGCONFIG --libs dbus-1`"
-                                           DBUSDIR="/etc/dbus-1/system.d")
+                                           AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
                                else
                                        AC_MSG_RESULT(no)
                                fi
@@ -245,6 +255,8 @@ case $uname in
                ;;
 esac
 
+AC_SUBST(CUPS_SYSTEM_AUTHKEY)
+
 dnl See if we have POSIX ACL support...
 SAVELIBS="$LIBS"
 LIBS=""
@@ -265,5 +277,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
 
 dnl
-dnl End of "$Id: cups-common.m4 181 2006-06-22 20:01:18Z jlovell $".
+dnl End of "$Id: cups-common.m4 6304 2007-02-22 22:06:23Z mike $".
 dnl