summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1000
-rw-r--r--INSTALL50
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in148
-rw-r--r--NEWS99
-rw-r--r--README6
-rw-r--r--aclocal.m41749
-rwxr-xr-xconfig.guess51
-rw-r--r--config.h.in20
-rwxr-xr-xconfig.sub69
-rwxr-xr-xconfigure3258
-rw-r--r--configure.ac72
-rw-r--r--data/ConsoleKit.conf94
-rwxr-xr-xdata/ConsoleKit.in70
-rw-r--r--data/ConsoleKit.policy48
-rw-r--r--data/Makefile.am20
-rw-r--r--data/Makefile.in223
-rw-r--r--data/org.freedesktop.ConsoleKit.service.in4
-rwxr-xr-xdepcomp64
-rw-r--r--doc/ConsoleKit.xml4
-rw-r--r--doc/Makefile.in107
-rw-r--r--doc/xml/ref-ck-manager.xml20
-rwxr-xr-xinstall-sh348
-rw-r--r--libck-connector/Makefile.am2
-rw-r--r--libck-connector/Makefile.in156
-rwxr-xr-xmissing61
-rw-r--r--pam-ck-connector/Makefile.in143
-rw-r--r--pam-ck-connector/pam-ck-connector.c9
-rw-r--r--pam-ck-connector/pam_ck_connector.82
-rw-r--r--src/Makefile.am41
-rw-r--r--src/Makefile.in283
-rw-r--r--src/ck-event-logger.c420
-rw-r--r--src/ck-event-logger.h66
-rw-r--r--src/ck-log-event.c1284
-rw-r--r--src/ck-log-event.h148
-rw-r--r--src/ck-manager-glue.h51
-rw-r--r--src/ck-manager.c2013
-rw-r--r--src/ck-manager.h17
-rw-r--r--src/ck-manager.xml9
-rw-r--r--src/ck-marshal.c8
-rw-r--r--src/ck-run-programs.c230
-rw-r--r--src/ck-run-programs.h38
-rw-r--r--src/ck-seat-glue.h12
-rw-r--r--src/ck-seat.c158
-rw-r--r--src/ck-seat.h4
-rw-r--r--src/ck-session-glue.h14
-rw-r--r--src/ck-session-leader.c567
-rw-r--r--src/ck-session-leader.h97
-rw-r--r--src/ck-session.c107
-rw-r--r--src/ck-session.h3
-rw-r--r--src/ck-sysdeps-solaris.c45
-rw-r--r--src/ck-sysdeps-unix.c40
-rw-r--r--src/ck-vt-monitor.c61
-rw-r--r--src/main.c66
-rw-r--r--src/test-event-logger.c94
-rwxr-xr-xsrc/test-open-session-with-parameters2
-rw-r--r--tools/Makefile.am66
-rw-r--r--tools/Makefile.in339
-rw-r--r--tools/ck-collect-session-info.c6
-rw-r--r--tools/ck-history.c866
-rw-r--r--tools/ck-launch-session.c92
-rw-r--r--tools/ck-log-system-restart.c174
-rw-r--r--tools/ck-log-system-start.c174
-rw-r--r--tools/ck-log-system-stop.c174
-rw-r--r--tools/freebsd/Makefile.am38
-rw-r--r--tools/freebsd/Makefile.in585
-rwxr-xr-xtools/freebsd/ck-system-restart12
-rwxr-xr-xtools/freebsd/ck-system-stop18
-rw-r--r--tools/linux/Makefile.am38
-rw-r--r--tools/linux/Makefile.in203
-rwxr-xr-xtools/linux/ck-system-restart12
-rwxr-xr-xtools/linux/ck-system-stop12
-rw-r--r--tools/list-sessions.c58
-rw-r--r--tools/solaris/Makefile.am38
-rw-r--r--tools/solaris/Makefile.in585
-rwxr-xr-xtools/solaris/ck-system-restart3
-rwxr-xr-xtools/solaris/ck-system-stop3
77 files changed, 13055 insertions, 4218 deletions
diff --git a/ChangeLog b/ChangeLog
index c93f184..72964b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,1003 @@
+commit 9e78825cef3db4e13cffbfd024bda365403aa6ba
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Mon Feb 25 19:19:31 2008 -0500
+
+ always create the directories we need
+
+ src/ck-event-logger.c | 22 ++++++++++++++--
+ src/ck-manager.c | 63
+ ++++++++++++++++++++++++++++++------------------
+ src/main.c | 50 ++++++++++++++++++++++++++++----------
+ 3 files changed, 95 insertions(+), 40 deletions(-)
+
+commit 414f7cc1e62474da69058884c5b683dc20e3a8f6
+Author: Simon Zheng <simon.zheng@sun.com>
+Date: Mon Feb 25 17:14:11 2008 -0500
+
+ properly get display device on Solaris
+
+ Mapping between device path and (major, minor).
+ "/dev/vt" -- (15,*)
+ "/dev/pts" -- (24,*)
+ "/dev/console" -- (0,0)
+ "NO_TTY_VALUE" - (-1,-1)
+
+ Also, solaris VT device is named like this.
+ /dev/console --- VT #1
+ /dev/vt/2 --- VT #2
+ /dev/vt/3 --- VT #3
+ /dev/vt/N --- VT #4
+
+ src/ck-sysdeps-solaris.c | 16 ++++++++++++----
+ 1 files changed, 12 insertions(+), 4 deletions(-)
+
+commit 5315cd9e36f86f9d1ea1419c6521524a68801d4a
+Author: Brian Cameron <brian.cameron@sun.com>
+Date: Mon Feb 25 16:37:03 2008 -0500
+
+ fix solaris x11-display-device when no vt available
+
+ This patch fixes ConsoleKit
+ so it sets x11-display-device to "/dev/console" when not using
+ VT.
+
+ src/ck-sysdeps-solaris.c | 11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+commit fc9abc6db6616b6960db070c98bad21f990a040e
+Author: Brian Cameron <Brian.Cameron@sun.com>
+Date: Mon Feb 25 15:17:10 2008 -0500
+
+ solaris doesn't like printing null
+
+ src/ck-seat.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f993c1d8970e3aae7de7dea6e1ae5c6d325865b2
+Author: Brian Cameron <Brian.Cameron@sun.com>
+Date: Mon Feb 25 15:11:02 2008 -0500
+
+ fix display of active vt when vt is disabled
+
+ This fixes the Active device so it is set to "/dev/console" when not
+ using VT. Without this patch, the syslog reports messages like:
+
+ Active device: /dev/vt/3508388860
+
+ Which is obviously wrong if not using VT at all.
+
+ src/ck-sysdeps-solaris.c | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit f39d3756e1d9da62de923ba470d3312b89bea6be
+Author: Brian Cameron <Brian.Cameron@sun.com>
+Date: Mon Feb 25 15:05:44 2008 -0500
+
+ fix solaris vt handling to work when no vt available
+
+ This fixes the patch that
+ Simon Zhang sent you earlier so that it builds on machines
+ without VT.
+
+ src/ck-vt-monitor.c | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit f551717e1830e86a8ccf5312f79ce8882af9f352
+Author: Simon Zheng <Simon.Zheng@sun.com>
+Date: Tue Feb 19 11:34:15 2008 -0500
+
+ improve supporting Solaris VT switching
+
+ Here's a patch for ConsoleKit to improve supporting Solaris VT. Two
+ changes are made.
+
+ - Solaris supports synchronous event notification in STREAMS. Using
+ this, we can avoid creating many threads for idle VTs.
+
+ By setting the S_MSG flag in an I_SETSIG STREAMS ioctl, applications
+ can
+ get a synchronous notification of VT switching. In other words, these
+ processes are able to receive a SIGPOLL signal when a VT switching
+ succeeds.
+
+ - Change a little command line of getting maximum vt console numbers.
+
+ src/ck-sysdeps-solaris.c | 2 +-
+ src/ck-vt-monitor.c | 59
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 60 insertions(+), 1 deletions(-)
+
+commit 94d4dd225c6d161411f33396aec23a33a6661da6
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Tue Feb 19 11:04:51 2008 -0500
+
+ don't include paths.h on systems that don't have it
+
+ src/ck-event-logger.c | 1 -
+ tools/ck-launch-session.c | 5 +++++
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 190aed4effbfb9a982f46250c82994f58f4e5fb5
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Wed Feb 13 11:37:20 2008 -0500
+
+ create the log file with S_IROTH and don't touch the log on build
+
+ src/Makefile.am | 2 --
+ src/ck-event-logger.c | 3 ++-
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+commit 6dda865f8fbe87a10a6047eb2db2c4fd1c94af17
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Tue Feb 12 22:55:58 2008 -0500
+
+ post release version bump
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 72ce8d82848a6ee9634d9dd1610c5ba0074db4ae
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Tue Feb 12 22:54:24 2008 -0500
+
+ update for release
+
+ NEWS | 3 +++
+ tools/Makefile.am | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 5ab3eee820e97d632aa9401cbd2d25dc828ee1f0
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Tue Feb 12 22:30:05 2008 -0500
+
+ ck_seat_get_active_session shouldn't return a null ssid
+
+ Da bus no likey nulls for object paths. Return false and set
+ error if there is no active session.
+
+ src/ck-manager.c | 31 +++++++++++--------------------
+ src/ck-seat.c | 26 +++++++++++++++++++++++---
+ src/test-method-access-policy | 2 +-
+ 3 files changed, 35 insertions(+), 24 deletions(-)
+
+commit 885708f75f493b85fb67114d112e950b6bfac652
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Tue Feb 12 15:32:15 2008 -0500
+
+ guard against writing null string to keyfile
+
+ Also make criticals fatal when starting with --debug.
+
+ src/ck-seat.c | 6 +++++-
+ src/ck-session.c | 47 ++++++++++++++++++++++++++++++++++++++---------
+ src/main.c | 5 +++++
+ 3 files changed, 48 insertions(+), 10 deletions(-)
+
+commit 40dff5a03c7b085e34a7052efd23651d5be7674f
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Tue Feb 12 15:00:46 2008 -0500
+
+ reverse the sense of the dbus policy
+
+ Deny first and then allow. Add a simple test
+ script to check method access policy.
+
+ NEWS | 7 +
+ data/ConsoleKit.conf | 94 ++++++--
+ src/test-method-access-policy | 517
+ +++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 598 insertions(+), 20 deletions(-)
+
+commit 685f2cbf9d69da556907ba6c935fe6ab1d2eeda3
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Mon Feb 11 15:31:42 2008 -0500
+
+ add a ck-launch-session tool
+
+ This tool opens a session with ConsoleKit and runs a command in it.
+
+ Makefile.am | 2 +-
+ tools/.gitignore | 1 +
+ tools/Makefile.am | 11 ++++++
+ tools/ck-launch-session.c | 87
+ +++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 100 insertions(+), 1 deletions(-)
+
+commit e2fa0c66a6ef8dafa8b503d0b077deb17f3fc512
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Mon Feb 11 14:51:21 2008 -0500
+
+ don't set the session-type to the command name
+
+ tools/ck-collect-session-info.c | 6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+commit e0f13df14e4f7289c35ebb376eaf7e1ffb2a2317
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Mon Feb 11 13:09:56 2008 -0500
+
+ post release version bump
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bceedd666cd25abf0aa09807bdb17ddf87f503f9
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Mon Feb 11 13:08:13 2008 -0500
+
+ update for release
+
+ NEWS | 11 +++++++++++
+ tools/.gitignore | 2 ++
+ 2 files changed, 13 insertions(+), 0 deletions(-)
+
+commit 3f178c6d15daed161fe3bd7f5d9019a592cc564a
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Mon Feb 11 12:33:16 2008 -0500
+
+ add tools to log restart and stop events
+
+ This should probably be used by init instead of
+ logging the event from CK.
+
+ tools/Makefile.am | 20 +++++
+ tools/ck-log-system-restart.c | 174
+ +++++++++++++++++++++++++++++++++++++++++
+ tools/ck-log-system-stop.c | 174
+ +++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 368 insertions(+), 0 deletions(-)
+
+commit 710a4f5404049762ea49644c74aadb59737be37d
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Mon Feb 11 11:11:45 2008 -0500
+
+ fix typo in dbus policy file
+
+ data/ConsoleKit.conf | 2 +-
+ src/test-open-session-with-parameters | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit e59d5e9a9974a14043c98c292936584cefa930d3
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Thu Feb 7 19:29:34 2008 -0500
+
+ touch the history file to create it for people not using packages
+
+ src/Makefile.am | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit a7a00ec7f7237bd0150ed98dba5e796236135e28
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Wed Feb 6 17:04:14 2008 -0500
+
+ mkdir /var/log/ConsoleKit at install time
+
+ src/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit edd2422e91f80850c1adfcd3d6d6c723b7947ccf
+Author: William Jon McCann <jmccann@redhat.com>
+Date: Tue Feb 5 11:12:33 2008 -0500
+
+ set a global flag so that D-Bus does not change the SIGPIPE handler
+ in the PAM module
+
+ pam-ck-connector/pam-ck-connector.c | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 076d63698c204427b210a2da76dc1b7e6640bbb9
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Fri Feb 1 14:20:00 2008 -0500
+
+ when a parsing error occurs don't return an empty event
+
+ src/ck-log-event.c | 21 +++++++++++++--------
+ tools/ck-history.c | 12 ++++++------
+ 2 files changed, 19 insertions(+), 14 deletions(-)
+
+commit 185c0f5169dbcb55854491d9ab642c7b5c6418ca
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 30 20:12:47 2008 -0500
+
+ post release version bump
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 53e2ffa946b09dc29d40d822a290e30fbe169888
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 30 20:11:47 2008 -0500
+
+ update for 0.2.7 release
+
+ NEWS | 15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit a034e3992b4c9c2d3723b14003483d4b39eab118
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Tue Jan 29 16:16:35 2008 -0500
+
+ update gitignore files
+
+ data/.gitignore | 1 +
+ src/.gitignore | 1 +
+ tools/.gitignore | 4 +++-
+ 3 files changed, 5 insertions(+), 1 deletions(-)
+
+commit c08f52a53901cda1082a010cb2d6b013f3ae50a4
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Tue Jan 29 16:14:04 2008 -0500
+
+ add a helper to write a system start record to the CK history
+
+ src/ck-log-event.c | 2 +-
+ tools/Makefile.am | 13 +++
+ tools/ck-log-system-start.c | 174
+ +++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 188 insertions(+), 1 deletions(-)
+
+commit 1a545ba0744532f2936899806523214d3a067769
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Tue Jan 29 14:06:45 2008 -0500
+
+ add support for logging start/stop/restart
+
+ Also enable reporting this information with ck-history.
+
+ src/ck-log-event.c | 211 ++++++++++++++++++++++++-
+ src/ck-log-event.h | 19 ++-
+ src/ck-manager.c | 59 +++++++-
+ tools/ck-history.c | 444
+ ++++++++++++++++++++++++++++++++++------------------
+ 4 files changed, 564 insertions(+), 169 deletions(-)
+
+commit d8dcc8755a87a238ba37bc5275f142c92535915e
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Mon Jan 28 22:26:53 2008 -0500
+
+ fix typo in man page
+
+ pam-ck-connector/pam_ck_connector.8 | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f38aba5d2a26b7c9ea0b7a5631281ed7cf678de4
+Author: Marc-Andre Lureau <marcandre.lureau@gmail.com>
+Date: Mon Jan 28 22:23:35 2008 -0500
+
+ make autogen work with aclocal 1.10
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=14175
+
+ autogen.sh | 179
+ +++++--------------------------------------
+ libck-connector/Makefile.am | 2 +-
+ 2 files changed, 19 insertions(+), 162 deletions(-)
+
+commit 48519104df6037f8653ec62497796ba781dc0040
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Mon Jan 28 19:56:19 2008 -0500
+
+ allow session type filtering for all report formats
+
+ tools/ck-history.c | 31 ++++++++++++++++++++++---------
+ 1 files changed, 22 insertions(+), 9 deletions(-)
+
+commit 5895396bc583ae08c5041f5b81f5f9d0a2888e22
+Author: Brian Cameron <brian.cameron@sun.com>
+Date: Mon Jan 28 17:43:05 2008 -0500
+
+ make polkit optional and use RBAC on Solaris
+
+ This patch makes polkit an optional dependency. If present
+ it builds with it. If not, polkit support is disabled.
+
+ This patch also adds a --enable-rbac-shutdown=<key> option.
+ If set, then ConsoleKit will allow shutdown/reboot if the
+ user has the RBAC key authorization defined. For example,
+ since the GDM GUI program runs as the "gdm" user, setting
+ the key for the "gdm" user allows the login program to
+ shutdown and reboot via ConsoleKit.
+
+ Also this patch modifies the tools/solaris/ck-system-restart
+ and tools/solaris/ck-system-stop scripts to call "/sbin/init 6"
+ and "/sbin/init 5", which are the right commands for Solaris.
+
+ configure.ac | 30 ++++++++++++++++-
+ data/Makefile.am | 2 +
+ src/Makefile.am | 7 ++++
+ src/ck-manager.c | 71
+ ++++++++++++++++++++++++++++++++++++++-
+ tools/solaris/ck-system-restart | 11 +-----
+ tools/solaris/ck-system-stop | 11 +-----
+ 6 files changed, 110 insertions(+), 22 deletions(-)
+
+commit 96d613ee9a4850753e8f93113ab28ed3045f73f3
+Author: Brian Cameron <brian.cameron@sun.com>
+Date: Mon Jan 28 17:30:47 2008 -0500
+
+ fixes for solaris
+
+ Fixes two bugs I found in the code. The first is that
+ we need some NULL protection around the g_strdup_printf
+ where we build CK_SESSION_X11_DISPLAY to avoid a crash.
+
+ Second, I noticed a bug in the ck_unix_pid_get_hash
+ function where we weren't parsing the data right and
+ causing the hash to not get set properly.
+
+ src/ck-session.c | 3 ++-
+ src/ck-sysdeps-solaris.c | 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 9aca4062ec226c8099b5d46467ad72792e9977dc
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Mon Jan 28 17:17:13 2008 -0500
+
+ add session-type filtering to ck-history
+
+ src/ck-seat.c | 2 ++
+ tools/ck-history.c | 22 ++++++++++++++--------
+ 2 files changed, 16 insertions(+), 8 deletions(-)
+
+commit 6fe785aaddda2537aa4335e88c0606eda36b75ee
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Mon Jan 28 10:59:04 2008 -0500
+
+ try to activate x11-display-device not only display-device
+
+ src/ck-seat.c | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit af7dbbc29151ccfe063625159ea531fbbfc85a07
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Thu Jan 24 09:38:26 2008 -0500
+
+ post release version bump
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2064706053eb73d88655c0e1bc8dd7d1e144034e
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Thu Jan 24 09:37:16 2008 -0500
+
+ update for 0.2.6 release
+
+ NEWS | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit d3e1069434bfff5e0c6236cbdec20db2a7d68d2c
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 23 23:12:02 2008 -0500
+
+ be a little smarter about how we compute the number of users
+
+ src/ck-manager.c | 96
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 94 insertions(+), 2 deletions(-)
+
+commit 8dd0bb52b3cabf8673ecd3ede820b48ab6f6436f
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 23 21:59:48 2008 -0500
+
+ fix policy action name
+
+ data/ConsoleKit.policy | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 4833651f336ee8f1cb266cf0c61fe527d3d5f713
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 23 16:26:22 2008 -0500
+
+ post release version bump
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 40d21bbea73ae15afb4823d58cada8ab9399235f
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 23 16:25:23 2008 -0500
+
+ release 0.2.5
+
+ NEWS | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 3c618213b2ada61496b49c4d8c5612df4f082d14
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 23 16:07:15 2008 -0500
+
+ history should log to /var/log not /var/run
+
+ src/ck-event-logger.c | 2 +-
+ src/ck-manager.c | 2 +-
+ tools/ck-history.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+commit b1d56d43f357185594e5730d6bfb7e7db1f633c3
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 23 15:06:02 2008 -0500
+
+ post release version bump
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8ec349dc86f617c8055c091fd5a9be80889d96f1
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 23 14:30:48 2008 -0500
+
+ release 0.2.4
+
+ NEWS | 36 ++++++++++++++++++++++++++++++++++++
+ configure.ac | 2 ++
+ 2 files changed, 38 insertions(+), 0 deletions(-)
+
+commit 8148ef7a28e3f52f7bd91a0f85fd47ce0cb1d11f
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 23 13:16:30 2008 -0500
+
+ actually register the error type with dbus
+
+ src/ck-manager.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 6ad7516f69f08c9c5e30332f95b50c0dd0cd1cb1
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 23 11:04:23 2008 -0500
+
+ add GetSessions method to Manager interface
+
+ doc/spec/ck-manager.xml | 17 +++++++++++++++++
+ doc/xml/ref-ck-manager.xml | 10 +++++++++-
+ src/ck-manager.c | 25 +++++++++++++++++++++++++
+ src/ck-manager.h | 3 +++
+ src/ck-manager.xml | 3 +++
+ 5 files changed, 57 insertions(+), 1 deletions(-)
+
+commit 4b866a4af70fb19e8b0652637815ab24ad630065
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Jan 23 09:37:55 2008 -0500
+
+ add error type to manager
+
+ src/ck-manager.c | 22 ++++++++++++++++++++++
+ src/ck-manager.h | 6 +++++-
+ 2 files changed, 27 insertions(+), 1 deletions(-)
+
+commit 5ce97e6f22fd25279793fbc75211d2e86413ae73
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Tue Jan 22 17:03:46 2008 -0500
+
+ initial stop/restart support
+
+ Add Stop and Restart methods to the Manager object. We'll rename the
+ Manager object to System in the near future. Use libpolkit to
+ determine authorization.
+
+ configure.ac | 2 +
+ data/ConsoleKit.policy | 48 +++
+ data/Makefile.am | 4 +
+ doc/spec/ck-manager.xml | 18 +
+ doc/xml/ref-ck-manager.xml | 10 +-
+ src/ck-manager.c | 667
+ +++++++++++++++++++++++++++++++++++----
+ src/ck-manager.h | 10 +-
+ src/ck-manager.xml | 6 +
+ tools/Makefile.am | 10 +
+ tools/freebsd/Makefile.am | 38 +++
+ tools/freebsd/ck-system-restart | 12 +
+ tools/freebsd/ck-system-stop | 18 +
+ tools/linux/Makefile.am | 38 ++-
+ tools/linux/ck-system-restart | 12 +
+ tools/linux/ck-system-stop | 12 +
+ tools/solaris/Makefile.am | 38 +++
+ tools/solaris/ck-system-restart | 12 +
+ tools/solaris/ck-system-stop | 12 +
+ 18 files changed, 890 insertions(+), 77 deletions(-)
+
+commit 2fba24e67597bf59ae00db2867df7a348c81b094
+Author: Peter Jones <pjones@redhat.com>
+Date: Sat Dec 8 23:04:03 2007 -0500
+
+ use VT_GETSTATE and tty0 to identify a console_ioctl on linux
+
+ ConsoleKit tries to find a valid fd it can issue
+ VT_WAITACTIVE against by iterating across a file list and issuing
+ ioctl(fd, KDGKBTYPE, &arg), then checking the return value.
+ Not all console
+ devices support this ioctl, so in some cases it never finds a
+ valid file
+ descriptor to use, and from then on never marks any session active.
+
+ We probably ought to be using something like VT_GETSTATE instead of
+ a keyboard
+ ioctl, but that's not sufficient to fix it. One fix that seems to
+ work, though
+ I'm not completely sure if it's the best answer, is to add /dev/tty0
+ to the list
+ of files to try before /dev/console.
+
+ src/ck-sysdeps-unix.c | 13 +++++++++----
+ 1 files changed, 9 insertions(+), 4 deletions(-)
+
+commit 751b95f2aa2eb2cea7fe9e0dec0848865d118ad0
+Author: Michael Biebl <mbiebl@gmail.com>
+Date: Sat Dec 8 22:50:17 2007 -0500
+
+ remove obsolete sysv init script
+
+ given that my first patch get's applied, it makes sense to remove the
+ old sysv init script, as it's not really needed anymore. Besides, most
+ distros will not use this init script anyways as they have special
+ policies for their init script and provide their own.
+
+ data/ConsoleKit.in | 70
+ ----------------------------------------------------
+ data/Makefile.am | 15 +----------
+ 2 files changed, 1 insertions(+), 84 deletions(-)
+
+commit eb610a07a17db29138df50cafa4cf131a645332e
+Author: Michael Biebl <mbiebl@gmail.com>
+Date: Sat Dec 8 22:45:42 2007 -0500
+
+ start CK service on-demand using D-Bus system activation
+
+ the attached patch installs a D-Bus system service file. This way the
+ CK service can be started on demand. This obviously makes the sysv
+ init script obsolete.
+ Requirements are dbus >= 1.1.2
+
+ data/Makefile.am | 9 ++++++++-
+ data/org.freedesktop.ConsoleKit.service.in | 4 ++++
+ 2 files changed, 12 insertions(+), 1 deletions(-)
+
+commit 7d167e65868cb2aa40273ee8ccd33cca5968438b
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Mon Oct 22 21:23:08 2007 -0400
+
+ dump session leader info
+
+ src/ck-manager.c | 9 +++++++++
+ src/ck-session-leader.c | 15 ++++++++++++---
+ 2 files changed, 21 insertions(+), 3 deletions(-)
+
+commit 7b65ac249a1e28c9af25eb91919d898c3e0f8162
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Mon Oct 22 21:00:16 2007 -0400
+
+ error out if unknown options are passed on command line
+
+ src/main.c | 11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+commit 5db2f7fdc2d1c5a45bc33d916d82c23178568923
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Mon Oct 22 20:54:10 2007 -0400
+
+ move session leader stuff into a separate class
+
+ This will make it easier to dump/restore.
+
+ src/Makefile.am | 2 +
+ src/ck-manager.c | 482 +++++++++--------------------------------
+ src/ck-session-leader.c | 558
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ src/ck-session-leader.h | 97 ++++++++
+ 4 files changed, 762 insertions(+), 377 deletions(-)
+
+commit 252f542201036d36aa01ade9bd381624391cfb34
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Mon Oct 22 16:57:47 2007 -0400
+
+ try to handle log rotation
+
+ src/ck-event-logger.c | 53
+ +++++++++++++++++++++++++++++++++++++++++-------
+ 1 files changed, 45 insertions(+), 8 deletions(-)
+
+commit 4c842f1e108a0e9a412ac599cc4cfc954d801e62
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Mon Oct 22 16:14:07 2007 -0400
+
+ add support for reporting from logrotated files
+
+ configure.ac | 30 +++++++++--
+ src/ck-event-logger.c | 9 +++-
+ tools/Makefile.am | 6 ++-
+ tools/ck-history.c | 128
+ +++++++++++++++++++++++++++++++++++++++++++++----
+ 4 files changed, 154 insertions(+), 19 deletions(-)
+
+commit 7e30b7d07d2f6216b6a8d2f75f3494d3947f0584
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Mon Oct 22 11:34:02 2007 -0400
+
+ add a basic --frequent report
+
+ tools/ck-history.c | 109
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 109 insertions(+), 0 deletions(-)
+
+commit 73f5875de6c8d2e3f79fcb2c5d570836f6df74d5
+Merge: e419ced... 7b834cb...
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Sun Oct 21 23:59:55 2007 -0400
+
+ Merge branch 'master' of git+ssh://git.freedesktop.org/git/ConsoleKit
+
+commit e419ced301a9e0d5f98c8cee030fe50158a2d291
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Sun Oct 21 23:59:32 2007 -0400
+
+ add last mode, filtering by user/seat; shorten logged ids
+
+ src/ck-manager.c | 34 +++++++---
+ tools/ck-history.c | 177
+ ++++++++++++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 190 insertions(+), 21 deletions(-)
+
+commit 7b834cbcc29a2a8423569a738cef3bce3c9f10bd
+Author: William Jon McCann <mccannwj@acsnb1.pha.jhu.edu>
+Date: Sat Oct 20 19:17:52 2007 -0400
+
+ add bugzilla url
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7880c2eacaa45196b83a9032371f487f6fe312e4
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Fri Oct 19 16:46:43 2007 -0400
+
+ check for oldest being null
+
+ tools/ck-history.c | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 2ef61beadf1b4c938bb13bb3b460f69bcc720193
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Fri Oct 19 16:30:52 2007 -0400
+
+ rename --last to --last-compat
+
+ tools/ck-history.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 92c036e50f2d0989651c43e2db78110a2a2fd5b0
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Fri Oct 19 16:28:24 2007 -0400
+
+ a few fixes for last patch
+
+ tools/ck-history.c | 29 +++++++++++++++++++++++++----
+ 1 files changed, 25 insertions(+), 4 deletions(-)
+
+commit 489396ba206bb1e3b82bb504151b0a83d405b33d
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Fri Oct 19 16:16:18 2007 -0400
+
+ add a last compatible outout format to ck-history
+
+ tools/ck-history.c | 175
+ ++++++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 files changed, 169 insertions(+), 6 deletions(-)
+
+commit 36419b9ca34a89721746950eb78bb78c4bfb6206
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Thu Oct 18 16:43:00 2007 -0400
+
+ use AC_GNU_SOURCE instead of #define
+
+ configure.ac | 3 +++
+ src/ck-event-logger.c | 2 --
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 1773b5f77b9c575ab8fc3e3d692e8a7056fe2959
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Oct 17 17:09:03 2007 -0400
+
+ add a basic ck-history command
+
+ Refactor some event logging code to share with ck-history. At the
+ moment the command only prints the events.
+
+ src/Makefile.am | 10 +-
+ src/ck-event-logger.c | 486 +---------------------
+ src/ck-event-logger.h | 99 +-----
+ src/ck-log-event.c | 1084
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ src/ck-log-event.h | 131 ++++++
+ src/ck-manager.c | 42 +-
+ src/test-event-logger.c | 10 +-
+ tools/Makefile.am | 10 +
+ tools/ck-history.c | 157 +++++++
+ tools/list-sessions.c | 58 ++--
+ 10 files changed, 1458 insertions(+), 629 deletions(-)
+
+commit 0011a7aa94a9dbb00a322a1c08d5ac6a6dfdc21c
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Tue Oct 16 16:40:44 2007 -0400
+
+ add event logging capability
+
+ This adds the ability to log events to a history file. One idea
+ is to be able to provide wtmp like functionality. The next step
+ is to add a seat-aware "last" command. This will be very useful
+ for creating graphical logins that remember the most recent/frequent
+ logins.
+
+ src/Makefile.am | 13 +
+ src/ck-event-logger.c | 828
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ src/ck-event-logger.h | 161 +++++++++
+ src/ck-manager.c | 340 +++++++++++++++++++-
+ src/test-event-logger.c | 94 ++++++
+ 5 files changed, 1430 insertions(+), 6 deletions(-)
+
+commit a0a1ff87b1f4c93c147d5222a164138cb83ba149
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Thu Oct 11 15:06:14 2007 -0400
+
+ remove emacs modeline
+
+ configure.ac | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit b2be103bd606291319dc312f07d1f3fcbfdf634c
+Author: David Zeuthen <davidz@redhat.com>
+Date: Wed Oct 10 13:39:15 2007 -0400
+
+ maintain a file with the dump of the local database
+
+ This feature is useful for programs wanting to read the database
+ without going through the D-Bus interface. This is sometimes desirable
+ when both performance and runtime dependencies are important.
+
+ For security reasons the file is only readable for the super user.
+
+ src/Makefile.am | 2 +
+ src/ck-manager.c | 204
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ src/ck-seat.c | 86 ++++++++++++++++++++++-
+ src/ck-seat.h | 4 +
+ src/ck-session.c | 38 ++++++++++
+ src/ck-session.h | 3 +
+ 6 files changed, 330 insertions(+), 7 deletions(-)
+
+commit bd43c78b3ab2ec7f85b17cca46d4b46f8671cd29
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Oct 10 12:53:45 2007 -0400
+
+ remove session/seat from list before signaling
+
+ We should remove the session or seat from the lists before
+ calling out or emitting a signal. We steal from the lists
+ and then unref the objects when the signal is complete.
+
+ src/ck-manager.c | 57
+ ++++++++++++++++++++++++++++++++++++++++++-----------
+ src/ck-seat.c | 28 +++++++++++++++++++------
+ 2 files changed, 66 insertions(+), 19 deletions(-)
+
+commit a90ecd3544f03c16f6c5a97aafb1c0b33b58101c
+Author: David Zeuthen <davidz@redhat.com>
+Date: Thu Oct 4 20:39:09 2007 -0400
+
+ add a way to synchronously run programs on session
+ add/remove/activity_change
+
+ This patch adds support for running programs when
+
+ 1. A session is added
+ 2. A session is removed
+ 3. The activity of a session changes
+
+ Executables with the suffix .ck in the directories
+
+ $sysconfdir/ConsoleKit/run-session.d
+ (typically /etc/ConsoleKit/run-session.d)
+
+ and
+
+ $libdir/ConsoleKit/run-session.d
+ (typically /usr/lib/ConsoleKit/run-session.d)
+
+ will be run on each event. The former directory is meant to be used
+ for the system administrator and the latter is meant to be used by
+ programs.
+
+ Only when all programs in these directories have run, ConsoleKit will
+ resume event processing and e.g. broadcast the event on the system
+ message bus. Hence, this new mechanism can be used to safely
+ (e.g. without race conditions) perform operations on certain resources
+ before programs in the desktop session are told they may use them. The
+ obvious example here is managing ACL's on /dev such that certain
+ device nodes are only available to users in local and active sessions.
+
+ The environment of the program launched is the environment that the
+ ConsoleKit daemon was launched with and also the following variables
+ (variables tagged with [*] may not be set).
+
+ CK_SESSION_ID
+ CK_SESSION_TYPE
+ CK_SESSION_SEAT_ID
+ CK_SESSION_USER_UID
+ CK_SESSION_DISPLAY_DEVICE [*]
+ CK_SESSION_X11_DISPLAY_DEVICE [*]
+ CK_SESSION_X11_DISPLAY [*]
+ CK_SESSION_REMOTE_HOST_NAME [*]
+ CK_SESSION_IS_ACTIVE
+ CK_SESSION_IS_LOCAL
+
+ corresponding to the properties of a Session object in question. Each
+ program is passed exactly one parameter that can assume one of the
+ following values:
+
+ - session_active_changed: is_active changed
+ - session_added: the session was added
+ - session_removed: the session was removed
+
+ As a safety hatch, there is a timeout of 15 seconds for each program;
+ if it hasn't exited within 15 seconds, the daemon will send it a
+ SIGTERM signal, and move on to the next program. The daemon is still
+ responsive when the program is running - this is to ensure that the
+ program itself can call into the org.freedesktop.ConsoleKit service.
+
+ src/Makefile.am | 6 ++
+ src/ck-run-programs.c | 230
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ src/ck-run-programs.h | 38 ++++++++
+ src/ck-seat.c | 5 +
+ src/ck-session.c | 39 ++++++++
+ 5 files changed, 318 insertions(+), 0 deletions(-)
+
+commit ad9dbd345dbec43ffc24481a0d21c261e49347fb
+Author: Brian Cameron <brian.camerson@sun.com>
+Date: Wed Sep 19 21:19:31 2007 -0400
+
+ don't use VT_GETSTATE when VT is unavailable
+
+ src/ck-sysdeps-solaris.c | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 03c9196f59c849515f650e2eb1a190a10908a8ee
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Sep 19 11:13:31 2007 -0400
+
+ try to make things work for systems that don't support VT_ACTIVATE etc
+
+ configure.ac | 2 ++
+ src/ck-sysdeps-unix.c | 27 +++++++++++++++++++++++----
+ 2 files changed, 25 insertions(+), 4 deletions(-)
+
+commit 54582a7287f036bd6b65434e4b4888405972130d
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Wed Sep 19 10:03:22 2007 -0400
+
+ add wiki to readme
+
+ README | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 024fe2c942e1b3e5ddec8e829242017c9842393e
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Tue Sep 18 11:12:54 2007 -0400
+
+ post release version bump
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit eacf90d95c91db99c5946f00c95484fb66ec1b2a
+Author: William Jon McCann <mccann@jhu.edu>
+Date: Tue Sep 18 11:11:38 2007 -0400
+
+ update for brown bag release
+
+ NEWS | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
commit f35dee9696d81630216e283bcd91ca491febe153
Author: William Jon McCann <mccann@jhu.edu>
Date: Tue Sep 18 01:09:04 2007 -0400
diff --git a/INSTALL b/INSTALL
index 23e5f25..5458714 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,8 +1,8 @@
Installation Instructions
*************************
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
@@ -10,7 +10,10 @@ unlimited permission to copy, distribute and modify it.
Basic Installation
==================
-These are generic installation instructions.
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -23,9 +26,9 @@ debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. (Caching is
+the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
-cache files.)
+cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
@@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system. If you're
- using `csh' on an old version of System V, you might need to type
- `sh ./configure' instead to prevent `csh' from trying to execute
- `configure' itself.
+ `./configure' to configure the package for your system.
- Running `configure' takes awhile. While running, it prints some
- messages telling which features it is checking for.
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
2. Type `make' to compile the package.
@@ -78,7 +78,7 @@ details on some of the pertinent environment variables.
by setting variables in the command line or in the environment. Here
is an example:
- ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
@@ -87,17 +87,15 @@ Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
-own directory. To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'. `cd' to the
+own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
- If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory. After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
Installation Names
==================
@@ -190,12 +188,12 @@ them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script). Here is a another example:
+overridden in the site shell script).
- /bin/bash ./configure CONFIG_SHELL=/bin/bash
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
diff --git a/Makefile.am b/Makefile.am
index 95be344..811a696 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,10 +6,10 @@ NULL =
SUBDIRS = \
src \
+ libck-connector \
tools \
data \
doc \
- libck-connector \
pam-ck-connector \
$(NULL)
diff --git a/Makefile.in b/Makefile.in
index aa0a493..32c3bb4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +15,11 @@
@SET_MAKE@
# This file will be processed with automake-1.7 to create Makefile.in
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,19 +33,19 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
TODO config.guess config.sub depcomp install-sh ltmain.sh \
missing
-subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
+ configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
@@ -57,10 +53,13 @@ SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
@@ -76,8 +75,6 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -90,12 +87,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CK_BACKEND = @CK_BACKEND@
-CK_COMPILE_FREEBSD_FALSE = @CK_COMPILE_FREEBSD_FALSE@
-CK_COMPILE_FREEBSD_TRUE = @CK_COMPILE_FREEBSD_TRUE@
-CK_COMPILE_LINUX_FALSE = @CK_COMPILE_LINUX_FALSE@
-CK_COMPILE_LINUX_TRUE = @CK_COMPILE_LINUX_TRUE@
-CK_COMPILE_SOLARIS_FALSE = @CK_COMPILE_SOLARIS_FALSE@
-CK_COMPILE_SOLARIS_TRUE = @CK_COMPILE_SOLARIS_TRUE@
CONSOLE_KIT_CFLAGS = @CONSOLE_KIT_CFLAGS@
CONSOLE_KIT_LIBS = @CONSOLE_KIT_LIBS@
CONSOLE_KIT_PID_FILE = @CONSOLE_KIT_PID_FILE@
@@ -112,17 +103,11 @@ DBUS_SYS_DIR = @DBUS_SYS_DIR@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DOCBOOK_DOCS_ENABLED_FALSE = @DOCBOOK_DOCS_ENABLED_FALSE@
-DOCBOOK_DOCS_ENABLED_TRUE = @DOCBOOK_DOCS_ENABLED_TRUE@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_INOTIFY_FALSE = @ENABLE_INOTIFY_FALSE@
-ENABLE_INOTIFY_TRUE = @ENABLE_INOTIFY_TRUE@
-ENABLE_PAM_MODULE_FALSE = @ENABLE_PAM_MODULE_FALSE@
-ENABLE_PAM_MODULE_TRUE = @ENABLE_PAM_MODULE_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
@@ -132,8 +117,10 @@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_PAM = @HAVE_PAM@
-HAVE_PAM_FALSE = @HAVE_PAM_FALSE@
-HAVE_PAM_TRUE = @HAVE_PAM_TRUE@
+HAVE_POLKIT = @HAVE_POLKIT@
+HISTORY_CFLAGS = @HISTORY_CFLAGS@
+HISTORY_LIBS = @HISTORY_LIBS@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -150,9 +137,8 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
@@ -168,10 +154,13 @@ PAM_MODULE_DIR = @PAM_MODULE_DIR@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+RBAC_LIBS = @RBAC_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -182,13 +171,14 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
XMLTO = @XMLTO@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -200,6 +190,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -227,16 +218,19 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.7
NULL =
SUBDIRS = \
src \
+ libck-connector \
tools \
data \
doc \
- libck-connector \
pam-ck-connector \
$(NULL)
@@ -312,7 +306,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
- $(MAKE) stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@@ -334,7 +328,6 @@ clean-libtool:
distclean-libtool:
-rm -f libtool
-uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -367,8 +360,7 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
@@ -470,24 +462,22 @@ distclean-tags:
distdir: $(DISTFILES)
$(am__remove_distdir)
- mkdir $(distdir)
- $(mkdir_p) $(distdir)/doc $(distdir)/libck-connector
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ test -d $(distdir) || mkdir $(distdir)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -501,7 +491,7 @@ distdir: $(DISTFILES)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -509,6 +499,8 @@ distdir: $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
@@ -516,7 +508,7 @@ distdir: $(DISTFILES)
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
@@ -591,7 +583,7 @@ distcheck: dist
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -663,12 +655,20 @@ info-am:
install-data-am:
+install-dvi: install-dvi-recursive
+
install-exec-am:
+install-html: install-html-recursive
+
install-info: install-info-recursive
install-man:
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -689,24 +689,26 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
- check-am clean clean-generic clean-libtool clean-recursive \
- ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-shar dist-tarZ dist-zip distcheck distclean \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+ dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
- distclean-recursive distclean-tags distcleancheck distdir \
- distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am uninstall-info-am
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am
# Creating ChangeLog from git log (taken from cairo/Makefile.am):
diff --git a/NEWS b/NEWS
index e8b7106..cc5d64a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,102 @@
+==============
+Version 0.2.10
+==============
+
+ * always create the directories we need (William Jon McCann)
+ * properly get display device on Solaris (Simon Zheng)
+ * fix solaris x11-display-device when no vt available (Brian Cameron)
+ * solaris doesn't like printing null (Brian Cameron)
+ * fix display of active vt when vt is disabled (Brian Cameron)
+ * fix solaris vt handling to work when no vt available (Brian Cameron)
+ * improve supporting Solaris VT switching (Simon Zheng)
+ * don't include paths.h on systems that don't have it (William Jon McCann)
+ * create the log file with S_IROTH and don't touch the log on build (William Jo
+
+=============
+Version 0.2.9
+=============
+
+ * ck_seat_get_active_session shouldn't return a null ssid (William Jon McCann)
+ * guard against writing null string to keyfile (William Jon McCann)
+ * reverse the sense of the dbus policy (William Jon McCann)
+ * add a ck-launch-session tool (William Jon McCann)
+ * don't set the session-type to the command name (William Jon McCann)
+
+=============
+Version 0.2.8
+=============
+
+ * add tools to log restart and stop events (William Jon McCann)
+ * fix typo in dbus policy file (William Jon McCann)
+ * touch the history file to create it for people not using packages (William Jon McCann)
+ * mkdir /var/log/ConsoleKit at install time (William Jon McCann)
+ * set a global flag so that D-Bus does not change the SIGPIPE handler in the PAM module (William Jon McCann)
+ * when a parsing error occurs don't return an empty event (William Jon McCann)
+
+=============
+Version 0.2.7
+=============
+
+ * update gitignore files (William Jon McCann)
+ * add a helper to write a system start record to the CK history (William Jon McCann)
+ * add support for logging start/stop/restart (William Jon McCann)
+ * fix typo in man page (William Jon McCann)
+ * make autogen work with aclocal 1.10 (Marc-Andre Lureau)
+ * allow session type filtering for all report formats (William Jon McCann)
+ * make polkit optional and use RBAC on Solaris (Brian Cameron)
+ * fixes for solaris (Brian Cameron)
+ * add session-type filtering to ck-history (William Jon McCann)
+ * try to activate x11-display-device not only display-device (William Jon McCann)
+
+=============
+Version 0.2.6
+=============
+
+ * be a little smarter about how we compute the number of users (William Jon McCann)
+ * fix policy action name (William Jon McCann)
+
+=============
+Version 0.2.5
+=============
+
+ * use /var/log/ instead of /var/run for log file
+
+=============
+Version 0.2.4
+=============
+
+ * actually register the error type with dbus (William Jon McCann)
+ * add GetSessions method to Manager interface (William Jon McCann)
+ * add error type to manager (William Jon McCann)
+ * initial stop/restart support (William Jon McCann)
+ * use VT_GETSTATE and tty0 to identify a console_ioctl on linux (Peter Jones)
+ * remove obsolete sysv init script (Michael Biebl)
+ * start CK service on-demand using D-Bus system activation (Michael Biebl)
+ * dump session leader info (William Jon McCann)
+ * error out if unknown options are passed on command line (William Jon McCann)
+ * move session leader stuff into a separate class (William Jon McCann)
+ * try to handle log rotation (William Jon McCann)
+ * add support for reporting from logrotated files (William Jon McCann)
+ * add a basic --frequent report (William Jon McCann)
+ * Merge branch 'master' of git+ssh://git.freedesktop.org/git/ConsoleKit (William Jon McCann)
+ * add last mode, filtering by user/seat; shorten logged ids (William Jon McCann)
+ * add bugzilla url (William Jon McCann)
+ * check for oldest being null (William Jon McCann)
+ * rename --last to --last-compat (William Jon McCann)
+ * a few fixes for last patch (William Jon McCann)
+ * add a last compatible outout format to ck-history (William Jon McCann)
+ * use AC_GNU_SOURCE instead of #define (William Jon McCann)
+ * add a basic ck-history command (William Jon McCann)
+ * add event logging capability (William Jon McCann)
+ * remove emacs modeline (William Jon McCann)
+ * maintain a file with the dump of the local database (David Zeuthen)
+ * remove session/seat from list before signaling (William Jon McCann)
+ * add a way to synchronously run programs on session add/remove/activity_change (David Zeuthen)
+ * don't use VT_GETSTATE when VT is unavailable (Brian Cameron)
+ * try to make things work for systems that don't support VT_ACTIVATE etc (William Jon McCann)
+ * add wiki to readme (William Jon McCann)
+ * post release version bump (William Jon McCann)
+
=============
Version 0.2.3
=============
diff --git a/README b/README
index 66b088f..79f9b9b 100644
--- a/README
+++ b/README
@@ -19,8 +19,10 @@ common ancestor and retain knowledge of a secret. As an implementation
detail, this secret may be stored in the process environment by the
login manager under the name XDG_SESSION_COOKIE.
-Discussion
-==========
+More Information
+================
+
+http://www.freedesktop.org/wiki/Software/ConsoleKit
Discussion takes place on the HAL list.
http://lists.freedesktop.org/mailman/listinfo/hal
diff --git a/aclocal.m4 b/aclocal.m4
index d2024f1..a7bde77 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.10 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
+# 2005, 2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,871 +11,10 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.6])])
-
-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory. The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run. This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-# fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-# fails if $ac_aux_dir is absolute,
-# fails when called from a subdirectory in a VPATH build with
-# a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 7
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
- [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_$1_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_$1_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 3
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 12
-
-# This macro actually does too much. Some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
- [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $1 | $1:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT([$USE_MAINTAINER_MODE])
- AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake. There are at least two reasons why we must not
-# use `-m 0755':
-# - it causes special bits like SGID to be ignored,
-# - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out. Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-AC_SUBST([mkdir_p])])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Check how to create a tarball. -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-# tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-# $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
-
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
-
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
- rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
+m4_if(m4_PACKAGE_VERSION, [2.61],,
+[m4_fatal([this file was generated for autoconf 2.61.
+You have another version of autoconf. If you want to use that,
+you should regenerate the build system entirely.], [63])])
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
@@ -980,8 +119,7 @@ AC_SUBST($1)dnl
#-----------------
glib_DEFUN([GLIB_WITH_NLS],
dnl NLS is obligatory
- [AC_REQUIRE([AC_CANONICAL_HOST])dnl
- USE_NLS=yes
+ [USE_NLS=yes
AC_SUBST(USE_NLS)
gt_cv_have_gettext=no
@@ -7863,4 +7001,877 @@ else
fi[]dnl
])# PKG_CHECK_MODULES
+# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.10], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.10])dnl
+_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.60])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
m4_include([acinclude.m4])
diff --git a/config.guess b/config.guess
index e3ef63f..396482d 100755
--- a/config.guess
+++ b/config.guess
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-12-13'
+timestamp='2006-07-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -206,8 +207,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -764,7 +768,14 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -779,8 +790,11 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[345]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ x86:Interix*:[3456]*)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T:Interix*:[3456]*)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -817,6 +831,9 @@ EOF
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit ;;
@@ -851,7 +868,11 @@ EOF
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
@@ -870,7 +891,11 @@ EOF
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
@@ -967,7 +992,7 @@ EOF
LIBC=gnulibc1
# endif
#else
- #if defined(__INTEL_COMPILER) || defined(__PGI)
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
@@ -977,7 +1002,11 @@ EOF
LIBC=dietlibc
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
diff --git a/config.h.in b/config.h.in
index 6d39f44..ebc4134 100644
--- a/config.h.in
+++ b/config.h.in
@@ -9,6 +9,9 @@
/* Set if we build PAM module */
#undef ENABLE_PAM_MODULE
+/* Set if we build with RBAC support */
+#undef ENABLE_RBAC_SHUTDOWN
+
/* Name of default gettext domain */
#undef GETTEXT_PACKAGE
@@ -48,6 +51,9 @@
/* Define to 1 if you have the <paths.h> header file. */
#undef HAVE_PATHS_H
+/* Define if we have polkit */
+#undef HAVE_POLKIT
+
/* Define to 1 if you have the <security/pam_ext.h> header file. */
#undef HAVE_SECURITY_PAM_EXT_H
@@ -66,12 +72,18 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the <sys/consio.h> header file. */
+#undef HAVE_SYS_CONSIO_H
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have the <sys/vt.h> header file. */
+#undef HAVE_SYS_VT_H
+
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -93,12 +105,20 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* Set if we build with RBAC support */
+#undef RBAC_SHUTDOWN_KEY
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
diff --git a/config.sub b/config.sub
index 2851647..fab0aa3 100755
--- a/config.sub
+++ b/config.sub
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-12-11'
+timestamp='2006-09-20'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -240,7 +241,7 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -248,7 +249,8 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -268,26 +270,25 @@ case $basic_machine in
| mn10200 | mn10300 \
| mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
- m32c)
- basic_machine=$basic_machine-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -317,7 +318,7 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
+ | avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
@@ -328,7 +329,7 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -350,29 +351,28 @@ case $basic_machine in
| mmix-* \
| mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
- m32c-*)
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -818,6 +818,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -904,6 +910,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -1120,7 +1130,7 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1193,7 +1203,8 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
@@ -1208,7 +1219,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos*)
+ | -skyos* | -haiku* | -rdos* | -toppers*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1360,6 +1371,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
@@ -1369,9 +1386,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
diff --git a/configure b/configure
index 3daf72a..f3cb0cc 100755
--- a/configure
+++ b/configure
@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for ConsoleKit 0.2.3.
+# Generated by GNU Autoconf 2.61 for ConsoleKit 0.2.10.
#
-# Report bugs to <mccann@jhu.edu>.
+# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit>.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -12,7 +12,8 @@
## M4sh Initialization. ##
## --------------------- ##
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
@@ -21,10 +22,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
+
+
# PATH needs CR
@@ -217,7 +221,7 @@ test \$exitcode = 0) || { (exit 1); exit 1; }
else
as_candidate_shells=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
@@ -235,7 +239,6 @@ IFS=$as_save_IFS
# Try only shells that exist, to save several forks.
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
{ ("$as_shell") 2> /dev/null <<\_ASEOF
-# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
@@ -244,10 +247,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
+
:
_ASEOF
@@ -255,7 +260,6 @@ _ASEOF
CONFIG_SHELL=$as_shell
as_have_required=yes
if { "$as_shell" 2> /dev/null <<\_ASEOF
-# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
@@ -264,10 +268,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
+
:
(as_func_return () {
@@ -514,19 +520,28 @@ else
as_mkdir_p=false
fi
-# Find out whether ``test -x'' works. Don't use a zero-byte file, as
-# systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
- as_executable_p="test -x"
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
else
- as_executable_p=:
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
fi
-rm -f conf$$.file
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -713,44 +728,44 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='ConsoleKit'
PACKAGE_TARNAME='ConsoleKit'
-PACKAGE_VERSION='0.2.3'
-PACKAGE_STRING='ConsoleKit 0.2.3'
-PACKAGE_BUGREPORT='mccann@jhu.edu'
+PACKAGE_VERSION='0.2.10'
+PACKAGE_STRING='ConsoleKit 0.2.10'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit'
ac_unique_file="src/ck-manager.c"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
-#if HAVE_STDINT_H
+#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
@@ -794,6 +809,7 @@ target_alias
INSTALL_PROGRAM
INSTALL_SCRIPT
INSTALL_DATA
+am__isrc
CYGPATH_W
PACKAGE
VERSION
@@ -877,14 +893,22 @@ MKINSTALLDIRS
PKG_CONFIG
CONSOLE_KIT_CFLAGS
CONSOLE_KIT_LIBS
+POLKIT_CFLAGS
+POLKIT_LIBS
+HAVE_POLKIT_TRUE
+HAVE_POLKIT_FALSE
+HAVE_POLKIT
LIBDBUS_CFLAGS
LIBDBUS_LIBS
TOOLS_CFLAGS
TOOLS_LIBS
+HISTORY_CFLAGS
+HISTORY_LIBS
GLIB_GENMARSHAL
WARN_CFLAGS
DBUS_CFLAGS
DBUS_SYS_DIR
+Z_LIBS
CONSOLE_KIT_PID_FILE
KVM_LIBS
CK_COMPILE_LINUX_TRUE
@@ -906,6 +930,7 @@ DOCBOOK_DOCS_ENABLED_TRUE
DOCBOOK_DOCS_ENABLED_FALSE
ENABLE_INOTIFY_TRUE
ENABLE_INOTIFY_FALSE
+RBAC_LIBS
DEBUG_CFLAGS
LIBOBJS
LTLIBOBJS'
@@ -916,6 +941,7 @@ target_alias
CC
CFLAGS
LDFLAGS
+LIBS
CPPFLAGS
CPP
CXX
@@ -927,10 +953,14 @@ FFLAGS
PKG_CONFIG
CONSOLE_KIT_CFLAGS
CONSOLE_KIT_LIBS
+POLKIT_CFLAGS
+POLKIT_LIBS
LIBDBUS_CFLAGS
LIBDBUS_LIBS
TOOLS_CFLAGS
-TOOLS_LIBS'
+TOOLS_LIBS
+HISTORY_CFLAGS
+HISTORY_LIBS'
# Initialize some variables set by options.
@@ -1036,10 +1066,10 @@ do
-disable-* | --disable-*)
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
eval enable_$ac_feature=no ;;
-docdir | --docdir | --docdi | --doc | --do)
@@ -1055,10 +1085,10 @@ do
-enable-* | --enable-*)
ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
eval enable_$ac_feature=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
@@ -1252,19 +1282,19 @@ do
-with-* | --with-*)
ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
eval with_$ac_package=\$ac_optarg ;;
-without-* | --without-*)
ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
eval with_$ac_package=no ;;
--x)
@@ -1433,7 +1463,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ConsoleKit 0.2.3 to adapt to many kinds of systems.
+\`configure' configures ConsoleKit 0.2.10 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1503,7 +1533,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ConsoleKit 0.2.3:";;
+ short | recursive ) echo "Configuration of ConsoleKit 0.2.10:";;
esac
cat <<\_ACEOF
@@ -1524,6 +1554,9 @@ Optional Features:
--enable-iso-c Try to warn if code is not ISO C
--enable-pam-module build PAM module
--enable-docbook-docs build documentation (requires xmlto)
+ --enable-rbac-shutdown=<key>
+ Build with RBAC support specifying shutdown/reboot
+ RBAC authentication key
--enable-more-warnings Maximum compiler warnings
--enable-debug turn on debugging
@@ -1546,6 +1579,7 @@ Some influential environment variables:
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
@@ -1559,6 +1593,9 @@ Some influential environment variables:
C compiler flags for CONSOLE_KIT, overriding pkg-config
CONSOLE_KIT_LIBS
linker flags for CONSOLE_KIT, overriding pkg-config
+ POLKIT_CFLAGS
+ C compiler flags for POLKIT, overriding pkg-config
+ POLKIT_LIBS linker flags for POLKIT, overriding pkg-config
LIBDBUS_CFLAGS
C compiler flags for LIBDBUS, overriding pkg-config
LIBDBUS_LIBS
@@ -1566,11 +1603,15 @@ Some influential environment variables:
TOOLS_CFLAGS
C compiler flags for TOOLS, overriding pkg-config
TOOLS_LIBS linker flags for TOOLS, overriding pkg-config
+ HISTORY_CFLAGS
+ C compiler flags for HISTORY, overriding pkg-config
+ HISTORY_LIBS
+ linker flags for HISTORY, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <mccann@jhu.edu>.
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit>.
_ACEOF
ac_status=$?
fi
@@ -1631,8 +1672,8 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ConsoleKit configure 0.2.3
-generated by GNU Autoconf 2.60
+ConsoleKit configure 0.2.10
+generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -1645,8 +1686,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ConsoleKit $as_me 0.2.3, which was
-generated by GNU Autoconf 2.60. Invocation command line was
+It was created by ConsoleKit $as_me 0.2.10, which was
+generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2001,7 +2042,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-am__api_version="1.9"
+am__api_version='1.10'
+
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
if test -f "$ac_dir/install-sh"; then
@@ -2069,7 +2111,7 @@ case $as_dir/ in
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -2184,38 +2226,53 @@ else
echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
+{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+done
+IFS=$as_save_IFS
+
+fi
+
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
else
- mkdir_p='$(install_sh) -d'
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
fi
fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
for ac_prog in gawk mawk nawk awk
do
@@ -2235,7 +2292,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2298,12 +2355,16 @@ else
fi
rmdir .tst 2>/dev/null
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
{ (exit 1); exit 1; }; }
+ fi
fi
# test whether we have cygpath
@@ -2318,7 +2379,7 @@ fi
# Define the identity of the package.
PACKAGE='ConsoleKit'
- VERSION='0.2.3'
+ VERSION='0.2.10'
cat >>confdefs.h <<_ACEOF
@@ -2346,7 +2407,7 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
@@ -2370,7 +2431,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2410,7 +2471,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_STRIP="strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2450,7 +2511,7 @@ else
fi
fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
@@ -2476,9 +2537,7 @@ fi
{ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
-
-
-if test $USE_MAINTAINER_MODE = yes; then
+ if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
MAINTAINER_MODE_FALSE='#'
else
@@ -2490,6 +2549,14 @@ fi
+# for O_NOFOLLOW support
+
+cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_ACEOF
+
+
+
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@@ -2543,9 +2610,7 @@ if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
+ if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
AMDEP_FALSE='#'
else
@@ -2554,7 +2619,6 @@ else
fi
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2577,7 +2641,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2617,7 +2681,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2674,7 +2738,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2715,7 +2779,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2773,7 +2837,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2817,7 +2881,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2958,7 +3022,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# in a Makefile. We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
-for ac_file in $ac_files
+for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
@@ -2986,6 +3050,12 @@ done
test "$ac_cv_exeext" = no && ac_cv_exeext=
else
+ ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -2997,8 +3067,6 @@ See \`config.log' for more details." >&2;}
fi
ac_exeext=$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
@@ -3176,27 +3244,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
@@ -3251,27 +3302,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
@@ -3306,27 +3340,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
:
else
echo "$as_me: failed program was:" >&5
@@ -3362,27 +3379,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
@@ -3498,27 +3498,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_c89=$ac_arg
else
echo "$as_me: failed program was:" >&5
@@ -3622,6 +3605,7 @@ else
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -3651,9 +3635,7 @@ fi
echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-if
+ if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
am__fastdepCC_TRUE=
@@ -3713,27 +3695,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_search_strerror=$ac_res
else
echo "$as_me: failed program was:" >&5
@@ -3742,7 +3708,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_strerror+set}" = set; then
break
@@ -3786,7 +3752,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3826,7 +3792,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3883,7 +3849,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3924,7 +3890,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3982,7 +3948,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4026,7 +3992,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4146,27 +4112,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
@@ -4221,27 +4170,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
@@ -4276,27 +4208,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
:
else
echo "$as_me: failed program was:" >&5
@@ -4332,27 +4247,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
@@ -4468,27 +4366,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_c89=$ac_arg
else
echo "$as_me: failed program was:" >&5
@@ -4592,6 +4473,7 @@ else
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -4621,9 +4503,7 @@ fi
echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-if
+ if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
am__fastdepCC_TRUE=
@@ -4686,17 +4566,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
echo "$as_me: failed program was:" >&5
@@ -4730,17 +4603,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
@@ -4805,17 +4671,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
echo "$as_me: failed program was:" >&5
@@ -4849,17 +4708,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
@@ -4914,7 +4766,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -4996,7 +4848,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -5092,27 +4944,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
@@ -5880,7 +5715,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5883 "configure"' > conftest.$ac_ext
+ echo '#line 5718 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -6004,27 +5839,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
lt_cv_cc_needs_belf=yes
else
echo "$as_me: failed program was:" >&5
@@ -6033,7 +5852,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
lt_cv_cc_needs_belf=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -6117,27 +5936,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
@@ -6200,27 +6002,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -6256,17 +6041,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -6302,9 +6080,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to mccann@jhu.edu ##
-## ----------------------------- ##
+## ---------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit ##
+## ---------------------------------------------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -6358,7 +6136,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6402,7 +6180,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6515,27 +6293,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
@@ -6590,27 +6351,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cxx_g=yes
else
echo "$as_me: failed program was:" >&5
@@ -6645,27 +6389,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
:
else
echo "$as_me: failed program was:" >&5
@@ -6701,27 +6428,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cxx_g=yes
else
echo "$as_me: failed program was:" >&5
@@ -6829,6 +6539,7 @@ else
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -6858,9 +6569,7 @@ fi
echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
-
-
-if
+ if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
am__fastdepCXX_TRUE=
@@ -6924,17 +6633,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
echo "$as_me: failed program was:" >&5
@@ -6968,17 +6670,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
@@ -7043,17 +6738,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
echo "$as_me: failed program was:" >&5
@@ -7087,17 +6775,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
@@ -7138,7 +6819,7 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
if test -n "$ac_tool_prefix"; then
- for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn
+ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -7156,7 +6837,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7182,7 +6863,7 @@ fi
fi
if test -z "$F77"; then
ac_ct_F77=$F77
- for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn
+ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -7200,7 +6881,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_F77="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7307,27 +6988,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
@@ -7370,27 +7034,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_f77_g=yes
else
echo "$as_me: failed program was:" >&5
@@ -7845,7 +7492,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7885,7 +7532,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_AR="ar"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7941,7 +7588,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7981,7 +7628,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8037,7 +7684,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8077,7 +7724,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_STRIP="strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8394,11 +8041,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8397: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8044: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8401: \$? = $ac_status" >&5
+ echo "$as_me:8048: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8662,11 +8309,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8665: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8312: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8669: \$? = $ac_status" >&5
+ echo "$as_me:8316: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8766,11 +8413,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8769: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8416: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8773: \$? = $ac_status" >&5
+ echo "$as_me:8420: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9246,27 +8893,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -9280,7 +8911,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -9321,27 +8952,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -9355,7 +8970,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -10263,7 +9878,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 10266 "configure"' > conftest.$ac_ext
+ echo '#line 9881 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -10624,27 +10239,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
@@ -10653,7 +10252,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dl_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -10735,27 +10334,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_func_shl_load=yes
else
echo "$as_me: failed program was:" >&5
@@ -10764,7 +10347,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_shl_load=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
@@ -10814,27 +10397,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_dld_shl_load=yes
else
echo "$as_me: failed program was:" >&5
@@ -10843,7 +10410,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dld_shl_load=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -10915,27 +10482,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_func_dlopen=yes
else
echo "$as_me: failed program was:" >&5
@@ -10944,7 +10495,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
@@ -10994,27 +10545,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
@@ -11023,7 +10558,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dl_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -11074,27 +10609,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_svld_dlopen=yes
else
echo "$as_me: failed program was:" >&5
@@ -11103,7 +10622,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_svld_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -11154,27 +10673,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_dld_dld_link=yes
else
echo "$as_me: failed program was:" >&5
@@ -11183,7 +10686,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dld_dld_link=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -11239,7 +10742,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11242 "configure"
+#line 10745 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11339,7 +10842,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11342 "configure"
+#line 10845 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12426,27 +11929,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -12460,7 +11947,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -12502,27 +11989,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -12536,7 +12007,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -13707,11 +13178,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13710: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13181: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13714: \$? = $ac_status" >&5
+ echo "$as_me:13185: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13811,11 +13282,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13814: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13285: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13818: \$? = $ac_status" >&5
+ echo "$as_me:13289: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14347,7 +13818,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 14350 "configure"' > conftest.$ac_ext
+ echo '#line 13821 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -15402,11 +14873,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15405: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14876: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15409: \$? = $ac_status" >&5
+ echo "$as_me:14880: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15506,11 +14977,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15509: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14980: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15513: \$? = $ac_status" >&5
+ echo "$as_me:14984: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15976,27 +15447,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -16010,7 +15465,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -16041,27 +15496,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -16075,7 +15514,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -16983,7 +16422,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 16986 "configure"' > conftest.$ac_ext
+ echo '#line 16425 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -17757,11 +17196,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17760: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17199: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17764: \$? = $ac_status" >&5
+ echo "$as_me:17203: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -18025,11 +17464,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18028: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17467: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18032: \$? = $ac_status" >&5
+ echo "$as_me:17471: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -18129,11 +17568,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18132: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17571: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:18136: \$? = $ac_status" >&5
+ echo "$as_me:17575: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -18609,27 +18048,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -18643,7 +18066,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -18684,27 +18107,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -18718,7 +18125,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -19626,7 +19033,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 19629 "configure"' > conftest.$ac_ext
+ echo '#line 19036 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -20882,27 +20289,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
@@ -21090,27 +20480,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -21146,17 +20519,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -21192,9 +20558,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to mccann@jhu.edu ##
-## ----------------------------- ##
+## ---------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit ##
+## ---------------------------------------------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -21254,27 +20620,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
am_cv_val_LC_MESSAGES=yes
else
echo "$as_me: failed program was:" >&5
@@ -21283,7 +20633,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
am_cv_val_LC_MESSAGES=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
@@ -21296,7 +20646,7 @@ _ACEOF
fi
fi
- USE_NLS=yes
+ USE_NLS=yes
gt_cv_have_gettext=no
@@ -21339,27 +20689,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -21395,17 +20728,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -21441,9 +20767,9 @@ echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2
{ echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to mccann@jhu.edu ##
-## ----------------------------- ##
+## ---------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit ##
+## ---------------------------------------------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -21501,27 +20827,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
gt_cv_func_ngettext_libc=yes
else
echo "$as_me: failed program was:" >&5
@@ -21530,7 +20840,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
gt_cv_func_ngettext_libc=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
@@ -21573,27 +20883,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
gt_cv_func_dgettext_libc=yes
else
echo "$as_me: failed program was:" >&5
@@ -21602,7 +20896,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
gt_cv_func_dgettext_libc=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
@@ -21678,27 +20972,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -21707,7 +20985,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -21772,27 +21050,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_intl_bindtextdomain=yes
else
echo "$as_me: failed program was:" >&5
@@ -21801,7 +21063,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_bindtextdomain=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -21850,27 +21112,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_intl_ngettext=yes
else
echo "$as_me: failed program was:" >&5
@@ -21879,7 +21125,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_ngettext=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -21928,27 +21174,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_intl_dgettext=yes
else
echo "$as_me: failed program was:" >&5
@@ -21957,7 +21187,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_dgettext=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -22019,27 +21249,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_intl_ngettext=yes
else
echo "$as_me: failed program was:" >&5
@@ -22048,7 +21262,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_ngettext=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -22097,27 +21311,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_intl_dcgettext=yes
else
echo "$as_me: failed program was:" >&5
@@ -22126,7 +21324,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_dcgettext=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -22221,27 +21419,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -22250,7 +21432,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -22397,27 +21579,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -22426,7 +21592,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -22487,7 +21653,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -22575,27 +21741,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
CATOBJEXT=.gmo
DATADIRNAME=share
else
@@ -22667,27 +21817,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_func_bind_textdomain_codeset=yes
else
echo "$as_me: failed program was:" >&5
@@ -22696,7 +21830,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_bind_textdomain_codeset=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
@@ -22717,7 +21851,7 @@ fi
esac
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS="$glib_save_LIBS"
INSTOBJEXT=.mo
@@ -22838,6 +21972,7 @@ echo "${ECHO_T}$LINGUAS" >&6; }
DBUS_REQUIRED_VERSION=0.30
GLIB_REQUIRED_VERSION=2.7.0
X11_REQUIRED_VERSION=1.0.0
+POLKIT_REQUIRED_VERSION=0.7
for ac_header in unistd.h
@@ -22878,27 +22013,155 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ---------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit ##
+## ---------------------------------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in paths.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -22934,17 +22197,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -22980,9 +22236,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to mccann@jhu.edu ##
-## ----------------------------- ##
+## ---------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit ##
+## ---------------------------------------------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -23009,7 +22265,7 @@ fi
done
-for ac_header in paths.h
+for ac_header in sys/vt.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -23047,27 +22303,155 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ---------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit ##
+## ---------------------------------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/consio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -23103,17 +22487,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -23149,9 +22526,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to mccann@jhu.edu ##
-## ----------------------------- ##
+## ---------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit ##
+## ---------------------------------------------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -23246,27 +22623,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -23275,7 +22636,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -23351,7 +22712,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -23394,7 +22755,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -23460,19 +22821,19 @@ if test -n "$PKG_CONFIG"; then
else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= \$DBUS_REQUIRED_VERSION
- gobject-2.0 >= \$GLIB_REQUIRED_VERSION
- gthread-2.0 >= \$GLIB_REQUIRED_VERSION
+ gobject-2.0 >= \$GLIB_REQUIRED_VERSION
+ gthread-2.0 >= \$GLIB_REQUIRED_VERSION
\"") >&5
($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION
- gobject-2.0 >= $GLIB_REQUIRED_VERSION
- gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ gobject-2.0 >= $GLIB_REQUIRED_VERSION
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_CONSOLE_KIT_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= $DBUS_REQUIRED_VERSION
- gobject-2.0 >= $GLIB_REQUIRED_VERSION
- gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ gobject-2.0 >= $GLIB_REQUIRED_VERSION
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
" 2>/dev/null`
else
pkg_failed=yes
@@ -23487,19 +22848,19 @@ if test -n "$PKG_CONFIG"; then
else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= \$DBUS_REQUIRED_VERSION
- gobject-2.0 >= \$GLIB_REQUIRED_VERSION
- gthread-2.0 >= \$GLIB_REQUIRED_VERSION
+ gobject-2.0 >= \$GLIB_REQUIRED_VERSION
+ gthread-2.0 >= \$GLIB_REQUIRED_VERSION
\"") >&5
($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION
- gobject-2.0 >= $GLIB_REQUIRED_VERSION
- gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ gobject-2.0 >= $GLIB_REQUIRED_VERSION
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_CONSOLE_KIT_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= $DBUS_REQUIRED_VERSION
- gobject-2.0 >= $GLIB_REQUIRED_VERSION
- gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ gobject-2.0 >= $GLIB_REQUIRED_VERSION
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
" 2>/dev/null`
else
pkg_failed=yes
@@ -23520,21 +22881,21 @@ else
fi
if test $_pkg_short_errors_supported = yes; then
CONSOLE_KIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION
- gobject-2.0 >= $GLIB_REQUIRED_VERSION
- gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ gobject-2.0 >= $GLIB_REQUIRED_VERSION
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
"`
else
CONSOLE_KIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION
- gobject-2.0 >= $GLIB_REQUIRED_VERSION
- gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ gobject-2.0 >= $GLIB_REQUIRED_VERSION
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
"`
fi
# Put the nasty error message in config.log where it belongs
echo "$CONSOLE_KIT_PKG_ERRORS" >&5
{ { echo "$as_me:$LINENO: error: Package requirements (dbus-glib-1 >= $DBUS_REQUIRED_VERSION
- gobject-2.0 >= $GLIB_REQUIRED_VERSION
- gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ gobject-2.0 >= $GLIB_REQUIRED_VERSION
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
) were not met:
$CONSOLE_KIT_PKG_ERRORS
@@ -23547,8 +22908,8 @@ and CONSOLE_KIT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
echo "$as_me: error: Package requirements (dbus-glib-1 >= $DBUS_REQUIRED_VERSION
- gobject-2.0 >= $GLIB_REQUIRED_VERSION
- gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ gobject-2.0 >= $GLIB_REQUIRED_VERSION
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
) were not met:
$CONSOLE_KIT_PKG_ERRORS
@@ -23591,6 +22952,95 @@ echo "${ECHO_T}yes" >&6; }
:
fi
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for POLKIT" >&5
+echo $ECHO_N "checking for POLKIT... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POLKIT_CFLAGS"; then
+ pkg_cv_POLKIT_CFLAGS="$POLKIT_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"polkit >= \$POLKIT_REQUIRED_VERSION\"") >&5
+ ($PKG_CONFIG --exists --print-errors "polkit >= $POLKIT_REQUIRED_VERSION") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_POLKIT_CFLAGS=`$PKG_CONFIG --cflags "polkit >= $POLKIT_REQUIRED_VERSION" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POLKIT_LIBS"; then
+ pkg_cv_POLKIT_LIBS="$POLKIT_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"polkit >= \$POLKIT_REQUIRED_VERSION\"") >&5
+ ($PKG_CONFIG --exists --print-errors "polkit >= $POLKIT_REQUIRED_VERSION") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_POLKIT_LIBS=`$PKG_CONFIG --libs "polkit >= $POLKIT_REQUIRED_VERSION" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ POLKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "polkit >= $POLKIT_REQUIRED_VERSION"`
+ else
+ POLKIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "polkit >= $POLKIT_REQUIRED_VERSION"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$POLKIT_PKG_ERRORS" >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ have_polkit=no
+elif test $pkg_failed = untried; then
+ have_polkit=no
+else
+ POLKIT_CFLAGS=$pkg_cv_POLKIT_CFLAGS
+ POLKIT_LIBS=$pkg_cv_POLKIT_LIBS
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ have_polkit=yes
+fi
+if test "x$have_polkit" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POLKIT
+_ACEOF
+
+fi
+ if test x$have_polkit = xyes; then
+ HAVE_POLKIT_TRUE=
+ HAVE_POLKIT_FALSE='#'
+else
+ HAVE_POLKIT_TRUE='#'
+ HAVE_POLKIT_FALSE=
+fi
+
+
+
+
pkg_failed=no
{ echo "$as_me:$LINENO: checking for LIBDBUS" >&5
echo $ECHO_N "checking for LIBDBUS... $ECHO_C" >&6; }
@@ -23722,16 +23172,16 @@ if test -n "$PKG_CONFIG"; then
else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 >= \$X11_REQUIRED_VERSION
- glib-2.0 >= \$GLIB_REQUIRED_VERSION
+ glib-2.0 >= \$GLIB_REQUIRED_VERSION
\"") >&5
($PKG_CONFIG --exists --print-errors "x11 >= $X11_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_TOOLS_CFLAGS=`$PKG_CONFIG --cflags "x11 >= $X11_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
" 2>/dev/null`
else
pkg_failed=yes
@@ -23746,16 +23196,16 @@ if test -n "$PKG_CONFIG"; then
else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 >= \$X11_REQUIRED_VERSION
- glib-2.0 >= \$GLIB_REQUIRED_VERSION
+ glib-2.0 >= \$GLIB_REQUIRED_VERSION
\"") >&5
($PKG_CONFIG --exists --print-errors "x11 >= $X11_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_TOOLS_LIBS=`$PKG_CONFIG --libs "x11 >= $X11_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
" 2>/dev/null`
else
pkg_failed=yes
@@ -23776,18 +23226,18 @@ else
fi
if test $_pkg_short_errors_supported = yes; then
TOOLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 >= $X11_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
"`
else
TOOLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 >= $X11_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
"`
fi
# Put the nasty error message in config.log where it belongs
echo "$TOOLS_PKG_ERRORS" >&5
{ { echo "$as_me:$LINENO: error: Package requirements (x11 >= $X11_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
) were not met:
$TOOLS_PKG_ERRORS
@@ -23800,7 +23250,7 @@ and TOOLS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
echo "$as_me: error: Package requirements (x11 >= $X11_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
) were not met:
$TOOLS_PKG_ERRORS
@@ -23843,6 +23293,128 @@ echo "${ECHO_T}yes" >&6; }
:
fi
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for HISTORY" >&5
+echo $ECHO_N "checking for HISTORY... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$HISTORY_CFLAGS"; then
+ pkg_cv_HISTORY_CFLAGS="$HISTORY_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED_VERSION
+\"") >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION
+") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_HISTORY_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_REQUIRED_VERSION
+" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$HISTORY_LIBS"; then
+ pkg_cv_HISTORY_LIBS="$HISTORY_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED_VERSION
+\"") >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION
+") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_HISTORY_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_REQUIRED_VERSION
+" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ HISTORY_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION
+"`
+ else
+ HISTORY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION
+"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$HISTORY_PKG_ERRORS" >&5
+
+ { { echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= $GLIB_REQUIRED_VERSION
+) were not met:
+
+$HISTORY_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables HISTORY_CFLAGS
+and HISTORY_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (glib-2.0 >= $GLIB_REQUIRED_VERSION
+) were not met:
+
+$HISTORY_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables HISTORY_CFLAGS
+and HISTORY_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+ { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+ { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables HISTORY_CFLAGS
+and HISTORY_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables HISTORY_CFLAGS
+and HISTORY_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ HISTORY_CFLAGS=$pkg_cv_HISTORY_CFLAGS
+ HISTORY_LIBS=$pkg_cv_HISTORY_LIBS
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+fi
+
# Extract the first word of "glib-genmarshal", so it can be a program name with args.
set dummy glib-genmarshal; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -23861,7 +23433,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_GLIB_GENMARSHAL="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -23948,27 +23520,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
has_option=yes
else
echo "$as_me: failed program was:" >&5
@@ -24079,27 +23634,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_resolv_daemon=yes
else
echo "$as_me: failed program was:" >&5
@@ -24108,7 +23647,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_resolv_daemon=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -24177,6 +23716,216 @@ fi
+have_libz=no
+{ echo "$as_me:$LINENO: checking for compress in -lz" >&5
+echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6; }
+if test "${ac_cv_lib_z_compress+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char compress ();
+int
+main ()
+{
+return compress ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_z_compress=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_z_compress=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
+echo "${ECHO_T}$ac_cv_lib_z_compress" >&6; }
+if test $ac_cv_lib_z_compress = yes; then
+ if test "${ac_cv_header_zlib_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for zlib.h" >&5
+echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking zlib.h usability" >&5
+echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <zlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking zlib.h presence" >&5
+echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <zlib.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ---------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit ##
+## ---------------------------------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for zlib.h" >&5
+echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_zlib_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
+
+fi
+if test $ac_cv_header_zlib_h = yes; then
+ have_libz=yes
+fi
+
+
+fi
+
+if test "x$have_libz" != "xyes"; then
+ { { echo "$as_me:$LINENO: error: Unable to find libz" >&5
+echo "$as_me: error: Unable to find libz" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+Z_LIBS="${Z_LIBS} -lz"
+
+
+
+
# Check whether --with-pid-file was given.
if test "${with_pid_file+set}" = set; then
withval=$with_pid_file;
@@ -24239,27 +23988,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_kvm_kvm_openfiles=yes
else
echo "$as_me: failed program was:" >&5
@@ -24268,7 +24001,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_kvm_kvm_openfiles=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -24296,9 +24029,7 @@ esac
-
-
-if test x$CK_BACKEND = xlinux; then
+ if test x$CK_BACKEND = xlinux; then
CK_COMPILE_LINUX_TRUE=
CK_COMPILE_LINUX_FALSE='#'
else
@@ -24306,9 +24037,7 @@ else
CK_COMPILE_LINUX_FALSE=
fi
-
-
-if test x$CK_BACKEND = xfreebsd; then
+ if test x$CK_BACKEND = xfreebsd; then
CK_COMPILE_FREEBSD_TRUE=
CK_COMPILE_FREEBSD_FALSE='#'
else
@@ -24316,9 +24045,7 @@ else
CK_COMPILE_FREEBSD_FALSE=
fi
-
-
-if test x$CK_BACKEND = xsolaris; then
+ if test x$CK_BACKEND = xsolaris; then
CK_COMPILE_SOLARIS_TRUE=
CK_COMPILE_SOLARIS_FALSE='#'
else
@@ -24372,27 +24099,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_pam_pam_getenv=yes
else
echo "$as_me: failed program was:" >&5
@@ -24401,7 +24112,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_pam_pam_getenv=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -24411,9 +24122,7 @@ if test $ac_cv_lib_pam_pam_getenv = yes; then
have_pam=yes
fi
-
-
-if test x$have_pam = xyes; then
+ if test x$have_pam = xyes; then
HAVE_PAM_TRUE=
HAVE_PAM_FALSE='#'
else
@@ -24467,27 +24176,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -24523,17 +24215,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -24569,9 +24254,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to mccann@jhu.edu ##
-## ----------------------------- ##
+## ---------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit ##
+## ---------------------------------------------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -24639,27 +24324,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_pam_pam_syslog=yes
else
echo "$as_me: failed program was:" >&5
@@ -24668,7 +24337,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_pam_pam_syslog=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -24705,9 +24374,7 @@ _ACEOF
msg_pam_module=yes
fi
-
-
-if test "x$enable_pam_module" = "xyes"; then
+ if test "x$enable_pam_module" = "xyes"; then
ENABLE_PAM_MODULE_TRUE=
ENABLE_PAM_MODULE_FALSE='#'
else
@@ -24756,7 +24423,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -24800,9 +24467,7 @@ echo "$as_me: error: Building DocBook docs explicitly required, but DocBook not
{ (exit 1); exit 1; }; }
fi
fi
-
-
-if test x$enable_docbook_docs = xyes; then
+ if test x$enable_docbook_docs = xyes; then
DOCBOOK_DOCS_ENABLED_TRUE=
DOCBOOK_DOCS_ENABLED_FALSE='#'
else
@@ -24878,27 +24543,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_func_inotify_init=yes
else
echo "$as_me: failed program was:" >&5
@@ -24907,7 +24556,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_inotify_init=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_inotify_init" >&5
@@ -24947,27 +24596,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -25003,17 +24635,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -25049,9 +24674,9 @@ echo "$as_me: WARNING: sys/inotify.h: proceeding with the preprocessor's result"
{ echo "$as_me:$LINENO: WARNING: sys/inotify.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sys/inotify.h: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to mccann@jhu.edu ##
-## ----------------------------- ##
+## ---------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit ##
+## ---------------------------------------------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -25075,9 +24700,7 @@ fi
fi
-
-
-if test "x$enable_inotify" = "xyes"; then
+ if test "x$enable_inotify" = "xyes"; then
ENABLE_INOTIFY_TRUE=
ENABLE_INOTIFY_FALSE='#'
else
@@ -25095,6 +24718,31 @@ _ACEOF
fi
+msg_rbac_shutdown=no
+# Check whether --enable-rbac-shutdown was given.
+if test "${enable_rbac_shutdown+set}" = set; then
+ enableval=$enable_rbac_shutdown; enable_rbac_shutdown=$enableval
+else
+ enable_rbac_shutdown=no
+fi
+
+if test "x$enable_rbac_shutdown" != "xno"; then
+ RBAC_LIBS="-lsecdb -lsocket -lnsl"
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_RBAC_SHUTDOWN
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define RBAC_SHUTDOWN_KEY "$enable_rbac_shutdown"
+_ACEOF
+
+ msg_rbac_shutdown="yes, using key $enable_rbac_shutdown"
+fi
+
+
+
# Turn on the additional warnings last, so -Werror doesn't affect other tests.
# Check whether --enable-more-warnings was given.
@@ -25155,27 +24803,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
has_option=yes
else
echo "$as_me: failed program was:" >&5
@@ -25231,7 +24862,7 @@ fi
# Files
-ac_config_files="$ac_config_files Makefile src/Makefile tools/Makefile tools/linux/Makefile data/Makefile doc/Makefile doc/ConsoleKit.xml libck-connector/Makefile libck-connector/ck-connector.pc pam-ck-connector/Makefile"
+ac_config_files="$ac_config_files Makefile src/Makefile tools/Makefile tools/linux/Makefile tools/freebsd/Makefile tools/solaris/Makefile data/Makefile doc/Makefile doc/ConsoleKit.xml libck-connector/Makefile libck-connector/ck-connector.pc pam-ck-connector/Makefile"
ac_config_headers="$ac_config_headers config.h"
@@ -25368,6 +24999,13 @@ echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${HAVE_POLKIT_TRUE}" && test -z "${HAVE_POLKIT_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"HAVE_POLKIT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_POLKIT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${CK_COMPILE_LINUX_TRUE}" && test -z "${CK_COMPILE_LINUX_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"CK_COMPILE_LINUX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -25441,7 +25079,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF
## M4sh Initialization. ##
## --------------------- ##
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
@@ -25450,10 +25089,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
+
+
# PATH needs CR
@@ -25677,19 +25319,28 @@ else
as_mkdir_p=false
fi
-# Find out whether ``test -x'' works. Don't use a zero-byte file, as
-# systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
- as_executable_p="test -x"
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
else
- as_executable_p=:
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
fi
-rm -f conf$$.file
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -25704,8 +25355,8 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ConsoleKit $as_me 0.2.3, which was
-generated by GNU Autoconf 2.60. Invocation command line was
+This file was extended by ConsoleKit $as_me 0.2.10, which was
+generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -25734,7 +25385,7 @@ current configuration.
Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
- -V, --version print version number, then exit
+ -V, --version print version number and configuration settings, then exit
-q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
@@ -25757,8 +25408,8 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-ConsoleKit config.status 0.2.3
-configured by $0, generated by GNU Autoconf 2.60,
+ConsoleKit config.status 0.2.10
+configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Copyright (C) 2006 Free Software Foundation, Inc.
@@ -25768,6 +25419,7 @@ gives unlimited permission to copy, distribute and modify it."
ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
@@ -25877,6 +25529,8 @@ do
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
"tools/linux/Makefile") CONFIG_FILES="$CONFIG_FILES tools/linux/Makefile" ;;
+ "tools/freebsd/Makefile") CONFIG_FILES="$CONFIG_FILES tools/freebsd/Makefile" ;;
+ "tools/solaris/Makefile") CONFIG_FILES="$CONFIG_FILES tools/solaris/Makefile" ;;
"data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;;
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"doc/ConsoleKit.xml") CONFIG_FILES="$CONFIG_FILES doc/ConsoleKit.xml" ;;
@@ -25986,6 +25640,7 @@ target_alias!$target_alias$ac_delim
INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
INSTALL_DATA!$INSTALL_DATA$ac_delim
+am__isrc!$am__isrc$ac_delim
CYGPATH_W!$CYGPATH_W$ac_delim
PACKAGE!$PACKAGE$ac_delim
VERSION!$VERSION$ac_delim
@@ -26042,7 +25697,6 @@ CXX!$CXX$ac_delim
CXXFLAGS!$CXXFLAGS$ac_delim
ac_ct_CXX!$ac_ct_CXX$ac_delim
CXXDEPMODE!$CXXDEPMODE$ac_delim
-am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -26084,6 +25738,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
CXXCPP!$CXXCPP$ac_delim
F77!$F77$ac_delim
@@ -26110,14 +25765,22 @@ MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
PKG_CONFIG!$PKG_CONFIG$ac_delim
CONSOLE_KIT_CFLAGS!$CONSOLE_KIT_CFLAGS$ac_delim
CONSOLE_KIT_LIBS!$CONSOLE_KIT_LIBS$ac_delim
+POLKIT_CFLAGS!$POLKIT_CFLAGS$ac_delim
+POLKIT_LIBS!$POLKIT_LIBS$ac_delim
+HAVE_POLKIT_TRUE!$HAVE_POLKIT_TRUE$ac_delim
+HAVE_POLKIT_FALSE!$HAVE_POLKIT_FALSE$ac_delim
+HAVE_POLKIT!$HAVE_POLKIT$ac_delim
LIBDBUS_CFLAGS!$LIBDBUS_CFLAGS$ac_delim
LIBDBUS_LIBS!$LIBDBUS_LIBS$ac_delim
TOOLS_CFLAGS!$TOOLS_CFLAGS$ac_delim
TOOLS_LIBS!$TOOLS_LIBS$ac_delim
+HISTORY_CFLAGS!$HISTORY_CFLAGS$ac_delim
+HISTORY_LIBS!$HISTORY_LIBS$ac_delim
GLIB_GENMARSHAL!$GLIB_GENMARSHAL$ac_delim
WARN_CFLAGS!$WARN_CFLAGS$ac_delim
DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
DBUS_SYS_DIR!$DBUS_SYS_DIR$ac_delim
+Z_LIBS!$Z_LIBS$ac_delim
CONSOLE_KIT_PID_FILE!$CONSOLE_KIT_PID_FILE$ac_delim
KVM_LIBS!$KVM_LIBS$ac_delim
CK_COMPILE_LINUX_TRUE!$CK_COMPILE_LINUX_TRUE$ac_delim
@@ -26139,12 +25802,13 @@ DOCBOOK_DOCS_ENABLED_TRUE!$DOCBOOK_DOCS_ENABLED_TRUE$ac_delim
DOCBOOK_DOCS_ENABLED_FALSE!$DOCBOOK_DOCS_ENABLED_FALSE$ac_delim
ENABLE_INOTIFY_TRUE!$ENABLE_INOTIFY_TRUE$ac_delim
ENABLE_INOTIFY_FALSE!$ENABLE_INOTIFY_FALSE$ac_delim
+RBAC_LIBS!$RBAC_LIBS$ac_delim
DEBUG_CFLAGS!$DEBUG_CFLAGS$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 58; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 68; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -26371,6 +26035,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
*) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
@@ -26424,6 +26093,7 @@ s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
@@ -26588,8 +26258,9 @@ echo "$as_me: executing $ac_file commands" >&6;}
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
@@ -26763,4 +26434,5 @@ echo "
PAM module dir: ${PAM_MODULE_DIR}
Build PAM module: ${msg_pam_module}
Build docs: ${enable_docbook_docs}
+ Build with RBAC: ${msg_rbac_shutdown}
"
diff --git a/configure.ac b/configure.ac
index d706a56..0c6c6e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,9 +1,8 @@
-dnl -*- mode: m4 -*-
AC_PREREQ(2.59c)
AC_INIT([ConsoleKit],
- [0.2.3],
- [mccann@jhu.edu],
+ [0.2.10],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit],
[ConsoleKit])
AC_CONFIG_SRCDIR([src/ck-manager.c])
@@ -12,6 +11,9 @@ AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
+# for O_NOFOLLOW support
+AC_GNU_SOURCE
+
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
@@ -36,25 +38,43 @@ AM_GLIB_GNU_GETTEXT
DBUS_REQUIRED_VERSION=0.30
GLIB_REQUIRED_VERSION=2.7.0
X11_REQUIRED_VERSION=1.0.0
+POLKIT_REQUIRED_VERSION=0.7
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(paths.h)
+AC_CHECK_HEADERS(sys/vt.h)
+AC_CHECK_HEADERS(sys/consio.h)
AC_CHECK_FUNCS(getpeerucred getpeereid)
AC_TYPE_UID_T
PKG_CHECK_MODULES(CONSOLE_KIT,
- dbus-glib-1 >= $DBUS_REQUIRED_VERSION
- gobject-2.0 >= $GLIB_REQUIRED_VERSION
- gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ dbus-glib-1 >= $DBUS_REQUIRED_VERSION
+ gobject-2.0 >= $GLIB_REQUIRED_VERSION
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
)
+
+PKG_CHECK_MODULES(POLKIT,
+ polkit >= $POLKIT_REQUIRED_VERSION,
+ have_polkit=yes,
+ have_polkit=no)
+if test "x$have_polkit" = "xyes" ; then
+ AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
+fi
+AM_CONDITIONAL(HAVE_POLKIT, test x$have_polkit = xyes)
+AC_SUBST(HAVE_POLKIT)
+
PKG_CHECK_MODULES(LIBDBUS,
- dbus-1 >= $DBUS_REQUIRED_VERSION
+ dbus-1 >= $DBUS_REQUIRED_VERSION
)
PKG_CHECK_MODULES(TOOLS,
- x11 >= $X11_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ x11 >= $X11_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
+)
+
+PKG_CHECK_MODULES(HISTORY,
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
)
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
@@ -119,6 +139,20 @@ else
fi
AC_SUBST(DBUS_SYS_DIR)
+
+dnl ---------------------------------------------------------------------------
+dnl - Check for libz
+dnl ---------------------------------------------------------------------------
+
+have_libz=no
+AC_CHECK_LIB(z, compress,
+ [AC_CHECK_HEADER(zlib.h, [have_libz=yes], [])], [])
+if test "x$have_libz" != "xyes"; then
+ AC_MSG_ERROR([Unable to find libz])
+fi
+Z_LIBS="${Z_LIBS} -lz"
+AC_SUBST(Z_LIBS)
+
dnl ---------------------------------------------------------------------------
dnl - PID file
dnl ---------------------------------------------------------------------------
@@ -258,6 +292,23 @@ if test "x$enable_inotify" = "xyes" ; then
fi
dnl ---------------------------------------------------------------------------
+dnl check for RBAC
+dnl ---------------------------------------------------------------------------
+
+msg_rbac_shutdown=no
+AC_ARG_ENABLE(rbac-shutdown,
+ [AC_HELP_STRING([--enable-rbac-shutdown=<key>],
+ [Build with RBAC support specifying shutdown/reboot RBAC authentication key])],
+ enable_rbac_shutdown=$enableval,enable_rbac_shutdown=no)
+if test "x$enable_rbac_shutdown" != "xno"; then
+ RBAC_LIBS="-lsecdb -lsocket -lnsl"
+ AC_DEFINE(ENABLE_RBAC_SHUTDOWN, [], [Set if we build with RBAC support])
+ AC_DEFINE_UNQUOTED(RBAC_SHUTDOWN_KEY, "$enable_rbac_shutdown", [Set if we build with RBAC support])
+ msg_rbac_shutdown="yes, using key $enable_rbac_shutdown"
+fi
+AC_SUBST(RBAC_LIBS)
+
+dnl ---------------------------------------------------------------------------
dnl Finish
dnl ---------------------------------------------------------------------------
@@ -336,6 +387,8 @@ Makefile
src/Makefile
tools/Makefile
tools/linux/Makefile
+tools/freebsd/Makefile
+tools/solaris/Makefile
data/Makefile
doc/Makefile
doc/ConsoleKit.xml
@@ -372,4 +425,5 @@ echo "
PAM module dir: ${PAM_MODULE_DIR}
Build PAM module: ${msg_pam_module}
Build docs: ${enable_docbook_docs}
+ Build with RBAC: ${msg_rbac_shutdown}
"
diff --git a/data/ConsoleKit.conf b/data/ConsoleKit.conf
index 1ede954..70a0423 100644
--- a/data/ConsoleKit.conf
+++ b/data/ConsoleKit.conf
@@ -7,34 +7,88 @@
<policy user="root">
<allow own="org.freedesktop.ConsoleKit"/>
+ <!-- Allow all methods on interfaces -->
<allow send_interface="org.freedesktop.ConsoleKit.Manager"/>
<allow send_interface="org.freedesktop.ConsoleKit.Seat"/>
<allow send_interface="org.freedesktop.ConsoleKit.Session"/>
-
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
- send_member="OpenConsoleWithParameters"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
- send_member="Lock"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
- send_member="Unlock"/>
- <allow send_destination="org.freedesktop.ConsoleKit"
- send_interface="org.freedesktop.DBus.Properties" />
</policy>
- <!-- Allow anyone to invoke methods on the interfaces -->
+ <!-- Deny all and then allow some methods on interfaces -->
<policy context="default">
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Seat"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"/>
-
- <deny send_interface="org.freedesktop.ConsoleKit.Manager"
- send_member="OpenSessionWithParameters"/>
- <deny send_interface="org.freedesktop.ConsoleKit.Session"
- send_member="Lock"/>
- <deny send_interface="org.freedesktop.ConsoleKit.Session"
- send_member="Unlock"/>
+ <deny send_interface="org.freedesktop.ConsoleKit.Manager"/>
+ <deny send_interface="org.freedesktop.ConsoleKit.Seat"/>
+ <deny send_interface="org.freedesktop.ConsoleKit.Session"/>
<deny send_destination="org.freedesktop.ConsoleKit"
send_interface="org.freedesktop.DBus.Properties" />
+
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="Restart"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="Stop"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="OpenSession"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="CloseSession"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="GetSeats"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="GetSessionForCookie"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="GetSessionForUnixProcess"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="GetCurrentSession"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="GetSessionsForUnixUser"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="GetSessionsForUser"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="GetSystemIdleHint"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="GetSystemIdleSinceHint"/>
+
+ <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ send_member="GetId"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ send_member="GetSessions"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ send_member="GetDevices"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ send_member="GetActiveSession"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ send_member="CanActivateSessions"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ send_member="ActivateSession"/>
+
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetId"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetSeatId"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetSessionType"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetUser"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetUnixUser"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetX11Display"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetX11DisplayDevice"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetDisplayDevice"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetRemoteHostName"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="IsActive"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="IsLocal"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetCreationTime"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="Activate"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetIdleHint"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="GetIdleSinceHint"/>
</policy>
</busconfig>
diff --git a/data/ConsoleKit.in b/data/ConsoleKit.in
deleted file mode 100755
index 83360cd..0000000
--- a/data/ConsoleKit.in
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-#
-# ConsoleKit: ConsoleKit daemon
-#
-# chkconfig: 345 90 10
-# description: The ConsoleKit maintains a list of sessions
-#
-# processname: console-kit-daemon
-# pidfile: @CONSOLE_KIT_PID_FILE@
-#
-
-# Sanity checks.
-[ -x @sbindir@/console-kit-daemon ] || exit 0
-
-# Source function library.
-. @sysconfdir@/rc.d/init.d/functions
-
-# so we can rearrange this easily
-processname=console-kit-daemon
-servicename=ConsoleKit
-
-RETVAL=0
-
-start() {
- echo -n $"Starting ConsoleKit: "
- daemon --check $servicename $processname
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$servicename
-}
-
-stop() {
- echo -n $"Stopping ConsoleKit: "
-
- killproc $processname -TERM
- RETVAL=$?
- echo
- if [ $RETVAL -eq 0 ]; then
- rm -f @localstatedir@/lock/subsys/$servicename
- rm -f @CONSOLE_KIT_PID_FILE@
- fi
-}
-
-# See how we were called.
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- status)
- status $processname
- RETVAL=$?
- ;;
- restart)
- stop
- start
- ;;
- condrestart)
- if [ -f @localstatedir@/lock/subsys/$servicename ]; then
- stop
- start
- fi
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|condrestart}"
- ;;
-esac
-exit $RETVAL
diff --git a/data/ConsoleKit.policy b/data/ConsoleKit.policy
new file mode 100644
index 0000000..e691b0b
--- /dev/null
+++ b/data/ConsoleKit.policy
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
+
+<!--
+Policy definitions for ConsoleKit
+-->
+
+<policyconfig>
+
+ <action id="org.freedesktop.consolekit.system.stop">
+ <description>Stop the system</description>
+ <message>System policy prevents stopping the system</message>
+ <defaults>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ </action>
+
+ <action id="org.freedesktop.consolekit.system.stop-multiple-users">
+ <description>Stop the system when multiple users are logged in</description>
+ <message>System policy prevents stopping the when other users are logged in</message>
+ <defaults>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ </action>
+
+ <action id="org.freedesktop.consolekit.system.restart">
+ <description>Restart the system</description>
+ <message>System policy prevents restarting the system</message>
+ <defaults>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ </action>
+
+ <action id="org.freedesktop.consolekit.system.restart-multiple-users">
+ <description>Restart the system when multiple users are logged in</description>
+ <message>System policy prevents restarting the system when other users are logged in</message>
+ <defaults>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ </action>
+
+</policyconfig>
diff --git a/data/Makefile.am b/data/Makefile.am
index 947f762..ef13d8c 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -6,18 +6,18 @@ dbusconf_DATA = ConsoleKit.conf
seatdir = $(sysconfdir)/ConsoleKit/seats.d
seat_DATA = 00-primary.seat
-SCRIPT_IN_FILES = ConsoleKit.in
-
-# I guess it's Linux-only but that will do for the moment.
-if ! CK_COMPILE_FREEBSD
-initddir=$(sysconfdir)/rc.d/init.d
-initd_SCRIPTS= \
- ConsoleKit \
+if HAVE_POLKIT
+polkit_policydir = $(datadir)/PolicyKit/policy
+dist_polkit_policy_DATA = \
+ ConsoleKit.policy \
$(NULL)
endif
+servicedir = $(datadir)/dbus-1/system-services
+service_in_files = org.freedesktop.ConsoleKit.service.in
+service_DATA = $(service_in_files:.service.in=.service)
-ConsoleKit: ConsoleKit.in Makefile
+$(service_DATA): $(service_in_files) Makefile
$(edit) $< >$@
edit = sed \
@@ -29,11 +29,11 @@ edit = sed \
EXTRA_DIST = \
$(dbusconf_DATA) \
$(seat_DATA) \
- $(SCRIPT_IN_FILES) \
+ $(service_in_files) \
$(NULL)
MAINTAINERCLEANFILES = \
*~ \
Makefile.in
-CLEANFILES = ConsoleKit
+CLEANFILES = $(service_DATA)
diff --git a/data/Makefile.in b/data/Makefile.in
index 9dd6e7e..bfc4196 100644
--- a/data/Makefile.in
+++ b/data/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,16 +14,11 @@
@SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -38,7 +33,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = data
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(am__dist_polkit_policy_DATA_DIST) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
@@ -47,10 +43,6 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(initddir)" "$(DESTDIR)$(dbusconfdir)" \
- "$(DESTDIR)$(seatdir)"
-initdSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-SCRIPTS = $(initd_SCRIPTS)
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -59,13 +51,18 @@ am__vpath_adj = case $$p in \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(dbusconfdir)" \
+ "$(DESTDIR)$(polkit_policydir)" "$(DESTDIR)$(seatdir)" \
+ "$(DESTDIR)$(servicedir)"
dbusconfDATA_INSTALL = $(INSTALL_DATA)
+am__dist_polkit_policy_DATA_DIST = ConsoleKit.policy
+dist_polkit_policyDATA_INSTALL = $(INSTALL_DATA)
seatDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dbusconf_DATA) $(seat_DATA)
+serviceDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dbusconf_DATA) $(dist_polkit_policy_DATA) $(seat_DATA) \
+ $(service_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -78,12 +75,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CK_BACKEND = @CK_BACKEND@
-CK_COMPILE_FREEBSD_FALSE = @CK_COMPILE_FREEBSD_FALSE@
-CK_COMPILE_FREEBSD_TRUE = @CK_COMPILE_FREEBSD_TRUE@
-CK_COMPILE_LINUX_FALSE = @CK_COMPILE_LINUX_FALSE@
-CK_COMPILE_LINUX_TRUE = @CK_COMPILE_LINUX_TRUE@
-CK_COMPILE_SOLARIS_FALSE = @CK_COMPILE_SOLARIS_FALSE@
-CK_COMPILE_SOLARIS_TRUE = @CK_COMPILE_SOLARIS_TRUE@
CONSOLE_KIT_CFLAGS = @CONSOLE_KIT_CFLAGS@
CONSOLE_KIT_LIBS = @CONSOLE_KIT_LIBS@
CONSOLE_KIT_PID_FILE = @CONSOLE_KIT_PID_FILE@
@@ -100,17 +91,11 @@ DBUS_SYS_DIR = @DBUS_SYS_DIR@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DOCBOOK_DOCS_ENABLED_FALSE = @DOCBOOK_DOCS_ENABLED_FALSE@
-DOCBOOK_DOCS_ENABLED_TRUE = @DOCBOOK_DOCS_ENABLED_TRUE@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_INOTIFY_FALSE = @ENABLE_INOTIFY_FALSE@
-ENABLE_INOTIFY_TRUE = @ENABLE_INOTIFY_TRUE@
-ENABLE_PAM_MODULE_FALSE = @ENABLE_PAM_MODULE_FALSE@
-ENABLE_PAM_MODULE_TRUE = @ENABLE_PAM_MODULE_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
@@ -120,8 +105,10 @@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_PAM = @HAVE_PAM@
-HAVE_PAM_FALSE = @HAVE_PAM_FALSE@
-HAVE_PAM_TRUE = @HAVE_PAM_TRUE@
+HAVE_POLKIT = @HAVE_POLKIT@
+HISTORY_CFLAGS = @HISTORY_CFLAGS@
+HISTORY_LIBS = @HISTORY_LIBS@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -138,9 +125,8 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
@@ -156,10 +142,13 @@ PAM_MODULE_DIR = @PAM_MODULE_DIR@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+RBAC_LIBS = @RBAC_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -170,13 +159,14 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
XMLTO = @XMLTO@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -188,6 +178,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -215,21 +206,24 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
NULL =
dbusconfdir = $(DBUS_SYS_DIR)
dbusconf_DATA = ConsoleKit.conf
seatdir = $(sysconfdir)/ConsoleKit/seats.d
seat_DATA = 00-primary.seat
-SCRIPT_IN_FILES = ConsoleKit.in
-
-# I guess it's Linux-only but that will do for the moment.
-@CK_COMPILE_FREEBSD_FALSE@initddir = $(sysconfdir)/rc.d/init.d
-@CK_COMPILE_FREEBSD_FALSE@initd_SCRIPTS = \
-@CK_COMPILE_FREEBSD_FALSE@ ConsoleKit \
-@CK_COMPILE_FREEBSD_FALSE@ $(NULL)
-
+@HAVE_POLKIT_TRUE@polkit_policydir = $(datadir)/PolicyKit/policy
+@HAVE_POLKIT_TRUE@dist_polkit_policy_DATA = \
+@HAVE_POLKIT_TRUE@ ConsoleKit.policy \
+@HAVE_POLKIT_TRUE@ $(NULL)
+
+servicedir = $(datadir)/dbus-1/system-services
+service_in_files = org.freedesktop.ConsoleKit.service.in
+service_DATA = $(service_in_files:.service.in=.service)
edit = sed \
-e 's|@sbindir[@]|$(sbindir)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
@@ -239,14 +233,14 @@ edit = sed \
EXTRA_DIST = \
$(dbusconf_DATA) \
$(seat_DATA) \
- $(SCRIPT_IN_FILES) \
+ $(service_in_files) \
$(NULL)
MAINTAINERCLEANFILES = \
*~ \
Makefile.in
-CLEANFILES = ConsoleKit
+CLEANFILES = $(service_DATA)
all: all-am
.SUFFIXES:
@@ -279,38 +273,15 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-initdSCRIPTS: $(initd_SCRIPTS)
- @$(NORMAL_INSTALL)
- test -z "$(initddir)" || $(mkdir_p) "$(DESTDIR)$(initddir)"
- @list='$(initd_SCRIPTS)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- if test -f $$d$$p; then \
- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " $(initdSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(initddir)/$$f'"; \
- $(initdSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(initddir)/$$f"; \
- else :; fi; \
- done
-
-uninstall-initdSCRIPTS:
- @$(NORMAL_UNINSTALL)
- @list='$(initd_SCRIPTS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " rm -f '$(DESTDIR)$(initddir)/$$f'"; \
- rm -f "$(DESTDIR)$(initddir)/$$f"; \
- done
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
install-dbusconfDATA: $(dbusconf_DATA)
@$(NORMAL_INSTALL)
- test -z "$(dbusconfdir)" || $(mkdir_p) "$(DESTDIR)$(dbusconfdir)"
+ test -z "$(dbusconfdir)" || $(MKDIR_P) "$(DESTDIR)$(dbusconfdir)"
@list='$(dbusconf_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -325,9 +296,26 @@ uninstall-dbusconfDATA:
echo " rm -f '$(DESTDIR)$(dbusconfdir)/$$f'"; \
rm -f "$(DESTDIR)$(dbusconfdir)/$$f"; \
done
+install-dist_polkit_policyDATA: $(dist_polkit_policy_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(polkit_policydir)" || $(MKDIR_P) "$(DESTDIR)$(polkit_policydir)"
+ @list='$(dist_polkit_policy_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(dist_polkit_policyDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(polkit_policydir)/$$f'"; \
+ $(dist_polkit_policyDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(polkit_policydir)/$$f"; \
+ done
+
+uninstall-dist_polkit_policyDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_polkit_policy_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(polkit_policydir)/$$f'"; \
+ rm -f "$(DESTDIR)$(polkit_policydir)/$$f"; \
+ done
install-seatDATA: $(seat_DATA)
@$(NORMAL_INSTALL)
- test -z "$(seatdir)" || $(mkdir_p) "$(DESTDIR)$(seatdir)"
+ test -z "$(seatdir)" || $(MKDIR_P) "$(DESTDIR)$(seatdir)"
@list='$(seat_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -342,6 +330,23 @@ uninstall-seatDATA:
echo " rm -f '$(DESTDIR)$(seatdir)/$$f'"; \
rm -f "$(DESTDIR)$(seatdir)/$$f"; \
done
+install-serviceDATA: $(service_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)"
+ @list='$(service_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(serviceDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(servicedir)/$$f'"; \
+ $(serviceDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(servicedir)/$$f"; \
+ done
+
+uninstall-serviceDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(service_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(servicedir)/$$f'"; \
+ rm -f "$(DESTDIR)$(servicedir)/$$f"; \
+ done
tags: TAGS
TAGS:
@@ -350,22 +355,21 @@ CTAGS:
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -378,10 +382,10 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
-all-am: Makefile $(SCRIPTS) $(DATA)
+all-am: Makefile $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(initddir)" "$(DESTDIR)$(dbusconfdir)" "$(DESTDIR)$(seatdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ for dir in "$(DESTDIR)$(dbusconfdir)" "$(DESTDIR)$(polkit_policydir)" "$(DESTDIR)$(seatdir)" "$(DESTDIR)$(servicedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -415,7 +419,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
dvi: dvi-am
@@ -427,15 +431,23 @@ info: info-am
info-am:
-install-data-am: install-dbusconfDATA install-initdSCRIPTS \
- install-seatDATA
+install-data-am: install-dbusconfDATA install-dist_polkit_policyDATA \
+ install-seatDATA install-serviceDATA
+
+install-dvi: install-dvi-am
install-exec-am:
+install-html: install-html-am
+
install-info: install-info-am
install-man:
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -454,23 +466,28 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-dbusconfDATA uninstall-info-am \
- uninstall-initdSCRIPTS uninstall-seatDATA
+uninstall-am: uninstall-dbusconfDATA uninstall-dist_polkit_policyDATA \
+ uninstall-seatDATA uninstall-serviceDATA
+
+.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dbusconfDATA install-exec \
- install-exec-am install-info install-info-am \
- install-initdSCRIPTS install-man install-seatDATA \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-dbusconfDATA \
- uninstall-info-am uninstall-initdSCRIPTS uninstall-seatDATA
-
-
-ConsoleKit: ConsoleKit.in Makefile
+ install-data install-data-am install-dbusconfDATA \
+ install-dist_polkit_policyDATA install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-seatDATA \
+ install-serviceDATA install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-dbusconfDATA \
+ uninstall-dist_polkit_policyDATA uninstall-seatDATA \
+ uninstall-serviceDATA
+
+
+$(service_DATA): $(service_in_files) Makefile
$(edit) $< >$@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/data/org.freedesktop.ConsoleKit.service.in b/data/org.freedesktop.ConsoleKit.service.in
new file mode 100644
index 0000000..ec2128c
--- /dev/null
+++ b/data/org.freedesktop.ConsoleKit.service.in
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.freedesktop.ConsoleKit
+Exec=@sbindir@/console-kit-daemon
+User=root
diff --git a/depcomp b/depcomp
index 04701da..ca5ea4e 100755
--- a/depcomp
+++ b/depcomp
@@ -1,9 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2005-07-09.11
+scriptversion=2006-10-15.18
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -91,7 +92,20 @@ gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
- "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
stat=$?
if test $stat -eq 0; then :
else
@@ -276,6 +290,46 @@ icc)
rm -f "$tmpdepfile"
;;
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -288,13 +342,13 @@ tru64)
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
- # static library. This mecanism is used in libtool 1.4 series to
+ # static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in in $dir.libs/$base.o.d and
+ # compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
diff --git a/doc/ConsoleKit.xml b/doc/ConsoleKit.xml
index b3e1ce3..856202b 100644
--- a/doc/ConsoleKit.xml
+++ b/doc/ConsoleKit.xml
@@ -10,8 +10,8 @@
<book id="index">
<bookinfo>
- <title>ConsoleKit 0.2.3 Documentation</title>
- <releaseinfo>Version 0.2.3</releaseinfo>
+ <title>ConsoleKit 0.2.10 Documentation</title>
+ <releaseinfo>Version 0.2.10</releaseinfo>
<date>8 March, 2007</date>
<authorgroup>
<author>
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 0e72c4a..97182af 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,15 +14,11 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -60,8 +56,6 @@ htmldocDATA_INSTALL = $(INSTALL_DATA)
DATA = $(htmldoc_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -74,12 +68,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CK_BACKEND = @CK_BACKEND@
-CK_COMPILE_FREEBSD_FALSE = @CK_COMPILE_FREEBSD_FALSE@
-CK_COMPILE_FREEBSD_TRUE = @CK_COMPILE_FREEBSD_TRUE@
-CK_COMPILE_LINUX_FALSE = @CK_COMPILE_LINUX_FALSE@
-CK_COMPILE_LINUX_TRUE = @CK_COMPILE_LINUX_TRUE@
-CK_COMPILE_SOLARIS_FALSE = @CK_COMPILE_SOLARIS_FALSE@
-CK_COMPILE_SOLARIS_TRUE = @CK_COMPILE_SOLARIS_TRUE@
CONSOLE_KIT_CFLAGS = @CONSOLE_KIT_CFLAGS@
CONSOLE_KIT_LIBS = @CONSOLE_KIT_LIBS@
CONSOLE_KIT_PID_FILE = @CONSOLE_KIT_PID_FILE@
@@ -96,17 +84,11 @@ DBUS_SYS_DIR = @DBUS_SYS_DIR@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DOCBOOK_DOCS_ENABLED_FALSE = @DOCBOOK_DOCS_ENABLED_FALSE@
-DOCBOOK_DOCS_ENABLED_TRUE = @DOCBOOK_DOCS_ENABLED_TRUE@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_INOTIFY_FALSE = @ENABLE_INOTIFY_FALSE@
-ENABLE_INOTIFY_TRUE = @ENABLE_INOTIFY_TRUE@
-ENABLE_PAM_MODULE_FALSE = @ENABLE_PAM_MODULE_FALSE@
-ENABLE_PAM_MODULE_TRUE = @ENABLE_PAM_MODULE_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
@@ -116,8 +98,10 @@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_PAM = @HAVE_PAM@
-HAVE_PAM_FALSE = @HAVE_PAM_FALSE@
-HAVE_PAM_TRUE = @HAVE_PAM_TRUE@
+HAVE_POLKIT = @HAVE_POLKIT@
+HISTORY_CFLAGS = @HISTORY_CFLAGS@
+HISTORY_LIBS = @HISTORY_LIBS@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -134,9 +118,8 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
@@ -152,10 +135,13 @@ PAM_MODULE_DIR = @PAM_MODULE_DIR@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+RBAC_LIBS = @RBAC_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -166,13 +152,14 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
XMLTO = @XMLTO@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -184,6 +171,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -211,8 +199,11 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
NULL =
SPEC_XML_FILES = \
ConsoleKit.xml \
@@ -277,13 +268,9 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
install-htmldocDATA: $(htmldoc_DATA)
@$(NORMAL_INSTALL)
- test -z "$(htmldocdir)" || $(mkdir_p) "$(DESTDIR)$(htmldocdir)"
+ test -z "$(htmldocdir)" || $(MKDIR_P) "$(DESTDIR)$(htmldocdir)"
@list='$(htmldoc_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -306,23 +293,21 @@ CTAGS:
distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/xml
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -338,7 +323,7 @@ check: check-am
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(htmldocdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -371,7 +356,7 @@ clean-am: clean-generic clean-libtool clean-local mostlyclean-am
distclean: distclean-am
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
dvi: dvi-am
@@ -385,12 +370,20 @@ info-am:
install-data-am: install-htmldocDATA
+install-dvi: install-dvi-am
+
install-exec-am:
+install-html: install-html-am
+
install-info: install-info-am
install-man:
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -409,18 +402,22 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-htmldocDATA uninstall-info-am
+uninstall-am: uninstall-htmldocDATA
+
+.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
clean-local distclean distclean-generic distclean-libtool \
distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-exec \
- install-exec-am install-htmldocDATA install-info \
- install-info-am install-man install-strip installcheck \
+ install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-htmldocDATA install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-htmldocDATA uninstall-info-am
+ uninstall-htmldocDATA
@DOCBOOK_DOCS_ENABLED_TRUE@ConsoleKit.html : $(SPEC_XML_FILES)
diff --git a/doc/xml/ref-ck-manager.xml b/doc/xml/ref-ck-manager.xml
index 2aceef8..3eb3a92 100644
--- a/doc/xml/ref-ck-manager.xml
+++ b/doc/xml/ref-ck-manager.xml
@@ -8,12 +8,15 @@
</refnamediv>
<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Methods</title>
- <synopsis><link linkend="Manager.OpenSession">OpenSession</link> (out 's' cookie)
+ <synopsis><link linkend="Manager.Restart">Restart</link> ()
+<link linkend="Manager.Stop">Stop</link> ()
+<link linkend="Manager.OpenSession">OpenSession</link> (out 's' cookie)
<link linkend="Manager.OpenSessionWithParameters">OpenSessionWithParameters</link> (in 'a(sv)' parameters,
out 's' cookie)
<link linkend="Manager.CloseSession">CloseSession</link> (in 's' cookie,
out 'b' result)
<link linkend="Manager.GetSeats">GetSeats</link> (out 'ao' seats)
+<link linkend="Manager.GetSessions">GetSessions</link> (out 'ao' sessions)
<link linkend="Manager.GetSessionForCookie">GetSessionForCookie</link> (in 's' cookie,
out 'o' ssid)
<link linkend="Manager.GetSessionForUnixProcess">GetSessionForUnixProcess</link> (in 'u' pid,
@@ -49,7 +52,11 @@
<title role="desc.title">Description</title>
<para/>
</refsect1>
- <refsect1 role="details"><title role="details.title">Details</title><refsect2><title><anchor role="function" id="Manager.OpenSession"/>OpenSession ()</title><indexterm><primary>OpenSession</primary><secondary>Manager</secondary></indexterm><programlisting>OpenSession (out 's' cookie)</programlisting></refsect2>
+ <refsect1 role="details"><title role="details.title">Details</title><refsect2><title><anchor role="function" id="Manager.Restart"/>Restart ()</title><indexterm><primary>Restart</primary><secondary>Manager</secondary></indexterm><programlisting>Restart ()</programlisting></refsect2>
+ <para>This method initiates a request to restart (ie. reboot) the computer system.</para>
+ <variablelist role="params"/><refsect2><title><anchor role="function" id="Manager.Stop"/>Stop ()</title><indexterm><primary>Stop</primary><secondary>Manager</secondary></indexterm><programlisting>Stop ()</programlisting></refsect2>
+ <para>This method initiates a request to stop (ie. shutdown) the computer system.</para>
+ <variablelist role="params"/><refsect2><title><anchor role="function" id="Manager.OpenSession"/>OpenSession ()</title><indexterm><primary>OpenSession</primary><secondary>Manager</secondary></indexterm><programlisting>OpenSession (out 's' cookie)</programlisting></refsect2>
<para>This method requests that a new <link linkend="Session">Session</link>
be created for the calling process. The properties of this new Session are set automatically
from information collected about the calling process.
@@ -126,7 +133,14 @@ See also:
<link linkend="Seat">Seat</link> interface.</para>
<variablelist role="params"><varlistentry><term><parameter>seats</parameter>:</term><listitem><simpara>an array of Seat IDs</simpara></listitem></varlistentry></variablelist><para>
See also:
-<link linkend="Seat">org.freedesktop.ConsoleKit.Seat</link></para><refsect2><title><anchor role="function" id="Manager.GetSessionForCookie"/>GetSessionForCookie ()</title><indexterm><primary>GetSessionForCookie</primary><secondary>Manager</secondary></indexterm><programlisting>GetSessionForCookie (in 's' cookie,
+<link linkend="Seat">org.freedesktop.ConsoleKit.Seat</link></para><refsect2><title><anchor role="function" id="Manager.GetSessions"/>GetSessions ()</title><indexterm><primary>GetSessions</primary><secondary>Manager</secondary></indexterm><programlisting>GetSessions (out 'ao' sessions)</programlisting></refsect2>
+ <para>This gets a list of all the <link linkend="Sessions">Sessions</link>
+ that are currently present on the system.</para>
+ <para>Each Session ID is an D-Bus object path for the object that implements the
+ <link linkend="Session">Session</link> interface.</para>
+ <variablelist role="params"><varlistentry><term><parameter>sessions</parameter>:</term><listitem><simpara>an array of Session IDs</simpara></listitem></varlistentry></variablelist><para>
+See also:
+<link linkend="Session">org.freedesktop.ConsoleKit.Session</link></para><refsect2><title><anchor role="function" id="Manager.GetSessionForCookie"/>GetSessionForCookie ()</title><indexterm><primary>GetSessionForCookie</primary><secondary>Manager</secondary></indexterm><programlisting>GetSessionForCookie (in 's' cookie,
out 'o' ssid)</programlisting></refsect2>
<para>Returns the session ID that is associated with the specified cookie.
</para>
diff --git a/install-sh b/install-sh
index 4d4a951..4fbbae7 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2005-05-14.22
+scriptversion=2006-10-14.15
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -39,15 +39,24 @@ scriptversion=2005-05-14.22
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
@@ -58,7 +67,13 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
-chmodcmd="$chmodprog 0755"
+posix_glob=
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chmodcmd=$chmodprog
chowncmd=
chgrpcmd=
stripcmd=
@@ -95,7 +110,7 @@ Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
-while test -n "$1"; do
+while test $# -ne 0; do
case $1 in
-c) shift
continue;;
@@ -111,9 +126,15 @@ while test -n "$1"; do
--help) echo "$usage"; exit $?;;
- -m) chmodcmd="$chmodprog $2"
+ -m) mode=$2
shift
shift
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
continue;;
-o) chowncmd="$chownprog $2"
@@ -136,25 +157,33 @@ while test -n "$1"; do
--version) echo "$0 $scriptversion"; exit $?;;
- *) # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- test -n "$dir_arg$dstarg" && break
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dstarg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dstarg"
- shift # fnord
- fi
- shift # arg
- dstarg=$arg
- done
+ --) shift
break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
esac
done
-if test -z "$1"; then
+if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+fi
+
+if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
@@ -164,6 +193,33 @@ if test -z "$1"; then
exit 0
fi
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
for src
do
# Protect names starting with `-'.
@@ -173,15 +229,11 @@ do
if test -n "$dir_arg"; then
dst=$src
- src=
-
- if test -d "$dst"; then
- mkdircmd=:
- chmodcmd=
- else
- mkdircmd=$mkdirprog
- fi
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
else
+
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
@@ -208,53 +260,188 @@ do
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
- dst=$dst/`basename "$src"`
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
fi
fi
- # This sed command emulates the dirname command.
- dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
-
- # Make sure that the destination directory exists.
-
- # Skip lots of stat calls in the usual case.
- if test ! -d "$dstdir"; then
- defaultIFS='
- '
- IFS="${IFS-$defaultIFS}"
-
- oIFS=$IFS
- # Some sh's can't handle IFS=/ for some reason.
- IFS='%'
- set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
- shift
- IFS=$oIFS
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
- pathcomp=
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
- while test $# -ne 0 ; do
- pathcomp=$pathcomp$1
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix=/ ;;
+ -*) prefix=./ ;;
+ *) prefix= ;;
+ esac
+
+ case $posix_glob in
+ '')
+ if (set -f) 2>/dev/null; then
+ posix_glob=true
+ else
+ posix_glob=false
+ fi ;;
+ esac
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob && set -f
+ set fnord $dstdir
shift
- if test ! -d "$pathcomp"; then
- $mkdirprog "$pathcomp"
- # mkdir can fail with a `File exist' error in case several
- # install-sh are creating the directory concurrently. This
- # is OK.
- test -d "$pathcomp" || exit
+ $posix_glob && set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
- pathcomp=$pathcomp/
- done
+ fi
fi
if test -n "$dir_arg"; then
- $doit $mkdircmd "$dst" \
- && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
- dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
@@ -262,10 +449,9 @@ do
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
- trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
- $doit $cpprog "$src" "$dsttmp" &&
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -276,10 +462,10 @@ do
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# Now rename the file to the real destination.
- { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+ { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
@@ -291,11 +477,12 @@ do
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
- if test -f "$dstdir/$dstfile"; then
- $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
- || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ if test -f "$dst"; then
+ $doit $rmcmd -f "$dst" 2>/dev/null \
+ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
+ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|| {
- echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
else
@@ -304,16 +491,13 @@ do
} &&
# Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ $doit $mvcmd "$dsttmp" "$dst"
}
- }
- fi || { (exit 1); exit 1; }
-done
+ } || exit 1
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
- (exit 0); exit 0
-}
+ trap '' 0
+ fi
+done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/libck-connector/Makefile.am b/libck-connector/Makefile.am
index 757c41e..5654363 100644
--- a/libck-connector/Makefile.am
+++ b/libck-connector/Makefile.am
@@ -30,7 +30,7 @@ test_connector_SOURCES = \
test_connector_LDADD = \
- $(top_builddir)/libck-connector/libck-connector.la \
+ libck-connector.la \
$(LIBDBUS_LIBS) \
$(NULL)
diff --git a/libck-connector/Makefile.in b/libck-connector/Makefile.in
index 74828a3..800f95f 100644
--- a/libck-connector/Makefile.in
+++ b/libck-connector/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -17,15 +17,11 @@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -67,24 +63,27 @@ libck_connector_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
am__objects_1 =
am_libck_connector_la_OBJECTS = ck-connector.lo $(am__objects_1)
libck_connector_la_OBJECTS = $(am_libck_connector_la_OBJECTS)
+libck_connector_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libck_connector_la_LDFLAGS) $(LDFLAGS) -o $@
am__EXEEXT_1 =
PROGRAMS = $(noinst_PROGRAMS)
am_test_connector_OBJECTS = test-connector.$(OBJEXT) $(am__objects_1)
test_connector_OBJECTS = $(am_test_connector_OBJECTS)
-test_connector_DEPENDENCIES = \
- $(top_builddir)/libck-connector/libck-connector.la \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+test_connector_DEPENDENCIES = libck-connector.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(libck_connector_la_SOURCES) $(test_connector_SOURCES)
DIST_SOURCES = $(libck_connector_la_SOURCES) $(test_connector_SOURCES)
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
@@ -95,8 +94,6 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -109,12 +106,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CK_BACKEND = @CK_BACKEND@
-CK_COMPILE_FREEBSD_FALSE = @CK_COMPILE_FREEBSD_FALSE@
-CK_COMPILE_FREEBSD_TRUE = @CK_COMPILE_FREEBSD_TRUE@
-CK_COMPILE_LINUX_FALSE = @CK_COMPILE_LINUX_FALSE@
-CK_COMPILE_LINUX_TRUE = @CK_COMPILE_LINUX_TRUE@
-CK_COMPILE_SOLARIS_FALSE = @CK_COMPILE_SOLARIS_FALSE@
-CK_COMPILE_SOLARIS_TRUE = @CK_COMPILE_SOLARIS_TRUE@
CONSOLE_KIT_CFLAGS = @CONSOLE_KIT_CFLAGS@
CONSOLE_KIT_LIBS = @CONSOLE_KIT_LIBS@
CONSOLE_KIT_PID_FILE = @CONSOLE_KIT_PID_FILE@
@@ -131,17 +122,11 @@ DBUS_SYS_DIR = @DBUS_SYS_DIR@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DOCBOOK_DOCS_ENABLED_FALSE = @DOCBOOK_DOCS_ENABLED_FALSE@
-DOCBOOK_DOCS_ENABLED_TRUE = @DOCBOOK_DOCS_ENABLED_TRUE@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_INOTIFY_FALSE = @ENABLE_INOTIFY_FALSE@
-ENABLE_INOTIFY_TRUE = @ENABLE_INOTIFY_TRUE@
-ENABLE_PAM_MODULE_FALSE = @ENABLE_PAM_MODULE_FALSE@
-ENABLE_PAM_MODULE_TRUE = @ENABLE_PAM_MODULE_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
@@ -151,8 +136,10 @@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_PAM = @HAVE_PAM@
-HAVE_PAM_FALSE = @HAVE_PAM_FALSE@
-HAVE_PAM_TRUE = @HAVE_PAM_TRUE@
+HAVE_POLKIT = @HAVE_POLKIT@
+HISTORY_CFLAGS = @HISTORY_CFLAGS@
+HISTORY_LIBS = @HISTORY_LIBS@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -169,9 +156,8 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
@@ -187,10 +173,13 @@ PAM_MODULE_DIR = @PAM_MODULE_DIR@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+RBAC_LIBS = @RBAC_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -201,13 +190,14 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
XMLTO = @XMLTO@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -219,6 +209,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -246,8 +237,11 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
NULL =
INCLUDES = \
-I. \
@@ -273,7 +267,7 @@ test_connector_SOURCES = \
$(NULL)
test_connector_LDADD = \
- $(top_builddir)/libck-connector/libck-connector.la \
+ libck-connector.la \
$(LIBDBUS_LIBS) \
$(NULL)
@@ -337,7 +331,7 @@ ck-connector.pc: $(top_builddir)/config.status $(srcdir)/ck-connector.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
@@ -348,7 +342,7 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
@@ -363,7 +357,7 @@ clean-libLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
libck-connector.la: $(libck_connector_la_OBJECTS) $(libck_connector_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libck_connector_la_LDFLAGS) $(libck_connector_la_OBJECTS) $(libck_connector_la_LIBADD) $(LIBS)
+ $(libck_connector_la_LINK) -rpath $(libdir) $(libck_connector_la_OBJECTS) $(libck_connector_la_LIBADD) $(LIBS)
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
@@ -373,7 +367,7 @@ clean-noinstPROGRAMS:
done
test-connector$(EXEEXT): $(test_connector_OBJECTS) $(test_connector_DEPENDENCIES)
@rm -f test-connector$(EXEEXT)
- $(LINK) $(test_connector_LDFLAGS) $(test_connector_OBJECTS) $(test_connector_LDADD) $(LIBS)
+ $(LINK) $(test_connector_OBJECTS) $(test_connector_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -385,22 +379,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-connector.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -410,13 +404,9 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -433,7 +423,7 @@ uninstall-pkgconfigDATA:
done
install-libck_connectorincludeHEADERS: $(libck_connectorinclude_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(libck_connectorincludedir)" || $(mkdir_p) "$(DESTDIR)$(libck_connectorincludedir)"
+ test -z "$(libck_connectorincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libck_connectorincludedir)"
@list='$(libck_connectorinclude_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -498,22 +488,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -529,7 +518,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(libck_connectorincludedir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -565,7 +554,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -580,12 +569,20 @@ info-am:
install-data-am: install-libck_connectorincludeHEADERS \
install-pkgconfigDATA
+install-dvi: install-dvi-am
+
install-exec-am: install-libLTLIBRARIES
+install-html: install-html-am
+
install-info: install-info-am
install-man:
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -606,23 +603,26 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
+uninstall-am: uninstall-libLTLIBRARIES \
uninstall-libck_connectorincludeHEADERS \
uninstall-pkgconfigDATA
+.MAKE: install-am install-strip
+
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool clean-local \
clean-noinstPROGRAMS ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-libLTLIBRARIES \
- install-libck_connectorincludeHEADERS install-man \
- install-pkgconfigDATA install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
+ install-libck_connectorincludeHEADERS install-man install-pdf \
+ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-libLTLIBRARIES \
uninstall-libck_connectorincludeHEADERS \
uninstall-pkgconfigDATA
diff --git a/missing b/missing
index 894e786..1c8ff70 100755
--- a/missing
+++ b/missing
@@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2005-06-08.21
+scriptversion=2006-05-10.23
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@@ -33,6 +33,8 @@ if test $# -eq 0; then
fi
run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@@ -44,7 +46,7 @@ fi
msg="missing on your system"
-case "$1" in
+case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@@ -77,6 +79,7 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@@ -106,7 +109,7 @@ esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
-case "$1" in
+case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
@@ -135,7 +138,7 @@ esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
-case "$1" in
+case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
@@ -164,7 +167,7 @@ WARNING: \`$1' is $msg. You should only need it if
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
- case "$f" in
+ case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@@ -192,8 +195,8 @@ WARNING: \`$1' is needed, but is $msg.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@@ -214,25 +217,25 @@ WARNING: \`$1' $msg. You should only need it if
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
- if [ ! -f y.tab.h ]; then
+ if test ! -f y.tab.h; then
echo >y.tab.h
fi
- if [ ! -f y.tab.c ]; then
+ if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
@@ -244,18 +247,18 @@ WARNING: \`$1' is $msg. You should only need it if
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
- if [ ! -f lex.yy.c ]; then
+ if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
@@ -267,11 +270,9 @@ WARNING: \`$1' is $msg. You should only need it if
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
@@ -289,11 +290,17 @@ WARNING: \`$1' is $msg. You should only need it if
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
@@ -317,13 +324,13 @@ WARNING: \`$1' is $msg. You should only need it if
fi
firstarg="$1"
if shift; then
- case "$firstarg" in
+ case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
- case "$firstarg" in
+ case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
diff --git a/pam-ck-connector/Makefile.in b/pam-ck-connector/Makefile.in
index 4536e4e..4810216 100644
--- a/pam-ck-connector/Makefile.in
+++ b/pam-ck-connector/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +15,11 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -68,6 +64,9 @@ am__pam_ck_connector_la_SOURCES_DIST = pam-ck-connector.c
@ENABLE_PAM_MODULE_TRUE@am_pam_ck_connector_la_OBJECTS = \
@ENABLE_PAM_MODULE_TRUE@ pam-ck-connector.lo
pam_ck_connector_la_OBJECTS = $(am_pam_ck_connector_la_OBJECTS)
+pam_ck_connector_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(pam_ck_connector_la_LDFLAGS) $(LDFLAGS) -o $@
@ENABLE_PAM_MODULE_TRUE@am_pam_ck_connector_la_rpath = -rpath \
@ENABLE_PAM_MODULE_TRUE@ $(pamlibdir)
am__EXEEXT_1 =
@@ -79,17 +78,18 @@ am__objects_1 =
test_pam_OBJECTS = $(am_test_pam_OBJECTS)
@ENABLE_PAM_MODULE_TRUE@test_pam_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@ENABLE_PAM_MODULE_TRUE@ $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(pam_ck_connector_la_SOURCES) $(test_pam_SOURCES)
DIST_SOURCES = $(am__pam_ck_connector_la_SOURCES_DIST) \
$(am__test_pam_SOURCES_DIST)
@@ -100,8 +100,6 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -114,12 +112,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CK_BACKEND = @CK_BACKEND@
-CK_COMPILE_FREEBSD_FALSE = @CK_COMPILE_FREEBSD_FALSE@
-CK_COMPILE_FREEBSD_TRUE = @CK_COMPILE_FREEBSD_TRUE@
-CK_COMPILE_LINUX_FALSE = @CK_COMPILE_LINUX_FALSE@
-CK_COMPILE_LINUX_TRUE = @CK_COMPILE_LINUX_TRUE@
-CK_COMPILE_SOLARIS_FALSE = @CK_COMPILE_SOLARIS_FALSE@
-CK_COMPILE_SOLARIS_TRUE = @CK_COMPILE_SOLARIS_TRUE@
CONSOLE_KIT_CFLAGS = @CONSOLE_KIT_CFLAGS@
CONSOLE_KIT_LIBS = @CONSOLE_KIT_LIBS@
CONSOLE_KIT_PID_FILE = @CONSOLE_KIT_PID_FILE@
@@ -136,17 +128,11 @@ DBUS_SYS_DIR = @DBUS_SYS_DIR@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DOCBOOK_DOCS_ENABLED_FALSE = @DOCBOOK_DOCS_ENABLED_FALSE@
-DOCBOOK_DOCS_ENABLED_TRUE = @DOCBOOK_DOCS_ENABLED_TRUE@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_INOTIFY_FALSE = @ENABLE_INOTIFY_FALSE@
-ENABLE_INOTIFY_TRUE = @ENABLE_INOTIFY_TRUE@
-ENABLE_PAM_MODULE_FALSE = @ENABLE_PAM_MODULE_FALSE@
-ENABLE_PAM_MODULE_TRUE = @ENABLE_PAM_MODULE_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
@@ -156,8 +142,10 @@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_PAM = @HAVE_PAM@
-HAVE_PAM_FALSE = @HAVE_PAM_FALSE@
-HAVE_PAM_TRUE = @HAVE_PAM_TRUE@
+HAVE_POLKIT = @HAVE_POLKIT@
+HISTORY_CFLAGS = @HISTORY_CFLAGS@
+HISTORY_LIBS = @HISTORY_LIBS@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -174,9 +162,8 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
@@ -192,10 +179,13 @@ PAM_MODULE_DIR = @PAM_MODULE_DIR@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+RBAC_LIBS = @RBAC_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -206,13 +196,14 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
XMLTO = @XMLTO@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -224,6 +215,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -251,8 +243,11 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
NULL =
@ENABLE_PAM_MODULE_TRUE@INCLUDES = \
@ENABLE_PAM_MODULE_TRUE@ $(LIBDBUS_CFLAGS) \
@@ -326,7 +321,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-pamlibLTLIBRARIES: $(pamlib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(pamlibdir)" || $(mkdir_p) "$(DESTDIR)$(pamlibdir)"
+ test -z "$(pamlibdir)" || $(MKDIR_P) "$(DESTDIR)$(pamlibdir)"
@list='$(pamlib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
@@ -337,7 +332,7 @@ install-pamlibLTLIBRARIES: $(pamlib_LTLIBRARIES)
uninstall-pamlibLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(pamlib_LTLIBRARIES)'; for p in $$list; do \
+ @list='$(pamlib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pamlibdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pamlibdir)/$$p"; \
@@ -352,7 +347,7 @@ clean-pamlibLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
pam_ck_connector.la: $(pam_ck_connector_la_OBJECTS) $(pam_ck_connector_la_DEPENDENCIES)
- $(LINK) $(am_pam_ck_connector_la_rpath) $(pam_ck_connector_la_LDFLAGS) $(pam_ck_connector_la_OBJECTS) $(pam_ck_connector_la_LIBADD) $(LIBS)
+ $(pam_ck_connector_la_LINK) $(am_pam_ck_connector_la_rpath) $(pam_ck_connector_la_OBJECTS) $(pam_ck_connector_la_LIBADD) $(LIBS)
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
@@ -362,7 +357,7 @@ clean-noinstPROGRAMS:
done
test-pam$(EXEEXT): $(test_pam_OBJECTS) $(test_pam_DEPENDENCIES)
@rm -f test-pam$(EXEEXT)
- $(LINK) $(test_pam_LDFLAGS) $(test_pam_OBJECTS) $(test_pam_LDADD) $(LIBS)
+ $(LINK) $(test_pam_OBJECTS) $(test_pam_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -374,22 +369,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pam.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -399,13 +394,9 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
install-man8: $(man8_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
@@ -498,22 +489,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -529,7 +519,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS)
installdirs:
for dir in "$(DESTDIR)$(pamlibdir)" "$(DESTDIR)$(man8dir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -565,7 +555,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -579,12 +569,20 @@ info-am:
install-data-am: install-man install-pamlibLTLIBRARIES
+install-dvi: install-dvi-am
+
install-exec-am:
+install-html: install-html-am
+
install-info: install-info-am
install-man: install-man8
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -605,24 +603,27 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am uninstall-man \
- uninstall-pamlibLTLIBRARIES
+uninstall-am: uninstall-man uninstall-pamlibLTLIBRARIES
uninstall-man: uninstall-man8
+.MAKE: install-am install-strip
+
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-local clean-noinstPROGRAMS \
clean-pamlibLTLIBRARIES ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-man8 \
- install-pamlibLTLIBRARIES install-strip installcheck \
+ install-pamlibLTLIBRARIES install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am uninstall-man \
- uninstall-man8 uninstall-pamlibLTLIBRARIES
+ tags uninstall uninstall-am uninstall-man uninstall-man8 \
+ uninstall-pamlibLTLIBRARIES
clean-local :
diff --git a/pam-ck-connector/pam-ck-connector.c b/pam-ck-connector/pam-ck-connector.c
index 1c7ecd2..4203651 100644
--- a/pam-ck-connector/pam-ck-connector.c
+++ b/pam-ck-connector/pam-ck-connector.c
@@ -103,9 +103,9 @@ ck_pam_vsyslog (const pam_handle_t *pamh,
mod_name,
service,
choice);
- if (res < 0) {
+ if (res < 0) {
return;
- }
+ }
errno = save_errno;
res = vsnprintf (msgbuf2, sizeof (msgbuf2), fmt, args);
@@ -248,6 +248,11 @@ pam_sm_open_session (pam_handle_t *pamh,
goto out;
}
+ /* set a global flag so that D-Bus does not change the SIGPIPE handler.
+ See https://bugzilla.redhat.com/show_bug.cgi?id=430431
+ */
+ dbus_connection_set_change_sigpipe (FALSE);
+
ckc = ck_connector_new ();
if (ckc == NULL) {
ck_pam_syslog (pamh, LOG_ERR, "oom creating ConsoleKit connector object");
diff --git a/pam-ck-connector/pam_ck_connector.8 b/pam-ck-connector/pam_ck_connector.8
index 449a031..4a8d4c4 100644
--- a/pam-ck-connector/pam_ck_connector.8
+++ b/pam-ck-connector/pam_ck_connector.8
@@ -8,7 +8,7 @@
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
-pam_ck_connector \- Register sessin with ConsoleKit
+pam_ck_connector \- Register session with ConsoleKit
.SH "SYNOPSIS"
.HP 12
\fBpam_ck_connector.so\fR [debug]
diff --git a/src/Makefile.am b/src/Makefile.am
index 3f142a3..8d5d83b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,6 +10,7 @@ INCLUDES = \
-I. \
-I$(srcdir) \
$(CONSOLE_KIT_CFLAGS) \
+ $(POLKIT_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
-DPREFIX=\""$(prefix)"\" \
-DBINDIR=\""$(bindir)"\" \
@@ -17,6 +18,7 @@ INCLUDES = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
+ -DLOCALSTATEDIR=\""$(localstatedir)"\" \
-DCONSOLE_KIT_PID_FILE=\""$(CONSOLE_KIT_PID_FILE)"\" \
$(WARN_CFLAGS) \
$(DEBUG_CFLAGS) \
@@ -24,9 +26,15 @@ INCLUDES = \
$(NULL)
noinst_LTLIBRARIES = \
- libck.la \
+ libck.la \
+ libck-event-log.la \
$(NULL)
+libck_event_log_la_SOURCES = \
+ ck-log-event.h \
+ ck-log-event.c \
+ $(NULL)
+
libck_la_SOURCES = \
ck-sysdeps.h \
ck-sysdeps-unix.c \
@@ -94,10 +102,16 @@ console_kit_daemon_SOURCES = \
ck-job.c \
ck-seat.h \
ck-seat.c \
+ ck-session-leader.h \
+ ck-session-leader.c \
ck-session.h \
ck-session.c \
ck-log.h \
ck-log.c \
+ ck-run-programs.c \
+ ck-run-programs.h \
+ ck-event-logger.c \
+ ck-event-logger.h \
$(BUILT_SOURCES) \
$(NULL)
@@ -116,14 +130,31 @@ EXTRA_console_kit_daemon_SOURCES = \
console_kit_daemon_LDADD = \
$(CONSOLE_KIT_LIBS) \
+ $(POLKIT_LIBS) \
+ $(RBAC_LIBS) \
libck.la \
+ libck-event-log.la \
$(NULL)
noinst_PROGRAMS = \
+ test-event-logger \
test-tty-idle-monitor \
test-vt-monitor \
$(NULL)
+test_event_logger_SOURCES = \
+ ck-event-logger.h \
+ ck-event-logger.c \
+ test-event-logger.c \
+ $(NULL)
+
+test_event_logger_LDADD = \
+ $(CONSOLE_KIT_LIBS) \
+ $(POLKIT_LIBS) \
+ $(RBAC_LIBS) \
+ libck-event-log.la \
+ $(NULL)
+
test_vt_monitor_SOURCES = \
ck-vt-monitor.h \
ck-vt-monitor.c \
@@ -132,6 +163,7 @@ test_vt_monitor_SOURCES = \
test_vt_monitor_LDADD = \
$(CONSOLE_KIT_LIBS) \
+ $(POLKIT_LIBS) \
libck.la \
$(NULL)
@@ -145,6 +177,7 @@ test_tty_idle_monitor_SOURCES = \
test_tty_idle_monitor_LDADD = \
$(CONSOLE_KIT_LIBS) \
+ $(POLKIT_LIBS) \
libck.la \
$(NULL)
@@ -163,3 +196,9 @@ CLEANFILES = $(BUILT_SOURCES)
MAINTAINERCLEANFILES = \
*~ \
Makefile.in
+
+install-data-local:
+ -mkdir -p $(DESTDIR)$(sysconfdir)/ConsoleKit/run-session.d
+ -mkdir -p $(DESTDIR)$(libdir)/ConsoleKit/run-session.d
+ -mkdir -p $(DESTDIR)$(localstatedir)/run/ConsoleKit
+ -mkdir -p $(DESTDIR)$(localstatedir)/log/ConsoleKit
diff --git a/src/Makefile.in b/src/Makefile.in
index 2e660af..7021cd8 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +15,11 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -50,8 +46,9 @@ host_triplet = @host@
@CK_COMPILE_FREEBSD_TRUE@ $(NULL)
sbin_PROGRAMS = console-kit-daemon$(EXEEXT) $(am__EXEEXT_1)
-noinst_PROGRAMS = test-tty-idle-monitor$(EXEEXT) \
- test-vt-monitor$(EXEEXT) $(am__EXEEXT_1)
+noinst_PROGRAMS = test-event-logger$(EXEEXT) \
+ test-tty-idle-monitor$(EXEEXT) test-vt-monitor$(EXEEXT) \
+ $(am__EXEEXT_1)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -63,12 +60,15 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
+libck_event_log_la_LIBADD =
+am__objects_1 =
+am_libck_event_log_la_OBJECTS = ck-log-event.lo $(am__objects_1)
+libck_event_log_la_OBJECTS = $(am_libck_event_log_la_OBJECTS)
am__DEPENDENCIES_1 =
@CK_COMPILE_FREEBSD_TRUE@libck_la_DEPENDENCIES = \
@CK_COMPILE_FREEBSD_TRUE@ $(am__DEPENDENCIES_1)
am__libck_la_SOURCES_DIST = ck-sysdeps.h ck-sysdeps-unix.c \
ck-sysdeps-linux.c ck-sysdeps-solaris.c ck-sysdeps-freebsd.c
-am__objects_1 =
@CK_COMPILE_LINUX_TRUE@am__objects_2 = ck-sysdeps-linux.lo \
@CK_COMPILE_LINUX_TRUE@ $(am__objects_1)
@CK_COMPILE_SOLARIS_TRUE@am__objects_3 = ck-sysdeps-solaris.lo \
@@ -85,8 +85,10 @@ PROGRAMS = $(noinst_PROGRAMS) $(sbin_PROGRAMS)
am__console_kit_daemon_SOURCES_DIST = main.c ck-manager.h ck-manager.c \
ck-vt-monitor.h ck-vt-monitor.c ck-tty-idle-monitor.h \
ck-tty-idle-monitor.c ck-file-monitor.h ck-job.h ck-job.c \
- ck-seat.h ck-seat.c ck-session.h ck-session.c ck-log.h \
- ck-log.c ck-manager-glue.h ck-seat-glue.h ck-session-glue.h \
+ ck-seat.h ck-seat.c ck-session-leader.h ck-session-leader.c \
+ ck-session.h ck-session.c ck-log.h ck-log.c ck-run-programs.c \
+ ck-run-programs.h ck-event-logger.c ck-event-logger.h \
+ ck-manager-glue.h ck-seat-glue.h ck-session-glue.h \
ck-marshal.c ck-marshal.h ck-file-monitor-dummy.c \
ck-file-monitor-inotify.c
am__objects_5 = ck-marshal.$(OBJEXT) $(am__objects_1)
@@ -95,11 +97,19 @@ am__objects_5 = ck-marshal.$(OBJEXT) $(am__objects_1)
@ENABLE_INOTIFY_TRUE@ ck-file-monitor-inotify.$(OBJEXT)
am_console_kit_daemon_OBJECTS = main.$(OBJEXT) ck-manager.$(OBJEXT) \
ck-vt-monitor.$(OBJEXT) ck-tty-idle-monitor.$(OBJEXT) \
- ck-job.$(OBJEXT) ck-seat.$(OBJEXT) ck-session.$(OBJEXT) \
- ck-log.$(OBJEXT) $(am__objects_5) $(am__objects_1) \
- $(am__objects_6)
+ ck-job.$(OBJEXT) ck-seat.$(OBJEXT) ck-session-leader.$(OBJEXT) \
+ ck-session.$(OBJEXT) ck-log.$(OBJEXT) \
+ ck-run-programs.$(OBJEXT) ck-event-logger.$(OBJEXT) \
+ $(am__objects_5) $(am__objects_1) $(am__objects_6)
console_kit_daemon_OBJECTS = $(am_console_kit_daemon_OBJECTS)
-console_kit_daemon_DEPENDENCIES = $(am__DEPENDENCIES_1) libck.la \
+console_kit_daemon_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) libck.la \
+ libck-event-log.la $(am__DEPENDENCIES_1)
+am_test_event_logger_OBJECTS = ck-event-logger.$(OBJEXT) \
+ test-event-logger.$(OBJEXT) $(am__objects_1)
+test_event_logger_OBJECTS = $(am_test_event_logger_OBJECTS)
+test_event_logger_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) libck-event-log.la \
$(am__DEPENDENCIES_1)
am__test_tty_idle_monitor_SOURCES_DIST = ck-tty-idle-monitor.h \
ck-tty-idle-monitor.c ck-file-monitor.h \
@@ -109,46 +119,51 @@ am_test_tty_idle_monitor_OBJECTS = ck-tty-idle-monitor.$(OBJEXT) \
$(am__objects_6) test-tty-idle-monitor.$(OBJEXT) \
$(am__objects_1)
test_tty_idle_monitor_OBJECTS = $(am_test_tty_idle_monitor_OBJECTS)
-test_tty_idle_monitor_DEPENDENCIES = $(am__DEPENDENCIES_1) libck.la \
- $(am__DEPENDENCIES_1)
+test_tty_idle_monitor_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) libck.la $(am__DEPENDENCIES_1)
am_test_vt_monitor_OBJECTS = ck-vt-monitor.$(OBJEXT) \
test-vt-monitor.$(OBJEXT) $(am__objects_1)
test_vt_monitor_OBJECTS = $(am_test_vt_monitor_OBJECTS)
-test_vt_monitor_DEPENDENCIES = $(am__DEPENDENCIES_1) libck.la \
- $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+test_vt_monitor_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) libck.la $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libck_la_SOURCES) $(EXTRA_libck_la_SOURCES) \
- $(console_kit_daemon_SOURCES) \
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libck_event_log_la_SOURCES) $(libck_la_SOURCES) \
+ $(EXTRA_libck_la_SOURCES) $(console_kit_daemon_SOURCES) \
$(EXTRA_console_kit_daemon_SOURCES) \
- $(test_tty_idle_monitor_SOURCES) $(test_vt_monitor_SOURCES)
-DIST_SOURCES = $(am__libck_la_SOURCES_DIST) $(EXTRA_libck_la_SOURCES) \
+ $(test_event_logger_SOURCES) $(test_tty_idle_monitor_SOURCES) \
+ $(test_vt_monitor_SOURCES)
+DIST_SOURCES = $(libck_event_log_la_SOURCES) \
+ $(am__libck_la_SOURCES_DIST) $(EXTRA_libck_la_SOURCES) \
$(am__console_kit_daemon_SOURCES_DIST) \
$(EXTRA_console_kit_daemon_SOURCES) \
+ $(test_event_logger_SOURCES) \
$(am__test_tty_idle_monitor_SOURCES_DIST) \
$(test_vt_monitor_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -161,12 +176,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CK_BACKEND = @CK_BACKEND@
-CK_COMPILE_FREEBSD_FALSE = @CK_COMPILE_FREEBSD_FALSE@
-CK_COMPILE_FREEBSD_TRUE = @CK_COMPILE_FREEBSD_TRUE@
-CK_COMPILE_LINUX_FALSE = @CK_COMPILE_LINUX_FALSE@
-CK_COMPILE_LINUX_TRUE = @CK_COMPILE_LINUX_TRUE@
-CK_COMPILE_SOLARIS_FALSE = @CK_COMPILE_SOLARIS_FALSE@
-CK_COMPILE_SOLARIS_TRUE = @CK_COMPILE_SOLARIS_TRUE@
CONSOLE_KIT_CFLAGS = @CONSOLE_KIT_CFLAGS@
CONSOLE_KIT_LIBS = @CONSOLE_KIT_LIBS@
CONSOLE_KIT_PID_FILE = @CONSOLE_KIT_PID_FILE@
@@ -183,17 +192,11 @@ DBUS_SYS_DIR = @DBUS_SYS_DIR@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DOCBOOK_DOCS_ENABLED_FALSE = @DOCBOOK_DOCS_ENABLED_FALSE@
-DOCBOOK_DOCS_ENABLED_TRUE = @DOCBOOK_DOCS_ENABLED_TRUE@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_INOTIFY_FALSE = @ENABLE_INOTIFY_FALSE@
-ENABLE_INOTIFY_TRUE = @ENABLE_INOTIFY_TRUE@
-ENABLE_PAM_MODULE_FALSE = @ENABLE_PAM_MODULE_FALSE@
-ENABLE_PAM_MODULE_TRUE = @ENABLE_PAM_MODULE_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
@@ -203,8 +206,10 @@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_PAM = @HAVE_PAM@
-HAVE_PAM_FALSE = @HAVE_PAM_FALSE@
-HAVE_PAM_TRUE = @HAVE_PAM_TRUE@
+HAVE_POLKIT = @HAVE_POLKIT@
+HISTORY_CFLAGS = @HISTORY_CFLAGS@
+HISTORY_LIBS = @HISTORY_LIBS@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -221,9 +226,8 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
@@ -239,10 +243,13 @@ PAM_MODULE_DIR = @PAM_MODULE_DIR@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+RBAC_LIBS = @RBAC_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -253,13 +260,14 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
XMLTO = @XMLTO@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -271,6 +279,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -298,8 +307,11 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.7
NULL =
SUBDIRS = \
@@ -309,6 +321,7 @@ INCLUDES = \
-I. \
-I$(srcdir) \
$(CONSOLE_KIT_CFLAGS) \
+ $(POLKIT_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
-DPREFIX=\""$(prefix)"\" \
-DBINDIR=\""$(bindir)"\" \
@@ -316,6 +329,7 @@ INCLUDES = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
+ -DLOCALSTATEDIR=\""$(localstatedir)"\" \
-DCONSOLE_KIT_PID_FILE=\""$(CONSOLE_KIT_PID_FILE)"\" \
$(WARN_CFLAGS) \
$(DEBUG_CFLAGS) \
@@ -323,9 +337,15 @@ INCLUDES = \
$(NULL)
noinst_LTLIBRARIES = \
- libck.la \
+ libck.la \
+ libck-event-log.la \
$(NULL)
+libck_event_log_la_SOURCES = \
+ ck-log-event.h \
+ ck-log-event.c \
+ $(NULL)
+
libck_la_SOURCES = ck-sysdeps.h ck-sysdeps-unix.c $(NULL) \
$(am__append_1) $(am__append_2) $(am__append_3)
@CK_COMPILE_FREEBSD_TRUE@libck_la_LIBADD = $(KVM_LIBS)
@@ -346,8 +366,10 @@ BUILT_SOURCES = \
console_kit_daemon_SOURCES = main.c ck-manager.h ck-manager.c \
ck-vt-monitor.h ck-vt-monitor.c ck-tty-idle-monitor.h \
ck-tty-idle-monitor.c ck-file-monitor.h ck-job.h ck-job.c \
- ck-seat.h ck-seat.c ck-session.h ck-session.c ck-log.h \
- ck-log.c $(BUILT_SOURCES) $(NULL) $(FILE_MONITOR_BACKEND)
+ ck-seat.h ck-seat.c ck-session-leader.h ck-session-leader.c \
+ ck-session.h ck-session.c ck-log.h ck-log.c ck-run-programs.c \
+ ck-run-programs.h ck-event-logger.c ck-event-logger.h \
+ $(BUILT_SOURCES) $(NULL) $(FILE_MONITOR_BACKEND)
@ENABLE_INOTIFY_FALSE@FILE_MONITOR_BACKEND = ck-file-monitor-dummy.c
@ENABLE_INOTIFY_TRUE@FILE_MONITOR_BACKEND = ck-file-monitor-inotify.c
EXTRA_console_kit_daemon_SOURCES = \
@@ -357,7 +379,23 @@ EXTRA_console_kit_daemon_SOURCES = \
console_kit_daemon_LDADD = \
$(CONSOLE_KIT_LIBS) \
+ $(POLKIT_LIBS) \
+ $(RBAC_LIBS) \
libck.la \
+ libck-event-log.la \
+ $(NULL)
+
+test_event_logger_SOURCES = \
+ ck-event-logger.h \
+ ck-event-logger.c \
+ test-event-logger.c \
+ $(NULL)
+
+test_event_logger_LDADD = \
+ $(CONSOLE_KIT_LIBS) \
+ $(POLKIT_LIBS) \
+ $(RBAC_LIBS) \
+ libck-event-log.la \
$(NULL)
test_vt_monitor_SOURCES = \
@@ -368,6 +406,7 @@ test_vt_monitor_SOURCES = \
test_vt_monitor_LDADD = \
$(CONSOLE_KIT_LIBS) \
+ $(POLKIT_LIBS) \
libck.la \
$(NULL)
@@ -381,6 +420,7 @@ test_tty_idle_monitor_SOURCES = \
test_tty_idle_monitor_LDADD = \
$(CONSOLE_KIT_LIBS) \
+ $(POLKIT_LIBS) \
libck.la \
$(NULL)
@@ -442,8 +482,10 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
+libck-event-log.la: $(libck_event_log_la_OBJECTS) $(libck_event_log_la_DEPENDENCIES)
+ $(LINK) $(libck_event_log_la_OBJECTS) $(libck_event_log_la_LIBADD) $(LIBS)
libck.la: $(libck_la_OBJECTS) $(libck_la_DEPENDENCIES)
- $(LINK) $(libck_la_LDFLAGS) $(libck_la_OBJECTS) $(libck_la_LIBADD) $(LIBS)
+ $(LINK) $(libck_la_OBJECTS) $(libck_la_LIBADD) $(LIBS)
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
@@ -453,7 +495,7 @@ clean-noinstPROGRAMS:
done
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@@ -481,13 +523,16 @@ clean-sbinPROGRAMS:
done
console-kit-daemon$(EXEEXT): $(console_kit_daemon_OBJECTS) $(console_kit_daemon_DEPENDENCIES)
@rm -f console-kit-daemon$(EXEEXT)
- $(LINK) $(console_kit_daemon_LDFLAGS) $(console_kit_daemon_OBJECTS) $(console_kit_daemon_LDADD) $(LIBS)
+ $(LINK) $(console_kit_daemon_OBJECTS) $(console_kit_daemon_LDADD) $(LIBS)
+test-event-logger$(EXEEXT): $(test_event_logger_OBJECTS) $(test_event_logger_DEPENDENCIES)
+ @rm -f test-event-logger$(EXEEXT)
+ $(LINK) $(test_event_logger_OBJECTS) $(test_event_logger_LDADD) $(LIBS)
test-tty-idle-monitor$(EXEEXT): $(test_tty_idle_monitor_OBJECTS) $(test_tty_idle_monitor_DEPENDENCIES)
@rm -f test-tty-idle-monitor$(EXEEXT)
- $(LINK) $(test_tty_idle_monitor_LDFLAGS) $(test_tty_idle_monitor_OBJECTS) $(test_tty_idle_monitor_LDADD) $(LIBS)
+ $(LINK) $(test_tty_idle_monitor_OBJECTS) $(test_tty_idle_monitor_LDADD) $(LIBS)
test-vt-monitor$(EXEEXT): $(test_vt_monitor_OBJECTS) $(test_vt_monitor_DEPENDENCIES)
@rm -f test-vt-monitor$(EXEEXT)
- $(LINK) $(test_vt_monitor_LDFLAGS) $(test_vt_monitor_OBJECTS) $(test_vt_monitor_LDADD) $(LIBS)
+ $(LINK) $(test_vt_monitor_OBJECTS) $(test_vt_monitor_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -495,13 +540,17 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-event-logger.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-file-monitor-dummy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-file-monitor-inotify.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-job.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-log-event.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-log.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-manager.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-marshal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-run-programs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-seat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-session-leader.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-session.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-freebsd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-linux.Plo@am__quote@
@@ -510,26 +559,27 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-tty-idle-monitor.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-vt-monitor.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-event-logger.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-tty-idle-monitor.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vt-monitor.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -540,10 +590,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@@ -575,8 +621,7 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
@@ -677,22 +722,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -706,7 +750,7 @@ distdir: $(DISTFILES)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -714,6 +758,8 @@ distdir: $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
@@ -725,7 +771,7 @@ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(sbindir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-recursive
@@ -764,7 +810,7 @@ distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-recursive
@@ -776,14 +822,22 @@ info: info-recursive
info-am:
-install-data-am:
+install-data-am: install-data-local
+
+install-dvi: install-dvi-recursive
install-exec-am: install-sbinPROGRAMS
+install-html: install-html-recursive
+
install-info: install-info-recursive
install-man:
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -804,24 +858,27 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-noinstLTLIBRARIES \
- clean-noinstPROGRAMS clean-recursive clean-sbinPROGRAMS ctags \
- ctags-recursive distclean distclean-compile distclean-generic \
- distclean-libtool distclean-recursive distclean-tags distdir \
- dvi dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-sbinPROGRAMS \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+uninstall-am: uninstall-sbinPROGRAMS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
+ clean-sbinPROGRAMS ctags ctags-recursive distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-data-local install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-sbinPROGRAMS install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-info-am uninstall-sbinPROGRAMS
+ uninstall-sbinPROGRAMS
ck-manager-glue.h: ck-manager.xml Makefile.am
@@ -837,6 +894,12 @@ ck-marshal.c: ck-marshal.list
ck-marshal.h: ck-marshal.list
@GLIB_GENMARSHAL@ $< --prefix=ck_marshal --header > $@
+
+install-data-local:
+ -mkdir -p $(DESTDIR)$(sysconfdir)/ConsoleKit/run-session.d
+ -mkdir -p $(DESTDIR)$(libdir)/ConsoleKit/run-session.d
+ -mkdir -p $(DESTDIR)$(localstatedir)/run/ConsoleKit
+ -mkdir -p $(DESTDIR)$(localstatedir)/log/ConsoleKit
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/src/ck-event-logger.c b/src/ck-event-logger.c
new file mode 100644
index 0000000..2fded87
--- /dev/null
+++ b/src/ck-event-logger.c
@@ -0,0 +1,420 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib/gstdio.h>
+#include <glib-object.h>
+
+#include "ck-event-logger.h"
+#include "ck-log-event.h"
+
+#define CK_EVENT_LOGGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CK_TYPE_EVENT_LOGGER, CkEventLoggerPrivate))
+
+#define DEFAULT_LOG_FILENAME LOCALSTATEDIR "/log/ConsoleKit/history"
+
+struct CkEventLoggerPrivate
+{
+ int fd;
+ FILE *file;
+ GThread *writer_thread;
+ GAsyncQueue *event_queue;
+ char *log_filename;
+};
+
+enum {
+ PROP_0,
+ PROP_LOG_FILENAME
+};
+
+static void ck_event_logger_class_init (CkEventLoggerClass *klass);
+static void ck_event_logger_init (CkEventLogger *event_logger);
+static void ck_event_logger_finalize (GObject *object);
+
+G_DEFINE_TYPE (CkEventLogger, ck_event_logger, G_TYPE_OBJECT)
+
+GQuark
+ck_event_logger_error_quark (void)
+{
+ static GQuark ret = 0;
+ if (ret == 0) {
+ ret = g_quark_from_static_string ("ck_event_logger_error");
+ }
+
+ return ret;
+}
+
+gboolean
+ck_event_logger_queue_event (CkEventLogger *event_logger,
+ CkLogEvent *event,
+ GError **error)
+{
+ CkLogEvent *event_copy;
+ gboolean ret;
+
+ g_return_val_if_fail (CK_IS_EVENT_LOGGER (event_logger), FALSE);
+ g_return_val_if_fail (event != NULL, FALSE);
+
+ event_copy = ck_log_event_copy (event);
+
+ g_async_queue_push (event_logger->priv->event_queue,
+ event_copy);
+
+ ret = TRUE;
+
+ return ret;
+}
+
+/* Adapted from auditd auditd-event.c */
+static gboolean
+open_log_file (CkEventLogger *event_logger)
+{
+ int flags;
+ int fd;
+ int res;
+ char *dirname;
+
+ /*
+ * Likely errors on rotate: ENFILE, ENOMEM, ENOSPC
+ */
+ flags = O_WRONLY | O_APPEND;
+#ifdef O_NOFOLLOW
+ flags |= O_NOFOLLOW;
+#endif
+
+ dirname = g_path_get_dirname (event_logger->priv->log_filename);
+ /* always make sure we have a directory */
+ errno = 0;
+ res = g_mkdir_with_parents (dirname,
+ S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+ if (res < 0) {
+ g_warning ("Unable to create directory %s (%s)",
+ dirname,
+ g_strerror (errno));
+ g_free (dirname);
+ return FALSE;
+ }
+ g_free (dirname);
+
+retry:
+ errno = 0;
+ fd = g_open (event_logger->priv->log_filename, flags, 0600);
+ if (fd < 0) {
+ if (errno == ENOENT) {
+ fd = g_open (event_logger->priv->log_filename,
+ O_CREAT | O_EXCL | O_APPEND,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ if (fd < 0) {
+ g_warning ("Couldn't create log file %s (%s)",
+ event_logger->priv->log_filename,
+ g_strerror (errno));
+ return FALSE;
+ }
+
+ close (fd);
+ fd = g_open (event_logger->priv->log_filename, flags, 0600);
+ } else if (errno == ENFILE) {
+ /* All system descriptors used, try again... */
+ goto retry;
+ }
+ if (fd < 0) {
+ g_warning ("Couldn't open log file %s (%s)",
+ event_logger->priv->log_filename,
+ g_strerror (errno));
+ return FALSE;
+ }
+ }
+
+ if (fcntl (fd, F_SETFD, FD_CLOEXEC) == -1) {
+ close (fd);
+ g_warning ("Error setting log file CLOEXEC flag (%s)",
+ g_strerror (errno));
+ return FALSE;
+ }
+
+ fchown (fd, 0, 0);
+
+ event_logger->priv->file = fdopen (fd, "a");
+ if (event_logger->priv->file == NULL) {
+ g_warning ("Error setting up log descriptor (%s)",
+ g_strerror (errno));
+ close (fd);
+ return FALSE;
+ }
+ event_logger->priv->fd = fd;
+
+ /* Set it to line buffering */
+ setlinebuf (event_logger->priv->file);
+
+ return TRUE;
+}
+
+static void
+reopen_file_stream (CkEventLogger *event_logger)
+{
+ close (event_logger->priv->fd);
+ fclose (event_logger->priv->file);
+
+ /* FIXME: retries */
+ open_log_file (event_logger);
+}
+
+static void
+check_file_stream (CkEventLogger *event_logger)
+{
+ int old_fd;
+ struct stat old_stats;
+ int new_fd;
+ struct stat new_stats;
+
+ old_fd = event_logger->priv->fd;
+ if (fstat (old_fd, &old_stats) != 0) {
+ g_warning ("Unable to stat file: %s",
+ g_strerror (errno));
+ reopen_file_stream (event_logger);
+ return;
+ }
+
+ new_fd = g_open (event_logger->priv->log_filename, O_RDONLY | O_NONBLOCK, 0600);
+ if (new_fd == -1 || fstat (new_fd, &new_stats) < 0) {
+ close (new_fd);
+ g_debug ("Unable to open or stat %s - will try to reopen", event_logger->priv->log_filename);
+ reopen_file_stream (event_logger);
+ return;
+ }
+ close (new_fd);
+
+ if (old_stats.st_ino != new_stats.st_ino || old_stats.st_dev != new_stats.st_dev) {
+ g_debug ("File %s has been replaced; writing to end of new file", event_logger->priv->log_filename);
+ reopen_file_stream (event_logger);
+ return;
+ }
+}
+
+static gboolean
+write_log_for_event (CkEventLogger *event_logger,
+ CkLogEvent *event)
+{
+ GString *str;
+
+ str = g_string_new (NULL);
+
+ ck_log_event_to_string (event, str);
+
+ g_debug ("Writing log for event: %s", str->str);
+ check_file_stream (event_logger);
+
+ if (event_logger->priv->file != NULL) {
+ int rc;
+
+ rc = fprintf (event_logger->priv->file, "%s\n", str->str);
+ if (rc <= 0) {
+ g_warning ("Record was not written to disk (%s)",
+ g_strerror (errno));
+ }
+ } else {
+ g_warning ("Log file not open for writing");
+ }
+
+ g_string_free (str, TRUE);
+
+ return TRUE;
+}
+
+static void *
+writer_thread_start (CkEventLogger *event_logger)
+{
+ CkLogEvent *event;
+
+ while ((event = g_async_queue_pop (event_logger->priv->event_queue)) != NULL) {
+ write_log_for_event (event_logger, event);
+ ck_log_event_free (event);
+ }
+
+ g_thread_exit (NULL);
+ return NULL;
+}
+
+static void
+create_writer_thread (CkEventLogger *event_logger)
+{
+ GError *error;
+
+ g_debug ("Creating thread for log writing");
+
+ error = NULL;
+ event_logger->priv->writer_thread = g_thread_create_full ((GThreadFunc)writer_thread_start,
+ event_logger,
+ 65536,
+ FALSE,
+ TRUE,
+ G_THREAD_PRIORITY_NORMAL,
+ &error);
+ if (event_logger->priv->writer_thread == NULL) {
+ g_debug ("Unable to create thread: %s", error->message);
+ g_error_free (error);
+ }
+}
+
+static GObject *
+ck_event_logger_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_properties)
+{
+ CkEventLogger *event_logger;
+ CkEventLoggerClass *klass;
+
+ klass = CK_EVENT_LOGGER_CLASS (g_type_class_peek (CK_TYPE_EVENT_LOGGER));
+
+ event_logger = CK_EVENT_LOGGER (G_OBJECT_CLASS (ck_event_logger_parent_class)->constructor (type,
+ n_construct_properties,
+ construct_properties));
+
+ if (open_log_file (event_logger)) {
+ create_writer_thread (event_logger);
+ }
+
+ return G_OBJECT (event_logger);
+}
+
+static void
+_ck_event_logger_set_log_filename (CkEventLogger *event_logger,
+ const char *filename)
+{
+ g_free (event_logger->priv->log_filename);
+ event_logger->priv->log_filename = g_strdup (filename);
+}
+
+static void
+ck_event_logger_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ CkEventLogger *self;
+
+ self = CK_EVENT_LOGGER (object);
+
+ switch (prop_id) {
+ case PROP_LOG_FILENAME:
+ _ck_event_logger_set_log_filename (self, g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+ck_event_logger_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ CkEventLogger *self;
+
+ self = CK_EVENT_LOGGER (object);
+
+ switch (prop_id) {
+ case PROP_LOG_FILENAME:
+ g_value_set_string (value, self->priv->log_filename);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+ck_event_logger_class_init (CkEventLoggerClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = ck_event_logger_finalize;
+ object_class->constructor = ck_event_logger_constructor;
+ object_class->get_property = ck_event_logger_get_property;
+ object_class->set_property = ck_event_logger_set_property;
+
+ g_object_class_install_property (object_class,
+ PROP_LOG_FILENAME,
+ g_param_spec_string ("log-filename",
+ "log-filename",
+ "log-filename",
+ DEFAULT_LOG_FILENAME,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_type_class_add_private (klass, sizeof (CkEventLoggerPrivate));
+}
+
+static void
+ck_event_logger_init (CkEventLogger *event_logger)
+{
+ event_logger->priv = CK_EVENT_LOGGER_GET_PRIVATE (event_logger);
+
+ event_logger->priv->event_queue = g_async_queue_new ();
+}
+
+static void
+ck_event_logger_finalize (GObject *object)
+{
+ CkEventLogger *event_logger;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (CK_IS_EVENT_LOGGER (object));
+
+ event_logger = CK_EVENT_LOGGER (object);
+
+ g_return_if_fail (event_logger->priv != NULL);
+
+ if (event_logger->priv->event_queue != NULL) {
+ g_async_queue_unref (event_logger->priv->event_queue);
+ }
+
+ if (event_logger->priv->fd != -1) {
+ close (event_logger->priv->fd);
+ }
+
+ g_free (event_logger->priv->log_filename);
+
+ G_OBJECT_CLASS (ck_event_logger_parent_class)->finalize (object);
+}
+
+CkEventLogger *
+ck_event_logger_new (const char *filename)
+{
+ GObject *object;
+
+ object = g_object_new (CK_TYPE_EVENT_LOGGER,
+ "log-filename", filename,
+ NULL);
+
+ return CK_EVENT_LOGGER (object);
+}
diff --git a/src/ck-event-logger.h b/src/ck-event-logger.h
new file mode 100644
index 0000000..d4645f7
--- /dev/null
+++ b/src/ck-event-logger.h
@@ -0,0 +1,66 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef __CK_EVENT_LOGGER_H
+#define __CK_EVENT_LOGGER_H
+
+#include <glib-object.h>
+#include "ck-log-event.h"
+
+G_BEGIN_DECLS
+
+#define CK_TYPE_EVENT_LOGGER (ck_event_logger_get_type ())
+#define CK_EVENT_LOGGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CK_TYPE_EVENT_LOGGER, CkEventLogger))
+#define CK_EVENT_LOGGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CK_TYPE_EVENT_LOGGER, CkEventLoggerClass))
+#define CK_IS_EVENT_LOGGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CK_TYPE_EVENT_LOGGER))
+#define CK_IS_EVENT_LOGGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CK_TYPE_EVENT_LOGGER))
+#define CK_EVENT_LOGGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CK_TYPE_EVENT_LOGGER, CkEventLoggerClass))
+
+typedef struct CkEventLoggerPrivate CkEventLoggerPrivate;
+
+typedef struct
+{
+ GObject parent;
+ CkEventLoggerPrivate *priv;
+} CkEventLogger;
+
+typedef struct
+{
+ GObjectClass parent_class;
+} CkEventLoggerClass;
+
+typedef enum
+{
+ CK_EVENT_LOGGER_ERROR_GENERAL
+} CkEventLoggerError;
+
+#define CK_EVENT_LOGGER_ERROR ck_event_logger_error_quark ()
+
+GQuark ck_event_logger_error_quark (void);
+GType ck_event_logger_get_type (void);
+CkEventLogger * ck_event_logger_new (const char *filename);
+
+gboolean ck_event_logger_queue_event (CkEventLogger *event_logger,
+ CkLogEvent *event,
+ GError **error);
+
+G_END_DECLS
+
+#endif /* __CK_EVENT_LOGGER_H */
diff --git a/src/ck-log-event.c b/src/ck-log-event.c
new file mode 100644
index 0000000..7e8ce10
--- /dev/null
+++ b/src/ck-log-event.c
@@ -0,0 +1,1284 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <glib.h>
+
+#include "ck-log-event.h"
+
+static void
+event_seat_added_free (CkLogSeatAddedEvent *event)
+{
+ g_assert (event != NULL);
+
+ g_free (event->seat_id);
+ event->seat_id = NULL;
+}
+
+static void
+event_seat_removed_free (CkLogSeatRemovedEvent *event)
+{
+ g_assert (event != NULL);
+
+ g_free (event->seat_id);
+ event->seat_id = NULL;
+}
+
+static void
+event_system_stop_free (CkLogSystemStopEvent *event)
+{
+ g_assert (event != NULL);
+}
+
+static void
+event_system_restart_free (CkLogSystemRestartEvent *event)
+{
+ g_assert (event != NULL);
+}
+
+
+static void
+event_system_start_free (CkLogSystemStartEvent *event)
+{
+ g_assert (event != NULL);
+}
+
+static void
+event_seat_session_added_free (CkLogSeatSessionAddedEvent *event)
+{
+ g_assert (event != NULL);
+
+ g_free (event->seat_id);
+ event->seat_id = NULL;
+
+ g_free (event->session_id);
+ event->session_id = NULL;
+ g_free (event->session_type);
+ event->session_type = NULL;
+ g_free (event->session_x11_display);
+ event->session_x11_display = NULL;
+ g_free (event->session_x11_display_device);
+ event->session_x11_display_device = NULL;
+ g_free (event->session_display_device);
+ event->session_display_device = NULL;
+ g_free (event->session_remote_host_name);
+ event->session_remote_host_name = NULL;
+ g_free (event->session_creation_time);
+ event->session_creation_time = NULL;
+}
+
+static void
+event_seat_session_removed_free (CkLogSeatSessionRemovedEvent *event)
+{
+ g_assert (event != NULL);
+
+ g_free (event->seat_id);
+ event->seat_id = NULL;
+
+ g_free (event->session_id);
+ event->session_id = NULL;
+ g_free (event->session_type);
+ event->session_type = NULL;
+ g_free (event->session_x11_display);
+ event->session_x11_display = NULL;
+ g_free (event->session_x11_display_device);
+ event->session_x11_display_device = NULL;
+ g_free (event->session_display_device);
+ event->session_display_device = NULL;
+ g_free (event->session_remote_host_name);
+ event->session_remote_host_name = NULL;
+ g_free (event->session_creation_time);
+ event->session_creation_time = NULL;
+}
+
+static void
+event_seat_active_session_changed_free (CkLogSeatActiveSessionChangedEvent *event)
+{
+ g_assert (event != NULL);
+
+ g_free (event->seat_id);
+ event->seat_id = NULL;
+
+ g_free (event->session_id);
+ event->session_id = NULL;
+}
+
+static void
+event_seat_device_added_free (CkLogSeatDeviceAddedEvent *event)
+{
+ g_assert (event != NULL);
+
+ g_free (event->seat_id);
+ event->seat_id = NULL;
+ g_free (event->device_id);
+ event->device_id = NULL;
+ g_free (event->device_type);
+ event->device_type = NULL;
+}
+
+static void
+event_seat_device_removed_free (CkLogSeatDeviceRemovedEvent *event)
+{
+ g_assert (event != NULL);
+
+ g_free (event->seat_id);
+ event->seat_id = NULL;
+ g_free (event->device_id);
+ event->device_id = NULL;
+ g_free (event->device_type);
+ event->device_type = NULL;
+}
+
+static void
+event_seat_added_copy (CkLogSeatAddedEvent *event,
+ CkLogSeatAddedEvent *event_copy)
+{
+ g_assert (event != NULL);
+ g_assert (event_copy != NULL);
+
+ event_copy->seat_id = g_strdup (event->seat_id);
+ event_copy->seat_kind = event->seat_kind;
+}
+
+static void
+event_seat_removed_copy (CkLogSeatRemovedEvent *event,
+ CkLogSeatRemovedEvent *event_copy)
+{
+ g_assert (event != NULL);
+ g_assert (event_copy != NULL);
+
+ event_copy->seat_id = g_strdup (event->seat_id);
+ event_copy->seat_kind = event->seat_kind;
+}
+
+static void
+event_system_stop_copy (CkLogSystemStopEvent *event,
+ CkLogSystemStopEvent *event_copy)
+{
+ g_assert (event != NULL);
+ g_assert (event_copy != NULL);
+}
+
+static void
+event_system_restart_copy (CkLogSystemRestartEvent *event,
+ CkLogSystemRestartEvent *event_copy)
+{
+ g_assert (event != NULL);
+ g_assert (event_copy != NULL);
+}
+
+
+static void
+event_system_start_copy (CkLogSystemStartEvent *event,
+ CkLogSystemStartEvent *event_copy)
+{
+ g_assert (event != NULL);
+ g_assert (event_copy != NULL);
+}
+
+static void
+event_seat_session_added_copy (CkLogSeatSessionAddedEvent *event,
+ CkLogSeatSessionAddedEvent *event_copy)
+{
+ g_assert (event != NULL);
+ g_assert (event_copy != NULL);
+
+ event_copy->seat_id = g_strdup (event->seat_id);
+ event_copy->session_id = g_strdup (event->session_id);
+ event_copy->session_type = g_strdup (event->session_type);
+ event_copy->session_x11_display = g_strdup (event->session_x11_display);
+ event_copy->session_x11_display_device = g_strdup (event->session_x11_display_device);
+ event_copy->session_display_device = g_strdup (event->session_display_device);
+ event_copy->session_remote_host_name = g_strdup (event->session_remote_host_name);
+ event_copy->session_is_local = event->session_is_local;
+ event_copy->session_unix_user = event->session_unix_user;
+ event_copy->session_creation_time = g_strdup (event->session_creation_time);
+}
+
+static void
+event_seat_session_removed_copy (CkLogSeatSessionRemovedEvent *event,
+ CkLogSeatSessionRemovedEvent *event_copy)
+{
+ g_assert (event != NULL);
+ g_assert (event_copy != NULL);
+
+ event_copy->seat_id = g_strdup (event->seat_id);
+ event_copy->session_id = g_strdup (event->session_id);
+ event_copy->session_type = g_strdup (event->session_type);
+ event_copy->session_x11_display = g_strdup (event->session_x11_display);
+ event_copy->session_x11_display_device = g_strdup (event->session_x11_display_device);
+ event_copy->session_display_device = g_strdup (event->session_display_device);
+ event_copy->session_remote_host_name = g_strdup (event->session_remote_host_name);
+ event_copy->session_is_local = event->session_is_local;
+ event_copy->session_unix_user = event->session_unix_user;
+ event_copy->session_creation_time = g_strdup (event->session_creation_time);
+}
+
+static void
+event_seat_active_session_changed_copy (CkLogSeatActiveSessionChangedEvent *event,
+ CkLogSeatActiveSessionChangedEvent *event_copy)
+{
+ g_assert (event != NULL);
+ g_assert (event_copy != NULL);
+
+ event_copy->seat_id = g_strdup (event->seat_id);
+ event_copy->session_id = g_strdup (event->session_id);
+}
+
+static void
+event_seat_device_added_copy (CkLogSeatDeviceAddedEvent *event,
+ CkLogSeatDeviceAddedEvent *event_copy)
+{
+ g_assert (event != NULL);
+ g_assert (event_copy != NULL);
+
+ event_copy->seat_id = g_strdup (event->seat_id);
+ event_copy->device_id = g_strdup (event->device_id);
+ event_copy->device_type = g_strdup (event->device_type);
+}
+
+static void
+event_seat_device_removed_copy (CkLogSeatDeviceRemovedEvent *event,
+ CkLogSeatDeviceRemovedEvent *event_copy)
+{
+ g_assert (event != NULL);
+ g_assert (event_copy != NULL);
+
+ event_copy->seat_id = g_strdup (event->seat_id);
+ event_copy->device_id = g_strdup (event->device_id);
+ event_copy->device_type = g_strdup (event->device_type);
+}
+
+CkLogEvent *
+ck_log_event_copy (CkLogEvent *event)
+{
+ CkLogEvent *event_copy;
+
+ if (event == NULL) {
+ return NULL;
+ }
+
+ event_copy = g_new0 (CkLogEvent, 1);
+
+ event_copy->type = event->type;
+ event_copy->timestamp = event->timestamp;
+
+ switch (event->type) {
+ case CK_LOG_EVENT_SEAT_ADDED:
+ event_seat_added_copy ((CkLogSeatAddedEvent *) event,
+ (CkLogSeatAddedEvent *) event_copy);
+ break;
+ case CK_LOG_EVENT_SEAT_REMOVED:
+ event_seat_removed_copy ((CkLogSeatRemovedEvent *) event,
+ (CkLogSeatRemovedEvent *) event_copy);
+ break;
+ case CK_LOG_EVENT_SYSTEM_STOP:
+ event_system_stop_copy ((CkLogSystemStopEvent *) event,
+ (CkLogSystemStopEvent *) event_copy);
+ break;
+ case CK_LOG_EVENT_SYSTEM_RESTART:
+ event_system_restart_copy ((CkLogSystemRestartEvent *) event,
+ (CkLogSystemRestartEvent *) event_copy);
+ break;
+ case CK_LOG_EVENT_SYSTEM_START:
+ event_system_start_copy ((CkLogSystemStartEvent *) event,
+ (CkLogSystemStartEvent *) event_copy);
+ break;
+ case CK_LOG_EVENT_SEAT_SESSION_ADDED:
+ event_seat_session_added_copy ((CkLogSeatSessionAddedEvent *) event,
+ (CkLogSeatSessionAddedEvent *) event_copy);
+ break;
+ case CK_LOG_EVENT_SEAT_SESSION_REMOVED:
+ event_seat_session_removed_copy ((CkLogSeatSessionRemovedEvent *) event,
+ (CkLogSeatSessionRemovedEvent *) event_copy);
+ break;
+ case CK_LOG_EVENT_SEAT_DEVICE_ADDED:
+ event_seat_device_added_copy ((CkLogSeatDeviceAddedEvent *) event,
+ (CkLogSeatDeviceAddedEvent *) event_copy);
+ break;
+ case CK_LOG_EVENT_SEAT_DEVICE_REMOVED:
+ event_seat_device_removed_copy ((CkLogSeatDeviceRemovedEvent *) event,
+ (CkLogSeatDeviceRemovedEvent *) event_copy);
+ break;
+ case CK_LOG_EVENT_SEAT_ACTIVE_SESSION_CHANGED:
+ event_seat_active_session_changed_copy ((CkLogSeatActiveSessionChangedEvent *) event,
+ (CkLogSeatActiveSessionChangedEvent *) event_copy);
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+
+ return event_copy;
+}
+
+void
+ck_log_event_free (CkLogEvent *event)
+{
+ switch (event->type) {
+ case CK_LOG_EVENT_SEAT_ADDED:
+ event_seat_added_free ((CkLogSeatAddedEvent *) event);
+ break;
+ case CK_LOG_EVENT_SEAT_REMOVED:
+ event_seat_removed_free ((CkLogSeatRemovedEvent *) event);
+ break;
+ case CK_LOG_EVENT_SYSTEM_STOP:
+ event_system_stop_free ((CkLogSystemStopEvent *) event);
+ break;
+ case CK_LOG_EVENT_SYSTEM_RESTART:
+ event_system_restart_free ((CkLogSystemRestartEvent *) event);
+ break;
+ case CK_LOG_EVENT_SYSTEM_START:
+ event_system_start_free ((CkLogSystemStartEvent *) event);
+ break;
+ case CK_LOG_EVENT_SEAT_SESSION_ADDED:
+ event_seat_session_added_free ((CkLogSeatSessionAddedEvent *) event);
+ break;
+ case CK_LOG_EVENT_SEAT_SESSION_REMOVED:
+ event_seat_session_removed_free ((CkLogSeatSessionRemovedEvent *) event);
+ break;
+ case CK_LOG_EVENT_SEAT_DEVICE_ADDED:
+ event_seat_device_added_free ((CkLogSeatDeviceAddedEvent *) event);
+ break;
+ case CK_LOG_EVENT_SEAT_DEVICE_REMOVED:
+ event_seat_device_removed_free ((CkLogSeatDeviceRemovedEvent *) event);
+ break;
+ case CK_LOG_EVENT_SEAT_ACTIVE_SESSION_CHANGED:
+ event_seat_active_session_changed_free ((CkLogSeatActiveSessionChangedEvent *) event);
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+
+ g_free (event);
+}
+
+static void
+add_log_for_seat_added (GString *str,
+ CkLogEvent *event)
+{
+ CkLogSeatAddedEvent *e;
+
+ e = (CkLogSeatAddedEvent *)event;
+ g_string_append_printf (str,
+ " seat-id='%s' seat-kind=%d",
+ e->seat_id,
+ e->seat_kind);
+}
+
+static void
+add_log_for_seat_removed (GString *str,
+ CkLogEvent *event)
+{
+ CkLogSeatRemovedEvent *e;
+
+ e = (CkLogSeatRemovedEvent *)event;
+ g_string_append_printf (str,
+ " seat-id='%s' seat-kind=%d",
+ e->seat_id,
+ e->seat_kind);
+}
+
+static void
+add_log_for_seat_session_added (GString *str,
+ CkLogEvent *event)
+{
+ CkLogSeatSessionAddedEvent *e;
+
+ e = (CkLogSeatSessionAddedEvent *)event;
+ g_string_append_printf (str,
+ " seat-id='%s' session-id='%s' session-type='%s' session-x11-display='%s' session-x11-display-device='%s' session-display-device='%s' session-remote-host-name='%s' session-is-local=%s session-unix-user=%u session-creation-time='%s'",
+ e->seat_id ? e->seat_id : "",
+ e->session_id ? e->session_id : "",
+ e->session_type ? e->session_type : "",
+ e->session_x11_display ? e->session_x11_display : "",
+ e->session_x11_display_device ? e->session_x11_display_device : "",
+ e->session_display_device ? e->session_display_device : "",
+ e->session_remote_host_name ? e->session_remote_host_name : "",
+ e->session_is_local ? "TRUE" : "FALSE",
+ e->session_unix_user,
+ e->session_creation_time ? e->session_creation_time : "");
+}
+
+static void
+add_log_for_seat_session_removed (GString *str,
+ CkLogEvent *event)
+{
+ CkLogSeatSessionRemovedEvent *e;
+
+ e = (CkLogSeatSessionRemovedEvent *)event;
+ g_string_append_printf (str,
+ " seat-id='%s' session-id='%s' session-type='%s' session-x11-display='%s' session-x11-display-device='%s' session-display-device='%s' session-remote-host-name='%s' session-is-local=%s session-unix-user=%u session-creation-time='%s'",
+ e->seat_id ? e->seat_id : "",
+ e->session_id ? e->session_id : "",
+ e->session_type ? e->session_type : "",
+ e->session_x11_display ? e->session_x11_display : "",
+ e->session_x11_display_device ? e->session_x11_display_device : "",
+ e->session_display_device ? e->session_display_device : "",
+ e->session_remote_host_name ? e->session_remote_host_name : "",
+ e->session_is_local ? "TRUE" : "FALSE",
+ e->session_unix_user,
+ e->session_creation_time ? e->session_creation_time : "");
+}
+
+static void
+add_log_for_system_stop (GString *str,
+ CkLogEvent *event)
+{
+ CkLogSystemStopEvent *e;
+
+ e = (CkLogSystemStopEvent *)event;
+}
+
+static void
+add_log_for_system_restart (GString *str,
+ CkLogEvent *event)
+{
+ CkLogSystemRestartEvent *e;
+
+ e = (CkLogSystemRestartEvent *)event;
+}
+
+
+static void
+add_log_for_system_start (GString *str,
+ CkLogEvent *event)
+{
+ CkLogSystemStartEvent *e;
+
+ e = (CkLogSystemStartEvent *)event;
+}
+
+static void
+add_log_for_seat_active_session_changed (GString *str,
+ CkLogEvent *event)
+{
+ CkLogSeatActiveSessionChangedEvent *e;
+
+ e = (CkLogSeatActiveSessionChangedEvent *)event;
+ g_string_append_printf (str,
+ " seat-id='%s' session-id='%s'",
+ e->seat_id ? e->seat_id : "",
+ e->session_id ? e->session_id : "");
+}
+
+static void
+add_log_for_seat_device_added (GString *str,
+ CkLogEvent *event)
+{
+ CkLogSeatDeviceAddedEvent *e;
+
+ e = (CkLogSeatDeviceAddedEvent *)event;
+ g_string_append_printf (str,
+ " seat-id='%s' device-id='%s' device-type='%s'",
+ e->seat_id ? e->seat_id : "",
+ e->device_id ? e->device_id : "",
+ e->device_type ? e->device_type : "");
+}
+
+static void
+add_log_for_seat_device_removed (GString *str,
+ CkLogEvent *event)
+{
+ CkLogSeatDeviceRemovedEvent *e;
+
+ e = (CkLogSeatDeviceRemovedEvent *)event;
+ g_string_append_printf (str,
+ " seat-id='%s' device-id='%s' device-type='%s'",
+ e->seat_id ? e->seat_id : "",
+ e->device_id ? e->device_id : "",
+ e->device_type ? e->device_type : "");
+}
+
+static const char *
+event_type_to_name (CkLogEventType event_type)
+{
+ const char *str;
+ switch (event_type) {
+ case CK_LOG_EVENT_SEAT_ADDED:
+ str = "SEAT_ADDED";
+ break;
+ case CK_LOG_EVENT_SEAT_REMOVED:
+ str = "SEAT_REMOVED";
+ break;
+ case CK_LOG_EVENT_SYSTEM_STOP:
+ str = "SYSTEM_STOP";
+ break;
+ case CK_LOG_EVENT_SYSTEM_RESTART:
+ str = "SYSTEM_RESTART";
+ break;
+ case CK_LOG_EVENT_SYSTEM_START:
+ str = "SYSTEM_START";
+ break;
+ case CK_LOG_EVENT_SEAT_SESSION_ADDED:
+ str = "SEAT_SESSION_ADDED";
+ break;
+ case CK_LOG_EVENT_SEAT_SESSION_REMOVED:
+ str = "SEAT_SESSION_REMOVED";
+ break;
+ case CK_LOG_EVENT_SEAT_DEVICE_ADDED:
+ str = "SEAT_DEVICE_ADDED";
+ break;
+ case CK_LOG_EVENT_SEAT_DEVICE_REMOVED:
+ str = "SEAT_DEVICE_REMOVED";
+ break;
+ case CK_LOG_EVENT_SEAT_ACTIVE_SESSION_CHANGED:
+ str = "SEAT_ACTIVE_SESSION_CHANGED";
+ break;
+ default:
+ str = "UNKNOWN";
+ break;
+ }
+ return str;
+}
+
+static gboolean
+event_name_to_type (const char *event_name,
+ CkLogEventType *event_type)
+{
+ gboolean ret;
+
+ ret = TRUE;
+
+ if (strcmp (event_name, "SEAT_ADDED") == 0) {
+ *event_type = CK_LOG_EVENT_SEAT_ADDED;
+ } else if (strcmp (event_name, "SEAT_REMOVED") == 0) {
+ *event_type = CK_LOG_EVENT_SEAT_REMOVED;
+ } else if (strcmp (event_name, "SYSTEM_STOP") == 0) {
+ *event_type = CK_LOG_EVENT_SYSTEM_STOP;
+ } else if (strcmp (event_name, "SYSTEM_RESTART") == 0) {
+ *event_type = CK_LOG_EVENT_SYSTEM_RESTART;
+ } else if (strcmp (event_name, "SYSTEM_START") == 0) {
+ *event_type = CK_LOG_EVENT_SYSTEM_START;
+ } else if (strcmp (event_name, "SEAT_SESSION_ADDED") == 0) {
+ *event_type = CK_LOG_EVENT_SEAT_SESSION_ADDED;
+ } else if (strcmp (event_name, "SEAT_SESSION_REMOVED") == 0) {
+ *event_type = CK_LOG_EVENT_SEAT_SESSION_REMOVED;
+ } else if (strcmp (event_name, "SEAT_DEVICE_ADDED") == 0) {
+ *event_type = CK_LOG_EVENT_SEAT_DEVICE_ADDED;
+ } else if (strcmp (event_name, "SEAT_DEVICE_REMOVED") == 0) {
+ *event_type = CK_LOG_EVENT_SEAT_DEVICE_REMOVED;
+ } else if (strcmp (event_name, "SEAT_ACTIVE_SESSION_CHANGED") == 0) {
+ *event_type = CK_LOG_EVENT_SEAT_ACTIVE_SESSION_CHANGED;
+ } else {
+ ret = FALSE;
+ }
+
+ return ret;
+}
+
+static void
+add_log_for_any (GString *str,
+ CkLogEvent *event)
+{
+ g_string_append_printf (str,
+ "%lu.%03u type=%s :",
+ (gulong)event->timestamp.tv_sec,
+ (guint)(event->timestamp.tv_usec / 1000),
+ event_type_to_name (event->type));
+}
+
+void
+ck_log_event_to_string (CkLogEvent *event,
+ GString *str)
+{
+
+ add_log_for_any (str, event);
+
+ switch (event->type) {
+ case CK_LOG_EVENT_SEAT_ADDED:
+ add_log_for_seat_added (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_REMOVED:
+ add_log_for_seat_removed (str, event);
+ break;
+ case CK_LOG_EVENT_SYSTEM_STOP:
+ add_log_for_system_stop (str, event);
+ break;
+ case CK_LOG_EVENT_SYSTEM_RESTART:
+ add_log_for_system_restart (str, event);
+ break;
+ case CK_LOG_EVENT_SYSTEM_START:
+ add_log_for_system_start (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_SESSION_ADDED:
+ add_log_for_seat_session_added (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_SESSION_REMOVED:
+ add_log_for_seat_session_removed (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_DEVICE_ADDED:
+ add_log_for_seat_device_added (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_DEVICE_REMOVED:
+ add_log_for_seat_device_removed (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_ACTIVE_SESSION_CHANGED:
+ add_log_for_seat_active_session_changed (str, event);
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+}
+
+static const char *
+skip_header (const char *str,
+ gssize len)
+{
+ char *r;
+ r = g_strstr_len (str,
+ len,
+ " : ");
+ if (r != NULL) {
+ r += 3;
+ }
+
+ return r;
+}
+
+static gboolean
+parse_value_as_ulong (const char *value,
+ gulong *intval)
+{
+ char *end_of_valid_int;
+ glong ulong_value;
+
+ ulong_value = strtoul (value, &end_of_valid_int, 10);
+
+ if (*value == '\0' || *end_of_valid_int != '\0') {
+ return FALSE;
+ }
+
+ *intval = ulong_value;
+
+ return TRUE;
+}
+
+static gboolean
+parse_log_for_seat_added (const GString *str,
+ CkLogEvent *event)
+{
+ gboolean ret;
+ const char *s;
+ GRegex *re;
+ GMatchInfo *match_info;
+ gboolean res;
+ GError *error;
+ char *tmp;
+ CkLogSeatAddedEvent *e;
+
+ re = NULL;
+ match_info = NULL;
+ ret = FALSE;
+
+ s = skip_header (str->str, str->len);
+ if (s == NULL) {
+ goto out;
+ }
+
+ error = NULL;
+ re = g_regex_new ("seat-id='(?P<seatid>[a-zA-Z0-9/]+)' seat-kind=(?P<sessionid>[0-9]*)", 0, 0, &error);
+ if (re == NULL) {
+ g_warning (error->message);
+ goto out;
+ }
+
+ g_regex_match (re, s, 0, &match_info);
+
+ res = g_match_info_matches (match_info);
+ if (! res) {
+ g_warning ("Unable to parse seat added event: %s", s);
+ goto out;
+ }
+
+ e = (CkLogSeatAddedEvent *)event;
+ e->seat_id = g_match_info_fetch_named (match_info, "seatid");
+
+ tmp = g_match_info_fetch_named (match_info, "seatkind");
+ if (tmp != NULL) {
+ gulong l;
+ if (parse_value_as_ulong (tmp, &l)) {
+ e->seat_kind = l;
+ }
+ }
+
+ ret = TRUE;
+ out:
+ if (match_info != NULL) {
+ g_match_info_free (match_info);
+ }
+ if (re != NULL) {
+ g_regex_unref (re);
+ }
+
+ return ret;
+}
+
+static gboolean
+parse_log_for_seat_removed (const GString *str,
+ CkLogEvent *event)
+{
+ gboolean ret;
+ const char *s;
+ GRegex *re;
+ GMatchInfo *match_info;
+ gboolean res;
+ GError *error;
+ char *tmp;
+ CkLogSeatRemovedEvent *e;
+
+ re = NULL;
+ match_info = NULL;
+ ret = FALSE;
+
+ s = skip_header (str->str, str->len);
+ if (s == NULL) {
+ goto out;
+ }
+
+ error = NULL;
+ re = g_regex_new ("seat-id='(?P<seatid>[a-zA-Z0-9/]+)' seat-kind=(?P<sessionid>[0-9]*)", 0, 0, &error);
+ if (re == NULL) {
+ g_warning (error->message);
+ goto out;
+ }
+
+ g_regex_match (re, s, 0, &match_info);
+
+ res = g_match_info_matches (match_info);
+ if (! res) {
+ g_warning ("Unable to parse seat removed event: %s", s);
+ goto out;
+ }
+
+ e = (CkLogSeatRemovedEvent *)event;
+ e->seat_id = g_match_info_fetch_named (match_info, "seatid");
+
+ tmp = g_match_info_fetch_named (match_info, "seatkind");
+ if (tmp != NULL) {
+ gulong l;
+ if (parse_value_as_ulong (tmp, &l)) {
+ e->seat_kind = l;
+ }
+ }
+
+ ret = TRUE;
+ out:
+ if (match_info != NULL) {
+ g_match_info_free (match_info);
+ }
+ if (re != NULL) {
+ g_regex_unref (re);
+ }
+
+ return ret;
+}
+
+static gboolean
+parse_log_for_system_stop (const GString *str,
+ CkLogEvent *event)
+{
+ gboolean ret;
+ const char *s;
+ CkLogSystemStopEvent *e;
+
+ ret = FALSE;
+
+ s = skip_header (str->str, str->len);
+ if (s == NULL) {
+ goto out;
+ }
+
+ e = (CkLogSystemStopEvent *)event;
+
+ ret = TRUE;
+ out:
+
+ return ret;
+}
+
+static gboolean
+parse_log_for_system_restart (const GString *str,
+ CkLogEvent *event)
+{
+ gboolean ret;
+ const char *s;
+ CkLogSystemRestartEvent *e;
+
+ ret = FALSE;
+
+ s = skip_header (str->str, str->len);
+ if (s == NULL) {
+ goto out;
+ }
+
+ e = (CkLogSystemRestartEvent *)event;
+
+ ret = TRUE;
+ out:
+
+ return ret;
+}
+
+static gboolean
+parse_log_for_system_start (const GString *str,
+ CkLogEvent *event)
+{
+ gboolean ret;
+ const char *s;
+ CkLogSystemStartEvent *e;
+
+ ret = FALSE;
+
+ s = skip_header (str->str, str->len);
+ if (s == NULL) {
+ goto out;
+ }
+
+ e = (CkLogSystemStartEvent *)event;
+
+ ret = TRUE;
+ out:
+
+ return ret;
+}
+
+static gboolean
+parse_log_for_seat_session_added (const GString *str,
+ CkLogEvent *event)
+{
+ gboolean ret;
+ const char *s;
+ GRegex *re;
+ GMatchInfo *match_info;
+ gboolean res;
+ GError *error;
+ char *tmp;
+ CkLogSeatSessionAddedEvent *e;
+
+ re = NULL;
+ match_info = NULL;
+ ret = FALSE;
+
+ s = skip_header (str->str, str->len);
+ if (s == NULL) {
+ goto out;
+ }
+
+ error = NULL;
+ re = g_regex_new ("seat-id='(?P<seatid>[a-zA-Z0-9/]+)' session-id='(?P<sessionid>[a-zA-Z0-9/]+)' session-type='(?P<sessiontype>[a-zA-Z0-9 ]*)' session-x11-display='(?P<sessionx11display>[0-9a-zA-Z.:]*)' session-x11-display-device='(?P<sessionx11displaydevice>[^']*)' session-display-device='(?P<sessiondisplaydevice>[^']*)' session-remote-host-name='(?P<sessionremovehostname>[^']*)' session-is-local=(?P<sessionislocal>[a-zA-Z]*) session-unix-user=(?P<sessionunixuser>[0-9]*) session-creation-time='(?P<sessioncreationtime>[^']*)'", 0, 0, &error);
+ if (re == NULL) {
+ g_warning (error->message);
+ goto out;
+ }
+
+ g_regex_match (re, s, 0, &match_info);
+
+ res = g_match_info_matches (match_info);
+ if (! res) {
+ g_warning ("Unable to parse session added event: %s", s);
+ goto out;
+ }
+
+ e = (CkLogSeatSessionAddedEvent *)event;
+ e->seat_id = g_match_info_fetch_named (match_info, "seatid");
+ e->session_id = g_match_info_fetch_named (match_info, "sessionid");
+ e->session_type = g_match_info_fetch_named (match_info, "sessiontype");
+ e->session_x11_display = g_match_info_fetch_named (match_info, "sessionx11display");
+ e->session_x11_display_device = g_match_info_fetch_named (match_info, "sessionx11displaydevice");
+ e->session_display_device = g_match_info_fetch_named (match_info, "sessiondisplaydevice");
+ e->session_remote_host_name = g_match_info_fetch_named (match_info, "sessionremotehostname");
+ e->session_creation_time = g_match_info_fetch_named (match_info, "sessioncreationtime");
+
+ tmp = g_match_info_fetch_named (match_info, "sessionislocal");
+ if (tmp != NULL && strcmp (tmp, "TRUE") == 0) {
+ e->session_is_local = TRUE;
+ } else {
+ e->session_is_local = FALSE;
+ }
+ g_free (tmp);
+
+ tmp = g_match_info_fetch_named (match_info, "sessionunixuser");
+ if (tmp != NULL) {
+ gulong l;
+ if (parse_value_as_ulong (tmp, &l)) {
+ e->session_unix_user = l;
+ }
+ }
+
+ ret = TRUE;
+ out:
+ if (match_info != NULL) {
+ g_match_info_free (match_info);
+ }
+ if (re != NULL) {
+ g_regex_unref (re);
+ }
+
+ return ret;
+}
+
+static gboolean
+parse_log_for_seat_session_removed (const GString *str,
+ CkLogEvent *event)
+{
+ gboolean ret;
+ const char *s;
+ GRegex *re;
+ GMatchInfo *match_info;
+ gboolean res;
+ GError *error;
+ char *tmp;
+ CkLogSeatSessionRemovedEvent *e;
+
+ re = NULL;
+ match_info = NULL;
+ ret = FALSE;
+
+ s = skip_header (str->str, str->len);
+ if (s == NULL) {
+ goto out;
+ }
+
+ error = NULL;
+ re = g_regex_new ("seat-id='(?P<seatid>[a-zA-Z0-9/]+)' session-id='(?P<sessionid>[a-zA-Z0-9/]+)' session-type='(?P<sessiontype>[a-zA-Z0-9 ]*)' session-x11-display='(?P<sessionx11display>[0-9a-zA-Z.:]*)' session-x11-display-device='(?P<sessionx11displaydevice>[^']*)' session-display-device='(?P<sessiondisplaydevice>[^']*)' session-remote-host-name='(?P<sessionremovehostname>[^']*)' session-is-local=(?P<sessionislocal>[a-zA-Z]*) session-unix-user=(?P<sessionunixuser>[0-9]*) session-creation-time='(?P<sessioncreationtime>[^']*)'", 0, 0, &error);
+ if (re == NULL) {
+ g_warning (error->message);
+ goto out;
+ }
+
+ g_regex_match (re, s, 0, &match_info);
+
+ res = g_match_info_matches (match_info);
+ if (! res) {
+ g_warning ("Unable to parse session removed event: %s", s);
+ goto out;
+ }
+
+ e = (CkLogSeatSessionRemovedEvent *)event;
+ e->seat_id = g_match_info_fetch_named (match_info, "seatid");
+ e->session_id = g_match_info_fetch_named (match_info, "sessionid");
+ e->session_type = g_match_info_fetch_named (match_info, "sessiontype");
+ e->session_x11_display = g_match_info_fetch_named (match_info, "sessionx11display");
+ e->session_x11_display_device = g_match_info_fetch_named (match_info, "sessionx11displaydevice");
+ e->session_display_device = g_match_info_fetch_named (match_info, "sessiondisplaydevice");
+ e->session_remote_host_name = g_match_info_fetch_named (match_info, "sessionremotehostname");
+ e->session_creation_time = g_match_info_fetch_named (match_info, "sessioncreationtime");
+
+ tmp = g_match_info_fetch_named (match_info, "sessionislocal");
+ if (tmp != NULL && strcmp (tmp, "TRUE") == 0) {
+ e->session_is_local = TRUE;
+ } else {
+ e->session_is_local = FALSE;
+ }
+ g_free (tmp);
+
+ tmp = g_match_info_fetch_named (match_info, "sessionunixuser");
+ if (tmp != NULL) {
+ gulong l;
+ if (parse_value_as_ulong (tmp, &l)) {
+ e->session_unix_user = l;
+ }
+ }
+
+ ret = TRUE;
+ out:
+ if (match_info != NULL) {
+ g_match_info_free (match_info);
+ }
+ if (re != NULL) {
+ g_regex_unref (re);
+ }
+
+ return ret;
+}
+
+static gboolean
+parse_log_for_seat_active_session_changed (const GString *str,
+ CkLogEvent *event)
+{
+ gboolean ret;
+ const char *s;
+ GRegex *re;
+ GMatchInfo *match_info;
+ gboolean res;
+ GError *error;
+ CkLogSeatActiveSessionChangedEvent *e;
+
+ re = NULL;
+ match_info = NULL;
+ ret = FALSE;
+
+ s = skip_header (str->str, str->len);
+ if (s == NULL) {
+ goto out;
+ }
+
+ error = NULL;
+ re = g_regex_new ("seat-id='(?P<seatid>[a-zA-Z0-9/]+)' session-id='(?P<sessionid>[a-zA-Z0-9/]*)'", 0, 0, &error);
+ if (re == NULL) {
+ g_warning (error->message);
+ goto out;
+ }
+
+ g_regex_match (re, s, 0, &match_info);
+
+ res = g_match_info_matches (match_info);
+ if (! res) {
+ g_warning ("Unable to parse session changed event: %s", s);
+ goto out;
+ }
+
+ e = (CkLogSeatActiveSessionChangedEvent *)event;
+ e->seat_id = g_match_info_fetch_named (match_info, "seatid");
+ e->session_id = g_match_info_fetch_named (match_info, "sessionid");
+
+ ret = TRUE;
+ out:
+ if (match_info != NULL) {
+ g_match_info_free (match_info);
+ }
+ if (re != NULL) {
+ g_regex_unref (re);
+ }
+
+ return ret;
+}
+
+static gboolean
+parse_log_for_seat_device_added (const GString *str,
+ CkLogEvent *event)
+{
+ gboolean ret;
+ const char *s;
+ GRegex *re;
+ GMatchInfo *match_info;
+ gboolean res;
+ GError *error;
+ CkLogSeatDeviceAddedEvent *e;
+
+ re = NULL;
+ match_info = NULL;
+ ret = FALSE;
+
+ s = skip_header (str->str, str->len);
+ if (s == NULL) {
+ goto out;
+ }
+
+ error = NULL;
+ re = g_regex_new ("seat-id='(?P<seatid>[a-zA-Z0-9/]+)' device-id='(?P<deviceid>[^']+)' device-type='(?P<devicetype>[^']+)'", 0, 0, &error);
+ if (re == NULL) {
+ g_warning (error->message);
+ goto out;
+ }
+
+ g_regex_match (re, s, 0, &match_info);
+
+ res = g_match_info_matches (match_info);
+ if (! res) {
+ g_warning ("Unable to parse device added event: %s", s);
+ goto out;
+ }
+
+ e = (CkLogSeatDeviceAddedEvent *)event;
+ e->seat_id = g_match_info_fetch_named (match_info, "seatid");
+ e->device_id = g_match_info_fetch_named (match_info, "deviceid");
+ e->device_type = g_match_info_fetch_named (match_info, "devicetype");
+
+ ret = TRUE;
+ out:
+ if (match_info != NULL) {
+ g_match_info_free (match_info);
+ }
+ if (re != NULL) {
+ g_regex_unref (re);
+ }
+
+ return ret;
+}
+
+static gboolean
+parse_log_for_seat_device_removed (const GString *str,
+ CkLogEvent *event)
+{
+ gboolean ret;
+ const char *s;
+ GRegex *re;
+ GMatchInfo *match_info;
+ gboolean res;
+ GError *error;
+ CkLogSeatDeviceRemovedEvent *e;
+
+ re = NULL;
+ match_info = NULL;
+ ret = FALSE;
+
+ s = skip_header (str->str, str->len);
+ if (s == NULL) {
+ goto out;
+ }
+
+ error = NULL;
+ re = g_regex_new ("seat-id='(?P<seatid>[a-zA-Z0-9/]+)' device-id='(?P<deviceid>[^']+)' device-type='(?P<devicetype>[^']+)'", 0, 0, &error);
+ if (re == NULL) {
+ g_warning (error->message);
+ goto out;
+ }
+
+ g_regex_match (re, s, 0, &match_info);
+
+ res = g_match_info_matches (match_info);
+ if (! res) {
+ g_warning ("Unable to parse device removed event: %s", s);
+ goto out;
+ }
+
+ e = (CkLogSeatDeviceRemovedEvent *)event;
+ e->seat_id = g_match_info_fetch_named (match_info, "seatid");
+ e->device_id = g_match_info_fetch_named (match_info, "deviceid");
+ e->device_type = g_match_info_fetch_named (match_info, "devicetype");
+
+ ret = TRUE;
+ out:
+ if (match_info != NULL) {
+ g_match_info_free (match_info);
+ }
+ if (re != NULL) {
+ g_regex_unref (re);
+ }
+
+ return ret;
+}
+
+static gboolean
+parse_log_for_any (const GString *str,
+ CkLogEvent *event)
+{
+ gboolean ret;
+ int res;
+ gulong sec;
+ guint frac;
+ char buf[32];
+
+ ret = FALSE;
+
+ res = sscanf (str->str, "%lu.%u type=%30s :",
+ &sec,
+ &frac,
+ buf);
+ if (res == 3) {
+ res = event_name_to_type (buf, &event->type);
+ if (! res) {
+ goto out;
+ }
+
+ event->timestamp.tv_sec = sec;
+ event->timestamp.tv_usec = 1000 * frac;
+
+ ret = TRUE;
+ }
+ out:
+ return ret;
+}
+
+gboolean
+ck_log_event_fill_from_string (CkLogEvent *event,
+ const GString *str)
+{
+ gboolean res;
+ gboolean ret;
+
+ g_return_val_if_fail (str != NULL, FALSE);
+
+ ret = FALSE;
+
+ res = parse_log_for_any (str, event);
+ if (! res) {
+ goto out;
+ }
+
+ switch (event->type) {
+ case CK_LOG_EVENT_SEAT_ADDED:
+ res = parse_log_for_seat_added (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_REMOVED:
+ res = parse_log_for_seat_removed (str, event);
+ break;
+ case CK_LOG_EVENT_SYSTEM_STOP:
+ res = parse_log_for_system_stop (str, event);
+ break;
+ case CK_LOG_EVENT_SYSTEM_RESTART:
+ res = parse_log_for_system_restart (str, event);
+ break;
+ case CK_LOG_EVENT_SYSTEM_START:
+ res = parse_log_for_system_start (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_SESSION_ADDED:
+ res = parse_log_for_seat_session_added (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_SESSION_REMOVED:
+ res = parse_log_for_seat_session_removed (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_DEVICE_ADDED:
+ res = parse_log_for_seat_device_added (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_DEVICE_REMOVED:
+ res = parse_log_for_seat_device_removed (str, event);
+ break;
+ case CK_LOG_EVENT_SEAT_ACTIVE_SESSION_CHANGED:
+ res = parse_log_for_seat_active_session_changed (str, event);
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+ if (! res) {
+ goto out;
+ }
+ ret = TRUE;
+ out:
+ return ret;
+}
+
+CkLogEvent *
+ck_log_event_new_from_string (const GString *str)
+{
+ CkLogEvent *event;
+ gboolean res;
+
+ g_return_val_if_fail (str != NULL, NULL);
+
+ event = g_new0 (CkLogEvent, 1);
+ res = ck_log_event_fill_from_string (event, str);
+ if (! res) {
+ g_free (event);
+ event = NULL;
+ }
+
+ return event;
+}
diff --git a/src/ck-log-event.h b/src/ck-log-event.h
new file mode 100644
index 0000000..149f49b
--- /dev/null
+++ b/src/ck-log-event.h
@@ -0,0 +1,148 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef __CK_LOG_EVENT_H
+#define __CK_LOG_EVENT_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef enum
+{
+ CK_LOG_EVENT_START = 0,
+ CK_LOG_EVENT_STOP,
+ CK_LOG_EVENT_SYSTEM_START,
+ CK_LOG_EVENT_SYSTEM_STOP,
+ CK_LOG_EVENT_SYSTEM_RESTART,
+ CK_LOG_EVENT_SYSTEM_RUNLEVEL_CHANGED,
+ CK_LOG_EVENT_SEAT_ADDED,
+ CK_LOG_EVENT_SEAT_REMOVED,
+ CK_LOG_EVENT_SEAT_SESSION_ADDED,
+ CK_LOG_EVENT_SEAT_SESSION_REMOVED,
+ CK_LOG_EVENT_SEAT_DEVICE_ADDED,
+ CK_LOG_EVENT_SEAT_DEVICE_REMOVED,
+ CK_LOG_EVENT_SEAT_ACTIVE_SESSION_CHANGED,
+} CkLogEventType;
+
+typedef struct
+{
+} CkLogSystemStopEvent;
+
+typedef struct
+{
+} CkLogSystemRestartEvent;
+
+typedef struct
+{
+} CkLogSystemStartEvent;
+
+typedef struct
+{
+ char *seat_id;
+ int seat_kind;
+} CkLogSeatAddedEvent;
+
+typedef struct
+{
+ char *seat_id;
+ int seat_kind;
+} CkLogSeatRemovedEvent;
+
+typedef struct
+{
+ char *seat_id;
+ char *session_id;
+ char *session_type;
+ char *session_x11_display;
+ char *session_x11_display_device;
+ char *session_display_device;
+ char *session_remote_host_name;
+ gboolean session_is_local;
+ guint session_unix_user;
+ char *session_creation_time;
+} CkLogSeatSessionAddedEvent;
+
+typedef struct
+{
+ char *seat_id;
+ char *session_id;
+ char *session_type;
+ char *session_x11_display;
+ char *session_x11_display_device;
+ char *session_display_device;
+ char *session_remote_host_name;
+ gboolean session_is_local;
+ guint session_unix_user;
+ char *session_creation_time;
+} CkLogSeatSessionRemovedEvent;
+
+typedef struct
+{
+ char *seat_id;
+ char *session_id;
+} CkLogSeatActiveSessionChangedEvent;
+
+typedef struct
+{
+ char *seat_id;
+ char *device_type;
+ char *device_id;
+} CkLogSeatDeviceAddedEvent;
+
+typedef struct
+{
+ char *seat_id;
+ char *device_type;
+ char *device_id;
+} CkLogSeatDeviceRemovedEvent;
+
+typedef struct
+{
+ union {
+ CkLogSystemRestartEvent system_start;
+ CkLogSystemStopEvent system_stop;
+ CkLogSystemRestartEvent system_restart;
+ CkLogSeatAddedEvent seat_added;
+ CkLogSeatRemovedEvent seat_removed;
+ CkLogSeatSessionAddedEvent seat_session_added;
+ CkLogSeatSessionRemovedEvent seat_session_removed;
+ CkLogSeatActiveSessionChangedEvent seat_active_session_changed;
+ CkLogSeatDeviceAddedEvent seat_device_added;
+ CkLogSeatDeviceRemovedEvent seat_device_removed;
+ } event;
+
+ GTimeVal timestamp;
+ CkLogEventType type;
+} CkLogEvent;
+
+CkLogEvent * ck_log_event_copy (CkLogEvent *event);
+void ck_log_event_free (CkLogEvent *event);
+
+CkLogEvent * ck_log_event_new_from_string (const GString *str);
+gboolean ck_log_event_fill_from_string (CkLogEvent *event,
+ const GString *str);
+
+void ck_log_event_to_string (CkLogEvent *event,
+ GString *str);
+
+G_END_DECLS
+
+#endif /* __CK_LOG_EVENT_H */
diff --git a/src/ck-manager-glue.h b/src/ck-manager-glue.h
index 0def872..b82aabc 100644
--- a/src/ck-manager-glue.h
+++ b/src/ck-manager-glue.h
@@ -53,7 +53,7 @@ G_BEGIN_DECLS
#endif /* !G_ENABLE_DEBUG */
-/* BOOLEAN:POINTER,POINTER (/tmp/dbus-binding-tool-c-marshallers.2JLIYT:1) */
+/* BOOLEAN:POINTER,POINTER (/tmp/dbus-binding-tool-c-marshallers.D3GI6T:1) */
extern void dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -62,10 +62,10 @@ extern void dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER (GClosure
gpointer marshal_data);
void
dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER (GClosure *closure,
- GValue *return_value,
+ GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
- gpointer invocation_hint,
+ gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER_POINTER) (gpointer data1,
@@ -100,11 +100,11 @@ dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER (GClosure *closure,
g_value_set_boolean (return_value, v_return);
}
-/* NONE:UINT,POINTER (/tmp/dbus-binding-tool-c-marshallers.2JLIYT:2) */
+/* NONE:UINT,POINTER (/tmp/dbus-binding-tool-c-marshallers.D3GI6T:2) */
#define dbus_glib_marshal_ck_manager_VOID__UINT_POINTER g_cclosure_marshal_VOID__UINT_POINTER
#define dbus_glib_marshal_ck_manager_NONE__UINT_POINTER dbus_glib_marshal_ck_manager_VOID__UINT_POINTER
-/* NONE:STRING,POINTER (/tmp/dbus-binding-tool-c-marshallers.2JLIYT:3) */
+/* NONE:STRING,POINTER (/tmp/dbus-binding-tool-c-marshallers.D3GI6T:3) */
extern void dbus_glib_marshal_ck_manager_VOID__STRING_POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -113,10 +113,10 @@ extern void dbus_glib_marshal_ck_manager_VOID__STRING_POINTER (GClosure *clo
gpointer marshal_data);
void
dbus_glib_marshal_ck_manager_VOID__STRING_POINTER (GClosure *closure,
- GValue *return_value,
+ GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
- gpointer invocation_hint,
+ gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__STRING_POINTER) (gpointer data1,
@@ -148,11 +148,11 @@ dbus_glib_marshal_ck_manager_VOID__STRING_POINTER (GClosure *closure,
}
#define dbus_glib_marshal_ck_manager_NONE__STRING_POINTER dbus_glib_marshal_ck_manager_VOID__STRING_POINTER
-/* NONE:POINTER (/tmp/dbus-binding-tool-c-marshallers.2JLIYT:4) */
+/* NONE:POINTER (/tmp/dbus-binding-tool-c-marshallers.D3GI6T:4) */
#define dbus_glib_marshal_ck_manager_VOID__POINTER g_cclosure_marshal_VOID__POINTER
#define dbus_glib_marshal_ck_manager_NONE__POINTER dbus_glib_marshal_ck_manager_VOID__POINTER
-/* NONE:BOXED,POINTER (/tmp/dbus-binding-tool-c-marshallers.2JLIYT:5) */
+/* NONE:BOXED,POINTER (/tmp/dbus-binding-tool-c-marshallers.D3GI6T:5) */
extern void dbus_glib_marshal_ck_manager_VOID__BOXED_POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -161,10 +161,10 @@ extern void dbus_glib_marshal_ck_manager_VOID__BOXED_POINTER (GClosure *clos
gpointer marshal_data);
void
dbus_glib_marshal_ck_manager_VOID__BOXED_POINTER (GClosure *closure,
- GValue *return_value,
+ GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
- gpointer invocation_hint,
+ gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__BOXED_POINTER) (gpointer data1,
@@ -202,24 +202,27 @@ G_END_DECLS
#include <dbus/dbus-glib.h>
static const DBusGMethodInfo dbus_glib_ck_manager_methods[] = {
- { (GCallback) ck_manager_open_session, dbus_glib_marshal_ck_manager_NONE__POINTER, 0 },
- { (GCallback) ck_manager_open_session_with_parameters, dbus_glib_marshal_ck_manager_NONE__BOXED_POINTER, 65 },
- { (GCallback) ck_manager_close_session, dbus_glib_marshal_ck_manager_NONE__STRING_POINTER, 163 },
- { (GCallback) ck_manager_get_seats, dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER, 240 },
- { (GCallback) ck_manager_get_session_for_cookie, dbus_glib_marshal_ck_manager_NONE__STRING_POINTER, 302 },
- { (GCallback) ck_manager_get_session_for_unix_process, dbus_glib_marshal_ck_manager_NONE__UINT_POINTER, 384 },
- { (GCallback) ck_manager_get_current_session, dbus_glib_marshal_ck_manager_NONE__POINTER, 468 },
- { (GCallback) ck_manager_get_sessions_for_unix_user, dbus_glib_marshal_ck_manager_NONE__UINT_POINTER, 537 },
- { (GCallback) ck_manager_get_sessions_for_user, dbus_glib_marshal_ck_manager_NONE__UINT_POINTER, 624 },
- { (GCallback) ck_manager_get_system_idle_hint, dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER, 707 },
- { (GCallback) ck_manager_get_system_idle_since_hint, dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER, 781 },
+ { (GCallback) ck_manager_restart, dbus_glib_marshal_ck_manager_NONE__POINTER, 0 },
+ { (GCallback) ck_manager_stop, dbus_glib_marshal_ck_manager_NONE__POINTER, 46 },
+ { (GCallback) ck_manager_open_session, dbus_glib_marshal_ck_manager_NONE__POINTER, 89 },
+ { (GCallback) ck_manager_open_session_with_parameters, dbus_glib_marshal_ck_manager_NONE__BOXED_POINTER, 154 },
+ { (GCallback) ck_manager_close_session, dbus_glib_marshal_ck_manager_NONE__STRING_POINTER, 252 },
+ { (GCallback) ck_manager_get_seats, dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER, 329 },
+ { (GCallback) ck_manager_get_sessions, dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER, 391 },
+ { (GCallback) ck_manager_get_session_for_cookie, dbus_glib_marshal_ck_manager_NONE__STRING_POINTER, 459 },
+ { (GCallback) ck_manager_get_session_for_unix_process, dbus_glib_marshal_ck_manager_NONE__UINT_POINTER, 541 },
+ { (GCallback) ck_manager_get_current_session, dbus_glib_marshal_ck_manager_NONE__POINTER, 625 },
+ { (GCallback) ck_manager_get_sessions_for_unix_user, dbus_glib_marshal_ck_manager_NONE__UINT_POINTER, 694 },
+ { (GCallback) ck_manager_get_sessions_for_user, dbus_glib_marshal_ck_manager_NONE__UINT_POINTER, 781 },
+ { (GCallback) ck_manager_get_system_idle_hint, dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER, 864 },
+ { (GCallback) ck_manager_get_system_idle_since_hint, dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER, 938 },
};
const DBusGObjectInfo dbus_glib_ck_manager_object_info = {
0,
dbus_glib_ck_manager_methods,
- 11,
-"org.freedesktop.ConsoleKit.Manager\0OpenSession\0A\0cookie\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Manager\0OpenSessionWithParameters\0A\0parameters\0I\0a(sv)\0cookie\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Manager\0CloseSession\0A\0cookie\0I\0s\0result\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Manager\0GetSeats\0S\0seats\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionForCookie\0A\0cookie\0I\0s\0ssid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionForUnixProcess\0A\0pid\0I\0u\0ssid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Manager\0GetCurrentSession\0A\0ssid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionsForUnixUser\0A\0uid\0I\0u\0sessions\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionsForUser\0A\0uid\0I\0u\0sessions\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Manager\0GetSystemIdleHint\0S\0idle_hint\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Manager\0GetSystemIdleSinceHint\0S\0iso8601_datetime\0O\0F\0N\0s\0\0\0",
+ 14,
+"org.freedesktop.ConsoleKit.Manager\0Restart\0A\0\0org.freedesktop.ConsoleKit.Manager\0Stop\0A\0\0org.freedesktop.ConsoleKit.Manager\0OpenSession\0A\0cookie\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Manager\0OpenSessionWithParameters\0A\0parameters\0I\0a(sv)\0cookie\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Manager\0CloseSession\0A\0cookie\0I\0s\0result\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Manager\0GetSeats\0S\0seats\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Manager\0GetSessions\0S\0sessions\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionForCookie\0A\0cookie\0I\0s\0ssid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionForUnixProcess\0A\0pid\0I\0u\0ssid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Manager\0GetCurrentSession\0A\0ssid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionsForUnixUser\0A\0uid\0I\0u\0sessions\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionsForUser\0A\0uid\0I\0u\0sessions\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Manager\0GetSystemIdleHint\0S\0idle_hint\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Manager\0GetSystemIdleSinceHint\0S\0iso8601_datetime\0O\0F\0N\0s\0\0\0",
"org.freedesktop.ConsoleKit.Manager\0SeatAdded\0org.freedesktop.ConsoleKit.Manager\0SeatRemoved\0org.freedesktop.ConsoleKit.Manager\0SystemIdleHintChanged\0\0",
"\0"
};
diff --git a/src/ck-manager.c b/src/ck-manager.c
index 377cef0..bf4926f 100644
--- a/src/ck-manager.c
+++ b/src/ck-manager.c
@@ -28,45 +28,57 @@
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <errno.h>
+#include <pwd.h>
#include <glib.h>
#include <glib/gi18n.h>
+#include <glib/gstdio.h>
#include <glib-object.h>
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#ifdef HAVE_POLKIT
+#include <polkit/polkit.h>
+#endif
+
+#ifdef ENABLE_RBAC_SHUTDOWN
+#include <auth_attr.h>
+#include <secdb.h>
+#endif
+
#include "ck-manager.h"
#include "ck-manager-glue.h"
#include "ck-seat.h"
+#include "ck-session-leader.h"
#include "ck-session.h"
-#include "ck-job.h"
#include "ck-marshal.h"
+#include "ck-event-logger.h"
#include "ck-sysdeps.h"
#define CK_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CK_TYPE_MANAGER, CkManagerPrivate))
-#define CK_SEAT_DIR SYSCONFDIR "/ConsoleKit/seats.d"
-
+#define CK_SEAT_DIR SYSCONFDIR "/ConsoleKit/seats.d"
+#define LOG_FILE LOCALSTATEDIR "/log/ConsoleKit/history"
#define CK_DBUS_PATH "/org/freedesktop/ConsoleKit"
#define CK_MANAGER_DBUS_PATH CK_DBUS_PATH "/Manager"
#define CK_MANAGER_DBUS_NAME "org.freedesktop.ConsoleKit.Manager"
-#define CK_TYPE_PARAMETER_STRUCT (dbus_g_type_get_struct ("GValueArray", \
- G_TYPE_STRING, \
- G_TYPE_VALUE, \
- G_TYPE_INVALID))
-#define CK_TYPE_PARAMETER_LIST (dbus_g_type_get_collection ("GPtrArray", \
- CK_TYPE_PARAMETER_STRUCT))
struct CkManagerPrivate
{
+#ifdef HAVE_POLKIT
+ PolKitContext *pol_ctx;
+#endif
+
GHashTable *seats;
GHashTable *sessions;
GHashTable *leaders;
DBusGProxy *bus_proxy;
DBusGConnection *connection;
+ CkEventLogger *logger;
guint32 session_serial;
guint32 seat_serial;
@@ -75,18 +87,6 @@ struct CkManagerPrivate
GTimeVal system_idle_since_hint;
};
-
-typedef struct {
- int refcount;
- gboolean cancelled;
- uid_t uid;
- pid_t pid;
- char *service_name;
- char *ssid;
- char *cookie;
- GList *pending_jobs;
-} LeaderInfo;
-
enum {
SEAT_ADDED,
SEAT_REMOVED,
@@ -105,64 +105,136 @@ static gpointer manager_object = NULL;
G_DEFINE_TYPE (CkManager, ck_manager, G_TYPE_OBJECT)
static void
-remove_pending_job (CkJob *job)
+dump_state_seat_iter (char *id,
+ CkSeat *seat,
+ GKeyFile *key_file)
{
- if (job != NULL) {
- char *command;
-
- command = NULL;
- ck_job_get_command (job, &command);
- g_debug ("Removing pending job: %s", command);
- g_free (command);
-
- ck_job_cancel (job);
- g_object_unref (job);
- }
+ ck_seat_dump (seat, key_file);
}
static void
-_leader_info_free (LeaderInfo *info)
+dump_state_session_iter (char *id,
+ CkSession *session,
+ GKeyFile *key_file)
{
- g_debug ("Freeing leader info: %s", info->ssid);
-
- g_free (info->ssid);
- info->ssid = NULL;
- g_free (info->cookie);
- info->cookie = NULL;
- g_free (info->service_name);
- info->service_name = NULL;
-
- g_free (info);
+ ck_session_dump (session, key_file);
}
static void
-leader_info_cancel (LeaderInfo *info)
+dump_state_leader_iter (char *id,
+ CkSessionLeader *leader,
+ GKeyFile *key_file)
{
- if (info->pending_jobs != NULL) {
- g_list_foreach (info->pending_jobs, (GFunc)remove_pending_job, NULL);
- g_list_free (info->pending_jobs);
- info->pending_jobs = NULL;
+ ck_session_leader_dump (leader, key_file);
+}
+
+static gboolean
+do_dump (CkManager *manager,
+ int fd)
+{
+ char *str;
+ gsize str_len;
+ GKeyFile *key_file;
+ GError *error;
+ gboolean ret;
+
+ str = NULL;
+ error = NULL;
+ ret = FALSE;
+
+ key_file = g_key_file_new ();
+
+ g_hash_table_foreach (manager->priv->seats, (GHFunc) dump_state_seat_iter, key_file);
+ g_hash_table_foreach (manager->priv->sessions, (GHFunc) dump_state_session_iter, key_file);
+ g_hash_table_foreach (manager->priv->leaders, (GHFunc) dump_state_leader_iter, key_file);
+
+ str = g_key_file_to_data (key_file, &str_len, &error);
+ g_key_file_free (key_file);
+ if (str != NULL) {
+ ssize_t written;
+
+ written = 0;
+ while (written < str_len) {
+ ssize_t ret;
+ ret = write (fd, str + written, str_len - written);
+ if (ret < 0) {
+ if (errno == EAGAIN || errno == EINTR) {
+ continue;
+ } else {
+ g_warning ("Error writing state file: %s", strerror (errno));
+ goto out;
+ }
+ }
+ written += ret;
+ }
+ } else {
+ g_warning ("Couldn't construct state file: %s", error->message);
+ g_error_free (error);
}
- info->cancelled = TRUE;
+ ret = TRUE;
+
+out:
+ g_free (str);
+ return ret;
}
static void
-leader_info_unref (LeaderInfo *info)
+ck_manager_dump (CkManager *manager)
{
- /* Probably should use some kind of atomic op here */
- info->refcount -= 1;
- if (info->refcount == 0) {
- _leader_info_free (info);
+ int fd;
+ int res;
+ const char *filename = LOCALSTATEDIR "/run/ConsoleKit/database";
+ const char *filename_tmp = LOCALSTATEDIR "/run/ConsoleKit/database~";
+
+ if (manager == NULL) {
+ return;
}
-}
-static LeaderInfo *
-leader_info_ref (LeaderInfo *info)
-{
- info->refcount += 1;
+ /* always make sure we have a directory */
+ errno = 0;
+ res = g_mkdir_with_parents (LOCALSTATEDIR "/run/ConsoleKit",
+ S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+ if (res < 0) {
+ g_warning ("Unable to create directory %s (%s)",
+ LOCALSTATEDIR "/run/ConsoleKit",
+ g_strerror (errno));
+ return;
+ }
+
+ fd = g_open (filename_tmp, O_CREAT | O_WRONLY, 0600);
+ if (fd == -1) {
+ g_warning ("Cannot create file %s: %s", filename_tmp, g_strerror (errno));
+ goto error;
+ }
+
+ if (! do_dump (manager, fd)) {
+ g_warning ("Cannot write to file %s", filename_tmp);
+ close (fd);
+ goto error;
+ }
+ again:
+ if (close (fd) != 0) {
+ if (errno == EINTR)
+ goto again;
+ else {
+ g_warning ("Cannot close fd for %s: %s", filename_tmp, g_strerror (errno));
+ goto error;
+ }
+ }
- return info;
+ if (g_rename (filename_tmp, filename) != 0) {
+ g_warning ("Cannot rename %s to %s: %s", filename_tmp, filename, g_strerror (errno));
+ goto error;
+ }
+
+ return;
+error:
+ /* For security reasons; unlink the existing file since it
+ contains outdated information */
+ if (g_unlink (filename) != 0) {
+ g_warning ("Cannot unlink %s: %s", filename, g_strerror (errno));
+ }
}
GQuark
@@ -176,6 +248,28 @@ ck_manager_error_quark (void)
return ret;
}
+#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
+
+GType
+ck_manager_error_get_type (void)
+{
+ static GType etype = 0;
+
+ if (etype == 0) {
+ static const GEnumValue values[] = {
+ ENUM_ENTRY (CK_MANAGER_ERROR_GENERAL, "GeneralError"),
+ ENUM_ENTRY (CK_MANAGER_ERROR_NOT_PRIVILEGED, "NotPrivileged"),
+ { 0, 0, 0 }
+ };
+
+ g_assert (CK_MANAGER_NUM_ERRORS == G_N_ELEMENTS (values) - 1);
+
+ etype = g_enum_register_static ("CkManagerError", values);
+ }
+
+ return etype;
+}
+
static guint32
get_next_session_serial (CkManager *manager)
{
@@ -277,6 +371,1140 @@ generate_seat_id (CkManager *manager)
return id;
}
+static const char *
+get_object_id_basename (const char *id)
+{
+ const char *base;
+
+ if (id != NULL && g_str_has_prefix (id, CK_DBUS_PATH "/")) {
+ base = id + strlen (CK_DBUS_PATH "/");
+ } else {
+ base = id;
+ }
+
+ return base;
+}
+
+static void
+log_seat_added_event (CkManager *manager,
+ CkSeat *seat)
+{
+ CkLogEvent event;
+ gboolean res;
+ GError *error;
+ char *sid;
+ CkSeatKind seat_kind;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SEAT_ADDED;
+ g_get_current_time (&event.timestamp);
+
+ sid = NULL;
+ ck_seat_get_id (seat, &sid, NULL);
+ ck_seat_get_kind (seat, &seat_kind, NULL);
+
+ event.event.seat_added.seat_id = (char *)get_object_id_basename (sid);
+ event.event.seat_added.seat_kind = (int)seat_kind;
+
+ error = NULL;
+ res = ck_event_logger_queue_event (manager->priv->logger, &event, &error);
+ if (! res) {
+ g_debug ("Unable to log event: %s", error->message);
+ g_error_free (error);
+ }
+
+ g_free (sid);
+}
+
+static void
+log_seat_removed_event (CkManager *manager,
+ CkSeat *seat)
+{
+ CkLogEvent event;
+ gboolean res;
+ GError *error;
+ char *sid;
+ CkSeatKind seat_kind;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SEAT_REMOVED;
+ g_get_current_time (&event.timestamp);
+
+ sid = NULL;
+ ck_seat_get_id (seat, &sid, NULL);
+ ck_seat_get_kind (seat, &seat_kind, NULL);
+
+ event.event.seat_removed.seat_id = (char *)get_object_id_basename (sid);
+ event.event.seat_removed.seat_kind = (int)seat_kind;
+
+ error = NULL;
+ res = ck_event_logger_queue_event (manager->priv->logger, &event, &error);
+ if (! res) {
+ g_debug ("Unable to log event: %s", error->message);
+ g_error_free (error);
+ }
+
+ g_free (sid);
+}
+
+static void
+log_system_stop_event (CkManager *manager)
+{
+ CkLogEvent event;
+ gboolean res;
+ GError *error;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SYSTEM_STOP;
+ g_get_current_time (&event.timestamp);
+
+ error = NULL;
+ res = ck_event_logger_queue_event (manager->priv->logger, &event, &error);
+ if (! res) {
+ g_debug ("Unable to log event: %s", error->message);
+ g_error_free (error);
+ }
+
+ /* FIXME: in this case we should block and wait for log to flush */
+}
+
+static void
+log_system_restart_event (CkManager *manager)
+{
+ CkLogEvent event;
+ gboolean res;
+ GError *error;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SYSTEM_RESTART;
+ g_get_current_time (&event.timestamp);
+
+ error = NULL;
+ res = ck_event_logger_queue_event (manager->priv->logger, &event, &error);
+ if (! res) {
+ g_debug ("Unable to log event: %s", error->message);
+ g_error_free (error);
+ }
+
+ /* FIXME: in this case we should block and wait for log to flush */
+}
+
+static void
+log_seat_session_added_event (CkManager *manager,
+ CkSeat *seat,
+ const char *ssid)
+{
+ CkLogEvent event;
+ gboolean res;
+ GError *error;
+ char *sid;
+ CkSession *session;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SEAT_SESSION_ADDED;
+ g_get_current_time (&event.timestamp);
+
+ sid = NULL;
+ ck_seat_get_id (seat, &sid, NULL);
+
+ event.event.seat_session_added.seat_id = (char *)get_object_id_basename (sid);
+ event.event.seat_session_added.session_id = (char *)get_object_id_basename (ssid);
+
+ session = g_hash_table_lookup (manager->priv->sessions, ssid);
+ if (session != NULL) {
+ g_object_get (session,
+ "session-type", &event.event.seat_session_added.session_type,
+ "x11-display", &event.event.seat_session_added.session_x11_display,
+ "x11-display-device", &event.event.seat_session_added.session_x11_display_device,
+ "display-device", &event.event.seat_session_added.session_display_device,
+ "remote-host-name", &event.event.seat_session_added.session_remote_host_name,
+ "is-local", &event.event.seat_session_added.session_is_local,
+ "unix-user", &event.event.seat_session_added.session_unix_user,
+ NULL);
+ ck_session_get_creation_time (session, &event.event.seat_session_added.session_creation_time, NULL);
+ g_debug ("Got uid: %u", event.event.seat_session_added.session_unix_user);
+ } else {
+ }
+
+ error = NULL;
+ res = ck_event_logger_queue_event (manager->priv->logger, &event, &error);
+ if (! res) {
+ g_debug ("Unable to log event: %s", error->message);
+ g_error_free (error);
+ }
+
+ g_free (sid);
+
+ g_free (event.event.seat_session_added.session_type);
+ g_free (event.event.seat_session_added.session_x11_display);
+ g_free (event.event.seat_session_added.session_x11_display_device);
+ g_free (event.event.seat_session_added.session_display_device);
+ g_free (event.event.seat_session_added.session_remote_host_name);
+ g_free (event.event.seat_session_added.session_creation_time);
+}
+
+static void
+log_seat_session_removed_event (CkManager *manager,
+ CkSeat *seat,
+ const char *ssid)
+{
+ CkLogEvent event;
+ gboolean res;
+ GError *error;
+ char *sid;
+ CkSession *session;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SEAT_SESSION_REMOVED;
+ g_get_current_time (&event.timestamp);
+
+ sid = NULL;
+ ck_seat_get_id (seat, &sid, NULL);
+
+ event.event.seat_session_removed.seat_id = (char *)get_object_id_basename (sid);
+ event.event.seat_session_removed.session_id = (char *)get_object_id_basename (ssid);
+
+ session = g_hash_table_lookup (manager->priv->sessions, ssid);
+ if (session != NULL) {
+ g_object_get (session,
+ "session-type", &event.event.seat_session_removed.session_type,
+ "x11-display", &event.event.seat_session_removed.session_x11_display,
+ "x11-display-device", &event.event.seat_session_removed.session_x11_display_device,
+ "display-device", &event.event.seat_session_removed.session_display_device,
+ "remote-host-name", &event.event.seat_session_removed.session_remote_host_name,
+ "is-local", &event.event.seat_session_removed.session_is_local,
+ "unix-user", &event.event.seat_session_removed.session_unix_user,
+ NULL);
+ ck_session_get_creation_time (session, &event.event.seat_session_removed.session_creation_time, NULL);
+ g_debug ("Got uid: %u", event.event.seat_session_removed.session_unix_user);
+ }
+
+ error = NULL;
+ res = ck_event_logger_queue_event (manager->priv->logger, &event, &error);
+ if (! res) {
+ g_debug ("Unable to log event: %s", error->message);
+ g_error_free (error);
+ }
+
+ g_free (sid);
+
+ g_free (event.event.seat_session_removed.session_type);
+ g_free (event.event.seat_session_removed.session_x11_display);
+ g_free (event.event.seat_session_removed.session_x11_display_device);
+ g_free (event.event.seat_session_removed.session_display_device);
+ g_free (event.event.seat_session_removed.session_remote_host_name);
+ g_free (event.event.seat_session_removed.session_creation_time);
+}
+
+static void
+log_seat_active_session_changed_event (CkManager *manager,
+ CkSeat *seat,
+ const char *ssid)
+{
+ CkLogEvent event;
+ gboolean res;
+ GError *error;
+ char *sid;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SEAT_ACTIVE_SESSION_CHANGED;
+ g_get_current_time (&event.timestamp);
+
+ sid = NULL;
+ ck_seat_get_id (seat, &sid, NULL);
+
+ event.event.seat_active_session_changed.seat_id = (char *)get_object_id_basename (sid);
+ event.event.seat_active_session_changed.session_id = (char *)get_object_id_basename (ssid);
+
+ error = NULL;
+ res = ck_event_logger_queue_event (manager->priv->logger, &event, &error);
+ if (! res) {
+ g_debug ("Unable to log event: %s", error->message);
+ g_error_free (error);
+ }
+
+ g_free (sid);
+}
+
+static void
+log_seat_device_added_event (CkManager *manager,
+ CkSeat *seat,
+ GValueArray *device)
+{
+ CkLogEvent event;
+ gboolean res;
+ GError *error;
+ char *sid;
+ GValue val_struct = { 0, };
+ char *device_id;
+ char *device_type;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SEAT_DEVICE_ADDED;
+ g_get_current_time (&event.timestamp);
+
+ sid = NULL;
+ device_type = NULL;
+ device_id = NULL;
+
+ ck_seat_get_id (seat, &sid, NULL);
+
+ g_value_init (&val_struct, CK_TYPE_DEVICE);
+ g_value_set_static_boxed (&val_struct, device);
+ res = dbus_g_type_struct_get (&val_struct,
+ 0, &device_type,
+ 1, &device_id,
+ G_MAXUINT);
+
+ event.event.seat_device_added.seat_id = (char *)get_object_id_basename (sid);
+
+ event.event.seat_device_added.device_id = device_id;
+ event.event.seat_device_added.device_type = device_type;
+
+ error = NULL;
+ res = ck_event_logger_queue_event (manager->priv->logger, &event, &error);
+ if (! res) {
+ g_debug ("Unable to log event: %s", error->message);
+ g_error_free (error);
+ }
+
+ g_free (sid);
+ g_free (device_type);
+ g_free (device_id);
+}
+
+static void
+log_seat_device_removed_event (CkManager *manager,
+ CkSeat *seat,
+ GValueArray *device)
+{
+ CkLogEvent event;
+ gboolean res;
+ GError *error;
+ char *sid;
+ GValue val_struct = { 0, };
+ char *device_id;
+ char *device_type;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SEAT_DEVICE_REMOVED;
+ g_get_current_time (&event.timestamp);
+
+ sid = NULL;
+ device_type = NULL;
+ device_id = NULL;
+
+ ck_seat_get_id (seat, &sid, NULL);
+
+ g_value_init (&val_struct, CK_TYPE_DEVICE);
+ g_value_set_static_boxed (&val_struct, device);
+ res = dbus_g_type_struct_get (&val_struct,
+ 0, &device_type,
+ 1, &device_id,
+ G_MAXUINT);
+
+ event.event.seat_device_removed.seat_id = (char *)get_object_id_basename (sid);
+
+ event.event.seat_device_removed.device_id = device_id;
+ event.event.seat_device_removed.device_type = device_type;
+
+ error = NULL;
+ res = ck_event_logger_queue_event (manager->priv->logger, &event, &error);
+ if (! res) {
+ g_debug ("Unable to log event: %s", error->message);
+ g_error_free (error);
+ }
+
+ g_free (sid);
+ g_free (device_type);
+ g_free (device_id);
+}
+
+static char *
+get_cookie_for_pid (CkManager *manager,
+ guint pid)
+{
+ char *cookie;
+
+ /* FIXME: need a better way to get the cookie */
+
+ cookie = ck_unix_pid_get_env (pid, "XDG_SESSION_COOKIE");
+
+ return cookie;
+}
+
+static CkSession *
+get_session_for_unix_process (CkManager *manager,
+ guint pid)
+{
+ CkSessionLeader *leader;
+ CkSession *session;
+ char *cookie;
+
+ session = NULL;
+ leader = NULL;
+
+ cookie = get_cookie_for_pid (manager, pid);
+ if (cookie == NULL) {
+ goto out;
+ }
+
+ leader = g_hash_table_lookup (manager->priv->leaders, cookie);
+ if (leader == NULL) {
+ goto out;
+ }
+
+ session = g_hash_table_lookup (manager->priv->sessions, ck_session_leader_peek_session_id (leader));
+
+ out:
+ g_free (cookie);
+
+ return session;
+}
+
+#ifdef HAVE_POLKIT
+static PolKitSession *
+new_polkit_session_from_session (CkManager *manager,
+ CkSession *ck_session)
+{
+ PolKitSession *pk_session;
+ PolKitSeat *pk_seat;
+ uid_t uid;
+ gboolean is_active;
+ gboolean is_local;
+ char *sid;
+ char *ssid;
+ char *remote_host;
+
+ sid = NULL;
+ ssid = NULL;
+ remote_host = NULL;
+
+ ck_session_get_seat_id (ck_session, &sid, NULL);
+
+ g_object_get (ck_session,
+ "active", &is_active,
+ "is-local", &is_local,
+ "id", &ssid,
+ "unix-user", &uid,
+ "remote-host-name", &remote_host,
+ NULL);
+
+ pk_session = polkit_session_new ();
+ if (pk_session == NULL) {
+ goto out;
+ }
+ if (!polkit_session_set_uid (pk_session, uid)) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ goto out;
+ }
+ if (!polkit_session_set_ck_objref (pk_session, ssid)) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ goto out;
+ }
+ if (!polkit_session_set_ck_is_active (pk_session, is_active)) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ goto out;
+ }
+ if (!polkit_session_set_ck_is_local (pk_session, is_local)) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ goto out;
+ }
+ if (!is_local) {
+ if (!polkit_session_set_ck_remote_host (pk_session, remote_host)) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ goto out;
+ }
+
+ }
+
+
+ pk_seat = polkit_seat_new ();
+ if (pk_seat == NULL) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ goto out;
+ }
+ if (!polkit_seat_set_ck_objref (pk_seat, sid)) {
+ polkit_seat_unref (pk_seat);
+ pk_seat = NULL;
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ goto out;
+ }
+ if (!polkit_seat_validate (pk_seat)) {
+ polkit_seat_unref (pk_seat);
+ pk_seat = NULL;
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ goto out;
+ }
+
+ if (!polkit_session_set_seat (pk_session, pk_seat)) {
+ polkit_seat_unref (pk_seat);
+ pk_seat = NULL;
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ goto out;
+ }
+ polkit_seat_unref (pk_seat); /* session object now owns this object */
+ pk_seat = NULL;
+
+ if (!polkit_session_validate (pk_session)) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ goto out;
+ }
+
+out:
+ g_free (ssid);
+ g_free (sid);
+ g_free (remote_host);
+
+ return pk_session;
+}
+
+static PolKitCaller *
+new_polkit_caller_from_dbus_name (CkManager *manager,
+ const char *dbus_name)
+{
+ PolKitCaller *caller;
+ pid_t pid;
+ uid_t uid;
+ char *selinux_context;
+ PolKitSession *pk_session;
+ DBusMessage *message;
+ DBusMessage *reply;
+ DBusMessageIter iter;
+ DBusMessageIter sub_iter;
+ char *str;
+ int num_elems;
+ DBusConnection *con;
+ DBusError error;
+ CkSession *ck_session;
+
+ dbus_error_init (&error);
+
+ con = dbus_g_connection_get_connection (manager->priv->connection);
+
+ g_return_val_if_fail (con != NULL, NULL);
+ g_return_val_if_fail (dbus_name != NULL, NULL);
+
+ selinux_context = NULL;
+
+ caller = NULL;
+ ck_session = NULL;
+ pk_session = NULL;
+
+ uid = dbus_bus_get_unix_user (con, dbus_name, &error);
+ if (dbus_error_is_set (&error)) {
+ g_warning ("Could not get uid for connection: %s %s",
+ error.name,
+ error.message);
+ dbus_error_free (&error);
+ goto out;
+ }
+
+ message = dbus_message_new_method_call ("org.freedesktop.DBus",
+ "/org/freedesktop/DBus/Bus",
+ "org.freedesktop.DBus",
+ "GetConnectionUnixProcessID");
+ dbus_message_iter_init_append (message, &iter);
+ dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &dbus_name);
+ reply = dbus_connection_send_with_reply_and_block (con, message, -1, &error);
+
+ if (reply == NULL || dbus_error_is_set (&error)) {
+ g_warning ("Error doing GetConnectionUnixProcessID on Bus: %s: %s",
+ error.name,
+ error.message);
+ dbus_message_unref (message);
+ if (reply != NULL) {
+ dbus_message_unref (reply);
+ }
+ dbus_error_free (&error);
+ goto out;
+ }
+ dbus_message_iter_init (reply, &iter);
+ dbus_message_iter_get_basic (&iter, &pid);
+ dbus_message_unref (message);
+ dbus_message_unref (reply);
+
+ message = dbus_message_new_method_call ("org.freedesktop.DBus",
+ "/org/freedesktop/DBus/Bus",
+ "org.freedesktop.DBus",
+ "GetConnectionSELinuxSecurityContext");
+ dbus_message_iter_init_append (message, &iter);
+ dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &dbus_name);
+ reply = dbus_connection_send_with_reply_and_block (con, message, -1, &error);
+ /* SELinux might not be enabled */
+ if (dbus_error_is_set (&error) &&
+ strcmp (error.name, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown") == 0) {
+ dbus_message_unref (message);
+ if (reply != NULL) {
+ dbus_message_unref (reply);
+ }
+ dbus_error_init (&error);
+ } else if (reply == NULL || dbus_error_is_set (&error)) {
+ g_warning ("Error doing GetConnectionSELinuxSecurityContext on Bus: %s: %s", error.name, error.message);
+ dbus_message_unref (message);
+ if (reply != NULL) {
+ dbus_message_unref (reply);
+ }
+ goto out;
+ } else {
+ /* TODO: verify signature */
+ dbus_message_iter_init (reply, &iter);
+ dbus_message_iter_recurse (&iter, &sub_iter);
+ dbus_message_iter_get_fixed_array (&sub_iter, (void *) &str, &num_elems);
+ if (str != NULL && num_elems > 0) {
+ selinux_context = g_strndup (str, num_elems);
+ }
+ dbus_message_unref (message);
+ dbus_message_unref (reply);
+ }
+
+ ck_session = get_session_for_unix_process (manager, pid);
+ if (ck_session == NULL) {
+ /* OK, this is not a catastrophe; just means the caller is not a
+ * member of any session or that ConsoleKit is not available..
+ */
+ goto not_in_session;
+ }
+
+ pk_session = new_polkit_session_from_session (manager, ck_session);
+ if (pk_session == NULL) {
+ g_warning ("Got a session but couldn't construct polkit session object!");
+ goto out;
+ }
+ if (!polkit_session_validate (pk_session)) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ goto out;
+ }
+
+not_in_session:
+
+ caller = polkit_caller_new ();
+ if (caller == NULL) {
+ if (pk_session != NULL) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ }
+ goto out;
+ }
+
+ if (!polkit_caller_set_dbus_name (caller, dbus_name)) {
+ if (pk_session != NULL) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ }
+ polkit_caller_unref (caller);
+ caller = NULL;
+ goto out;
+ }
+ if (!polkit_caller_set_uid (caller, uid)) {
+ if (pk_session != NULL) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ }
+ polkit_caller_unref (caller);
+ caller = NULL;
+ goto out;
+ }
+ if (!polkit_caller_set_pid (caller, pid)) {
+ if (pk_session != NULL) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ }
+ polkit_caller_unref (caller);
+ caller = NULL;
+ goto out;
+ }
+ if (selinux_context != NULL) {
+ if (!polkit_caller_set_selinux_context (caller, selinux_context)) {
+ if (pk_session != NULL) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ }
+ polkit_caller_unref (caller);
+ caller = NULL;
+ goto out;
+ }
+ }
+ if (pk_session != NULL) {
+ if (!polkit_caller_set_ck_session (caller, pk_session)) {
+ if (pk_session != NULL) {
+ polkit_session_unref (pk_session);
+ pk_session = NULL;
+ }
+ polkit_caller_unref (caller);
+ caller = NULL;
+ goto out;
+ }
+ polkit_session_unref (pk_session); /* caller object now own this object */
+ pk_session = NULL;
+ }
+
+ if (!polkit_caller_validate (caller)) {
+ polkit_caller_unref (caller);
+ caller = NULL;
+ goto out;
+ }
+
+out:
+ g_free (selinux_context);
+
+ return caller;
+}
+
+static gboolean
+_check_polkit_for_action (CkManager *manager,
+ DBusGMethodInvocation *context,
+ const char *action)
+{
+ const char *sender;
+ GError *error;
+ DBusError dbus_error;
+ PolKitCaller *pk_caller;
+ PolKitAction *pk_action;
+ PolKitResult pk_result;
+
+ error = NULL;
+
+ g_debug ("constructing polkit data");
+
+ /* Check that caller is privileged */
+ sender = dbus_g_method_get_sender (context);
+ dbus_error_init (&dbus_error);
+
+ pk_caller = new_polkit_caller_from_dbus_name (manager, sender);
+ if (pk_caller == NULL) {
+ error = g_error_new (CK_MANAGER_ERROR,
+ CK_MANAGER_ERROR_GENERAL,
+ "Error getting information about caller: %s: %s",
+ dbus_error.name,
+ dbus_error.message);
+ dbus_error_free (&dbus_error);
+ dbus_g_method_return_error (context, error);
+ g_error_free (error);
+ return FALSE;
+ }
+
+ pk_action = polkit_action_new ();
+ polkit_action_set_action_id (pk_action, action);
+
+ g_debug ("checking if caller %s is authorized", sender);
+
+ /* this version crashes if error is used */
+ pk_result = polkit_context_is_caller_authorized (manager->priv->pol_ctx,
+ pk_action,
+ pk_caller,
+ TRUE,
+ NULL);
+ g_debug ("answer is: %s", (pk_result == POLKIT_RESULT_YES) ? "yes" : "no");
+
+ polkit_caller_unref (pk_caller);
+ polkit_action_unref (pk_action);
+
+ if (pk_result != POLKIT_RESULT_YES) {
+ error = g_error_new (CK_MANAGER_ERROR,
+ CK_MANAGER_ERROR_NOT_PRIVILEGED,
+ "Not privileged for action: %s",
+ action);
+ dbus_error_free (&dbus_error);
+ dbus_g_method_return_error (context, error);
+ g_error_free (error);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+#endif
+
+/* adapted from PolicyKit */
+static gboolean
+get_caller_info (CkManager *manager,
+ const char *sender,
+ uid_t *calling_uid,
+ pid_t *calling_pid)
+{
+ gboolean res;
+ GError *error = NULL;
+
+ res = FALSE;
+
+ if (sender == NULL) {
+ goto out;
+ }
+
+ if (! dbus_g_proxy_call (manager->priv->bus_proxy, "GetConnectionUnixUser", &error,
+ G_TYPE_STRING, sender,
+ G_TYPE_INVALID,
+ G_TYPE_UINT, calling_uid,
+ G_TYPE_INVALID)) {
+ g_debug ("GetConnectionUnixUser() failed: %s", error->message);
+ g_error_free (error);
+ goto out;
+ }
+
+ if (! dbus_g_proxy_call (manager->priv->bus_proxy, "GetConnectionUnixProcessID", &error,
+ G_TYPE_STRING, sender,
+ G_TYPE_INVALID,
+ G_TYPE_UINT, calling_pid,
+ G_TYPE_INVALID)) {
+ g_debug ("GetConnectionUnixProcessID() failed: %s", error->message);
+ g_error_free (error);
+ goto out;
+ }
+
+ res = TRUE;
+
+ g_debug ("uid = %d", *calling_uid);
+ g_debug ("pid = %d", *calling_pid);
+
+out:
+ return res;
+}
+
+static char *
+get_user_name (uid_t uid)
+{
+ struct passwd *pwent;
+ char *name;
+
+ name = NULL;
+
+ pwent = getpwuid (uid);
+
+ if (pwent != NULL) {
+ name = g_strdup (pwent->pw_name);
+ }
+
+ return name;
+}
+
+static gboolean
+session_is_real_user (CkSession *session,
+ char **userp)
+{
+ int uid;
+ char *username;
+ char *session_type;
+ gboolean ret;
+
+ ret = FALSE;
+ session_type = NULL;
+ username = NULL;
+
+ session_type = NULL;
+
+ g_object_get (session,
+ "unix-user", &uid,
+ "session-type", session_type,
+ NULL);
+
+ username = get_user_name (uid);
+
+ /* filter out GDM user */
+ if (username != NULL && strcmp (username, "gdm") == 0) {
+ ret = FALSE;
+ goto out;
+ }
+
+ if (userp != NULL) {
+ *userp = g_strdup (username);
+ }
+
+ ret = TRUE;
+
+ out:
+ g_free (username);
+ g_free (session_type);
+
+ return ret;
+}
+
+static void
+collect_users (const char *ssid,
+ CkSession *session,
+ GHashTable *hash)
+{
+ char *username;
+
+ if (session_is_real_user (session, &username)) {
+ if (username != NULL) {
+ g_hash_table_insert (hash, username, NULL);
+ }
+ }
+}
+
+static guint
+get_system_num_users (CkManager *manager)
+{
+ guint num_users;
+ GHashTable *hash;
+
+ hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+
+ g_hash_table_foreach (manager->priv->sessions, (GHFunc)collect_users, hash);
+
+ num_users = g_hash_table_size (hash);
+
+ g_hash_table_destroy (hash);
+
+ g_debug ("found %u unique users", num_users);
+
+ return num_users;
+}
+
+#ifdef ENABLE_RBAC_SHUTDOWN
+static gboolean
+check_rbac_permissions (CkManager *manager,
+ DBusGMethodInvocation *context)
+{
+ const char *sender;
+ char *username;
+ gboolean res;
+ uid_t uid;
+ pid_t pid;
+
+ username = NULL;
+ sender = dbus_g_method_get_sender (context);
+ res = get_caller_info (manager,
+ sender,
+ &uid,
+ &pid);
+ if (!res) {
+ goto out;
+ }
+
+ username = get_user_name (uid);
+
+ if (username == NULL ||
+ !chkauthattr (RBAC_SHUTDOWN_KEY, username)) {
+ res = FALSE;
+ goto out;
+ }
+
+out:
+
+ if (res == TRUE) {
+ g_debug ("User %s has RBAC permission to stop/restart", username);
+ } else {
+ g_debug ("User %s does not have RBAC permission to stop/restart", username);
+ }
+
+ g_free (username);
+ return res;
+}
+#endif
+
+/*
+ Example:
+ dbus-send --system --dest=org.freedesktop.ConsoleKit \
+ --type=method_call --print-reply --reply-timeout=2000 \
+ /org/freedesktop/ConsoleKit/Manager \
+ org.freedesktop.ConsoleKit.Manager.Restart
+*/
+gboolean
+ck_manager_restart (CkManager *manager,
+ DBusGMethodInvocation *context)
+{
+ gboolean ret;
+ gboolean res;
+ const char *action;
+ GError *error;
+
+ ret = FALSE;
+
+ if (get_system_num_users (manager) > 1) {
+ action = "org.freedesktop.consolekit.system.restart-multiple-users";
+ } else {
+ action = "org.freedesktop.consolekit.system.restart";
+ }
+
+ g_debug ("ConsoleKit Restart: %s", action);
+
+#ifdef HAVE_POLKIT
+ res = _check_polkit_for_action (manager, context, action);
+ if (! res) {
+ goto out;
+ }
+#endif
+
+#ifdef ENABLE_RBAC_SHUTDOWN
+ if (! check_rbac_permissions (manager, context)) {
+ goto out;
+ }
+#endif
+
+ g_debug ("ConsoleKit preforming Restart: %s", action);
+
+ log_system_restart_event (manager);
+
+ error = NULL;
+ res = g_spawn_command_line_async (LIBDIR "/ConsoleKit/scripts/ck-system-restart",
+ &error);
+ if (! res) {
+ GError *new_error;
+
+ g_warning ("Unable to restart system: %s", error->message);
+
+ new_error = g_error_new (CK_MANAGER_ERROR,
+ CK_MANAGER_ERROR_GENERAL,
+ "Unable to restart system: %s", error->message);
+ dbus_g_method_return_error (context, new_error);
+ g_error_free (new_error);
+
+ g_error_free (error);
+ } else {
+ ret = TRUE;
+ dbus_g_method_return (context);
+ }
+
+ out:
+
+ return ret;
+}
+
+gboolean
+ck_manager_stop (CkManager *manager,
+ DBusGMethodInvocation *context)
+{
+ gboolean ret;
+ gboolean res;
+ const char *action;
+ GError *error;
+
+ ret = TRUE;
+
+ if (get_system_num_users (manager) > 1) {
+ action = "org.freedesktop.consolekit.system.stop-multiple-users";
+ } else {
+ action = "org.freedesktop.consolekit.system.stop";
+ }
+
+#ifdef HAVE_POLKIT
+ res = _check_polkit_for_action (manager, context, action);
+ if (! res) {
+ goto out;
+ }
+#endif
+
+#ifdef ENABLE_RBAC_SHUTDOWN
+ if (!check_rbac_permissions (manager, context))
+ goto out;
+#endif
+
+ g_debug ("Stopping system");
+
+ log_system_stop_event (manager);
+
+ error = NULL;
+ res = g_spawn_command_line_async (LIBDIR "/ConsoleKit/scripts/ck-system-stop",
+ &error);
+ if (! res) {
+ GError *new_error;
+
+ g_warning ("Unable to stop system: %s", error->message);
+
+ new_error = g_error_new (CK_MANAGER_ERROR,
+ CK_MANAGER_ERROR_GENERAL,
+ "Unable to stop system: %s", error->message);
+ dbus_g_method_return_error (context, new_error);
+ g_error_free (new_error);
+
+ g_error_free (error);
+ } else {
+ ret = TRUE;
+ dbus_g_method_return (context);
+ }
+
+ out:
+ return ret;
+}
+
+static void
+on_seat_active_session_changed (CkSeat *seat,
+ const char *ssid,
+ CkManager *manager)
+{
+ ck_manager_dump (manager);
+ log_seat_active_session_changed_event (manager, seat, ssid);
+}
+
+static void
+on_seat_session_added (CkSeat *seat,
+ const char *ssid,
+ CkManager *manager)
+{
+ ck_manager_dump (manager);
+ log_seat_session_added_event (manager, seat, ssid);
+}
+
+static void
+on_seat_session_removed (CkSeat *seat,
+ const char *ssid,
+ CkManager *manager)
+{
+ ck_manager_dump (manager);
+ log_seat_session_removed_event (manager, seat, ssid);
+}
+
+static void
+on_seat_device_added (CkSeat *seat,
+ GValueArray *device,
+ CkManager *manager)
+{
+ ck_manager_dump (manager);
+ log_seat_device_added_event (manager, seat, device);
+}
+
+static void
+on_seat_device_removed (CkSeat *seat,
+ GValueArray *device,
+ CkManager *manager)
+{
+ ck_manager_dump (manager);
+ log_seat_device_removed_event (manager, seat, device);
+}
+
+static void
+connect_seat_signals (CkManager *manager,
+ CkSeat *seat)
+{
+ g_signal_connect (seat, "active-session-changed", G_CALLBACK (on_seat_active_session_changed), manager);
+ g_signal_connect (seat, "session-added", G_CALLBACK (on_seat_session_added), manager);
+ g_signal_connect (seat, "session-removed", G_CALLBACK (on_seat_session_removed), manager);
+ g_signal_connect (seat, "device-added", G_CALLBACK (on_seat_device_added), manager);
+ g_signal_connect (seat, "device-removed", G_CALLBACK (on_seat_device_removed), manager);
+}
+
+static void
+disconnect_seat_signals (CkManager *manager,
+ CkSeat *seat)
+{
+ g_signal_handlers_disconnect_by_func (seat, on_seat_active_session_changed, manager);
+ g_signal_handlers_disconnect_by_func (seat, on_seat_session_added, manager);
+ g_signal_handlers_disconnect_by_func (seat, on_seat_session_removed, manager);
+ g_signal_handlers_disconnect_by_func (seat, on_seat_device_added, manager);
+ g_signal_handlers_disconnect_by_func (seat, on_seat_device_removed, manager);
+}
+
static CkSeat *
add_new_seat (CkManager *manager,
CkSeatKind kind)
@@ -293,12 +1521,18 @@ add_new_seat (CkManager *manager,
goto out;
}
+ connect_seat_signals (manager, seat);
+
g_hash_table_insert (manager->priv->seats, sid, seat);
g_debug ("Added seat: %s kind:%d", sid, kind);
+ ck_manager_dump (manager);
+
g_signal_emit (manager, signals [SEAT_ADDED], 0, sid);
+ log_seat_added_event (manager, seat);
+
out:
return seat;
}
@@ -307,19 +1541,49 @@ static void
remove_seat (CkManager *manager,
CkSeat *seat)
{
- char *sid;
+ char *sid;
+ char *orig_sid;
+ CkSeat *orig_seat;
+ gboolean res;
sid = NULL;
ck_seat_get_id (seat, &sid, NULL);
+ /* Need to get the original key/value */
+ res = g_hash_table_lookup_extended (manager->priv->seats,
+ sid,
+ (gpointer *)&orig_sid,
+ (gpointer *)&orig_seat);
+ if (! res) {
+ g_debug ("Seat %s is not attached", sid);
+ goto out;
+ }
+
+ /* Remove the seat from the list but don't call
+ * unref until the signal is emitted */
+ g_hash_table_steal (manager->priv->seats, sid);
+
+ disconnect_seat_signals (manager, orig_seat);
+
if (sid != NULL) {
g_hash_table_remove (manager->priv->seats, sid);
}
+ ck_manager_dump (manager);
+
+ g_debug ("Emitting seat-removed: %s", sid);
g_signal_emit (manager, signals [SEAT_REMOVED], 0, sid);
+ log_seat_removed_event (manager, orig_seat);
+
g_debug ("Removed seat: %s", sid);
+ if (orig_seat != NULL) {
+ g_object_unref (orig_seat);
+ }
+ g_free (orig_sid);
+
+ out:
g_free (sid);
}
@@ -384,51 +1648,6 @@ find_seat_for_session (CkManager *manager,
return seat;
}
-/* adapted from PolicyKit */
-static gboolean
-get_caller_info (CkManager *manager,
- const char *sender,
- uid_t *calling_uid,
- pid_t *calling_pid)
-{
- gboolean res;
- GError *error = NULL;
-
- res = FALSE;
-
- if (sender == NULL) {
- goto out;
- }
-
- if (! dbus_g_proxy_call (manager->priv->bus_proxy, "GetConnectionUnixUser", &error,
- G_TYPE_STRING, sender,
- G_TYPE_INVALID,
- G_TYPE_UINT, calling_uid,
- G_TYPE_INVALID)) {
- g_debug ("GetConnectionUnixUser() failed: %s", error->message);
- g_error_free (error);
- goto out;
- }
-
- if (! dbus_g_proxy_call (manager->priv->bus_proxy, "GetConnectionUnixProcessID", &error,
- G_TYPE_STRING, sender,
- G_TYPE_INVALID,
- G_TYPE_UINT, calling_pid,
- G_TYPE_INVALID)) {
- g_debug ("GetConnectionUnixProcessID() failed: %s", error->message);
- g_error_free (error);
- goto out;
- }
-
- res = TRUE;
-
- g_debug ("uid = %d", *calling_uid);
- g_debug ("pid = %d", *calling_pid);
-
-out:
- return res;
-}
-
static gboolean
manager_set_system_idle_hint (CkManager *manager,
gboolean idle_hint)
@@ -552,16 +1771,21 @@ ck_manager_get_system_idle_since_hint (CkManager *manager,
}
static void
-open_session_for_leader_info (CkManager *manager,
- LeaderInfo *leader_info,
- const GPtrArray *parameters,
- DBusGMethodInvocation *context)
+open_session_for_leader (CkManager *manager,
+ CkSessionLeader *leader,
+ const GPtrArray *parameters,
+ DBusGMethodInvocation *context)
{
CkSession *session;
CkSeat *seat;
+ const char *ssid;
+ const char *cookie;
+
+ ssid = ck_session_leader_peek_session_id (leader);
+ cookie = ck_session_leader_peek_cookie (leader);
- session = ck_session_new_with_parameters (leader_info->ssid,
- leader_info->cookie,
+ session = ck_session_new_with_parameters (ssid,
+ cookie,
parameters);
if (session == NULL) {
@@ -576,7 +1800,9 @@ open_session_for_leader_info (CkManager *manager,
return;
}
- g_hash_table_insert (manager->priv->sessions, g_strdup (leader_info->ssid), g_object_ref (session));
+ g_hash_table_insert (manager->priv->sessions,
+ g_strdup (ssid),
+ g_object_ref (session));
/* Add to seat */
seat = find_seat_for_session (manager, session);
@@ -597,247 +1823,55 @@ open_session_for_leader_info (CkManager *manager,
g_object_unref (session);
- dbus_g_method_return (context, leader_info->cookie);
+ dbus_g_method_return (context, cookie);
}
static void
-verify_and_open_session_for_leader_info (CkManager *manager,
- LeaderInfo *leader_info,
- const GPtrArray *parameters,
- DBusGMethodInvocation *context)
+verify_and_open_session_for_leader (CkManager *manager,
+ CkSessionLeader *leader,
+ const GPtrArray *parameters,
+ DBusGMethodInvocation *context)
{
/* for now don't bother verifying since we protect OpenSessionWithParameters */
- open_session_for_leader_info (manager,
- leader_info,
- parameters,
- context);
-}
-
-static void
-add_param_int (GPtrArray *parameters,
- const char *key,
- const char *value)
-{
- GValue val = { 0, };
- GValue param_val = { 0, };
- int num;
-
- num = atoi (value);
-
- g_value_init (&val, G_TYPE_INT);
- g_value_set_int (&val, num);
- g_value_init (&param_val, CK_TYPE_PARAMETER_STRUCT);
- g_value_take_boxed (&param_val,
- dbus_g_type_specialized_construct (CK_TYPE_PARAMETER_STRUCT));
- dbus_g_type_struct_set (&param_val,
- 0, key,
- 1, &val,
- G_MAXUINT);
- g_value_unset (&val);
-
- g_ptr_array_add (parameters, g_value_get_boxed (&param_val));
-}
-
-static void
-add_param_boolean (GPtrArray *parameters,
- const char *key,
- const char *value)
-{
- GValue val = { 0, };
- GValue param_val = { 0, };
- gboolean b;
-
- if (value != NULL && strcmp (value, "true") == 0) {
- b = TRUE;
- } else {
- b = FALSE;
- }
-
- g_value_init (&val, G_TYPE_BOOLEAN);
- g_value_set_boolean (&val, b);
- g_value_init (&param_val, CK_TYPE_PARAMETER_STRUCT);
- g_value_take_boxed (&param_val,
- dbus_g_type_specialized_construct (CK_TYPE_PARAMETER_STRUCT));
- dbus_g_type_struct_set (&param_val,
- 0, key,
- 1, &val,
- G_MAXUINT);
- g_value_unset (&val);
-
- g_ptr_array_add (parameters, g_value_get_boxed (&param_val));
+ open_session_for_leader (manager,
+ leader,
+ parameters,
+ context);
}
static void
-add_param_string (GPtrArray *parameters,
- const char *key,
- const char *value)
-{
- GValue val = { 0, };
- GValue param_val = { 0, };
-
- g_value_init (&val, G_TYPE_STRING);
- g_value_set_string (&val, value);
-
- g_value_init (&param_val, CK_TYPE_PARAMETER_STRUCT);
- g_value_take_boxed (&param_val,
- dbus_g_type_specialized_construct (CK_TYPE_PARAMETER_STRUCT));
-
- dbus_g_type_struct_set (&param_val,
- 0, key,
- 1, &val,
- G_MAXUINT);
- g_value_unset (&val);
-
- g_ptr_array_add (parameters, g_value_get_boxed (&param_val));
-}
-
-typedef void (* CkAddParamFunc) (GPtrArray *arr,
- const char *key,
- const char *value);
-
-static struct {
- char *key;
- CkAddParamFunc func;
-} parse_ops[] = {
- { "display-device", add_param_string },
- { "x11-display-device", add_param_string },
- { "x11-display", add_param_string },
- { "remote-host-name", add_param_string },
- { "session-type", add_param_string },
- { "is-local", add_param_boolean },
- { "unix-user", add_param_int },
-};
-
-static GPtrArray *
-parse_output (const char *output)
+collect_parameters_cb (CkSessionLeader *leader,
+ GPtrArray *parameters,
+ DBusGMethodInvocation *context,
+ CkManager *manager)
{
- GPtrArray *parameters;
- char **lines;
- int i;
- int j;
-
- lines = g_strsplit (output, "\n", -1);
- if (lines == NULL) {
- return NULL;
- }
-
- parameters = g_ptr_array_sized_new (10);
-
- for (i = 0; lines[i] != NULL; i++) {
- char **vals;
-
- vals = g_strsplit (lines[i], " = ", 2);
- if (vals == NULL || vals[0] == NULL) {
- g_strfreev (vals);
- continue;
- }
-
- for (j = 0; j < G_N_ELEMENTS (parse_ops); j++) {
- if (strcmp (vals[0], parse_ops[j].key) == 0) {
- parse_ops[j].func (parameters, vals[0], vals[1]);
- break;
- }
- }
- g_strfreev (vals);
- }
-
- g_strfreev (lines);
-
- return parameters;
-}
-
-typedef struct {
- CkManager *manager;
- LeaderInfo *leader_info;
- DBusGMethodInvocation *context;
-} JobData;
-
-static void
-job_data_free (JobData *data)
-{
- leader_info_unref (data->leader_info);
- g_free (data);
-}
-
-static void
-parameters_free (GPtrArray *parameters)
-{
- int i;
-
- for (i = 0; i < parameters->len; i++) {
- gpointer data;
- data = g_ptr_array_index (parameters, i);
- if (data != NULL) {
- g_boxed_free (CK_TYPE_PARAMETER_STRUCT, data);
- }
- }
-
- g_ptr_array_free (parameters, TRUE);
-}
-
-static void
-job_completed (CkJob *job,
- int status,
- JobData *data)
-{
- g_debug ("Job status: %d", status);
- if (status == 0) {
- char *output;
- GPtrArray *parameters;
-
- output = NULL;
- ck_job_get_stdout (job, &output);
- g_debug ("Job output: %s", output);
-
- parameters = parse_output (output);
- g_free (output);
-
- verify_and_open_session_for_leader_info (data->manager,
- data->leader_info,
- parameters,
- data->context);
- parameters_free (parameters);
+ if (parameters == NULL) {
+ GError *error;
+ error = g_error_new (CK_MANAGER_ERROR,
+ CK_MANAGER_ERROR_GENERAL,
+ "Unable to get information about the calling process");
+ dbus_g_method_return_error (context, error);
+ g_error_free (error);
+ return;
}
- /* remove job from queue */
- data->leader_info->pending_jobs = g_list_remove (data->leader_info->pending_jobs, job);
-
- g_signal_handlers_disconnect_by_func (job, job_completed, data);
- g_object_unref (job);
+ verify_and_open_session_for_leader (manager,
+ leader,
+ parameters,
+ context);
}
static void
-generate_session_for_leader_info (CkManager *manager,
- LeaderInfo *leader_info,
- DBusGMethodInvocation *context)
+generate_session_for_leader (CkManager *manager,
+ CkSessionLeader *leader,
+ DBusGMethodInvocation *context)
{
- GError *local_error;
- char *command;
- gboolean res;
- CkJob *job;
- JobData *data;
-
- command = g_strdup_printf ("%s --uid %u --pid %u",
- LIBEXECDIR "/ck-collect-session-info",
- leader_info->uid,
- leader_info->pid);
- job = ck_job_new ();
- ck_job_set_command (job, command);
- g_free (command);
-
- data = g_new0 (JobData, 1);
- data->manager = manager;
- data->leader_info = leader_info_ref (leader_info);
- data->context = context;
- g_signal_connect_data (job,
- "completed",
- G_CALLBACK (job_completed),
- data,
- (GClosureNotify)job_data_free,
- 0);
+ gboolean res;
- local_error = NULL;
- res = ck_job_execute (job, &local_error);
+ res = ck_session_leader_collect_parameters (leader,
+ context,
+ (CkSessionLeaderDoneFunc)collect_parameters_cb,
+ manager);
if (! res) {
GError *error;
error = g_error_new (CK_MANAGER_ERROR,
@@ -845,19 +1879,7 @@ generate_session_for_leader_info (CkManager *manager,
"Unable to get information about the calling process");
dbus_g_method_return_error (context, error);
g_error_free (error);
-
- if (local_error != NULL) {
- g_debug ("stat on pid %d failed: %s", leader_info->pid, local_error->message);
- g_error_free (local_error);
- }
-
- g_object_unref (job);
-
- return;
}
-
- /* Add job to queue */
- leader_info->pending_jobs = g_list_prepend (leader_info->pending_jobs, job);
}
static gboolean
@@ -866,12 +1888,14 @@ create_session_for_sender (CkManager *manager,
const GPtrArray *parameters,
DBusGMethodInvocation *context)
{
- pid_t pid;
- uid_t uid;
- gboolean res;
- char *cookie;
- char *ssid;
- LeaderInfo *leader_info;
+ pid_t pid;
+ uid_t uid;
+ gboolean res;
+ char *cookie;
+ char *ssid;
+ CkSessionLeader *leader;
+
+ g_debug ("CkManager: create session for sender: %s", sender);
res = get_caller_info (manager,
sender,
@@ -892,27 +1916,27 @@ create_session_for_sender (CkManager *manager,
g_debug ("Creating new session ssid: %s", ssid);
- leader_info = g_new0 (LeaderInfo, 1);
- leader_info->uid = uid;
- leader_info->pid = pid;
- leader_info->service_name = g_strdup (sender);
- leader_info->ssid = g_strdup (ssid);
- leader_info->cookie = g_strdup (cookie);
+ leader = ck_session_leader_new ();
+ ck_session_leader_set_uid (leader, uid);
+ ck_session_leader_set_pid (leader, pid);
+ ck_session_leader_set_service_name (leader, sender);
+ ck_session_leader_set_session_id (leader, ssid);
+ ck_session_leader_set_cookie (leader, cookie);
/* need to store the leader info first so the pending request can be revoked */
g_hash_table_insert (manager->priv->leaders,
- g_strdup (leader_info->cookie),
- leader_info_ref (leader_info));
+ g_strdup (cookie),
+ g_object_ref (leader));
if (parameters == NULL) {
- generate_session_for_leader_info (manager,
- leader_info,
- context);
+ generate_session_for_leader (manager,
+ leader,
+ context);
} else {
- verify_and_open_session_for_leader_info (manager,
- leader_info,
- parameters,
- context);
+ verify_and_open_session_for_leader (manager,
+ leader,
+ parameters,
+ context);
}
g_free (cookie);
@@ -933,18 +1957,20 @@ ck_manager_get_session_for_cookie (CkManager *manager,
const char *cookie,
DBusGMethodInvocation *context)
{
- gboolean res;
- char *sender;
- uid_t calling_uid;
- pid_t calling_pid;
- CkProcessStat *stat;
- char *ssid;
- CkSession *session;
- LeaderInfo *leader_info;
- GError *local_error;
+ gboolean res;
+ char *sender;
+ uid_t calling_uid;
+ pid_t calling_pid;
+ CkProcessStat *stat;
+ char *ssid;
+ CkSession *session;
+ CkSessionLeader *leader;
+ GError *local_error;
ssid = NULL;
+ g_debug ("CkManager: get session for cookie");
+
sender = dbus_g_method_get_sender (context);
res = get_caller_info (manager,
@@ -984,8 +2010,8 @@ ck_manager_get_session_for_cookie (CkManager *manager,
/* FIXME: should we restrict this by uid? */
ck_process_stat_free (stat);
- leader_info = g_hash_table_lookup (manager->priv->leaders, cookie);
- if (leader_info == NULL) {
+ leader = g_hash_table_lookup (manager->priv->leaders, cookie);
+ if (leader == NULL) {
GError *error;
error = g_error_new (CK_MANAGER_ERROR,
CK_MANAGER_ERROR_GENERAL,
@@ -995,7 +2021,7 @@ ck_manager_get_session_for_cookie (CkManager *manager,
return FALSE;
}
- session = g_hash_table_lookup (manager->priv->sessions, leader_info->ssid);
+ session = g_hash_table_lookup (manager->priv->sessions, ck_session_leader_peek_session_id (leader));
if (session == NULL) {
GError *error;
error = g_error_new (CK_MANAGER_ERROR,
@@ -1015,19 +2041,6 @@ ck_manager_get_session_for_cookie (CkManager *manager,
return TRUE;
}
-static char *
-get_cookie_for_pid (CkManager *manager,
- guint pid)
-{
- char *cookie;
-
- /* FIXME: need a better way to get the cookie */
-
- cookie = ck_unix_pid_get_env (pid, "XDG_SESSION_COOKIE");
-
- return cookie;
-}
-
/*
Example:
dbus-send --system --dest=org.freedesktop.ConsoleKit \
@@ -1044,12 +2057,12 @@ ck_manager_get_session_for_unix_process (CkManager *manager,
char *sender;
uid_t calling_uid;
pid_t calling_pid;
- CkProcessStat *stat;
char *cookie;
- GError *error;
sender = dbus_g_method_get_sender (context);
+ g_debug ("CkManager: get session for unix process: %u", pid);
+
res = get_caller_info (manager,
sender,
&calling_uid,
@@ -1066,27 +2079,12 @@ ck_manager_get_session_for_unix_process (CkManager *manager,
return FALSE;
}
- error = NULL;
- res = ck_process_stat_new_for_unix_pid (calling_pid, &stat, &error);
- if (! res) {
- GError *error;
- g_debug ("stat on pid %d failed", calling_pid);
- error = g_error_new (CK_MANAGER_ERROR,
- CK_MANAGER_ERROR_GENERAL,
- _("Unable to lookup information about calling process '%d'"),
- calling_pid);
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return FALSE;
- }
-
- /* FIXME: check stuff? */
-
- ck_process_stat_free (stat);
-
cookie = get_cookie_for_pid (manager, pid);
if (cookie == NULL) {
GError *error;
+
+ g_debug ("CkManager: unable to lookup session for unix process: %u", pid);
+
error = g_error_new (CK_MANAGER_ERROR,
CK_MANAGER_ERROR_GENERAL,
_("Unable to lookup session information for process '%d'"),
@@ -1120,6 +2118,8 @@ ck_manager_get_current_session (CkManager *manager,
sender = dbus_g_method_get_sender (context);
+ g_debug ("CkManager: get current session");
+
res = get_caller_info (manager,
sender,
&calling_uid,
@@ -1175,43 +2175,59 @@ remove_session_for_cookie (CkManager *manager,
const char *cookie,
GError **error)
{
- CkSession *session;
- LeaderInfo *leader_info;
- char *ssid;
- char *sid;
+ CkSession *orig_session;
+ char *orig_ssid;
+ CkSessionLeader *leader;
+ char *sid;
+ gboolean res;
+ gboolean ret;
+
+ ret = FALSE;
+ orig_ssid = NULL;
+ orig_session = NULL;
g_debug ("Removing session for cookie: %s", cookie);
- leader_info = g_hash_table_lookup (manager->priv->leaders, cookie);
+ leader = g_hash_table_lookup (manager->priv->leaders, cookie);
- if (leader_info == NULL) {
+ if (leader == NULL) {
g_set_error (error,
CK_MANAGER_ERROR,
CK_MANAGER_ERROR_GENERAL,
"Unable to find session for cookie");
- return FALSE;
+ goto out;
}
- session = g_hash_table_lookup (manager->priv->sessions, leader_info->ssid);
- if (session == NULL) {
+ /* Need to get the original key/value */
+ res = g_hash_table_lookup_extended (manager->priv->sessions,
+ ck_session_leader_peek_session_id (leader),
+ (gpointer *)&orig_ssid,
+ (gpointer *)&orig_session);
+ if (! res) {
g_set_error (error,
CK_MANAGER_ERROR,
CK_MANAGER_ERROR_GENERAL,
"Unable to find session for cookie");
- return FALSE;
+ goto out;
}
- ssid = g_strdup (leader_info->ssid);
+ /* Must keep a reference to the session in the manager until
+ * all events for seats are cleared. So don't remove
+ * or steal the session from the master list until
+ * it is removed from all seats. Otherwise, event logging
+ * for seat removals doesn't work.
+ */
/* remove from seat */
- ck_session_get_seat_id (session, &sid, NULL);
+ sid = NULL;
+ ck_session_get_seat_id (orig_session, &sid, NULL);
if (sid != NULL) {
CkSeat *seat;
seat = g_hash_table_lookup (manager->priv->seats, sid);
if (seat != NULL) {
CkSeatKind kind;
- ck_seat_remove_session (seat, session, NULL);
+ ck_seat_remove_session (seat, orig_session, NULL);
kind = CK_SEAT_KIND_STATIC;
/* if dynamic seat has no sessions then remove it */
@@ -1221,15 +2237,25 @@ remove_session_for_cookie (CkManager *manager,
}
}
}
+ g_free (sid);
- g_hash_table_remove (manager->priv->sessions, ssid);
+ /* Remove the session from the list but don't call
+ * unref until we are done with it */
+ g_hash_table_steal (manager->priv->sessions,
+ ck_session_leader_peek_session_id (leader));
- g_free (sid);
- g_free (ssid);
+ ck_manager_dump (manager);
manager_update_system_idle_hint (manager);
- return TRUE;
+ ret = TRUE;
+ out:
+ if (orig_session != NULL) {
+ g_object_unref (orig_session);
+ }
+ g_free (orig_ssid);
+
+ return ret;
}
static gboolean
@@ -1239,7 +2265,7 @@ paranoia_check_is_cookie_owner (CkManager *manager,
pid_t calling_pid,
GError **error)
{
- LeaderInfo *leader_info;
+ CkSessionLeader *leader;
if (cookie == NULL) {
g_set_error (error,
@@ -1249,8 +2275,8 @@ paranoia_check_is_cookie_owner (CkManager *manager,
return FALSE;
}
- leader_info = g_hash_table_lookup (manager->priv->leaders, cookie);
- if (leader_info == NULL) {
+ leader = g_hash_table_lookup (manager->priv->leaders, cookie);
+ if (leader == NULL) {
g_set_error (error,
CK_MANAGER_ERROR,
CK_MANAGER_ERROR_GENERAL,
@@ -1258,7 +2284,7 @@ paranoia_check_is_cookie_owner (CkManager *manager,
return FALSE;
}
- if (leader_info->uid != calling_uid) {
+ if (ck_session_leader_get_uid (leader) != calling_uid) {
g_set_error (error,
CK_MANAGER_ERROR,
CK_MANAGER_ERROR_GENERAL,
@@ -1268,7 +2294,7 @@ paranoia_check_is_cookie_owner (CkManager *manager,
}
/* do we want to restrict to the same process? */
- if (leader_info->pid != calling_pid) {
+ if (ck_session_leader_get_pid (leader) != calling_pid) {
g_set_error (error,
CK_MANAGER_ERROR,
CK_MANAGER_ERROR_GENERAL,
@@ -1341,15 +2367,18 @@ typedef struct {
static gboolean
remove_leader_for_connection (const char *cookie,
- LeaderInfo *info,
+ CkSessionLeader *leader,
RemoveLeaderData *data)
{
- g_assert (info != NULL);
+ const char *name;
+
+ g_assert (leader != NULL);
g_assert (data->service_name != NULL);
- if (strcmp (info->service_name, data->service_name) == 0) {
+ name = ck_session_leader_peek_service_name (leader);
+ if (strcmp (name, data->service_name) == 0) {
remove_session_for_cookie (data->manager, cookie, NULL);
- leader_info_cancel (info);
+ ck_session_leader_cancel (leader);
return TRUE;
}
@@ -1389,11 +2418,65 @@ bus_name_owner_changed (DBusGProxy *bus_proxy,
service_name, old_service_name, new_service_name);
}
+#ifdef HAVE_POLKIT
+static gboolean
+pk_io_watch_have_data (GIOChannel *channel,
+ GIOCondition condition,
+ gpointer user_data)
+{
+ int fd;
+ PolKitContext *pk_context = user_data;
+
+ fd = g_io_channel_unix_get_fd (channel);
+ polkit_context_io_func (pk_context, fd);
+ return TRUE;
+}
+
+static int
+pk_io_add_watch (PolKitContext *pk_context,
+ int fd)
+{
+ guint id = 0;
+ GIOChannel *channel;
+
+ channel = g_io_channel_unix_new (fd);
+ if (channel == NULL) {
+ goto out;
+ }
+
+ id = g_io_add_watch (channel, G_IO_IN, pk_io_watch_have_data, pk_context);
+ if (id == 0) {
+ g_io_channel_unref (channel);
+ goto out;
+ }
+ g_io_channel_unref (channel);
+
+out:
+ return id;
+}
+
+static void
+pk_io_remove_watch (PolKitContext *pk_context,
+ int watch_id)
+{
+ g_source_remove (watch_id);
+}
+#endif
+
static gboolean
register_manager (CkManager *manager)
{
GError *error = NULL;
+#ifdef HAVE_POLKIT
+ manager->priv->pol_ctx = polkit_context_new ();
+ polkit_context_set_io_watch_functions (manager->priv->pol_ctx, pk_io_add_watch, pk_io_remove_watch);
+ if (! polkit_context_init (manager->priv->pol_ctx, NULL)) {
+ g_critical ("cannot initialize libpolkit");
+ return FALSE;
+ }
+#endif
+
error = NULL;
manager->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (manager->priv->connection == NULL) {
@@ -1464,6 +2547,7 @@ ck_manager_class_init (CkManagerClass *klass)
1, G_TYPE_BOOLEAN);
dbus_g_object_type_install_info (CK_TYPE_MANAGER, &dbus_glib_ck_manager_object_info);
+ dbus_g_error_domain_register (CK_MANAGER_ERROR, NULL, CK_MANAGER_TYPE_ERROR);
g_type_class_add_private (klass, sizeof (CkManagerPrivate));
}
@@ -1547,6 +2631,31 @@ ck_manager_get_seats (CkManager *manager,
}
static void
+listify_session_ids (char *id,
+ CkSession *session,
+ GPtrArray **array)
+{
+ g_ptr_array_add (*array, g_strdup (id));
+}
+
+gboolean
+ck_manager_get_sessions (CkManager *manager,
+ GPtrArray **sessions,
+ GError **error)
+{
+ g_return_val_if_fail (CK_IS_MANAGER (manager), FALSE);
+
+ if (sessions == NULL) {
+ return FALSE;
+ }
+
+ *sessions = g_ptr_array_new ();
+ g_hash_table_foreach (manager->priv->sessions, (GHFunc)listify_session_ids, sessions);
+
+ return TRUE;
+}
+
+static void
add_seat_for_file (CkManager *manager,
const char *filename)
{
@@ -1562,11 +2671,17 @@ add_seat_for_file (CkManager *manager,
return;
}
+ connect_seat_signals (manager, seat);
+
g_hash_table_insert (manager->priv->seats, sid, seat);
g_debug ("Added seat: %s", sid);
+ ck_manager_dump (manager);
+
g_signal_emit (manager, signals [SEAT_ADDED], 0, sid);
+
+ log_seat_added_event (manager, seat);
}
static gboolean
@@ -1627,7 +2742,9 @@ ck_manager_init (CkManager *manager)
manager->priv->leaders = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,
- (GDestroyNotify) leader_info_unref);
+ (GDestroyNotify) g_object_unref);
+
+ manager->priv->logger = ck_event_logger_new (LOG_FILE);
create_seats (manager);
}
@@ -1647,7 +2764,13 @@ ck_manager_finalize (GObject *object)
g_hash_table_destroy (manager->priv->seats);
g_hash_table_destroy (manager->priv->sessions);
g_hash_table_destroy (manager->priv->leaders);
- g_object_unref (manager->priv->bus_proxy);
+ if (manager->priv->bus_proxy != NULL) {
+ g_object_unref (manager->priv->bus_proxy);
+ }
+
+ if (manager->priv->logger != NULL) {
+ g_object_unref (manager->priv->logger);
+ }
G_OBJECT_CLASS (ck_manager_parent_class)->finalize (object);
}
diff --git a/src/ck-manager.h b/src/ck-manager.h
index a6fd670..45910b7 100644
--- a/src/ck-manager.h
+++ b/src/ck-manager.h
@@ -58,11 +58,16 @@ typedef struct
typedef enum
{
- CK_MANAGER_ERROR_GENERAL
+ CK_MANAGER_ERROR_GENERAL,
+ CK_MANAGER_ERROR_NOT_PRIVILEGED,
+ CK_MANAGER_NUM_ERRORS
} CkManagerError;
#define CK_MANAGER_ERROR ck_manager_error_quark ()
+GType ck_manager_error_get_type (void);
+#define CK_MANAGER_TYPE_ERROR (ck_manager_error_get_type ())
+
GQuark ck_manager_error_quark (void);
GType ck_manager_get_type (void);
@@ -70,9 +75,19 @@ CkManager * ck_manager_new (void);
/* unprivileged methods */
+
+/* System actions */
+gboolean ck_manager_stop (CkManager *manager,
+ DBusGMethodInvocation *context);
+gboolean ck_manager_restart (CkManager *manager,
+ DBusGMethodInvocation *context);
+
/* Authoritative properties */
gboolean ck_manager_open_session (CkManager *manager,
DBusGMethodInvocation *context);
+gboolean ck_manager_get_sessions (CkManager *manager,
+ GPtrArray **sessions,
+ GError **error);
gboolean ck_manager_get_seats (CkManager *manager,
GPtrArray **seats,
GError **error);
diff --git a/src/ck-manager.xml b/src/ck-manager.xml
index f40d6d5..0ca74fa 100644
--- a/src/ck-manager.xml
+++ b/src/ck-manager.xml
@@ -1,6 +1,12 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/org/freedesktop/ConsoleKit/Manager">
<interface name="org.freedesktop.ConsoleKit.Manager">
+ <method name="Restart">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ </method>
+ <method name="Stop">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ </method>
<method name="OpenSession">
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg name="cookie" direction="out" type="s"/>
@@ -18,6 +24,9 @@
<method name="GetSeats">
<arg name="seats" direction="out" type="ao"/>
</method>
+ <method name="GetSessions">
+ <arg name="sessions" direction="out" type="ao"/>
+ </method>
<method name="GetSessionForCookie">
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg name="cookie" direction="in" type="s"/>
diff --git a/src/ck-marshal.c b/src/ck-marshal.c
index 6b77b77..8b08794 100644
--- a/src/ck-marshal.c
+++ b/src/ck-marshal.c
@@ -51,10 +51,10 @@
/* VOID:UINT,STRING (ck-marshal.list:1) */
void
ck_marshal_VOID__UINT_STRING (GClosure *closure,
- GValue *return_value,
+ GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
- gpointer invocation_hint,
+ gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__UINT_STRING) (gpointer data1,
@@ -88,10 +88,10 @@ ck_marshal_VOID__UINT_STRING (GClosure *closure,
/* BOOLEAN:POINTER (ck-marshal.list:2) */
void
ck_marshal_BOOLEAN__POINTER (GClosure *closure,
- GValue *return_value,
+ GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
- gpointer invocation_hint,
+ gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER) (gpointer data1,
diff --git a/src/ck-run-programs.c b/src/ck-run-programs.c
new file mode 100644
index 0000000..f9d62c7
--- /dev/null
+++ b/src/ck-run-programs.c
@@ -0,0 +1,230 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 David Zeuthen <david@fubar.dk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <signal.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <signal.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib/gstdio.h>
+
+#include "ck-run-programs.h"
+
+/* The number of wall-clock seconds a program is allowed to run before we kill it */
+#define TIMEOUT_SECONDS 15
+
+/* Guaranteed by POSIX; see 'man environ' for details */
+extern char **environ;
+
+typedef struct {
+ int refcount;
+
+ char *path;
+
+ gboolean child_is_running;
+ guint watch_id;
+ guint timeout_id;
+ GPid pid;
+} ChildData;
+
+static ChildData *
+_child_data_new (void)
+{
+ ChildData *cd;
+
+ cd = g_new0 (ChildData, 1);
+ cd->refcount = 1;
+ g_debug ("Allocated ChildData %p", cd);
+
+ return cd;
+}
+
+static ChildData *
+_child_data_ref (ChildData *cd)
+{
+ cd->refcount++;
+ return cd;
+}
+
+
+static void
+_child_data_unref (ChildData *cd)
+{
+ cd->refcount--;
+ if (cd->refcount == 0) {
+ g_free (cd->path);
+ g_free (cd);
+ g_debug ("Freeing ChildData %p", cd);
+ }
+}
+
+
+static void
+_child_watch (GPid pid,
+ int status,
+ ChildData *cd)
+{
+ g_debug ("In _child_watch for pid %d", pid);
+
+ g_spawn_close_pid (pid);
+ g_source_remove (cd->timeout_id);
+
+ cd->child_is_running = FALSE;
+
+ _child_data_unref (cd);
+}
+
+static gboolean
+_child_timeout (ChildData *cd)
+{
+ /* The program we ran timed out; this is a bug in the program */
+ g_warning ("The program %s didn't exit within %d seconds; killing it", cd->path, TIMEOUT_SECONDS);
+
+ kill (cd->pid, SIGTERM);
+
+ cd->child_is_running = FALSE;
+ return FALSE;
+}
+
+/**
+ * ck_run_programs:
+ * @dirpath: Path to a directory containing programs to run
+ * @action: Argument to pass to each program
+ * @extra_env: Extra environment to pass
+ *
+ * Synchronously run all scripts with suffix .ck in the given
+ * directory.
+ */
+void
+ck_run_programs (const char *dirpath,
+ const char *action,
+ char **extra_env)
+{
+ GDir *dir;
+ GError *error;
+ const char *name;
+ char **env_for_child;
+ int environ_len;
+ int extra_env_len;
+ int n;
+ int m;
+
+ g_return_if_fail (dirpath != NULL);
+ g_return_if_fail (action != NULL);
+
+ g_debug ("Running programs in %s for action %s", dirpath, action);
+
+ /* Construct an environment consisting of the existing and the given environment */
+ environ_len = environ != NULL ? g_strv_length (environ) : 0;
+ extra_env_len = extra_env != NULL ? g_strv_length (extra_env) : 0;
+ env_for_child = g_new0 (char *, environ_len + extra_env_len + 2);
+ m = 0;
+ for (n = 0; n < environ_len; n++) {
+ env_for_child [m++] = g_strdup (environ[n]);
+ }
+ for (n = 0; n < extra_env_len; n++) {
+ env_for_child [m++] = g_strdup (extra_env[n]);
+ }
+ env_for_child[m] = NULL;
+
+ error = NULL;
+
+ dir = g_dir_open (dirpath, 0, &error);
+ if (dir == NULL) {
+ /* This is unexpected; it means ConsoleKit isn't properly installed */
+ g_warning ("Unable to open directory %s: %s", dirpath, error->message);
+ g_error_free (error);
+ goto out;
+ }
+
+ while ((name = g_dir_read_name (dir)) != NULL) {
+ char *child_argv[3];
+ ChildData *cd;
+ gboolean res;
+
+ if (!g_str_has_suffix (name, ".ck"))
+ continue;
+
+ child_argv[0] = g_strdup_printf ("%s/%s", dirpath, name);
+ child_argv[1] = (char *) action;
+ child_argv[2] = NULL;
+
+ error = NULL;
+ cd = _child_data_new ();
+ cd->path = g_strdup (child_argv[0]);
+
+ /* The ChildData instance is also unreffed in _child_watch; we only ref
+ * it here to prevent cd from being destroyed while checking it in
+ * the mainloop
+ */
+ _child_data_ref (cd);
+
+ res = g_spawn_async (NULL,
+ child_argv,
+ env_for_child,
+ G_SPAWN_DO_NOT_REAP_CHILD,
+ NULL,
+ NULL,
+ &cd->pid,
+ &error);
+ if (! res) {
+ /* This is unexpected; it means the program to run isn't installed correctly */
+ g_warning ("Unable to spawn %s: %s", child_argv[0], error->message);
+ g_error_free (error);
+ _child_data_unref (cd);
+ _child_data_unref (cd);
+ goto out_loop;
+ }
+ cd->child_is_running = TRUE;
+
+ g_debug ("Waiting for child with pid %d", cd->pid);
+
+ cd->watch_id = g_child_watch_add (cd->pid,
+ (GChildWatchFunc)_child_watch,
+ cd);
+ cd->timeout_id = g_timeout_add (TIMEOUT_SECONDS * 1000,
+ (GSourceFunc)_child_timeout,
+ cd);
+
+ /* run the mainloop; this allows the main daemon to
+ * continue serving clients (including the program we
+ * just launched) */
+ while (cd->child_is_running) {
+ g_main_context_iteration (NULL, TRUE);
+ }
+
+ g_debug ("Done waiting for child with pid %d", cd->pid);
+ _child_data_unref (cd);
+
+ out_loop:
+ g_free (child_argv[0]);
+ }
+out:
+ g_strfreev (env_for_child);
+}
diff --git a/src/ck-run-programs.h b/src/ck-run-programs.h
new file mode 100644
index 0000000..77cdf48
--- /dev/null
+++ b/src/ck-run-programs.h
@@ -0,0 +1,38 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 David Zeuthen <david@fubar.dk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifndef __CK_RUN_PROGRAMS_H
+#define __CK_RUN_PROGRAMS_H
+
+#include <glib-object.h>
+#include <dbus/dbus-glib.h>
+#include "ck-session.h"
+
+G_BEGIN_DECLS
+
+void ck_run_programs (const char *dirpath, const char *action, char **extra_env);
+
+void ck_session_run_programs (CkSession *session, const char *action);
+
+
+G_END_DECLS
+
+#endif /* __CK_RUN_PROGRAMS_H */
diff --git a/src/ck-seat-glue.h b/src/ck-seat-glue.h
index d6cbca1..264ba13 100644
--- a/src/ck-seat-glue.h
+++ b/src/ck-seat-glue.h
@@ -53,7 +53,7 @@ G_BEGIN_DECLS
#endif /* !G_ENABLE_DEBUG */
-/* BOOLEAN:POINTER,POINTER (/tmp/dbus-binding-tool-c-marshallers.33NIYT:1) */
+/* BOOLEAN:POINTER,POINTER (/tmp/dbus-binding-tool-c-marshallers.G1XI6T:1) */
extern void dbus_glib_marshal_ck_seat_BOOLEAN__POINTER_POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -62,10 +62,10 @@ extern void dbus_glib_marshal_ck_seat_BOOLEAN__POINTER_POINTER (GClosure *cl
gpointer marshal_data);
void
dbus_glib_marshal_ck_seat_BOOLEAN__POINTER_POINTER (GClosure *closure,
- GValue *return_value,
+ GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
- gpointer invocation_hint,
+ gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER_POINTER) (gpointer data1,
@@ -100,7 +100,7 @@ dbus_glib_marshal_ck_seat_BOOLEAN__POINTER_POINTER (GClosure *closure,
g_value_set_boolean (return_value, v_return);
}
-/* NONE:BOXED,POINTER (/tmp/dbus-binding-tool-c-marshallers.33NIYT:2) */
+/* NONE:BOXED,POINTER (/tmp/dbus-binding-tool-c-marshallers.G1XI6T:2) */
extern void dbus_glib_marshal_ck_seat_VOID__BOXED_POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -109,10 +109,10 @@ extern void dbus_glib_marshal_ck_seat_VOID__BOXED_POINTER (GClosure *closure
gpointer marshal_data);
void
dbus_glib_marshal_ck_seat_VOID__BOXED_POINTER (GClosure *closure,
- GValue *return_value,
+ GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
- gpointer invocation_hint,
+ gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__BOXED_POINTER) (gpointer data1,
diff --git a/src/ck-seat.c b/src/ck-seat.c
index e04b569..009452e 100644
--- a/src/ck-seat.c
+++ b/src/ck-seat.c
@@ -42,12 +42,14 @@
#include "ck-session.h"
#include "ck-vt-monitor.h"
+#include "ck-run-programs.h"
#define CK_SEAT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CK_TYPE_SEAT, CkSeatPrivate))
#define CK_DBUS_PATH "/org/freedesktop/ConsoleKit"
#define CK_DBUS_NAME "org.freedesktop.ConsoleKit"
+#define NONULL_STRING(x) ((x) != NULL ? (x) : "")
struct CkSeatPrivate
{
@@ -122,17 +124,37 @@ ck_seat_get_active_session (CkSeat *seat,
char **ssid,
GError **error)
{
+ gboolean ret;
+ char *session_id;
+
g_return_val_if_fail (CK_IS_SEAT (seat), FALSE);
+ g_debug ("CkSeat: get active session");
+ session_id = NULL;
+ ret = FALSE;
if (seat->priv->active_session != NULL) {
- ck_session_get_id (seat->priv->active_session, ssid, NULL);
+ gboolean res;
+ res = ck_session_get_id (seat->priv->active_session, &session_id, NULL);
+ if (res) {
+ ret = TRUE;
+ }
+ } else {
+ g_debug ("CkSeat: seat has no active session");
+ }
+
+ if (! ret) {
+ g_set_error (error,
+ CK_SEAT_ERROR,
+ CK_SEAT_ERROR_GENERAL,
+ "%s", "Seat has no active session");
} else {
if (ssid != NULL) {
- *ssid = NULL;
+ *ssid = g_strdup (session_id);
}
}
- return TRUE;
+ g_free (session_id);
+ return ret;
}
typedef struct
@@ -200,8 +222,11 @@ _seat_activate_session (CkSeat *seat,
goto out;
}
- ck_session_get_display_device (session, &device, NULL);
-
+ device = NULL;
+ ck_session_get_x11_display_device (session, &device, NULL);
+ if (device == NULL) {
+ ck_session_get_display_device (session, &device, NULL);
+ }
res = ck_get_console_num_from_device (device, &num);
if (! res) {
GError *error;
@@ -264,6 +289,8 @@ ck_seat_activate_session (CkSeat *seat,
session = NULL;
+ g_debug ("Trying to activate session: %s", ssid);
+
if (ssid != NULL) {
session = g_hash_table_lookup (seat->priv->sessions, ssid);
}
@@ -473,7 +500,7 @@ change_active_session (CkSeat *seat,
ck_session_set_active (session, TRUE, NULL);
}
- g_debug ("Active session changed: %s", ssid);
+ g_debug ("Active session changed: %s", ssid ? ssid : "(null)");
g_signal_emit (seat, signals [ACTIVE_SESSION_CHANGED], 0, ssid);
@@ -527,8 +554,11 @@ ck_seat_remove_session (CkSeat *seat,
CkSession *session,
GError **error)
{
- char *ssid;
- gboolean ret;
+ char *ssid;
+ char *orig_ssid;
+ CkSession *orig_session;
+ gboolean res;
+ gboolean ret;
g_return_val_if_fail (CK_IS_SEAT (seat), FALSE);
@@ -536,7 +566,12 @@ ck_seat_remove_session (CkSeat *seat,
ssid = NULL;
ck_session_get_id (session, &ssid, NULL);
- if (g_hash_table_lookup (seat->priv->sessions, ssid) == NULL) {
+ /* Need to get the original key/value */
+ res = g_hash_table_lookup_extended (seat->priv->sessions,
+ ssid,
+ (gpointer *)&orig_ssid,
+ (gpointer *)&orig_session);
+ if (! res) {
g_debug ("Session %s is not attached to seat %s", ssid, seat->priv->id);
g_set_error (error,
CK_SEAT_ERROR,
@@ -547,15 +582,23 @@ ck_seat_remove_session (CkSeat *seat,
g_signal_handlers_disconnect_by_func (session, session_activate, seat);
- g_debug ("Emitting removed signal: %s", ssid);
+ /* Remove the session from the list but don't call
+ * unref until the signal is emitted */
+ g_hash_table_steal (seat->priv->sessions, ssid);
- g_signal_emit (seat, signals [SESSION_REMOVED], 0, ssid);
+ ck_session_run_programs (session, "session_removed");
- g_hash_table_remove (seat->priv->sessions, ssid);
+ g_debug ("Emitting session-removed: %s", ssid);
+ g_signal_emit (seat, signals [SESSION_REMOVED], 0, ssid);
/* try to change the active session */
maybe_update_active_session (seat);
+ if (orig_session != NULL) {
+ g_object_unref (orig_session);
+ }
+ g_free (orig_ssid);
+
ret = TRUE;
out:
g_free (ssid);
@@ -581,6 +624,8 @@ ck_seat_add_session (CkSeat *seat,
g_signal_connect_object (session, "activate", G_CALLBACK (session_activate), seat, 0);
/* FIXME: attach to property notify signals? */
+ ck_session_run_programs (session, "session_added");
+
g_debug ("Emitting added signal: %s", ssid);
g_signal_emit (seat, signals [SESSION_ADDED], 0, ssid);
@@ -637,7 +682,6 @@ ck_seat_add_device (CkSeat *seat,
g_ptr_array_add (seat->priv->devices, g_boxed_copy (CK_TYPE_DEVICE, device));
g_debug ("Emitting device added signal");
-
g_signal_emit (seat, signals [DEVICE_ADDED], 0, device);
return TRUE;
@@ -653,7 +697,6 @@ ck_seat_remove_device (CkSeat *seat,
/* FIXME: check if already present */
if (0) {
g_debug ("Emitting device removed signal");
-
g_signal_emit (seat, signals [DEVICE_REMOVED], 0, device);
}
@@ -1103,3 +1146,90 @@ ck_seat_new_from_file (const char *sid,
return seat;
}
+
+static void
+dump_seat_session_iter (char *id,
+ CkSession *session,
+ GString *str)
+{
+ char *session_id;
+ GError *error;
+
+ error = NULL;
+ if (! ck_session_get_id (session, &session_id, &error)) {
+ g_warning ("Cannot get session id from seat: %s", error->message);
+ g_error_free (error);
+ } else {
+ if (str->len > 0) {
+ g_string_append_c (str, ' ');
+ }
+ g_string_append (str, session_id);
+ g_free (session_id);
+ }
+}
+
+void
+ck_seat_dump (CkSeat *seat,
+ GKeyFile *key_file)
+{
+ char *group_name;
+ GString *str;
+ char *s;
+ int n;
+
+ group_name = g_strdup_printf ("Seat %s", seat->priv->id);
+
+ g_key_file_set_integer (key_file, group_name, "kind", seat->priv->kind);
+
+ str = g_string_new (NULL);
+ g_hash_table_foreach (seat->priv->sessions, (GHFunc) dump_seat_session_iter, str);
+ s = g_string_free (str, FALSE);
+ g_key_file_set_string (key_file, group_name, "sessions", s);
+ g_free (s);
+
+ str = g_string_new (NULL);
+ if (seat->priv->devices != NULL) {
+ for (n = 0; n < seat->priv->devices->len; n++) {
+ int m;
+ GValueArray *va;
+
+ va = seat->priv->devices->pdata[n];
+
+ if (str->len > 0)
+ g_string_append_c (str, ' ');
+ for (m = 0; m < va->n_values; m++) {
+ if (m > 0)
+ g_string_append_c (str, ':');
+ g_string_append (str, g_value_get_string ((const GValue *) &((va->values)[m])));
+ }
+
+ g_debug ("foo %d", va->n_values);
+ }
+ }
+ s = g_string_free (str, FALSE);
+ g_key_file_set_string (key_file, group_name, "devices", s);
+ g_free (s);
+
+
+ if (seat->priv->active_session != NULL) {
+ char *session_id;
+ GError *error;
+
+ error = NULL;
+ if (! ck_session_get_id (seat->priv->active_session, &session_id, &error)) {
+ g_warning ("Cannot get session id for active session on seat %s: %s",
+ seat->priv->id,
+ error->message);
+ g_error_free (error);
+ } else {
+ g_key_file_set_string (key_file,
+ group_name,
+ "active_session",
+ NONULL_STRING (session_id));
+ g_free (session_id);
+ }
+ }
+
+ g_free (group_name);
+}
+
diff --git a/src/ck-seat.h b/src/ck-seat.h
index 63ab3d5..5977781 100644
--- a/src/ck-seat.h
+++ b/src/ck-seat.h
@@ -90,6 +90,10 @@ CkSeat * ck_seat_new_from_file (const char *sid,
CkSeat * ck_seat_new_with_devices (const char *sid,
CkSeatKind kind,
GPtrArray *devices);
+
+void ck_seat_dump (CkSeat *seat,
+ GKeyFile *key_file);
+
gboolean ck_seat_get_kind (CkSeat *seat,
CkSeatKind *kind,
GError **error);
diff --git a/src/ck-session-glue.h b/src/ck-session-glue.h
index cabded2..c06173f 100644
--- a/src/ck-session-glue.h
+++ b/src/ck-session-glue.h
@@ -53,7 +53,7 @@ G_BEGIN_DECLS
#endif /* !G_ENABLE_DEBUG */
-/* BOOLEAN:POINTER,POINTER (/tmp/dbus-binding-tool-c-marshallers.8HEIYT:1) */
+/* BOOLEAN:POINTER,POINTER (/tmp/dbus-binding-tool-c-marshallers.P39I6T:1) */
extern void dbus_glib_marshal_ck_session_BOOLEAN__POINTER_POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -62,10 +62,10 @@ extern void dbus_glib_marshal_ck_session_BOOLEAN__POINTER_POINTER (GClosure
gpointer marshal_data);
void
dbus_glib_marshal_ck_session_BOOLEAN__POINTER_POINTER (GClosure *closure,
- GValue *return_value,
+ GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
- gpointer invocation_hint,
+ gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER_POINTER) (gpointer data1,
@@ -100,7 +100,7 @@ dbus_glib_marshal_ck_session_BOOLEAN__POINTER_POINTER (GClosure *closure,
g_value_set_boolean (return_value, v_return);
}
-/* NONE:BOOLEAN,POINTER (/tmp/dbus-binding-tool-c-marshallers.8HEIYT:2) */
+/* NONE:BOOLEAN,POINTER (/tmp/dbus-binding-tool-c-marshallers.P39I6T:2) */
extern void dbus_glib_marshal_ck_session_VOID__BOOLEAN_POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -109,10 +109,10 @@ extern void dbus_glib_marshal_ck_session_VOID__BOOLEAN_POINTER (GClosure *cl
gpointer marshal_data);
void
dbus_glib_marshal_ck_session_VOID__BOOLEAN_POINTER (GClosure *closure,
- GValue *return_value,
+ GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
- gpointer invocation_hint,
+ gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__BOOLEAN_POINTER) (gpointer data1,
@@ -144,7 +144,7 @@ dbus_glib_marshal_ck_session_VOID__BOOLEAN_POINTER (GClosure *closure,
}
#define dbus_glib_marshal_ck_session_NONE__BOOLEAN_POINTER dbus_glib_marshal_ck_session_VOID__BOOLEAN_POINTER
-/* NONE:POINTER (/tmp/dbus-binding-tool-c-marshallers.8HEIYT:3) */
+/* NONE:POINTER (/tmp/dbus-binding-tool-c-marshallers.P39I6T:3) */
#define dbus_glib_marshal_ck_session_VOID__POINTER g_cclosure_marshal_VOID__POINTER
#define dbus_glib_marshal_ck_session_NONE__POINTER dbus_glib_marshal_ck_session_VOID__POINTER
diff --git a/src/ck-session-leader.c b/src/ck-session-leader.c
new file mode 100644
index 0000000..756feac
--- /dev/null
+++ b/src/ck-session-leader.c
@@ -0,0 +1,567 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2006-2007 William Jon McCann <mccann@jhu.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <signal.h>
+#include <errno.h>
+#include <string.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib/gstdio.h>
+#include <glib-object.h>
+#define DBUS_API_SUBJECT_TO_CHANGE
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
+
+#include "ck-session-leader.h"
+#include "ck-job.h"
+
+#define CK_SESSION_LEADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CK_TYPE_SESSION_LEADER, CkSessionLeaderPrivate))
+
+#define CK_TYPE_PARAMETER_STRUCT (dbus_g_type_get_struct ("GValueArray", \
+ G_TYPE_STRING, \
+ G_TYPE_VALUE, \
+ G_TYPE_INVALID))
+#define CK_TYPE_PARAMETER_LIST (dbus_g_type_get_collection ("GPtrArray", \
+ CK_TYPE_PARAMETER_STRUCT))
+
+struct CkSessionLeaderPrivate
+{
+ char *id;
+ uid_t uid;
+ pid_t pid;
+ char *service_name;
+ char *session_id;
+ char *cookie;
+ GList *pending_jobs;
+ gboolean cancelled;
+};
+
+enum {
+ PROP_0,
+};
+
+static void ck_session_leader_class_init (CkSessionLeaderClass *klass);
+static void ck_session_leader_init (CkSessionLeader *session_leader);
+static void ck_session_leader_finalize (GObject *object);
+
+G_DEFINE_TYPE (CkSessionLeader, ck_session_leader, G_TYPE_OBJECT)
+
+GQuark
+ck_session_leader_error_quark (void)
+{
+ static GQuark ret = 0;
+ if (ret == 0) {
+ ret = g_quark_from_static_string ("ck_session_leader_error");
+ }
+
+ return ret;
+}
+
+static void
+remove_pending_job (CkJob *job)
+{
+ if (job != NULL) {
+ char *command;
+
+ command = NULL;
+ ck_job_get_command (job, &command);
+ g_debug ("Removing pending job: %s", command);
+ g_free (command);
+
+ ck_job_cancel (job);
+ g_object_unref (job);
+ }
+}
+
+void
+ck_session_leader_cancel (CkSessionLeader *leader)
+{
+ g_return_if_fail (CK_IS_SESSION_LEADER (leader));
+
+ if (leader->priv->pending_jobs != NULL) {
+ g_list_foreach (leader->priv->pending_jobs, (GFunc)remove_pending_job, NULL);
+ g_list_free (leader->priv->pending_jobs);
+ leader->priv->pending_jobs = NULL;
+ }
+
+ leader->priv->cancelled = TRUE;
+}
+
+
+static void
+add_param_int (GPtrArray *parameters,
+ const char *key,
+ const char *value)
+{
+ GValue val = { 0, };
+ GValue param_val = { 0, };
+ int num;
+
+ num = atoi (value);
+
+ g_value_init (&val, G_TYPE_INT);
+ g_value_set_int (&val, num);
+ g_value_init (&param_val, CK_TYPE_PARAMETER_STRUCT);
+ g_value_take_boxed (&param_val,
+ dbus_g_type_specialized_construct (CK_TYPE_PARAMETER_STRUCT));
+ dbus_g_type_struct_set (&param_val,
+ 0, key,
+ 1, &val,
+ G_MAXUINT);
+ g_value_unset (&val);
+
+ g_ptr_array_add (parameters, g_value_get_boxed (&param_val));
+}
+
+static void
+add_param_boolean (GPtrArray *parameters,
+ const char *key,
+ const char *value)
+{
+ GValue val = { 0, };
+ GValue param_val = { 0, };
+ gboolean b;
+
+ if (value != NULL && strcmp (value, "true") == 0) {
+ b = TRUE;
+ } else {
+ b = FALSE;
+ }
+
+ g_value_init (&val, G_TYPE_BOOLEAN);
+ g_value_set_boolean (&val, b);
+ g_value_init (&param_val, CK_TYPE_PARAMETER_STRUCT);
+ g_value_take_boxed (&param_val,
+ dbus_g_type_specialized_construct (CK_TYPE_PARAMETER_STRUCT));
+ dbus_g_type_struct_set (&param_val,
+ 0, key,
+ 1, &val,
+ G_MAXUINT);
+ g_value_unset (&val);
+
+ g_ptr_array_add (parameters, g_value_get_boxed (&param_val));
+}
+
+static void
+add_param_string (GPtrArray *parameters,
+ const char *key,
+ const char *value)
+{
+ GValue val = { 0, };
+ GValue param_val = { 0, };
+
+ g_value_init (&val, G_TYPE_STRING);
+ g_value_set_string (&val, value);
+
+ g_value_init (&param_val, CK_TYPE_PARAMETER_STRUCT);
+ g_value_take_boxed (&param_val,
+ dbus_g_type_specialized_construct (CK_TYPE_PARAMETER_STRUCT));
+
+ dbus_g_type_struct_set (&param_val,
+ 0, key,
+ 1, &val,
+ G_MAXUINT);
+ g_value_unset (&val);
+
+ g_ptr_array_add (parameters, g_value_get_boxed (&param_val));
+}
+
+typedef void (* CkAddParamFunc) (GPtrArray *arr,
+ const char *key,
+ const char *value);
+
+static struct {
+ char *key;
+ CkAddParamFunc func;
+} parse_ops[] = {
+ { "display-device", add_param_string },
+ { "x11-display-device", add_param_string },
+ { "x11-display", add_param_string },
+ { "remote-host-name", add_param_string },
+ { "session-type", add_param_string },
+ { "is-local", add_param_boolean },
+ { "unix-user", add_param_int },
+};
+
+static GPtrArray *
+parse_output (const char *output)
+{
+ GPtrArray *parameters;
+ char **lines;
+ int i;
+ int j;
+
+ lines = g_strsplit (output, "\n", -1);
+ if (lines == NULL) {
+ return NULL;
+ }
+
+ parameters = g_ptr_array_sized_new (10);
+
+ for (i = 0; lines[i] != NULL; i++) {
+ char **vals;
+
+ vals = g_strsplit (lines[i], " = ", 2);
+ if (vals == NULL || vals[0] == NULL) {
+ g_strfreev (vals);
+ continue;
+ }
+
+ for (j = 0; j < G_N_ELEMENTS (parse_ops); j++) {
+ if (strcmp (vals[0], parse_ops[j].key) == 0) {
+ parse_ops[j].func (parameters, vals[0], vals[1]);
+ break;
+ }
+ }
+ g_strfreev (vals);
+ }
+
+ g_strfreev (lines);
+
+ return parameters;
+}
+
+
+static void
+parameters_free (GPtrArray *parameters)
+{
+ int i;
+
+ for (i = 0; i < parameters->len; i++) {
+ gpointer data;
+ data = g_ptr_array_index (parameters, i);
+ if (data != NULL) {
+ g_boxed_free (CK_TYPE_PARAMETER_STRUCT, data);
+ }
+ }
+
+ g_ptr_array_free (parameters, TRUE);
+}
+
+typedef struct {
+ CkSessionLeader *leader;
+ CkSessionLeaderDoneFunc done_cb;
+ gpointer user_data;
+ DBusGMethodInvocation *context;
+} JobData;
+
+static void
+job_completed (CkJob *job,
+ int status,
+ JobData *data)
+{
+ g_debug ("Job status: %d", status);
+ if (status == 0) {
+ char *output;
+ GPtrArray *parameters;
+
+ output = NULL;
+ ck_job_get_stdout (job, &output);
+ g_debug ("Job output: %s", output);
+
+ parameters = parse_output (output);
+ g_free (output);
+
+ data->done_cb (data->leader,
+ parameters,
+ data->context,
+ data->user_data);
+ parameters_free (parameters);
+ } else {
+ data->done_cb (data->leader,
+ NULL,
+ data->context,
+ data->user_data);
+ }
+
+ /* remove job from queue */
+ data->leader->priv->pending_jobs = g_list_remove (data->leader->priv->pending_jobs, job);
+
+ g_signal_handlers_disconnect_by_func (job, job_completed, data);
+ g_object_unref (job);
+}
+
+static void
+job_data_free (JobData *data)
+{
+ g_free (data);
+}
+
+gboolean
+ck_session_leader_collect_parameters (CkSessionLeader *session_leader,
+ DBusGMethodInvocation *context,
+ CkSessionLeaderDoneFunc done_cb,
+ gpointer user_data)
+{
+ GError *local_error;
+ char *command;
+ gboolean res;
+ gboolean ret;
+ CkJob *job;
+ JobData *data;
+
+ ret = FALSE;
+
+ data = g_new0 (JobData, 1);
+ data->leader = session_leader;
+ data->done_cb = done_cb;
+ data->user_data = user_data;
+ data->context = context;
+
+ command = g_strdup_printf ("%s --uid %u --pid %u",
+ LIBEXECDIR "/ck-collect-session-info",
+ session_leader->priv->uid,
+ session_leader->priv->pid);
+ job = ck_job_new ();
+ ck_job_set_command (job, command);
+ g_free (command);
+
+ g_signal_connect_data (job,
+ "completed",
+ G_CALLBACK (job_completed),
+ data,
+ (GClosureNotify)job_data_free,
+ 0);
+
+ local_error = NULL;
+ res = ck_job_execute (job, &local_error);
+ if (! res) {
+ if (local_error != NULL) {
+ g_debug ("stat on pid %d failed: %s", session_leader->priv->pid, local_error->message);
+ g_error_free (local_error);
+ }
+
+ g_object_unref (job);
+
+ goto out;
+ }
+
+ /* Add job to queue */
+ session_leader->priv->pending_jobs = g_list_prepend (session_leader->priv->pending_jobs, job);
+ ret = TRUE;
+
+ out:
+ return ret;
+}
+
+
+const char *
+ck_session_leader_peek_session_id (CkSessionLeader *session_leader)
+{
+ g_return_val_if_fail (CK_IS_SESSION_LEADER (session_leader), NULL);
+ return session_leader->priv->session_id;
+}
+
+const char *
+ck_session_leader_peek_cookie (CkSessionLeader *session_leader)
+{
+ g_return_val_if_fail (CK_IS_SESSION_LEADER (session_leader), NULL);
+ return session_leader->priv->cookie;
+}
+
+const char *
+ck_session_leader_peek_service_name (CkSessionLeader *session_leader)
+{
+ g_return_val_if_fail (CK_IS_SESSION_LEADER (session_leader), NULL);
+ return session_leader->priv->service_name;
+}
+
+uid_t
+ck_session_leader_get_uid (CkSessionLeader *session_leader)
+{
+ g_return_val_if_fail (CK_IS_SESSION_LEADER (session_leader), -1);
+ return session_leader->priv->uid;
+}
+
+pid_t
+ck_session_leader_get_pid (CkSessionLeader *session_leader)
+{
+ g_return_val_if_fail (CK_IS_SESSION_LEADER (session_leader), -1);
+ return session_leader->priv->pid;
+}
+
+void
+ck_session_leader_set_pid (CkSessionLeader *session_leader,
+ pid_t pid)
+{
+ g_return_if_fail (CK_IS_SESSION_LEADER (session_leader));
+ session_leader->priv->pid = pid;
+}
+
+void
+ck_session_leader_set_uid (CkSessionLeader *session_leader,
+ uid_t uid)
+{
+ g_return_if_fail (CK_IS_SESSION_LEADER (session_leader));
+ session_leader->priv->uid = uid;
+}
+
+void
+ck_session_leader_set_session_id (CkSessionLeader *session_leader,
+ const char *session_id)
+{
+ g_return_if_fail (CK_IS_SESSION_LEADER (session_leader));
+ g_free (session_leader->priv->session_id);
+ session_leader->priv->session_id = g_strdup (session_id);
+}
+
+void
+ck_session_leader_set_cookie (CkSessionLeader *session_leader,
+ const char *cookie)
+{
+ g_return_if_fail (CK_IS_SESSION_LEADER (session_leader));
+ g_free (session_leader->priv->cookie);
+ session_leader->priv->cookie = g_strdup (cookie);
+}
+
+void
+ck_session_leader_set_service_name (CkSessionLeader *session_leader,
+ const char *service_name)
+{
+ g_return_if_fail (CK_IS_SESSION_LEADER (session_leader));
+ g_free (session_leader->priv->service_name);
+ session_leader->priv->service_name = g_strdup (service_name);
+}
+
+static void
+ck_session_leader_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ CkSessionLeader *self;
+
+ self = CK_SESSION_LEADER (object);
+
+ switch (prop_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+ck_session_leader_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ CkSessionLeader *self;
+
+ self = CK_SESSION_LEADER (object);
+
+ switch (prop_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static GObject *
+ck_session_leader_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_properties)
+{
+ CkSessionLeader *session_leader;
+ CkSessionLeaderClass *klass;
+
+ klass = CK_SESSION_LEADER_CLASS (g_type_class_peek (CK_TYPE_SESSION_LEADER));
+
+ session_leader = CK_SESSION_LEADER (G_OBJECT_CLASS (ck_session_leader_parent_class)->constructor (type,
+ n_construct_properties,
+ construct_properties));
+
+ return G_OBJECT (session_leader);
+}
+
+static void
+ck_session_leader_class_init (CkSessionLeaderClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->constructor = ck_session_leader_constructor;
+ object_class->get_property = ck_session_leader_get_property;
+ object_class->set_property = ck_session_leader_set_property;
+ object_class->finalize = ck_session_leader_finalize;
+
+ g_type_class_add_private (klass, sizeof (CkSessionLeaderPrivate));
+}
+
+static void
+ck_session_leader_init (CkSessionLeader *session_leader)
+{
+ session_leader->priv = CK_SESSION_LEADER_GET_PRIVATE (session_leader);
+}
+
+static void
+ck_session_leader_finalize (GObject *object)
+{
+ CkSessionLeader *session_leader;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (CK_IS_SESSION_LEADER (object));
+
+ session_leader = CK_SESSION_LEADER (object);
+
+ g_return_if_fail (session_leader->priv != NULL);
+
+ g_free (session_leader->priv->session_id);
+ session_leader->priv->session_id = NULL;
+ g_free (session_leader->priv->cookie);
+ session_leader->priv->cookie = NULL;
+ g_free (session_leader->priv->service_name);
+ session_leader->priv->service_name = NULL;
+
+ G_OBJECT_CLASS (ck_session_leader_parent_class)->finalize (object);
+}
+
+CkSessionLeader *
+ck_session_leader_new (void)
+{
+ GObject *object;
+
+ object = g_object_new (CK_TYPE_SESSION_LEADER,
+ NULL);
+
+ return CK_SESSION_LEADER (object);
+}
+
+void
+ck_session_leader_dump (CkSessionLeader *session_leader,
+ GKeyFile *key_file)
+{
+ char *group_name;
+
+ group_name = g_strdup_printf ("SessionLeader %s", session_leader->priv->session_id);
+ g_key_file_set_string (key_file, group_name, "session", session_leader->priv->session_id);
+ g_key_file_set_integer (key_file, group_name, "uid", session_leader->priv->uid);
+ g_key_file_set_integer (key_file, group_name, "pid", session_leader->priv->pid);
+ g_key_file_set_string (key_file, group_name, "cookie", session_leader->priv->cookie);
+ g_key_file_set_string (key_file, group_name, "service_name", session_leader->priv->service_name);
+
+ g_free (group_name);
+}
diff --git a/src/ck-session-leader.h b/src/ck-session-leader.h
new file mode 100644
index 0000000..4eb8857
--- /dev/null
+++ b/src/ck-session-leader.h
@@ -0,0 +1,97 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2006-2007 William Jon McCann <mccann@jhu.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifndef __CK_SESSION_LEADER_H
+#define __CK_SESSION_LEADER_H
+
+#include <glib-object.h>
+#include <dbus/dbus-glib.h>
+
+G_BEGIN_DECLS
+
+#define CK_TYPE_SESSION_LEADER (ck_session_leader_get_type ())
+#define CK_SESSION_LEADER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CK_TYPE_SESSION_LEADER, CkSessionLeader))
+#define CK_SESSION_LEADER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CK_TYPE_SESSION_LEADER, CkSessionLeaderClass))
+#define CK_IS_SESSION_LEADER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CK_TYPE_SESSION_LEADER))
+#define CK_IS_SESSION_LEADER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CK_TYPE_SESSION_LEADER))
+#define CK_SESSION_LEADER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CK_TYPE_SESSION_LEADER, CkSessionLeaderClass))
+
+typedef struct CkSessionLeaderPrivate CkSessionLeaderPrivate;
+
+typedef struct
+{
+ GObject parent;
+ CkSessionLeaderPrivate *priv;
+} CkSessionLeader;
+
+typedef struct
+{
+ GObjectClass parent_class;
+
+} CkSessionLeaderClass;
+
+typedef enum
+{
+ CK_SESSION_LEADER_ERROR_GENERAL
+} CkSessionLeaderError;
+
+#define CK_SESSION_LEADER_ERROR ck_session_leader_error_quark ()
+
+typedef void (* CkSessionLeaderDoneFunc) (CkSessionLeader *session_leader,
+ GPtrArray *parameters,
+ DBusGMethodInvocation *context,
+ gpointer data);
+
+GQuark ck_session_leader_error_quark (void);
+GType ck_session_leader_get_type (void);
+CkSessionLeader * ck_session_leader_new (void);
+
+void ck_session_leader_set_pid (CkSessionLeader *session_leader,
+ pid_t pid);
+void ck_session_leader_set_uid (CkSessionLeader *session_leader,
+ uid_t uid);
+void ck_session_leader_set_session_id (CkSessionLeader *session_leader,
+ const char *session_id);
+void ck_session_leader_set_cookie (CkSessionLeader *session_leader,
+ const char *cookie);
+void ck_session_leader_set_service_name (CkSessionLeader *session_leader,
+ const char *sender);
+
+const char * ck_session_leader_peek_session_id (CkSessionLeader *session_leader);
+const char * ck_session_leader_peek_cookie (CkSessionLeader *session_leader);
+const char * ck_session_leader_peek_service_name (CkSessionLeader *session_leader);
+uid_t ck_session_leader_get_uid (CkSessionLeader *session_leader);
+pid_t ck_session_leader_get_pid (CkSessionLeader *session_leader);
+
+
+gboolean ck_session_leader_collect_parameters (CkSessionLeader *session_leader,
+ DBusGMethodInvocation *context,
+ CkSessionLeaderDoneFunc done_cb,
+ gpointer data);
+void ck_session_leader_cancel (CkSessionLeader *session_leader);
+
+void ck_session_leader_dump (CkSessionLeader *session_leader,
+ GKeyFile *key_file);
+
+
+G_END_DECLS
+
+#endif /* __CK_SESSION_LEADER_H */
diff --git a/src/ck-session.c b/src/ck-session.c
index f136333..d9e32be 100644
--- a/src/ck-session.c
+++ b/src/ck-session.c
@@ -40,12 +40,15 @@
#include "ck-session.h"
#include "ck-session-glue.h"
#include "ck-marshal.h"
+#include "ck-run-programs.h"
#define CK_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CK_TYPE_SESSION, CkSessionPrivate))
#define CK_DBUS_PATH "/org/freedesktop/ConsoleKit"
#define CK_DBUS_NAME "org.freedesktop.ConsoleKit"
+#define NONULL_STRING(x) ((x) != NULL ? (x) : "")
+
#define IDLE_TIME_SECS 60
struct CkSessionPrivate
@@ -394,6 +397,7 @@ ck_session_set_active (CkSession *session,
if (session->priv->active != active) {
session->priv->active = active;
+ ck_session_run_programs (session, "session_active_changed");
g_signal_emit (session, signals [ACTIVE_CHANGED], 0, active);
}
@@ -1206,3 +1210,106 @@ ck_session_new_with_parameters (const char *ssid,
return CK_SESSION (object);
}
+
+void
+ck_session_run_programs (CkSession *session,
+ const char *action)
+{
+ int n;
+ char *extra_env[11]; /* be sure to adjust this as needed */
+
+ n = 0;
+
+ extra_env[n++] = g_strdup_printf ("CK_SESSION_ID=%s", session->priv->id);
+ if (session->priv->session_type != NULL) {
+ extra_env[n++] = g_strdup_printf ("CK_SESSION_TYPE=%s", session->priv->session_type);
+ }
+ extra_env[n++] = g_strdup_printf ("CK_SESSION_SEAT_ID=%s", session->priv->seat_id);
+ extra_env[n++] = g_strdup_printf ("CK_SESSION_USER_UID=%d", session->priv->uid);
+ if (session->priv->display_device != NULL && strlen (session->priv->display_device) > 0) {
+ extra_env[n++] = g_strdup_printf ("CK_SESSION_DISPLAY_DEVICE=%s", session->priv->display_device);
+ }
+ if (session->priv->x11_display_device != NULL && strlen (session->priv->x11_display_device) > 0) {
+ extra_env[n++] = g_strdup_printf ("CK_SESSION_X11_DISPLAY_DEVICE=%s", session->priv->x11_display_device);
+ }
+ extra_env[n++] = g_strdup_printf ("CK_SESSION_X11_DISPLAY=%s",
+ session->priv->x11_display ? session->priv->x11_display : "");
+ if (session->priv->remote_host_name != NULL && strlen (session->priv->remote_host_name) > 0) {
+ extra_env[n++] = g_strdup_printf ("CK_SESSION_REMOTE_HOST_NAME=%s", session->priv->remote_host_name);
+ }
+ extra_env[n++] = g_strdup_printf ("CK_SESSION_IS_ACTIVE=%s", session->priv->active ? "true" : "false");
+ extra_env[n++] = g_strdup_printf ("CK_SESSION_IS_LOCAL=%s", session->priv->is_local ? "true" : "false");
+ extra_env[n++] = NULL;
+
+ ck_run_programs (SYSCONFDIR "/ConsoleKit/run-session.d", action, extra_env);
+ ck_run_programs (LIBDIR "/ConsoleKit/run-session.d", action, extra_env);
+
+ for (n = 0; extra_env[n] != NULL; n++) {
+ g_free (extra_env[n]);
+ }
+}
+
+void
+ck_session_dump (CkSession *session,
+ GKeyFile *key_file)
+{
+ char *s;
+ char *group_name;
+
+ group_name = g_strdup_printf ("Session %s", session->priv->id);
+ g_key_file_set_integer (key_file, group_name, "uid", session->priv->uid);
+ g_key_file_set_string (key_file,
+ group_name,
+ "seat",
+ NONULL_STRING (session->priv->seat_id));
+ g_key_file_set_string (key_file,
+ group_name,
+ "cookie",
+ NONULL_STRING (session->priv->cookie));
+ if (session->priv->session_type != NULL) {
+ g_key_file_set_string (key_file,
+ group_name,
+ "type",
+ NONULL_STRING (session->priv->session_type));
+ }
+ if (session->priv->display_device != NULL && strlen (session->priv->display_device) > 0) {
+ g_key_file_set_string (key_file,
+ group_name,
+ "display_device",
+ NONULL_STRING (session->priv->display_device));
+ }
+ if (session->priv->x11_display_device != NULL && strlen (session->priv->x11_display_device) > 0) {
+ g_key_file_set_string (key_file,
+ group_name,
+ "x11_display_device",
+ NONULL_STRING (session->priv->x11_display_device));
+ }
+ if (session->priv->x11_display != NULL && strlen (session->priv->x11_display) > 0) {
+ g_key_file_set_string (key_file,
+ group_name,
+ "x11_display",
+ NONULL_STRING (session->priv->x11_display));
+ }
+ if (session->priv->remote_host_name != NULL && strlen (session->priv->remote_host_name) > 0) {
+ g_key_file_set_string (key_file,
+ group_name,
+ "remote_host_name",
+ NONULL_STRING (session->priv->remote_host_name));
+ }
+ g_key_file_set_string (key_file,
+ group_name,
+ "remote_host_name",
+ NONULL_STRING (session->priv->remote_host_name));
+ g_key_file_set_boolean (key_file, group_name, "is_active", session->priv->active);
+ g_key_file_set_boolean (key_file, group_name, "is_local", session->priv->is_local);
+
+ s = g_time_val_to_iso8601 (&(session->priv->creation_time));
+ g_key_file_set_string (key_file,
+ group_name,
+ "creation_time",
+ NONULL_STRING (s));
+ g_free (s);
+
+ g_free (group_name);
+}
+
diff --git a/src/ck-session.h b/src/ck-session.h
index fea3a71..8c5c00e 100644
--- a/src/ck-session.h
+++ b/src/ck-session.h
@@ -74,6 +74,9 @@ CkSession * ck_session_new_with_parameters (const char *ss
const char *cookie,
const GPtrArray *parameters);
+void ck_session_dump (CkSession *session,
+ GKeyFile *key_file);
+
gboolean ck_session_set_active (CkSession *session,
gboolean active,
GError **error);
diff --git a/src/ck-sysdeps-solaris.c b/src/ck-sysdeps-solaris.c
index 9cfec2e..87bf4fd 100644
--- a/src/ck-sysdeps-solaris.c
+++ b/src/ck-sysdeps-solaris.c
@@ -30,6 +30,10 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
+#ifdef HAVE_SYS_VT_H
+#include <sys/vt.h>
+#endif
+
#define DEV_ENCODE(M,m) ( \
( (M&0xfff) << 8) | ( (m&0xfff00) << 12) | (m&0xff) \
)
@@ -173,16 +177,30 @@ stat2proc (pid_t pid,
snprintf (P->tty_text, sizeof P->tty_text, "%3d,%-3d", tty_maj, tty_min);
+ if (tty_maj == 15) {
+ snprintf (P->tty_text, sizeof P->tty_text, "/dev/vt/%u", tty_min);
+ }
if (tty_maj == 24) {
- snprintf (P->tty_text, sizeof P->tty_text, "pts/%-3u", tty_min);
+ snprintf (P->tty_text, sizeof P->tty_text, "/dev/pts/%u", tty_min);
}
if (P->tty == NO_TTY_VALUE) {
+#ifdef HAVE_SYS_VT_H
memcpy (P->tty_text, " ? ", 8);
+#else
+ /*
+ * This is a bit of a hack. On Solaris, pre-VT integration, the
+ * Xorg process is not assigned a TTY. So, just assign the value
+ * to "/dev/console" if running without VT support. This will
+ * allow people using Solaris pre-VT integration to use
+ * ConsoleKit.
+ */
+ memcpy (P->tty_text, "/dev/console", 12);
+#endif
}
if (P->tty == DEV_ENCODE(0,0)) {
- memcpy (P->tty_text, "console", 8);
+ memcpy (P->tty_text, "/dev/console", 12);
}
if (P->pid != pid) {
@@ -256,7 +274,7 @@ ck_unix_pid_get_env_hash (pid_t pid)
if (skip_prefix != NULL) {
char **vals;
- vals = g_strsplit (buf, "=", 2);
+ vals = g_strsplit (skip_prefix + 1, "=", 2);
if (vals != NULL) {
g_hash_table_insert (hash,
g_strdup (vals[0]),
@@ -360,7 +378,7 @@ ck_get_max_num_consoles (guint *num)
error = NULL;
svcprop_stdout = NULL;
status = 0;
- res = g_spawn_command_line_sync ("/usr/bin/svcprop -p options/vtnodecount vtdaemon",
+ res = g_spawn_command_line_sync ("/usr/bin/svcprop -p options/nodecount vtdaemon",
&svcprop_stdout,
NULL,
&status,
@@ -395,7 +413,10 @@ ck_get_console_device_for_num (guint num)
{
char *device;
- device = g_strdup_printf ("/dev/vt/%u", num);
+ if (num == 1)
+ device = g_strdup_printf ("/dev/console", num);
+ else
+ device = g_strdup_printf ("/dev/vt/%u", num);
return device;
}
@@ -414,7 +435,9 @@ ck_get_console_num_from_device (const char *device,
return FALSE;
}
- if (sscanf (device, "/dev/vt/%u", &n) == 1) {
+ if (strcmp (device, "/dev/console") == 0) {
+ *num = 1;
+ } else if (sscanf (device, "/dev/vt/%u", &n) == 1) {
ret = TRUE;
}
@@ -432,6 +455,8 @@ ck_get_active_console_num (int console_fd,
gboolean ret;
int res;
guint active;
+
+#ifdef VT_GETSTATE
struct vt_stat stat;
g_assert (console_fd != -1);
@@ -464,6 +489,14 @@ ck_get_active_console_num (int console_fd,
if (num != NULL) {
*num = active;
}
+#else
+ /*
+ * If not using VT, not really an active number, but return 1,
+ * which maps to "/dev/console".
+ */
+ ret = TRUE;
+ *num = 1;
+#endif
return ret;
}
diff --git a/src/ck-sysdeps-unix.c b/src/ck-sysdeps-unix.c
index 0001b6b..e4ab16b 100644
--- a/src/ck-sysdeps-unix.c
+++ b/src/ck-sysdeps-unix.c
@@ -33,10 +33,13 @@
#ifdef __linux__
#include <linux/kd.h>
+#endif
+
+#ifdef HAVE_SYS_VT_H
#include <sys/vt.h>
#endif
-#ifdef __FreeBSD__
+#if HAVE_SYS_CONSIO_H
#include <sys/consio.h>
#endif
@@ -124,15 +127,15 @@ gboolean
ck_fd_is_a_console (int fd)
{
#ifdef __linux__
- char arg = 0;
+ struct vt_stat vts;
#elif defined(__FreeBSD__)
int vers;
#endif
int kb_ok;
+ errno = 0;
#ifdef __linux__
- kb_ok = (ioctl (fd, KDGKBTYPE, &arg) == 0
- && ((arg == KB_101) || (arg == KB_84)));
+ kb_ok = (ioctl (fd, VT_GETSTATE, &vts) == 0);
#elif defined(__FreeBSD__)
kb_ok = (ioctl (fd, CONS_GETVERS, &vers) == 0);
#else
@@ -193,6 +196,11 @@ ck_get_a_console_fd (void)
goto done;
}
+ fd = open_a_console ("/dev/tty0");
+ if (fd >= 0) {
+ goto done;
+ }
+
#ifdef _PATH_CONSOLE
fd = open_a_console (_PATH_CONSOLE);
if (fd >= 0) {
@@ -252,11 +260,15 @@ ck_wait_for_active_console_num (int console_fd,
again:
ret = FALSE;
- g_debug ("VT_WAITACTIVE for vt %d", num);
errno = 0;
+#ifdef VT_WAITACTIVE
+ g_debug ("VT_WAITACTIVE for vt %d", num);
res = ioctl (console_fd, VT_WAITACTIVE, num);
-
- g_debug ("VT_WAITACTIVE for vt %d returned %d", num, ret);
+ g_debug ("VT_WAITACTIVE for vt %d returned %d", num, res);
+#else
+ res = ERROR;
+ errno = ENOTSUP;
+#endif
if (res == ERROR) {
const char *errmsg;
@@ -268,6 +280,8 @@ ck_wait_for_active_console_num (int console_fd,
num,
errmsg);
goto again;
+ } else if (errno == ENOTSUP) {
+ g_debug ("Console activation not supported on this system");
} else {
g_warning ("Error waiting for native console %d activation: %s",
num,
@@ -294,11 +308,21 @@ ck_activate_console_num (int console_fd,
ret = FALSE;
errno = 0;
+#ifdef VT_ACTIVATE
res = ioctl (console_fd, VT_ACTIVATE, num);
+#else
+ res = ERROR;
+ errno = ENOTSUP;
+#endif
+
if (res == 0) {
ret = TRUE;
} else {
- g_warning ("Unable to activate console: %s", g_strerror (errno));
+ if (errno == ENOTSUP) {
+ g_debug ("Console activation not supported on this system");
+ } else {
+ g_warning ("Unable to activate console: %s", g_strerror (errno));
+ }
}
return ret;
diff --git a/src/ck-vt-monitor.c b/src/ck-vt-monitor.c
index 59d3d1c..d21026b 100644
--- a/src/ck-vt-monitor.c
+++ b/src/ck-vt-monitor.c
@@ -40,6 +40,12 @@
#include "ck-sysdeps.h"
#include "ck-marshal.h"
+#if defined (__sun) && defined (HAVE_SYS_VT_H)
+#include <sys/vt.h>
+#include <signal.h>
+#include <stropts.h>
+#endif
+
#ifndef ERROR
#define ERROR -1
#endif
@@ -157,6 +163,44 @@ ck_vt_monitor_get_active (CkVtMonitor *vt_monitor,
return TRUE;
}
+#if defined (__sun) && defined (HAVE_SYS_VT_H)
+static void
+handle_vt_active (void)
+{
+ struct vt_stat state;
+ guint num;
+ CkVtMonitor *vt_monitor = CK_VT_MONITOR (vt_object);
+
+ g_return_if_fail (CK_IS_VT_MONITOR (vt_monitor));
+
+ /*
+ * state.v_active value: [1 .. N]
+ *
+ * VT device file VT #
+ *
+ * /dev/console --- VT #1
+ * /dev/vt/2 --- VT #2
+ * /dev/vt/3 --- VT #3
+ * /dev/vt/N --- VT #4
+ */
+ if (ioctl (vt_monitor->priv->vfd, VT_GETSTATE, &state) != -1) {
+ num = state.v_active;
+ } else {
+ g_debug ("Fails to ioctl VT_GETSTATE");
+ }
+
+ if (vt_monitor->priv->active_num != num) {
+ g_debug ("Changing active VT: %d", num);
+
+ vt_monitor->priv->active_num = num;
+
+ g_signal_emit (vt_monitor, signals [ACTIVE_CHANGED], 0, num);
+ } else {
+ g_debug ("VT activated but already active: %d", num);
+ }
+}
+#endif
+
static void
change_active_num (CkVtMonitor *vt_monitor,
guint num)
@@ -338,6 +382,22 @@ vt_add_watches (CkVtMonitor *vt_monitor)
int i;
gint32 current_num;
+#if defined (__sun) && !defined (HAVE_SYS_VT_H)
+ /* Best to do nothing if VT is not supported */
+#elif defined (__sun) && defined (HAVE_SYS_VT_H)
+ /*
+ * Solaris supports synchronous event notification in STREAMS.
+ * Applications that open the virtual console device can
+ * get a asynchronous notification of VT switching by setting
+ * the S_MSG flag in an I_SETSIG STREAMS ioctl. Such processes
+ * receive a SIGPOLL signal when a VT switching succeeds.
+ */
+ struct sigaction act;
+ act.sa_handler = handle_vt_active;
+ sigaction (SIGPOLL, &act, NULL);
+
+ ioctl (vt_monitor->priv->vfd, I_SETSIG, S_MSG);
+#else
G_LOCK (hash_lock);
current_num = vt_monitor->priv->active_num;
@@ -365,6 +425,7 @@ vt_add_watches (CkVtMonitor *vt_monitor)
}
G_UNLOCK (hash_lock);
+#endif
}
static void
diff --git a/src/main.c b/src/main.c
index 11b6f2e..adc0d71 100644
--- a/src/main.c
+++ b/src/main.c
@@ -252,6 +252,42 @@ setup_debug_log (gboolean debug)
setup_debug_log_signals ();
}
+static void
+create_pid_file (void)
+{
+ char *dirname;
+ int res;
+ int pf;
+ ssize_t written;
+ char pid[9];
+
+ /* remove old pid file */
+ unlink (CONSOLE_KIT_PID_FILE);
+
+ dirname = g_path_get_dirname (CONSOLE_KIT_PID_FILE);
+ errno = 0;
+ res = g_mkdir_with_parents (dirname,
+ S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+ if (res < 0) {
+ g_warning ("Unable to create directory %s (%s)",
+ dirname,
+ g_strerror (errno));
+ }
+ g_free (dirname);
+
+ /* make a new pid file */
+ if ((pf = open (CONSOLE_KIT_PID_FILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644)) > 0) {
+ snprintf (pid, sizeof (pid), "%lu\n", (long unsigned) getpid ());
+ written = write (pf, pid, strlen (pid));
+ close (pf);
+ g_atexit (delete_pid);
+ } else {
+ g_warning ("Unable to write pid file %s: %s",
+ CONSOLE_KIT_PID_FILE,
+ g_strerror (errno));
+ }
+}
+
int
main (int argc,
char **argv)
@@ -261,11 +297,9 @@ main (int argc,
GOptionContext *context;
DBusGProxy *bus_proxy;
DBusGConnection *connection;
+ GError *error;
int ret;
- int pf;
- ssize_t written;
- char pid[9];
-
+ gboolean res;
static gboolean debug = FALSE;
static gboolean no_daemon = FALSE;
static gboolean do_timed_exit = FALSE;
@@ -289,10 +323,21 @@ main (int argc,
exit (1);
}
+ if (debug) {
+ g_setenv ("G_DEBUG", "fatal_criticals", FALSE);
+ g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
+ }
+
context = g_option_context_new (_("Console kit daemon"));
g_option_context_add_main_entries (context, entries, NULL);
- g_option_context_parse (context, &argc, &argv, NULL);
+ error = NULL;
+ res = g_option_context_parse (context, &argc, &argv, &error);
g_option_context_free (context);
+ if (! res) {
+ g_warning (error->message);
+ g_error_free (error);
+ goto out;
+ }
if (! no_daemon && daemon (0, 0)) {
g_error ("Could not daemonize: %s", g_strerror (errno));
@@ -318,16 +363,7 @@ main (int argc,
g_debug ("initializing console-kit-daemon %s", VERSION);
- /* remove old pid file */
- unlink (CONSOLE_KIT_PID_FILE);
-
- /* make a new pid file */
- if ((pf = open (CONSOLE_KIT_PID_FILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644)) > 0) {
- snprintf (pid, sizeof (pid), "%lu\n", (long unsigned) getpid ());
- written = write (pf, pid, strlen (pid));
- close (pf);
- g_atexit (delete_pid);
- }
+ create_pid_file ();
manager = ck_manager_new ();
diff --git a/src/test-event-logger.c b/src/test-event-logger.c
new file mode 100644
index 0000000..e3d7db0
--- /dev/null
+++ b/src/test-event-logger.c
@@ -0,0 +1,94 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <pwd.h>
+#include <string.h>
+#include <errno.h>
+
+#include <locale.h>
+
+#include <glib.h>
+
+#include "ck-event-logger.h"
+
+static gboolean
+write_to_log (CkEventLogger *logger)
+{
+ CkLogEvent event;
+ GError *error;
+ gboolean res;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SEAT_SESSION_ADDED;
+ g_get_current_time (&event.timestamp);
+
+ event.event.seat_session_added.session_id = "Session1";
+
+ error = NULL;
+ res = ck_event_logger_queue_event (logger, &event, &error);
+ if (! res) {
+ g_warning ("Unable to queue event: %s", error->message);
+ g_error_free (error);
+ }
+
+ return TRUE;
+}
+
+int
+main (int argc, char **argv)
+{
+ GMainLoop *loop;
+ CkEventLogger *logger;
+ char *filename;
+
+ if (! g_thread_supported ()) {
+ g_thread_init (NULL);
+ }
+ g_type_init ();
+
+ filename = g_build_filename (g_get_tmp_dir (), "ck-logger-test.log", NULL);
+
+ g_message ("Testing the event logger.\n Should write messages to: %s", filename);
+ logger = ck_event_logger_new (filename);
+ g_free (filename);
+
+ g_timeout_add (1000, (GSourceFunc)write_to_log, logger);
+
+ loop = g_main_loop_new (NULL, FALSE);
+
+ g_main_loop_run (loop);
+
+ g_object_unref (logger);
+
+ g_main_loop_unref (loop);
+
+ return 0;
+}
diff --git a/src/test-open-session-with-parameters b/src/test-open-session-with-parameters
index e9e3358..ce622ce 100755
--- a/src/test-open-session-with-parameters
+++ b/src/test-open-session-with-parameters
@@ -15,7 +15,7 @@ manager_obj = bus.get_object ('org.freedesktop.ConsoleKit', '/org/freedesktop/Co
manager = dbus.Interface (manager_obj, 'org.freedesktop.ConsoleKit.Manager')
params = dbus.Array ([], signature = "sv")
-params.append (("user", dbus.Variant (730)))
+params.append (("unix-user", dbus.Variant (730)))
params.append (("session-type", dbus.Variant ("gnome-session")))
#params.append (("x11-display", dbus.Variant (":0.0")))
params.append (("display-device", dbus.Variant ("/dev/tty8")))
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 5283e18..13c191f 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -10,14 +10,25 @@ if CK_COMPILE_LINUX
SUBDIRS += linux
endif
+if CK_COMPILE_FREEBSD
+SUBDIRS += freebsd
+endif
+
+if CK_COMPILE_SOLARIS
+SUBDIRS += solaris
+endif
+
DIST_SUBDIRS = \
linux \
+ freebsd \
+ solaris \
$(NULL)
INCLUDES = \
-I. \
-I$(srcdir) \
-I$(top_srcdir)/src \
+ -I$(top_srcdir)/libck-connector \
$(CONSOLE_KIT_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
-DPREFIX=\""$(prefix)"\" \
@@ -26,13 +37,32 @@ INCLUDES = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
+ -DLOCALSTATEDIR=\""$(localstatedir)"\" \
+ $(HISTORY_CFLAGS) \
$(WARN_CFLAGS) \
$(DEBUG_CFLAGS) \
$(DBUS_CFLAGS) \
$(NULL)
bin_PROGRAMS = \
+ ck-launch-session \
ck-list-sessions \
+ ck-history \
+ $(NULL)
+
+sbin_PROGRAMS = \
+ ck-log-system-start \
+ ck-log-system-restart \
+ ck-log-system-stop \
+ $(NULL)
+
+ck_launch_session_SOURCES = \
+ ck-launch-session.c \
+ $(NULL)
+
+ck_launch_session_LDADD = \
+ $(top_builddir)/libck-connector/libck-connector.la \
+ $(CONSOLE_KIT_LIBS) \
$(NULL)
ck_list_sessions_SOURCES = \
@@ -43,6 +73,42 @@ ck_list_sessions_LDADD = \
$(CONSOLE_KIT_LIBS) \
$(NULL)
+ck_history_SOURCES = \
+ ck-history.c \
+ $(NULL)
+
+ck_history_LDADD = \
+ $(HISTORY_LIBS) \
+ $(Z_LIBS) \
+ $(top_builddir)/src/libck-event-log.la \
+ $(NULL)
+
+ck_log_system_start_SOURCES = \
+ ck-log-system-start.c \
+ $(NULL)
+
+ck_log_system_start_LDADD = \
+ $(HISTORY_LIBS) \
+ $(top_builddir)/src/libck-event-log.la \
+ $(NULL)
+
+ck_log_system_restart_SOURCES = \
+ ck-log-system-restart.c \
+ $(NULL)
+
+ck_log_system_restart_LDADD = \
+ $(HISTORY_LIBS) \
+ $(top_builddir)/src/libck-event-log.la \
+ $(NULL)
+
+ck_log_system_stop_SOURCES = \
+ ck-log-system-stop.c \
+ $(NULL)
+
+ck_log_system_stop_LDADD = \
+ $(HISTORY_LIBS) \
+ $(top_builddir)/src/libck-event-log.la \
+ $(NULL)
libexec_PROGRAMS = \
ck-collect-session-info \
diff --git a/tools/Makefile.in b/tools/Makefile.in
index a876d3b..a6ffb73 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,15 +14,11 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,7 +33,13 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@CK_COMPILE_LINUX_TRUE@am__append_1 = linux
-bin_PROGRAMS = ck-list-sessions$(EXEEXT) $(am__EXEEXT_1)
+@CK_COMPILE_FREEBSD_TRUE@am__append_2 = freebsd
+@CK_COMPILE_SOLARIS_TRUE@am__append_3 = solaris
+bin_PROGRAMS = ck-launch-session$(EXEEXT) ck-list-sessions$(EXEEXT) \
+ ck-history$(EXEEXT) $(am__EXEEXT_1)
+sbin_PROGRAMS = ck-log-system-start$(EXEEXT) \
+ ck-log-system-restart$(EXEEXT) ck-log-system-stop$(EXEEXT) \
+ $(am__EXEEXT_1)
libexec_PROGRAMS = ck-collect-session-info$(EXEEXT) \
ck-get-x11-server-pid$(EXEEXT) \
ck-get-x11-display-device$(EXEEXT) $(am__EXEEXT_1)
@@ -52,10 +54,12 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__EXEEXT_1 =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)"
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS)
+sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
am__objects_1 =
am_ck_collect_session_info_OBJECTS = \
ck-collect-session-info.$(OBJEXT) $(am__objects_1)
@@ -75,39 +79,72 @@ am_ck_get_x11_server_pid_OBJECTS = ck-get-x11-server-pid.$(OBJEXT) \
ck_get_x11_server_pid_OBJECTS = $(am_ck_get_x11_server_pid_OBJECTS)
ck_get_x11_server_pid_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(top_builddir)/src/libck.la $(am__DEPENDENCIES_1)
+am_ck_history_OBJECTS = ck-history.$(OBJEXT) $(am__objects_1)
+ck_history_OBJECTS = $(am_ck_history_OBJECTS)
+ck_history_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/libck-event-log.la $(am__DEPENDENCIES_1)
+am_ck_launch_session_OBJECTS = ck-launch-session.$(OBJEXT) \
+ $(am__objects_1)
+ck_launch_session_OBJECTS = $(am_ck_launch_session_OBJECTS)
+ck_launch_session_DEPENDENCIES = \
+ $(top_builddir)/libck-connector/libck-connector.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_ck_list_sessions_OBJECTS = list-sessions.$(OBJEXT) $(am__objects_1)
ck_list_sessions_OBJECTS = $(am_ck_list_sessions_OBJECTS)
ck_list_sessions_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+am_ck_log_system_restart_OBJECTS = ck-log-system-restart.$(OBJEXT) \
+ $(am__objects_1)
+ck_log_system_restart_OBJECTS = $(am_ck_log_system_restart_OBJECTS)
+ck_log_system_restart_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/libck-event-log.la $(am__DEPENDENCIES_1)
+am_ck_log_system_start_OBJECTS = ck-log-system-start.$(OBJEXT) \
+ $(am__objects_1)
+ck_log_system_start_OBJECTS = $(am_ck_log_system_start_OBJECTS)
+ck_log_system_start_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/libck-event-log.la $(am__DEPENDENCIES_1)
+am_ck_log_system_stop_OBJECTS = ck-log-system-stop.$(OBJEXT) \
+ $(am__objects_1)
+ck_log_system_stop_OBJECTS = $(am_ck_log_system_stop_OBJECTS)
+ck_log_system_stop_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/libck-event-log.la $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(ck_collect_session_info_SOURCES) \
$(ck_get_x11_display_device_SOURCES) \
- $(ck_get_x11_server_pid_SOURCES) $(ck_list_sessions_SOURCES)
+ $(ck_get_x11_server_pid_SOURCES) $(ck_history_SOURCES) \
+ $(ck_launch_session_SOURCES) $(ck_list_sessions_SOURCES) \
+ $(ck_log_system_restart_SOURCES) \
+ $(ck_log_system_start_SOURCES) $(ck_log_system_stop_SOURCES)
DIST_SOURCES = $(ck_collect_session_info_SOURCES) \
$(ck_get_x11_display_device_SOURCES) \
- $(ck_get_x11_server_pid_SOURCES) $(ck_list_sessions_SOURCES)
+ $(ck_get_x11_server_pid_SOURCES) $(ck_history_SOURCES) \
+ $(ck_launch_session_SOURCES) $(ck_list_sessions_SOURCES) \
+ $(ck_log_system_restart_SOURCES) \
+ $(ck_log_system_start_SOURCES) $(ck_log_system_stop_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -120,12 +157,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CK_BACKEND = @CK_BACKEND@
-CK_COMPILE_FREEBSD_FALSE = @CK_COMPILE_FREEBSD_FALSE@
-CK_COMPILE_FREEBSD_TRUE = @CK_COMPILE_FREEBSD_TRUE@
-CK_COMPILE_LINUX_FALSE = @CK_COMPILE_LINUX_FALSE@
-CK_COMPILE_LINUX_TRUE = @CK_COMPILE_LINUX_TRUE@
-CK_COMPILE_SOLARIS_FALSE = @CK_COMPILE_SOLARIS_FALSE@
-CK_COMPILE_SOLARIS_TRUE = @CK_COMPILE_SOLARIS_TRUE@
CONSOLE_KIT_CFLAGS = @CONSOLE_KIT_CFLAGS@
CONSOLE_KIT_LIBS = @CONSOLE_KIT_LIBS@
CONSOLE_KIT_PID_FILE = @CONSOLE_KIT_PID_FILE@
@@ -142,17 +173,11 @@ DBUS_SYS_DIR = @DBUS_SYS_DIR@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DOCBOOK_DOCS_ENABLED_FALSE = @DOCBOOK_DOCS_ENABLED_FALSE@
-DOCBOOK_DOCS_ENABLED_TRUE = @DOCBOOK_DOCS_ENABLED_TRUE@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_INOTIFY_FALSE = @ENABLE_INOTIFY_FALSE@
-ENABLE_INOTIFY_TRUE = @ENABLE_INOTIFY_TRUE@
-ENABLE_PAM_MODULE_FALSE = @ENABLE_PAM_MODULE_FALSE@
-ENABLE_PAM_MODULE_TRUE = @ENABLE_PAM_MODULE_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
@@ -162,8 +187,10 @@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_PAM = @HAVE_PAM@
-HAVE_PAM_FALSE = @HAVE_PAM_FALSE@
-HAVE_PAM_TRUE = @HAVE_PAM_TRUE@
+HAVE_POLKIT = @HAVE_POLKIT@
+HISTORY_CFLAGS = @HISTORY_CFLAGS@
+HISTORY_LIBS = @HISTORY_LIBS@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -180,9 +207,8 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
@@ -198,10 +224,13 @@ PAM_MODULE_DIR = @PAM_MODULE_DIR@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+RBAC_LIBS = @RBAC_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -212,13 +241,14 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
XMLTO = @XMLTO@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -230,6 +260,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -257,19 +288,25 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.7
NULL =
-SUBDIRS = $(NULL) $(am__append_1)
+SUBDIRS = $(NULL) $(am__append_1) $(am__append_2) $(am__append_3)
DIST_SUBDIRS = \
linux \
+ freebsd \
+ solaris \
$(NULL)
INCLUDES = \
-I. \
-I$(srcdir) \
-I$(top_srcdir)/src \
+ -I$(top_srcdir)/libck-connector \
$(CONSOLE_KIT_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
-DPREFIX=\""$(prefix)"\" \
@@ -278,11 +315,22 @@ INCLUDES = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
+ -DLOCALSTATEDIR=\""$(localstatedir)"\" \
+ $(HISTORY_CFLAGS) \
$(WARN_CFLAGS) \
$(DEBUG_CFLAGS) \
$(DBUS_CFLAGS) \
$(NULL)
+ck_launch_session_SOURCES = \
+ ck-launch-session.c \
+ $(NULL)
+
+ck_launch_session_LDADD = \
+ $(top_builddir)/libck-connector/libck-connector.la \
+ $(CONSOLE_KIT_LIBS) \
+ $(NULL)
+
ck_list_sessions_SOURCES = \
list-sessions.c \
$(NULL)
@@ -291,6 +339,43 @@ ck_list_sessions_LDADD = \
$(CONSOLE_KIT_LIBS) \
$(NULL)
+ck_history_SOURCES = \
+ ck-history.c \
+ $(NULL)
+
+ck_history_LDADD = \
+ $(HISTORY_LIBS) \
+ $(Z_LIBS) \
+ $(top_builddir)/src/libck-event-log.la \
+ $(NULL)
+
+ck_log_system_start_SOURCES = \
+ ck-log-system-start.c \
+ $(NULL)
+
+ck_log_system_start_LDADD = \
+ $(HISTORY_LIBS) \
+ $(top_builddir)/src/libck-event-log.la \
+ $(NULL)
+
+ck_log_system_restart_SOURCES = \
+ ck-log-system-restart.c \
+ $(NULL)
+
+ck_log_system_restart_LDADD = \
+ $(HISTORY_LIBS) \
+ $(top_builddir)/src/libck-event-log.la \
+ $(NULL)
+
+ck_log_system_stop_SOURCES = \
+ ck-log-system-stop.c \
+ $(NULL)
+
+ck_log_system_stop_LDADD = \
+ $(HISTORY_LIBS) \
+ $(top_builddir)/src/libck-event-log.la \
+ $(NULL)
+
ck_collect_session_info_SOURCES = \
ck-collect-session-info.c \
$(NULL)
@@ -360,7 +445,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@@ -388,7 +473,7 @@ clean-binPROGRAMS:
done
install-libexecPROGRAMS: $(libexec_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
@list='$(libexec_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@@ -414,18 +499,61 @@ clean-libexecPROGRAMS:
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-sbinPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(sbindir)/$$f"; \
+ done
+
+clean-sbinPROGRAMS:
+ @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
ck-collect-session-info$(EXEEXT): $(ck_collect_session_info_OBJECTS) $(ck_collect_session_info_DEPENDENCIES)
@rm -f ck-collect-session-info$(EXEEXT)
- $(LINK) $(ck_collect_session_info_LDFLAGS) $(ck_collect_session_info_OBJECTS) $(ck_collect_session_info_LDADD) $(LIBS)
+ $(LINK) $(ck_collect_session_info_OBJECTS) $(ck_collect_session_info_LDADD) $(LIBS)
ck-get-x11-display-device$(EXEEXT): $(ck_get_x11_display_device_OBJECTS) $(ck_get_x11_display_device_DEPENDENCIES)
@rm -f ck-get-x11-display-device$(EXEEXT)
- $(LINK) $(ck_get_x11_display_device_LDFLAGS) $(ck_get_x11_display_device_OBJECTS) $(ck_get_x11_display_device_LDADD) $(LIBS)
+ $(LINK) $(ck_get_x11_display_device_OBJECTS) $(ck_get_x11_display_device_LDADD) $(LIBS)
ck-get-x11-server-pid$(EXEEXT): $(ck_get_x11_server_pid_OBJECTS) $(ck_get_x11_server_pid_DEPENDENCIES)
@rm -f ck-get-x11-server-pid$(EXEEXT)
- $(LINK) $(ck_get_x11_server_pid_LDFLAGS) $(ck_get_x11_server_pid_OBJECTS) $(ck_get_x11_server_pid_LDADD) $(LIBS)
+ $(LINK) $(ck_get_x11_server_pid_OBJECTS) $(ck_get_x11_server_pid_LDADD) $(LIBS)
+ck-history$(EXEEXT): $(ck_history_OBJECTS) $(ck_history_DEPENDENCIES)
+ @rm -f ck-history$(EXEEXT)
+ $(LINK) $(ck_history_OBJECTS) $(ck_history_LDADD) $(LIBS)
+ck-launch-session$(EXEEXT): $(ck_launch_session_OBJECTS) $(ck_launch_session_DEPENDENCIES)
+ @rm -f ck-launch-session$(EXEEXT)
+ $(LINK) $(ck_launch_session_OBJECTS) $(ck_launch_session_LDADD) $(LIBS)
ck-list-sessions$(EXEEXT): $(ck_list_sessions_OBJECTS) $(ck_list_sessions_DEPENDENCIES)
@rm -f ck-list-sessions$(EXEEXT)
- $(LINK) $(ck_list_sessions_LDFLAGS) $(ck_list_sessions_OBJECTS) $(ck_list_sessions_LDADD) $(LIBS)
+ $(LINK) $(ck_list_sessions_OBJECTS) $(ck_list_sessions_LDADD) $(LIBS)
+ck-log-system-restart$(EXEEXT): $(ck_log_system_restart_OBJECTS) $(ck_log_system_restart_DEPENDENCIES)
+ @rm -f ck-log-system-restart$(EXEEXT)
+ $(LINK) $(ck_log_system_restart_OBJECTS) $(ck_log_system_restart_LDADD) $(LIBS)
+ck-log-system-start$(EXEEXT): $(ck_log_system_start_OBJECTS) $(ck_log_system_start_DEPENDENCIES)
+ @rm -f ck-log-system-start$(EXEEXT)
+ $(LINK) $(ck_log_system_start_OBJECTS) $(ck_log_system_start_LDADD) $(LIBS)
+ck-log-system-stop$(EXEEXT): $(ck_log_system_stop_OBJECTS) $(ck_log_system_stop_DEPENDENCIES)
+ @rm -f ck-log-system-stop$(EXEEXT)
+ $(LINK) $(ck_log_system_stop_OBJECTS) $(ck_log_system_stop_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -436,25 +564,30 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-collect-session-info.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-get-x11-display-device.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-get-x11-server-pid.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-history.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-launch-session.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-log-system-restart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-log-system-start.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-log-system-stop.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list-sessions.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -465,10 +598,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@@ -500,8 +629,7 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
@@ -602,22 +730,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -631,7 +758,7 @@ distdir: $(DISTFILES)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -639,6 +766,8 @@ distdir: $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
@@ -648,8 +777,8 @@ check: check-recursive
all-am: Makefile $(PROGRAMS)
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
@@ -679,13 +808,13 @@ maintainer-clean-generic:
clean: clean-recursive
clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
- clean-libtool mostlyclean-am
+ clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-recursive
@@ -699,12 +828,21 @@ info-am:
install-data-am:
-install-exec-am: install-binPROGRAMS install-libexecPROGRAMS
+install-dvi: install-dvi-recursive
+
+install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
+ install-sbinPROGRAMS
+
+install-html: install-html-recursive
install-info: install-info-recursive
install-man:
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -725,27 +863,30 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
- uninstall-libexecPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
+ uninstall-sbinPROGRAMS
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
- clean-libtool clean-recursive ctags ctags-recursive distclean \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libexecPROGRAMS clean-libtool \
+ clean-sbinPROGRAMS ctags ctags-recursive distclean \
distclean-compile distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-binPROGRAMS \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-libexecPROGRAMS \
- install-man install-strip installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libexecPROGRAMS install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinPROGRAMS install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am \
- uninstall-libexecPROGRAMS
+ uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
+ uninstall-sbinPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tools/ck-collect-session-info.c b/tools/ck-collect-session-info.c
index 45abb07..334c088 100644
--- a/tools/ck-collect-session-info.c
+++ b/tools/ck-collect-session-info.c
@@ -42,7 +42,6 @@ typedef struct {
char *x11_display;
gboolean x11_can_connect;
char *remote_host_name;
- char *session_type;
gboolean is_local;
gboolean is_local_is_set;
} SessionInfo;
@@ -54,7 +53,6 @@ session_info_free (SessionInfo *si)
g_free (si->x11_display_device);
g_free (si->x11_display);
g_free (si->remote_host_name);
- g_free (si->session_type);
g_free (si);
}
@@ -300,7 +298,6 @@ fill_session_info (SessionInfo *si)
}
si->display_device = ck_process_stat_get_tty (stat);
- si->session_type = ck_process_stat_get_cmd (stat);
ck_process_stat_free (stat);
fill_x11_info (si);
@@ -328,9 +325,6 @@ print_session_info (SessionInfo *si)
if (si->display_device != NULL) {
printf ("display-device = %s\n", si->display_device);
}
- if (si->session_type != NULL) {
- printf ("session-type = %s\n", si->session_type);
- }
if (si->remote_host_name != NULL) {
printf ("remote-host-name = %s\n", si->remote_host_name);
}
diff --git a/tools/ck-history.c b/tools/ck-history.c
new file mode 100644
index 0000000..716c3ef
--- /dev/null
+++ b/tools/ck-history.c
@@ -0,0 +1,866 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <string.h>
+#include <errno.h>
+
+#include <locale.h>
+#include <zlib.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib/gstdio.h>
+
+#include "ck-log-event.h"
+
+typedef enum {
+ REPORT_TYPE_SUMMARY = 0,
+ REPORT_TYPE_LAST,
+ REPORT_TYPE_LAST_COMPAT,
+ REPORT_TYPE_FREQUENT,
+ REPORT_TYPE_LOG,
+} ReportType;
+
+/* same record types as sysvinit last */
+typedef enum {
+ RECORD_STATUS_CRASH = 1, /* No logout record, system boot in between */
+ RECORD_STATUS_DOWN, /* System brought down in decent way */
+ RECORD_STATUS_NORMAL, /* Normal */
+ RECORD_STATUS_NOW, /* Still logged in */
+ RECORD_STATUS_REBOOT, /* Reboot record. */
+ RECORD_STATUS_PHANTOM, /* No logout record but session is stale. */
+ RECORD_STATUS_TIMECHANGE, /* NEW_TIME or OLD_TIME */
+} RecordStatus;
+
+#define DEFAULT_LOG_FILENAME LOCALSTATEDIR "/log/ConsoleKit/history"
+#define MAX_LINE_LEN 2048
+
+static GList *all_events = NULL;
+
+static gboolean
+process_event_line (const char *line)
+{
+ GString *str;
+ CkLogEvent *event;
+
+ str = g_string_new (line);
+ event = ck_log_event_new_from_string (str);
+ g_string_free (str, TRUE);
+
+ if (event != NULL) {
+ all_events = g_list_prepend (all_events, event);
+ }
+
+ return TRUE;
+}
+
+static gboolean
+process_log_gzstream (gzFile *fstream)
+{
+ char line[MAX_LINE_LEN];
+
+ while (gzgets (fstream, line, sizeof (line)) != Z_NULL) {
+ if (strlen (line) == sizeof (line) - 1) {
+ g_warning ("Log line truncated");
+ }
+
+ process_event_line (line);
+ }
+
+ return TRUE;
+}
+
+static gboolean
+process_log_stream (FILE *fstream)
+{
+ char line[MAX_LINE_LEN];
+
+ while (fgets (line, sizeof (line), fstream) != NULL) {
+ if (strlen (line) == sizeof (line) - 1) {
+ g_warning ("Log line truncated");
+ }
+
+ process_event_line (line);
+ }
+
+ return TRUE;
+}
+
+static gboolean
+process_log_file (const char *filename)
+{
+ gboolean ret;
+
+ if (g_str_has_suffix (filename, ".gz")) {
+ gzFile *f;
+ f = gzopen (filename, "r");
+ if (f == NULL) {
+ int errnum;
+ const char *errmsg;
+ errmsg = gzerror (f, &errnum);
+ if (errnum == Z_ERRNO) {
+ errmsg = g_strerror (errno);
+ }
+ g_warning ("Error opening %s (%s)\n",
+ filename,
+ errmsg);
+ return FALSE;
+ }
+ ret = process_log_gzstream (f);
+ gzclose (f);
+ } else {
+ FILE *f;
+
+ f = g_fopen (filename, "r");
+ if (f == NULL) {
+ g_warning ("Error opening %s (%s)\n",
+ filename,
+ g_strerror (errno));
+ return FALSE;
+ }
+ ret = process_log_stream (f);
+ fclose (f);
+ }
+
+ return ret;
+}
+
+static GList *
+get_log_file_list (void)
+{
+ int num;
+ GList *files;
+
+ /* always try the primary file */
+ files = NULL;
+ files = g_list_prepend (files, g_strdup (DEFAULT_LOG_FILENAME));
+ num = 1;
+ while (1) {
+ char *filename;
+ filename = g_strdup_printf ("%s.%d", DEFAULT_LOG_FILENAME, num);
+ if (g_access (filename, R_OK) != 0) {
+ char *filename_gz;
+
+ /* check for .gz */
+ filename_gz = g_strdup_printf ("%s.gz", filename);
+ g_free (filename);
+
+ if (g_access (filename_gz, R_OK) != 0) {
+ g_free (filename_gz);
+ break;
+ }
+ filename = filename_gz;
+ }
+ num++;
+ files = g_list_prepend (files, filename);
+ };
+
+ return files;
+}
+
+static gboolean
+process_logs (void)
+{
+ gboolean ret;
+ GList *files;
+ GList *l;
+
+ ret = FALSE;
+
+ files = get_log_file_list ();
+
+ for (l = files; l != NULL; l = l->next) {
+ gboolean res;
+ char *filename;
+
+ filename = l->data;
+
+ res = process_log_file (filename);
+ if (! res) {
+ goto out;
+ }
+ }
+
+ ret = TRUE;
+
+ out:
+ g_list_foreach (files, (GFunc)g_free, NULL);
+ g_list_free (files);
+
+ return ret;
+}
+
+static void
+generate_report_summary (int uid,
+ const char *seat,
+ const char *session_type)
+{
+}
+
+static CkLogEvent *
+find_first_matching_remove_event (GList *events,
+ CkLogSeatSessionAddedEvent *event)
+{
+ CkLogEvent *revent;
+ GList *l;
+
+ revent = NULL;
+
+ for (l = events; l != NULL; l = l->next) {
+ CkLogEventType etype;
+
+ etype = ((CkLogEvent *)l->data)->type;
+ /* skip all non removal events */
+ if (etype != CK_LOG_EVENT_SEAT_SESSION_REMOVED
+ || etype == CK_LOG_EVENT_SYSTEM_START
+ || etype == CK_LOG_EVENT_SYSTEM_STOP
+ || etype == CK_LOG_EVENT_SYSTEM_RESTART) {
+ continue;
+ }
+
+ if (etype == CK_LOG_EVENT_SEAT_SESSION_REMOVED) {
+ CkLogSeatSessionRemovedEvent *e;
+ e = l->data;
+
+ if (e->session_id != NULL
+ && event->session_id != NULL
+ && strcmp (e->session_id, event->session_id) == 0) {
+ revent = (CkLogEvent *)l->data;
+ break;
+ }
+ } else {
+ revent = (CkLogEvent *)l->data;
+ break;
+ }
+ }
+
+ return revent;
+}
+
+static char *
+get_user_name_for_uid (int uid)
+{
+ struct passwd *pwent;
+ char *name;
+
+ name = NULL;
+
+ pwent = getpwuid (uid);
+
+ if (pwent != NULL) {
+ name = g_strdup (pwent->pw_name);
+ }
+
+ return name;
+}
+
+static int
+get_uid_for_username (const char *username)
+{
+ struct passwd *pwent;
+ int uid;
+
+ g_assert (username != NULL);
+
+ uid = -1;
+
+ pwent = getpwnam (username);
+ if (pwent != NULL) {
+ uid = pwent->pw_uid;
+ }
+
+ return uid;
+}
+
+static char *
+get_utline_for_event (CkLogEvent *event)
+{
+ char *utline;
+
+ utline = NULL;
+
+ switch (event->type) {
+ case CK_LOG_EVENT_SEAT_SESSION_ADDED:
+ {
+ CkLogSeatSessionAddedEvent *e;
+ e = (CkLogSeatSessionAddedEvent *)event;
+ if (e->session_x11_display != NULL && e->session_x11_display[0] != '\0') {
+ utline = g_strdup (e->session_x11_display);
+ } else {
+ if (g_str_has_prefix (e->session_display_device, "/dev/")) {
+ utline = g_strdup (e->session_display_device + 5);
+ } else {
+ utline = g_strdup (e->session_display_device);
+ }
+ }
+ }
+ break;
+ case CK_LOG_EVENT_SYSTEM_START:
+ utline = g_strdup ("system boot");
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ return utline;
+}
+
+static char *
+get_user_name_for_event (CkLogEvent *event)
+{
+ char *username;
+
+ username = NULL;
+
+ switch (event->type) {
+ case CK_LOG_EVENT_SEAT_SESSION_ADDED:
+ username = get_user_name_for_uid (((CkLogSeatSessionAddedEvent *)event)->session_unix_user);
+ break;
+ case CK_LOG_EVENT_SYSTEM_START:
+ username = g_strdup ("reboot");
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ return username;
+}
+
+static char *
+get_host_for_event (CkLogEvent *event)
+{
+ char *username;
+
+ username = NULL;
+
+ switch (event->type) {
+ case CK_LOG_EVENT_SEAT_SESSION_ADDED:
+ username = g_strdup (((CkLogSeatSessionAddedEvent *)event)->session_remote_host_name);
+ break;
+ case CK_LOG_EVENT_SYSTEM_START:
+ /* FIXME: get kernel version */
+ username = g_strdup ("");
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ return username;
+}
+
+static RecordStatus
+get_event_record_status (CkLogEvent *remove_event)
+{
+ RecordStatus status;
+
+ status = RECORD_STATUS_NOW;
+
+ if (remove_event == NULL) {
+ goto out;
+ }
+
+ if (remove_event->type == CK_LOG_EVENT_SEAT_SESSION_REMOVED) {
+ status = RECORD_STATUS_NORMAL;
+ } else if (remove_event->type == CK_LOG_EVENT_SYSTEM_START) {
+ status = RECORD_STATUS_CRASH;
+ } else if (remove_event->type == CK_LOG_EVENT_SYSTEM_STOP) {
+ status = RECORD_STATUS_DOWN;
+ } else if (remove_event->type == CK_LOG_EVENT_SYSTEM_RESTART) {
+ status = RECORD_STATUS_DOWN;
+ }
+
+ out:
+ return status;
+}
+
+static char *
+get_duration (CkLogEvent *event,
+ CkLogEvent *remove_event)
+{
+ time_t secs;
+ int mins;
+ int hours;
+ int days;
+ char *duration;
+
+ secs = remove_event->timestamp.tv_sec - event->timestamp.tv_sec;
+ mins = (secs / 60) % 60;
+ hours = (secs / 3600) % 24;
+ days = secs / 86400;
+ if (days > 0) {
+ duration = g_strdup_printf ("(%d+%02d:%02d)", days, hours, mins);
+ } else {
+ duration = g_strdup_printf (" (%02d:%02d)", hours, mins);
+ }
+ return duration;
+}
+
+static void
+print_last_report_record (GList *list,
+ CkLogEvent *event,
+ gboolean legacy_compat)
+{
+ GString *str;
+ char *username;
+ char *utline;
+ char *host;
+ char *addedtime;
+ char *removedtime;
+ char *duration;
+ char *session_type;
+ char *session_id;
+ char *seat_id;
+ CkLogSeatSessionAddedEvent *e;
+ CkLogEvent *remove_event;
+ RecordStatus status;
+
+ if (event->type != CK_LOG_EVENT_SEAT_SESSION_ADDED
+ && event->type != CK_LOG_EVENT_SYSTEM_START) {
+ return;
+ }
+
+ remove_event = NULL;
+
+ if (event->type == CK_LOG_EVENT_SEAT_SESSION_ADDED) {
+ e = (CkLogSeatSessionAddedEvent *)event;
+
+ remove_event = find_first_matching_remove_event (list, e);
+ status = get_event_record_status (remove_event);
+
+ session_type = e->session_type;
+ session_id = e->session_id;
+ seat_id = e->seat_id;
+ } else {
+ status = RECORD_STATUS_REBOOT;
+
+ session_type = "";
+ session_id = "";
+ seat_id = "";
+ }
+
+ str = g_string_new (NULL);
+
+ username = get_user_name_for_event (event);
+ utline = get_utline_for_event (event);
+ host = get_host_for_event (event);
+
+ addedtime = g_strndup (ctime (&event->timestamp.tv_sec), 16);
+
+ if (legacy_compat) {
+ g_string_printf (str,
+ "%-8.8s %-12.12s %-16.16s %-16.16s",
+ username,
+ utline != NULL ? utline : "",
+ host != NULL ? host : "",
+ addedtime);
+ } else {
+ g_string_printf (str,
+ "%-8.8s %12s %-10.10s %-7.7s %-12.12s %-16.16s %-16.16s",
+ username,
+ session_type,
+ session_id,
+ seat_id,
+ utline,
+ host != NULL ? host : "",
+ addedtime);
+ }
+
+ g_free (username);
+ g_free (addedtime);
+ g_free (utline);
+ g_free (host);
+
+ removedtime = NULL;
+ duration = NULL;
+
+ switch (status) {
+ case RECORD_STATUS_CRASH:
+ duration = get_duration (event, remove_event);
+ removedtime = g_strdup ("- crash");
+ break;
+ case RECORD_STATUS_DOWN:
+ duration = get_duration (event, remove_event);
+ removedtime = g_strdup ("- down ");
+ break;
+ case RECORD_STATUS_NOW:
+ duration = g_strdup ("logged in");
+ removedtime = g_strdup (" still");
+ break;
+ case RECORD_STATUS_PHANTOM:
+ duration = g_strdup ("- no logout");
+ removedtime = g_strdup (" gone");
+ break;
+ case RECORD_STATUS_REBOOT:
+ removedtime = g_strdup ("");
+ break;
+ case RECORD_STATUS_TIMECHANGE:
+ removedtime = g_strdup ("");
+ break;
+ case RECORD_STATUS_NORMAL:
+ duration = get_duration (event, remove_event);
+ removedtime = g_strdup_printf ("- %s", ctime (&remove_event->timestamp.tv_sec) + 11);
+ removedtime[7] = 0;
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+
+ g_string_append_printf (str,
+ " %-7.7s %-12.12s",
+ removedtime,
+ duration);
+
+ g_print ("%s\n", str->str);
+ g_string_free (str, TRUE);
+ g_free (removedtime);
+ g_free (duration);
+}
+
+static void
+generate_report_last (int uid,
+ const char *seat,
+ const char *session_type)
+{
+ GList *oldest;
+ CkLogEvent *oldest_event;
+ GList *l;
+
+ /* print events in reverse time order */
+
+ for (l = g_list_last (all_events); l != NULL; l = l->prev) {
+ CkLogEvent *event;
+
+ event = l->data;
+
+ if (event->type == CK_LOG_EVENT_SEAT_SESSION_ADDED) {
+ CkLogSeatSessionAddedEvent *e;
+ e = (CkLogSeatSessionAddedEvent *)event;
+
+ if (uid >= 0 && e->session_unix_user != uid) {
+ continue;
+ }
+
+ if (seat != NULL && e->seat_id != NULL && strcmp (e->seat_id, seat) != 0) {
+ continue;
+ }
+
+ if (session_type != NULL && e->session_type != NULL && strcmp (e->session_type, session_type) != 0) {
+ continue;
+ }
+ }
+
+ print_last_report_record (l, event, FALSE);
+ }
+
+ oldest = g_list_first (all_events);
+ if (oldest != NULL) {
+ oldest_event = oldest->data;
+ g_print ("\nLog begins %s", ctime (&oldest_event->timestamp.tv_sec));
+ }
+}
+
+static void
+generate_report_last_compat (int uid,
+ const char *seat,
+ const char *session_type)
+{
+ GList *oldest;
+ CkLogEvent *oldest_event;
+ GList *l;
+
+ /* print events in reverse time order */
+
+ for (l = g_list_last (all_events); l != NULL; l = l->prev) {
+ CkLogEvent *event;
+
+ event = l->data;
+
+ if (event->type == CK_LOG_EVENT_SEAT_SESSION_ADDED) {
+ CkLogSeatSessionAddedEvent *e;
+ e = (CkLogSeatSessionAddedEvent *)event;
+
+ if (uid >= 0 && e->session_unix_user != uid) {
+ continue;
+ }
+
+ if (seat != NULL && e->seat_id != NULL && strcmp (e->seat_id, seat) != 0) {
+ continue;
+ }
+
+ if (session_type != NULL && e->session_type != NULL && strcmp (e->session_type, session_type) != 0) {
+ continue;
+ }
+ }
+
+ print_last_report_record (l, event, TRUE);
+ }
+
+ oldest = g_list_first (all_events);
+ if (oldest != NULL) {
+ oldest_event = oldest->data;
+ g_print ("\nLog begins %s", ctime (&oldest_event->timestamp.tv_sec));
+ }
+}
+
+typedef struct {
+ int uid;
+ guint count;
+} CountData;
+
+static void
+listify_counts (gpointer key,
+ gpointer val,
+ GList **list)
+{
+ CountData *count_data;
+ count_data = g_new0 (CountData, 1);
+ count_data->uid = GPOINTER_TO_INT (key);
+ count_data->count = GPOINTER_TO_UINT (val);
+ *list = g_list_prepend (*list, count_data);
+}
+
+static int
+counts_compare (CountData *a,
+ CountData *b)
+{
+ if (a->count < b->count) {
+ return 1;
+ } else if (a->count > b->count) {
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+static void
+generate_report_frequent (int uid,
+ const char *seat,
+ const char *session_type)
+{
+ GHashTable *counts;
+ GList *l;
+ GList *user_counts;
+
+ /* FIXME: we can probably do this more efficiently */
+
+ counts = g_hash_table_new (NULL, NULL);
+
+ for (l = g_list_first (all_events); l != NULL; l = l->next) {
+ CkLogEvent *event;
+ CkLogSeatSessionAddedEvent *e;
+ guint count;
+ gpointer val;
+
+ event = l->data;
+
+ if (event->type != CK_LOG_EVENT_SEAT_SESSION_ADDED) {
+ continue;
+ }
+
+ e = (CkLogSeatSessionAddedEvent *)event;
+
+ if (uid >= 0 && e->session_unix_user != uid) {
+ continue;
+ }
+
+ if (seat != NULL && e->seat_id != NULL && strcmp (e->seat_id, seat) != 0) {
+ continue;
+ }
+
+ if (session_type != NULL && e->session_type != NULL && strcmp (e->session_type, session_type) != 0) {
+ continue;
+ }
+
+ val = g_hash_table_lookup (counts, GINT_TO_POINTER (e->session_unix_user));
+ if (val != NULL) {
+ count = GPOINTER_TO_INT (val);
+ } else {
+ count = 0;
+ }
+
+ g_hash_table_insert (counts,
+ GINT_TO_POINTER (e->session_unix_user),
+ GUINT_TO_POINTER (count + 1));
+ }
+
+ user_counts = NULL;
+ g_hash_table_foreach (counts, (GHFunc)listify_counts, &user_counts);
+ g_hash_table_destroy (counts);
+
+ if (user_counts == NULL) {
+ return;
+ }
+
+ user_counts = g_list_sort (user_counts, (GCompareFunc)counts_compare);
+ while (user_counts != NULL) {
+ CountData *data;
+ char *username;
+
+ data = user_counts->data;
+
+ username = get_user_name_for_uid (data->uid);
+ g_print ("%-8.8s %u\n", username, data->count);
+ g_free (data);
+ user_counts = g_list_delete_link (user_counts, user_counts);
+ g_free (username);
+ }
+
+ g_list_free (user_counts);
+}
+
+static void
+generate_report_log (int uid,
+ const char *seat,
+ const char *session_type)
+{
+ GList *l;
+
+ for (l = all_events; l != NULL; l = l->next) {
+ CkLogEvent *event;
+ GString *str;
+
+ event = l->data;
+ str = g_string_new (NULL);
+ ck_log_event_to_string (event, str);
+ g_print ("%s\n", str->str);
+ g_string_free (str, TRUE);
+ }
+}
+
+static void
+generate_report (int report_type,
+ int uid,
+ const char *seat,
+ const char *session_type)
+{
+
+ all_events = g_list_reverse (all_events);
+
+ switch (report_type) {
+ case REPORT_TYPE_SUMMARY:
+ generate_report_summary (uid, seat, session_type);
+ break;
+ case REPORT_TYPE_LAST:
+ generate_report_last (uid, seat, session_type);
+ break;
+ case REPORT_TYPE_LAST_COMPAT:
+ generate_report_last_compat (uid, seat, session_type);
+ break;
+ case REPORT_TYPE_FREQUENT:
+ generate_report_frequent (uid, seat, session_type);
+ break;
+ case REPORT_TYPE_LOG:
+ generate_report_log (uid, seat, session_type);
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+}
+
+static void
+free_events (void)
+{
+ /* FIXME: */
+}
+
+int
+main (int argc,
+ char **argv)
+{
+ GOptionContext *context;
+ gboolean retval;
+ GError *error = NULL;
+ int report_type;
+ int uid;
+ static gboolean do_version = FALSE;
+ static gboolean report_last_compat = FALSE;
+ static gboolean report_last = FALSE;
+ static gboolean report_frequent = FALSE;
+ static gboolean report_log = FALSE;
+ static char *username = NULL;
+ static char *seat = NULL;
+ static char *session_type = NULL;
+ static GOptionEntry entries [] = {
+ { "version", 'V', 0, G_OPTION_ARG_NONE, &do_version, N_("Version of this application"), NULL },
+ { "frequent", 0, 0, G_OPTION_ARG_NONE, &report_frequent, N_("Show listing of frequent users"), NULL },
+ { "last", 0, 0, G_OPTION_ARG_NONE, &report_last, N_("Show listing of last logged in users"), NULL },
+ { "last-compat", 0, 0, G_OPTION_ARG_NONE, &report_last_compat, N_("Show 'last' compatible listing of last logged in users"), NULL },
+ { "log", 0, 0, G_OPTION_ARG_NONE, &report_log, N_("Show full event log"), NULL },
+ { "seat", 's', 0, G_OPTION_ARG_STRING, &seat, N_("Show entries for the specified seat"), N_("SEAT") },
+ { "session-type", 't', 0, G_OPTION_ARG_STRING, &session_type, N_("Show entries for the specified session type"), N_("TYPE") },
+ { "user", 'u', 0, G_OPTION_ARG_STRING, &username, N_("Show entries for the specified user"), N_("NAME") },
+ { NULL }
+ };
+
+ context = g_option_context_new (NULL);
+ g_option_context_add_main_entries (context, entries, NULL);
+ retval = g_option_context_parse (context, &argc, &argv, &error);
+
+ g_option_context_free (context);
+
+ if (! retval) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ exit (1);
+ }
+
+ if (do_version) {
+ g_print ("%s %s\n", argv [0], VERSION);
+ exit (1);
+ }
+
+ if (report_last_compat) {
+ report_type = REPORT_TYPE_LAST_COMPAT;
+ } else if (report_last) {
+ report_type = REPORT_TYPE_LAST;
+ } else if (report_frequent) {
+ report_type = REPORT_TYPE_FREQUENT;
+ } else if (report_log) {
+ report_type = REPORT_TYPE_LOG;
+ } else {
+ report_type = REPORT_TYPE_SUMMARY;
+ }
+
+ if (username != NULL) {
+ uid = get_uid_for_username (username);
+ if (uid == -1) {
+ g_warning ("Unknown username: %s", username);
+ exit (1);
+ }
+ } else {
+ uid = -1;
+ }
+
+ process_logs ();
+ generate_report (report_type, uid, seat, session_type);
+ free_events ();
+
+ return 0;
+}
diff --git a/tools/ck-launch-session.c b/tools/ck-launch-session.c
new file mode 100644
index 0000000..7311181
--- /dev/null
+++ b/tools/ck-launch-session.c
@@ -0,0 +1,92 @@
+/*
+ * Copyright Red Hat, Inc. 2007-2008.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Red Hat, Inc., nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Gate a process inside of a ConsoleKit session.
+ *
+ */
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#else
+#define _PATH_BSHELL "/bin/sh"
+#endif
+
+#include <stdlib.h>
+#include <syslog.h>
+#include <unistd.h>
+
+#include "ck-connector.h"
+
+int
+main (int argc, char **argv)
+{
+ CkConnector *ckc = NULL;
+ DBusError error;
+ const char *shell;
+ pid_t pid;
+ int status;
+
+ ckc = ck_connector_new ();
+ if (ckc != NULL) {
+ dbus_error_init (&error);
+ if (ck_connector_open_session (ckc, &error)) {
+ pid = fork ();
+ switch (pid) {
+ case -1:
+ syslog (LOG_ERR, "error forking child");
+ break;
+ case 0:
+ setenv ("XDG_SESSION_COOKIE",
+ ck_connector_get_cookie (ckc), 1);
+ break;
+ default:
+ waitpid (pid, &status, 0);
+ exit (status);
+ break;
+ }
+ } else {
+ syslog (LOG_ERR, "error connecting to ConsoleKit");
+ }
+ } else {
+ syslog (LOG_ERR, "error setting up to connection to ConsoleKit");
+ }
+
+ if (argc > 1) {
+ execvp (argv[1], argv + 1);
+ } else {
+ shell = getenv ("SHELL");
+ if (shell == NULL) {
+ shell = _PATH_BSHELL;
+ }
+ execlp (shell, shell, NULL);
+ }
+ _exit (1);
+}
diff --git a/tools/ck-log-system-restart.c b/tools/ck-log-system-restart.c
new file mode 100644
index 0000000..e53670f
--- /dev/null
+++ b/tools/ck-log-system-restart.c
@@ -0,0 +1,174 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <string.h>
+
+#include <locale.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib/gstdio.h>
+
+#include "ck-log-event.h"
+
+#define DEFAULT_LOG_FILENAME LOCALSTATEDIR "/log/ConsoleKit/history"
+
+
+/* Adapted from auditd auditd-event.c */
+static gboolean
+open_log_file (const char *filename,
+ int *fdp,
+ FILE **filep)
+{
+ int flags;
+ int fd;
+ FILE *file;
+ gboolean ret;
+
+ ret = FALSE;
+
+ /*
+ * Likely errors on rotate: ENFILE, ENOMEM, ENOSPC
+ */
+ flags = O_WRONLY | O_APPEND;
+#ifdef O_NOFOLLOW
+ flags |= O_NOFOLLOW;
+#endif
+
+retry:
+ fd = g_open (filename, flags, 0600);
+ if (fd < 0) {
+ if (errno == ENOENT) {
+ /* FIXME: should we just skip if file doesn't exist? */
+ fd = g_open (filename,
+ O_CREAT | O_EXCL | O_APPEND,
+ S_IRUSR | S_IWUSR | S_IRGRP);
+ if (fd < 0) {
+ g_warning ("Couldn't create log file %s (%s)",
+ filename,
+ g_strerror (errno));
+ goto out;
+ }
+
+ close (fd);
+ fd = g_open (filename, flags, 0600);
+ } else if (errno == ENFILE) {
+ /* All system descriptors used, try again... */
+ goto retry;
+ }
+ if (fd < 0) {
+ g_warning ("Couldn't open log file %s (%s)",
+ filename,
+ g_strerror (errno));
+ goto out;
+ }
+ }
+
+ if (fcntl (fd, F_SETFD, FD_CLOEXEC) == -1) {
+ close (fd);
+ g_warning ("Error setting log file CLOEXEC flag (%s)",
+ g_strerror (errno));
+ goto out;
+ }
+
+ fchown (fd, 0, 0);
+
+ file = fdopen (fd, "a");
+ if (file == NULL) {
+ g_warning ("Error setting up log descriptor (%s)",
+ g_strerror (errno));
+ close (fd);
+ goto out;
+ }
+
+ /* Set it to line buffering */
+ setlinebuf (file);
+
+ ret = TRUE;
+
+ if (fdp != NULL) {
+ *fdp = fd;
+ }
+ if (filep != NULL) {
+ *filep = file;
+ }
+
+ out:
+
+ return ret;
+}
+
+static gboolean
+write_log_for_event (CkLogEvent *event)
+{
+ GString *str;
+ FILE *file;
+ int fd;
+
+ str = g_string_new (NULL);
+
+ ck_log_event_to_string (event, str);
+
+ if (! open_log_file (DEFAULT_LOG_FILENAME, &fd, &file)) {
+ exit (1);
+ }
+
+ if (file != NULL) {
+ int rc;
+
+ rc = fprintf (file, "%s\n", str->str);
+ if (rc <= 0) {
+ g_warning ("Record was not written to disk (%s)",
+ g_strerror (errno));
+ }
+ } else {
+ g_warning ("Log file not open for writing");
+ }
+
+ g_string_free (str, TRUE);
+
+ return TRUE;
+}
+
+int
+main (int argc,
+ char **argv)
+{
+ CkLogEvent event;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SYSTEM_RESTART;
+ g_get_current_time (&event.timestamp);
+
+ write_log_for_event (&event);
+
+ return 0;
+}
diff --git a/tools/ck-log-system-start.c b/tools/ck-log-system-start.c
new file mode 100644
index 0000000..4afdfa0
--- /dev/null
+++ b/tools/ck-log-system-start.c
@@ -0,0 +1,174 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <string.h>
+
+#include <locale.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib/gstdio.h>
+
+#include "ck-log-event.h"
+
+#define DEFAULT_LOG_FILENAME LOCALSTATEDIR "/log/ConsoleKit/history"
+
+
+/* Adapted from auditd auditd-event.c */
+static gboolean
+open_log_file (const char *filename,
+ int *fdp,
+ FILE **filep)
+{
+ int flags;
+ int fd;
+ FILE *file;
+ gboolean ret;
+
+ ret = FALSE;
+
+ /*
+ * Likely errors on rotate: ENFILE, ENOMEM, ENOSPC
+ */
+ flags = O_WRONLY | O_APPEND;
+#ifdef O_NOFOLLOW
+ flags |= O_NOFOLLOW;
+#endif
+
+retry:
+ fd = g_open (filename, flags, 0600);
+ if (fd < 0) {
+ if (errno == ENOENT) {
+ /* FIXME: should we just skip if file doesn't exist? */
+ fd = g_open (filename,
+ O_CREAT | O_EXCL | O_APPEND,
+ S_IRUSR | S_IWUSR | S_IRGRP);
+ if (fd < 0) {
+ g_warning ("Couldn't create log file %s (%s)",
+ filename,
+ g_strerror (errno));
+ goto out;
+ }
+
+ close (fd);
+ fd = g_open (filename, flags, 0600);
+ } else if (errno == ENFILE) {
+ /* All system descriptors used, try again... */
+ goto retry;
+ }
+ if (fd < 0) {
+ g_warning ("Couldn't open log file %s (%s)",
+ filename,
+ g_strerror (errno));
+ goto out;
+ }
+ }
+
+ if (fcntl (fd, F_SETFD, FD_CLOEXEC) == -1) {
+ close (fd);
+ g_warning ("Error setting log file CLOEXEC flag (%s)",
+ g_strerror (errno));
+ goto out;
+ }
+
+ fchown (fd, 0, 0);
+
+ file = fdopen (fd, "a");
+ if (file == NULL) {
+ g_warning ("Error setting up log descriptor (%s)",
+ g_strerror (errno));
+ close (fd);
+ goto out;
+ }
+
+ /* Set it to line buffering */
+ setlinebuf (file);
+
+ ret = TRUE;
+
+ if (fdp != NULL) {
+ *fdp = fd;
+ }
+ if (filep != NULL) {
+ *filep = file;
+ }
+
+ out:
+
+ return ret;
+}
+
+static gboolean
+write_log_for_event (CkLogEvent *event)
+{
+ GString *str;
+ FILE *file;
+ int fd;
+
+ str = g_string_new (NULL);
+
+ ck_log_event_to_string (event, str);
+
+ if (! open_log_file (DEFAULT_LOG_FILENAME, &fd, &file)) {
+ exit (1);
+ }
+
+ if (file != NULL) {
+ int rc;
+
+ rc = fprintf (file, "%s\n", str->str);
+ if (rc <= 0) {
+ g_warning ("Record was not written to disk (%s)",
+ g_strerror (errno));
+ }
+ } else {
+ g_warning ("Log file not open for writing");
+ }
+
+ g_string_free (str, TRUE);
+
+ return TRUE;
+}
+
+int
+main (int argc,
+ char **argv)
+{
+ CkLogEvent event;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SYSTEM_START;
+ g_get_current_time (&event.timestamp);
+
+ write_log_for_event (&event);
+
+ return 0;
+}
diff --git a/tools/ck-log-system-stop.c b/tools/ck-log-system-stop.c
new file mode 100644
index 0000000..a59a1e9
--- /dev/null
+++ b/tools/ck-log-system-stop.c
@@ -0,0 +1,174 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <string.h>
+
+#include <locale.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib/gstdio.h>
+
+#include "ck-log-event.h"
+
+#define DEFAULT_LOG_FILENAME LOCALSTATEDIR "/log/ConsoleKit/history"
+
+
+/* Adapted from auditd auditd-event.c */
+static gboolean
+open_log_file (const char *filename,
+ int *fdp,
+ FILE **filep)
+{
+ int flags;
+ int fd;
+ FILE *file;
+ gboolean ret;
+
+ ret = FALSE;
+
+ /*
+ * Likely errors on rotate: ENFILE, ENOMEM, ENOSPC
+ */
+ flags = O_WRONLY | O_APPEND;
+#ifdef O_NOFOLLOW
+ flags |= O_NOFOLLOW;
+#endif
+
+retry:
+ fd = g_open (filename, flags, 0600);
+ if (fd < 0) {
+ if (errno == ENOENT) {
+ /* FIXME: should we just skip if file doesn't exist? */
+ fd = g_open (filename,
+ O_CREAT | O_EXCL | O_APPEND,
+ S_IRUSR | S_IWUSR | S_IRGRP);
+ if (fd < 0) {
+ g_warning ("Couldn't create log file %s (%s)",
+ filename,
+ g_strerror (errno));
+ goto out;
+ }
+
+ close (fd);
+ fd = g_open (filename, flags, 0600);
+ } else if (errno == ENFILE) {
+ /* All system descriptors used, try again... */
+ goto retry;
+ }
+ if (fd < 0) {
+ g_warning ("Couldn't open log file %s (%s)",
+ filename,
+ g_strerror (errno));
+ goto out;
+ }
+ }
+
+ if (fcntl (fd, F_SETFD, FD_CLOEXEC) == -1) {
+ close (fd);
+ g_warning ("Error setting log file CLOEXEC flag (%s)",
+ g_strerror (errno));
+ goto out;
+ }
+
+ fchown (fd, 0, 0);
+
+ file = fdopen (fd, "a");
+ if (file == NULL) {
+ g_warning ("Error setting up log descriptor (%s)",
+ g_strerror (errno));
+ close (fd);
+ goto out;
+ }
+
+ /* Set it to line buffering */
+ setlinebuf (file);
+
+ ret = TRUE;
+
+ if (fdp != NULL) {
+ *fdp = fd;
+ }
+ if (filep != NULL) {
+ *filep = file;
+ }
+
+ out:
+
+ return ret;
+}
+
+static gboolean
+write_log_for_event (CkLogEvent *event)
+{
+ GString *str;
+ FILE *file;
+ int fd;
+
+ str = g_string_new (NULL);
+
+ ck_log_event_to_string (event, str);
+
+ if (! open_log_file (DEFAULT_LOG_FILENAME, &fd, &file)) {
+ exit (1);
+ }
+
+ if (file != NULL) {
+ int rc;
+
+ rc = fprintf (file, "%s\n", str->str);
+ if (rc <= 0) {
+ g_warning ("Record was not written to disk (%s)",
+ g_strerror (errno));
+ }
+ } else {
+ g_warning ("Log file not open for writing");
+ }
+
+ g_string_free (str, TRUE);
+
+ return TRUE;
+}
+
+int
+main (int argc,
+ char **argv)
+{
+ CkLogEvent event;
+
+ memset (&event, 0, sizeof (CkLogEvent));
+
+ event.type = CK_LOG_EVENT_SYSTEM_STOP;
+ g_get_current_time (&event.timestamp);
+
+ write_log_for_event (&event);
+
+ return 0;
+}
diff --git a/tools/freebsd/Makefile.am b/tools/freebsd/Makefile.am
new file mode 100644
index 0000000..d25930e
--- /dev/null
+++ b/tools/freebsd/Makefile.am
@@ -0,0 +1,38 @@
+## We require new-style dependency handling.
+AUTOMAKE_OPTIONS = 1.7
+
+NULL =
+
+SUBDIRS = \
+ $(NULL)
+
+scriptdir = $(libdir)/ConsoleKit/scripts
+script_SCRIPTS = \
+ ck-system-stop \
+ ck-system-restart \
+ $(NULL)
+
+EXTRA_DIST = \
+ $(script_SCRIPTS) \
+ $(NULL)
+
+MAINTAINERCLEANFILES = \
+ *~ \
+ Makefile.in
+
+
+check:
+ for f in $(script_SCRIPTS); do \
+ echo -n "Validate bash syntax in $$f : "; \
+ bash -n $(srcdir)/$$f 2> bash.error;\
+ if test -s bash.error; then \
+ echo failed; \
+ cat bash.error; \
+ rm -f bash.error; \
+ exit 1; \
+ else \
+ echo ok; \
+ rm -f bash.error; \
+ fi; \
+ done;
+
diff --git a/tools/freebsd/Makefile.in b/tools/freebsd/Makefile.in
new file mode 100644
index 0000000..34cb61f
--- /dev/null
+++ b/tools/freebsd/Makefile.in
@@ -0,0 +1,585 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tools/freebsd
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(scriptdir)"
+scriptSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(script_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CK_BACKEND = @CK_BACKEND@
+CONSOLE_KIT_CFLAGS = @CONSOLE_KIT_CFLAGS@
+CONSOLE_KIT_LIBS = @CONSOLE_KIT_LIBS@
+CONSOLE_KIT_PID_FILE = @CONSOLE_KIT_PID_FILE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEBUG_CFLAGS = @DEBUG_CFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_PAM = @HAVE_PAM@
+HAVE_POLKIT = @HAVE_POLKIT@
+HISTORY_CFLAGS = @HISTORY_CFLAGS@
+HISTORY_LIBS = @HISTORY_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+KVM_LIBS = @KVM_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBDBUS_CFLAGS = @LIBDBUS_CFLAGS@
+LIBDBUS_LIBS = @LIBDBUS_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_LIBS = @PAM_LIBS@
+PAM_MODULE_DIR = @PAM_MODULE_DIR@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+RBAC_LIBS = @RBAC_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TOOLS_CFLAGS = @TOOLS_CFLAGS@
+TOOLS_LIBS = @TOOLS_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XMLTO = @XMLTO@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.7
+NULL =
+SUBDIRS = \
+ $(NULL)
+
+scriptdir = $(libdir)/ConsoleKit/scripts
+script_SCRIPTS = \
+ ck-system-stop \
+ ck-system-restart \
+ $(NULL)
+
+EXTRA_DIST = \
+ $(script_SCRIPTS) \
+ $(NULL)
+
+MAINTAINERCLEANFILES = \
+ *~ \
+ Makefile.in
+
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/freebsd/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tools/freebsd/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-scriptSCRIPTS: $(script_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(scriptdir)" || $(MKDIR_P) "$(DESTDIR)$(scriptdir)"
+ @list='$(script_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(scriptSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(scriptdir)/$$f'"; \
+ $(scriptSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(scriptdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-scriptSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(script_SCRIPTS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " rm -f '$(DESTDIR)$(scriptdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(scriptdir)/$$f"; \
+ done
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(SCRIPTS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(scriptdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-scriptSCRIPTS
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-scriptSCRIPTS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-scriptSCRIPTS install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-scriptSCRIPTS
+
+
+check:
+ for f in $(script_SCRIPTS); do \
+ echo -n "Validate bash syntax in $$f : "; \
+ bash -n $(srcdir)/$$f 2> bash.error;\
+ if test -s bash.error; then \
+ echo failed; \
+ cat bash.error; \
+ rm -f bash.error; \
+ exit 1; \
+ else \
+ echo ok; \
+ rm -f bash.error; \
+ fi; \
+ done;
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tools/freebsd/ck-system-restart b/tools/freebsd/ck-system-restart
new file mode 100755
index 0000000..8e0664e
--- /dev/null
+++ b/tools/freebsd/ck-system-restart
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+#Try for common tools
+if [ -x "/sbin/shutdown" ] ; then
+ /sbin/shutdown -r now
+ exit $?
+elif [ -x "/usr/sbin/shutdown" ] ; then
+ /usr/sbin/shutdown -r now
+ exit $?
+else
+ exit 1
+fi
diff --git a/tools/freebsd/ck-system-stop b/tools/freebsd/ck-system-stop
new file mode 100755
index 0000000..c947bea
--- /dev/null
+++ b/tools/freebsd/ck-system-stop
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+unsupported() {
+ echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
+ echo "No shutdown command found" >&2
+ exit 1
+}
+
+#Try for common tools
+if [ -x "/sbin/shutdown" ] ; then
+ /sbin/shutdown -p now
+ exit $?
+elif [ -x "/usr/sbin/shutdown" ] ; then
+ /usr/sbin/shutdown -p now
+ exit $?
+else
+ unsupported
+fi
diff --git a/tools/linux/Makefile.am b/tools/linux/Makefile.am
index 0830734..51196c0 100644
--- a/tools/linux/Makefile.am
+++ b/tools/linux/Makefile.am
@@ -6,27 +6,33 @@ NULL =
SUBDIRS = \
$(NULL)
-INCLUDES = \
- -I. \
- -I$(srcdir) \
- -I$(top_srcdir)/src \
- $(CONSOLE_KIT_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS) \
- -DPREFIX=\""$(prefix)"\" \
- -DBINDIR=\""$(bindir)"\" \
- -DLIBDIR=\""$(libdir)"\" \
- -DLIBEXECDIR=\""$(libexecdir)"\" \
- -DDATADIR=\""$(datadir)"\" \
- -DSYSCONFDIR=\""$(sysconfdir)"\" \
- $(WARN_CFLAGS) \
- $(DEBUG_CFLAGS) \
- $(TOOLS_CFLAGS) \
+scriptdir = $(libdir)/ConsoleKit/scripts
+script_SCRIPTS = \
+ ck-system-stop \
+ ck-system-restart \
$(NULL)
-
EXTRA_DIST = \
+ $(script_SCRIPTS) \
$(NULL)
MAINTAINERCLEANFILES = \
*~ \
Makefile.in
+
+
+check:
+ for f in $(script_SCRIPTS); do \
+ echo -n "Validate bash syntax in $$f : "; \
+ bash -n $(srcdir)/$$f 2> bash.error;\
+ if test -s bash.error; then \
+ echo failed; \
+ cat bash.error; \
+ rm -f bash.error; \
+ exit 1; \
+ else \
+ echo ok; \
+ rm -f bash.error; \
+ fi; \
+ done;
+
diff --git a/tools/linux/Makefile.in b/tools/linux/Makefile.in
index 39209cb..f91ed6e 100644
--- a/tools/linux/Makefile.in
+++ b/tools/linux/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,15 +13,12 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -45,21 +42,25 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(scriptdir)"
+scriptSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(script_SCRIPTS)
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -72,12 +73,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CK_BACKEND = @CK_BACKEND@
-CK_COMPILE_FREEBSD_FALSE = @CK_COMPILE_FREEBSD_FALSE@
-CK_COMPILE_FREEBSD_TRUE = @CK_COMPILE_FREEBSD_TRUE@
-CK_COMPILE_LINUX_FALSE = @CK_COMPILE_LINUX_FALSE@
-CK_COMPILE_LINUX_TRUE = @CK_COMPILE_LINUX_TRUE@
-CK_COMPILE_SOLARIS_FALSE = @CK_COMPILE_SOLARIS_FALSE@
-CK_COMPILE_SOLARIS_TRUE = @CK_COMPILE_SOLARIS_TRUE@
CONSOLE_KIT_CFLAGS = @CONSOLE_KIT_CFLAGS@
CONSOLE_KIT_LIBS = @CONSOLE_KIT_LIBS@
CONSOLE_KIT_PID_FILE = @CONSOLE_KIT_PID_FILE@
@@ -94,17 +89,11 @@ DBUS_SYS_DIR = @DBUS_SYS_DIR@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DOCBOOK_DOCS_ENABLED_FALSE = @DOCBOOK_DOCS_ENABLED_FALSE@
-DOCBOOK_DOCS_ENABLED_TRUE = @DOCBOOK_DOCS_ENABLED_TRUE@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_INOTIFY_FALSE = @ENABLE_INOTIFY_FALSE@
-ENABLE_INOTIFY_TRUE = @ENABLE_INOTIFY_TRUE@
-ENABLE_PAM_MODULE_FALSE = @ENABLE_PAM_MODULE_FALSE@
-ENABLE_PAM_MODULE_TRUE = @ENABLE_PAM_MODULE_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
@@ -114,8 +103,10 @@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_PAM = @HAVE_PAM@
-HAVE_PAM_FALSE = @HAVE_PAM_FALSE@
-HAVE_PAM_TRUE = @HAVE_PAM_TRUE@
+HAVE_POLKIT = @HAVE_POLKIT@
+HISTORY_CFLAGS = @HISTORY_CFLAGS@
+HISTORY_LIBS = @HISTORY_LIBS@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -132,9 +123,8 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
@@ -150,10 +140,13 @@ PAM_MODULE_DIR = @PAM_MODULE_DIR@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+RBAC_LIBS = @RBAC_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -164,13 +157,14 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
XMLTO = @XMLTO@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -182,6 +176,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -209,31 +204,24 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.7
NULL =
SUBDIRS = \
$(NULL)
-INCLUDES = \
- -I. \
- -I$(srcdir) \
- -I$(top_srcdir)/src \
- $(CONSOLE_KIT_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS) \
- -DPREFIX=\""$(prefix)"\" \
- -DBINDIR=\""$(bindir)"\" \
- -DLIBDIR=\""$(libdir)"\" \
- -DLIBEXECDIR=\""$(libexecdir)"\" \
- -DDATADIR=\""$(datadir)"\" \
- -DSYSCONFDIR=\""$(sysconfdir)"\" \
- $(WARN_CFLAGS) \
- $(DEBUG_CFLAGS) \
- $(TOOLS_CFLAGS) \
+scriptdir = $(libdir)/ConsoleKit/scripts
+script_SCRIPTS = \
+ ck-system-stop \
+ ck-system-restart \
$(NULL)
EXTRA_DIST = \
+ $(script_SCRIPTS) \
$(NULL)
MAINTAINERCLEANFILES = \
@@ -272,6 +260,25 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-scriptSCRIPTS: $(script_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(scriptdir)" || $(MKDIR_P) "$(DESTDIR)$(scriptdir)"
+ @list='$(script_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(scriptSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(scriptdir)/$$f'"; \
+ $(scriptSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(scriptdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-scriptSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(script_SCRIPTS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " rm -f '$(DESTDIR)$(scriptdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(scriptdir)/$$f"; \
+ done
mostlyclean-libtool:
-rm -f *.lo
@@ -279,10 +286,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@@ -314,8 +317,7 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
@@ -416,22 +418,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -445,7 +446,7 @@ distdir: $(DISTFILES)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -453,15 +454,20 @@ distdir: $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
-all-am: Makefile
+all-am: Makefile $(SCRIPTS)
installdirs: installdirs-recursive
installdirs-am:
+ for dir in "$(DESTDIR)$(scriptdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
@@ -493,8 +499,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
@@ -506,14 +511,22 @@ info: info-recursive
info-am:
-install-data-am:
+install-data-am: install-scriptSCRIPTS
+
+install-dvi: install-dvi-recursive
install-exec-am:
+install-html: install-html-recursive
+
install-info: install-info-recursive
install-man:
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -532,23 +545,41 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am: uninstall-scriptSCRIPTS
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
-
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-scriptSCRIPTS install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-scriptSCRIPTS
+
+
+check:
+ for f in $(script_SCRIPTS); do \
+ echo -n "Validate bash syntax in $$f : "; \
+ bash -n $(srcdir)/$$f 2> bash.error;\
+ if test -s bash.error; then \
+ echo failed; \
+ cat bash.error; \
+ rm -f bash.error; \
+ exit 1; \
+ else \
+ echo ok; \
+ rm -f bash.error; \
+ fi; \
+ done;
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/tools/linux/ck-system-restart b/tools/linux/ck-system-restart
new file mode 100755
index 0000000..8e0664e
--- /dev/null
+++ b/tools/linux/ck-system-restart
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+#Try for common tools
+if [ -x "/sbin/shutdown" ] ; then
+ /sbin/shutdown -r now
+ exit $?
+elif [ -x "/usr/sbin/shutdown" ] ; then
+ /usr/sbin/shutdown -r now
+ exit $?
+else
+ exit 1
+fi
diff --git a/tools/linux/ck-system-stop b/tools/linux/ck-system-stop
new file mode 100755
index 0000000..e26bca3
--- /dev/null
+++ b/tools/linux/ck-system-stop
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+#Try for common tools
+if [ -x "/sbin/shutdown" ] ; then
+ /sbin/shutdown -h now
+ exit $?
+elif [ -x "/usr/sbin/shutdown" ] ; then
+ /usr/sbin/shutdown -h now
+ exit $?
+else
+ exit 1
+fi
diff --git a/tools/list-sessions.c b/tools/list-sessions.c
index 75828ed..746c2f7 100644
--- a/tools/list-sessions.c
+++ b/tools/list-sessions.c
@@ -55,10 +55,10 @@ get_int (DBusGProxy *proxy,
gboolean res;
error = NULL;
- res = dbus_g_proxy_call (proxy,
- method,
- &error,
- G_TYPE_INVALID,
+ res = dbus_g_proxy_call (proxy,
+ method,
+ &error,
+ G_TYPE_INVALID,
G_TYPE_INT, val,
G_TYPE_INVALID);
if (! res) {
@@ -78,10 +78,10 @@ get_path (DBusGProxy *proxy,
gboolean res;
error = NULL;
- res = dbus_g_proxy_call (proxy,
- method,
- &error,
- G_TYPE_INVALID,
+ res = dbus_g_proxy_call (proxy,
+ method,
+ &error,
+ G_TYPE_INVALID,
DBUS_TYPE_G_OBJECT_PATH, str,
G_TYPE_INVALID);
if (! res) {
@@ -101,10 +101,10 @@ get_string (DBusGProxy *proxy,
gboolean res;
error = NULL;
- res = dbus_g_proxy_call (proxy,
- method,
- &error,
- G_TYPE_INVALID,
+ res = dbus_g_proxy_call (proxy,
+ method,
+ &error,
+ G_TYPE_INVALID,
G_TYPE_STRING, str,
G_TYPE_INVALID);
if (! res) {
@@ -124,10 +124,10 @@ get_boolean (DBusGProxy *proxy,
gboolean res;
error = NULL;
- res = dbus_g_proxy_call (proxy,
- method,
- &error,
- G_TYPE_INVALID,
+ res = dbus_g_proxy_call (proxy,
+ method,
+ &error,
+ G_TYPE_INVALID,
G_TYPE_BOOLEAN, value,
G_TYPE_INVALID);
if (! res) {
@@ -175,7 +175,7 @@ list_session (DBusGConnection *connection,
char *short_sid;
const char *short_ssid;
- proxy = dbus_g_proxy_new_for_name (connection,
+ proxy = dbus_g_proxy_new_for_name (connection,
CK_NAME,
ssid,
CK_SESSION_INTERFACE);
@@ -256,7 +256,7 @@ list_sessions (DBusGConnection *connection,
GPtrArray *sessions;
int i;
- proxy = dbus_g_proxy_new_for_name (connection,
+ proxy = dbus_g_proxy_new_for_name (connection,
CK_NAME,
sid,
CK_SEAT_INTERFACE);
@@ -267,13 +267,13 @@ list_sessions (DBusGConnection *connection,
sessions = NULL;
error = NULL;
- res = dbus_g_proxy_call (proxy,
- "GetSessions",
- &error,
- G_TYPE_INVALID,
+ res = dbus_g_proxy_call (proxy,
+ "GetSessions",
+ &error,
+ G_TYPE_INVALID,
dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH),
&sessions,
- G_TYPE_INVALID);
+ G_TYPE_INVALID);
if (! res) {
g_warning ("Failed to get list of sessions for %s: %s", sid, error->message);
g_error_free (error);
@@ -315,13 +315,13 @@ list_seats (DBusGConnection *connection)
seats = NULL;
error = NULL;
- res = dbus_g_proxy_call (proxy,
- "GetSeats",
- &error,
- G_TYPE_INVALID,
+ res = dbus_g_proxy_call (proxy,
+ "GetSeats",
+ &error,
+ G_TYPE_INVALID,
dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH),
&seats,
- G_TYPE_INVALID);
+ G_TYPE_INVALID);
if (! res) {
g_warning ("Failed to get list of seats: %s", error->message);
g_error_free (error);
@@ -387,5 +387,5 @@ main (int argc,
list_seats (connection);
- return 0;
+ return 0;
}
diff --git a/tools/solaris/Makefile.am b/tools/solaris/Makefile.am
new file mode 100644
index 0000000..d25930e
--- /dev/null
+++ b/tools/solaris/Makefile.am
@@ -0,0 +1,38 @@
+## We require new-style dependency handling.
+AUTOMAKE_OPTIONS = 1.7
+
+NULL =
+
+SUBDIRS = \
+ $(NULL)
+
+scriptdir = $(libdir)/ConsoleKit/scripts
+script_SCRIPTS = \
+ ck-system-stop \
+ ck-system-restart \
+ $(NULL)
+
+EXTRA_DIST = \
+ $(script_SCRIPTS) \
+ $(NULL)
+
+MAINTAINERCLEANFILES = \
+ *~ \
+ Makefile.in
+
+
+check:
+ for f in $(script_SCRIPTS); do \
+ echo -n "Validate bash syntax in $$f : "; \
+ bash -n $(srcdir)/$$f 2> bash.error;\
+ if test -s bash.error; then \
+ echo failed; \
+ cat bash.error; \
+ rm -f bash.error; \
+ exit 1; \
+ else \
+ echo ok; \
+ rm -f bash.error; \
+ fi; \
+ done;
+
diff --git a/tools/solaris/Makefile.in b/tools/solaris/Makefile.in
new file mode 100644
index 0000000..d029a5b
--- /dev/null
+++ b/tools/solaris/Makefile.in
@@ -0,0 +1,585 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tools/solaris
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(scriptdir)"
+scriptSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(script_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CK_BACKEND = @CK_BACKEND@
+CONSOLE_KIT_CFLAGS = @CONSOLE_KIT_CFLAGS@
+CONSOLE_KIT_LIBS = @CONSOLE_KIT_LIBS@
+CONSOLE_KIT_PID_FILE = @CONSOLE_KIT_PID_FILE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEBUG_CFLAGS = @DEBUG_CFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_PAM = @HAVE_PAM@
+HAVE_POLKIT = @HAVE_POLKIT@
+HISTORY_CFLAGS = @HISTORY_CFLAGS@
+HISTORY_LIBS = @HISTORY_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+KVM_LIBS = @KVM_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBDBUS_CFLAGS = @LIBDBUS_CFLAGS@
+LIBDBUS_LIBS = @LIBDBUS_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_LIBS = @PAM_LIBS@
+PAM_MODULE_DIR = @PAM_MODULE_DIR@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+RBAC_LIBS = @RBAC_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TOOLS_CFLAGS = @TOOLS_CFLAGS@
+TOOLS_LIBS = @TOOLS_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XMLTO = @XMLTO@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.7
+NULL =
+SUBDIRS = \
+ $(NULL)
+
+scriptdir = $(libdir)/ConsoleKit/scripts
+script_SCRIPTS = \
+ ck-system-stop \
+ ck-system-restart \
+ $(NULL)
+
+EXTRA_DIST = \
+ $(script_SCRIPTS) \
+ $(NULL)
+
+MAINTAINERCLEANFILES = \
+ *~ \
+ Makefile.in
+
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/solaris/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tools/solaris/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-scriptSCRIPTS: $(script_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(scriptdir)" || $(MKDIR_P) "$(DESTDIR)$(scriptdir)"
+ @list='$(script_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(scriptSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(scriptdir)/$$f'"; \
+ $(scriptSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(scriptdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-scriptSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(script_SCRIPTS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " rm -f '$(DESTDIR)$(scriptdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(scriptdir)/$$f"; \
+ done
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(SCRIPTS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(scriptdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-scriptSCRIPTS
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-scriptSCRIPTS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-scriptSCRIPTS install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-scriptSCRIPTS
+
+
+check:
+ for f in $(script_SCRIPTS); do \
+ echo -n "Validate bash syntax in $$f : "; \
+ bash -n $(srcdir)/$$f 2> bash.error;\
+ if test -s bash.error; then \
+ echo failed; \
+ cat bash.error; \
+ rm -f bash.error; \
+ exit 1; \
+ else \
+ echo ok; \
+ rm -f bash.error; \
+ fi; \
+ done;
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tools/solaris/ck-system-restart b/tools/solaris/ck-system-restart
new file mode 100755
index 0000000..c61799f
--- /dev/null
+++ b/tools/solaris/ck-system-restart
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/sbin/init 6
diff --git a/tools/solaris/ck-system-stop b/tools/solaris/ck-system-stop
new file mode 100755
index 0000000..d5b2fde
--- /dev/null
+++ b/tools/solaris/ck-system-stop
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/sbin/init 5