diff -Nru telepathy-idle-0.1.6/aclocal.m4 telepathy-idle-0.1.7/aclocal.m4 --- telepathy-idle-0.1.6/aclocal.m4 2010-02-19 13:11:13.000000000 +0000 +++ telepathy-idle-0.1.7/aclocal.m4 2010-12-07 11:59:19.000000000 +0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. @@ -13,13 +13,14 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, -[m4_warning([this file was generated for autoconf 2.64. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # @@ -47,7 +48,10 @@ AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -60,7 +64,6 @@ AC_MSG_RESULT([no]) PKG_CONFIG="" fi - fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -69,34 +72,31 @@ # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) + m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) - # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG @@ -138,16 +138,17 @@ See the pkg-config man page for more details.]) if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - ifelse([$4], , [AC_MSG_ERROR(dnl + m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -155,25 +156,24 @@ Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) +_PKG_TEXT])[]dnl + ]) elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( [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. _PKG_TEXT -To get pkg-config, see .])], - [$4]) +To get pkg-config, see .])[]dnl + ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) + $3 fi[]dnl ])# PKG_CHECK_MODULES @@ -192,7 +192,7 @@ [am__api_version='1.11' 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.11], [], +m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -208,7 +208,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11])dnl +[AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff -Nru telepathy-idle-0.1.6/ChangeLog telepathy-idle-0.1.7/ChangeLog --- telepathy-idle-0.1.6/ChangeLog 2010-02-19 13:13:27.000000000 +0000 +++ telepathy-idle-0.1.7/ChangeLog 2010-12-07 11:59:27.000000000 +0000 @@ -1,3 +1,349 @@ +commit 6367d03fa716833b473547e30ca680b95c116e95 +Author: Sjoerd Simons +Date: Tue Dec 7 11:45:50 2010 +0000 + + prepare for a release + + NEWS | 16 +++++++++++++++- + configure.ac | 4 ++-- + 2 files changed, 17 insertions(+), 3 deletions(-) + +commit 6fb6b413dc05a349801006533e915b8e7ed36d8a +Author: Sjoerd Simons +Date: Mon Dec 6 12:14:11 2010 +0000 + + Also check nothing strange happens when we toggle t and o at a the same time + + tests/twisted/channels/muc-channel-topic.py | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +commit ed428e83bed7c2632cb88325afe39693880a6656 +Author: Sjoerd Simons +Date: Sun Dec 5 15:51:28 2010 +0000 + + Handle (the absence of) the +t channel mode + + If the channel doesn't have +t set non-ops can also set the channel topic. This + changes idle to flag the subject as always writable untill +t is set and we're + not an op. For extra brownie points a test was added as well :) + + src/idle-muc-channel.c | 26 +++++- + tests/twisted/Makefile.am | 1 + + tests/twisted/channels/muc-channel-topic.py | 133 +++++++++++++++++++++++++++ + 3 files changed, 158 insertions(+), 2 deletions(-) + +commit 174a347d0abcdb99b91eb08f8009326f6799bbdb +Merge: bed998e 2ec8db5 b17c9c9 +Author: Simon McVittie +Date: Wed Dec 1 11:35:26 2010 +0000 + + Merge branches 'trivia' and 'get-bus' + + Reviewed-by: Jonny Lamb + Bug: https://bugs.freedesktop.org/show_bug.cgi?id=31662 + +commit bed998e6e87461b7001a07e766323f45444f296f +Merge: 2815a34 be85e2d +Author: Simon McVittie +Date: Wed Dec 1 11:28:16 2010 +0000 + + Merge branch 'protocol' + + Reviewed-by: Jonny Lamb + Bug: https://bugs.freedesktop.org/show_bug.cgi?id=30536 + +commit b17c9c93c3f0b4cfd25d5999dc742bf8c2ef4b78 +Author: Simon McVittie +Date: Wed Nov 17 16:58:18 2010 +0000 + + fd.o #31662: use TpDBusDaemon to avoid tp_get_bus() + + configure.ac | 2 +- + src/idle-im-channel.c | 6 +++--- + src/idle-muc-channel.c | 6 +++--- + 3 files changed, 7 insertions(+), 7 deletions(-) + +commit be85e2d586dbe1bccac66e38da744ce23a357fa1 +Author: Simon McVittie +Date: Mon Oct 4 19:03:42 2010 +0100 + + Channel managers: implement type_foreach_channel_class + + This lets the Protocol export this information. + + src/idle-im-manager.c | 10 +++++----- + src/idle-muc-manager.c | 10 +++++----- + 2 files changed, 10 insertions(+), 10 deletions(-) + +commit 980215d5973ae67a87131585375665c74b97a586 +Author: Simon McVittie +Date: Mon Oct 4 18:57:47 2010 +0100 + + Test Protocol objects in a basic way + + tests/twisted/Makefile.am | 1 + + tests/twisted/cm/protocol.py | 56 ++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 57 insertions(+), 0 deletions(-) + +commit 84a18ead14f77f44085cde9cd2c23ee1a65448a4 +Author: Simon McVittie +Date: Mon Oct 4 18:57:39 2010 +0100 + + Add Protocol objects + + src/Makefile.am | 2 + + src/idle-connection-manager.c | 110 +++------------------- + src/idle-connection.c | 16 ++- + src/idle-connection.h | 1 + + src/idle-handles.c | 6 +- + src/idle-handles.h | 2 + + src/protocol.c | 208 +++++++++++++++++++++++++++++++++++++++++ + src/protocol.h | 69 ++++++++++++++ + 8 files changed, 313 insertions(+), 101 deletions(-) + +commit b56152d15e021de1de5644811ad6b50f97a5cc46 +Author: Simon McVittie +Date: Wed Nov 17 16:54:21 2010 +0000 + + Update servicetest from Salut + + tests/twisted/servicetest.py | 428 +++++++++++++++++++++++------------------ + 1 files changed, 240 insertions(+), 188 deletions(-) + +commit 2ec8db5ed92c5cb6af836cba1ba40df7e61664df +Author: Simon McVittie +Date: Fri Aug 6 15:57:33 2010 +0100 + + Fix compiler warning + + src/idle-im-manager.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +commit 6d98494d76e6579e0e0adfe95fa049cdaaa25b03 +Author: Will Thompson +Date: Fri Sep 11 00:12:13 2009 +0100 + + Replace if-else if chain with a switch block. + + src/idle-im-manager.c | 19 +++++++++++++------ + 1 files changed, 13 insertions(+), 6 deletions(-) + +commit 2815a343525313ceb1a82c3e602e8988d528e07b +Author: Will Thompson +Date: Fri Sep 11 00:10:57 2009 +0100 + + Delete commented-out connecting and disconnected hooks + + Reviewed-by: Simon McVittie + + src/idle-im-manager.c | 15 --------------- + 1 files changed, 0 insertions(+), 15 deletions(-) + +commit 7651613c6852b7bf913676f468664430baedff7e +Author: Guillaume Desmottes +Date: Wed Oct 13 15:52:20 2010 +0200 + + actually implement the D-Bus prop iface on text channels + + src/idle-im-channel.c | 4 +++- + src/idle-muc-channel.c | 4 +++- + tests/twisted/messages/messages-iface.py | 13 +++++++++++++ + 3 files changed, 19 insertions(+), 2 deletions(-) + +commit 1a28c77af13b9acc0cad232ac9d213afe60de79f +Author: Guillaume Desmottes +Date: Wed Oct 13 15:52:33 2010 +0200 + + constants.py: sync with Gabble + + tests/twisted/constants.py | 51 +++++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 50 insertions(+), 1 deletions(-) + +commit b1d3b2fdeed87c54974bff2a2a60f1988f5d800c +Merge: d6f3de7 a541f15 +Author: Guillaume Desmottes +Date: Wed Oct 6 15:19:30 2010 +0200 + + Merge branch 'messages-29378' + +commit d6f3de7e29cec9c6a0bc4f48a4a749edcc75b17b +Author: Guillaume Desmottes +Date: Thu Sep 16 15:12:49 2010 +0200 + + remove messages/split-msg-sent-signal.py + + As explained on https://bugs.freedesktop.org/show_bug.cgi?id=29378#c2 we + shouldn't split messages when sending. + + tests/twisted/Makefile.am | 1 - + tests/twisted/messages/split-msg-sent-signal.py | 43 ----------------------- + 2 files changed, 0 insertions(+), 44 deletions(-) + +commit a541f155a4c4233e4c58af3be50d37845ce3a5d6 +Author: Guillaume Desmottes +Date: Thu Sep 16 14:40:48 2010 +0200 + + factor out idle_text_received + + src/idle-im-channel.c | 17 +---------------- + src/idle-muc-channel.c | 17 +---------------- + src/idle-text.c | 26 ++++++++++++++++++++++++++ + src/idle-text.h | 6 ++++++ + 4 files changed, 34 insertions(+), 32 deletions(-) + +commit f75dc6fe69b2a81bb1ee640bfa5092b992f06be0 +Author: Guillaume Desmottes +Date: Thu Sep 16 14:31:04 2010 +0200 + + rename label + + src/idle-text.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +commit 5a70170c153270160f688b8eddaa21268acc2d0f +Author: Guillaume Desmottes +Date: Thu Sep 16 14:26:51 2010 +0200 + + use tp_str_empty() + + src/idle-text.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit e47a0fa6d8333c684039d84a2026e3b43bce6474 +Author: Guillaume Desmottes +Date: Thu Sep 16 14:26:19 2010 +0200 + + bump tp-glib dep to 0.11.1 + + We need it for tp_str_empty() + + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 5e8bc2c76580a4b018baa4455432943dd806b8fe +Author: Guillaume Desmottes +Date: Thu Sep 16 14:24:46 2010 +0200 + + no need to check if content_type is NULL, tp_strdiff does it for us + + src/idle-text.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 3026439222b19dce8d58f069071eec3055889bf3 +Author: Guillaume Desmottes +Date: Thu Sep 16 14:20:18 2010 +0200 + + use G_N_ELEMENTS instead of NUM_SUPPORTED_MESSAGE_TYPES + + src/idle-im-channel.c | 6 ++---- + src/idle-muc-channel.c | 6 ++---- + 2 files changed, 4 insertions(+), 8 deletions(-) + +commit 8cfa0ce2f08324bb6884d7c1ed533e87074c1338 +Author: Guillaume Desmottes +Date: Mon Aug 16 13:41:37 2010 +0200 + + test Messages iface + + tests/twisted/Makefile.am | 1 + + tests/twisted/messages/messages-iface.py | 83 ++++++++++++++++++++++++++++++ + 2 files changed, 84 insertions(+), 0 deletions(-) + +commit 5d540a05ac2ccd48e3892bf6fb7ab74420256597 +Author: Guillaume Desmottes +Date: Mon Aug 16 13:40:53 2010 +0200 + + Implement Messages interface (fdo #29378) + + src/idle-im-channel.c | 106 +++++++++++++++++++++++++----------------------- + src/idle-im-channel.h | 5 +- + src/idle-muc-channel.c | 99 ++++++++++++++++++++++++++------------------- + src/idle-muc-channel.h | 5 +- + src/idle-text.c | 70 +++++++++++++++++++++++--------- + src/idle-text.h | 4 +- + 6 files changed, 170 insertions(+), 119 deletions(-) + +commit cab03c25bdfc574aea3bbc510022cc5360d7e339 +Author: Guillaume Desmottes +Date: Mon Aug 16 13:40:28 2010 +0200 + + make_connection! add Requests + + tests/twisted/servicetest.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 643d066c6e5333340b98cfec944e8fd473c3d428 +Author: Guillaume Desmottes +Date: Fri Aug 13 14:14:07 2010 +0200 + + update constants.py from Gabble + + tests/twisted/constants.py | 136 ++++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 132 insertions(+), 4 deletions(-) + +commit 9000cd3a1219a859ba570fb5553344a154a74870 +Author: Mike Ruprecht +Date: Sun Jul 25 00:37:30 2010 -0500 + + Fix debug-blocks assertion where real size didn't match passed size. + + This patch fixes an issue where g_slice_free was being called on + memory that was allocated with IdleDNSResultReal, but was being + freed as IdleDNSResult. These two structures are a difference size. + With debug-blocks on it asserts this and aborts. + + src/idle-dns-resolver.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit ee7e0394843f2633fc93937e0c154f161d66601a +Author: Simon McVittie +Date: Wed May 26 10:49:22 2010 +0100 + + Update with-session-bus.sh from telepathy-glib, fixing a bashism + + Reviewed-by: Guillaume Desmottes + Bug: https://bugs.freedesktop.org/show_bug.cgi?id=28258 + + tests/twisted/tools/with-session-bus.sh | 12 +++++++++++- + 1 files changed, 11 insertions(+), 1 deletions(-) + +commit 7108457be830d103347220c656d8d9c90bd8ca0d +Author: Will Thompson +Date: Tue Apr 6 19:16:23 2010 +0100 + + Fix a buffer overrun in channel name validation. + + I can't find any coherent specification for this type of channel name + (which appear to start with ! and contain five upper-case or numeric + chars). All the RFCs just reference other RFCs but it seems to be + something to do with safe channels. Anyway... let's not blow up if + someone actually tries to use one of these with less than five + characters after the bang! + + src/idle-handles.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit db0047082c65752e10df22abca683358c15d4bfb +Author: Jonny Lamb +Date: Fri Feb 19 14:03:02 2010 +0000 + + Fix spelling mistake. + + Signed-off-by: Jonny Lamb + + src/idle-parser.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 861597aa629703929399edb3e4ced0e9a49fa3dd +Author: Guillaume Desmottes +Date: Fri Feb 19 13:19:10 2010 +0000 + + start dev of 0.1.7 + + NEWS | 7 +++++++ + configure.ac | 2 +- + 2 files changed, 8 insertions(+), 1 deletions(-) + commit e4adae82d0f6cd8752768e71b1e47861ed3e883d Author: Guillaume Desmottes Date: Fri Feb 19 12:58:40 2010 +0000 @@ -3865,14 +4211,14 @@ generate/xml-modified/idle-connection.xml | 65 - src/Makefile.am | 5 - src/idle-connection-manager.c | 4 +- - src/idle-connection.c | 2578 +++++++---------------------- + src/idle-connection.c | 2688 +++++++---------------------- src/idle-connection.h | 38 +- src/idle-handles.c | 60 - src/idle-handles.h | 5 - src/idle-im-channel.c | 10 +- src/idle-im-factory.c | 4 +- src/idle-parser.c | 13 +- - 10 files changed, 612 insertions(+), 2170 deletions(-) + 10 files changed, 667 insertions(+), 2225 deletions(-) commit f4073990800ea7d7bc256c1661577380c81c85e0 Author: Olli Salli @@ -3896,11 +4242,11 @@ 20070405180531-9db4d-a38a8379863a578a13288c31cf62518761ab47d1.gz generate/xml-modified/idle-connection.xml | 26 - - src/idle-connection.c | 992 +---------------------------- + src/idle-connection.c | 1022 +---------------------------- src/idle-connection.h | 18 - src/idle-handles.c | 29 - src/idle-handles.h | 3 - - 5 files changed, 1 insertions(+), 1067 deletions(-) + 5 files changed, 16 insertions(+), 1082 deletions(-) commit ac9084f75e502815ce05bb39593df88cd27d79ea Author: Olli Salli diff -Nru telepathy-idle-0.1.6/config.guess telepathy-idle-0.1.7/config.guess --- telepathy-idle-0.1.6/config.guess 2009-10-06 19:40:50.000000000 +0000 +++ telepathy-idle-0.1.7/config.guess 2010-12-05 12:08:01.000000000 +0000 @@ -1,10 +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, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. -timestamp='2009-04-27' +timestamp='2009-12-30' # 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 @@ -27,16 +27,16 @@ # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,8 +56,9 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -170,7 +171,7 @@ arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -333,6 +334,9 @@ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" @@ -656,7 +660,7 @@ # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -807,12 +811,12 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) + *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd | genuineintel) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -822,6 +826,9 @@ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -851,6 +858,20 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -873,6 +894,17 @@ frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; @@ -882,78 +914,34 @@ m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - 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:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips64 - #undef mips64el + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #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 | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -962,8 +950,11 @@ *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux @@ -986,66 +977,6 @@ xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - 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 - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1074,7 +1005,7 @@ i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1182,7 +1113,7 @@ rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) @@ -1275,6 +1206,16 @@ *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} diff -Nru telepathy-idle-0.1.6/config.sub telepathy-idle-0.1.7/config.sub --- telepathy-idle-0.1.6/config.sub 2009-10-06 19:40:50.000000000 +0000 +++ telepathy-idle-0.1.7/config.sub 2010-12-05 12:08:01.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. -timestamp='2009-04-17' +timestamp='2010-01-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,13 +32,16 @@ # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -72,8 +75,9 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -149,10 +153,13 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -281,6 +288,7 @@ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ + | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -288,13 +296,14 @@ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -337,7 +346,7 @@ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -365,15 +374,17 @@ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* \ + | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile-* | tilegx-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ @@ -467,6 +478,10 @@ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos @@ -719,6 +734,9 @@ basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -1069,6 +1087,11 @@ basic_machine=tic6x-unknown os=-coff ;; + # This must be matched before tile*. + tilegx*) + basic_machine=tilegx-unknown + os=-linux-gnu + ;; tile*) basic_machine=tile-unknown os=-linux-gnu @@ -1240,6 +1263,9 @@ # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1260,9 +1286,9 @@ # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -kopensolaris* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1283,7 +1309,7 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1416,6 +1442,8 @@ -dicos*) os=-dicos ;; + -nacl*) + ;; -none) ;; *) @@ -1613,7 +1641,7 @@ -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff -Nru telepathy-idle-0.1.6/configure telepathy-idle-0.1.7/configure --- telepathy-idle-0.1.6/configure 2010-02-19 13:11:15.000000000 +0000 +++ telepathy-idle-0.1.7/configure 2010-12-07 11:59:21.000000000 +0000 @@ -1,13 +1,15 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for telepathy-idle 0.1.6. +# Generated by GNU Autoconf 2.67 for telepathy-idle 0.1.7. # # Report bugs to . # +# # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## @@ -318,7 +320,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -358,19 +360,19 @@ fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -677,10 +679,11 @@ -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -699,8 +702,8 @@ # Identity of this package. PACKAGE_NAME='telepathy-idle' PACKAGE_TARNAME='telepathy-idle' -PACKAGE_VERSION='0.1.6' -PACKAGE_STRING='telepathy-idle 0.1.6' +PACKAGE_VERSION='0.1.7' +PACKAGE_STRING='telepathy-idle 0.1.7' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=idle' PACKAGE_URL='' @@ -760,6 +763,8 @@ GLIB_GENMARSHAL GLIB_LIBS GLIB_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH PKG_CONFIG ERROR_CFLAGS am__fastdepCCAS_FALSE @@ -898,6 +903,8 @@ CCAS CCASFLAGS PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR GLIB_CFLAGS GLIB_LIBS DBUS_CFLAGS @@ -968,8 +975,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1014,7 +1022,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1040,7 +1048,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1244,7 +1252,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1260,7 +1268,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1290,8 +1298,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1299,7 +1307,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1317,13 +1325,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1346,7 +1354,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1360,8 +1368,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1376,9 +1384,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1417,11 +1425,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1447,7 +1455,7 @@ # 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 telepathy-idle 0.1.6 to adapt to many kinds of systems. +\`configure' configures telepathy-idle 0.1.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1461,7 +1469,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1517,7 +1525,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of telepathy-idle 0.1.6:";; + short | recursive ) echo "Configuration of telepathy-idle 0.1.7:";; esac cat <<\_ACEOF @@ -1548,12 +1556,16 @@ LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config @@ -1633,10 +1645,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -telepathy-idle configure 0.1.6 -generated by GNU Autoconf 2.64 +telepathy-idle configure 0.1.7 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1681,7 +1693,7 @@ ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1727,7 +1739,7 @@ # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1740,7 +1752,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1783,7 +1795,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1795,7 +1807,7 @@ ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1837,7 +1849,7 @@ fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1849,7 +1861,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1911,8 +1923,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by telepathy-idle $as_me 0.1.6, which was -generated by GNU Autoconf 2.64. Invocation command line was +It was created by telepathy-idle $as_me 0.1.7, which was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2022,11 +2034,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2060,11 +2070,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2077,11 +2085,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2095,11 +2101,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2154,7 +2158,12 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2165,18 +2174,22 @@ for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5 ; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in @@ -2245,7 +2258,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2281,16 +2294,22 @@ ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2406,11 +2425,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2432,7 +2451,7 @@ # 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". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2442,7 +2461,7 @@ # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2614,6 +2633,7 @@ fi + test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else @@ -2621,7 +2641,6 @@ # 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 @@ -2680,7 +2699,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2688,7 +2707,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2722,7 +2741,7 @@ am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2738,7 +2757,7 @@ # Define the identity of the package. PACKAGE='telepathy-idle' - VERSION='0.1.6' + VERSION='0.1.7' cat >>confdefs.h <<_ACEOF @@ -2787,8 +2806,8 @@ -macro_version='2.2.6' -macro_revision='1.3012' +macro_version='2.2.6b' +macro_revision='1.3017' @@ -2806,7 +2825,7 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -2817,16 +2836,16 @@ test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2851,7 +2870,7 @@ ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -2859,7 +2878,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3237,8 +3256,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3259,32 +3278,30 @@ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main () { -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3346,62 +3363,28 @@ else ac_file='' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5 ; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" @@ -3431,16 +3414,75 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5 ; } fi -rm -f conftest$ac_cv_exeext +rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5 ; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : @@ -3483,8 +3525,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3888,7 +3930,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -3964,7 +4006,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4030,7 +4072,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4097,7 +4139,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4213,7 +4255,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -4415,13 +4457,13 @@ else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4418: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4460: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4421: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4463: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4424: output\"" >&5) + (eval echo "\"\$as_me:4466: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -4887,7 +4929,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -5627,7 +5669,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5630 "configure"' > conftest.$ac_ext + echo '#line 5672 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6416,7 +6458,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6432,11 +6474,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6475,7 +6517,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6491,18 +6533,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c @@ -6631,8 +6673,7 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7157,11 +7198,11 @@ -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:7160: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7201: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7164: \$? = $ac_status" >&5 + echo "$as_me:7205: \$? = $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. @@ -7326,7 +7367,7 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -7496,11 +7537,11 @@ -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:7499: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7540: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7503: \$? = $ac_status" >&5 + echo "$as_me:7544: \$? = $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. @@ -7601,11 +7642,11 @@ -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:7604: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7645: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7608: \$? = $ac_status" >&5 + echo "$as_me:7649: \$? = $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 @@ -7656,11 +7697,11 @@ -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:7659: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7700: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7663: \$? = $ac_status" >&5 + echo "$as_me:7704: \$? = $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 @@ -7799,6 +7840,7 @@ fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -7890,7 +7932,7 @@ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -9352,7 +9394,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -10039,7 +10081,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10042 "configure" +#line 10084 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10135,7 +10177,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10138 "configure" +#line 10180 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10671,8 +10713,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -10693,8 +10735,8 @@ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -11806,6 +11848,10 @@ + + + + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -11918,18 +11964,16 @@ $as_echo "no" >&6; } PKG_CONFIG="" fi - fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 $as_echo_n "checking for GLIB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$GLIB_CFLAGS"; then - pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$GLIB_CFLAGS"; then + pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.4, gobject-2.0 >= 2.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.4, gobject-2.0 >= 2.4") 2>&5 ac_status=$? @@ -11939,15 +11983,13 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$GLIB_LIBS"; then - pkg_cv_GLIB_LIBS="$GLIB_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$GLIB_LIBS"; then + pkg_cv_GLIB_LIBS="$GLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.4, gobject-2.0 >= 2.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.4, gobject-2.0 >= 2.4") 2>&5 ac_status=$? @@ -11957,14 +11999,15 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -11972,14 +12015,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.4, gobject-2.0 >= 2.4"` + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.4, gobject-2.0 >= 2.4" 2>&1` else - GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.4, gobject-2.0 >= 2.4"` + GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.4, gobject-2.0 >= 2.4" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 - as_fn_error "Package requirements (glib-2.0 >= 2.4, gobject-2.0 >= 2.4) were not met: + as_fn_error $? "Package requirements (glib-2.0 >= 2.4, gobject-2.0 >= 2.4) were not met: $GLIB_PKG_ERRORS @@ -11988,12 +12031,13 @@ Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_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. @@ -12002,13 +12046,13 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi @@ -12022,11 +12066,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5 $as_echo_n "checking for DBUS... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DBUS_CFLAGS"; then - pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$DBUS_CFLAGS"; then + pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= 0.51, dbus-glib-1 >= 0.51\""; } >&5 ($PKG_CONFIG --exists --print-errors "dbus-1 >= 0.51, dbus-glib-1 >= 0.51") 2>&5 ac_status=$? @@ -12036,15 +12079,13 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DBUS_LIBS"; then - pkg_cv_DBUS_LIBS="$DBUS_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$DBUS_LIBS"; then + pkg_cv_DBUS_LIBS="$DBUS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= 0.51, dbus-glib-1 >= 0.51\""; } >&5 ($PKG_CONFIG --exists --print-errors "dbus-1 >= 0.51, dbus-glib-1 >= 0.51") 2>&5 ac_status=$? @@ -12054,14 +12095,15 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -12069,14 +12111,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-1 >= 0.51, dbus-glib-1 >= 0.51"` + DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1 >= 0.51, dbus-glib-1 >= 0.51" 2>&1` else - DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 0.51, dbus-glib-1 >= 0.51"` + DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1 >= 0.51, dbus-glib-1 >= 0.51" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DBUS_PKG_ERRORS" >&5 - as_fn_error "Package requirements (dbus-1 >= 0.51, dbus-glib-1 >= 0.51) were not met: + as_fn_error $? "Package requirements (dbus-1 >= 0.51, dbus-glib-1 >= 0.51) were not met: $DBUS_PKG_ERRORS @@ -12085,12 +12127,13 @@ Alternatively, you may set the environment variables DBUS_CFLAGS and DBUS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_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. @@ -12099,13 +12142,13 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS DBUS_LIBS=$pkg_cv_DBUS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi @@ -12116,46 +12159,44 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TELEPATHY" >&5 $as_echo_n "checking for TELEPATHY... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$TELEPATHY_CFLAGS"; then - pkg_cv_TELEPATHY_CFLAGS="$TELEPATHY_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"telepathy-glib >= 0.8.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "telepathy-glib >= 0.8.0") 2>&5 +if test -n "$TELEPATHY_CFLAGS"; then + pkg_cv_TELEPATHY_CFLAGS="$TELEPATHY_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"telepathy-glib >= 0.11.3\""; } >&5 + ($PKG_CONFIG --exists --print-errors "telepathy-glib >= 0.11.3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_TELEPATHY_CFLAGS=`$PKG_CONFIG --cflags "telepathy-glib >= 0.8.0" 2>/dev/null` + pkg_cv_TELEPATHY_CFLAGS=`$PKG_CONFIG --cflags "telepathy-glib >= 0.11.3" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$TELEPATHY_LIBS"; then - pkg_cv_TELEPATHY_LIBS="$TELEPATHY_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"telepathy-glib >= 0.8.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "telepathy-glib >= 0.8.0") 2>&5 +if test -n "$TELEPATHY_LIBS"; then + pkg_cv_TELEPATHY_LIBS="$TELEPATHY_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"telepathy-glib >= 0.11.3\""; } >&5 + ($PKG_CONFIG --exists --print-errors "telepathy-glib >= 0.11.3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_TELEPATHY_LIBS=`$PKG_CONFIG --libs "telepathy-glib >= 0.8.0" 2>/dev/null` + pkg_cv_TELEPATHY_LIBS=`$PKG_CONFIG --libs "telepathy-glib >= 0.11.3" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -12163,14 +12204,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TELEPATHY_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "telepathy-glib >= 0.8.0"` + TELEPATHY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "telepathy-glib >= 0.11.3" 2>&1` else - TELEPATHY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "telepathy-glib >= 0.8.0"` + TELEPATHY_PKG_ERRORS=`$PKG_CONFIG --print-errors "telepathy-glib >= 0.11.3" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TELEPATHY_PKG_ERRORS" >&5 - as_fn_error "Package requirements (telepathy-glib >= 0.8.0) were not met: + as_fn_error $? "Package requirements (telepathy-glib >= 0.11.3) were not met: $TELEPATHY_PKG_ERRORS @@ -12179,12 +12220,13 @@ Alternatively, you may set the environment variables TELEPATHY_CFLAGS and TELEPATHY_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_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. @@ -12193,13 +12235,13 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else TELEPATHY_CFLAGS=$pkg_cv_TELEPATHY_CFLAGS TELEPATHY_LIBS=$pkg_cv_TELEPATHY_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi @@ -12210,11 +12252,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5 $as_echo_n "checking for OPENSSL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$OPENSSL_CFLAGS"; then - pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$OPENSSL_CFLAGS"; then + pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 0.9.7\""; } >&5 ($PKG_CONFIG --exists --print-errors "openssl >= 0.9.7") 2>&5 ac_status=$? @@ -12224,15 +12265,13 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$OPENSSL_LIBS"; then - pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$OPENSSL_LIBS"; then + pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 0.9.7\""; } >&5 ($PKG_CONFIG --exists --print-errors "openssl >= 0.9.7") 2>&5 ac_status=$? @@ -12242,14 +12281,15 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -12257,14 +12297,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openssl >= 0.9.7"` + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "openssl >= 0.9.7" 2>&1` else - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl >= 0.9.7"` + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors "openssl >= 0.9.7" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OPENSSL_PKG_ERRORS" >&5 - as_fn_error "Package requirements (openssl >= 0.9.7) were not met: + as_fn_error $? "Package requirements (openssl >= 0.9.7) were not met: $OPENSSL_PKG_ERRORS @@ -12273,12 +12313,13 @@ Alternatively, you may set the environment variables OPENSSL_CFLAGS and OPENSSL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_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. @@ -12287,13 +12328,13 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi @@ -12343,7 +12384,7 @@ done if test -z "$XSLTPROC"; then - as_fn_error "xsltproc (from the libxslt source package) is required" "$LINENO" 5 + as_fn_error $? "xsltproc (from the libxslt source package) is required" "$LINENO" 5 fi PYTHON= for ac_prog in python2.3 python2.4 python2.5 python @@ -12389,7 +12430,7 @@ done if test -z "$PYTHON"; then - as_fn_error "Python is required to compile this package" "$LINENO" 5 + as_fn_error $? "Python is required to compile this package" "$LINENO" 5 fi @@ -12546,6 +12587,7 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -12569,27 +12611,27 @@ fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then - as_fn_error "conditional \"am__fastdepCCAS\" was never defined. + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WANT_TWISTED_TESTS_TRUE}" && test -z "${WANT_TWISTED_TESTS_FALSE}"; then - as_fn_error "conditional \"WANT_TWISTED_TESTS\" was never defined. + as_fn_error $? "conditional \"WANT_TWISTED_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WANT_TWISTED_TESTS_TRUE}" && test -z "${WANT_TWISTED_TESTS_FALSE}"; then - as_fn_error "conditional \"WANT_TWISTED_TESTS\" was never defined. + as_fn_error $? "conditional \"WANT_TWISTED_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -12739,19 +12781,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -12947,7 +12989,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -13000,8 +13042,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by telepathy-idle $as_me 0.1.6, which was -generated by GNU Autoconf 2.64. Invocation command line was +This file was extended by telepathy-idle $as_me 0.1.7, which was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13041,6 +13083,7 @@ -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -13063,12 +13106,13 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -telepathy-idle config.status 0.1.6 -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +telepathy-idle config.status 0.1.7 +configured by $0, generated by GNU Autoconf 2.67, + with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -13086,11 +13130,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -13104,12 +13153,15 @@ ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -13122,7 +13174,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -13131,7 +13183,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -13453,7 +13505,7 @@ "tests/twisted/tools/Makefile") CONFIG_FILES="$CONFIG_FILES tests/twisted/tools/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done @@ -13491,7 +13543,7 @@ { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -13508,7 +13560,7 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -13522,18 +13574,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -13555,7 +13607,7 @@ t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -13569,7 +13621,7 @@ t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -13622,20 +13674,28 @@ else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -13663,7 +13723,7 @@ if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -13748,7 +13808,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -13761,7 +13821,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -13789,7 +13849,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -13816,7 +13876,7 @@ case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -13953,22 +14013,22 @@ $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -13979,19 +14039,19 @@ $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -14776,7 +14836,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -14797,7 +14857,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -Nru telepathy-idle-0.1.6/configure.ac telepathy-idle-0.1.7/configure.ac --- telepathy-idle-0.1.6/configure.ac 2010-02-19 13:10:56.000000000 +0000 +++ telepathy-idle-0.1.7/configure.ac 2010-12-07 11:52:29.000000000 +0000 @@ -11,7 +11,7 @@ m4_define([idle_major_version], [0]) m4_define([idle_minor_version], [1]) -m4_define([idle_micro_version], [6]) +m4_define([idle_micro_version], [7]) m4_define([idle_nano_version], [0]) m4_define([idle_base_version], @@ -85,7 +85,7 @@ AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) -PKG_CHECK_MODULES(TELEPATHY, [telepathy-glib >= 0.8.0]) +PKG_CHECK_MODULES(TELEPATHY, [telepathy-glib >= 0.11.3]) AC_SUBST(TELEPATHY_CFLAGS) AC_SUBST(TELEPATHY_LIBS) diff -Nru telepathy-idle-0.1.6/data/Makefile.in telepathy-idle-0.1.7/data/Makefile.in --- telepathy-idle-0.1.6/data/Makefile.in 2010-02-19 13:11:14.000000000 +0000 +++ telepathy-idle-0.1.7/data/Makefile.in 2010-12-07 11:59:20.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -148,6 +148,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ diff -Nru telepathy-idle-0.1.6/debian/changelog telepathy-idle-0.1.7/debian/changelog --- telepathy-idle-0.1.6/debian/changelog 2010-12-08 08:36:22.000000000 +0000 +++ telepathy-idle-0.1.7/debian/changelog 2010-12-08 08:36:22.000000000 +0000 @@ -1,3 +1,16 @@ +telepathy-idle (0.1.7-1~ppa10.10+1) maverick; urgency=low + + * Upload to telepathy PPA + + -- Guillaume Desmottes Wed, 08 Dec 2010 09:20:39 +0100 + +telepathy-idle (0.1.7-1) unstable; urgency=low + + * New upstream bugfix release. + * debian/control: Bump telepathy-glib build dependency + + -- Sjoerd Simons Tue, 07 Dec 2010 13:13:34 +0000 + telepathy-idle (0.1.6-1) unstable; urgency=low * New upstream release. diff -Nru telepathy-idle-0.1.6/debian/control telepathy-idle-0.1.7/debian/control --- telepathy-idle-0.1.6/debian/control 2010-12-08 08:36:22.000000000 +0000 +++ telepathy-idle-0.1.7/debian/control 2010-12-08 08:36:22.000000000 +0000 @@ -13,7 +13,7 @@ libglib2.0-dev (>= 2.4), libdbus-glib-1-dev (>= 0.51), libssl-dev, - libtelepathy-glib-dev (>= 0.8.0), + libtelepathy-glib-dev (>= 0.11.3), xsltproc, python Standards-Version: 3.8.3 diff -Nru telepathy-idle-0.1.6/extensions/Makefile.in telepathy-idle-0.1.7/extensions/Makefile.in --- telepathy-idle-0.1.6/extensions/Makefile.in 2010-02-19 13:11:14.000000000 +0000 +++ telepathy-idle-0.1.7/extensions/Makefile.in 2010-12-07 11:59:20.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -157,6 +157,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ diff -Nru telepathy-idle-0.1.6/install-sh telepathy-idle-0.1.7/install-sh --- telepathy-idle-0.1.6/install-sh 2009-10-06 19:40:50.000000000 +0000 +++ telepathy-idle-0.1.7/install-sh 2010-12-05 12:08:01.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2006-12-25.00 +scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -515,5 +515,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff -Nru telepathy-idle-0.1.6/ltmain.sh telepathy-idle-0.1.7/ltmain.sh --- telepathy-idle-0.1.6/ltmain.sh 2009-10-06 19:40:50.000000000 +0000 +++ telepathy-idle-0.1.7/ltmain.sh 2010-12-05 12:07:56.000000000 +0000 @@ -1,6 +1,6 @@ # Generated from ltmain.m4sh. -# ltmain.sh (GNU libtool) 2.2.6 +# ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. @@ -65,7 +65,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-4 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,9 +73,9 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6 Debian-2.2.6a-4" +VERSION="2.2.6b Debian-2.2.6b-2" TIMESTAMP="" -package_revision=1.3012 +package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then diff -Nru telepathy-idle-0.1.6/m4/libtool.m4 telepathy-idle-0.1.7/m4/libtool.m4 --- telepathy-idle-0.1.6/m4/libtool.m4 2009-10-06 19:40:50.000000000 +0000 +++ telepathy-idle-0.1.7/m4/libtool.m4 2010-12-05 12:07:56.000000000 +0000 @@ -2445,7 +2445,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -3084,7 +3084,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3705,7 +3705,7 @@ ;; esac ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -3989,7 +3989,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -4285,6 +4285,7 @@ fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -4376,7 +4377,7 @@ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -5860,7 +5861,7 @@ _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler diff -Nru telepathy-idle-0.1.6/m4/ltversion.m4 telepathy-idle-0.1.7/m4/ltversion.m4 --- telepathy-idle-0.1.6/m4/ltversion.m4 2009-10-06 19:40:50.000000000 +0000 +++ telepathy-idle-0.1.7/m4/ltversion.m4 2010-12-05 12:07:56.000000000 +0000 @@ -9,15 +9,15 @@ # Generated from ltversion.in. -# serial 3012 ltversion.m4 +# serial 3017 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.6]) -m4_define([LT_PACKAGE_REVISION], [1.3012]) +m4_define([LT_PACKAGE_VERSION], [2.2.6b]) +m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6' -macro_revision='1.3012' +[macro_version='2.2.6b' +macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru telepathy-idle-0.1.6/m4/Makefile.in telepathy-idle-0.1.7/m4/Makefile.in --- telepathy-idle-0.1.6/m4/Makefile.in 2010-02-19 13:11:14.000000000 +0000 +++ telepathy-idle-0.1.7/m4/Makefile.in 2010-12-07 11:59:20.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -124,6 +124,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ diff -Nru telepathy-idle-0.1.6/Makefile.in telepathy-idle-0.1.7/Makefile.in --- telepathy-idle-0.1.6/Makefile.in 2010-02-19 13:11:15.000000000 +0000 +++ telepathy-idle-0.1.7/Makefile.in 2010-12-07 11:59:21.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -180,6 +180,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ @@ -317,7 +319,7 @@ # (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'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -342,7 +344,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -509,7 +511,8 @@ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -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 $(install_sh) -c -m a+r {} {} \; \ @@ -553,17 +556,17 @@ distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac diff -Nru telepathy-idle-0.1.6/NEWS telepathy-idle-0.1.7/NEWS --- telepathy-idle-0.1.6/NEWS 2010-02-19 13:10:56.000000000 +0000 +++ telepathy-idle-0.1.7/NEWS 2010-12-07 11:52:29.000000000 +0000 @@ -1,3 +1,24 @@ +telepathy-idle 0.1.7 (2010-12-07) +================================= + +The “You touched it last!” release. + +Dependencies: + +* telepathy-glib 0.11.3 + +Enhancements: + +* Implement the Messages interface. (cassidy) +* Implement Protocol objects. (smcv) +* Stop using tp_get_bus. (smcv) + +Fixes: + +* Fix a buffer overrun in channel name validation. (wjt) +* Fix the handling of the +t channel flag. (sjoerd) +* Fix free of invalid size using g_slice. (sjoerd) + telepathy-idle 0.1.6 (2010-02-19) ================================= diff -Nru telepathy-idle-0.1.6/src/idle-connection.c telepathy-idle-0.1.7/src/idle-connection.c --- telepathy-idle-0.1.6/src/idle-connection.c 2009-10-06 19:34:32.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-connection.c 2010-12-05 12:07:00.000000000 +0000 @@ -364,15 +364,21 @@ G_OBJECT_CLASS(idle_connection_parent_class)->finalize(object); } +static const gchar * interfaces_always_present[] = { + TP_IFACE_CONNECTION_INTERFACE_ALIASING, + IDLE_IFACE_CONNECTION_INTERFACE_RENAMING, + TP_IFACE_CONNECTION_INTERFACE_REQUESTS, + NULL}; + +const gchar * const *idle_connection_get_implemented_interfaces (void) { + /* we don't have any conditionally-implemented interfaces yet */ + return interfaces_always_present; +} + static void idle_connection_class_init(IdleConnectionClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); TpBaseConnectionClass *parent_class = TP_BASE_CONNECTION_CLASS(klass); GParamSpec *param_spec; - static const gchar *interfaces_always_present[] = { - TP_IFACE_CONNECTION_INTERFACE_ALIASING, - IDLE_IFACE_CONNECTION_INTERFACE_RENAMING, - TP_IFACE_CONNECTION_INTERFACE_REQUESTS, - NULL}; g_type_class_add_private(klass, sizeof(IdleConnectionPrivate)); diff -Nru telepathy-idle-0.1.6/src/idle-connection.h telepathy-idle-0.1.7/src/idle-connection.h --- telepathy-idle-0.1.6/src/idle-connection.h 2009-07-28 16:49:54.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-connection.h 2010-12-05 12:07:00.000000000 +0000 @@ -63,6 +63,7 @@ void idle_connection_emit_queued_aliases_changed(IdleConnection *conn); void idle_connection_send(IdleConnection *conn, const gchar *msg); gsize idle_connection_get_max_message_length(IdleConnection *conn); +const gchar * const *idle_connection_get_implemented_interfaces (void); G_END_DECLS diff -Nru telepathy-idle-0.1.6/src/idle-connection-manager.c telepathy-idle-0.1.7/src/idle-connection-manager.c --- telepathy-idle-0.1.6/src/idle-connection-manager.c 2010-02-19 12:45:24.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-connection-manager.c 2010-12-05 12:07:00.000000000 +0000 @@ -27,79 +27,10 @@ #include "idle-connection.h" #include "idle-handles.h" /* to check for valid nick */ #include "idle-debug.h" +#include "protocol.h" G_DEFINE_TYPE(IdleConnectionManager, idle_connection_manager, TP_TYPE_BASE_CONNECTION_MANAGER) -typedef struct _Params Params; -struct _Params { - gchar *account; - gchar *server; - guint16 port; - gchar *password; - gchar *fullname; - gchar *username; - gchar *charset; - gchar *quit_message; - gboolean use_ssl; -}; - -static gpointer _params_new() { - Params *params = g_slice_new0(Params); - - return params; -} - -static void _params_free(gpointer ptr) { - Params *params = (Params *) ptr; - - g_free(params->account); - g_free(params->server); - g_free(params->password); - g_free(params->fullname); - g_free(params->username); - g_free(params->charset); - g_free(params->quit_message); - - g_slice_free(Params, params); -} - -gboolean -filter_nick(const TpCMParamSpec *paramspec, GValue *value, GError **error) -{ - g_assert(value); - g_assert(G_VALUE_HOLDS_STRING(value)); - - const gchar* nick = g_value_get_string (value); - if (!idle_nickname_is_valid(nick, TRUE)) { - g_set_error(error, TP_ERRORS, TP_ERROR_INVALID_HANDLE, "Invalid account name '%s'", nick); - return FALSE; - } - - return TRUE; -} - -static const TpCMParamSpec _params[] = { - {"account", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, TP_CONN_MGR_PARAM_FLAG_REQUIRED, NULL, G_STRUCT_OFFSET(Params, account), filter_nick}, - {"server", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, TP_CONN_MGR_PARAM_FLAG_REQUIRED, NULL, G_STRUCT_OFFSET(Params, server)}, - {"port", DBUS_TYPE_UINT16_AS_STRING, G_TYPE_UINT, TP_CONN_MGR_PARAM_FLAG_HAS_DEFAULT, GINT_TO_POINTER(6667), G_STRUCT_OFFSET(Params, port)}, - {"password", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, - TP_CONN_MGR_PARAM_FLAG_SECRET, - NULL, G_STRUCT_OFFSET(Params, password)}, - {"fullname", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, 0, NULL, G_STRUCT_OFFSET(Params, fullname)}, - {"username", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, 0, NULL, G_STRUCT_OFFSET(Params, username)}, - {"charset", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, TP_CONN_MGR_PARAM_FLAG_HAS_DEFAULT, "UTF-8", G_STRUCT_OFFSET(Params, charset)}, - {"quit-message", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, 0, NULL, G_STRUCT_OFFSET(Params, quit_message)}, - {"use-ssl", DBUS_TYPE_BOOLEAN_AS_STRING, G_TYPE_BOOLEAN, TP_CONN_MGR_PARAM_FLAG_HAS_DEFAULT, GINT_TO_POINTER(FALSE), G_STRUCT_OFFSET(Params, use_ssl)}, - {NULL, NULL, 0, 0, NULL, 0} -}; - -static const TpCMProtocolSpec _protocols[] = { - {"irc", _params, _params_new, _params_free}, - {NULL, NULL, NULL, NULL} -}; - -static TpBaseConnection *_iface_new_connection(TpBaseConnectionManager *self, const gchar *proto, TpIntSet *params_present, void *parsed_params, GError **error); - static void idle_connection_manager_init(IdleConnectionManager *obj) { } @@ -111,36 +42,25 @@ G_OBJECT_CLASS (idle_connection_manager_parent_class)->finalize (object); } +static void idle_connection_manager_constructed (GObject *object) { + TpBaseConnectionManager *base = (TpBaseConnectionManager *) object; + TpBaseProtocol *p; + void (*constructed) (GObject *) = ((GObjectClass *) idle_connection_manager_parent_class)->constructed; + + if (constructed != NULL) + constructed (object); + + p = idle_protocol_new (); + tp_base_connection_manager_add_protocol (base, p); + g_object_unref (p); +} + static void idle_connection_manager_class_init(IdleConnectionManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); TpBaseConnectionManagerClass *parent_class = TP_BASE_CONNECTION_MANAGER_CLASS(klass); - parent_class->new_connection = _iface_new_connection; parent_class->cm_dbus_name = "idle"; - parent_class->protocol_params = _protocols; object_class->finalize = idle_connection_manager_finalize; + object_class->constructed = idle_connection_manager_constructed; } - -static TpBaseConnection *_iface_new_connection(TpBaseConnectionManager *self, const gchar *proto, TpIntSet *params_present, void *parsed_params, GError **error) { - IdleConnection *conn; - Params *params = (Params *) parsed_params; - - g_assert(IDLE_IS_CONNECTION_MANAGER(self)); - - conn = g_object_new(IDLE_TYPE_CONNECTION, - "protocol", proto, - "nickname", params->account, - "server", params->server, - "port", params->port, - "password", params->password, - "realname", params->fullname, - "username", params->username, - "charset", params->charset, - "quit-message", params->quit_message, - "use-ssl", params->use_ssl, - NULL); - - return TP_BASE_CONNECTION(conn); -} - diff -Nru telepathy-idle-0.1.6/src/idle-dns-resolver.c telepathy-idle-0.1.7/src/idle-dns-resolver.c --- telepathy-idle-0.1.6/src/idle-dns-resolver.c 2009-07-28 16:49:54.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-dns-resolver.c 2010-12-05 12:07:00.000000000 +0000 @@ -47,7 +47,7 @@ if (real->addrinfo) freeaddrinfo(real->addrinfo); - g_slice_free(IdleDNSResult, result); + g_slice_free(IdleDNSResultReal, real); } typedef struct _IdleDNSQueryData IdleDNSQueryData; diff -Nru telepathy-idle-0.1.6/src/idle-handles.c telepathy-idle-0.1.7/src/idle-handles.c --- telepathy-idle-0.1.6/src/idle-handles.c 2009-11-11 15:30:45.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-handles.c 2010-12-05 12:07:00.000000000 +0000 @@ -100,7 +100,7 @@ return FALSE; if (channel[0] == '!') { - for (int i = 0; i < 5; i++) { + for (gsize i = 0; i < 5 && i + 1 < len; i++) { if (!g_ascii_isupper(channel[i + 1]) && !isdigit(channel[i + 1])) return FALSE; } @@ -127,7 +127,7 @@ return TRUE; } -static gchar *_nick_normalize_func(TpHandleRepoIface *repo, const gchar *id, gpointer ctx, GError **error) { +gchar *idle_normalize_nickname (const gchar *id, GError **error) { if (!idle_nickname_is_valid(id, FALSE)) { g_set_error(error, TP_ERRORS, TP_ERROR_INVALID_HANDLE, "invalid nickname"); return NULL; @@ -138,6 +138,10 @@ return normalized; } +static gchar *_nick_normalize_func(TpHandleRepoIface *repo, const gchar *id, gpointer ctx, GError **error) { + return idle_normalize_nickname (id, error); +} + static gchar *_channel_normalize_func(TpHandleRepoIface *repo, const gchar *id, gpointer ctx, GError **error) { if (!_channelname_is_valid(id)) { g_set_error(error, TP_ERRORS, TP_ERROR_INVALID_HANDLE, "invalid channel ID"); diff -Nru telepathy-idle-0.1.6/src/idle-handles.h telepathy-idle-0.1.7/src/idle-handles.h --- telepathy-idle-0.1.6/src/idle-handles.h 2009-07-28 16:49:54.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-handles.h 2010-12-05 12:07:00.000000000 +0000 @@ -29,6 +29,8 @@ void idle_handle_repos_init(TpHandleRepoIface **handles); gboolean idle_nickname_is_valid(const gchar *nickname, gboolean strict_mode); +gchar *idle_normalize_nickname (const gchar *nickname, GError **error); + G_END_DECLS #endif /* __IDLE_HANDLES_H__ */ diff -Nru telepathy-idle-0.1.6/src/idle-im-channel.c telepathy-idle-0.1.7/src/idle-im-channel.c --- telepathy-idle-0.1.6/src/idle-im-channel.c 2010-02-18 15:47:31.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-im-channel.c 2010-12-05 12:07:00.000000000 +0000 @@ -31,6 +31,7 @@ #include #include #include +#include #define IDLE_DEBUG_FLAG IDLE_DEBUG_IM #include "idle-connection.h" @@ -39,15 +40,18 @@ #include "idle-text.h" static void _channel_iface_init(gpointer, gpointer); -static void _text_iface_init(gpointer, gpointer); static void _destroyable_iface_init(gpointer, gpointer); +static void idle_im_channel_send (GObject *obj, TpMessage *message, TpMessageSendingFlags flags); + G_DEFINE_TYPE_WITH_CODE(IdleIMChannel, idle_im_channel, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL, _channel_iface_init); - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_TYPE_TEXT, _text_iface_init); + G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_TYPE_TEXT, tp_message_mixin_text_iface_init); + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_MESSAGES, tp_message_mixin_messages_iface_init); G_IMPLEMENT_INTERFACE(TP_TYPE_CHANNEL_IFACE, NULL); G_IMPLEMENT_INTERFACE(TP_TYPE_EXPORTABLE_CHANNEL, NULL); - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_INTERFACE_DESTROYABLE, _destroyable_iface_init);) + G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_INTERFACE_DESTROYABLE, _destroyable_iface_init) + G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_DBUS_PROPERTIES, tp_dbus_properties_mixin_iface_init);) /* property enum */ enum { @@ -93,26 +97,39 @@ static GObject *idle_im_channel_constructor(GType type, guint n_props, GObjectConstructParam *props) { GObject *obj; IdleIMChannelPrivate *priv; - DBusGConnection *bus; + TpDBusDaemon *bus; TpHandleRepoIface *handles; + TpBaseConnection *conn; + TpChannelTextMessageType types[] = { + TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL, + TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION, + TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE, + }; + const gchar * supported_content_types[] = { + "text/plain", + NULL + }; obj = G_OBJECT_CLASS(idle_im_channel_parent_class)->constructor(type, n_props, props); priv = IDLE_IM_CHANNEL_GET_PRIVATE(IDLE_IM_CHANNEL(obj)); - handles = tp_base_connection_get_handles(TP_BASE_CONNECTION(priv->connection), TP_HANDLE_TYPE_CONTACT); + conn = TP_BASE_CONNECTION(priv->connection); + + handles = tp_base_connection_get_handles(conn, TP_HANDLE_TYPE_CONTACT); tp_handle_ref(handles, priv->handle); tp_handle_ref(handles, priv->initiator); g_assert(tp_handle_is_valid(tp_base_connection_get_handles(TP_BASE_CONNECTION(priv->connection), TP_HANDLE_TYPE_CONTACT), priv->handle, NULL)); - bus = tp_get_bus(); - dbus_g_connection_register_g_object(bus, priv->object_path, obj); + bus = tp_base_connection_get_dbus_daemon (conn); + tp_dbus_daemon_register_object (bus, priv->object_path, obj); - tp_text_mixin_init(obj, G_STRUCT_OFFSET(IdleIMChannel, text), handles); - tp_text_mixin_set_message_types(obj, - TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL, - TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION, - TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE, - G_MAXUINT); + /* initialize message mixin */ + tp_message_mixin_init (obj, G_STRUCT_OFFSET (IdleIMChannel, message_mixin), + conn); + tp_message_mixin_implement_sending (obj, idle_im_channel_send, + G_N_ELEMENTS (types), types, 0, + TP_DELIVERY_REPORTING_SUPPORT_FLAG_RECEIVE_FAILURES, + supported_content_types); return obj; } @@ -321,8 +338,8 @@ }; idle_im_channel_class->dbus_props_class.interfaces = prop_interfaces; - tp_text_mixin_class_init(object_class, G_STRUCT_OFFSET(IdleIMChannelClass, text_class)); tp_dbus_properties_mixin_class_init(object_class, G_STRUCT_OFFSET(IdleIMChannelClass, dbus_props_class)); + tp_message_mixin_init_dbus_properties (object_class); } void idle_im_channel_dispose (GObject *object) { @@ -355,18 +372,16 @@ if (priv->object_path) g_free(priv->object_path); - tp_text_mixin_finalize(object); + tp_message_mixin_finalize (object); G_OBJECT_CLASS(idle_im_channel_parent_class)->finalize (object); } gboolean idle_im_channel_receive(IdleIMChannel *chan, TpChannelTextMessageType type, TpHandle sender, const gchar *text) { - time_t stamp = time(NULL); - - g_assert(chan != NULL); - g_assert(IDLE_IS_IM_CHANNEL(chan)); + IdleIMChannelPrivate *priv = IDLE_IM_CHANNEL_GET_PRIVATE (chan); + TpBaseConnection *base_conn = TP_BASE_CONNECTION (priv->connection); - return tp_text_mixin_receive(G_OBJECT(chan), type, sender, stamp, text); + return idle_text_received (G_OBJECT (chan), base_conn, type, text, sender); } /** @@ -395,7 +410,7 @@ /* The IM manager will resurrect the channel if we have pending * messages. When we're resurrected, we want the initiator * to be the contact who sent us those messages, if it isn't already */ - if (tp_text_mixin_has_pending_messages((GObject *)obj, NULL)) { + if (tp_message_mixin_has_pending_messages ((GObject *)obj, NULL)) { IDLE_DEBUG("Not really closing, I still have pending messages"); if (priv->initiator != priv->handle) { @@ -412,7 +427,7 @@ tp_handle_ref(contact_repo, priv->initiator); } - tp_text_mixin_set_rescued((GObject *) obj); + tp_message_mixin_set_rescued ((GObject *) obj); } else { IDLE_DEBUG ("Actually closing, I have no pending messages"); priv->closed = TRUE; @@ -485,32 +500,16 @@ /** * idle_im_channel_send * - * Implements DBus method Send - * on interface org.freedesktop.Telepathy.Channel.Type.Text - * - * @error: Used to return a pointer to a GError detailing any error - * that occured, DBus will throw the error only if this - * function returns false. - * - * Returns: TRUE if successful, FALSE if an error was thrown. + * Indirectly implements (via TpMessageMixin) D-Bus method Send on interface + * org.freedesktop.Telepathy.Channel.Type.Text and D-Bus method SendMessage on + * Channel.Interface.Messages */ -static void idle_im_channel_send(TpSvcChannelTypeText *iface, guint type, const gchar * text, DBusGMethodInvocation *context) { - IdleIMChannel *obj = (IdleIMChannel *)(iface); - IdleIMChannelPrivate *priv = IDLE_IM_CHANNEL_GET_PRIVATE(obj); +static void idle_im_channel_send (GObject *obj, TpMessage *message, TpMessageSendingFlags flags) { + IdleIMChannel *self = (IdleIMChannel *) obj; + IdleIMChannelPrivate *priv = IDLE_IM_CHANNEL_GET_PRIVATE(self); const gchar *recipient = tp_handle_inspect(tp_base_connection_get_handles(TP_BASE_CONNECTION(priv->connection), TP_HANDLE_TYPE_CONTACT), priv->handle); - GError *error; - - if ((recipient == NULL) || (recipient[0] == '\0')) { - IDLE_DEBUG("invalid recipient"); - - error = g_error_new(TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "invalid recipient"); - dbus_g_method_return_error(context, error); - g_error_free(error); - return; - } - - idle_text_send((GObject *)(obj), type, recipient, text, priv->connection, context); + idle_text_send (obj, message, flags, recipient, priv->connection); } static void idle_im_channel_destroy(TpSvcChannelInterfaceDestroyable *iface, DBusGMethodInvocation *context) { @@ -518,7 +517,7 @@ IdleIMChannelPrivate *priv = IDLE_IM_CHANNEL_GET_PRIVATE(obj); IDLE_DEBUG ("called on %p with %spending messages", obj, - tp_text_mixin_has_pending_messages((GObject *)obj, NULL) ? "" : "no "); + tp_message_mixin_has_pending_messages ((GObject *)obj, NULL) ? "" : "no "); priv->closed = TRUE; tp_svc_channel_emit_closed(iface); @@ -537,16 +536,6 @@ #undef IMPLEMENT } -static void _text_iface_init(gpointer g_iface, gpointer iface_data) { - TpSvcChannelTypeTextClass *klass = (TpSvcChannelTypeTextClass *)(g_iface); - - tp_text_mixin_iface_init(g_iface, iface_data); -#define IMPLEMENT(x) tp_svc_channel_type_text_implement_##x (\ - klass, idle_im_channel_##x) - IMPLEMENT(send); -#undef IMPLEMENT -} - static void _destroyable_iface_init(gpointer klass, gpointer iface_data) { #define IMPLEMENT(x) tp_svc_channel_interface_destroyable_implement_##x (\ klass, idle_im_channel_##x) diff -Nru telepathy-idle-0.1.6/src/idle-im-channel.h telepathy-idle-0.1.7/src/idle-im-channel.h --- telepathy-idle-0.1.6/src/idle-im-channel.h 2009-10-06 19:34:32.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-im-channel.h 2010-12-05 12:07:00.000000000 +0000 @@ -22,7 +22,7 @@ #define __IDLE_IM_CHANNEL_H__ #include -#include +#include #include G_BEGIN_DECLS @@ -32,13 +32,12 @@ struct _IdleIMChannelClass { GObjectClass parent_class; - TpTextMixinClass text_class; TpDBusPropertiesMixinClass dbus_props_class; }; struct _IdleIMChannel { GObject parent; - TpTextMixin text; + TpMessageMixin message_mixin; }; GType idle_im_channel_get_type(void); diff -Nru telepathy-idle-0.1.6/src/idle-im-manager.c telepathy-idle-0.1.7/src/idle-im-manager.c --- telepathy-idle-0.1.6/src/idle-im-manager.c 2009-10-06 19:34:32.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-im-manager.c 2010-12-05 12:07:00.000000000 +0000 @@ -73,7 +73,7 @@ static void connection_status_changed_cb (IdleConnection* conn, guint status, guint reason, IdleIMManager *self); static void _im_manager_foreach(TpChannelManager *manager, TpExportableChannelFunc func, gpointer user_data); -static void _im_manager_foreach_class (TpChannelManager* manager, TpChannelManagerChannelClassFunc func, gpointer user_data); +static void _im_manager_type_foreach_class (GType type, TpChannelManagerTypeChannelClassFunc func, gpointer user_data); //static TpChannelManagerRequestStatus _iface_request(TpChannelFactoryIface *iface, const gchar *chan_type, TpHandleType handle_type, guint handle, gpointer request, TpChannelIface **new_chan, GError **error); @@ -219,29 +219,22 @@ { IdleIMManagerPrivate *priv = IDLE_IM_MANAGER_GET_PRIVATE(self); - if (status == TP_CONNECTION_STATUS_DISCONNECTED) { - idle_parser_remove_handlers_by_data(priv->conn->parser, self); - _im_manager_close_all (self); - } else if (status == TP_CONNECTION_STATUS_CONNECTED) { - idle_parser_add_handler(priv->conn->parser, IDLE_PARSER_PREFIXCMD_NOTICE_USER, _notice_privmsg_handler, self); - idle_parser_add_handler(priv->conn->parser, IDLE_PARSER_PREFIXCMD_PRIVMSG_USER, _notice_privmsg_handler, self); - } -} - -/* -static void _iface_connecting(TpChannelFactoryIface *iface) { - IdleIMFactoryPrivate *priv = IDLE_IM_FACTORY_GET_PRIVATE(iface); - - idle_parser_add_handler(priv->conn->parser, IDLE_PARSER_PREFIXCMD_NOTICE_USER, _notice_privmsg_handler, iface); - idle_parser_add_handler(priv->conn->parser, IDLE_PARSER_PREFIXCMD_PRIVMSG_USER, _notice_privmsg_handler, iface); -} + switch (status) { + case TP_CONNECTION_STATUS_DISCONNECTED: + idle_parser_remove_handlers_by_data(priv->conn->parser, self); + _im_manager_close_all (self); + break; -static void _iface_disconnected(TpChannelFactoryIface *iface) { - IdleIMFactoryPrivate *priv = IDLE_IM_FACTORY_GET_PRIVATE(iface); + case TP_CONNECTION_STATUS_CONNECTED: + idle_parser_add_handler(priv->conn->parser, IDLE_PARSER_PREFIXCMD_NOTICE_USER, _notice_privmsg_handler, self); + idle_parser_add_handler(priv->conn->parser, IDLE_PARSER_PREFIXCMD_PRIVMSG_USER, _notice_privmsg_handler, self); + break; - idle_parser_remove_handlers_by_data(priv->conn->parser, iface); + default: + /* Nothing to do. */ + break; + } } -*/ struct _ForeachHelperData { TpExportableChannelFunc func; @@ -266,8 +259,8 @@ } -static void _im_manager_foreach_class (TpChannelManager* manager, - TpChannelManagerChannelClassFunc func, +static void _im_manager_type_foreach_class (GType type, + TpChannelManagerTypeChannelClassFunc func, gpointer user_data) { GHashTable *table; @@ -284,7 +277,7 @@ g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT); g_hash_table_insert (table, (gpointer) im_channel_fixed_properties[1], value); - func (manager, table, im_channel_allowed_properties, user_data); + func (type, table, im_channel_allowed_properties, user_data); g_hash_table_destroy (table); } @@ -480,7 +473,7 @@ TpChannelManagerIface *iface = g_iface; iface->foreach_channel = _im_manager_foreach; - iface->foreach_channel_class = _im_manager_foreach_class; + iface->type_foreach_channel_class = _im_manager_type_foreach_class; iface->request_channel = _im_manager_request_channel; iface->create_channel = _im_manager_create_channel; iface->ensure_channel = _im_manager_ensure_channel; diff -Nru telepathy-idle-0.1.6/src/idle-muc-channel.c telepathy-idle-0.1.7/src/idle-muc-channel.c --- telepathy-idle-0.1.6/src/idle-muc-channel.c 2010-02-18 18:11:35.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-muc-channel.c 2010-12-06 17:25:53.000000000 +0000 @@ -45,16 +45,20 @@ static void _channel_iface_init(gpointer, gpointer); static void _password_iface_init(gpointer, gpointer); static void _properties_iface_init(gpointer, gpointer); -static void _text_iface_init(gpointer, gpointer); + +static void idle_muc_channel_send (GObject *obj, TpMessage *message, TpMessageSendingFlags flags); G_DEFINE_TYPE_WITH_CODE(IdleMUCChannel, idle_muc_channel, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL, _channel_iface_init); G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP, tp_group_mixin_iface_init); G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_INTERFACE_PASSWORD, _password_iface_init); - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_TYPE_TEXT, _text_iface_init); + G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_TYPE_TEXT, tp_message_mixin_text_iface_init); + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_MESSAGES, tp_message_mixin_messages_iface_init); G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_PROPERTIES_INTERFACE, _properties_iface_init); G_IMPLEMENT_INTERFACE(TP_TYPE_EXPORTABLE_CHANNEL, NULL); - G_IMPLEMENT_INTERFACE(TP_TYPE_CHANNEL_IFACE, NULL);) + G_IMPLEMENT_INTERFACE(TP_TYPE_CHANNEL_IFACE, NULL); + G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_DBUS_PROPERTIES, tp_dbus_properties_mixin_iface_init);) + /* signal enum */ enum { @@ -112,6 +116,8 @@ LAST_MODE_FLAG_ENUM } IRCChannelModeFlags; +#define MODE_FLAGS_OP \ + (MODE_FLAG_OPERATOR_PRIVILEGE | MODE_FLAG_HALFOP_PRIVILEGE) typedef struct { IRCChannelModeFlags flags; @@ -282,9 +288,19 @@ static GObject *idle_muc_channel_constructor(GType type, guint n_props, GObjectConstructParam *props) { GObject *obj = G_OBJECT_CLASS(idle_muc_channel_parent_class)->constructor(type, n_props, props); IdleMUCChannelPrivate *priv = IDLE_MUC_CHANNEL_GET_PRIVATE(obj); - DBusGConnection *bus; - TpHandleRepoIface *room_handles = tp_base_connection_get_handles(TP_BASE_CONNECTION(priv->connection), TP_HANDLE_TYPE_ROOM); - TpHandleRepoIface *contact_handles = tp_base_connection_get_handles(TP_BASE_CONNECTION(priv->connection), TP_HANDLE_TYPE_CONTACT); + TpDBusDaemon *bus; + TpBaseConnection *conn = TP_BASE_CONNECTION(priv->connection); + TpHandleRepoIface *room_handles = tp_base_connection_get_handles(conn, TP_HANDLE_TYPE_ROOM); + TpHandleRepoIface *contact_handles = tp_base_connection_get_handles(conn, TP_HANDLE_TYPE_CONTACT); + TpChannelTextMessageType types[] = { + TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL, + TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION, + TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE, + }; + const gchar * supported_content_types[] = { + "text/plain", + NULL + }; tp_handle_ref(room_handles, priv->handle); g_assert(tp_handle_is_valid(room_handles, priv->handle, NULL)); @@ -293,18 +309,19 @@ if (priv->initiator) tp_handle_ref(room_handles, priv->initiator); - bus = tp_get_bus(); - dbus_g_connection_register_g_object(bus, priv->object_path, obj); + bus = tp_base_connection_get_dbus_daemon (conn); + tp_dbus_daemon_register_object (bus, priv->object_path, obj); tp_group_mixin_init(obj, G_STRUCT_OFFSET(IdleMUCChannel, group), contact_handles, priv->connection->parent.self_handle); tp_group_mixin_change_flags(obj, TP_CHANNEL_GROUP_FLAG_PROPERTIES, 0); - tp_text_mixin_init(obj, G_STRUCT_OFFSET(IdleMUCChannel, text), contact_handles); - tp_text_mixin_set_message_types(obj, - TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL, - TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION, - TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE, - G_MAXUINT); + /* initialize message mixin */ + tp_message_mixin_init (obj, G_STRUCT_OFFSET (IdleMUCChannel, message_mixin), + conn); + tp_message_mixin_implement_sending (obj, idle_muc_channel_send, + G_N_ELEMENTS (types), types, 0, + TP_DELIVERY_REPORTING_SUPPORT_FLAG_RECEIVE_FAILURES, + supported_content_types); if (priv->requested) { /* Add ourself to 'remote-pending' while we are joining the channel */ @@ -512,7 +529,7 @@ signals[JOIN_READY] = g_signal_new("join-ready", G_OBJECT_CLASS_TYPE(idle_muc_channel_class), G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); tp_group_mixin_class_init(object_class, G_STRUCT_OFFSET(IdleMUCChannelClass, group_class), add_member, remove_member); - tp_text_mixin_class_init(object_class, G_STRUCT_OFFSET(IdleMUCChannelClass, text_class)); + tp_message_mixin_init_dbus_properties (object_class); static TpDBusPropertiesMixinPropImpl channel_props[] = { { "Interfaces", "interfaces", NULL }, @@ -580,8 +597,8 @@ if (priv->namereply_set) tp_handle_set_destroy(priv->namereply_set); - tp_text_mixin_finalize(object); tp_group_mixin_finalize(object); + tp_message_mixin_finalize (object); G_OBJECT_CLASS (idle_muc_channel_parent_class)->finalize (object); } @@ -613,7 +630,10 @@ g_value_init(value, property_signatures[i].type); - props[i].flags = 0; + if (i == TP_PROPERTY_SUBJECT) + props[i].flags = TP_PROPERTY_FLAG_WRITE; + else + props[i].flags = 0; } } @@ -950,7 +970,10 @@ for (int i = 0; flags_helper[i] != LAST_TP_PROPERTY_ENUM; i++) { guint prop_id = flags_helper[i]; - g_array_append_val(flags_to_change, prop_id); + /* Only handle subject flags here if it's op setable only */ + if (prop_id != TP_PROPERTY_SUBJECT || + (flags & MODE_FLAG_TOPIC_ONLY_SETTABLE_BY_OPS)) + g_array_append_val(flags_to_change, prop_id); } prop_flags = TP_PROPERTY_FLAG_WRITE; @@ -967,6 +990,20 @@ set_tp_property_flags(obj, flags_to_change, 0, prop_flags); } + } else if ((combined & MODE_FLAG_TOPIC_ONLY_SETTABLE_BY_OPS) + && !(priv->mode_state.flags & MODE_FLAGS_OP)) { + /* We're not ops and the MODE_FLAG_TOPIC_ONLY_SETTABLE_BY_OPS flag was + * changed */ + GArray *flags_to_change; + guint prop_id = TP_PROPERTY_SUBJECT; + + flags_to_change = g_array_new(FALSE, FALSE, sizeof(guint)); + g_array_append_val(flags_to_change, prop_id); + + if (add & MODE_FLAG_TOPIC_ONLY_SETTABLE_BY_OPS) + set_tp_property_flags(obj, flags_to_change, 0, TP_PROPERTY_FLAG_WRITE); + else + set_tp_property_flags(obj, flags_to_change, TP_PROPERTY_FLAG_WRITE, 0); } for (int i = 1; i < LAST_MODE_FLAG_ENUM; i <<= 1) { @@ -1066,12 +1103,10 @@ } gboolean idle_muc_channel_receive(IdleMUCChannel *chan, TpChannelTextMessageType type, TpHandle sender, const gchar *text) { - time_t stamp = time(NULL); + IdleMUCChannelPrivate *priv = IDLE_MUC_CHANNEL_GET_PRIVATE (chan); + TpBaseConnection *base_conn = TP_BASE_CONNECTION (priv->connection); - g_assert(chan != NULL); - g_assert(IDLE_IS_MUC_CHANNEL(chan)); - - return tp_text_mixin_receive(G_OBJECT(chan), type, sender, stamp, text); + return idle_text_received (G_OBJECT (chan), base_conn, type, text, sender); } static void send_mode_query_request(IdleMUCChannel *chan) { @@ -2039,27 +2074,25 @@ /** * idle_muc_channel_send * - * Implements DBus method Send - * on interface org.freedesktop.Telepathy.Channel.Type.Text - * - * @error: Used to return a pointer to a GError detailing any error - * that occured, DBus will throw the error only if this - * function returns false. - * - * Returns: TRUE if successful, FALSE if an error was thrown. + * Indirectly implements (via TpMessageMixin) D-Bus method Send on interface + * org.freedesktop.Telepathy.Channel.Type.Text and D-Bus method SendMessage on + * Channel.Interface.Messages */ -static void idle_muc_channel_send (TpSvcChannelTypeText *iface, guint type, const gchar * text, DBusGMethodInvocation *context) { - IdleMUCChannel *obj = (IdleMUCChannel *)(iface); - IdleMUCChannelPrivate *priv = IDLE_MUC_CHANNEL_GET_PRIVATE(obj); - time_t timestamp = time(NULL); +static void +idle_muc_channel_send (GObject *obj, TpMessage *message, TpMessageSendingFlags flags) +{ + IdleMUCChannel *self = (IdleMUCChannel *) obj; + IdleMUCChannelPrivate *priv = IDLE_MUC_CHANNEL_GET_PRIVATE(self); if ((priv->mode_state.flags & MODE_FLAG_MODERATED) && !(priv->mode_state.flags & (MODE_FLAG_OPERATOR_PRIVILEGE | MODE_FLAG_HALFOP_PRIVILEGE | MODE_FLAG_VOICE_PRIVILEGE))) { - IDLE_DEBUG("emitting SEND_ERROR with (%u, %" G_GUINT64_FORMAT ", %u, %s)", TP_CHANNEL_TEXT_SEND_ERROR_PERMISSION_DENIED, (guint64)(timestamp), type, text); - tp_svc_channel_type_text_emit_send_error(iface, TP_CHANNEL_TEXT_SEND_ERROR_PERMISSION_DENIED, timestamp, type, text); + GError error = { TP_ERRORS, TP_ERROR_PERMISSION_DENIED, "Channel is moderated" }; + + IDLE_DEBUG("Channel is moderated"); + tp_message_mixin_sent (obj, message, 0, NULL, &error); return; } - idle_text_send((GObject *)(obj), type, priv->channel_name, text, priv->connection, context); + idle_text_send(obj, message, flags, priv->channel_name, priv->connection); } static char to_irc_mode(IdleMUCChannelTPProperty prop_id) { @@ -2370,14 +2403,3 @@ IMPLEMENT(set_properties); #undef IMPLEMENT } - -static void _text_iface_init(gpointer g_iface, gpointer iface_data) { - TpSvcChannelTypeTextClass *klass = (TpSvcChannelTypeTextClass *)(g_iface); - - tp_text_mixin_iface_init(g_iface, iface_data); -#define IMPLEMENT(x) tp_svc_channel_type_text_implement_##x (\ - klass, idle_muc_channel_##x) - IMPLEMENT(send); -#undef IMPLEMENT -} - diff -Nru telepathy-idle-0.1.6/src/idle-muc-channel.h telepathy-idle-0.1.7/src/idle-muc-channel.h --- telepathy-idle-0.1.6/src/idle-muc-channel.h 2009-10-06 19:34:32.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-muc-channel.h 2010-12-05 12:07:00.000000000 +0000 @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include "idle-connection.h" @@ -39,14 +39,13 @@ struct _IdleMUCChannelClass { GObjectClass parent_class; TpGroupMixinClass group_class; - TpTextMixinClass text_class; TpDBusPropertiesMixinClass dbus_props_class; }; struct _IdleMUCChannel { GObject parent; TpGroupMixin group; - TpTextMixin text; + TpMessageMixin message_mixin; }; typedef enum { diff -Nru telepathy-idle-0.1.6/src/idle-muc-manager.c telepathy-idle-0.1.7/src/idle-muc-manager.c --- telepathy-idle-0.1.6/src/idle-muc-manager.c 2010-02-18 16:57:17.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-muc-manager.c 2010-12-05 12:07:00.000000000 +0000 @@ -82,7 +82,7 @@ static void _muc_manager_add_handlers(IdleMUCManager *manager); static void _muc_manager_foreach_channel(TpChannelManager *manager, TpExportableChannelFunc func, gpointer user_data); -static void _muc_manager_foreach_channel_class (TpChannelManager *manager, TpChannelManagerChannelClassFunc func, gpointer user_data); +static void _muc_manager_type_foreach_channel_class (GType type, TpChannelManagerTypeChannelClassFunc func, gpointer user_data); static gboolean _muc_manager_create_channel (TpChannelManager *manager, gpointer request_token, GHashTable *request_properties); static gboolean _muc_manager_request_channel (TpChannelManager *manager, gpointer request_token, GHashTable *request_properties); @@ -602,8 +602,8 @@ } static void -_muc_manager_foreach_channel_class (TpChannelManager *manager, - TpChannelManagerChannelClassFunc func, +_muc_manager_type_foreach_channel_class (GType type, + TpChannelManagerTypeChannelClassFunc func, gpointer user_data) { GHashTable *table = g_hash_table_new_full (g_str_hash, g_str_equal, @@ -620,7 +620,7 @@ g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetHandleType", handle_type_value); - func (manager, table, muc_channel_allowed_properties, + func (type, table, muc_channel_allowed_properties, user_data); g_hash_table_destroy (table); @@ -853,7 +853,7 @@ TpChannelManagerIface *iface = g_iface; iface->foreach_channel = _muc_manager_foreach_channel; - iface->foreach_channel_class = _muc_manager_foreach_channel_class; + iface->type_foreach_channel_class = _muc_manager_type_foreach_channel_class; iface->request_channel = _muc_manager_request_channel; iface->create_channel = _muc_manager_create_channel; iface->ensure_channel = _muc_manager_ensure_channel; diff -Nru telepathy-idle-0.1.6/src/idle-parser.c telepathy-idle-0.1.7/src/idle-parser.c --- telepathy-idle-0.1.6/src/idle-parser.c 2009-10-06 19:34:32.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-parser.c 2010-12-05 12:07:00.000000000 +0000 @@ -404,7 +404,7 @@ goto cleanup; } - IDLE_DEBUG("succesfully parsed"); + IDLE_DEBUG("successfully parsed"); while (link) { MessageHandlerClosure *closure = link->data; diff -Nru telepathy-idle-0.1.6/src/idle-text.c telepathy-idle-0.1.7/src/idle-text.c --- telepathy-idle-0.1.6/src/idle-text.c 2009-11-11 15:30:45.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-text.c 2010-12-05 12:07:00.000000000 +0000 @@ -23,7 +23,7 @@ #include #include -#include +#include #define IDLE_DEBUG_FLAG IDLE_DEBUG_TEXT #include "idle-ctcp.h" @@ -150,40 +150,98 @@ return (GStrv) g_ptr_array_free(messages, FALSE); } -void idle_text_send(GObject *obj, guint type, const gchar *recipient, const gchar *text, IdleConnection *conn, DBusGMethodInvocation *context) { - time_t timestamp = time(NULL); +void idle_text_send(GObject *obj, TpMessage *message, TpMessageSendingFlags flags, const gchar *recipient, IdleConnection *conn) { GError *error = NULL; + const GHashTable *part; + TpChannelTextMessageType type = TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL; + gboolean result = TRUE; + const gchar *content_type, *text; + guint n_parts; GStrv messages; GStrv bodies; - if ((recipient == NULL) || (strlen(recipient) == 0)) { - IDLE_DEBUG("invalid recipient"); + #define INVALID_ARGUMENT(msg, ...) \ + G_STMT_START { \ + IDLE_DEBUG (msg , ## __VA_ARGS__); \ + g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, \ + msg , ## __VA_ARGS__); \ + goto failed; \ + } G_STMT_END - error = g_error_new(TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "invalid recipient"); - dbus_g_method_return_error(context, error); - g_error_free(error); + g_return_if_fail (recipient != NULL); - return; - } + part = tp_message_peek (message, 0); + + if (tp_asv_lookup (part, "message-type") != NULL) + type = tp_asv_get_uint32 (part, "message-type", &result); + + if (!result) + INVALID_ARGUMENT ("message-type must be a 32-bit unsigned integer"); + + if (type >= NUM_TP_CHANNEL_TEXT_MESSAGE_TYPES) + INVALID_ARGUMENT ("invalid message type: %u", type); + + n_parts = tp_message_count_parts (message); + + if (n_parts != 2) + INVALID_ARGUMENT ("message must contain exactly 1 part, not %u", (n_parts - 1)); + + part = tp_message_peek (message, 1); + content_type = tp_asv_get_string (part, "content-type"); + text = tp_asv_get_string (part, "content"); + + if (tp_strdiff (content_type, "text/plain")) + INVALID_ARGUMENT ("message must be text/plain"); + + if (tp_str_empty (text)) + INVALID_ARGUMENT ("content must be a UTF-8 string"); + + /* Okay, it's valid. Let's send it. */ gsize msg_len = idle_connection_get_max_message_length(conn); messages = idle_text_encode_and_split(type, recipient, text, msg_len, &bodies, &error); - if (messages == NULL) { - dbus_g_method_return_error(context, error); - g_error_free(error); - return; - } + if (messages == NULL) + goto failed; for(guint i = 0; messages[i] != NULL; i++) { g_assert(bodies[i] != NULL); idle_connection_send(conn, messages[i]); - - tp_svc_channel_type_text_emit_sent(obj, timestamp, type, bodies[i]); } g_strfreev(messages); g_strfreev(bodies); - tp_svc_channel_type_text_return_from_send(context); + tp_message_mixin_sent (obj, message, flags, "", NULL); + return; + +failed: + g_assert (error != NULL); + tp_message_mixin_sent (obj, message, 0, NULL, error); + g_error_free (error); } +gboolean +idle_text_received (GObject *chan, + TpBaseConnection *base_conn, + TpChannelTextMessageType type, + const gchar *text, + TpHandle sender) +{ + TpMessage *msg; + + msg = tp_message_new (base_conn, 2, 2); + + /* Header */ + if (type != TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL) + tp_message_set_uint32 (msg, 0, "message-type", type); + + tp_message_set_handle (msg, 0, "message-sender", TP_HANDLE_TYPE_CONTACT, sender); + tp_message_set_uint64 (msg, 0, "message-received", time (NULL)); + + /* Body */ + tp_message_set_string (msg, 1, "content-type", "text/plain"); + tp_message_set_string (msg, 1, "content", text); + + tp_message_mixin_take_received (chan, msg); + return TRUE; +} diff -Nru telepathy-idle-0.1.6/src/idle-text.h telepathy-idle-0.1.7/src/idle-text.h --- telepathy-idle-0.1.6/src/idle-text.h 2009-07-28 16:49:54.000000000 +0000 +++ telepathy-idle-0.1.7/src/idle-text.h 2010-12-05 12:07:00.000000000 +0000 @@ -26,13 +26,21 @@ #define DBUS_API_SUBJECT_TO_CHANGE #include +#include + #include "idle-connection.h" G_BEGIN_DECLS gboolean idle_text_decode(const gchar *text, TpChannelTextMessageType *type, gchar **body); GStrv idle_text_encode_and_split(TpChannelTextMessageType type, const gchar *recipient, const gchar *text, gsize max_msg_len, GStrv *bodies_out, GError **error); -void idle_text_send(GObject *obj, guint type, const gchar *recipient, const gchar *text, IdleConnection *conn, DBusGMethodInvocation *ctx); +void idle_text_send(GObject *obj, TpMessage *message, TpMessageSendingFlags flags, const gchar *recipient, IdleConnection *conn); + +gboolean idle_text_received (GObject *chan, + TpBaseConnection *base_conn, + TpChannelTextMessageType type, + const gchar *text, + TpHandle sender); G_END_DECLS diff -Nru telepathy-idle-0.1.6/src/Makefile.am telepathy-idle-0.1.7/src/Makefile.am --- telepathy-idle-0.1.6/src/Makefile.am 2009-10-06 19:34:32.000000000 +0000 +++ telepathy-idle-0.1.7/src/Makefile.am 2010-12-05 12:07:00.000000000 +0000 @@ -30,6 +30,8 @@ idle-muc-manager.h \ idle-parser.c \ idle-parser.h \ + protocol.c \ + protocol.h \ idle-server-connection.c \ idle-server-connection.h \ idle-server-connection-iface.c \ diff -Nru telepathy-idle-0.1.6/src/Makefile.in telepathy-idle-0.1.7/src/Makefile.in --- telepathy-idle-0.1.6/src/Makefile.in 2010-02-19 13:11:14.000000000 +0000 +++ telepathy-idle-0.1.7/src/Makefile.in 2010-12-07 11:59:20.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -57,7 +57,7 @@ idle-connection-manager.lo idle-ctcp.lo idle-debug.lo \ idle-dns-resolver.lo idle-handles.lo idle-im-channel.lo \ idle-im-manager.lo idle-muc-channel.lo idle-muc-manager.lo \ - idle-parser.lo idle-server-connection.lo \ + idle-parser.lo protocol.lo idle-server-connection.lo \ idle-server-connection-iface.lo idle-ssl-server-connection.lo \ idle-text.lo am__objects_1 = idle-server-connection-iface-signals-marshal.lo @@ -200,6 +200,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ @@ -293,6 +295,8 @@ idle-muc-manager.h \ idle-parser.c \ idle-parser.h \ + protocol.c \ + protocol.h \ idle-server-connection.c \ idle-server-connection.h \ idle-server-connection-iface.c \ @@ -451,6 +455,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idle-ssl-server-connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idle-text.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff -Nru telepathy-idle-0.1.6/src/protocol.c telepathy-idle-0.1.7/src/protocol.c --- telepathy-idle-0.1.6/src/protocol.c 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.7/src/protocol.c 2010-12-05 12:07:00.000000000 +0000 @@ -0,0 +1,208 @@ +/* + * protocol.c - IdleProtocol + * Copyright © 2007-2010 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "protocol.h" + +#include +#include +#include +#include + +#include "idle-connection.h" +#include "idle-handles.h" +#include "idle-im-manager.h" +#include "idle-muc-manager.h" + +#define PROTOCOL_NAME "irc" +#define ICON_NAME "im-" PROTOCOL_NAME +#define ENGLISH_NAME "IRC" +#define VCARD_FIELD_NAME "x-" PROTOCOL_NAME +#define DEFAULT_PORT 6667 + +G_DEFINE_TYPE (IdleProtocol, idle_protocol, TP_TYPE_BASE_PROTOCOL) + +gboolean +filter_nick (const TpCMParamSpec *paramspec, + GValue *value, + GError **error) +{ + const gchar *nick = g_value_get_string (value); + + g_assert (value); + g_assert (G_VALUE_HOLDS_STRING(value)); + + if (!idle_nickname_is_valid (nick, TRUE)) + { + g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE, + "Invalid account name '%s'", nick); + return FALSE; + } + + return TRUE; +} + +static const TpCMParamSpec idle_params[] = { + {"account", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, + TP_CONN_MGR_PARAM_FLAG_REQUIRED, NULL, 0, filter_nick}, + { "server", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, + TP_CONN_MGR_PARAM_FLAG_REQUIRED }, + { "port", DBUS_TYPE_UINT16_AS_STRING, G_TYPE_UINT, + TP_CONN_MGR_PARAM_FLAG_HAS_DEFAULT, GUINT_TO_POINTER (DEFAULT_PORT) }, + { "password", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, + TP_CONN_MGR_PARAM_FLAG_SECRET }, + { "fullname", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, 0 }, + { "username", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, 0 }, + { "charset", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, + TP_CONN_MGR_PARAM_FLAG_HAS_DEFAULT, "UTF-8" }, + { "quit-message", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, 0 }, + {"use-ssl", DBUS_TYPE_BOOLEAN_AS_STRING, G_TYPE_BOOLEAN, + TP_CONN_MGR_PARAM_FLAG_HAS_DEFAULT, GINT_TO_POINTER (FALSE) }, + { NULL, NULL, 0, 0, NULL, 0 } +}; + +static void +idle_protocol_init (IdleProtocol *self) +{ +} + +static const TpCMParamSpec * +get_parameters (TpBaseProtocol *self G_GNUC_UNUSED) +{ + return idle_params; +} + +static TpBaseConnection * +new_connection (TpBaseProtocol *protocol G_GNUC_UNUSED, + GHashTable *params, + GError **error G_GNUC_UNUSED) +{ + guint port = tp_asv_get_uint32 (params, "port", NULL); + + if (port == 0) + port = DEFAULT_PORT; + + return g_object_new (IDLE_TYPE_CONNECTION, + "protocol", PROTOCOL_NAME, + "nickname", tp_asv_get_string (params, "account"), + "server", tp_asv_get_string (params, "server"), + "port", port, + "password", tp_asv_get_string (params, "password"), + "realname", tp_asv_get_string (params, "fullname"), + "username", tp_asv_get_string (params, "username"), + "charset", tp_asv_get_string (params, "charset"), + "quit-message", tp_asv_get_string (params, "quit-message"), + "use-ssl", tp_asv_get_boolean (params, "use-ssl", NULL), + NULL); +} + +static gchar * +normalize_contact (TpBaseProtocol *self G_GNUC_UNUSED, + const gchar *contact, + GError **error) +{ + return idle_normalize_nickname (contact, error); +} + +static gchar * +identify_account (TpBaseProtocol *self G_GNUC_UNUSED, + GHashTable *asv, + GError **error) +{ + gchar *nick = idle_normalize_nickname (tp_asv_get_string (asv, "account"), + error); + gchar *server; + gchar *nick_at_server; + + if (nick == NULL) + return NULL; + + server = g_ascii_strdown (tp_asv_get_string (asv, "server"), -1); + + nick_at_server = g_strdup_printf ("%s@%s", nick, server); + g_free (server); + g_free (nick); + return nick_at_server; +} + +static GStrv +get_interfaces (TpBaseProtocol *self) +{ + return g_new0 (gchar *, 1); +} + +static void +get_connection_details (TpBaseProtocol *self, + GStrv *connection_interfaces, + GType **channel_managers, + gchar **icon_name, + gchar **english_name, + gchar **vcard_field) +{ + if (connection_interfaces != NULL) + { + *connection_interfaces = g_strdupv ( + (GStrv) idle_connection_get_implemented_interfaces ()); + } + + if (channel_managers != NULL) + { + GType types[] = { + IDLE_TYPE_IM_MANAGER, + IDLE_TYPE_MUC_MANAGER, + G_TYPE_INVALID }; + + *channel_managers = g_memdup (types, sizeof(types)); + } + + if (icon_name != NULL) + { + *icon_name = g_strdup (ICON_NAME); + } + + if (vcard_field != NULL) + { + *vcard_field = g_strdup (VCARD_FIELD_NAME); + } + + if (english_name != NULL) + { + *english_name = g_strdup (ENGLISH_NAME); + } +} + +static void +idle_protocol_class_init (IdleProtocolClass *klass) +{ + TpBaseProtocolClass *base_class = (TpBaseProtocolClass *) klass; + + base_class->get_parameters = get_parameters; + base_class->new_connection = new_connection; + base_class->normalize_contact = normalize_contact; + base_class->identify_account = identify_account; + base_class->get_interfaces = get_interfaces; + base_class->get_connection_details = get_connection_details; +} + +TpBaseProtocol * +idle_protocol_new (void) +{ + return g_object_new (IDLE_TYPE_PROTOCOL, + "name", PROTOCOL_NAME, + NULL); +} diff -Nru telepathy-idle-0.1.6/src/protocol.h telepathy-idle-0.1.7/src/protocol.h --- telepathy-idle-0.1.6/src/protocol.h 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.7/src/protocol.h 2010-12-05 12:07:00.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * protocol.h - IdleProtocol + * Copyright © 2007-2010 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef IDLE_PROTOCOL_H +#define IDLE_PROTOCOL_H + +#include +#include + +G_BEGIN_DECLS + +typedef struct _IdleProtocol IdleProtocol; +typedef struct _IdleProtocolPrivate IdleProtocolPrivate; +typedef struct _IdleProtocolClass IdleProtocolClass; +typedef struct _IdleProtocolClassPrivate IdleProtocolClassPrivate; + +struct _IdleProtocolClass { + TpBaseProtocolClass parent_class; + + IdleProtocolClassPrivate *priv; +}; + +struct _IdleProtocol { + TpBaseProtocol parent; + + IdleProtocolPrivate *priv; +}; + +GType idle_protocol_get_type (void); + +#define IDLE_TYPE_PROTOCOL \ + (idle_protocol_get_type ()) +#define IDLE_PROTOCOL(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + IDLE_TYPE_PROTOCOL, \ + IdleProtocol)) +#define IDLE_PROTOCOL_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), \ + IDLE_TYPE_PROTOCOL, \ + IdleProtocolClass)) +#define IDLE_IS_PROTOCOL_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), \ + IDLE_TYPE_PROTOCOL)) +#define IDLE_PROTOCOL_GET_CLASS(klass) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + IDLE_TYPE_PROTOCOL, \ + IdleProtocolClass)) + +TpBaseProtocol *idle_protocol_new (void); + +G_END_DECLS + +#endif diff -Nru telepathy-idle-0.1.6/tests/Makefile.in telepathy-idle-0.1.7/tests/Makefile.in --- telepathy-idle-0.1.6/tests/Makefile.in 2010-02-19 13:11:15.000000000 +0000 +++ telepathy-idle-0.1.7/tests/Makefile.in 2010-12-07 11:59:21.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -212,6 +212,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ @@ -404,7 +406,7 @@ # (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'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -429,7 +431,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru telepathy-idle-0.1.6/tests/twisted/channels/muc-channel-topic.py telepathy-idle-0.1.7/tests/twisted/channels/muc-channel-topic.py --- telepathy-idle-0.1.6/tests/twisted/channels/muc-channel-topic.py 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.7/tests/twisted/channels/muc-channel-topic.py 2010-12-06 17:25:53.000000000 +0000 @@ -0,0 +1,136 @@ + +""" +Test connecting topic settings a IRC channel +""" + +from idletest import exec_test +from servicetest import EventPattern, call_async, wrap_channel, assertEquals +from servicetest import sync_dbus +from constants import * +import dbus + +room = "#idletest" + +def get_subject_flags (channel): + props = channel.TpProperties.ListProperties() + for x in props: + if x[1] == 'subject': + return x[3] + +def get_subject_id (channel): + props = channel.TpProperties.ListProperties() + for x in props: + if x[1] == 'subject': + return x[0] + +def has_subject_property (event, subject_id, flags = None): + for (k,v) in event.args[0]: + if k == subject_id: + if flags != None: + assertEquals (flags, v) + return True + return False + +def change_channel_mode (stream, mode_change): + stream.sendMessage ('324', stream.nick, room, mode_change, + prefix='idle.test.server') + +def test_topic_write_flag (q, stream, channel, subject_id, r = 0): + assertEquals (r | PROPERTY_FLAG_WRITE, get_subject_flags (channel)) + + change_channel_mode (stream, '+t') + q.expect('dbus-signal', signal="PropertyFlagsChanged", + predicate= lambda e: + has_subject_property (e, subject_id, r)) + assertEquals (r, get_subject_flags (channel)) + + + change_channel_mode (stream, '-t') + q.expect('dbus-signal', signal="PropertyFlagsChanged", + predicate= lambda e: + has_subject_property (e, subject_id, r | PROPERTY_FLAG_WRITE)) + assertEquals (r | PROPERTY_FLAG_WRITE, get_subject_flags (channel)) + +def test(q, bus, conn, stream): + conn.Connect() + + q.expect_many( + EventPattern('dbus-signal', signal='StatusChanged', args=[1, 1]), + EventPattern('irc-connected')) + q.expect('dbus-signal', signal='SelfHandleChanged', + args=[1L]) + q.expect('dbus-signal', signal='StatusChanged', args=[0, 1]) + + call_async(q, conn.Requests, 'CreateChannel', + { CHANNEL_TYPE: CHANNEL_TYPE_TEXT, + TARGET_HANDLE_TYPE: HT_ROOM, + TARGET_ID: room }) + + q.expect('stream-JOIN') + event = q.expect('dbus-return', method='CreateChannel') + path = event.value[0] + + channel = wrap_channel (bus.get_object(conn.bus_name, path), 'Text') + subject_id = get_subject_id (channel) + + # No topic set so it's not readable + test_topic_write_flag (q, stream, channel, subject_id) + + # Someone sets the topic so it should become readable + stream.sendMessage ('332', stream.nick, room, ':Test123', + prefix='idle.test.server') + q.expect('dbus-signal', signal="PropertyFlagsChanged") + test_topic_write_flag (q, stream, channel, subject_id, PROPERTY_FLAG_READ) + + # Topic is read/write, if we get ops it should stay that way + forbidden = [ EventPattern('dbus-signal', signal="PropertyFlagsChanged", + predicate= lambda e: has_subject_property (e, subject_id))] + q.forbid_events(forbidden) + + # Set ops, check that t flag becomes a no-op + change_channel_mode (stream, '+o ' + stream.nick) + change_channel_mode (stream, '+t') + change_channel_mode (stream, '-t') + change_channel_mode (stream, '-o ' + stream.nick) + + # Check that other flags don't cause issues + change_channel_mode (stream, '+n') + change_channel_mode (stream, '+n') + + change_channel_mode (stream, '+to ' + stream.nick) + change_channel_mode (stream, '-to ' + stream.nick) + + sync_dbus(bus, q, conn) + q.unforbid_events(forbidden) + + # back to normal? + test_topic_write_flag (q, stream, channel, subject_id, PROPERTY_FLAG_READ) + + # Check if setting ops gives us write access on +t channels + change_channel_mode (stream, '+t') + q.expect('dbus-signal', signal="PropertyFlagsChanged", + predicate= lambda e: has_subject_property (e, subject_id, + PROPERTY_FLAG_READ)) + + change_channel_mode (stream, '+o ' + stream.nick) + q.expect('dbus-signal', signal="PropertyFlagsChanged", + predicate= lambda e: has_subject_property (e, subject_id, + PROPERTY_FLAGS_RW)) + + change_channel_mode (stream, '-o ' + stream.nick) + q.expect('dbus-signal', signal="PropertyFlagsChanged", + predicate= lambda e: has_subject_property (e, subject_id, + PROPERTY_FLAG_READ)) + + change_channel_mode (stream, '-t') + q.expect('dbus-signal', signal="PropertyFlagsChanged", + predicate= lambda e: has_subject_property (e, subject_id, + PROPERTY_FLAGS_RW)) + + # And back to normal again ? + test_topic_write_flag (q, stream, channel, subject_id, PROPERTY_FLAG_READ) + return True + +if __name__ == '__main__': + exec_test(test) + diff -Nru telepathy-idle-0.1.6/tests/twisted/cm/protocol.py telepathy-idle-0.1.7/tests/twisted/cm/protocol.py --- telepathy-idle-0.1.6/tests/twisted/cm/protocol.py 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.7/tests/twisted/cm/protocol.py 2010-12-05 12:07:00.000000000 +0000 @@ -0,0 +1,56 @@ +""" +Test Idle's o.fd.T.Protocol implementation +""" + +import dbus +from servicetest import (unwrap, tp_path_prefix, assertEquals, assertContains, + call_async) +from idletest import exec_test +import constants as cs + +def test(q, bus, conn, server): + cm = bus.get_object(cs.CM + '.idle', + tp_path_prefix + '/ConnectionManager/idle') + cm_iface = dbus.Interface(cm, cs.CM) + cm_prop_iface = dbus.Interface(cm, cs.PROPERTIES_IFACE) + + protocols = unwrap(cm_prop_iface.Get(cs.CM, 'Protocols')) + assertEquals(set(['irc']), set(protocols.keys())) + + protocol_names = unwrap(cm_iface.ListProtocols()) + assertEquals(set(['irc']), set(protocol_names)) + + cm_params = cm_iface.GetParameters('irc') + local_props = protocols['irc'] + local_params = local_props[cs.PROTOCOL + '.Parameters'] + assertEquals(cm_params, local_params) + + proto = bus.get_object(cm.bus_name, cm.object_path + '/irc') + proto_iface = dbus.Interface(proto, cs.PROTOCOL) + proto_prop_iface = dbus.Interface(proto, cs.PROPERTIES_IFACE) + proto_props = unwrap(proto_prop_iface.GetAll(cs.PROTOCOL)) + + for key in ['Parameters', 'Interfaces', 'ConnectionInterfaces', + 'RequestableChannelClasses', u'VCardField', u'EnglishName', u'Icon']: + a = local_props[cs.PROTOCOL + '.' + key] + b = proto_props[key] + assertEquals(a, b) + + assertEquals('x-irc', proto_props['VCardField']) + assertEquals('IRC', proto_props['EnglishName']) + assertEquals('im-irc', proto_props['Icon']) + + assertContains(cs.CONN_IFACE_ALIASING, proto_props['ConnectionInterfaces']) + assertContains(cs.CONN_IFACE_REQUESTS, proto_props['ConnectionInterfaces']) + + assertEquals('robot101', unwrap(proto_iface.NormalizeContact('Robot101'))) + + call_async(q, proto_iface, 'IdentifyAccount', {'account': 'Robot101'}) + q.expect('dbus-error', method='IdentifyAccount', name=cs.INVALID_ARGUMENT) + + test_params = {'account': 'Robot101', 'server': 'irc.oftc.net' } + acc_name = unwrap(proto_iface.IdentifyAccount(test_params)) + assertEquals('robot101@irc.oftc.net', acc_name) + +if __name__ == '__main__': + exec_test(test) diff -Nru telepathy-idle-0.1.6/tests/twisted/constants.py telepathy-idle-0.1.7/tests/twisted/constants.py --- telepathy-idle-0.1.6/tests/twisted/constants.py 2009-10-06 19:34:32.000000000 +0000 +++ telepathy-idle-0.1.7/tests/twisted/constants.py 2010-12-05 12:07:00.000000000 +0000 @@ -4,6 +4,8 @@ from dbus import PROPERTIES_IFACE +CM = "org.freedesktop.Telepathy.ConnectionManager" + HT_NONE = 0 HT_CONTACT = 1 HT_ROOM = 2 @@ -21,8 +23,12 @@ CHANNEL_IFACE_MESSAGES = CHANNEL + ".Interface.Messages" CHANNEL_IFACE_PASSWORD = CHANNEL + ".Interface.Password" CHANNEL_IFACE_TUBE = CHANNEL + ".Interface.Tube" +CHANNEL_IFACE_SASL_AUTH = CHANNEL + ".Interface.SaslAuthentication.DRAFT" +CHANNEL_IFACE_CONFERENCE = CHANNEL + '.Interface.Conference' +CHANNEL_TYPE_CALL = CHANNEL + ".Type.Call.DRAFT" CHANNEL_TYPE_CONTACT_LIST = CHANNEL + ".Type.ContactList" +CHANNEL_TYPE_CONTACT_SEARCH = CHANNEL + ".Type.ContactSearch" CHANNEL_TYPE_TEXT = CHANNEL + ".Type.Text" CHANNEL_TYPE_TUBES = CHANNEL + ".Type.Tubes" CHANNEL_TYPE_STREAM_TUBE = CHANNEL + ".Type.StreamTube" @@ -30,10 +36,15 @@ CHANNEL_TYPE_STREAMED_MEDIA = CHANNEL + ".Type.StreamedMedia" CHANNEL_TYPE_TEXT = CHANNEL + ".Type.Text" CHANNEL_TYPE_FILE_TRANSFER = CHANNEL + ".Type.FileTransfer" +CHANNEL_TYPE_SERVER_AUTHENTICATION = \ + CHANNEL + ".Type.ServerAuthentication.DRAFT" +CHANNEL_TYPE_SERVER_TLS_CONNECTION = \ + CHANNEL + ".Type.ServerTLSConnection" TP_AWKWARD_PROPERTIES = "org.freedesktop.Telepathy.Properties" PROPERTY_FLAG_READ = 1 PROPERTY_FLAG_WRITE = 2 +PROPERTY_FLAGS_RW = PROPERTY_FLAG_READ | PROPERTY_FLAG_WRITE CHANNEL_TYPE = CHANNEL + '.ChannelType' TARGET_HANDLE_TYPE = CHANNEL + '.TargetHandleType' @@ -44,23 +55,84 @@ INITIATOR_ID = CHANNEL + '.InitiatorID' INTERFACES = CHANNEL + '.Interfaces' -INITIAL_AUDIO = CHANNEL_TYPE_STREAMED_MEDIA + '.FUTURE.InitialAudio' -INITIAL_VIDEO = CHANNEL_TYPE_STREAMED_MEDIA + '.FUTURE.InitialVideo' +INITIAL_AUDIO = CHANNEL_TYPE_STREAMED_MEDIA + '.InitialAudio' +INITIAL_VIDEO = CHANNEL_TYPE_STREAMED_MEDIA + '.InitialVideo' +IMMUTABLE_STREAMS = CHANNEL_TYPE_STREAMED_MEDIA + '.ImmutableStreams' + +CALL_INITIAL_AUDIO = CHANNEL_TYPE_CALL + '.InitialAudio' +CALL_INITIAL_VIDEO = CHANNEL_TYPE_CALL + '.InitialVideo' +CALL_MUTABLE_CONTENTS = CHANNEL_TYPE_CALL + '.MutableContents' + +CALL_CONTENT = 'org.freedesktop.Telepathy.Call.Content.DRAFT' +CALL_CONTENT_IFACE_MEDIA = \ + 'org.freedesktop.Telepathy.Call.Content.Interface.Media.DRAFT' + +CALL_CONTENT_CODECOFFER = \ + 'org.freedesktop.Telepathy.Call.Content.CodecOffer.DRAFT' + +CALL_STREAM = 'org.freedesktop.Telepathy.Call.Stream.DRAFT' +CALL_STREAM_IFACE_MEDIA = \ + 'org.freedesktop.Telepathy.Call.Stream.Interface.Media.DRAFT' + +CALL_STREAM_ENDPOINT = 'org.freedesktop.Telepathy.Call.Stream.Endpoint.DRAFT' + +CALL_MEDIA_TYPE_AUDIO = 0 +CALL_MEDIA_TYPE_VIDEO = 1 + +CALL_STREAM_TRANSPORT_RAW_UDP = 0 +CALL_STREAM_TRANSPORT_ICE = 1 +CALL_STREAM_TRANSPORT_GOOGLE = 2 + +CALL_STATE_UNKNOWN = 0 +CALL_STATE_PENDING_INITIATOR = 1 +CALL_STATE_PENDING_RECEIVER = 2 +CALL_STATE_ACCEPTED = 3 +CALL_STATE_ENDED = 4 + +CALL_MEMBER_FLAG_RINGING = 1 +CALL_MEMBER_FLAG_HELD = 2 + +CALL_DISPOSITION_NONE = 0 +CALL_DISPOSITION_EARLY_MEDIA = 1 +CALL_DISPOSITION_INITIAL = 2 + +CALL_SENDING_STATE_NONE = 0 +CALL_SENDING_STATE_PENDING_SEND = 1 +CALL_SENDING_STATE_SENDING = 2 + +SUBSCRIPTION_STATE_UNKNOWN = 0 +SUBSCRIPTION_STATE_NO = 1 +SUBSCRIPTION_STATE_REMOVED_REMOTELY = 2 +SUBSCRIPTION_STATE_ASK = 3 +SUBSCRIPTION_STATE_YES = 4 + +CONTACT_LIST_STATE_NONE = 0 +CONTACT_LIST_STATE_WAITING = 1 +CONTACT_LIST_STATE_FAILURE = 2 +CONTACT_LIST_STATE_SUCCESS = 3 CONN = "org.freedesktop.Telepathy.Connection" CONN_IFACE_AVATARS = CONN + '.Interface.Avatars' +CONN_IFACE_ALIASING = CONN + '.Interface.Aliasing' CONN_IFACE_CAPS = CONN + '.Interface.Capabilities' CONN_IFACE_CONTACTS = CONN + '.Interface.Contacts' -CONN_IFACE_CONTACT_CAPS = CONN + '.Interface.ContactCapabilities.DRAFT' +CONN_IFACE_CONTACT_CAPS = CONN + '.Interface.ContactCapabilities' +CONN_IFACE_CONTACT_INFO = CONN + ".Interface.ContactInfo" +CONN_IFACE_PRESENCE = CONN + '.Interface.Presence' CONN_IFACE_SIMPLE_PRESENCE = CONN + '.Interface.SimplePresence' CONN_IFACE_REQUESTS = CONN + '.Interface.Requests' CONN_IFACE_LOCATION = CONN + '.Interface.Location' +CONN_IFACE_GABBLE_DECLOAK = CONN + '.Interface.Gabble.Decloak' +CONN_IFACE_MAIL_NOTIFICATION = CONN + '.Interface.MailNotification.DRAFT' +CONN_IFACE_CONTACT_LIST = CONN + '.Interface.ContactList' +CONN_IFACE_CONTACT_GROUPS = CONN + '.Interface.ContactGroups' + +ATTR_CONTACT_CAPABILITIES = CONN_IFACE_CONTACT_CAPS + '/capabilities' STREAM_HANDLER = 'org.freedesktop.Telepathy.Media.StreamHandler' ERROR = 'org.freedesktop.Telepathy.Error' INVALID_ARGUMENT = ERROR + '.InvalidArgument' -INVALID_HANDLE = ERROR + '.InvalidHandle' NOT_IMPLEMENTED = ERROR + '.NotImplemented' NOT_AVAILABLE = ERROR + '.NotAvailable' PERMISSION_DENIED = ERROR + '.PermissionDenied' @@ -70,6 +142,15 @@ CONNECTION_FAILED = ERROR + '.ConnectionFailed' CONNECTION_LOST = ERROR + '.ConnectionLost' CANCELLED = ERROR + '.Cancelled' +DISCONNECTED = ERROR + '.Disconnected' +REGISTRATION_EXISTS = ERROR + '.RegistrationExists' +AUTHENTICATION_FAILED = ERROR + '.AuthenticationFailed' +CONNECTION_REPLACED = ERROR + '.ConnectionReplaced' +ALREADY_CONNECTED = ERROR + '.AlreadyConnected' +NETWORK_ERROR = ERROR + '.NetworkError' +NOT_YET = ERROR + '.NotYet' +INVALID_HANDLE = ERROR + '.InvalidHandle' +CERT_UNTRUSTED = ERROR + '.Cert.Untrusted' UNKNOWN_METHOD = 'org.freedesktop.DBus.Error.UnknownMethod' @@ -79,6 +160,21 @@ DBUS_TUBE_SERVICE_NAME = CHANNEL_TYPE_DBUS_TUBE + '.ServiceName' DBUS_TUBE_DBUS_NAMES = CHANNEL_TYPE_DBUS_TUBE + '.DBusNames' DBUS_TUBE_SUPPORTED_ACCESS_CONTROLS = CHANNEL_TYPE_DBUS_TUBE + '.SupportedAccessControls' +STREAM_TUBE_SUPPORTED_SOCKET_TYPES = CHANNEL_TYPE_STREAM_TUBE + '.SupportedSocketTypes' + +CONFERENCE_INITIAL_CHANNELS = CHANNEL_IFACE_CONFERENCE + '.InitialChannels' +CONFERENCE_INITIAL_INVITEE_HANDLES = CHANNEL_IFACE_CONFERENCE + '.InitialInviteeHandles' +CONFERENCE_INITIAL_INVITEE_IDS = CHANNEL_IFACE_CONFERENCE + '.InitialInviteeIDs' + +CONTACT_SEARCH_ASK = CHANNEL_TYPE_CONTACT_SEARCH + '.AvailableSearchKeys' +CONTACT_SEARCH_SERVER = CHANNEL_TYPE_CONTACT_SEARCH + '.Server' +CONTACT_SEARCH_STATE = CHANNEL_TYPE_CONTACT_SEARCH + '.SearchState' + +SEARCH_NOT_STARTED = 0 +SEARCH_IN_PROGRESS = 1 +SEARCH_MORE_AVAILABLE = 2 +SEARCH_COMPLETED = 3 +SEARCH_FAILED = 4 TUBE_CHANNEL_STATE_LOCAL_PENDING = 0 TUBE_CHANNEL_STATE_REMOTE_PENDING = 1 @@ -156,6 +252,7 @@ FT_AVAILABLE_SOCKET_TYPES = CHANNEL_TYPE_FILE_TRANSFER + '.AvailableSocketTypes' FT_TRANSFERRED_BYTES = CHANNEL_TYPE_FILE_TRANSFER + '.TransferredBytes' FT_INITIAL_OFFSET = CHANNEL_TYPE_FILE_TRANSFER + '.InitialOffset' +FT_FILE_COLLECTION = CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE.FileCollection' GF_CAN_ADD = 1 GF_CAN_REMOVE = 2 @@ -232,3 +329,83 @@ MEDIA_CAP_STUN = 4 MEDIA_CAP_GTALKP2P = 8 MEDIA_CAP_ICEUDP = 16 +MEDIA_CAP_IMMUTABLE_STREAMS = 32 + +CLIENT = 'org.freedesktop.Telepathy.Client' + +PRESENCE_OFFLINE = 1 +PRESENCE_AVAILABLE = 2 +PRESENCE_AWAY = 3 +PRESENCE_EXTENDED_AWAY = 4 +PRESENCE_HIDDEN = 5 +PRESENCE_BUSY = 6 +PRESENCE_UNKNOWN = 7 +PRESENCE_ERROR = 8 + +CONTACT_INFO_FLAG_CAN_SET = 1 +CONTACT_INFO_FLAG_PUSH = 2 +CONTACT_INFO_FIELD_FLAG_PARAMETERS_MANDATORY = 1 + +# Channel_Type_ServerAuthentication +AUTH_TYPE_SASL = 0 +AUTH_TYPE_CAPTCHA = 1 + +# Channel_Interface_SaslAuthentication +SASL_STATUS_NOT_STARTED = 0 +SASL_STATUS_IN_PROGRESS = 1 +SASL_STATUS_SERVER_SUCCEEDED = 2 +SASL_STATUS_CLIENT_ACCEPTED = 3 +SASL_STATUS_SUCCEEDED = 4 +SASL_STATUS_SERVER_FAILED = 5 +SASL_STATUS_CLIENT_FAILED = 6 + +SASL_ABORT_REASON_INVALID_CHALLENGE = 0 +SASL_ABORT_REASON_USER_ABORT = 1 + +AUTH_METHOD = CHANNEL_TYPE_SERVER_AUTHENTICATION + ".AuthenticationMethod" +AUTH_INFO = CHANNEL_TYPE_SERVER_AUTHENTICATION + ".AuthenticationInformation" +SASL_AVAILABLE_MECHANISMS = CHANNEL_IFACE_SASL_AUTH + ".AvailableMechanisms" + +# Channel_Type_ServerTLSConnection +TLS_CERT_PATH = CHANNEL_TYPE_SERVER_TLS_CONNECTION + ".ServerCertificate" +TLS_HOSTNAME = CHANNEL_TYPE_SERVER_TLS_CONNECTION + ".Hostname" + +# Connection.Interface.Location + +LOCATION_FEATURE_CAN_SET = 1 + +# Channel.Type.Text + +MT_NORMAL = 0 +MT_ACTION = 1 +MT_NOTICE = 2 +MT_AUTO_REPLY = 3 +MT_DELIVERY_REPORT = 4 + +PROTOCOL = 'org.freedesktop.Telepathy.Protocol' +PARAM_REQUIRED = 1 +PARAM_REGISTER = 2 +PARAM_HAS_DEFAULT = 4 +PARAM_SECRET = 8 +PARAM_DBUS_PROPERTY = 16 + +AUTHENTICATION = 'org.freedesktop.Telepathy.Authentication' +AUTH_TLS_CERT = AUTHENTICATION + ".TLSCertificate" + +TLS_CERT_STATE_PENDING = 0 +TLS_CERT_STATE_ACCEPTED = 1 +TLS_CERT_STATE_REJECTED = 2 + +TLS_REJECT_REASON_UNKNOWN = 0 +TLS_REJECT_REASON_UNTRUSTED = 1 + +# Channel.Interface.Messages + +MSG_SENDING_FLAGS_REPORT_DELIVERY = 1 +MSG_SENDING_FLAGS_REPORT_READ = 2 +MSG_SENDING_FLAGS_REPORT_DELETED = 4 + +DELIVERY_REPORTING_SUPPORT_FLAGS_RECEIVE_FAILURES = 1 +DELIVERY_REPORTING_SUPPORT_FLAGS_RECEIVE_SUCCESSES = 2 +DELIVERY_REPORTING_SUPPORT_FLAGS_RECEIVE_READ = 4 +DELIVERY_REPORTING_SUPPORT_FLAGS_RECEIVE_DELETED = 8 diff -Nru telepathy-idle-0.1.6/tests/twisted/Makefile.am telepathy-idle-0.1.7/tests/twisted/Makefile.am --- telepathy-idle-0.1.6/tests/twisted/Makefile.am 2009-10-06 19:34:32.000000000 +0000 +++ telepathy-idle-0.1.7/tests/twisted/Makefile.am 2010-12-06 17:25:53.000000000 +0000 @@ -1,4 +1,5 @@ TWISTED_TESTS = \ + cm/protocol.py \ connect/connect-success.py \ connect/connect-success-ssl.py \ connect/connect-fail.py \ @@ -9,12 +10,13 @@ channels/join-muc-channel.py \ channels/requests-create.py \ channels/requests-muc.py \ + channels/muc-channel-topic.py \ messages/accept-invalid-nicks.py \ + messages/messages-iface.py \ messages/message-order.py \ messages/leading-space.py \ messages/long-message-split.py \ messages/room-contact-mixup.py \ - messages/split-msg-sent-signal.py \ $(NULL) TESTS = diff -Nru telepathy-idle-0.1.6/tests/twisted/Makefile.in telepathy-idle-0.1.7/tests/twisted/Makefile.in --- telepathy-idle-0.1.6/tests/twisted/Makefile.in 2010-02-19 13:11:15.000000000 +0000 +++ telepathy-idle-0.1.7/tests/twisted/Makefile.in 2010-12-07 11:59:21.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -167,6 +167,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ @@ -231,6 +233,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TWISTED_TESTS = \ + cm/protocol.py \ connect/connect-success.py \ connect/connect-success-ssl.py \ connect/connect-fail.py \ @@ -241,12 +244,13 @@ channels/join-muc-channel.py \ channels/requests-create.py \ channels/requests-muc.py \ + channels/muc-channel-topic.py \ messages/accept-invalid-nicks.py \ + messages/messages-iface.py \ messages/message-order.py \ messages/leading-space.py \ messages/long-message-split.py \ messages/room-contact-mixup.py \ - messages/split-msg-sent-signal.py \ $(NULL) TESTS_ENVIRONMENT = \ @@ -310,7 +314,7 @@ # (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'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -335,7 +339,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru telepathy-idle-0.1.6/tests/twisted/messages/messages-iface.py telepathy-idle-0.1.7/tests/twisted/messages/messages-iface.py --- telepathy-idle-0.1.6/tests/twisted/messages/messages-iface.py 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.7/tests/twisted/messages/messages-iface.py 2010-12-05 12:07:00.000000000 +0000 @@ -0,0 +1,96 @@ +""" +Test Messages interface implementation +""" + +from idletest import exec_test +from servicetest import EventPattern, call_async +import constants as cs +import dbus + +def test_sending(q, bus, conn, stream, chan): + # Send a message using Text API + text_chan = dbus.Interface(chan, cs.CHANNEL_TYPE_TEXT) + + call_async (q, text_chan, 'Send', cs.MT_NORMAL, "Hi!") + + q.expect_many( + EventPattern('dbus-signal', interface=cs.CHANNEL_IFACE_MESSAGES, signal='MessageSent'), + EventPattern('dbus-signal', interface=cs.CHANNEL_TYPE_TEXT, signal='Sent'), + EventPattern('dbus-return', method='Send')) + + # Send a message using Messages API + msg_iface = dbus.Interface(chan, cs.CHANNEL_IFACE_MESSAGES) + + message = [ + {'message-type': cs.MT_NORMAL }, + {'content-type': 'text/plain', + 'content': 'What\'s up?',}] + + call_async(q, msg_iface, 'SendMessage', message, 0) + + q.expect_many( + EventPattern('dbus-signal', interface=cs.CHANNEL_IFACE_MESSAGES, signal='MessageSent'), + EventPattern('dbus-signal', interface=cs.CHANNEL_TYPE_TEXT, signal='Sent'), + EventPattern('dbus-return', method='SendMessage')) + +def test_dbus_properties (chan): + props = chan.GetAll(cs.CHANNEL_IFACE_MESSAGES, + dbus_interface=cs.PROPERTIES_IFACE) + + assert props['SupportedContentTypes'] == ['text/plain'] + assert props['MessagePartSupportFlags'] == 0 + # Don't check props['DeliveryReportingSupport'] as tp-glib uses to forget + # this property + +def test(q, bus, conn, stream): + conn.Connect() + q.expect('dbus-signal', signal='StatusChanged', + args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED]) + + # test MUC channel + call_async(q, conn.Requests, 'CreateChannel', + {cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT, + cs.TARGET_HANDLE_TYPE: cs.HT_ROOM, + cs.TARGET_ID: '#test'}) + + ret = q.expect('dbus-return', method='CreateChannel') + + q.expect('dbus-signal', signal='MembersChanged') + chan = bus.get_object(conn.bus_name, ret.value[0]) + + test_sending(q, bus, conn, stream, chan) + + # Receive a message on the channel + stream.sendMessage('PRIVMSG', '#test', ":pony!", prefix='alice') + q.expect_many( + EventPattern('dbus-signal', interface=cs.CHANNEL_TYPE_TEXT, signal='Received'), + EventPattern('dbus-signal', interface=cs.CHANNEL_IFACE_MESSAGES, + signal='MessageReceived')) + + test_dbus_properties(chan) + + # test private channel + call_async(q, conn.Requests, 'CreateChannel', + {cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT, + cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT, + cs.TARGET_ID: 'alice'}) + + ret = q.expect('dbus-return', method='CreateChannel') + chan = bus.get_object(conn.bus_name, ret.value[0]) + + test_sending(q, bus, conn, stream, chan) + + # Receive a private message from Alice + stream.sendMessage('PRIVMSG', stream.nick, ":badger!", prefix='alice') + q.expect_many( + EventPattern('dbus-signal', interface=cs.CHANNEL_TYPE_TEXT, signal='Received'), + EventPattern('dbus-signal', interface=cs.CHANNEL_IFACE_MESSAGES, + signal='MessageReceived')) + + test_dbus_properties(chan) + + # we're done + call_async(q, conn, 'Disconnect') + +if __name__ == '__main__': + exec_test(test) diff -Nru telepathy-idle-0.1.6/tests/twisted/messages/split-msg-sent-signal.py telepathy-idle-0.1.7/tests/twisted/messages/split-msg-sent-signal.py --- telepathy-idle-0.1.6/tests/twisted/messages/split-msg-sent-signal.py 2009-07-28 16:49:54.000000000 +0000 +++ telepathy-idle-0.1.7/tests/twisted/messages/split-msg-sent-signal.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -""" -Test that the 'Sent' signal is emitted properly when long messages are split -into multiple messages -""" - -from idletest import exec_test -from servicetest import EventPattern, call_async -import dbus - -LONG_MESSAGE='one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty twenty-one twenty-two twenty-three twenty-four twenty-five twenty-six twenty-seven twenty-eight twenty-nine thirty thirty-one thirty-two thirty-three thirty-four thirty-five thirty-six thirty-seven thirty-eight thirty-nine forty forty-one forty-two forty-three forty-four forty-five forty-six forty-seven forty-eight forty-nine fifty fifty-one fifty-two fifty-three fifty-four fifty-five fifty-six fifty-seven fifty-eight fifty-nine sixty sixty-one sixty-two sixty-three sixty-four sixty-five sixty-six sixty-seven sixty-eight sixty-nine' -MESSAGE_PART_ONE='one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty twenty-one twenty-two twenty-three twenty-four twenty-five twenty-six twenty-seven twenty-eight twenty-nine thirty thirty-one thirty-two thirty-three thirty-four thirty-five thirty-six thirty-seven thirty-eight thirty-nine forty forty-one forty-two forty-thr' -MESSAGE_PART_TWO='ee forty-four forty-five forty-six forty-seven forty-eight forty-nine fifty fifty-one fifty-two fifty-three fifty-four fifty-five fifty-six fifty-seven fifty-eight fifty-nine sixty sixty-one sixty-two sixty-three sixty-four sixty-five sixty-six sixty-seven sixty-eight sixty-nine' - -def test(q, bus, conn, stream): - conn.Connect() - q.expect('dbus-signal', signal='StatusChanged', args=[0, 1]) - CHANNEL_NAME = '#idletest' - room_handles = conn.RequestHandles(2, [CHANNEL_NAME]) - call_async(q, conn, 'RequestChannel', 'org.freedesktop.Telepathy.Channel.Type.Text', 2, room_handles[0], True) - - ret = q.expect('dbus-return', method='RequestChannel') - q.expect('dbus-signal', signal='MembersChanged') - chan = bus.get_object(conn.bus_name, ret.value[0]) - - text_chan = dbus.Interface(chan, - u'org.freedesktop.Telepathy.Channel.Type.Text') - # send a whole bunch of messages in a row - call_async(q, text_chan, 'Send', 0, LONG_MESSAGE) - - # should emit two Sent signals since the message is long enough to be - # split into two messages - e = q.expect('dbus-signal', signal='Sent') - assert e.args[2] == MESSAGE_PART_ONE, e.args[2] - - e = q.expect('dbus-signal', signal='Sent') - assert e.args[2] == MESSAGE_PART_TWO, e.args[2] - - call_async(q, conn, 'Disconnect') - return True - -if __name__ == '__main__': - exec_test(test) - diff -Nru telepathy-idle-0.1.6/tests/twisted/servicetest.py telepathy-idle-0.1.7/tests/twisted/servicetest.py --- telepathy-idle-0.1.6/tests/twisted/servicetest.py 2009-07-28 16:49:54.000000000 +0000 +++ telepathy-idle-0.1.7/tests/twisted/servicetest.py 2010-12-05 12:07:00.000000000 +0000 @@ -6,50 +6,20 @@ from twisted.internet import glib2reactor from twisted.internet.protocol import Protocol, Factory, ClientFactory glib2reactor.install() +import sys import pprint -import traceback import unittest import dbus.glib from twisted.internet import reactor +import constants as cs + tp_name_prefix = 'org.freedesktop.Telepathy' tp_path_prefix = '/org/freedesktop/Telepathy' -class TryNextHandler(Exception): - pass - -def lazy(func): - def handler(event, data): - if func(event, data): - return True - else: - raise TryNextHandler() - handler.__name__ = func.__name__ - return handler - -def match(type, **kw): - def decorate(func): - def handler(event, data, *extra, **extra_kw): - if event.type != type: - return False - - for key, value in kw.iteritems(): - if not hasattr(event, key): - return False - - if getattr(event, key) != value: - return False - - return func(event, data, *extra, **extra_kw) - - handler.__name__ = func.__name__ - return handler - - return decorate - class Event: def __init__(self, type, **kw): self.__dict__.update(kw) @@ -68,118 +38,24 @@ return ret -class EventTest: - """Somewhat odd event dispatcher for asynchronous tests. - - Callbacks are kept in a queue. Incoming events are passed to the first - callback. If the callback returns True, the callback is removed. If the - callback raises AssertionError, the test fails. If there are no more - callbacks, the test passes. The reactor is stopped when the test passes. - """ - - def __init__(self): - self.queue = [] - self.data = {'test': self} - self.timeout_delayed_call = reactor.callLater(5, self.timeout_cb) - #self.verbose = True - self.verbose = False - # ugh - self.stopping = False - - def timeout_cb(self): - print 'timed out waiting for events' - print self.queue[0] - self.fail() - - def fail(self): - # ugh; better way to stop the reactor and exit(1)? - import os - os._exit(1) - - def expect(self, f): - self.queue.append(f) - - def log(self, s): - if self.verbose: - print s - - def try_stop(self): - if self.stopping: - return True - - if not self.queue: - self.log('no handlers left; stopping') - self.stopping = True - reactor.stop() - return True - - return False - - def call_handlers(self, event): - self.log('trying %r' % self.queue[0]) - handler = self.queue.pop(0) - - try: - ret = handler(event, self.data) - if not ret: - self.queue.insert(0, handler) - except TryNextHandler, e: - if self.queue: - ret = self.call_handlers(event) - else: - ret = False - self.queue.insert(0, handler) - - return ret - - def handle_event(self, event): - if self.try_stop(): - return - - self.log('got event:') - self.log('- type: %s' % event.type) - map(self.log, format_event(event)) - - try: - ret = self.call_handlers(event) - except SystemExit, e: - if e.code: - print "Unsuccessful exit:", e - self.fail() - else: - self.queue[:] = [] - ret = True - except AssertionError, e: - print 'test failed:' - traceback.print_exc() - self.fail() - except (Exception, KeyboardInterrupt), e: - print 'error in handler:' - traceback.print_exc() - self.fail() - - if ret not in (True, False): - print ("warning: %s() returned something other than True or False" - % self.queue[0].__name__) - - if ret: - self.timeout_delayed_call.reset(5) - self.log('event handled') - else: - self.log('event not handled') - - self.log('') - self.try_stop() - class EventPattern: def __init__(self, type, **properties): self.type = type - self.predicate = lambda x: True + self.predicate = None if 'predicate' in properties: self.predicate = properties['predicate'] del properties['predicate'] self.properties = properties + def __repr__(self): + properties = dict(self.properties) + + if self.predicate is not None: + properties['predicate'] = self.predicate + + return '%s(%r, **%r)' % ( + self.__class__.__name__, self.type, properties) + def match(self, event): if event.type != self.type: return False @@ -191,7 +67,7 @@ except AttributeError: return False - if self.predicate(event): + if self.predicate is None or self.predicate(event): return True return False @@ -208,7 +84,7 @@ def __init__(self, timeout=None): self.verbose = False - self.past_events = [] + self.forbidden_events = set() if timeout is None: self.timeout = 5 @@ -219,55 +95,110 @@ if self.verbose: print s - def flush_past_events(self): - self.past_events = [] - - def expect_racy(self, type, **kw): - pattern = EventPattern(type, **kw) + def log_event(self, event): + if self.verbose: + self.log('got event:') - for event in self.past_events: - if pattern.match(event): - self.log('past event handled') + if self.verbose: map(self.log, format_event(event)) - self.log('') - self.past_events.remove(event) - return event - return self.expect(type, **kw) + def forbid_events(self, patterns): + """ + Add patterns (an iterable of EventPattern) to the set of forbidden + events. If a forbidden event occurs during an expect or expect_many, + the test will fail. + """ + self.forbidden_events.update(set(patterns)) + + def unforbid_events(self, patterns): + """ + Remove 'patterns' (an iterable of EventPattern) from the set of + forbidden events. These must be the same EventPattern pointers that + were passed to forbid_events. + """ + self.forbidden_events.difference_update(set(patterns)) + + def _check_forbidden(self, event): + for e in self.forbidden_events: + if e.match(event): + print "forbidden event occurred:" + for x in format_event(event): + print x + assert False def expect(self, type, **kw): + """ + Waits for an event matching the supplied pattern to occur, and returns + it. For example, to await a D-Bus signal with particular arguments: + + e = q.expect('dbus-signal', signal='Badgers', args=["foo", 42]) + """ pattern = EventPattern(type, **kw) while True: event = self.wait() - self.log('got event:') - map(self.log, format_event(event)) + self.log_event(event) + self._check_forbidden(event) if pattern.match(event): self.log('handled') self.log('') return event - self.past_events.append(event) self.log('not handled') self.log('') def expect_many(self, *patterns): + """ + Waits for events matching all of the supplied EventPattern instances to + return, and returns a list of events in the same order as the patterns + they matched. After a pattern is successfully matched, it is not + considered for future events; if more than one unsatisfied pattern + matches an event, the first "wins". + + Note that the expected events may occur in any order. If you're + expecting a series of events in a particular order, use repeated calls + to expect() instead. + + This method is useful when you're awaiting a number of events which may + happen in any order. For instance, in telepathy-gabble, calling a D-Bus + method often causes a value to be returned immediately, as well as a + query to be sent to the server. Since these events may reach the test + in either order, the following is incorrect and will fail if the IQ + happens to reach the test first: + + ret = q.expect('dbus-return', method='Foo') + query = q.expect('stream-iq', query_ns=ns.FOO) + + The following would be correct: + + ret, query = q.expect_many( + EventPattern('dbus-return', method='Foo'), + EventPattern('stream-iq', query_ns=ns.FOO), + ) + """ ret = [None] * len(patterns) while None in ret: - event = self.wait() - self.log('got event:') - map(self.log, format_event(event)) + try: + event = self.wait() + except TimeoutError: + self.log('timeout') + self.log('still expecting:') + for i, pattern in enumerate(patterns): + if ret[i] is None: + self.log(' - %r' % pattern) + raise + self.log_event(event) + self._check_forbidden(event) for i, pattern in enumerate(patterns): - if pattern.match(event): + if ret[i] is None and pattern.match(event): self.log('handled') self.log('') ret[i] = event break else: - self.past_events.append(event) self.log('not handled') self.log('') @@ -277,8 +208,7 @@ pattern = EventPattern(type, **kw) event = self.wait() - self.log('got event:') - map(self.log, format_event(event)) + self.log_event(event) if pattern.match(event): self.log('handled') @@ -343,6 +273,16 @@ assert bar.type == 'bar' assert foo.type == 'foo' + def test_expect_many2(self): + # Test that events are only matched against patterns that haven't yet + # been matched. This tests a regression. + queue = TestEventQueue([Event('foo', x=1), Event('foo', x=2)]) + foo1, foo2 = queue.expect_many( + EventPattern('foo'), + EventPattern('foo')) + assert foo1.type == 'foo' and foo1.x == 1 + assert foo2.type == 'foo' and foo2.x == 2 + def test_timeout(self): queue = TestEventQueue([]) self.assertRaises(TimeoutError, queue.expect, 'foo') @@ -369,7 +309,10 @@ if isinstance(x, dict): return dict([(unwrap(k), unwrap(v)) for k, v in x.iteritems()]) - for t in [unicode, str, long, int, float, bool]: + if isinstance(x, dbus.Boolean): + return bool(x) + + for t in [unicode, str, long, int, float]: if isinstance(x, t): return t(x) @@ -384,7 +327,8 @@ value=unwrap(ret))) def error_func(err): - test.handle_event(Event('dbus-error', method=method, error=err)) + test.handle_event(Event('dbus-error', method=method, error=err, + name=err.get_dbus_name(), message=str(err))) method_proxy = getattr(proxy, method) kw.update({'reply_handler': reply_func, 'error_handler': error_func}) @@ -392,14 +336,20 @@ def sync_dbus(bus, q, conn): # Dummy D-Bus method call - call_async(q, conn, "InspectHandles", 1, []) - - event = q.expect('dbus-return', method='InspectHandles') + # This won't do the right thing unless the proxy has a unique name. + assert conn.object.bus_name.startswith(':') + root_object = bus.get_object(conn.object.bus_name, '/') + call_async( + q, dbus.Interface(root_object, 'org.freedesktop.DBus.Peer'), 'Ping') + q.expect('dbus-return', method='Ping') class ProxyWrapper: def __init__(self, object, default, others): self.object = object self.default_interface = dbus.Interface(object, default) + self.Properties = dbus.Interface(object, dbus.PROPERTIES_IFACE) + self.TpProperties = \ + dbus.Interface(object, tp_name_prefix + '.Properties') self.interfaces = dict([ (name, dbus.Interface(object, iface)) for name, iface in others.iteritems()]) @@ -413,6 +363,35 @@ return getattr(self.default_interface, name) +def wrap_connection(conn): + return ProxyWrapper(conn, tp_name_prefix + '.Connection', + dict([ + (name, tp_name_prefix + '.Connection.Interface.' + name) + for name in ['Aliasing', 'Avatars', 'Capabilities', 'Contacts', + 'Presence', 'SimplePresence', 'Requests']] + + [('Peer', 'org.freedesktop.DBus.Peer'), + ('ContactCapabilities', cs.CONN_IFACE_CONTACT_CAPS), + ('ContactInfo', cs.CONN_IFACE_CONTACT_INFO), + ('Location', cs.CONN_IFACE_LOCATION), + ('Future', tp_name_prefix + '.Connection.FUTURE'), + ('MailNotification', cs.CONN_IFACE_MAIL_NOTIFICATION), + ('ContactList', cs.CONN_IFACE_CONTACT_LIST), + ('ContactGroups', cs.CONN_IFACE_CONTACT_GROUPS), + ])) + +def wrap_channel(chan, type_, extra=None): + interfaces = { + type_: tp_name_prefix + '.Channel.Type.' + type_, + 'Group': tp_name_prefix + '.Channel.Interface.Group', + } + + if extra: + interfaces.update(dict([ + (name, tp_name_prefix + '.Channel.Interface.' + name) + for name in extra])) + + return ProxyWrapper(chan, tp_name_prefix + '.Channel', interfaces) + def make_connection(bus, event_func, name, proto, params): cm = bus.get_object( tp_name_prefix + '.ConnectionManager.%s' % name, @@ -421,19 +400,13 @@ connection_name, connection_path = cm_iface.RequestConnection( proto, params) - conn = bus.get_object(connection_name, connection_path) - conn = ProxyWrapper(conn, tp_name_prefix + '.Connection', - dict([ - (name, tp_name_prefix + '.Connection.Interface.' + name) - for name in ['Aliasing', 'Avatars', 'Capabilities', 'Contacts', - 'Presence']] + - [('Peer', 'org.freedesktop.DBus.Peer')])) + conn = wrap_connection(bus.get_object(connection_name, connection_path)) bus.add_signal_receiver( lambda *args, **kw: event_func( Event('dbus-signal', - path=unwrap(kw['path'])[len(tp_path_prefix):], + path=unwrap(kw['path']), signal=kw['member'], args=map(unwrap, args), interface=kw['interface'])), None, # signal name @@ -453,20 +426,12 @@ chan = dbus.Interface(chan, tp_name_prefix + '.' + iface) return chan -def load_event_handlers(): - path, _, _, _ = traceback.extract_stack()[0] - import compiler - import __main__ - ast = compiler.parseFile(path) - return [ - getattr(__main__, node.name) - for node in ast.node.asList() - if node.__class__ == compiler.ast.Function and - node.name.startswith('expect_')] - +# block_reading can be used if the test want to choose when we start to read +# data from the socket. class EventProtocol(Protocol): - def __init__(self, queue=None): + def __init__(self, queue=None, block_reading=False): self.queue = queue + self.block_reading = block_reading def dataReceived(self, data): if self.queue is not None: @@ -476,12 +441,24 @@ def sendData(self, data): self.transport.write(data) + def connectionMade(self): + if self.block_reading: + self.transport.stopReading() + + def connectionLost(self, reason=None): + if self.queue is not None: + self.queue.handle_event(Event('socket-disconnected', protocol=self)) + class EventProtocolFactory(Factory): - def __init__(self, queue): + def __init__(self, queue, block_reading=False): self.queue = queue + self.block_reading = block_reading + + def _create_protocol(self): + return EventProtocol(self.queue, self.block_reading) def buildProtocol(self, addr): - proto = EventProtocol(self.queue) + proto = self._create_protocol() self.queue.handle_event(Event('socket-connected', protocol=proto)) return proto @@ -500,6 +477,81 @@ path_keyword='path', member_keyword='member', byte_arrays=True) +def pretty(x): + return pprint.pformat(unwrap(x)) + +def assertEquals(expected, value): + if expected != value: + raise AssertionError( + "expected:\n%s\ngot:\n%s" % (pretty(expected), pretty(value))) + +def assertSameSets(expected, value): + exp_set = set(expected) + val_set = set(value) + + if exp_set != val_set: + raise AssertionError( + "expected contents:\n%s\ngot:\n%s" % ( + pretty(exp_set), pretty(val_set))) + +def assertNotEquals(expected, value): + if expected == value: + raise AssertionError( + "expected something other than:\n%s" % pretty(value)) + +def assertContains(element, value): + if element not in value: + raise AssertionError( + "expected:\n%s\nin:\n%s" % (pretty(element), pretty(value))) + +def assertDoesNotContain(element, value): + if element in value: + raise AssertionError( + "expected:\n%s\nnot in:\n%s" % (pretty(element), pretty(value))) + +def assertLength(length, value): + if len(value) != length: + raise AssertionError("expected: length %d, got length %d:\n%s" % ( + length, len(value), pretty(value))) + +def assertFlagsSet(flags, value): + masked = value & flags + if masked != flags: + raise AssertionError( + "expected flags %u, of which only %u are set in %u" % ( + flags, masked, value)) + +def assertFlagsUnset(flags, value): + masked = value & flags + if masked != 0: + raise AssertionError( + "expected none of flags %u, but %u are set in %u" % ( + flags, masked, value)) + +def install_colourer(): + def red(s): + return '\x1b[31m%s\x1b[0m' % s + + def green(s): + return '\x1b[32m%s\x1b[0m' % s + + patterns = { + 'handled': green, + 'not handled': red, + } + + class Colourer: + def __init__(self, fh, patterns): + self.fh = fh + self.patterns = patterns + + def write(self, s): + f = self.patterns.get(s, lambda x: x) + self.fh.write(f(s)) + + sys.stdout = Colourer(sys.stdout, patterns) + return sys.stdout + if __name__ == '__main__': unittest.main() diff -Nru telepathy-idle-0.1.6/tests/twisted/tools/Makefile.in telepathy-idle-0.1.7/tests/twisted/tools/Makefile.in --- telepathy-idle-0.1.6/tests/twisted/tools/Makefile.in 2010-02-19 13:11:15.000000000 +0000 +++ telepathy-idle-0.1.7/tests/twisted/tools/Makefile.in 2010-12-07 11:59:21.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -124,6 +124,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ diff -Nru telepathy-idle-0.1.6/tests/twisted/tools/with-session-bus.sh telepathy-idle-0.1.7/tests/twisted/tools/with-session-bus.sh --- telepathy-idle-0.1.6/tests/twisted/tools/with-session-bus.sh 2009-07-28 16:49:54.000000000 +0000 +++ telepathy-idle-0.1.7/tests/twisted/tools/with-session-bus.sh 2010-12-05 12:07:00.000000000 +0000 @@ -15,6 +15,7 @@ me=with-session-bus dbus_daemon_args="--print-address=5 --print-pid=6 --fork" +sleep=0 usage () { @@ -29,6 +30,11 @@ while test "z$1" != "z--"; do case "$1" in + --sleep=*) + sleep="$1" + sleep="${sleep#--sleep=}" + shift + ;; --session) dbus_daemon_args="$dbus_daemon_args --session" shift @@ -73,11 +79,15 @@ if [ -n "$WITH_SESSION_BUS_FORK_DBUS_MONITOR" ] ; then echo -n "Forking dbus-monitor $WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT" >&2 dbus-monitor $WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT \ - &> $me-$$.dbus-monitor-logs & + > $me-$$.dbus-monitor-logs 2>&1 & fi "$@" || e=$? +if test $sleep != 0; then + sleep $sleep +fi + trap - INT HUP TERM cleanup diff -Nru telepathy-idle-0.1.6/tools/Makefile.in telepathy-idle-0.1.7/tools/Makefile.in --- telepathy-idle-0.1.6/tools/Makefile.in 2010-02-19 13:11:15.000000000 +0000 +++ telepathy-idle-0.1.7/tools/Makefile.in 2010-12-07 11:59:21.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -124,6 +124,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@