diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000000000000000000000000000000000000..26e4e78f59305d4894f7058c0be00f8438108a9d
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,63 @@
+Current authors:
+
+Emmanuel Milou <emmanuel dot milou at savoirfairelinux dot com>
+	- ALSA implementation ( replaces portaudio )
+	- Dynamic loading of audio codecs ( shared libraries )
+	- Debian packages
+	- GTK client error handling
+	- Plus many portions of code in sflphoned and sflphone-gtk 
+	- Test and debugging
+
+Alexandre Bourget <alexandre dot bourget at savoirfairelinux dot com>
+	- IAX implementation
+
+Guillaume Carmel-Archambault <guillaume.carmel-archambault at savoirfairelinux dot com>
+	- Presence 
+	- Contacts
+Yun Liu <yun.liu at savoirfairelinux dot com>
+	- Change sip library to pjsip
+        - Support multiple accounts registration
+        - Add chinese translation
+        - Many portions of test and debugging
+ 
+Polytechnic School of Montreal:
+  - Jean-Francois Blanchard-Dionne <jean-francois.blanchard-dionne at polymtl dot ca>
+  - Ala Eddine Limame <ala-eddine.limame at polymtl dot ca>
+  - Alexis S. Bourrelle <bourrelle at polymtl dot ca>
+  - Marilyne Mercier <marilyne.mercier at polymtl dot ca>
+  - Jean Tessier <jean.tessier at polymtl dot ca>
+	- Video layer implementation
+	- Video conference
+
+Pierre-Luc Beaudoin <pierre-luc.beaudoin at savoirfairelinux dot com>
+  - Many portions of code
+  - GTK client implementation
+
+Former authors:
+
+Yan Morin <yan dot morin at savoirfairelinux dot com>
+	- zeroconf integration
+	- sflphoned deamon
+	- add and improve sip core feature
+	- tests and debugging
+
+Jerome Oufella <jerome dot oufella at savoirfairelinux dot com>
+	- Many portions of code and bug fixes
+
+Julien Plissonneau Duquene <... at savoirfairelinux dot com>
+	- autotools cleanups
+
+Jean-Philippe Barrette-LaPierre 
+	- Autotools support and portions of code
+
+Laurielle Lea
+	- Implementation of SFLphone
+
+Sherry Yang <syangs04 at yahoo dot com>
+
+Imran Akbar <imr at stanford dot edu>
+	- Working on Win32 port
+
+Contributors:
+
+Mikael Magnusson
diff --git a/sflphone-client-gnome/VERSION b/sflphone-client-gnome/VERSION
new file mode 100644
index 0000000000000000000000000000000000000000..517317e95fb23bda5f1c305dfaa84bfa8021a824
--- /dev/null
+++ b/sflphone-client-gnome/VERSION
@@ -0,0 +1 @@
+0.9.6~beta
diff --git a/sflphone-client-gnome/configure.ac b/sflphone-client-gnome/configure.ac
index 0fb4d50694f5024225441fa983df0b1133a82d92..59d3abb03369f5d193217fd2ea7fc6d37fa1319e 100644
--- a/sflphone-client-gnome/configure.ac
+++ b/sflphone-client-gnome/configure.ac
@@ -4,8 +4,7 @@ AM_CONFIG_HEADER(config.h)
 LT_INIT
 
 PACKAGE=SFLphone
-#VERSION=0.9.5~beta
-VERSION=`head -n 1 debian/changelog | awk '{print $2}' | sed -e 's/(//g' | sed -e 's/)//g'`
+VERSION=`cat VERSION`
 
 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
 AC_CONFIG_MACRO_DIR([m4])
diff --git a/sflphone-client-gnome/man/Makefile.am b/sflphone-client-gnome/man/Makefile.am
index eed294e21ef34f4537c829358d679429ead4f611..5101b6dc40b4a8e32f0daca6935eedb3dbc4ab3d 100644
--- a/sflphone-client-gnome/man/Makefile.am
+++ b/sflphone-client-gnome/man/Makefile.am
@@ -5,7 +5,7 @@ TEMPLATES=\
 
 man_MANS = \
 			sflphone-client-gnome.1 \
-			sflphone.1 
+            sflphone.1
 
 POD2MAN=pod2man
 
diff --git a/sflphone-client-gnome/sflphone.desktop.in b/sflphone-client-gnome/sflphone.desktop.in
index 2fde3130f21d8ac551f24c7e3f4ab1598fe6bb1c..f621e8a166a35065184b98aa2088285c9afa6205 100644
--- a/sflphone-client-gnome/sflphone.desktop.in
+++ b/sflphone-client-gnome/sflphone.desktop.in
@@ -1,5 +1,4 @@
 [Desktop Entry]
-Encoding=UTF-8
 Name=SFLphone GNOME VoIP client
 GenericName=Telephone
 Comment=Call and receive calls with SIP or IAX protocols
diff --git a/sflphone-client-gnome/src/Makefile.am b/sflphone-client-gnome/src/Makefile.am
index fede093cac4ce350c9cc7a4abdb0a4c2ea45f1aa..a483cc3fc1effe5f3a465b60973f26c2cd0a26b9 100644
--- a/sflphone-client-gnome/src/Makefile.am
+++ b/sflphone-client-gnome/src/Makefile.am
@@ -37,7 +37,7 @@ sflphone_client_gnome_LDADD = $(DEPS_LIBS) $(NOTIFY_LIBS) $(SFLPHONEGTK_LIBS) $(
 # add symbolic link	     
 install-exec-local:
 	echo $(prefix); echo $(bindir); echo $(datadir); echo $(libdir)
-	cd $(bindir); ln -sf sflphone-client-gnome sflphone 
+	cd $(DESTDIR)$(bindir); ln -sf sflphone-client-gnome sflphone 
 
 uninstall-local:
-	-test -h $(bindir)/sflphone && rm $(bindir)/sflphone
+	-test -h $(DESTDIR)$(bindir)/sflphone && rm $(DESTDIR)$(bindir)/sflphone
diff --git a/sflphone-client-gnome/src/accountlist.c b/sflphone-client-gnome/src/accountlist.c
index 8a6cbe26b7f867bc681db5eb24689967afd1c585..cd635575ff56021e1dda0dd4343caa37915b87fd 100644
--- a/sflphone-client-gnome/src/accountlist.c
+++ b/sflphone-client-gnome/src/accountlist.c
@@ -72,6 +72,12 @@ account_list_add (account_t * c)
   g_queue_push_tail (accountQueue, (gpointer *) c);
 }
 
+void
+account_list_add_at_nth (account_t * c, guint pos)
+{
+  g_queue_push_nth (accountQueue, (gpointer *) c, pos);
+}
+
 
 void
 account_list_remove (const gchar * accountID)
diff --git a/sflphone-client-gnome/src/accountlist.h b/sflphone-client-gnome/src/accountlist.h
index f60fd702951b225535097bd1bcf917defd580337..260eec094e48065e2a1168a1a5267432ab2e6586 100644
--- a/sflphone-client-gnome/src/accountlist.h
+++ b/sflphone-client-gnome/src/accountlist.h
@@ -86,6 +86,13 @@ void account_list_clean ();
  */
 void account_list_add (account_t * a);
 
+/** 
+ * This function append an account to list at a given position. 
+ * @param a The account you want to add
+ * @param pos THe position in the list to insert the account
+ */
+void account_list_add_at_nth (account_t * a, guint pos);
+
 /** 
  * This function remove an account from list. 
  * @param accountID The accountID of the account you want to remove
diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c
index 120024a7c3d8eb8fc9e1463c25212bbcc1828a76..664867ff43a878cf1bb65ad3d88c12426b4c7fdf 100644
--- a/sflphone-client-gnome/src/actions.c
+++ b/sflphone-client-gnome/src/actions.c
@@ -884,6 +884,31 @@ sflphone_fill_codec_list()
     }
 }
 
+void sflphone_fill_call_list (void)
+{
+    
+    gchar** calls = (gchar**)dbus_get_call_list();
+    gchar** pl;
+    GHashTable *call_details;
+    call_t *c;
+    gchar *callID;
+
+    for(pl=calls; *calls; calls++)
+    {
+        c = g_new0(call_t, 1);
+        callID = (gchar*)(*calls);
+        call_details = dbus_get_call_details(callID);
+        create_new_call_from_details (callID, call_details, &c);
+        c->callID = g_strdup(callID);
+
+        // Add it to the list
+        DEBUG ("Add call retrieved from server side: %s\n", c->callID);
+        calllist_add (current_calls, c);
+        // Update the GUI
+        calltree_add_call (current_calls, c);
+    }
+}
+
 void format_phone_number (gchar **number) {
 
     gchar *_number;
diff --git a/sflphone-client-gnome/src/actions.h b/sflphone-client-gnome/src/actions.h
index 19a22694d6b11a29bf3700c4e02d41a74187c125..36b40fc791129b83547c67b067a54ec04277173f 100644
--- a/sflphone-client-gnome/src/actions.h
+++ b/sflphone-client-gnome/src/actions.h
@@ -152,6 +152,8 @@ void sflphone_place_call ( call_t * c );
  */
 void sflphone_fill_account_list(gboolean toolbarInitialized);
 
+void sflphone_fill_call_list (void);
+
 /**
  * Set an account as current. The current account is to one used to place calls with by default
  * The current account is the first in the account list ( index 0 )
diff --git a/sflphone-client-gnome/src/assistant.c b/sflphone-client-gnome/src/assistant.c
index 374ea0539f25d960555f18f4ee8c30c826c6d21b..a642da19bc35a1e351f2669cc45b88110309d025 100644
--- a/sflphone-client-gnome/src/assistant.c
+++ b/sflphone-client-gnome/src/assistant.c
@@ -135,8 +135,7 @@ static void iax_apply_callback( void ) {
         	sprintf(message, MESSAGE_SUMMARY,
 			gtk_entry_get_text (GTK_ENTRY(wiz->iax_alias)),
 			gtk_entry_get_text (GTK_ENTRY(wiz->iax_server)),
-			gtk_entry_get_text (GTK_ENTRY(wiz->iax_username)),
-		        gtk_entry_get_text (GTK_ENTRY(wiz->iax_password))
+			gtk_entry_get_text (GTK_ENTRY(wiz->iax_username))
 			) ;
 		gtk_label_set_text (GTK_LABEL(wiz->label_summary), message);
 	}
@@ -231,7 +230,7 @@ GtkWidget* build_sfl_or_account() {
 GtkWidget* build_sip_account_configuration( void ) {
 	GtkWidget* table;
 	GtkWidget* label;
-	GtkWidget* image;
+    GtkWidget *image;
 
 	wiz->sip_account = create_vbox( GTK_ASSISTANT_PAGE_CONTENT , _("SIP account configuration") , _("Please fill the following information:"));
 	// table
@@ -327,7 +326,7 @@ GtkWidget* build_email_configuration( void ) {
 GtkWidget* build_iax_account_configuration( void ) {
 	GtkWidget* label;
 	GtkWidget*  table;
-	GtkWidget*  image;
+    GtkWidget *image;
 
 	wiz->iax_account = create_vbox( GTK_ASSISTANT_PAGE_CONFIRM , _("IAX2 account configuration") , _("Please fill the following information:"));
 
diff --git a/sflphone-client-gnome/src/call.c b/sflphone-client-gnome/src/call.c
index 5ab52ee258452e52d2dd907cb93f90ceee3198d4..db54481f029b9eba288ec7b92949e859ce5b6c17 100644
--- a/sflphone-client-gnome/src/call.c
+++ b/sflphone-client-gnome/src/call.c
@@ -98,15 +98,29 @@ void create_new_call (gchar *to, gchar *from, call_state_t state, gchar *account
 
 void create_new_call_from_details (const gchar *call_id, GHashTable *details, call_t **call)
 {
-    gchar *from, *to, *accountID;
+    gchar *from, *to, *accountID, *state_str;
     call_t *new_call;
+    call_state_t state;
     // GHashTable *call_details;
 
     accountID = g_hash_table_lookup (details, "ACCOUNTID");
     to = g_hash_table_lookup (details, "PEER_NUMBER");
     from = g_markup_printf_escaped("\"\" <%s>",  to);
+    state_str = g_hash_table_lookup (details, "CALL_STATE");
 
-    create_new_call (from, from, CALL_STATE_DIALING, accountID, &new_call);
+    if (g_strcasecmp (state_str, "CURRENT") == 0)
+        state = CALL_STATE_CURRENT;
+
+    else if (g_strcasecmp (state_str, "HOLD") == 0)
+        state = CALL_STATE_HOLD;
+
+    else if (g_strcasecmp (state_str, "BUSY") == 0)
+        state = CALL_STATE_BUSY;
+
+    else
+        state = CALL_STATE_FAILURE;
+
+    create_new_call (from, from, state, accountID, &new_call);
     *call = new_call;
 }
 
diff --git a/sflphone-client-gnome/src/config/accountwindow.c b/sflphone-client-gnome/src/config/accountwindow.c
index 1058d295b609e592fbcac13245afca95399cda38..198d0c9eba3fb9bbd2133ab293aab40264ef0763 100644
--- a/sflphone-client-gnome/src/config/accountwindow.c
+++ b/sflphone-client-gnome/src/config/accountwindow.c
@@ -21,6 +21,7 @@
 #include <actions.h>
 #include <mainwindow.h>
 #include <accountlist.h>
+#include <accountwindow.h>
 
 // From version 2.16, gtk provides the functionalities libsexy used to provide
 #if GTK_CHECK_VERSION(2,16,0)
@@ -71,7 +72,6 @@ is_iax_enabled(void)
 show_account_window (account_t * a)
 {
     gint response;
-    GtkWidget *image;
 
     currentAccount = a;
 
@@ -86,6 +86,11 @@ show_account_window (account_t * a)
     /* TODO: add curProxy, and add boxes for Proxy support */
     gchar * curMailbox = "";
 
+#if GTK_CHECK_VERSION(2,16,0)
+#else
+    GtkWidget *image;
+#endif
+
     // Load from SIP/IAX/Unknown ?
     if(a)
     {
diff --git a/sflphone-client-gnome/src/config/accountwindow.h b/sflphone-client-gnome/src/config/accountwindow.h
index 2b393a332d9d1102f3c6b66b2483d95c8d9f7642..c7e5e53e0b2e412855eff5247a5c4988001b6f67 100644
--- a/sflphone-client-gnome/src/config/accountwindow.h
+++ b/sflphone-client-gnome/src/config/accountwindow.h
@@ -24,6 +24,8 @@
   * @brief The window to edit account details.
   */
 
+#include "utils.h"
+#include "configwindow.h"
 
 /** 
  * Display the main account widget 
diff --git a/sflphone-client-gnome/src/config/audioconf.c b/sflphone-client-gnome/src/config/audioconf.c
index 7d4e0ee0ac17c483cbc30b82fe3dfe4e1455c93d..eba7d7e43839e147ba2a0cc89168f9ee554f8aa4 100644
--- a/sflphone-client-gnome/src/config/audioconf.c
+++ b/sflphone-client-gnome/src/config/audioconf.c
@@ -393,9 +393,9 @@ codec_active_toggled(GtkCellRendererToggle *renderer UNUSED, gchar *path, gpoint
     // printf("%s, %s\n", name, srate);
 
     // codec_list_get_by_name(name);
-    if ((strcmp(name,"speex")==0) && (strcmp(srate,"8 kHz")==0))
+    if ((g_strcasecmp(name,"speex")==0) && (g_strcasecmp(srate,"8 kHz")==0))
         codec = codec_list_get_by_payload(110);
-    else if ((strcmp(name,"speex")==0) && (strcmp(srate,"16 kHz")==0))
+    else if ((g_strcasecmp(name,"speex")==0) && (g_strcasecmp(srate,"16 kHz")==0))
         codec = codec_list_get_by_payload(111);
     else
         codec = codec_list_get_by_name(name);
diff --git a/sflphone-client-gnome/src/config/configwindow.c b/sflphone-client-gnome/src/config/configwindow.c
index e120047410dc5172d7af4cd2606db6737aaf10b7..68341875aa8663a7fed860b28cc72e61892a3e9c 100644
--- a/sflphone-client-gnome/src/config/configwindow.c
+++ b/sflphone-client-gnome/src/config/configwindow.c
@@ -85,6 +85,7 @@ GtkWidget * widg;
     void
 config_window_fill_account_list()
 {
+    
     if(accDialogOpen)
     {
         GtkTreeIter iter;
@@ -94,9 +95,10 @@ config_window_fill_account_list()
         for(i = 0; i < account_list_get_size(); i++)
         {
             account_t * a = account_list_get_nth (i);
+	    
             if (a)
             {
-                DEBUG("fill account list : %s" , (gchar*)g_hash_table_lookup(a->properties, ACCOUNT_ENABLED));
+
                 gtk_list_store_append (accountStore, &iter);
                 gtk_list_store_set(accountStore, &iter,
                         COLUMN_ACCOUNT_ALIAS, g_hash_table_lookup(a->properties, ACCOUNT_ALIAS),  // Name
@@ -257,6 +259,7 @@ enable_account(GtkCellRendererToggle *rend UNUSED, gchar* path,  gpointer data )
 
     // Modify account state
     g_hash_table_replace( acc->properties , g_strdup(ACCOUNT_ENABLED) , g_strdup((enable == 1)? "TRUE":"FALSE"));
+
     dbus_send_register( acc->accountID , enable );
 }
 
@@ -755,7 +758,12 @@ create_recording_settings ()
     return ret;
 }
 
+void save_configuration_parameters (void) {
 
+    addressbook_config_save_parameters ();
+    hooks_save_parameters ();
+
+}
 
 /**
  * Show configuration window with tabs
@@ -887,9 +895,4 @@ void config_window_set_stun_visible()
     gtk_widget_set_sensitive( GTK_WIDGET(stunFrame), TRUE );
 }
 
-void save_configuration_parameters (void) {
-
-    addressbook_config_save_parameters ();
-    hooks_save_parameters ();
 
-}
diff --git a/sflphone-client-gnome/src/config/hooks-config.h b/sflphone-client-gnome/src/config/hooks-config.h
index d4651fbe3729deb99910b26ef0cd2bf2ab4bcb8c..3d8c303b0a8e02a9a24c26372ded4983075ce3d0 100644
--- a/sflphone-client-gnome/src/config/hooks-config.h
+++ b/sflphone-client-gnome/src/config/hooks-config.h
@@ -24,6 +24,7 @@
 #include <glib/gtypes.h>
 
 #include "actions.h"
+#include "utils.h"
 
 G_BEGIN_DECLS
 
diff --git a/sflphone-client-gnome/src/contacts/calllist.h b/sflphone-client-gnome/src/contacts/calllist.h
index d1e308eca3acc965a1f8f14d88db0c91deccc0e2..afdf5e4b04d49a511b78b3acedf8859be83430b7 100644
--- a/sflphone-client-gnome/src/contacts/calllist.h
+++ b/sflphone-client-gnome/src/contacts/calllist.h
@@ -110,4 +110,10 @@ calllist_clean_history();
 void
 calllist_remove_from_history( call_t* c);
 
+/**
+ * Initialize a non-empty call list
+ */
+void
+calllist_set_list (calltab_t* tab, gchar **call_list);
+
 #endif
diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c
index 6c6e771dc308c92c1584a30e9b7c033c0b2b6220..d9e06066de3f4bda4437ed69888355c3d3617844 100644
--- a/sflphone-client-gnome/src/contacts/calltree.c
+++ b/sflphone-client-gnome/src/contacts/calltree.c
@@ -149,32 +149,6 @@ button_pressed(GtkWidget* widget, GdkEventButton *event, gpointer user_data UNUS
     return FALSE;
 }
 
-
-    static gboolean
-on_key_released (GtkWidget   *widget UNUSED,
-        GdkEventKey *event,
-        gpointer     user_data UNUSED)
-{
-        DEBUG("key-release-event signal cought by on_key_released callback \n");
-        // If a modifier key is pressed, it's a shortcut, pass along
-        if(event->state & GDK_CONTROL_MASK ||
-                event->state & GDK_MOD1_MASK    ||
-                event->keyval == 60             || // <
-                event->keyval == 62             || // >
-                event->keyval == 34             || // "
-                event->keyval == 65361          || // left arrow
-                event->keyval == 65363          || // right arrow
-                event->keyval >= 65470          || // F-keys
-                event->keyval == 32                // space
-                )
-            return FALSE;
-        else
-            sflphone_keypad(event->keyval, event->string);
-   
-   
-   return TRUE;
-}
-
 /**
  * Reset call tree
  */
@@ -451,10 +425,6 @@ calltree_add_call (calltab_t* tab, call_t * c)
 
     GdkPixbuf *pixbuf=NULL;
     GtkTreeIter iter;
-    GtkTreeSelection* sel;
-    GtkTreeModel *model;
-    GtkTreePath *path;
-    
 
     // New call in the list
     gchar * description;
@@ -479,6 +449,18 @@ calltree_add_call (calltab_t* tab, call_t * c)
             case CALL_STATE_RINGING:
                 pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/ring.svg", NULL);
                 break;
+            case CALL_STATE_CURRENT:
+                // If the call has been initiated by a another client and, when we start, it is already current
+                pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/current.svg", NULL);
+                break;
+            case CALL_STATE_HOLD:
+                // If the call has been initiated by a another client and, when we start, it is already current
+                pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/hold.svg", NULL);
+                break;
+            case CALL_STATE_FAILURE:
+                // If the call has been initiated by a another client and, when we start, it is already current
+                pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/fail.svg", NULL);
+                break;
             default:
                 WARN("Update calltree add - Should not happen!");
         }
diff --git a/sflphone-client-gnome/src/contacts/history.c b/sflphone-client-gnome/src/contacts/history.c
index 7999bf3b25f7c9659a076e27a94915294dd293eb..0c99c597d9ce360380a9416dfeff88ddbcceb64d 100644
--- a/sflphone-client-gnome/src/contacts/history.c
+++ b/sflphone-client-gnome/src/contacts/history.c
@@ -57,7 +57,6 @@ static GtkTreeModel*
 history_create_filter (GtkTreeModel* child) {
 
   GtkTreeModel* ret;
-  GtkTreePath  *path; 
 
   DEBUG("Create Filter\n");
   ret = gtk_tree_model_filter_new(child, NULL);
@@ -79,8 +78,7 @@ history_is_visible (GtkTreeModel* model, GtkTreeIter* iter, gpointer data UNUSED
         if(G_VALUE_HOLDS_STRING(&val)){
             text = (gchar *)g_value_get_string(&val);
         }
-        if(text != NULL && 
-                ( g_ascii_strncasecmp(search, _("Search history"), 14) != 0 && g_ascii_strncasecmp(search, _("Search contact"), 14) != 0)){
+        if(text != NULL ){
             return g_regex_match_simple(search, text, G_REGEX_CASELESS, 0);
         }
         g_value_unset (&val);
diff --git a/sflphone-client-gnome/src/contacts/searchbar.c b/sflphone-client-gnome/src/contacts/searchbar.c
index cad09e0670dff097bac9d077cce265f251418f91..4313e4e83257d8a6495baaa92b1bcef75e610c3c 100644
--- a/sflphone-client-gnome/src/contacts/searchbar.c
+++ b/sflphone-client-gnome/src/contacts/searchbar.c
@@ -87,8 +87,6 @@ searchbar_init(calltab_t *tab)
 
 GtkWidget* searchbar_new(gchar* searchbar_type) {
 
-  // GtkWidget * searchbox;
-  GtkWidget* image;
   GtkWidget* ret = gtk_hbox_new(FALSE, 0);
 
 #if GTK_CHECK_VERSION(2,16,0)
@@ -96,18 +94,19 @@ GtkWidget* searchbar_new(gchar* searchbar_type) {
   gtk_entry_set_icon_from_stock (GTK_ENTRY (searchbox), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_FIND);
   gtk_entry_set_icon_from_stock (GTK_ENTRY (searchbox), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CLEAR);
 #else
+    
+  GtkWidget *image;
+
   searchbox = sexy_icon_entry_new();
   image = gtk_image_new_from_stock( GTK_STOCK_FIND , GTK_ICON_SIZE_SMALL_TOOLBAR);
   sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(searchbox), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) );
   sexy_icon_entry_add_clear_button( SEXY_ICON_ENTRY(searchbox) );
 #endif
 
-  // GTK_WIDGET_SET_FLAGS (GTK_WIDGET(searchbox),GTK_CAN_FOCUS);
-  // gtk_widget_set_name (searchbox, "searchbar");
+
 
   gtk_widget_modify_text(searchbox, GTK_STATE_NORMAL, &GRAY_COLOR); 
 
-  gtk_entry_set_text(GTK_ENTRY(searchbox), _("Search contact"));
   g_signal_connect_after(GTK_ENTRY(searchbox), "changed", G_CALLBACK(searchbar_entry_changed), NULL);
   g_signal_connect_after(GTK_ENTRY(searchbox), "grab-focus", G_CALLBACK(searchbar_clear_entry_if_default), NULL);
 
@@ -118,13 +117,9 @@ GtkWidget* searchbar_new(gchar* searchbar_type) {
 
   gtk_box_pack_start(GTK_BOX(ret), searchbox, TRUE, TRUE, 0);
 
-    if(g_strcmp0(searchbar_type,"history") == 0)
-    {
-        gtk_entry_set_text(GTK_ENTRY(searchbox), _("Search history"));
-        history_set_searchbar_widget(searchbox);
-    }
+  history_set_searchbar_widget(searchbox);
   
-    return ret;
+  return ret;
 }
 
 void activateWaitingLayer() {
diff --git a/sflphone-client-gnome/src/dbus/Makefile.am b/sflphone-client-gnome/src/dbus/Makefile.am
index 076872ee2e84360101f193583acc615c02635f26..8f7775ba2885969f58c555f3d14b9bbd7ce5eb91 100644
--- a/sflphone-client-gnome/src/dbus/Makefile.am
+++ b/sflphone-client-gnome/src/dbus/Makefile.am
@@ -10,7 +10,7 @@ BUILT_SOURCES=                      \
     marshaller.h
 
 # Rule to generate the binding headers
-%-glue.h: ../../../sflphone-common/src/dbus/%-introspec.xml Makefile.am
+%-glue.h: %-introspec.xml Makefile.am
 	dbus-binding-tool --mode=glib-client $<  > $@
 
 # Create the necessary marshallers for the signals implemented by the library
diff --git a/sflphone-client-gnome/src/dbus/callmanager-introspec.xml b/sflphone-client-gnome/src/dbus/callmanager-introspec.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d72dddd28f2b4baa67add8cb04084512d0aeb78c
--- /dev/null
+++ b/sflphone-client-gnome/src/dbus/callmanager-introspec.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" ?>
+<node name="/org/sflphone/SFLphone">
+  <interface name="org.sflphone.SFLphone.CallManager">
+  
+    <method name="placeCall">
+      <arg type="s" name="accountID" direction="in"/>
+      <arg type="s" name="callID" direction="in"/>
+      <arg type="s" name="to" direction="in"/>
+    </method>
+    
+    <method name="refuse">
+      <arg type="s" name="callID" direction="in"/>
+    </method>
+    
+    <method name="accept">
+      <arg type="s" name="callID" direction="in"/>
+    </method>
+    
+    <method name="hangUp">
+      <arg type="s" name="callID" direction="in"/>
+    </method>
+    
+    <method name="hold">
+      <arg type="s" name="callID" direction="in"/>
+    </method>
+    
+    <method name="unhold">
+      <arg type="s" name="callID" direction="in"/>
+    </method>
+    
+    <method name="transfert">
+      <arg type="s" name="callID" direction="in"/>
+      <arg type="s" name="to" direction="in"/>
+    </method>
+    
+    <method name="playDTMF">
+      <arg type="s" name="key" direction="in"/>
+    </method>
+    
+    <method name="startTone">
+      <arg type="i" name="start" direction="in"/>
+      <arg type="i" name="type" direction="in"/>
+    </method>
+
+    <method name="setVolume">
+      <arg type="s" name="device" direction="in"/>
+      <arg type="d" name="value" direction="in"/>
+    </method>
+    
+    <method name="getVolume">
+      <arg type="s" name="device" direction="in"/>
+      <arg type="d" name="value" direction="out"/>
+    </method>
+
+    <method name="setRecording">
+      <arg type="s" name="callID" direction="in"/>
+    </method>
+
+     <method name="getIsRecording">
+      <arg type="s" name="callID" direction="in"/>
+      <arg type="b" name="isRecording" direction="out"/>
+    </method>
+    
+    <method name="getCallDetails">
+      <arg type="s" name="callID" direction="in"/>
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
+      <arg type="a{ss}" name="infos" direction="out"/>
+    </method>
+    
+    <method name="getCallList">
+        <arg type="as" name="list" direction="out"/>
+    </method>
+
+    <method name="getCurrentCallID">
+      <arg type="s" name="callID" direction="out"/>
+    </method>
+
+    <method name="getCurrentCodecName">
+      <arg type="s" name="callID" direction="in"/>
+      <arg type="s" name="codecName" direction="out"/>
+    </method>
+
+    <signal name="currentSelectedCodec">
+      <arg type="s" name="callID"  direction="out" />
+      <arg type="s" name="codecName"  direction="out"/>
+    </signal>
+    
+    <signal name="incomingCall">
+      <arg type="s" name="accountID" />
+      <arg type="s" name="callID" />
+      <arg type="s" name="from" />
+    </signal>
+    
+    <signal name="incomingMessage">
+      <arg type="s" name="accountID"  direction="out" />
+      <arg type="s" name="message"  direction="out"/>
+    </signal>
+    
+    <signal name="callStateChanged">
+      <arg type="s" name="callID"  direction="out"/>
+      <arg type="s" name="state"  direction="out"/>
+    </signal>
+    
+    <signal name="voiceMailNotify">
+      <arg type="s" name="accountID"  direction="out"/>
+      <arg type="i" name="count"  direction="out"/>
+    </signal>
+    
+    
+    <signal name="volumeChanged">
+      <arg type="s" name="device"  direction="out"/>
+      <arg type="d" name="value"  direction="out"/>
+    </signal>
+ 
+<!--
+    <signal name="error">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/>
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
+      <arg type="a{ss}" name="details"  direction="out"/>
+    </signal>
+-->
+
+  </interface>
+</node>
diff --git a/sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml b/sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml
new file mode 100644
index 0000000000000000000000000000000000000000..9a4375bb0cfce1a67ff8790ae119202015d0ce16
--- /dev/null
+++ b/sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml
@@ -0,0 +1,323 @@
+<?xml version="1.0" ?>
+<node name="/org/sflphone/SFLphone">
+  <interface name="org.sflphone.SFLphone.ConfigurationManager">
+    
+  <!-- Accounts-related methods -->  
+    <method name="getAccountDetails">
+      <arg type="s" name="accountID" direction="in"/>
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
+      <arg type="a{ss}" name="details" direction="out"/>
+    </method>
+    
+    <method name="setAccountDetails">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="MapStringString"/>
+      <arg type="s" name="accountID" direction="in"/>
+      <arg type="a{ss}" name="details" direction="in"/>
+    </method>
+    
+    <method name="addAccount">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/>
+      <arg type="a{ss}" name="details" direction="in"/>
+      <arg type="s" name="createdAccountId" direction="out"/>
+    </method>
+    
+    <method name="setAccountsOrder">
+      <arg type="s" name="order" direction="in"/>
+    </method>
+    
+    <method name="removeAccount">
+      <arg type="s" name="accoundID" direction="in"/>
+    </method>
+    
+    <method name="getAccountList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+   
+    <method name="sendRegister">
+      <arg type="s" name="accountID" direction="in"/>
+      <arg type="i" name="expire" direction="in"/>
+    </method>
+
+   <!--      ///////////////////////               -->
+
+  <!-- Various audio-related methods   -->
+ 
+    <method name="getToneLocaleList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+  
+    <method name="getVersion">
+      <arg type="s" name="version" direction="out"/>
+    </method>
+    
+    <method name="getRingtoneList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+   
+    <method name="getPlaybackDeviceList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+    
+    <method name="getRecordDeviceList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+    
+    <method name="isRingtoneEnabled">
+      <arg type="i" name="bool" direction="out"/>
+    </method>
+
+    <method name="ringtoneEnabled">
+    </method>
+
+    <method name="getRingtoneChoice">
+      <arg type="s" name="tone" direction="out"/>
+    </method>
+
+    <method name="setRingtoneChoice">
+      <arg type="s" name="tone" direction="in"/>
+    </method>
+
+    <method name="getAudioManager">
+      <arg type="i" name="api" direction="out"/>
+    </method>
+
+    <method name="setAudioManager">
+      <arg type="i" name="api" direction="in"/>
+    </method>
+    
+    <method name="getRecordPath">
+      <arg type="s" name="rec" direction="out"/>
+    </method>
+
+    <method name="setRecordPath">
+      <arg type="s" name="rec" direction="in"/>
+    </method>
+
+   <!--      ///////////////////////               -->
+   
+   <!-- Codecs-related methods -->
+ 
+    <method name="getCodecList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+   
+   <method name="getCodecDetails">
+     <arg type="i" name="payload" direction="in"/>
+     <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+     <arg type="as" name="details" direction="out"/>
+   </method>
+ 
+    <method name="getActiveCodecList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+
+    <method name="setActiveCodecList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="VectorString"/>
+      <arg type="as" name="list" direction="in"/>
+    </method>
+
+
+	<!-- Audio devices methods -->
+	
+    <method name="getInputAudioPluginList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+		
+    <method name="getOutputAudioPluginList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+    
+    <method name="setInputAudioPlugin">
+      <arg type="s" name="audioPlugin" direction="in"/>
+    </method>
+    
+    <method name="setOutputAudioPlugin">
+      <arg type="s" name="audioPlugin" direction="in"/>
+    </method>
+    
+    <method name="getAudioOutputDeviceList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+    
+    <method name="setAudioOutputDevice">
+      <arg type="i" name="index" direction="in"/>
+    </method>
+    
+    <method name="getAudioInputDeviceList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+    
+    <method name="setAudioInputDevice">
+      <arg type="i" name="index" direction="in"/>
+    </method>
+    
+    <method name="getCurrentAudioDevicesIndex">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="list" direction="out"/>
+    </method>
+
+    <method name="getAudioDeviceIndex">
+      <arg type="s" name="name" direction="in"/>
+      <arg type="i" name="index" direction="out"/>
+    </method>
+
+    <method name="getCurrentAudioOutputPlugin">
+      <arg type="s" name="plugin" direction="out"/>
+    </method>
+
+  <!--    General Settings Panel         -->
+ 
+    <method name="isIax2Enabled">
+      <arg type="i" name="res" direction="out"/>
+    </method>
+
+    <method name="setNotify">
+    </method>
+
+    <method name="getNotify">
+      <arg type="i" name="level" direction="out"/>
+    </method>
+
+    <method name="setMailNotify">
+    </method>
+
+    <method name="getMailNotify">
+      <arg type="i" name="level" direction="out"/>
+    </method>
+
+    <method name="getDialpad">
+      <arg type="i" name="state" direction="out"/>
+    </method>
+
+    <method name="setDialpad">
+    </method>
+
+    <method name="getSearchbar">
+      <arg type="i" name="state" direction="out"/>
+    </method>
+
+    <method name="setSearchbar">
+    </method>
+
+    <method name="getVolumeControls">
+      <arg type="i" name="state" direction="out"/>
+    </method>
+
+    <method name="setVolumeControls">
+    </method>
+
+    <method name="getMaxCalls">
+      <arg type="i" name="calls" direction="out"/>
+    </method>
+
+    <method name="setMaxCalls">
+      <arg type="i" name="calls" direction="in"/>
+    </method>
+
+    <method name="startHidden">
+    </method>
+
+    <method name="isStartHidden">
+      <arg type="i" name="state" direction="out"/>
+    </method>
+
+    <method name="popupMode">
+      <arg type="i" name="state" direction="out"/>
+    </method>
+
+    <method name="switchPopupMode">
+    </method>
+
+    <method name="setPulseAppVolumeControl">
+    </method>
+
+    <method name="getPulseAppVolumeControl">
+      <arg type="i" name="state" direction="out"/>
+    </method>
+
+    <method name="setSipPort">
+      <arg type="i" name="port" direction="in"/>
+    </method>
+
+    <method name="getSipPort">
+      <arg type="i" name="port" direction="out"/>
+    </method>
+
+    <method name="setStunServer">
+      <arg type="s" name="server" direction="in"/>
+    </method>
+
+    <method name="getStunServer">
+      <arg type="s" name="server" direction="out"/>
+    </method>
+
+    <method name="enableStun">
+    </method>
+
+    <method name="isStunEnabled">
+      <arg type="i" name="state" direction="out"/>
+    </method>
+
+    <!-- Addressbook configuration -->
+    <method name="getAddressbookSettings">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringInt"/>
+      <arg type="a{si}" name="settings" direction="out"/>
+    </method>
+
+    <method name="setAddressbookSettings">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringInt"/>
+      <arg type="a{si}" name="settings" direction="in"/>
+    </method>
+
+	<!-- Addressbook list -->
+    <method name="getAddressbookList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+      <arg type="as" name="settings" direction="out"/>
+    </method>
+
+    <method name="setAddressbookList">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="VectorString"/>
+      <arg type="as" name="settings" direction="in"/>
+    </method>
+
+    <!-- Hook configuration -->
+    <method name="getHookSettings">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
+      <arg type="a{ss}" name="settings" direction="out"/>
+    </method>
+
+    <method name="setHookSettings">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/>
+      <arg type="a{ss}" name="settings" direction="in"/>
+    </method>
+
+  <!--        /////////////////////////////       -->
+
+<!--
+    <signal name="parametersChanged">
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/>
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
+      <arg type="a{ss}" name="details" direction="out"/>
+    </signal>
+-->    
+
+    <signal name="accountsChanged">
+    </signal>
+
+    <signal name="errorAlert">
+      <arg type="i" name="code" direction="out"/>
+    </signal>
+
+  </interface>
+</node>
diff --git a/sflphone-client-gnome/src/dbus/contactmanager-introspec.xml b/sflphone-client-gnome/src/dbus/contactmanager-introspec.xml
new file mode 100644
index 0000000000000000000000000000000000000000..89d39efb192ecd3fe0604f080a95ff58129368d1
--- /dev/null
+++ b/sflphone-client-gnome/src/dbus/contactmanager-introspec.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" ?>
+<node name="/org/sflphone/SFLphone">
+  <interface name="org.sflphone.SFLphone.ContactManager">
+    
+  <!-- Contacts related methods -->
+  
+    <!-- Called by the client to get all saved contacts -->
+    <method name="getContacts">
+      <arg type="s" name="accountID" direction="in"/>
+      <arg type="a{ss}" name="details" direction="out"/>
+    </method>
+    
+    <!-- Called by the client to save all local contacts -->
+    <method name="setContacts">
+      <arg type="s" name="accountID" direction="in"/>
+      <arg type="a{ss}" name="details" direction="in"/>
+    </method>
+   
+  <!--      ///////////////////////               -->
+
+  <!-- Presence related methods -->
+ 
+    <!-- Called by the client to set its new presence status -->
+    <method name="setPresence">
+      <arg type="s" name="accountID" direction="in"/>
+      <arg type="s" name="presence" direction="in"/>
+      <arg type="s" name="additionalInfo" direction="in"/>
+    </method>
+  
+    <!-- Called by the daemon when a contact presence changes -->
+    <method name="setContactPresence">
+      <arg type="s" name="accountID" direction="in"/>
+      <arg type="s" name="presence" direction="in"/>
+      <arg type="s" name="additionalInfo" direction="in"/>
+    </method>
+
+  </interface>
+</node>
diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c
index 4caf79f99b23774a2be56cc7602b3757b3f378e4..d3b6dd97f50545a188df1e59c436ad658b216edd 100644
--- a/sflphone-client-gnome/src/dbus/dbus.c
+++ b/sflphone-client-gnome/src/dbus/dbus.c
@@ -175,13 +175,18 @@ call_state_cb (DBusGProxy *proxy UNUSED,
   }
 }
 
+
 static void
 accounts_changed_cb (DBusGProxy *proxy UNUSED,
-                  void * foo  UNUSED )
+                     void * foo  UNUSED )
 {
   DEBUG ("Accounts changed");
   sflphone_fill_account_list(TRUE);
   config_window_fill_account_list();
+
+  // Update the status bar in case something happened
+  // Should fix ticket #1215
+  status_bar_display_account();
 }
 
 static void
@@ -321,7 +326,7 @@ dbus_connect ()
   }
   DEBUG ("DBus connected to ConfigurationManager");
   dbus_g_proxy_add_signal (configurationManagerProxy,
-    "accountsChanged", G_TYPE_INVALID);
+			   "accountsChanged", G_TYPE_INVALID);
   dbus_g_proxy_connect_signal (configurationManagerProxy,
     "accountsChanged", G_CALLBACK(accounts_changed_cb), NULL, NULL);
 
@@ -535,10 +540,10 @@ dbus_set_account_details(account_t *a)
   }
 }
 
-guint
+gchar*
 dbus_add_account(account_t *a)
 {
-  gint accountId;
+  gchar* accountId;
   GError *error = NULL;
   org_sflphone_SFLphone_ConfigurationManager_add_account (
     configurationManagerProxy,
@@ -551,7 +556,7 @@ dbus_add_account(account_t *a)
                 error->message);
     g_error_free (error);
   }
-  return (guint) accountId;
+  return accountId;
 }
 
 void
@@ -1619,6 +1624,20 @@ GHashTable* dbus_get_call_details (const gchar *callID)
     return details;
 }
 
+gchar** dbus_get_call_list (void)
+{
+    GError *error = NULL;
+    gchar **list = NULL;
+
+    org_sflphone_SFLphone_CallManager_get_call_list (callManagerProxy, &list, &error);
+    if (error){
+        ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_call_list");
+        g_error_free (error);
+    }
+
+    return list;
+}
+
 void dbus_set_accounts_order (const gchar* order) {
 
     GError *error = NULL;
diff --git a/sflphone-client-gnome/src/dbus/dbus.h b/sflphone-client-gnome/src/dbus/dbus.h
index c16ec70726472085c35d48b8488a3677c496f5fb..1a489703cdb7674e4820f739611c5ba1141dc867 100644
--- a/sflphone-client-gnome/src/dbus/dbus.h
+++ b/sflphone-client-gnome/src/dbus/dbus.h
@@ -120,7 +120,7 @@ void dbus_send_register( gchar* accountID , const guint expire );
  * ConfigurationManager - Add an account to the list
  * @param a The account to add
  */
-guint dbus_add_account(account_t *a);
+gchar* dbus_add_account(account_t *a);
 
 /**
  * ConfigurationManager - Remove an account from the list
@@ -481,6 +481,8 @@ gboolean dbus_get_is_recording(const call_t *);
 
 GHashTable* dbus_get_call_details (const gchar* callID);
 
+gchar** dbus_get_call_list (void);
+
 void dbus_set_accounts_order (const gchar* order);
 
 #endif
diff --git a/sflphone-client-gnome/src/dbus/instance-introspec.xml b/sflphone-client-gnome/src/dbus/instance-introspec.xml
new file mode 100644
index 0000000000000000000000000000000000000000..90a60d632d04ca83039efcadcfa2f4981bfda39e
--- /dev/null
+++ b/sflphone-client-gnome/src/dbus/instance-introspec.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<node name="/org/sflphone/SFLphone">
+  <interface name="org.sflphone.SFLphone.Instance">
+  
+    <method name="Register">
+      <arg type="i" name="pid" direction="in"/>
+      <arg type="s" name="name" direction="in"/>
+    </method>
+    
+    <method name="Unregister">
+      <arg type="i" name="pid" direction="in"/>
+    </method>
+    
+    <method name="getRegistrationCount">
+      <arg type="i" name="count" direction="out"/>
+    </method>
+  </interface>
+</node>
diff --git a/sflphone-client-gnome/src/dbus/marshaller.list b/sflphone-client-gnome/src/dbus/marshaller.list
index 1e1491713ab928c90d18a8c179e6be6b5fa1d9a3..587c7ce061fe83c9558e7641c5aa54d7a0ea5a89 100644
--- a/sflphone-client-gnome/src/dbus/marshaller.list
+++ b/sflphone-client-gnome/src/dbus/marshaller.list
@@ -3,3 +3,4 @@ VOID:STRING,STRING
 VOID:INT
 VOID:STRING,INT
 VOID:STRING,DOUBLE
+VOID:STRING
diff --git a/sflphone-client-gnome/src/main.c b/sflphone-client-gnome/src/main.c
index bedccadc0e93908ddb1f63f917e9e9391c806ae1..23eccbd1b64ffa6c55eda21a5cc50948aa48f887 100644
--- a/sflphone-client-gnome/src/main.c
+++ b/sflphone-client-gnome/src/main.c
@@ -100,10 +100,13 @@ There is NO WARRANTY, to the extent permitted by law.\n\n");
         }
 #endif
 
-      status_bar_display_account();
+    status_bar_display_account();
 
-      /* start the main loop */
-      gtk_main();
+    // Get the active calls at startup    
+    sflphone_fill_call_list ();
+
+    /* start the main loop */
+    gtk_main();
     }
 
   // Cleanly stop logging
diff --git a/sflphone-client-gnome/src/toolbar.h b/sflphone-client-gnome/src/toolbar.h
index bddeb2cb7dee1a0b44ed6b3d0c1c08f7f875203d..7c967cfc34234872ef52f9cfe646d37e1c1cf969 100644
--- a/sflphone-client-gnome/src/toolbar.h
+++ b/sflphone-client-gnome/src/toolbar.h
@@ -24,6 +24,7 @@
 #include <gtk/gtk.h>
 #include <menus.h>
 #include <sflphone_const.h>
+#include <actions.h>
 
 GtkWidget   * toolbar;
 GtkToolItem * pickupButton;
diff --git a/sflphone-client-kde/VERSION b/sflphone-client-kde/VERSION
new file mode 100644
index 0000000000000000000000000000000000000000..517317e95fb23bda5f1c305dfaa84bfa8021a824
--- /dev/null
+++ b/sflphone-client-kde/VERSION
@@ -0,0 +1 @@
+0.9.6~beta
diff --git a/sflphone-common/VERSION b/sflphone-common/VERSION
new file mode 100644
index 0000000000000000000000000000000000000000..517317e95fb23bda5f1c305dfaa84bfa8021a824
--- /dev/null
+++ b/sflphone-common/VERSION
@@ -0,0 +1 @@
+0.9.6~beta
diff --git a/sflphone-common/configure.ac b/sflphone-common/configure.ac
index 69f2bcf1ff60155866443a426b88423595a9df18..781e1fa5405a12e64751b4f3db8a674826ea5d80 100644
--- a/sflphone-common/configure.ac
+++ b/sflphone-common/configure.ac
@@ -67,9 +67,6 @@ AC_CONFIG_FILES([man/Makefile])
 AC_CONFIG_FILES([doc/Makefile \
   doc/doxygen/Makefile])
   
-AC_CONFIG_FILES([platform/suse.spec \
-  platform/fedora.spec]) 
-  
 dnl the file stamp-h.in should be there before (instead of AC_CONFIG_HEADERS(config.h))
 dnl AM_CONFIG_HEADER(config.h)
 
@@ -196,7 +193,7 @@ dnl DBus-C++ detection (used to be in library own build system)
 DBUS_REQUIRED_VERSION=0.60
 PKG_CHECK_MODULES(dbus, [dbus-1 >= $DBUS_REQUIRED_VERSION],,
 	AC_MSG_ERROR([You need the DBus libraries (version 0.6 or better)]
-	[http://www.freedesktop.org/wiki/Software_2fdbus])
+	[http://gitorious.org/dbus-cplusplus])
 )
 AC_SUBST(dbus_CFLAGS)
 AC_SUBST(dbus_LIBS)
diff --git a/sflphone-common/globals.mak b/sflphone-common/globals.mak
index 22944b21e0a8f9b42744ff62c8954e6c26c78287..37607028c3de133e8583ce0be41701d44309058f 100644
--- a/sflphone-common/globals.mak
+++ b/sflphone-common/globals.mak
@@ -1,18 +1,24 @@
 # Global variables
 src=$(top_srcdir)
-sflcodecdir=$(libdir)/sflphone/codecs
-sflplugindir=$(libdir)/sflphone/plugins
+sflcodecdir=$(DESTDIR)$(libdir)/sflphone/codecs
+sflplugindir=$(DESTDIR)$(libdir)/sflphone/plugins
 
 # for pjsip
-export TARGET_NAME := @target@
-
 PJSIP_LIBS= \
-			-L$(src)/libs/pjproject-1.0.1/pjnath/ \
-			-L$(src)/libs/pjproject-1.0.1/pjsip/ \
-			-L$(src)/libs/pjproject-1.0.1/pjlib/ \
-			-L$(src)/libs/pjproject-1.0.1/pjlib-util/ \
-			-L$(src)/libs/pjproject-1.0.1/pjmedia/ \
-			-lpjnath-sfl-$(TARGET_NAME) -lpjsua-sfl-$(TARGET_NAME) -lpjsip-sfl-$(TARGET_NAME) -lpjmedia-sfl-$(TARGET_NAME) -lpjsip-simple-sfl-$(TARGET_NAME) -lpjsip-ua-sfl-$(TARGET_NAME) -lpjmedia-codec-sfl-$(TARGET_NAME) -lpjlib-util-sfl-$(TARGET_NAME) -lpj-sfl-$(TARGET_NAME)
+			-L$(src)/libs/pjproject-1.0.1/pjnath/lib/ \
+			-L$(src)/libs/pjproject-1.0.1/pjsip/lib/ \
+			-L$(src)/libs/pjproject-1.0.1/pjlib/lib/ \
+			-L$(src)/libs/pjproject-1.0.1/pjlib-util/lib/ \
+			-L$(src)/libs/pjproject-1.0.1/pjmedia/lib/ \
+			-lpjnath-sfl-$(target) \
+			-lpjsua-sfl-$(target) \
+			-lpjsip-sfl-$(target) \
+			-lpjmedia-sfl-$(target) \
+			-lpjsip-simple-sfl-$(target) \
+			-lpjsip-ua-sfl-$(target) \
+			-lpjmedia-codec-sfl-$(target) \
+			-lpjlib-util-sfl-$(target) \
+			-lpj-sfl-$(target)
 
 SIP_CFLAGS=-I$(src)/libs/pjproject-1.0.1/pjsip/include \
 		   -I$(src)/libs/pjproject-1.0.1/pjlib/include \
diff --git a/sflphone-common/libs/dbus-c++/AUTHORS b/sflphone-common/libs/dbus-c++/AUTHORS
index d9c8833559ba2c6f650242249c6b4bb98138c7bd..87435a48c67d9c6b72e6659f086193b35d155117 100644
--- a/sflphone-common/libs/dbus-c++/AUTHORS
+++ b/sflphone-common/libs/dbus-c++/AUTHORS
@@ -1 +1,2 @@
 Paolo Durante	<shackan@gmail.com>
+Andreas Volz    <andreas.volz@tux-style.com>
diff --git a/sflphone-common/libs/dbus-c++/Makefile.am b/sflphone-common/libs/dbus-c++/Makefile.am
index 6b7789bc86de855bd27f6311be7b0c11caf24efa..6e4fa0f13870b5483124153db7c73172f423bad2 100644
--- a/sflphone-common/libs/dbus-c++/Makefile.am
+++ b/sflphone-common/libs/dbus-c++/Makefile.am
@@ -3,3 +3,4 @@ SUBDIRS = src tools data
 MAINTAINERCLEANFILES = \
 	Makefile.in
 
+
diff --git a/sflphone-common/libs/dbus-c++/README b/sflphone-common/libs/dbus-c++/README
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6977af1436a484e5a265b2e4daec5c11b17f42bf 100644
--- a/sflphone-common/libs/dbus-c++/README
+++ b/sflphone-common/libs/dbus-c++/README
@@ -0,0 +1,7 @@
+Debugging
+---------
+To compile debugging code configure the project with the --enable-debug option. Then at runtime you may set the environment variable "DBUSXX_VERBOSE=1" to activate debugging and to '0' to deactivate debugging.
+
+
+BUGS:
+-----
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/api.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/api.h
index 1e63a8e3dc8d9809e4754a8464e0ee9b84776459..48904e81b09f1677947fc9989ec1a52b246f5e17 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/api.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/api.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_API_H
 #define __DBUSXX_API_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #ifdef GCC_HASCLASSVISIBILITY
 # define DXXAPILOCAL __attribute__ ((visibility("hidden")))
 # define DXXAPIPUBLIC __attribute__ ((visibility("default")))
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/config.h.in b/sflphone-common/libs/dbus-c++/include/dbus-c++/config.h.in
deleted file mode 100644
index 1a0f11c74ce7a993a40a76c25ed1dd11e981f6c6..0000000000000000000000000000000000000000
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/config.h.in
+++ /dev/null
@@ -1,77 +0,0 @@
-/* include/dbus-c++/config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* unstable DBus */
-#undef DBUS_API_SUBJECT_TO_CHANGE
-
-/* DBus supports recursive mutexes (needs DBus >= 0.95) */
-#undef DBUS_HAS_RECURSIVE_MUTEX
-
-/* dbus_threads_init_default (needs DBus >= 0.93) */
-#undef DBUS_HAS_THREADS_INIT_DEFAULT
-
-/* to enable hidden symbols */
-#undef GCC_HASCLASSVISIBILITY
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <expat.h> header file. */
-#undef HAVE_EXPAT_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <pthread.h> header file. */
-#undef HAVE_PTHREAD_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#undef LT_OBJDIR
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/connection.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/connection.h
index 4251cdddf3d3db8837d4af5253c3907df0d12c79..410ce556a212348d1fb54cb6d925c56e25f6bba9 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/connection.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/connection.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_CONNECTION_H
 #define __DBUSXX_CONNECTION_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include <list>
 
 #include "api.h"
@@ -41,7 +37,7 @@ namespace DBus {
 
 class Connection;
 
-typedef Slot<bool, const Message &> MessageSlot;
+typedef Slot<bool, const Message&> MessageSlot;
 
 typedef std::list<Connection>	ConnectionList;
 
@@ -60,53 +56,394 @@ public:
 
 	struct Private;
 
-	typedef std::list<Private *> PrivatePList;
+	typedef std::list<Private*> PrivatePList;
 
-	Connection(Private *);
+	Connection( Private* );
 
-	Connection(const char *address, bool priv = true);
+	Connection( const char* address, bool priv = true );
 
-	Connection(const Connection &c);
+	Connection( const Connection& c );
 
 	virtual ~Connection();
 
-	Dispatcher *setup(Dispatcher *);
-
-	bool operator == (const Connection &) const;
-
-	void add_match(const char *rule);
-
-	void remove_match(const char *rule);
-
-	bool add_filter(MessageSlot &);
-
-	void remove_filter(MessageSlot &);
-
-	bool unique_name(const char *n);
-
-	const char *unique_name() const;
-
+	Dispatcher* setup( Dispatcher* );
+
+	bool operator == ( const Connection& ) const;
+
+	/*!
+	 * \brief Adds a match rule to match messages going through the message bus.
+	 *
+	 * The "rule" argument is the string form of a match rule.
+	 *
+	 * If you pass NULL for the error, this function will not block; the match 
+	 * thus won't be added until you flush the connection, and if there's an error 
+	 * adding the match (only possible error is lack of resources in the bus), you
+	 * won't find out about it.
+	 *
+	 * Normal API conventions would have the function return a boolean value 
+	 * indicating whether the error was set, but that would require blocking always 
+	 * to determine the return value.
+	 *
+	 * The AddMatch method is fully documented in the D-Bus specification. For 
+	 * quick reference, the format of the match rules is discussed here, but the 
+	 * specification is the canonical version of this information.
+	 *
+	 * Rules are specified as a string of comma separated key/value pairs. An 
+	 * example is "type='signal',sender='org.freedesktop.DBus', 
+	 * interface='org.freedesktop.DBus',member='Foo', path='/bar/foo',destination=':452345.34'"
+	 *
+	 * Possible keys you can match on are type, sender, interface, member, path, 
+	 * destination and numbered keys to match message args (keys are 'arg0', 'arg1', etc.). 
+	 * Omitting a key from the rule indicates a wildcard match. For instance omitting 
+	 * the member from a match rule but adding a sender would let all messages from
+	 * that sender through regardless of the member.
+	 *
+	 * Matches are inclusive not exclusive so as long as one rule matches the
+	 * message will get through. It is important to note this because every time a
+	 * essage is received the application will be paged into memory to process it.
+	 * This can cause performance problems such as draining batteries on embedded platforms.
+	 *
+	 * If you match message args ('arg0', 'arg1', and so forth) only string arguments 
+	 * will match. That is, arg0='5' means match the string "5" not the integer 5.
+	 *
+	 * Currently there is no way to match against non-string arguments.
+	 *
+	 * Matching on interface is tricky because method call messages only optionally
+	 * specify the interface. If a message omits the interface, then it will NOT
+	 * match if the rule specifies an interface name. This means match rules on 
+	 * method calls should not usually give an interface.
+	 *
+	 * However, signal messages are required to include the interface so when 
+	 * matching signals usually you should specify the interface in the match rule.
+	 *
+	 * For security reasons, you can match arguments only up to DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER.
+	 *
+	 * Match rules have a maximum length of DBUS_MAXIMUM_MATCH_RULE_LENGTH bytes.
+	 *
+	 * Both of these maximums are much higher than you're likely to need, they only 
+	 * exist because the D-Bus bus daemon has fixed limits on all resource usage.
+	 *
+	 * \param rule Textual form of match rule.
+	 * \throw Error
+	 */
+	void add_match( const char* rule );
+
+	/*!
+	 * \brief Removes a previously-added match rule "by value" (the most 
+	 *        recently-added identical rule gets removed).
+	 *
+	 * The "rule" argument is the string form of a match rule.
+	 *
+	 * The bus compares match rules semantically, not textually, so whitespace and 
+	 * ordering don't have to be identical to the rule you passed to add_match().
+	 *
+	 * \param rule Textual form of match rule.
+	 * \throw Error
+	 */
+	void remove_match( const char* rule );
+
+	/*!
+	 * \brief Adds a message filter.
+	 *
+	 * Filters are handlers that are run on all incoming messages, prior to the 
+	 * objects registered with ObjectAdaptor::register_obj(). Filters are
+	 * run in the order that they were added. The same handler can be added as a 
+	 * filter more than once, in which case it will be run more than once. Filters 
+	 * added during a filter callback won't be run on the message being processed.
+	 *
+	 * \param s The MessageSlot to add.
+	 */
+	bool add_filter( MessageSlot& s);
+
+	/*!
+	 * \brief Removes a previously-added message filter.
+	 *
+	 * It is a programming error to call this function for a handler that has not 
+	 * been added as a filter. If the given handler was added more than once, only 
+	 * one instance of it will be removed (the most recently-added instance).
+	 *
+	 * \param s The MessageSlot to remove.
+	 */
+	void remove_filter( MessageSlot& s);
+
+	/*!
+	 * \brief Sets the unique name of the connection, as assigned by the message bus.
+	 *
+	 * Can only be used if you registered with the bus manually (i.e. if you did 
+	 * not call register_bus()). Can only be called once per connection. After 
+	 * the unique name is set, you can get it with unique_name(void).
+	 *
+	 * The only reason to use this function is to re-implement the equivalent of 
+	 * register_bus() yourself. One (probably unusual) reason to do that might 
+	 * be to do the bus registration call asynchronously instead of synchronously.
+	 *
+	 * \note Just use dbus_bus_get() or dbus_bus_get_private(), or worst case 
+	 *       register_bus(), instead of messing with this function. There's 
+	 *       really no point creating pain for yourself by doing things manually.
+	 *       (Not sure if this is yet wrapped.)
+	 * 
+	 * It's hard to use this function safely on shared connections (created by 
+	 * Connection()) in a multithreaded application, because only one 
+	 * registration attempt can be sent to the bus. If two threads are both 
+	 * sending the registration message, there is no mechanism in libdbus itself 
+	 * to avoid sending it twice.
+	 *
+	 * Thus, you need a way to coordinate which thread sends the registration 
+	 * attempt; which also means you know which thread will call 
+	 * unique_name(const char*). If you don't know about all threads in the app 
+	 * (for example, if some libraries you're using might start libdbus-using 
+	 * threads), then you need to avoid using this function on shared connections.
+	 *
+	 * \param n The unique name.
+	 */
+	bool unique_name( const char* n );
+
+	/*!
+	 * \brief Gets the unique name of the connection as assigned by the message bus.
+	 *
+	 * Only possible after the connection has been registered with the message bus. 
+	 * All connections returned by dbus_bus_get() or dbus_bus_get_private() have 
+	 * been successfully registered. (Not sure if this is yet wrapped.)
+	 *
+	 * The name remains valid until the connection is freed, and should not be
+	 * freed by the caller.
+	 *
+	 * Other than dbus_bus_get(), there are two ways to set the unique name; one 
+	 * is register_bus(), the other is unique_name(const char*). You are 
+	 * responsible for calling unique_name(const char*) if you register by hand 
+	 * instead of using register_bus().
+	 */
+	const char* unique_name() const;
+
+	/*!
+	 * \brief Registers a connection with the bus.
+	 *
+	 * This must be the first thing an application does when connecting to the 
+	 * message bus. If registration succeeds, the unique name will be set, and 
+	 * can be obtained using unique_name(void).
+	 *
+	 * This function will block until registration is complete.
+	 *
+	 * If the connection has already registered with the bus (determined by 
+	 * checking whether unique_name(void) returns a non-NULL value), 
+	 * then this function does nothing.
+	 *
+	 * If you use dbus_bus_get() or dbus_bus_get_private() this function will be 
+	 * called for you.  (Not sure if this is yet wrapped.)
+	 *
+	 * \note Just use dbus_bus_get() or dbus_bus_get_private() instead of 
+	 * register_bus() and save yourself some pain. Using register_bus()
+	 * manually is only useful if you have your own custom message bus not found 
+	 * in DBusBusType.
+	 *
+	 * If you open a bus connection by the contructor of Connection() you will have to register_bus() 
+	 * yourself, or make the appropriate registration method calls yourself. If 
+	 * you send the method calls yourself, call unique_name(const char*) with 
+	 * the unique bus name you get from the bus.
+	 *
+	 * For shared connections (created with dbus_connection_open()) in a 
+	 * multithreaded application, you can't really make the registration calls 
+	 * yourself, because you don't know whether some other thread is also 
+	 * registering, and the bus will kick you off if you send two registration
+	 * messages. (TODO: how is this done in the wrapper?)
+	 *
+	 * If you use register_bus() however, there is a lock that keeps both
+	 * apps from registering at the same time.
+	 *
+	 * The rule in a multithreaded app, then, is that register_bus() must be 
+	 * used to register, or you need to have your own locks that all threads in 
+	 * the app will respect.
+	 *
+	 * In a single-threaded application you can register by hand instead of using 
+	 * register_bus(), as long as you check unique_name(void) to 
+	 * see if a unique name has already been stored by another thread before you 
+	 * send the registration messages.
+	 */
 	bool register_bus();
 
+	/*!
+	 * \brief Gets whether the connection is currently open.
+	 *
+	 * A connection may become disconnected when the remote application closes its 
+	 * end, or exits; a connection may also be disconnected with disconnect().
+	 *
+	 * There are not separate states for "closed" and "disconnected," the two 
+	 * terms are synonymous.
+	 *
+	 * \return true If the connection is still alive. 
+	 */
 	bool connected() const;
 
+	/*!
+	 * \brief Closes a private connection, so no further data can be sent or received.
+	 *
+	 * This disconnects the transport (such as a socket) underlying the connection.
+	 *
+	 * Attempts to send messages after closing a connection are safe, but will
+	 * result in error replies generated locally in libdbus.
+	 *
+	 * This function does not affect the connection's reference count. It's safe 
+	 * to close a connection more than once; all calls after the first do nothing.
+	 * It's impossible to "reopen" a connection, a new connection must be created. 
+	 * This function may result in a call to the DBusDispatchStatusFunction set 
+	 * with Private::init(), as the disconnect 
+	 * message it generates needs to be dispatched.
+	 *
+	 * If a connection is dropped by the remote application, it will close itself.
+	 *
+	 * You must close a connection prior to releasing the last reference to the 
+	 * connection. 
+	 *
+	 * You may not close a shared connection. Connections created with 
+	 * dbus_connection_open() or dbus_bus_get() are shared. These connections are 
+	 * owned by libdbus, and applications should only unref them, never close them. 
+	 * Applications can know it is safe to unref these connections because libdbus 
+	 * will be holding a reference as long as the connection is open. Thus, either
+	 * the connection is closed and it is OK to drop the last reference, or the 
+	 * connection is open and the app knows it does not have the last reference.
+	 *
+	 * Connections created with dbus_connection_open_private() or 
+	 * dbus_bus_get_private() are not kept track of or referenced by libdbus. 
+	 * The creator of these connections is responsible for calling
+	 * dbus_connection_close() prior to releasing the last reference, if the 
+	 * connection is not already disconnected.
+	 *
+	 * \todo dbus_connection_disconnect() was removed in dbus 0.9x. Maybe this 
+	 *       function should be renamed to close().
+	 */
 	void disconnect();
 
-	void exit_on_disconnect(bool exit);
-
+	/*!
+	 * \brief Set whether _exit() should be called when the connection receives a
+	 *        disconnect signal.
+	 *
+	 * The call to _exit() comes after any handlers for the disconnect signal run; 
+	 * handlers can cancel the exit by calling this function.
+	 *
+	 * By default, exit_on_disconnect is false; but for message bus connections 
+	 * returned from dbus_bus_get() it will be toggled on by default.
+	 *
+	 * \param exit true If _exit() should be called after a disconnect signal.
+	 */
+	void exit_on_disconnect( bool exit );
+
+	/*!
+	 * \brief Blocks until the outgoing message queue is empty.
+	 */
 	void flush();
 
-	bool send(const Message &, unsigned int *serial = NULL);
-
-	Message send_blocking(Message &msg, int timeout = -1);
-
-	PendingCall send_async(Message &msg, int timeout);
-
-	void request_name(const char *name, int flags = 0);
-
-	bool has_name(const char *name);
-
-	bool start_service(const char *name, unsigned long flags);
+	/*!
+	 * \brief Adds a message to the outgoing message queue.
+	 *
+	 * Does not block to write the message to the network; that happens 
+	 * asynchronously. To force the message to be written, call 
+	 * dbus_connection_flush(). Because this only queues the message, the only 
+	 * reason it can fail is lack of memory. Even if the connection is disconnected, 
+	 * no error will be returned.
+	 *
+	 * If the function fails due to lack of memory, it returns FALSE. The function 
+	 * will never fail for other reasons; even if the connection is disconnected, 
+	 * you can queue an outgoing message, though obviously it won't be sent.
+	 *
+	 * The message serial is used by the remote application to send a reply; see 
+	 * Message::serial() or the D-Bus specification.
+	 *
+	 * \param msg The Message to write.
+	 * \param serial Return location for message serial, or NULL if you don't care.
+	 * \return true On success.
+	 */
+	bool send( const Message& msg, unsigned int* serial = NULL );
+
+	/*!
+	 * \brief Sends a message and blocks a certain time period while waiting for a reply.
+	 *
+	 * This function does not reenter the main loop, i.e. messages other than the 
+	 * reply are queued up but not processed. This function is used to invoke 
+	 * method calls on a remote object.
+	 *
+	 * If a normal reply is received, it is returned, and removed from the 
+	 * incoming message queue. If it is not received, NULL is returned and the 
+	 * error is set to DBUS_ERROR_NO_REPLY. If an error reply is received, it is 
+	 * converted to a DBusError and returned as an error, then the reply message 
+	 * is deleted and NULL is returned. If something else goes wrong, result is
+	 * set to whatever is appropriate, such as DBUS_ERROR_NO_MEMORY or DBUS_ERROR_DISCONNECTED.
+	 * 
+	 * \warning While this function blocks the calling thread will not be 
+	 *          processing the incoming message queue. This means you can end up 
+	 *          deadlocked if the application you're talking to needs you to reply
+	 *          to a method. To solve this, either avoid the situation, block in a 
+	 *          separate thread from the main connection-dispatching thread, or
+	 *          use PendingCall to avoid blocking.
+	 *
+	 * \param msg The Message to write.
+	 * \param timeout Timeout in milliseconds (omit for default).
+	 * \throw Error
+	 */
+	Message send_blocking( Message& msg, int timeout = -1);
+    
+	/*!
+	 * \brief Queues a message to send, as with send(), but also 
+	 *        returns a DBusPendingCall used to receive a reply to the message.
+	 *
+	 * If no reply is received in the given timeout_milliseconds, this function 
+	 * expires the pending reply and generates a synthetic error reply (generated 
+	 * in-process, not by the remote application) indicating that a timeout occurred.
+	 *
+	 * A PendingCall will see a reply message before any filters or registered
+	 * object path handlers. See Connection::Private::do_dispatch() in dbus documentation
+	 * for details on when handlers are run. (here: Connection::Private::do_dispatch())
+	 *
+	 * A PendingCall will always see exactly one reply message, unless it's 
+	 * cancelled with PendingCall::cancel().
+	 *
+	 * If -1 is passed for the timeout, a sane default timeout is used. -1 is 
+	 * typically the best value for the timeout for this reason, unless you want 
+	 * a very short or very long timeout. There is no way to avoid a timeout
+	 * entirely, other than passing INT_MAX for the timeout to mean "very long 
+	 * timeout." libdbus clamps an INT_MAX timeout down to a few hours timeout though.
+	 *
+	 * \param msg The Message to write.
+	 * \param timeout Timeout in milliseconds (omit for default).
+	 * \throw ErrorNoMemory
+	 */
+	PendingCall send_async( Message& msg, int timeout = -1);
+
+	void request_name( const char* name, int flags = 0 );
+    
+    unsigned long sender_unix_uid(const char *sender);
+
+	/*!
+	 * \brief Asks the bus whether a certain name has an owner.
+	 *
+	 * Using this can easily result in a race condition, since an owner can appear 
+	 * or disappear after you call this.
+	 *
+	 * If you want to request a name, just request it; if you want to avoid 
+	 * replacing a current owner, don't specify DBUS_NAME_FLAG_REPLACE_EXISTING 
+	 * and you will get an error if there's already an owner.
+	 * 
+	 * \param name The name.
+	 * \throw Error
+	 */
+	bool has_name( const char* name );
+
+	/*!
+	 * \brief Starts a service that will request ownership of the given name.
+	 *
+	 * The returned result will be one of be one of DBUS_START_REPLY_SUCCESS or 
+	 * DBUS_START_REPLY_ALREADY_RUNNING if successful. Pass NULL if you don't 
+	 * care about the result.
+	 * 
+	 * The flags parameter is for future expansion, currently you should specify 0.
+	 *
+	 * It's often easier to avoid explicitly starting services, and just send a 
+	 * method call to the service's bus name instead. Method calls start a service
+	 * to handle them by default unless you call dbus_message_set_auto_start() to 
+	 * disable this behavior.
+	 *
+	 * \todo dbus_message_set_auto_start() not yet wrapped!
+	 */
+	bool start_service( const char* name, unsigned long flags );
 
 	const std::vector<std::string>& names();
 
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/debug.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/debug.h
index 6ebd03d4ccd1e363453863dd9304733b2b5ce726..e66c79b3cfe54dea6af9e6fd1e99a2ac2cebac2c 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/debug.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/debug.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_DEBUG_H
 #define __DBUSXX_DEBUG_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include "api.h"
 
 namespace DBus {
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/dispatcher.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/dispatcher.h
index 7b7858b84c00eac6efd4fa20d8a137fcab2912c9..10179ffb31ed98057e3b473e4e2f6b0382b7f531 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/dispatcher.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/dispatcher.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_DISPATCHER_H
 #define __DBUSXX_DISPATCHER_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include "api.h"
 #include "connection.h"
 #include "eventloop.h"
@@ -45,10 +41,34 @@ public:
 
 	virtual ~Timeout(){}
 
+	/*!
+	 * \brief Gets the timeout interval.
+	 *
+	 * The dbus_timeout_handle() should be called each time this interval elapses, 
+	 * starting after it elapses once.
+	 *
+	 * The interval may change during the life of the timeout; if so, the timeout 
+	 * will be disabled and re-enabled (calling the "timeout toggled function") to 
+	 * notify you of the change.
+	 *
+	 * return The interval in miliseconds.
+	 */
 	int interval() const;
 
 	bool enabled() const;
 
+	/*!
+	 * \brief Calls the timeout handler for this timeout.
+	 *
+	 * This function should be called when the timeout occurs.
+	 *
+	 * If this function returns FALSE, then there wasn't enough memory to handle 
+	 * the timeout. Typically just letting the timeout fire again next time it 
+	 * naturally times out is an adequate response to that problem, but you could
+	 * try to do more if you wanted.
+	 *
+	 * return false If there wasn't enough memory.
+	 */
 	bool handle();
 
 	virtual void toggle() = 0;
@@ -72,12 +92,48 @@ public:
 
 	virtual ~Watch(){}
 
+	/*!
+	 * \brief A main loop could poll this descriptor to integrate dbus-c++.
+	 *
+	 * This function calls dbus_watch_get_socket() on win32 and 
+	 * dbus_watch_get_unix_fd() on all other systems. (see dbus documentation)
+	 *
+	 * @return The file descriptor.
+	 */
 	int descriptor() const;
 
+	/*!
+	 * \brief Gets flags from DBusWatchFlags indicating what conditions should be 
+	 *        monitored on the file descriptor.
+	 *
+	 * The flags returned will only contain DBUS_WATCH_READABLE and DBUS_WATCH_WRITABLE, 
+	 * never DBUS_WATCH_HANGUP or DBUS_WATCH_ERROR; all watches implicitly include 
+	 * a watch for hangups, errors, and other exceptional conditions.
+	 *
+	 * @return The conditions to watch.
+	 */
 	int flags() const;
 
 	bool enabled() const;
 
+	/*! 
+	 * \brief Called to notify the D-Bus library when a previously-added watch 
+	 *        is ready for reading or writing, or has an exception such as a hangup.
+	 *
+	 * If this function returns FALSE, then the file descriptor may still be 
+	 * ready for reading or writing, but more memory is needed in order to do the 
+	 * reading or writing. If you ignore the FALSE return, your application may 
+	 * spin in a busy loop on the file descriptor until memory becomes available, 
+	 * but nothing more catastrophic should happen.
+	 *
+	 * dbus_watch_handle() cannot be called during the DBusAddWatchFunction, as the 
+	 * connection will not be ready to handle that watch yet.
+	 *
+	 * It is not allowed to reference a DBusWatch after it has been passed to remove_function.
+	 *
+	 * @param flags The poll condition using DBusWatchFlags values.
+	 * @return false If there wasn't enough memory.
+	 */
 	bool handle(int flags);
 
 	virtual void toggle() = 0;
@@ -101,6 +157,7 @@ public:
 	void queue_connection(Connection::Private *);
 
 	void dispatch_pending();
+	bool has_something_to_dispatch();
 
 	virtual void enter() = 0;
 
@@ -165,16 +222,15 @@ protected:
 	Internal *_int;
 };
 
-#ifndef DBUS_HAS_RECURSIVE_MUTEX
 typedef Mutex *(*MutexNewFn)();
+typedef void (*MutexUnlockFn)(Mutex *mx);
+
+#ifndef DBUS_HAS_RECURSIVE_MUTEX
 typedef bool (*MutexFreeFn)(Mutex *mx);
 typedef bool (*MutexLockFn)(Mutex *mx);
-typedef void (*MutexUnlockFn)(Mutex *mx);
 #else
-typedef Mutex *(*MutexNewFn)();
 typedef void (*MutexFreeFn)(Mutex *mx);
 typedef void (*MutexLockFn)(Mutex *mx);
-typedef void (*MutexUnlockFn)(Mutex *mx);
 #endif//DBUS_HAS_RECURSIVE_MUTEX
 
 typedef CondVar *(*CondVarNewFn)();
@@ -184,9 +240,7 @@ typedef bool (*CondVarWaitTimeoutFn)(CondVar *cv, Mutex *mx, int timeout);
 typedef void (*CondVarWakeOneFn)(CondVar *cv);
 typedef void (*CondVarWakeAllFn)(CondVar *cv);
 
-#ifdef DBUS_HAS_THREADS_INIT_DEFAULT
 void DXXAPI _init_threading();
-#endif//DBUS_HAS_THREADS_INIT_DEFAULT
 
 void DXXAPI _init_threading(
 	MutexNewFn, MutexFreeFn, MutexLockFn, MutexUnlockFn,
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/ecore-integration.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/ecore-integration.h
new file mode 100644
index 0000000000000000000000000000000000000000..b475533a16dda9f52a7fd182d03d78b98d6dbe42
--- /dev/null
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/ecore-integration.h
@@ -0,0 +1,114 @@
+/*
+ *
+ *  D-Bus++ - C++ bindings for D-Bus
+ *
+ *  Copyright (C) 2005-2007  Paolo Durante <shackan@gmail.com>
+ *
+ *
+ *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+
+#ifndef __DBUSXX_ECORE_INTEGRATION_H
+#define __DBUSXX_ECORE_INTEGRATION_H
+
+#include <Ecore.h>
+
+#include "api.h"
+#include "dispatcher.h"
+#include "Ecore.h"
+
+namespace DBus {
+
+namespace Ecore {
+
+class BusDispatcher;
+
+class DXXAPI BusTimeout : public Timeout
+{
+private:
+
+	BusTimeout( Timeout::Internal*);
+
+	~BusTimeout();
+
+	void toggle();
+
+	static int timeout_handler( void* );
+
+	void _enable();
+
+	void _disable();
+
+private:
+  Ecore_Timer *_etimer;
+
+friend class BusDispatcher;
+};
+
+class DXXAPI BusWatch : public Watch
+{
+private:
+
+	BusWatch( Watch::Internal*);
+
+	~BusWatch();
+
+	void toggle();
+
+	static int watch_handler_read ( void*, Ecore_Fd_Handler *fdh);
+    
+  static int watch_handler_error ( void*, Ecore_Fd_Handler *fdh);
+
+	void _enable();
+
+	void _disable();
+
+private:
+  Ecore_Fd_Handler *fd_handler_read;
+  Ecore_Fd_Handler *fd_handler_error;
+
+friend class BusDispatcher;
+};
+
+class DXXAPI BusDispatcher : public Dispatcher
+{
+public:
+	BusDispatcher() {}
+
+	void attach();
+
+	void enter() {}
+
+	void leave() {}
+
+	Timeout* add_timeout( Timeout::Internal* );
+
+	void rem_timeout( Timeout* );
+
+	Watch* add_watch( Watch::Internal* );
+
+	void rem_watch( Watch* );
+
+private:
+
+};
+
+} /* namespace Ecore */
+
+} /* namespace DBus */
+
+#endif//__DBUSXX_ECORE_INTEGRATION_H
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/error.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/error.h
index 152eb83000de770f4cd47c7217135cbbfe77dab0..7dec7bfe72e8318f1340a8fcd7a9c094c29379f1 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/error.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/error.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_ERROR_H
 #define __DBUSXX_ERROR_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include "api.h"
 #include "util.h"
 
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/eventloop-integration.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/eventloop-integration.h
index 1395129e1a044ef3cdeee57dc92cdf6cd699aa93..1bae382c36198e49aa55ab46e6f4cb4baab854fa 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/eventloop-integration.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/eventloop-integration.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_EVENTLOOP_INTEGRATION_H
 #define __DBUSXX_EVENTLOOP_INTEGRATION_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include "api.h"
 #include "dispatcher.h"
 #include "util.h"
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/eventloop.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/eventloop.h
index 6760ebd940725b02869ae55c2ce757b05f47b18a..f7d0f6d8c654033ababf55bdddc57e9a45b2d8e5 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/eventloop.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/eventloop.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_EVENTLOOP_H
 #define __DBUSXX_EVENTLOOP_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include <pthread.h>
 #include <list>
 
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/glib-integration.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/glib-integration.h
index 0bbd3472bfb2470b0f6bfd67bb917e12a1064c5e..76eae5ecf7c687e333d2816a50b3fbd210166322 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/glib-integration.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/glib-integration.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_GLIB_INTEGRATION_H
 #define __DBUSXX_GLIB_INTEGRATION_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <glib.h>
 
 #include "api.h"
@@ -94,7 +90,8 @@ class DXXAPI BusDispatcher : public Dispatcher
 {
 public:
 
-	BusDispatcher() : _ctx(NULL), _priority(G_PRIORITY_DEFAULT) {}
+	BusDispatcher();
+	~BusDispatcher();
 
 	void attach(GMainContext *);
 
@@ -116,6 +113,7 @@ private:
 
 	GMainContext *_ctx;
 	int _priority;
+	GSource *_source;
 };
 
 } /* namespace Glib */
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/interface.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/interface.h
index ea39fb752f209ad65f6dca8d364178af7de03134..86c8d18d1bf4089c0817b639905328e8fa36c299 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/interface.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/interface.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_INTERFACE_H
 #define __DBUSXX_INTERFACE_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include <string>
 #include <map>
 #include "api.h"
@@ -99,6 +95,8 @@ protected:
 	{}
 
 	virtual Message _invoke_method(CallMessage &) = 0;
+	
+	virtual bool _invoke_method_noreply(CallMessage &call) = 0;
 
 	InterfaceProxyTable _interfaces;
 };
@@ -169,6 +167,8 @@ public:
 
 	Message invoke_method(const CallMessage &);
 
+	bool invoke_method_noreply(const CallMessage &call);
+
 	bool dispatch_signal(const SignalMessage &);
 
 protected:
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/introspection.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/introspection.h
index f909f0b165140a23a095c75f4523e85c12229246..5f0d1e4dfff5670d47be0ba0d238f7130fb5451d 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/introspection.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/introspection.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_INTROSPECTION_H
 #define __DBUSXX_INTROSPECTION_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include "api.h"
 #include "interface.h"
 
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/message.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/message.h
index 2be55298b3f9faa9e5bd68d6888864673d283929..ba326b7db89ad1c47171732d99950185f590f234 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/message.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/message.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_MESSAGE_H
 #define __DBUSXX_MESSAGE_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include <string>
 #include <map>
 
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/object.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/object.h
index 389f95fc605c1177c8e0fa71866041be304764bd..962bf77d38f847b838dc4e791c11454b98232f89 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/object.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/object.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_OBJECT_H
 #define __DBUSXX_OBJECT_H
 
-#ifdef DUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include <string>
 #include <list>
 
@@ -205,6 +201,8 @@ public:
 private:
 
 	Message _invoke_method(CallMessage &);
+    
+	bool _invoke_method_noreply(CallMessage &call);
 
 	bool handle_message(const Message &);
 
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/pendingcall.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/pendingcall.h
index c8946d43d098d78c454ca1df03db5a958fad0033..bfe5545adb4f0b5dfca141b6ba24fd050bba6aab 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/pendingcall.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/pendingcall.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_PENDING_CALL_H
 #define __DBUSXX_PENDING_CALL_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include "api.h"
 #include "util.h"
 #include "message.h"
@@ -51,18 +47,76 @@ public:
 
 	PendingCall &operator = (const PendingCall &);
 
+	/*!
+	 * \brief Checks whether the pending call has received a reply yet, or not.
+	 *
+	 * \return true If a reply has been received.
+	 */
 	bool completed();
 	
+	/*!
+	 * \brief Cancels the pending call, such that any reply or error received will 
+	 *        just be ignored.
+	 *
+	 * Drops the dbus library's internal reference to the DBusPendingCall so will 
+	 * free the call if nobody else is holding a reference. However you usually 
+	 * get a reference from Connection::send_async() so probably your app 
+	 * owns a ref also.
+	 *
+	 * Note that canceling a pending call will not simulate a timed-out call; if a 
+	 * call times out, then a timeout error reply is received. If you cancel the 
+	 * call, no reply is received unless the the reply was already received before 
+	 * you canceled.
+	 */
 	void cancel();
 
+	/*!
+	 * \brief Block until the pending call is completed.
+	 *
+	 * The blocking is as with Connection::send_blocking(); it
+	 * does not enter the main loop or process other messages, it simply waits for
+	 * the reply in question.
+	 *
+	 * If the pending call is already completed, this function returns immediately.
+	 */
 	void block();
 
-	void data(void *);
-
+	/*!
+	 * \brief Stores a pointer on a PendingCall, along with an optional function to 
+	 *        be used for freeing the data when the data is set again, or when the
+	 *        pending call is finalized.
+	 *
+	 * The slot is allocated automatic.
+	 *
+	 * \param data The data to store.
+	 * \throw ErrorNoMemory
+	 */
+	void data( void* data );
+
+	/*!
+	 * \brief Retrieves data previously set with dbus_pending_call_set_data().
+	 *
+	 * The slot must still be allocated (must not have been freed).
+	 *
+	 * \return The data, or NULL if not found.
+	 */
 	void *data();
 
+	/*!
+	 * \return The data slot.
+	 */
 	Slot<void, PendingCall &>& slot();
 
+	/*!
+	 * \brief Gets the reply
+	 *
+	 * Ownership of the reply message passes to the caller. This function can only 
+	 * be called once per pending call, since the reply message is tranferred to 
+	 * the caller.
+	 *
+	 * \return The reply Message.
+	 * \throw ErrorNoReply
+	 */
 	Message steal_reply();
 
 private:
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/property.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/property.h
index 20313b06600e8353e5114026e903fbe48fb81413..2e909cb58fd917ff6e895aab1f9d472457827a04 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/property.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/property.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_PROPERTY_H
 #define __DBUSXX_PROPERTY_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include "api.h"
 #include "types.h"
 #include "interface.h"
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/refptr_impl.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/refptr_impl.h
index d557c7b2dd47b20270f4e851dae03437ee2ac4ec..fc10cef825518e471f9a083c892b04b2e58a0ae7 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/refptr_impl.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/refptr_impl.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_REFPTR_IMPL_H
 #define __DBUSXX_REFPTR_IMPL_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include "api.h"
 #include "util.h"
 
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/server.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/server.h
index c380ca71f6791b0ee6a24804afcb7a3ccd37650e..30879bf3790e977b04abc8fddd08000fea03ba77 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/server.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/server.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_SERVER_H
 #define __DBUSXX_SERVER_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include <list>
 
 #include "api.h"
@@ -63,7 +59,7 @@ public:
 
 protected:
 
-	Server(const Server & /* s */)
+	Server(const Server &s)
 	{}
 
 	virtual void on_new_connection(Connection &c) = 0;
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/types.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/types.h
index c5c60fd006e332d5ef950518782f27bd6d4c0747..c795891f14146af773b0da86af122567a9987d06 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/types.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/types.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_TYPES_H
 #define __DBUSXX_TYPES_H
 
-#ifdef _DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include <stdint.h>
 #include <string>
 #include <vector>
diff --git a/sflphone-common/libs/dbus-c++/include/dbus-c++/util.h b/sflphone-common/libs/dbus-c++/include/dbus-c++/util.h
index c0a8a488753f7ffbe2256dbbe0f95a129a572ac8..225e1cae65c95bb68ec6faa7481750d960427a8e 100644
--- a/sflphone-common/libs/dbus-c++/include/dbus-c++/util.h
+++ b/sflphone-common/libs/dbus-c++/include/dbus-c++/util.h
@@ -25,10 +25,6 @@
 #ifndef __DBUSXX_UTIL_H
 #define __DBUSXX_UTIL_H
 
-#ifdef DBUS_HAVE_CONFIG_H
-#include <dbus-c++/config.h>
-#endif
-
 #include "api.h"
 #include "debug.h"
 
diff --git a/sflphone-common/libs/dbus-c++/src/Makefile.am b/sflphone-common/libs/dbus-c++/src/Makefile.am
index abb5abe4c82617725ad2b94194a0b0c97e050a35..2f96f4738336a813db1216767634a0c681f6b70d 100644
--- a/sflphone-common/libs/dbus-c++/src/Makefile.am
+++ b/sflphone-common/libs/dbus-c++/src/Makefile.am
@@ -1,6 +1,7 @@
 AM_CPPFLAGS = \
 	$(dbus_CFLAGS) \
 	$(glib_CFLAGS) \
+	$(PRIVATE_CFLAGS) \
 	-I$(top_srcdir)/libs/dbus-c++/include \
 	-I$(top_builddir)/libs/dbus-c++/include
 
@@ -13,8 +14,7 @@ CONFIG_H = $(top_builddir)/libs/dbus-c++/include/dbus-c++/config.h
 
 HEADER_DIR  = $(top_builddir)/libs/dbus-c++/include/dbus-c++
 HEADER_FILES = \
-	$(CONFIG_H) \
-	$(HEADER_DIR)/dbus.h \
+        $(HEADER_DIR)/dbus.h \
 	$(HEADER_DIR)/types.h \
 	$(HEADER_DIR)/connection.h \
 	$(HEADER_DIR)/property.h \
@@ -36,10 +36,10 @@ HEADER_FILES = \
 	$(GLIB_H)
 
 lib_includedir=$(includedir)/dbus-c++-1/dbus-c++/
-#lib_include_HEADERS = $(HEADER_FILES)
+lib_include_HEADERS = $(HEADER_FILES)
 
-noinst_LTLIBRARIES = libdbus-c++-1.la
-libdbus_c___1_la_SOURCES = $(HEADER_FILES) interface.cpp object.cpp introspection.cpp debug.cpp types.cpp connection.cpp connection_p.h property.cpp dispatcher.cpp dispatcher_p.h pendingcall.cpp pendingcall_p.h error.cpp internalerror.h message.cpp message_p.h server.cpp server_p.h eventloop.cpp eventloop-integration.cpp $(GLIB_CPP)
+lib_LTLIBRARIES = libdbus-c++-1.la
+libdbus_c___1_la_SOURCES = $(HEADER_FILES) interface.cpp object.cpp introspection.cpp debug.cpp types.cpp connection.cpp connection_p.h property.cpp dispatcher.cpp dispatcher_p.h pendingcall.cpp pendingcall_p.h error.cpp internalerror.h message.cpp message_p.h server.cpp server_p.h eventloop.cpp eventloop-integration.cpp $(GLIB_CPP) $(ECORE_CPP)
 libdbus_c___1_la_LIBADD = $(dbus_LIBS) $(glib_LIBS) $(pthread_LIBS)
 
 MAINTAINERCLEANFILES = \
diff --git a/sflphone-common/libs/dbus-c++/src/connection.cpp b/sflphone-common/libs/dbus-c++/src/connection.cpp
index 08f573a070c8876fb823ca9d8f967dc035ca2672..9fb85a15500a7f6dad9aa658555ce769f9ca8a72 100644
--- a/sflphone-common/libs/dbus-c++/src/connection.cpp
+++ b/sflphone-common/libs/dbus-c++/src/connection.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/debug.h>
 #include <dbus-c++/connection.h>
@@ -85,7 +88,7 @@ void Connection::Private::init()
 		this, &Connection::Private::disconn_filter_function
 	);
 
-	dbus_connection_add_filter(conn, message_filter_stub, &disconn_filter, NULL);
+	dbus_connection_add_filter(conn, message_filter_stub, &disconn_filter, NULL); // TODO: some assert at least
 
 	dbus_connection_set_dispatch_status_function(conn, dispatch_status_stub, this, 0);
 	dbus_connection_set_exit_on_disconnect(conn, false); //why was this set to true??
@@ -172,6 +175,17 @@ bool Connection::Private::disconn_filter_function(const Message &msg)
 	return false;
 }
 
+DBusDispatchStatus Connection::Private::dispatch_status()
+{
+	return dbus_connection_get_dispatch_status(conn);
+}
+
+bool Connection::Private::has_something_to_dispatch()
+{
+	return dispatch_status() == DBUS_DISPATCH_DATA_REMAINS;
+}
+
+
 Connection Connection::SystemBus()
 {
 	return Connection(new Private(DBUS_BUS_SYSTEM));
@@ -384,6 +398,17 @@ void Connection::request_name(const char *name, int flags)
 	}
 }
 
+unsigned long Connection::sender_unix_uid(const char *sender)
+{
+    InternalError e;
+    
+    unsigned long ul = dbus_bus_get_unix_user(_pvt->conn, sender, e);
+    
+    if (e) throw Error(e);
+    
+    return ul;
+}
+
 bool Connection::has_name(const char *name)
 {	
 	InternalError e;
diff --git a/sflphone-common/libs/dbus-c++/src/connection_p.h b/sflphone-common/libs/dbus-c++/src/connection_p.h
index 21643829b808faf4b891733eeb08e921b74b4e48..a6ea96cdd071d9db4f59824b7809449f77e2f3d4 100644
--- a/sflphone-common/libs/dbus-c++/src/connection_p.h
+++ b/sflphone-common/libs/dbus-c++/src/connection_p.h
@@ -26,7 +26,7 @@
 #define __DBUSXX_CONNECTION_P_H
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include <dbus-c++/connection.h>
@@ -63,6 +63,9 @@ struct DXXAPILOCAL Connection::Private
 
 	void init();
 
+	DBusDispatchStatus dispatch_status();
+	bool has_something_to_dispatch();
+
 	static void dispatch_status_stub(DBusConnection *, DBusDispatchStatus, void *);
 
 	static DBusHandlerResult message_filter_stub(DBusConnection *, DBusMessage *, void *);
diff --git a/sflphone-common/libs/dbus-c++/src/debug.cpp b/sflphone-common/libs/dbus-c++/src/debug.cpp
index 4ca2c782ce57e4b6cebd888c58938c3c17c577b0..4f97dae2ddcb68719724b3bb31fa82ed7b6eb2b2 100644
--- a/sflphone-common/libs/dbus-c++/src/debug.cpp
+++ b/sflphone-common/libs/dbus-c++/src/debug.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/debug.h>
 
diff --git a/sflphone-common/libs/dbus-c++/src/dispatcher.cpp b/sflphone-common/libs/dbus-c++/src/dispatcher.cpp
index 9752afe4030dd45eb90f48be60f8254ce7b3b0b4..2da4e86720fd9919c0a0a3bc8119f09546011913 100644
--- a/sflphone-common/libs/dbus-c++/src/dispatcher.cpp
+++ b/sflphone-common/libs/dbus-c++/src/dispatcher.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/dispatcher.h>
 
@@ -66,7 +69,11 @@ Watch::Watch(Watch::Internal *i)
 
 int Watch::descriptor() const
 {
-	return dbus_watch_get_fd((DBusWatch *)_int);
+#if HAVE_WIN32
+	return dbus_watch_get_socket((DBusWatch*)_int);
+#else
+	return dbus_watch_get_unix_fd((DBusWatch*)_int);
+#endif
 }
 
 int Watch::flags() const
@@ -148,10 +155,29 @@ void Dispatcher::queue_connection(Connection::Private *cp)
 	_mutex_p.unlock();
 }
 
+
+bool Dispatcher::has_something_to_dispatch()
+{
+	_mutex_p.lock();
+	bool has_something = false;
+	for(Connection::PrivatePList::iterator it = _pending_queue.begin();
+		it != _pending_queue.end() && !has_something;
+		++it)
+	{
+		has_something = (*it)->has_something_to_dispatch();
+	}
+
+	_mutex_p.unlock();
+	return has_something;
+}
+
+
 void Dispatcher::dispatch_pending()
 {
 	_mutex_p.lock();
 
+	// SEEME: dbus-glib is dispatching only one message at a time to not starve the loop/other things...
+
 	while (_pending_queue.size() > 0)
 	{
 		Connection::PrivatePList::iterator i, j;
@@ -173,13 +199,14 @@ void Dispatcher::dispatch_pending()
 	_mutex_p.unlock();
 }
 
-#undef DBUS_HAS_THREADS_INIT_DEFAULT
-#ifdef DBUS_HAS_THREADS_INIT_DEFAULT
 void DBus::_init_threading()
 {
+#ifdef DBUS_HAS_THREADS_INIT_DEFAULT
 	dbus_threads_init_default();
-}
+#else
+	debug_log("Thread support is not enabled! Your D-Bus version is too old!");
 #endif//DBUS_HAS_THREADS_INIT_DEFAULT
+}
 
 void DBus::_init_threading(
 	MutexNewFn m1,
diff --git a/sflphone-common/libs/dbus-c++/src/dispatcher_p.h b/sflphone-common/libs/dbus-c++/src/dispatcher_p.h
index ece33b7be80d8ef2cda3cf9a500674fc44d2b0a8..33c0cac3906fe639188ecdba5bb145c18d22a113 100644
--- a/sflphone-common/libs/dbus-c++/src/dispatcher_p.h
+++ b/sflphone-common/libs/dbus-c++/src/dispatcher_p.h
@@ -26,7 +26,7 @@
 #define __DBUSXX_DISPATCHER_P_H
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include <dbus-c++/dispatcher.h>
diff --git a/sflphone-common/libs/dbus-c++/src/ecore-integration.cpp b/sflphone-common/libs/dbus-c++/src/ecore-integration.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2a5ef6897023db0695bc5d85ee2d7b96efb56e9a
--- /dev/null
+++ b/sflphone-common/libs/dbus-c++/src/ecore-integration.cpp
@@ -0,0 +1,213 @@
+/*
+ *
+ *  D-Bus++ - C++ bindings for D-Bus
+ *
+ *  Copyright (C) 2005-2007  Paolo Durante <shackan@gmail.com>
+ *
+ *
+ *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <dbus-c++/ecore-integration.h>
+
+#include <dbus/dbus.h> // for DBUS_WATCH_*
+
+using namespace DBus;
+
+Ecore::BusTimeout::BusTimeout( Timeout::Internal* ti)
+: Timeout(ti)
+{
+	_enable();
+}
+
+Ecore::BusTimeout::~BusTimeout()
+{
+	_disable();
+}
+
+void Ecore::BusTimeout::toggle()
+{
+	debug_log("ecore: timeout %p toggled (%s)", this, Timeout::enabled() ? "on":"off");
+
+	if(Timeout::enabled())	_enable();
+	else			_disable();
+}
+
+int Ecore::BusTimeout::timeout_handler( void *data )
+{
+	Ecore::BusTimeout* t = reinterpret_cast<Ecore::BusTimeout*>(data);
+
+	debug_log("Ecore::BusTimeout::timeout_handler( void *data )");
+
+	t->handle();
+
+	return 1; // 1 -> reshedule in ecore for next timer interval
+}
+
+void Ecore::BusTimeout::_enable()
+{
+  debug_log("Ecore::BusTimeout::_enable()");
+  
+  _etimer = ecore_timer_add (((double)Timeout::interval())/1000, timeout_handler, this);
+}
+
+void Ecore::BusTimeout::_disable()
+{
+  debug_log("Ecore::BusTimeout::_disable()");
+
+  ecore_timer_del (_etimer);
+}
+
+static bool watch_prepare( int *timeout )
+{
+	debug_log("ecore: watch_prepare");
+
+	*timeout = -1;
+	return false;
+}
+
+static bool watch_check( )
+{
+	debug_log("ecore: watch_check");
+
+	return true;
+}
+
+static bool watch_dispatch( void *data )
+{
+	debug_log("ecore: watch_dispatch");
+
+	bool cb = true;
+	DBus::default_dispatcher->dispatch_pending(); //TODO: won't work in case of multiple dispatchers
+	return cb;
+}
+
+Ecore::BusWatch::BusWatch( Watch::Internal* wi)
+: Watch(wi)
+{
+	_enable();
+}
+
+Ecore::BusWatch::~BusWatch()
+{
+	_disable();
+}
+
+void Ecore::BusWatch::toggle()
+{
+	debug_log("ecore: watch %p toggled (%s)", this, Watch::enabled() ? "on":"off");
+
+	if(Watch::enabled())	_enable();
+	else			_disable();
+}
+
+int Ecore::BusWatch::watch_handler_read( void *data, Ecore_Fd_Handler *fdh  )
+{
+	Ecore::BusWatch* w = reinterpret_cast<Ecore::BusWatch*>(data);
+
+	debug_log("ecore: watch_handler_read");
+  
+	int flags = DBUS_WATCH_READABLE;
+  
+  watch_dispatch(NULL);
+
+	w->handle(flags);
+
+	return 1;
+}
+
+int Ecore::BusWatch::watch_handler_error( void *data, Ecore_Fd_Handler *fdh  )
+{
+	Ecore::BusWatch* w = reinterpret_cast<Ecore::BusWatch*>(data);
+
+	debug_log("ecore: watch_handler_error");
+
+	int flags = DBUS_WATCH_ERROR;
+  
+  watch_dispatch(NULL);
+
+	return 1;
+}
+
+void Ecore::BusWatch::_enable()
+{
+  debug_log("Ecore::BusWatch::_enable()");
+  
+  int flags = Watch::flags();
+  
+  fd_handler_read = ecore_main_fd_handler_add (Watch::descriptor(),
+                                                            ECORE_FD_READ,
+                                                            watch_handler_read,
+                                                            this,
+                                                            NULL, NULL);
+  
+  ecore_main_fd_handler_active_set(fd_handler_read, ECORE_FD_READ);
+  
+  fd_handler_error = ecore_main_fd_handler_add (Watch::descriptor(),
+                                                            ECORE_FD_ERROR,
+                                                            watch_handler_error,
+                                                            this,
+                                                            NULL, NULL);
+  
+  ecore_main_fd_handler_active_set(fd_handler_error, ECORE_FD_ERROR);
+}
+
+void Ecore::BusWatch::_disable()
+{
+  ecore_main_fd_handler_del (fd_handler_read);
+  ecore_main_fd_handler_del (fd_handler_error);
+}
+
+void Ecore::BusDispatcher::attach( )
+{
+}
+
+Timeout* Ecore::BusDispatcher::add_timeout( Timeout::Internal* wi )
+{
+	Timeout* t = new Ecore::BusTimeout( wi );
+
+	debug_log("ecore: added timeout %p (%s)", t, t->enabled() ? "on":"off");
+
+	return t;
+}
+
+void Ecore::BusDispatcher::rem_timeout( Timeout* t )
+{
+	debug_log("ecore: removed timeout %p", t);
+
+	delete t;
+}
+
+Watch* Ecore::BusDispatcher::add_watch( Watch::Internal* wi )
+{
+	Watch* w = new Ecore::BusWatch(wi);
+
+	debug_log("ecore: added watch %p (%s) fd=%d flags=%d",
+		w, w->enabled() ? "on":"off", w->descriptor(), w->flags()
+	);
+	return w;
+}
+
+void Ecore::BusDispatcher::rem_watch( Watch* w )
+{
+	debug_log("ecore: removed watch %p", w);
+
+	delete w;
+}
diff --git a/sflphone-common/libs/dbus-c++/src/error.cpp b/sflphone-common/libs/dbus-c++/src/error.cpp
index 23f7bec71b1e7d2b67176876a740b1215f910299..840365bad4bf4f6d135730d8d1558ad0622fbb59 100644
--- a/sflphone-common/libs/dbus-c++/src/error.cpp
+++ b/sflphone-common/libs/dbus-c++/src/error.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/message.h>
 #include <dbus-c++/error.h>
diff --git a/sflphone-common/libs/dbus-c++/src/eventloop-integration.cpp b/sflphone-common/libs/dbus-c++/src/eventloop-integration.cpp
index b1075672e0cf8482ea6c2c230dd63880a1751e45..ed0cc23883088123d81917b7ca36f4f2c4e51f85 100644
--- a/sflphone-common/libs/dbus-c++/src/eventloop-integration.cpp
+++ b/sflphone-common/libs/dbus-c++/src/eventloop-integration.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/eventloop-integration.h>
 #include <dbus-c++/debug.h>
diff --git a/sflphone-common/libs/dbus-c++/src/eventloop.cpp b/sflphone-common/libs/dbus-c++/src/eventloop.cpp
index a9b875701c31119a87c323c5c2b5aabfe878e6e1..7fac42cf89634b0c3a625af54839cec9976ac3c3 100644
--- a/sflphone-common/libs/dbus-c++/src/eventloop.cpp
+++ b/sflphone-common/libs/dbus-c++/src/eventloop.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/eventloop.h>
 #include <dbus-c++/debug.h>
@@ -150,8 +153,7 @@ void DefaultMainLoop::dispatch()
 	}
 	_mutex_w.unlock();
 
-	// int wait_min = 10000;
-        int wait_min = 500;
+	int wait_min = 10000;
 
 	DefaultTimeouts::iterator ti;
 
diff --git a/sflphone-common/libs/dbus-c++/src/glib-integration.cpp b/sflphone-common/libs/dbus-c++/src/glib-integration.cpp
index bde3c7afe0937c43fe9407024e274f6c4120be5a..491c950129f4582f4b19d12b3321c41be3546080 100644
--- a/sflphone-common/libs/dbus-c++/src/glib-integration.cpp
+++ b/sflphone-common/libs/dbus-c++/src/glib-integration.cpp
@@ -21,7 +21,9 @@
  *
  */
 
-
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include <dbus-c++/glib-integration.h>
 
 #include <dbus/dbus.h> // for DBUS_WATCH_*
@@ -29,9 +31,10 @@
 using namespace DBus;
 
 Glib::BusTimeout::BusTimeout(Timeout::Internal *ti, GMainContext *ctx, int priority)
-: Timeout(ti), _ctx(ctx), _priority(priority)
+: Timeout(ti), _ctx(ctx), _priority(priority), _source(NULL)
 {
-	_enable();
+	if (Timeout::enabled())
+		_enable();
 }
 
 Glib::BusTimeout::~BusTimeout()
@@ -58,6 +61,9 @@ gboolean Glib::BusTimeout::timeout_handler(gpointer data)
 
 void Glib::BusTimeout::_enable()
 {
+	if (_source)
+		_disable(); // be sane
+
 	_source = g_timeout_source_new(Timeout::interval());
 	g_source_set_priority(_source, _priority);
 	g_source_set_callback(_source, timeout_handler, this, NULL);
@@ -66,7 +72,11 @@ void Glib::BusTimeout::_enable()
 
 void Glib::BusTimeout::_disable()
 {
-	g_source_destroy(_source);
+	if (_source)
+	{
+		g_source_destroy(_source);
+		_source = NULL;
+	}
 }
 
 struct BusSource
@@ -77,7 +87,7 @@ struct BusSource
 
 static gboolean watch_prepare(GSource *source, gint *timeout)
 {
-//	debug_log("glib: watch_prepare");
+	//debug_log("glib: watch_prepare");
 
 	*timeout = -1;
 	return FALSE;
@@ -85,7 +95,7 @@ static gboolean watch_prepare(GSource *source, gint *timeout)
 
 static gboolean watch_check(GSource *source)
 {
-//	debug_log("glib: watch_check");
+	//debug_log("glib: watch_check");
 
 	BusSource *io = (BusSource *)source;
 	return io->poll.revents ? TRUE : FALSE;
@@ -96,7 +106,6 @@ static gboolean watch_dispatch(GSource *source, GSourceFunc callback, gpointer d
 	debug_log("glib: watch_dispatch");
 
 	gboolean cb = callback(data);
-	DBus::default_dispatcher->dispatch_pending(); //TODO: won't work in case of multiple dispatchers
 	return cb;
 }
 
@@ -108,9 +117,10 @@ static GSourceFuncs watch_funcs = {
 };
 
 Glib::BusWatch::BusWatch(Watch::Internal *wi, GMainContext *ctx, int priority)
-: Watch(wi), _ctx(ctx), _priority(priority)
+: Watch(wi), _ctx(ctx), _priority(priority), _source(NULL)
 {
-	_enable();
+	if (Watch::enabled())
+		_enable();
 }
 
 Glib::BusWatch::~BusWatch()
@@ -149,6 +159,8 @@ gboolean Glib::BusWatch::watch_handler(gpointer data)
 
 void Glib::BusWatch::_enable()
 {
+	if (_source)
+		_disable(); // be sane
 	_source = g_source_new(&watch_funcs, sizeof(BusSource));
 	g_source_set_priority(_source, _priority);
 	g_source_set_callback(_source, watch_handler, this, NULL);
@@ -158,8 +170,8 @@ void Glib::BusWatch::_enable()
 
 	if (flags &DBUS_WATCH_READABLE)
 		condition |= G_IO_IN;
-//	if (flags &DBUS_WATCH_WRITABLE)
-//		condition |= G_IO_OUT;
+	if (flags &DBUS_WATCH_WRITABLE)
+		condition |= G_IO_OUT;
 	if (flags &DBUS_WATCH_ERROR)
 		condition |= G_IO_ERR;
 	if (flags &DBUS_WATCH_HANGUP)
@@ -176,14 +188,91 @@ void Glib::BusWatch::_enable()
 
 void Glib::BusWatch::_disable()
 {
+	if (!_source)
+		return;
 	GPollFD *poll = &(((BusSource *)_source)->poll);
 	g_source_remove_poll(_source, poll);
 	g_source_destroy(_source);
+	_source = NULL;
+}
+
+/*
+ * We need this on top of the IO handlers, because sometimes
+ * there are messages to dispatch queued up but no IO pending.
+ * (fixes also a previous problem of code not working in case of multiple dispatchers)
+*/
+struct DispatcherSource
+{
+	GSource source;
+	Dispatcher *dispatcher;
+};
+
+
+static gboolean dispatcher_prepare(GSource *source, gint *timeout)
+{
+	Dispatcher *dispatcher = ((DispatcherSource*)source)->dispatcher;
+  
+  	*timeout = -1;
+
+  	return dispatcher->has_something_to_dispatch()? TRUE:FALSE;
+}
+
+static gboolean dispatcher_check(GSource *source)
+{
+  	return FALSE;
+}
+
+static gboolean
+dispatcher_dispatch(GSource *source,
+                    GSourceFunc callback,
+                    gpointer user_data)
+{
+  	Dispatcher *dispatcher = ((DispatcherSource*)source)->dispatcher;
+
+	dispatcher->dispatch_pending();
+  	return TRUE;
+}
+
+static const GSourceFuncs dispatcher_funcs = {
+	dispatcher_prepare,
+	dispatcher_check,
+	dispatcher_dispatch,
+	NULL
+};
+
+Glib::BusDispatcher::BusDispatcher()
+: _ctx(NULL), _priority(G_PRIORITY_DEFAULT), _source(NULL)
+{
+}
+
+Glib::BusDispatcher::~BusDispatcher()
+{
+	if (_source)
+	{
+		GSource *temp = _source;
+		_source = NULL;
+
+		g_source_destroy (temp);
+		g_source_unref (temp);
+	}
+
+	if (_ctx)
+		g_main_context_unref(_ctx);
 }
 
 void Glib::BusDispatcher::attach(GMainContext *ctx)
 {
+	g_assert(_ctx == NULL); // just to be sane
+
 	_ctx = ctx ? ctx : g_main_context_default();
+ 	g_main_context_ref(_ctx);
+	
+	// create the source for dispatching messages
+	_source = g_source_new((GSourceFuncs *) &dispatcher_funcs,
+	                       sizeof(DispatcherSource));
+
+	((DispatcherSource*)_source)->dispatcher = this;
+	g_source_attach (_source, _ctx);
 }
 
 Timeout *Glib::BusDispatcher::add_timeout(Timeout::Internal *wi)
diff --git a/sflphone-common/libs/dbus-c++/src/interface.cpp b/sflphone-common/libs/dbus-c++/src/interface.cpp
index 6a47cf631c022cb6d81a248ba5de8c88a47f5457..b0360ac979a387a0de953e311e912531fff39d88 100644
--- a/sflphone-common/libs/dbus-c++/src/interface.cpp
+++ b/sflphone-common/libs/dbus-c++/src/interface.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/debug.h>
 #include <dbus-c++/interface.h>
@@ -154,3 +157,13 @@ Message InterfaceProxy::invoke_method(const CallMessage &call)
 
 	return _invoke_method(call2);
 }
+
+bool InterfaceProxy::invoke_method_noreply(const CallMessage &call)
+{
+	CallMessage &call2 = const_cast<CallMessage &>(call);
+
+	if (call.interface() == NULL)
+		call2.interface(name().c_str());
+
+	return _invoke_method_noreply(call2);
+}
diff --git a/sflphone-common/libs/dbus-c++/src/internalerror.h b/sflphone-common/libs/dbus-c++/src/internalerror.h
index 1cc1fcaec14712a63e4ea06efb5ed1dd4406c386..36fe20c6d290d717e18b9642f5376a88bdecd2bb 100644
--- a/sflphone-common/libs/dbus-c++/src/internalerror.h
+++ b/sflphone-common/libs/dbus-c++/src/internalerror.h
@@ -26,7 +26,7 @@
 #define __DBUSXX_INTERNALERROR_H
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include <dbus-c++/error.h>
diff --git a/sflphone-common/libs/dbus-c++/src/introspection.cpp b/sflphone-common/libs/dbus-c++/src/introspection.cpp
index 88b61a14b245f284685a6a626a74755cea673247..11fa883af87ebf3cbe3284d2299f4b872a50a128 100644
--- a/sflphone-common/libs/dbus-c++/src/introspection.cpp
+++ b/sflphone-common/libs/dbus-c++/src/introspection.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/introspection.h>
 #include <dbus-c++/object.h>
diff --git a/sflphone-common/libs/dbus-c++/src/message.cpp b/sflphone-common/libs/dbus-c++/src/message.cpp
index 119bff8e312b8325864ff8dfa98c1d1e0543cb43..aa920b37678aa60121f8fc3b627ac6372d0a097a 100644
--- a/sflphone-common/libs/dbus-c++/src/message.cpp
+++ b/sflphone-common/libs/dbus-c++/src/message.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/message.h>
 
diff --git a/sflphone-common/libs/dbus-c++/src/message_p.h b/sflphone-common/libs/dbus-c++/src/message_p.h
index af421bc10ed81493f4b814d0a996737891ec602c..18fdb8e3ae6c27a1109c46789810824a9e4f7400 100644
--- a/sflphone-common/libs/dbus-c++/src/message_p.h
+++ b/sflphone-common/libs/dbus-c++/src/message_p.h
@@ -26,7 +26,7 @@
 #define __DBUSXX_MESSAGE_P_H
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include <dbus-c++/message.h>
diff --git a/sflphone-common/libs/dbus-c++/src/object.cpp b/sflphone-common/libs/dbus-c++/src/object.cpp
index 970fcf7b28269fccb6498463bb0ee1865eb6566a..f7d0916031d5c5e6c527d39c5a1cc836feb319d6 100644
--- a/sflphone-common/libs/dbus-c++/src/object.cpp
+++ b/sflphone-common/libs/dbus-c++/src/object.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/debug.h>
 #include <dbus-c++/object.h>
@@ -329,6 +332,17 @@ Message ObjectProxy::_invoke_method(CallMessage &call)
 	return conn().send_blocking(call);
 }
 
+bool ObjectProxy::_invoke_method_noreply(CallMessage &call)
+{
+	if (call.path() == NULL)
+		call.path(path().c_str());
+
+	if (call.destination() == NULL)
+		call.destination(service().c_str());
+
+	return conn().send(call);
+}
+
 bool ObjectProxy::handle_message(const Message &msg)
 {
 	switch (msg.type())
diff --git a/sflphone-common/libs/dbus-c++/src/pendingcall.cpp b/sflphone-common/libs/dbus-c++/src/pendingcall.cpp
index e55c174be575db3d632135e1209471b3c1d95a73..3757d8fd1d984451dad10a66c9924acd9e30eb7e 100644
--- a/sflphone-common/libs/dbus-c++/src/pendingcall.cpp
+++ b/sflphone-common/libs/dbus-c++/src/pendingcall.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/pendingcall.h>
 
diff --git a/sflphone-common/libs/dbus-c++/src/pendingcall_p.h b/sflphone-common/libs/dbus-c++/src/pendingcall_p.h
index 1768b52da544ecd101c848af7b3f5becbc4872bf..0141c364fd33af30ed003b00640fbcd2a3e15026 100644
--- a/sflphone-common/libs/dbus-c++/src/pendingcall_p.h
+++ b/sflphone-common/libs/dbus-c++/src/pendingcall_p.h
@@ -26,7 +26,7 @@
 #define __DBUSXX_PENDING_CALL_P_H
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include <dbus-c++/pendingcall.h>
diff --git a/sflphone-common/libs/dbus-c++/src/property.cpp b/sflphone-common/libs/dbus-c++/src/property.cpp
index 1bf6c6b1f0132e2985b89bccfb3629e35cd5a669..15a2f5bcbdc7e6efd6a54eb79df944f25cca151a 100644
--- a/sflphone-common/libs/dbus-c++/src/property.cpp
+++ b/sflphone-common/libs/dbus-c++/src/property.cpp
@@ -21,6 +21,10 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <dbus-c++/debug.h>
 #include <dbus-c++/property.h>
 
diff --git a/sflphone-common/libs/dbus-c++/src/server.cpp b/sflphone-common/libs/dbus-c++/src/server.cpp
index eae46d664c7f3be0d6416f15fa5d04a48b4de2bd..0c652e5510959c48883267a3a600276c74342fba 100644
--- a/sflphone-common/libs/dbus-c++/src/server.cpp
+++ b/sflphone-common/libs/dbus-c++/src/server.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/debug.h>
 #include <dbus-c++/server.h>
diff --git a/sflphone-common/libs/dbus-c++/src/server_p.h b/sflphone-common/libs/dbus-c++/src/server_p.h
index 6264ebf4d5db282e6d43ad4877b1557e78ed1c4b..826132d2bd61f24f3543139ddb87e0f521666d68 100644
--- a/sflphone-common/libs/dbus-c++/src/server_p.h
+++ b/sflphone-common/libs/dbus-c++/src/server_p.h
@@ -26,7 +26,7 @@
 #define __DBUSXX_SERVER_P_H
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include <dbus-c++/server.h>
diff --git a/sflphone-common/libs/dbus-c++/src/types.cpp b/sflphone-common/libs/dbus-c++/src/types.cpp
index a144f789dbb7d29b323ad03299725a45eb45f5f9..117cca30b5e84906290c16d32f314645588a8fb9 100644
--- a/sflphone-common/libs/dbus-c++/src/types.cpp
+++ b/sflphone-common/libs/dbus-c++/src/types.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <dbus-c++/types.h>
 #include <dbus-c++/object.h>
diff --git a/sflphone-common/libs/dbus-c++/tools/Makefile.am b/sflphone-common/libs/dbus-c++/tools/Makefile.am
index f491376bbfde53804607bbb93cd1acaee0fa1216..e4403ea27509cd29b82154041aa155267533b379 100644
--- a/sflphone-common/libs/dbus-c++/tools/Makefile.am
+++ b/sflphone-common/libs/dbus-c++/tools/Makefile.am
@@ -1,6 +1,6 @@
 # hacky, but ...
 
-#CXX = $(CXX_FOR_BUILD)
+# CXX = $(CXX_FOR_BUILD)
 
 AM_CPPFLAGS = \
 	$(dbus_CFLAGS) \
@@ -16,7 +16,9 @@ libdbus_cxx_la = $(top_builddir)/libs/dbus-c++/src/libdbus-c++-1.la
 
 bin_PROGRAMS = dbusxx-xml2cpp dbusxx-introspect
 
-dbusxx_xml2cpp_SOURCES = xml.h xml.cpp xml2cpp.h xml2cpp.cpp
+dbusxx_xml2cpp_SOURCES = xml.h xml.cpp xml2cpp.h xml2cpp.cpp \
+	generate_adaptor.cpp  generate_adaptor.h  generate_proxy.cpp\
+	generate_proxy.h  generator_utils.cpp  generator_utils.h
 dbusxx_xml2cpp_LDADD = $(libdbus_cxx_la) $(xml_LIBS)
 
 dbusxx_introspect_SOURCES = introspect.h introspect.cpp
diff --git a/sflphone-common/libs/dbus-c++/tools/generate_adaptor.cpp b/sflphone-common/libs/dbus-c++/tools/generate_adaptor.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..891ecfc3c2bc5b25cc301736c48e5d35007f3210
--- /dev/null
+++ b/sflphone-common/libs/dbus-c++/tools/generate_adaptor.cpp
@@ -0,0 +1,722 @@
+/*
+ *
+ *  D-Bus++ - C++ bindings for D-Bus
+ *
+ *  Copyright (C) 2005-2007  Paolo Durante <shackan@gmail.com>
+ *
+ *
+ *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <iostream>
+#include <fstream>
+#include <cstdlib>
+#include <algorithm>
+
+#include "generator_utils.h"
+#include "generate_adaptor.h"
+
+using namespace std;
+using namespace DBus;
+
+extern const char *tab;
+extern const char *header;
+extern const char *dbus_includes;
+
+/*! Generate adaptor code for a XML introspection
+  */
+void generate_adaptor(Xml::Document &doc, const char *filename)
+{
+  ostringstream body;
+  ostringstream head;
+  vector <string> include_vector;
+  
+	head << header;
+	string filestring = filename;
+	underscorize(filestring);
+
+	string cond_comp = "__dbusxx__" + filestring + "__ADAPTOR_MARSHAL_H";
+
+	head << "#ifndef " << cond_comp << endl
+	     << "#define " << cond_comp << endl;
+
+	head << dbus_includes;
+
+	Xml::Node &root = *(doc.root);
+	Xml::Nodes interfaces = root["interface"];
+
+	// iterate over all interface definitions
+	for (Xml::Nodes::iterator i = interfaces.begin(); i != interfaces.end(); ++i)
+	{
+		Xml::Node &iface = **i;
+		Xml::Nodes methods = iface["method"];
+		Xml::Nodes signals = iface["signal"];
+		Xml::Nodes properties = iface["property"];
+		Xml::Nodes ms;
+		ms.insert(ms.end(), methods.begin(), methods.end());
+		ms.insert(ms.end(), signals.begin(), signals.end());
+
+		// gets the name of a interface: <interface name="XYZ">
+		string ifacename = iface.get("name");
+    
+		// these interface names are skipped.
+		if (ifacename == "org.freedesktop.DBus.Introspectable"
+		 ||ifacename == "org.freedesktop.DBus.Properties")
+		{
+			cerr << "skipping interface " << ifacename << endl;
+			continue;
+		}
+
+		istringstream ss(ifacename);
+		string nspace;
+		unsigned int nspaces = 0;
+
+		// prints all the namespaces defined with <interface name="X.Y.Z">
+		while (ss.str().find('.', ss.tellg()) != string::npos)
+		{
+			getline(ss, nspace, '.');
+
+			body << "namespace " << nspace << " {" << endl;
+
+			++nspaces;
+		}
+		body << endl;
+
+		string ifaceclass;
+
+		getline(ss, ifaceclass);
+
+        // a "_adaptor" is added to class name to distinguish between proxy and adaptor
+		ifaceclass += "_adaptor";
+
+		cerr << "generating code for interface " << ifacename << "..." << endl;
+
+        // the code from class definiton up to opening of the constructor is generated...
+		body << "class " << ifaceclass << endl
+		     << ": public ::DBus::InterfaceAdaptor" << endl
+		     << "{" << endl
+		     << "public:" << endl
+		     << endl
+		     << tab << ifaceclass << "()" << endl
+		     << tab << ": ::DBus::InterfaceAdaptor(\"" << ifacename << "\")" << endl
+		     << tab << "{" << endl;
+
+        // generates code to bind the properties
+		for (Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi)
+		{
+			Xml::Node &property = **pi;
+
+			body << tab << tab << "bind_property("
+			     << property.get("name") << ", "
+			     << "\"" << property.get("type") << "\", "
+			     << (property.get("access").find("read") != string::npos
+				? "true"
+				: "false")
+			     << ", "
+			     << (property.get("access").find("write") != string::npos
+				? "true"
+				: "false")
+			     << ");" << endl;
+		}
+
+		// generate code to register all methods
+		for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
+		{
+			Xml::Node &method = **mi;
+
+			body << tab << tab << "register_method(" 
+			     << ifaceclass << ", " << method.get("name") << ", "<< stub_name(method.get("name")) 
+			     << ");" << endl;
+		}
+
+		body << tab << "}" << endl
+		     << endl;
+
+		body << tab << "::DBus::IntrospectedInterface *const introspect() const " << endl
+		     << tab << "{" << endl;
+
+		// generate the introspect arguments
+		for (Xml::Nodes::iterator mi = ms.begin(); mi != ms.end(); ++mi)
+		{
+			Xml::Node &method = **mi;
+			Xml::Nodes args = method["arg"];
+
+			body << tab << tab << "static ::DBus::IntrospectedArgument " << method.get("name") << "_args[] = " << endl
+			     << tab << tab << "{" << endl;
+
+			for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai)
+			{
+				Xml::Node &arg = **ai;
+
+				body << tab << tab << tab << "{ ";
+
+				if (arg.get("name").length())
+				{
+					body << "\"" << arg.get("name") << "\", ";
+				}
+				else
+				{
+					body << "0, ";
+				}
+				body << "\"" << arg.get("type") << "\", "
+				     << (arg.get("direction") == "in" ? "true" : "false")
+				     << " }," << endl;
+			}
+			body << tab << tab << tab << "{ 0, 0, 0 }" << endl
+			     << tab << tab << "};" << endl;
+		}
+
+		body << tab << tab << "static ::DBus::IntrospectedMethod " << ifaceclass << "_methods[] = " << endl
+		     << tab << tab << "{" << endl;
+
+		// generate the introspect methods
+		for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
+		{
+			Xml::Node &method = **mi;
+			
+			body << tab << tab << tab << "{ \"" << method.get("name") << "\", " << method.get("name") << "_args }," << endl;
+		}
+
+		body << tab << tab << tab << "{ 0, 0 }" << endl
+		     << tab << tab << "};" << endl;
+
+		body << tab << tab << "static ::DBus::IntrospectedMethod " << ifaceclass << "_signals[] = " << endl
+		     << tab << tab << "{" << endl;
+
+		for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
+		{
+			Xml::Node &method = **si;
+			
+			body << tab << tab << tab << "{ \"" << method.get("name") << "\", " << method.get("name") << "_args }," << endl;
+		}
+
+		body << tab << tab << tab << "{ 0, 0 }" << endl
+		     << tab << tab << "};" << endl;
+
+		body << tab << tab << "static ::DBus::IntrospectedProperty " << ifaceclass << "_properties[] = " << endl
+		     << tab << tab << "{" << endl;
+
+		for (Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi)
+		{
+			Xml::Node &property = **pi;
+
+			body << tab << tab << tab << "{ "
+				<< "\"" << property.get("name") << "\", "
+				<< "\"" << property.get("type") << "\", "
+				<< (property.get("access").find("read") != string::npos
+				   ? "true"
+				   : "false")
+				<< ", "
+				<< (property.get("access").find("write") != string::npos
+				   ? "true"
+				   : "false")
+				<< " }," << endl;
+		}
+
+
+		body << tab << tab << tab << "{ 0, 0, 0, 0 }" << endl
+		     << tab << tab << "};" << endl;
+
+		// generate the Introspected interface
+		body << tab << tab << "static ::DBus::IntrospectedInterface " << ifaceclass << "_interface = " << endl
+		     << tab << tab << "{" << endl
+		     << tab << tab << tab << "\"" << ifacename << "\"," << endl 
+		     << tab << tab << tab << ifaceclass << "_methods," << endl
+		     << tab << tab << tab << ifaceclass << "_signals," << endl
+		     << tab << tab << tab << ifaceclass << "_properties" << endl
+		     << tab << tab << "};" << endl
+		     << tab << tab << "return &" << ifaceclass << "_interface;" << endl 
+		     << tab << "}" << endl
+		     << endl;
+
+		body << "public:" << endl
+		     << endl
+		     << tab << "/* properties exposed by this interface, use" << endl
+		     << tab << " * property() and property(value) to get and set a particular property" << endl
+		     << tab << " */" << endl;
+
+		// generate the properties code
+		for (Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi)
+		{
+			Xml::Node &property = **pi;
+			string name = property.get("name");
+			string type = property.get("type");
+			string type_name = signature_to_type(type);
+
+			body << tab << "::DBus::PropertyAdaptor< " << type_name << " > " << name << ";" << endl;
+		}
+
+		body << endl;
+
+		body << "public:" << endl
+		     << endl
+		     << tab << "/* methods exported by this interface," << endl
+		     << tab << " * you will have to implement them in your ObjectAdaptor" << endl
+		     << tab << " */" << endl;
+
+		// generate the methods code
+		for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
+		{
+			Xml::Node &method = **mi;
+			Xml::Nodes args = method["arg"];
+			Xml::Nodes args_in = args.select("direction","in");
+			Xml::Nodes args_out = args.select("direction","out");
+			Xml::Nodes annotations = args["annotation"];
+			Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+      string arg_object;
+			
+			if (annotations_object.size() > 0)
+			{
+				arg_object = annotations_object.front()->get("value");
+			}
+      
+			body << tab << "virtual ";
+
+      // return type is 'void' if none or multible return values
+			if (args_out.size() == 0 || args_out.size() > 1)
+			{
+				body << "void ";
+			}
+			else if (args_out.size() == 1)
+			{
+        // generate basic or object return type
+        if (arg_object.length())
+        {
+          body << arg_object << " ";
+        }
+        else
+        {
+				  body << signature_to_type(args_out.front()->get("type")) << " ";
+        }
+			}
+
+      // generate the method name
+			body << method.get("name") << "(";
+			
+      // generate the methods 'in' variables
+			unsigned int i = 0;
+			for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+			{
+				Xml::Node &arg = **ai;
+        Xml::Nodes annotations = arg["annotation"];
+        Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+				string arg_name = arg.get("name");
+        string arg_object;
+        
+        if (annotations_object.size() > 0)
+        {
+          arg_object = annotations_object.front()->get("value");
+        }
+        
+        // generate basic signature only if no object name available...
+        if (!arg_object.length())
+        {
+				  body << "const " << signature_to_type(arg.get("type")) << "& ";
+        }
+        // ...or generate object style if available
+        else
+        {
+          body << "const " << arg_object << "& ";
+          
+          // store a object name to later generate header includes
+          include_vector.push_back (arg_object);
+        }
+
+				if (arg_name.length())
+					body << arg_name;
+
+				if ((i+1 != args_in.size() || args_out.size() > 1))
+					body << ", ";
+			}
+
+			// generate the method 'out' variables if multibe 'out' values exist
+			if (args_out.size() > 1)
+			{
+				unsigned int i = 0;
+				for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+				{
+					Xml::Node &arg = **ao;
+					Xml::Nodes annotations = arg["annotation"];
+					Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+					string arg_name = arg.get("name");
+					string arg_object;
+					
+					if (annotations_object.size() > 0)
+					{
+						arg_object = annotations_object.front()->get("value");
+					}
+          
+          // generate basic signature only if no object name available...
+          if (!arg_object.length())
+          {
+            body << "const " << signature_to_type(arg.get("type")) << "& ";
+          }
+          // ...or generate object style if available
+          else
+          {
+            body << "const " << arg_object << "& ";
+            
+            // store a object name to later generate header includes
+            include_vector.push_back (arg_object);
+          }
+
+					if (arg_name.length())
+						body << " " << arg_name;
+
+					if (i+1 != args_out.size())
+						body << ", ";
+				}		
+			}
+			body << ") = 0;" << endl;
+		}
+
+		body << endl
+		     << "public:" << endl
+		     << endl
+		     << tab << "/* signal emitters for this interface" << endl
+		     << tab << " */" << endl;
+
+  		// generate the signals code
+		for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
+		{
+			Xml::Node &signal = **si;
+			Xml::Nodes args = signal["arg"];
+
+			body << tab << "void " << signal.get("name") << "(";
+
+			// generate the signal arguments
+			unsigned int i = 0;
+			for (Xml::Nodes::iterator a = args.begin(); a != args.end(); ++a, ++i)
+			{
+				Xml::Node &arg = **a;
+				Xml::Nodes annotations = arg["annotation"];
+				Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+				string arg_object;
+				
+				if (annotations_object.size() > 0)
+				{
+					arg_object = annotations_object.front()->get("value");
+				}
+				
+        // generate basic signature only if no object name available...
+        if (!arg_object.length())
+        {
+          body << "const " << signature_to_type(arg.get("type")) << "& arg" << i+1;
+        }
+        // ...or generate object style if available
+        else
+        {
+          body << "const " << arg_object << "& arg" << i+1;
+          
+          // store a object name to later generate header includes
+          include_vector.push_back (arg_object);
+        }
+        
+				if (i+1 != args.size())
+					body << ", ";
+			}
+
+			body << ")" << endl
+			     << tab << "{" << endl
+			     << tab << tab << "::DBus::SignalMessage sig(\"" << signal.get("name") <<"\");" << endl;
+
+      // generate the signal body
+			if (args.size() > 0)
+			{
+				body << tab << tab << "::DBus::MessageIter wi = sig.writer();" << endl;
+
+        unsigned int i = 0;
+			  for (Xml::Nodes::iterator a = args.begin(); a != args.end(); ++a, ++i)
+				{
+         	Xml::Node &arg = **a;
+					Xml::Nodes annotations = arg["annotation"];
+					Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+					string arg_object;
+					
+					if (annotations_object.size() > 0)
+					{
+						arg_object = annotations_object.front()->get("value");
+					}
+          
+          if (arg_object.length())
+          {
+            body << tab << tab << signature_to_type(arg.get("type")) << " _arg" << i+1 << ";" << endl;
+            body << tab << tab << "_arg" << i+1 << " << " << "arg" << i+1 << ";" << endl;
+            
+            body << tab << tab << "wi << _arg" << i+1 << ";" << endl;
+          }
+          else
+          {
+					  body << tab << tab << "wi << arg" << i+1 << ";" << endl;
+          }
+				}
+			}
+
+      // emit the signal in method body
+			body << tab << tab << "emit_signal(sig);" << endl
+			     << tab << "}" << endl;
+		}
+
+		body << endl
+		     << "private:" << endl
+		     << endl
+		     << tab << "/* unmarshalers (to unpack the DBus message before calling the actual interface method)" << endl
+		     << tab << " */" << endl;
+
+		// generate the unmarshalers
+		for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
+		{
+			Xml::Node &method = **mi;
+			Xml::Nodes args = method["arg"];
+			Xml::Nodes args_in = args.select("direction","in");
+			Xml::Nodes args_out = args.select("direction","out");
+
+			body << tab << "::DBus::Message " << stub_name(method.get("name")) << "(const ::DBus::CallMessage &call)" << endl
+			     << tab << "{" << endl
+			     << tab << tab << "::DBus::MessageIter ri = call.reader();" << endl
+			     << endl;
+
+			// generate the 'in' variables
+			unsigned int i = 1;
+			for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+			{
+				Xml::Node &arg = **ai;
+        
+				body << tab << tab << signature_to_type(arg.get("type")) << " argin" << i << ";" << " ";
+				body << "ri >> argin" << i << ";" << endl;
+			}
+      
+      // generate the 'in' object variables
+			i = 1;
+			for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+			{
+				Xml::Node &arg = **ai;
+        Xml::Nodes annotations = arg["annotation"];
+        Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+        string arg_object;
+        
+        if (annotations_object.size() > 0)
+        {
+          arg_object = annotations_object.front()->get("value");
+        }
+        
+        if (arg_object.length())
+        {
+          body << tab << tab << arg_object << " _argin" << i << ";";
+          body << " " << "_argin" << i << " << " << "argin" << i << ";" << endl;
+        }
+			}
+
+      // generate 'out' variables
+			if (args_out.size() > 0)
+			{
+				unsigned int i = 1;
+				for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+				{
+					Xml::Node &arg = **ao;
+					          
+          body << tab << tab << signature_to_type(arg.get("type")) << " argout" << i;
+                
+          if (args_out.size() == 1) // a single 'out' parameter will be assigned
+          {
+            body << " = ";
+          }
+          else // multible 'out' parameters will be handled as parameters below
+          {
+            body << ";" << endl;
+          }
+				}
+			}
+      
+      // generate 'out' object variables
+			if (args_out.size() > 0)
+			{
+				unsigned int i = 1;
+				for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+				{
+					Xml::Node &arg = **ao;
+					Xml::Nodes annotations = arg["annotation"];
+					Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+					string arg_object;
+					
+					if (annotations_object.size() > 0)
+					{
+						arg_object = annotations_object.front()->get("value");
+					}
+                           
+          // generate object types
+          if (arg_object.length())
+          {
+            body << tab << tab << arg_object << " _argout" << i << ";" << endl;
+          }
+				}
+			}
+
+      // generate in '<<' operation
+      i = 0;
+      for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+			{
+        Xml::Node &arg = **ai;
+        Xml::Nodes annotations = arg["annotation"];
+        Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+        string arg_object;
+        
+        if (annotations_object.size() > 0)
+        {
+          arg_object = annotations_object.front()->get("value");
+        }
+      }
+
+      // do correct indent
+      if (args_out.size() != 1 )
+      {
+        body << tab << tab;
+      }
+      
+      body << method.get("name") << "(";
+      
+      // generate call stub parameters
+      i = 0;
+      for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+			{
+        Xml::Node &arg = **ai;
+        Xml::Nodes annotations = arg["annotation"];
+        Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+        string arg_object;
+        
+        if (annotations_object.size() > 0)
+        {
+          arg_object = annotations_object.front()->get("value");
+        }
+        
+        if (arg_object.length())
+        {
+          body << "_argin" << i+1;
+        }
+        else
+        {
+				  body << "argin" << i+1;
+        }
+
+				if ((i+1 != args_in.size() || args_out.size() > 1))
+					body << ", ";
+			}
+
+			if (args_out.size() > 1)
+      {
+        i = 0;
+        for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+        {
+          Xml::Node &arg = **ao;
+					Xml::Nodes annotations = arg["annotation"];
+					Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+					string arg_object;
+					
+					if (annotations_object.size() > 0)
+					{
+						arg_object = annotations_object.front()->get("value");
+					}
+          
+          if (arg_object.length())
+          {
+            body << "_argout" << i+1;
+          }
+          else
+          {
+            body << "argout" << i+1;
+          }
+
+          if (i+1 != args_out.size())
+            body << ", ";
+        }
+      }
+
+			body << ");" << endl;
+
+			body << tab << tab << "::DBus::ReturnMessage reply(call);" << endl;
+
+			if (args_out.size() > 0)
+			{
+				body << tab << tab << "::DBus::MessageIter wi = reply.writer();" << endl;
+        
+        // generate out '<<' operation
+        i = 0;
+        for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+        {
+          Xml::Node &arg = **ao;
+					Xml::Nodes annotations = arg["annotation"];
+					Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+					string arg_object;
+					
+					if (annotations_object.size() > 0)
+					{
+						arg_object = annotations_object.front()->get("value");
+					}
+          
+          if (arg_object.length())
+          {
+            body << tab << tab << "argout" << i+1 << " << " << "_argout" << i+1 << ";" << endl;
+          }
+        }
+
+				for (unsigned int i = 0; i < args_out.size(); ++i)
+				{
+					body << tab << tab << "wi << argout" << i+1 << ";" << endl;
+				}
+			}
+
+			body << tab << tab << "return reply;" << endl;
+
+			body << tab << "}" << endl;
+		}
+
+		body << "};" << endl
+		     << endl;
+
+		for (unsigned int i = 0; i < nspaces; ++i)
+		{
+			body << "} ";
+		}
+		body << endl;
+	}
+
+	body << "#endif //" << cond_comp << endl;
+    
+  // remove all duplicates in the header include vector
+  vector<string>::const_iterator vec_end_it = unique (include_vector.begin (), include_vector.end ());
+
+  for (vector<string>::const_iterator vec_it = include_vector.begin ();
+       vec_it != vec_end_it;
+       ++vec_it)
+  {
+    const string &include = *vec_it;
+    
+    head << "#include " << "\"" << include << ".h" << "\"" << endl;
+  }
+  head << endl;
+
+	ofstream file(filename);
+	if (file.bad())
+	{
+		cerr << "unable to write file " << filename << endl;
+		exit(-1);
+	}
+  
+  file << head.str ();
+  file << body.str ();
+
+  file.close();
+}
diff --git a/sflphone-common/libs/dbus-c++/tools/generate_adaptor.h b/sflphone-common/libs/dbus-c++/tools/generate_adaptor.h
new file mode 100644
index 0000000000000000000000000000000000000000..fd888f020651b9542bb5d1e3ffe044ab4a9f0cfa
--- /dev/null
+++ b/sflphone-common/libs/dbus-c++/tools/generate_adaptor.h
@@ -0,0 +1,32 @@
+/*
+ *
+ *  D-Bus++ - C++ bindings for D-Bus
+ *
+ *  Copyright (C) 2005-2007  Paolo Durante <shackan@gmail.com>
+ *
+ *
+ *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef __DBUSXX_TOOLS_GENERATE_ADAPTOR_H
+#define __DBUSXX_TOOLS_GENERATE_ADAPTOR_H
+
+#include <string>
+#include "xml.h"
+
+void generate_adaptor(DBus::Xml::Document &doc, const char *filename);
+
+#endif//__DBUSXX_TOOLS_GENERATE_ADAPTOR_H
diff --git a/sflphone-common/libs/dbus-c++/tools/generate_proxy.cpp b/sflphone-common/libs/dbus-c++/tools/generate_proxy.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f3615a0d484ffb46099a3ce36d3935a5d0f30598
--- /dev/null
+++ b/sflphone-common/libs/dbus-c++/tools/generate_proxy.cpp
@@ -0,0 +1,665 @@
+/*
+ *
+ *  D-Bus++ - C++ bindings for D-Bus
+ *
+ *  Copyright (C) 2005-2007  Paolo Durante <shackan@gmail.com>
+ *
+ *
+ *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <iostream>
+#include <fstream>
+#include <cstdlib>
+#include <algorithm>
+
+#include "generator_utils.h"
+#include "generate_proxy.h"
+
+using namespace std;
+using namespace DBus;
+
+extern const char *tab;
+extern const char *header;
+extern const char *dbus_includes;
+
+/*! Generate proxy code for a XML introspection
+  */
+void generate_proxy(Xml::Document &doc, const char *filename)
+{
+  ostringstream body;
+  ostringstream head;
+  vector <string> include_vector;
+
+	head << header;
+	string filestring = filename;
+	underscorize(filestring);
+
+	string cond_comp = "__dbusxx__" + filestring + "__PROXY_MARSHAL_H";
+
+	head << "#ifndef " << cond_comp << endl
+	     << "#define " << cond_comp << endl;
+
+	head << dbus_includes;
+
+	Xml::Node &root = *(doc.root);
+	Xml::Nodes interfaces = root["interface"];
+
+	// iterate over all interface definitions
+	for (Xml::Nodes::iterator i = interfaces.begin(); i != interfaces.end(); ++i)
+	{
+		Xml::Node &iface = **i;
+		Xml::Nodes methods = iface["method"];
+		Xml::Nodes signals = iface["signal"];
+		Xml::Nodes properties = iface["property"];
+		Xml::Nodes ms;
+		ms.insert(ms.end(), methods.begin(), methods.end());
+		ms.insert(ms.end(), signals.begin(), signals.end());
+
+		// gets the name of a interface: <interface name="XYZ">
+		string ifacename = iface.get("name");
+    
+		// these interface names are skipped.
+		if (ifacename == "org.freedesktop.DBus.Introspectable"
+		 ||ifacename == "org.freedesktop.DBus.Properties")
+		{
+			cerr << "skipping interface " << ifacename << endl;
+			continue;
+		}
+
+		istringstream ss(ifacename);
+		string nspace;
+		unsigned int nspaces = 0;
+
+		// prints all the namespaces defined with <interface name="X.Y.Z">
+		while (ss.str().find('.', ss.tellg()) != string::npos)
+		{
+			getline(ss, nspace, '.');
+
+			body << "namespace " << nspace << " {" << endl;
+
+			++nspaces;
+		}
+		body << endl;
+
+		string ifaceclass;
+
+		getline(ss, ifaceclass);
+
+		// a "_proxy" is added to class name to distinguish between proxy and adaptor
+		ifaceclass += "_proxy";
+
+		cerr << "generating code for interface " << ifacename << "..." << endl;
+
+		// the code from class definiton up to opening of the constructor is generated...
+		body << "class " << ifaceclass << endl
+		     << ": public ::DBus::InterfaceProxy" << endl
+		     << "{" << endl
+		     << "public:" << endl
+		     << endl
+		     << tab << ifaceclass << "()" << endl
+		     << tab << ": ::DBus::InterfaceProxy(\"" << ifacename << "\")" << endl
+		     << tab << "{" << endl;
+
+		// generates code to connect all the signal stubs; this is still inside the constructor
+		for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
+		{
+			Xml::Node &signal = **si;
+
+			string marshname = "_" + signal.get("name") + "_stub";
+
+			body << tab << tab << "connect_signal(" 
+			     << ifaceclass << ", " << signal.get("name") << ", " << stub_name(signal.get("name"))
+			     << ");" << endl;
+		}
+
+		// the constructor ends here
+		body << tab << "}" << endl
+		     << endl;
+
+		// write public block header for properties
+		body << "public:" << endl << endl
+		     << tab << "/* properties exported by this interface */" << endl;
+
+		// this loop generates all properties
+		for (Xml::Nodes::iterator pi = properties.begin ();
+		     pi != properties.end (); ++pi)
+		{
+			Xml::Node & property = **pi;
+			string prop_name = property.get ("name");
+			string property_access = property.get ("access");
+			if (property_access == "read" || property_access == "readwrite")
+			{
+				body << tab << tab << "const " << signature_to_type (property.get("type"))
+				     << " " << prop_name << "() {" << endl;
+				body << tab << tab << tab << "::DBus::CallMessage call ;\n ";
+				body << tab << tab << tab
+				     << "call.member(\"Get\"); call.interface(\"org.freedesktop.DBus.Properties\");"
+				     << endl;
+				body << tab << tab << tab
+				     << "::DBus::MessageIter wi = call.writer(); " << endl;
+				body << tab << tab << tab
+				     << "const std::string interface_name = \"" << ifacename << "\";"
+				     << endl;
+				body << tab << tab << tab
+				     << "const std::string property_name  = \"" << prop_name << "\";"
+				     << endl;
+				body << tab << tab << tab << "wi << interface_name;" << endl;
+				body << tab << tab << tab << "wi << property_name;" << endl;
+				body << tab << tab << tab
+				     << "::DBus::Message ret = this->invoke_method (call);" << endl;
+				// TODO: support invoke_method_NoReply for properties
+				body << tab << tab << tab
+				     << "::DBus::MessageIter ri = ret.reader ();" << endl;
+				body << tab << tab << tab << "::DBus::Variant argout; " << endl;
+				body << tab << tab << tab << "ri >> argout;" << endl;
+				body << tab << tab << tab << "return argout;" << endl;
+				body << tab << tab << "};" << endl;
+			}
+
+			if (property_access == "write" || property_access == "readwrite")
+			{
+				body << tab << tab << "void " << prop_name << "( const "<< signature_to_type (property.get("type")) << " & input" << ") {" << endl;
+				body << tab << tab << tab << "::DBus::CallMessage call ;\n ";
+				body << tab << tab << tab <<"call.member(\"Set\");  call.interface( \"org.freedesktop.DBus.Properties\");"<< endl;
+				body << tab << tab << tab <<"::DBus::MessageIter wi = call.writer(); " << endl;
+				body << tab << tab << tab <<"::DBus::Variant value;" << endl;
+				body << tab << tab << tab <<"::DBus::MessageIter vi = value.writer ();" << endl;
+				body << tab << tab << tab <<"vi << input;" << endl;
+				body << tab << tab << tab <<"const std::string interface_name = \"" << ifacename << "\";" << endl;
+				body << tab << tab << tab <<"const std::string property_name  = \"" << prop_name << "\";"<< endl;
+				body << tab << tab << tab <<"wi << interface_name;" << endl;
+				body << tab << tab << tab <<"wi << property_name;" << endl;
+				body << tab << tab << tab <<"wi << value;" << endl;
+				body << tab << tab << tab <<"::DBus::Message ret = this->invoke_method (call);" << endl;
+				// TODO: support invoke_method_noreply for properties
+				body << tab << tab << "};" << endl;
+			}
+		}
+
+		// write public block header for methods
+		body << "public:" << endl
+		     << endl
+		     << tab << "/* methods exported by this interface," << endl
+		     << tab << " * this functions will invoke the corresponding methods on the remote objects" << endl
+		     << tab << " */" << endl;
+
+		// this loop generates all methods
+		for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
+		{
+			Xml::Node &method = **mi;
+			Xml::Nodes args = method["arg"];
+			Xml::Nodes args_in = args.select("direction","in");
+			Xml::Nodes args_out = args.select("direction","out");
+      Xml::Nodes annotations = args["annotation"];
+      Xml::Nodes method_annotations = method["annotation"];
+      Xml::Nodes annotations_noreply = method_annotations.select("name","org.freedesktop.DBus.Method.NoReply");
+      Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+      string arg_object;
+      bool annotation_noreply_value = false;
+      
+      // parse method level noreply annotations
+      if (annotations_noreply.size() > 0)
+      {
+        string annotation_noreply_value_str = annotations_noreply.front()->get("value");
+        
+        if (annotation_noreply_value_str == "true")
+        {
+          annotation_noreply_value = true;
+        }
+      }      
+        
+      if (annotations_object.size() > 0)
+      {
+        arg_object = annotations_object.front()->get("value");
+      }
+      
+			if (args_out.size() == 0 || args_out.size() > 1)
+			{
+				body << tab << "void ";
+			}
+			else if (args_out.size() == 1)
+			{
+        if (arg_object.length())
+        {
+          body << tab << arg_object << " ";
+        }
+        else
+        {
+				  body << tab << signature_to_type(args_out.front()->get("type")) << " ";
+        }
+			}
+      
+			body << method.get("name") << "(";
+			
+			// generate all 'in' arguments for a method signature
+			unsigned int i = 0;
+			for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+			{
+				Xml::Node &arg = **ai;
+        Xml::Nodes annotations = arg["annotation"];
+        Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+        string arg_object;
+        
+        if (annotations_object.size() > 0)
+        {
+          arg_object = annotations_object.front()->get("value");
+        }
+        
+        // generate basic signature only if no object name available...
+        if (!arg_object.length())
+        {
+				  body << "const " << signature_to_type(arg.get("type")) << "& ";
+        }
+        // ...or generate object style if available
+        else
+        {
+          body << "const " << arg_object << "& ";
+          
+          // store a object name to later generate header includes
+          include_vector.push_back (arg_object);
+        }
+        
+				string arg_name = arg.get("name");
+				if (arg_name.length())
+					body << arg_name;
+				else
+					body << "argin" << i;
+
+				if ((i+1 != args_in.size() || args_out.size() > 1))
+					body << ", ";
+			}
+
+			if (args_out.size() > 1)
+			{
+        // generate all 'out' arguments for a method signature
+				unsigned int j = 0;
+				for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++j)
+				{
+					Xml::Node &arg = **ao;
+          Xml::Nodes annotations = arg["annotation"];
+          Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+          string arg_object;
+          
+          if (annotations_object.size() > 0)
+          {
+            arg_object = annotations_object.front()->get("value");
+          }
+          
+          // generate basic signature only if no object name available...
+          if (!arg_object.length())
+          {
+            body << signature_to_type(arg.get("type")) << "&";
+          }
+          // ...or generate object style if available
+          else
+          {
+            body << arg_object << "& ";
+            
+            // store a object name to later generate header includes
+            include_vector.push_back (arg_object);
+          }
+          
+					string arg_name = arg.get("name");
+					if (arg_name.length())
+						body << " " << arg_name;
+					else
+						body << " argout" << j;
+
+					if (j+1 != args_out.size())
+						body << ", ";
+				}
+			}
+			body << ")" << endl;
+
+			body << tab << "{" << endl
+			     << tab << tab << "::DBus::CallMessage call;" << endl;
+
+			if (args_in.size() > 0)
+			{
+				body << tab << tab << "::DBus::MessageIter wi = call.writer();" << endl
+				     << endl;
+			}
+
+      // generate all 'in' arguments for a method body
+			i = 0;
+			for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+			{
+				Xml::Node &arg = **ai;
+				string arg_name = arg.get("name");
+        Xml::Nodes annotations = arg["annotation"];
+        Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+        string arg_object;
+        
+        if (annotations_object.size() > 0)
+        {
+          arg_object = annotations_object.front()->get("value");
+        }
+        
+        if (!arg_name.length())
+        {
+					arg_name = "argin";
+          arg_name += toString <uint> (i);
+        }
+        
+        // generate extra code to wrap object
+        if (arg_object.length())
+        {
+          body << tab << tab << signature_to_type(arg.get("type")) << "_" << arg_name << ";" << endl;
+          body << tab << tab << "_" << arg_name << " << " << arg_name << ";" << endl;
+          
+          arg_name = string ("_") + arg_name;
+        }
+        
+        body << tab << tab << "wi << " << arg_name << ";" << endl;
+			}
+      
+      body << tab << tab << "call.member(\"" << method.get("name") << "\");" << endl;
+      
+      // generate noreply/reply method calls
+      if (annotation_noreply_value)
+      {
+          if (args_out.size ())
+          {
+            cerr << "Function: " << method.get("name") << ":" << endl;
+            cerr << "Option 'org.freedesktop.DBus.Method.NoReply' not allowed for methods with 'out' variables!" << endl << "-> Option ignored!" << endl;
+            
+            body << tab << tab << "::DBus::Message ret = invoke_method (call);" << endl;
+          }
+          else
+          {
+            body << tab << tab << "assert (invoke_method_noreply (call));" << endl; // will only assert in case of no memory
+          }        
+      }
+      else
+      {
+        body << tab << tab << "::DBus::Message ret = invoke_method (call);" << endl;
+      }
+
+			if (args_out.size() > 0)
+			{
+				body << tab << tab << "::DBus::MessageIter ri = ret.reader();" << endl
+				     << endl;
+			}
+      
+      // generate 'out' values as return if only one existing
+			if (args_out.size() == 1)
+			{
+        Xml::Nodes annotations = args_out["annotation"];
+        Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+        string arg_object;
+    
+        if (annotations_object.size() > 0)
+        {
+          arg_object = annotations_object.front()->get("value");
+        }
+        
+        if (arg_object.length())
+        {
+          body << tab << tab << arg_object << " _argout;" << endl;
+        }
+
+				body << tab << tab << signature_to_type(args_out.front()->get("type")) << " argout;" << endl;
+        
+				body << tab << tab << "ri >> argout;" << endl;
+        
+        if (arg_object.length())
+        {
+          body << tab << tab <<  "_argout << argout;" << endl;
+				  body << tab << tab << "return _argout;" << endl;
+        }
+        else
+        {
+          body << tab << tab << "return argout;" << endl;
+        }
+			}
+			else if (args_out.size() > 1)
+			{
+        // generate multible 'out' value
+				unsigned int i = 0;
+				for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+				{
+					Xml::Node &arg = **ao;
+					string arg_name = arg.get("name");
+          Xml::Nodes annotations = arg["annotation"];
+          Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+          string arg_object;
+        
+          if (annotations_object.size() > 0)
+          {
+            arg_object = annotations_object.front()->get("value");
+          }
+          
+					if (!arg_name.length())
+          {
+            arg_name = "argout" + toString <uint> (i);
+          }
+          
+          if (arg_object.length())
+          {
+            body << tab << tab << signature_to_type(arg.get("type")) << "_" << arg_name << ";" << endl;
+          }
+          
+          if (arg_object.length())
+          {
+            body << tab << tab << "ri >> " << "_" << arg_name << ";" << endl;
+          }
+          else
+          {
+            body << tab << tab << "ri >> " << arg_name << ";" << endl;
+          }
+          
+          if (arg_object.length())
+          {
+            body << tab << tab << arg_name << " << " << "_" << arg_name << ";" << endl;
+          }
+				}
+			}
+
+			body << tab << "}" << endl
+			     << endl;
+		}
+
+		// write public block header for signals
+		body << endl
+		     << "public:" << endl
+		     << endl
+		     << tab << "/* signal handlers for this interface" << endl
+		     << tab << " */" << endl;
+
+		// this loop generates all signals
+		for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
+		{
+			Xml::Node &signal = **si;
+			Xml::Nodes args = signal["arg"];
+
+			body << tab << "virtual void " << signal.get("name") << "(";
+
+			// this loop generates all argument for a signal
+			unsigned int i = 0;
+			for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++i)
+			{
+				Xml::Node &arg = **ai;
+				string arg_name = arg.get("name");
+        Xml::Nodes annotations = arg["annotation"];
+        Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+        string arg_object;
+        
+        if (annotations_object.size() > 0)
+        {
+          arg_object = annotations_object.front()->get("value");
+        }
+        
+        // generate basic signature only if no object name available...
+        if (!arg_object.length())
+        {
+				  body << "const " << signature_to_type(arg.get("type")) << "& ";
+        }
+        // ...or generate object style if available
+        else
+        {
+          body << "const " << arg_object << "& ";
+          
+          // store a object name to later generate header includes
+          include_vector.push_back (arg_object);
+        }
+        
+				if (arg_name.length())
+					body << arg_name;
+				else
+					body << "argin" << i;
+
+				if ((ai+1 != args.end()))
+					body << ", ";
+			}
+			body << ") = 0;" << endl;
+		}
+
+		// write private block header for unmarshalers
+		body << endl
+		     << "private:" << endl
+		     << endl
+		     << tab << "/* unmarshalers (to unpack the DBus message before calling the actual signal handler)" << endl
+		     << tab << " */" << endl;
+
+		// generate all the unmarshalers
+		for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
+		{
+			Xml::Node &signal = **si;
+			Xml::Nodes args = signal["arg"];
+
+			body << tab << "void " << stub_name(signal.get("name")) << "(const ::DBus::SignalMessage &sig)" << endl
+			     << tab << "{" << endl;
+
+			if (args.size() > 0)
+			{
+				body << tab << tab << "::DBus::MessageIter ri = sig.reader();" << endl
+				     << endl;
+			}
+
+			unsigned int i = 0;
+			for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++i)
+			{
+				Xml::Node &arg = **ai;
+				string arg_name = arg.get("name");
+        Xml::Nodes annotations = arg["annotation"];
+        Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+        string arg_object;
+        
+        if (annotations_object.size() > 0)
+        {
+          arg_object = annotations_object.front()->get("value");
+        }				
+				
+				body << tab << tab << signature_to_type(arg.get("type")) << " " ;
+       
+        // use a default if no arg name given
+				if (!arg_name.length())
+        {
+          arg_name = "arg" + toString <uint> (i);
+        }
+				       
+        body << arg_name << ";" << endl;
+        body << tab << tab << "ri >> " << arg_name << ";" << endl;
+        
+        // if a object type is used create a local variable and insert values with '<<' operation
+        if (arg_object.length())
+        {
+          body << tab << tab << arg_object << " _" << arg_name << ";" << endl;
+          body << tab << tab << "_" << arg_name << " << " << arg_name << ";" << endl;
+					
+					// store a object name to later generate header includes
+          include_vector.push_back (arg_object);
+        }
+			}
+
+			body << tab << tab << signal.get("name") << "(";
+
+      // generate all arguments for the call to the virtual function
+			unsigned int j = 0;
+			for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++j)
+			{
+				Xml::Node &arg = **ai;
+				string arg_name = arg.get("name");
+        Xml::Nodes annotations = arg["annotation"];
+        Xml::Nodes annotations_object = annotations.select("name","org.freedesktop.DBus.Object");
+        string arg_object;
+        
+        if (annotations_object.size() > 0)
+        {
+          arg_object = annotations_object.front()->get("value");
+        }
+        
+        if (!arg_name.length())
+        {
+          arg_name = "arg" + toString <uint> (j);
+        }
+                
+        if (arg_object.length())
+        {
+          body << "_" << arg_name;
+        }
+        else
+        {
+          body << arg_name;
+        }
+        
+				if (ai+1 != args.end())
+					body << ", ";
+			}
+
+			body << ");" << endl;
+
+			body << tab << "}" << endl;
+		}
+
+		body << "};" << endl
+		     << endl;
+
+		for (unsigned int i = 0; i < nspaces; ++i)
+		{
+			body << "} ";
+		}
+		body << endl;
+	}
+
+	body << "#endif //" << cond_comp << endl;
+
+  // remove all duplicates in the header include vector
+  vector<string>::const_iterator vec_end_it = unique (include_vector.begin (), include_vector.end ());
+
+  for (vector<string>::const_iterator vec_it = include_vector.begin ();
+       vec_it != vec_end_it;
+       ++vec_it)
+  {
+    const string &include = *vec_it;
+    
+    head << "#include " << "\"" << include << ".h" << "\"" << endl;
+  }
+  head << endl;
+  
+	ofstream file(filename);
+	if (file.bad())
+	{
+		cerr << "unable to write file " << filename << endl;
+		exit(-1);
+	}
+  
+  file << head.str ();
+  file << body.str ();
+
+	file.close();
+}
diff --git a/sflphone-common/libs/dbus-c++/tools/generate_proxy.h b/sflphone-common/libs/dbus-c++/tools/generate_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..0224f4df17278b520b268af56c4f87fe827ee652
--- /dev/null
+++ b/sflphone-common/libs/dbus-c++/tools/generate_proxy.h
@@ -0,0 +1,31 @@
+/*
+ *
+ *  D-Bus++ - C++ bindings for D-Bus
+ *
+ *  Copyright (C) 2005-2007  Paolo Durante <shackan@gmail.com>
+ *
+ *
+ *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef __DBUSXX_TOOLS_GENERATE_PROXY_H
+#define __DBUSXX_TOOLS_GENERATE_PROXY_H
+
+#include "xml.h"
+
+void generate_proxy(DBus::Xml::Document &doc, const char *filename);
+
+#endif//__DBUSXX_TOOLS_GENERATE_PROXY_H
diff --git a/sflphone-common/libs/dbus-c++/tools/generator_utils.cpp b/sflphone-common/libs/dbus-c++/tools/generator_utils.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e08ad27227eb6a2fc3eb9945b0df3e9d745babac
--- /dev/null
+++ b/sflphone-common/libs/dbus-c++/tools/generator_utils.cpp
@@ -0,0 +1,166 @@
+/*
+ *
+ *  D-Bus++ - C++ bindings for D-Bus
+ *
+ *  Copyright (C) 2005-2007  Paolo Durante <shackan@gmail.com>
+ *
+ *
+ *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <iostream>
+#include <cstdlib>
+
+#include "generator_utils.h"
+
+using namespace std;
+
+const char *tab = "    ";
+
+const char *header = "\n\
+/*\n\
+ *	This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!\n\
+ */\n\
+\n\
+";
+
+const char *dbus_includes = "\n\
+#include <dbus-c++/dbus.h>\n\
+#include <cassert>\n\
+";
+
+void underscorize(string &str)
+{
+	for (unsigned int i = 0; i < str.length(); ++i)
+	{
+		if (!isalpha(str[i]) && !isdigit(str[i])) str[i] = '_';
+	}
+}
+
+string stub_name(string name)
+{
+	underscorize(name);
+
+	return "_" + name + "_stub";
+}
+
+const char *atomic_type_to_string(char t)
+{
+	static struct { char type; const char *name; } atos[] =
+	{
+		{ 'y', "uint8_t" },
+		{ 'b', "bool" },
+		{ 'n', "int16_t" },
+		{ 'q', "uint16_t" },
+		{ 'i', "int32_t" },
+		{ 'u', "uint32_t" },
+		{ 'x', "int64_t" },
+		{ 't', "uint64_t" },
+		{ 'd', "double" },
+		{ 's', "std::string" },
+		{ 'o', "::DBus::Path" },
+		{ 'g', "::DBus::Signature" },
+		{ 'v', "::DBus::Variant" },
+		{ '\0', "" }
+	};
+	int i;
+
+	for (i = 0; atos[i].type; ++i)
+	{
+		if (atos[i].type == t) break;
+	}
+	return atos[i].name;
+}
+
+void _parse_signature(const string &signature, string &type, unsigned int &i)
+{
+	for (; i < signature.length(); ++i)
+	{
+		switch (signature[i])
+		{
+			case 'a':
+			{
+				switch (signature[++i])
+				{
+					case '{':
+					{
+						type += "std::map< ";
+
+						const char *atom = atomic_type_to_string(signature[++i]);
+						if (!atom)
+						{
+							cerr << "invalid signature" << endl;
+							exit(-1);
+						}
+						type += atom;
+						type += ", ";
+						++i;
+						break;
+					}
+					default:
+					{
+						type += "std::vector< ";
+						break;
+					}
+				}
+				_parse_signature(signature, type, i);
+				type += " >";
+				continue;
+			}
+			case '(':	
+			{
+				type += "::DBus::Struct< ";
+				++i;
+				_parse_signature(signature, type, i);
+				type += " >";
+				if (signature[i+1])
+				{
+					type += ", ";
+				}
+				continue;
+			}
+			case ')':
+			case '}':	
+			{
+				return;
+			}
+			default:
+			{
+				const char *atom = atomic_type_to_string(signature[i]);
+				if (!atom)
+				{
+					cerr << "invalid signature" << endl;
+					exit(-1);
+				}
+				type += atom;
+
+				if (signature[i+1] != ')' && signature[i+1] != '}' && i+1 < signature.length())
+				{
+					type += ", ";
+				}
+				break;
+			}
+		}
+	}
+}
+
+string signature_to_type(const string &signature)
+{
+	string type;
+	unsigned int i = 0;
+	_parse_signature(signature, type, i);
+	return type;
+}
diff --git a/sflphone-common/libs/dbus-c++/tools/generator_utils.h b/sflphone-common/libs/dbus-c++/tools/generator_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..b232b56dd9fe9f3afd29b728e85e098bb5580273
--- /dev/null
+++ b/sflphone-common/libs/dbus-c++/tools/generator_utils.h
@@ -0,0 +1,46 @@
+/*
+ *
+ *  D-Bus++ - C++ bindings for D-Bus
+ *
+ *  Copyright (C) 2005-2007  Paolo Durante <shackan@gmail.com>
+ *
+ *
+ *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef __DBUSXX_TOOLS_GENERATOR_UTILS_H
+#define __DBUSXX_TOOLS_GENERATOR_UTILS_H
+
+#include <string>
+#include <sstream>
+#include <iomanip>
+
+const char *atomic_type_to_string(char t);
+std::string stub_name(std::string name);
+std::string signature_to_type(const std::string &signature);
+void _parse_signature(const std::string &signature, std::string &type, unsigned int &i);
+void underscorize(std::string &str);
+
+/// create std::string from any number
+template <typename T>
+std::string toString (const T &thing, int w = 0, int p = 0)
+{
+  std::ostringstream os;
+  os << std::setw(w) << std::setprecision(p) << thing;
+  return os.str();
+}
+
+#endif//__DBUSXX_TOOLS_GENERATOR_UTILS_H
diff --git a/sflphone-common/libs/dbus-c++/tools/xml2cpp.cpp b/sflphone-common/libs/dbus-c++/tools/xml2cpp.cpp
index 45c8dde1c3fcc9a0fee2b9df3bb89e7e63639cb3..81cd18ea5ef35a4ce76d6ea605762e556d6047c5 100644
--- a/sflphone-common/libs/dbus-c++/tools/xml2cpp.cpp
+++ b/sflphone-common/libs/dbus-c++/tools/xml2cpp.cpp
@@ -1,6 +1,6 @@
 /*
  *
- *  D-Bus++ - C++ bindings for D-Bus
+ *  D-->Bus++ - C++ bindings for D-Bus
  *
  *  Copyright (C) 2005-2007  Paolo Durante <shackan@gmail.com>
  *
@@ -21,9 +21,6 @@
  *
  */
 
-
-#include "xml2cpp.h"
-
 #include <dbus/dbus.h>
 
 #include <cstdlib>
@@ -33,25 +30,16 @@
 #include <iostream>
 #include <fstream>
 #include <sstream>
+#include <algorithm>
+
+#include "xml2cpp.h"
+#include "generate_adaptor.h"
+#include "generate_proxy.h"
 
 using namespace std;
 using namespace DBus;
 
-static const char *tab = "    ";
-
-static const char *header = "\n\
-/*\n\
- *	This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!\n\
- */\n\
-\n\
-";
-
-static const char *dbus_includes = "\n\
-#include <dbus-c++/dbus.h>\n\
-\n\
-";
-
-typedef map<string,string> TypeCache;
+//typedef map<string,string> TypeCache;
 
 void usage(const char *argv0)
 {
@@ -60,22 +48,7 @@ void usage(const char *argv0)
 	exit(-1);
 }
 
-void underscorize(string &str)
-{
-	for (unsigned int i = 0; i < str.length(); ++i)
-	{
-		if (!isalpha(str[i]) && !isdigit(str[i])) str[i] = '_';
-	}
-}
-
-string stub_name(string name)
-{
-	underscorize(name);
-
-	return "_" + name + "_stub";
-}
-
-int char_to_atomic_type(char t)
+/*int char_to_atomic_type(char t)
 {
 	if (strchr("ybnqiuxtdsgavre", t))
 		return t;
@@ -83,894 +56,10 @@ int char_to_atomic_type(char t)
 	return DBUS_TYPE_INVALID;
 }
 
-const char *atomic_type_to_string(char t)
-{
-	static struct { char type; const char *name; } atos[] =
-	{
-		{ 'y', "uint8_t" },
-		{ 'b', "bool" },
-		{ 'n', "int16_t" },
-		{ 'q', "uint16_t" },
-		{ 'i', "int32_t" },
-		{ 'u', "uint32_t" },
-		{ 'x', "int64_t" },
-		{ 't', "uint64_t" },
-		{ 'd', "double" },
-		{ 's', "std::string" },
-		{ 'o', "::DBus::Path" },
-		{ 'g', "::DBus::Signature" },
-		{ 'v', "::DBus::Variant" },
-		{ '\0', "" }
-	};
-	int i;
-
-	for (i = 0; atos[i].type; ++i)
-	{
-		if (atos[i].type == t) break;
-	}
-	return atos[i].name;
-}
-
 bool is_atomic_type(const string &type)
 {
 	return type.length() == 1 && char_to_atomic_type(type[0]) != DBUS_TYPE_INVALID;
-}
-
-void _parse_signature(const string &signature, string &type, unsigned int &i)
-{
-	for (; i < signature.length(); ++i)
-	{
-		switch (signature[i])
-		{
-			case 'a':
-			{
-				switch (signature[++i])
-				{
-					case '{':
-					{
-						type += "std::map< ";
-
-						const char *atom = atomic_type_to_string(signature[++i]);
-						if (!atom)
-						{
-							cerr << "invalid signature" << endl;
-							exit(-1);
-						}
-						type += atom;
-						type += ", ";
-						++i;
-						break;
-					}
-					default:
-					{
-						type += "std::vector< ";
-						break;
-					}
-				}
-				_parse_signature(signature, type, i);
-				type += " >";
-				continue;
-			}
-			case '(':	
-			{
-				type += "::DBus::Struct< ";
-				++i;
-				_parse_signature(signature, type, i);
-				type += " >";
-				if (signature[i+1])
-				{
-					type += ", ";
-				}
-				continue;
-			}
-			case ')':
-			case '}':	
-			{
-				return;
-			}
-			default:
-			{
-				const char *atom = atomic_type_to_string(signature[i]);
-				if (!atom)
-				{
-					cerr << "invalid signature" << endl;
-					exit(-1);
-				}
-				type += atom;
-
-				if (signature[i+1] != ')' && signature[i+1] != '}' && i+1 < signature.length())
-				{
-					type += ", ";
-				}
-				break;
-			}
-		}
-	}
-}
-
-string signature_to_type(const string &signature)
-{
-	string type;
-	unsigned int i = 0;
-	_parse_signature(signature, type, i);
-	return type;
-}
-
-void generate_proxy(Xml::Document &doc, const char *filename)
-{
-	cerr << "writing " << filename << endl;
-
-	ofstream file(filename);
-	if (file.bad())
-	{
-		cerr << "unable to write file " << filename << endl;
-		exit(-1);
-	}
-
-	file << header;
-	string filestring = filename;
-	underscorize(filestring);
-
-	string cond_comp = "__dbusxx__" + filestring + "__PROXY_MARSHAL_H";
-
-	file << "#ifndef " << cond_comp << endl;
-	file << "#define " << cond_comp << endl;
-
-	file << dbus_includes;
-
-	Xml::Node &root = *(doc.root);
-	Xml::Nodes interfaces = root["interface"];
-
-	for (Xml::Nodes::iterator i = interfaces.begin(); i != interfaces.end(); ++i)
-	{
-		Xml::Node &iface = **i;
-		Xml::Nodes methods = iface["method"];
-		Xml::Nodes signals = iface["signal"];
-		Xml::Nodes properties = iface["property"];
-		Xml::Nodes ms;
-		ms.insert(ms.end(), methods.begin(), methods.end());
-		ms.insert(ms.end(), signals.begin(), signals.end());
-
-		string ifacename = iface.get("name");
-		if (ifacename == "org.freedesktop.DBus.Introspectable"
-		 ||ifacename == "org.freedesktop.DBus.Properties")
-		{
-			cerr << "skipping interface " << ifacename << endl;
-			continue;
-		}
-
-		istringstream ss(ifacename);
-		string nspace;
-		unsigned int nspaces = 0;
-
-		while (ss.str().find('.', ss.tellg()) != string::npos)
-		{
-			getline(ss, nspace, '.');
-
-			file << "namespace " << nspace << " {" << endl;
-
-			++nspaces;
-		}
-		file << endl;
-
-		string ifaceclass;
-
-		getline(ss, ifaceclass);
-
-		ifaceclass += "_proxy";
-
-		cerr << "generating code for interface " << ifacename << "..." << endl;
-
-		file << "class " << ifaceclass << endl
-		     << " : public ::DBus::InterfaceProxy" << endl
-		     << "{" << endl
-		     << "public:" << endl
-		     << endl
-		     << tab << ifaceclass << "()" << endl
-		     << tab << ": ::DBus::InterfaceProxy(\"" << ifacename << "\")" << endl
-		     << tab << "{" << endl;
-
-		for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
-		{
-			Xml::Node &signal = **si;
-
-			string marshname = "_" + signal.get("name") + "_stub";
-
-			file << tab << tab << "connect_signal(" 
-			     << ifaceclass << ", " << signal.get("name") << ", " << stub_name(signal.get("name"))
-			     << ");" << endl;
-		}
-
-		file << tab << "}" << endl
-		     << endl;
-/// write properties
-		file << "public:" << endl << endl
-		     << tab << "/* properties exported by this interface */" << endl;
-
-		for (Xml::Nodes::iterator pi = properties.begin ();
-		     pi != properties.end (); ++pi)
-		{
-			Xml::Node & property = **pi;
-			string prop_name = property.get ("name");
-			string property_access = property.get ("access");
-			if (property_access == "read" || property_access == "readwrite")
-			{
-				file << tab << tab << "const " << signature_to_type (property.get("type"))
-				     << " " << prop_name << "() {" << endl;
-				file << tab << tab << tab << "::DBus::CallMessage call ;\n ";
-				file << tab << tab << tab
-				     << "call.member(\"Get\"); call.interface(\"org.freedesktop.DBus.Properties\");"
-				     << endl;
-				file << tab << tab << tab
-				     << "::DBus::MessageIter wi = call.writer(); " << endl;
-				file << tab << tab << tab
-				     << "const std::string interface_name = \"" << ifacename << "\";"
-				     << endl;
-				file << tab << tab << tab
-				     << "const std::string property_name  = \"" << prop_name << "\";"
-				     << endl;
-				file << tab << tab << tab << "wi << interface_name;" << endl;
-				file << tab << tab << tab << "wi << property_name;" << endl;
-				file << tab << tab << tab
-				     << "::DBus::Message ret = this->invoke_method (call);" << endl;
-				file << tab << tab << tab
-				     << "::DBus::MessageIter ri = ret.reader ();" << endl;
-				file << tab << tab << tab << "::DBus::Variant argout; " << endl;
-				file << tab << tab << tab << "ri >> argout;" << endl;
-				file << tab << tab << tab << "return argout;" << endl;
-				file << tab << tab << "};" << endl;
-			}
-
-			if (property_access == "write" || property_access == "readwrite")
-			{
-				file << tab << tab << "void " << prop_name << "( const "<< signature_to_type (property.get("type")) << " & input" << ") {" << endl;
-				file << tab << tab << tab << "::DBus::CallMessage call ;\n ";
-				file << tab << tab << tab <<"call.member(\"Set\");  call.interface( \"org.freedesktop.DBus.Properties\");"<< endl;
-				file << tab << tab << tab <<"::DBus::MessageIter wi = call.writer(); " << endl;
-				file << tab << tab << tab <<"::DBus::Variant value;" << endl;
-				file << tab << tab << tab <<"::DBus::MessageIter vi = value.writer ();" << endl;
-				file << tab << tab << tab <<"vi << input;" << endl;
-				file << tab << tab << tab <<"const std::string interface_name = \"" << ifacename << "\";" << endl;
-				file << tab << tab << tab <<"const std::string property_name  = \"" << prop_name << "\";"<< endl;
-				file << tab << tab << tab <<"wi << interface_name;" << endl;
-				file << tab << tab << tab <<"wi << property_name;" << endl;
-				file << tab << tab << tab <<"wi << value;" << endl;
-				file << tab << tab << tab <<"::DBus::Message ret = this->invoke_method (call);" << endl;
-				file << tab << tab << "};" << endl;
-            }
-		}
-
-		file << "public:" << endl
-		     << endl
-		     << tab << "/* methods exported by this interface," << endl
-		     << tab << " * this functions will invoke the corresponding methods on the remote objects" << endl
-		     << tab << " */" << endl;
-
-		for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
-		{
-			Xml::Node &method = **mi;
-			Xml::Nodes args = method["arg"];
-			Xml::Nodes args_in = args.select("direction","in");
-			Xml::Nodes args_out = args.select("direction","out");
-
-			if (args_out.size() == 0 || args_out.size() > 1)
-			{
-				file << tab << "void ";
-			}
-			else if (args_out.size() == 1)
-			{
-				file << tab << signature_to_type(args_out.front()->get("type")) << " ";
-			}
-
-			file << method.get("name") << "(";
-			
-			unsigned int i = 0;
-			for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
-			{
-				Xml::Node &arg = **ai;
-				file << "const " << signature_to_type(arg.get("type")) << "& ";
-
-				string arg_name = arg.get("name");
-				if (arg_name.length())
-					file << arg_name;
-				else
-					file << "argin" << i;
-
-				if ((i+1 != args_in.size() || args_out.size() > 1))
-					file << ", ";
-			}
-
-			if (args_out.size() > 1)
-			{
-				unsigned int i = 0;
-				for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
-				{
-					Xml::Node &arg = **ao;
-					file << signature_to_type(arg.get("type")) << "&";
-
-					string arg_name = arg.get("name");
-					if (arg_name.length())
-						file << " " << arg_name;
-					else
-						file << " argout" << i;
-
-					if (i+1 != args_out.size())
-						file << ", ";
-				}
-			}
-			file << ")" << endl;
-
-			file << tab << "{" << endl
-			     << tab << tab << "::DBus::CallMessage call;" << endl;
-
-			if (args_in.size() > 0)
-			{
-				file << tab << tab << "::DBus::MessageIter wi = call.writer();" << endl
-				     << endl;
-			}
-
-			unsigned int j = 0;
-			for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++j)
-			{
-				Xml::Node &arg = **ai;
-				string arg_name = arg.get("name");
-				if (arg_name.length())
-					file << tab << tab << "wi << " << arg_name << ";" << endl;
-				else
-					file << tab << tab << "wi << argin" << j << ";" << endl;
-			}
-
-			file << tab << tab << "call.member(\"" << method.get("name") << "\");" << endl
-			     << tab << tab << "::DBus::Message ret = invoke_method(call);" << endl;
-
-
-			if (args_out.size() > 0)
-			{
-				file << tab << tab << "::DBus::MessageIter ri = ret.reader();" << endl
-				     << endl;
-			}
-
-			if (args_out.size() == 1)
-			{
-				file << tab << tab << signature_to_type(args_out.front()->get("type")) << " argout;" << endl;
-				file << tab << tab << "ri >> argout;" << endl;
-				file << tab << tab << "return argout;" << endl;
-			}
-			else if (args_out.size() > 1)
-			{
-				unsigned int i = 0;
-				for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
-				{
-					Xml::Node &arg = **ao;
-
-					string arg_name = arg.get("name");
-					if (arg_name.length())
-						file << tab << tab << "ri >> " << arg.get("name") << ";" << endl;
-					else
-						file << tab << tab << "ri >> argout" << i << ";" << endl;
-				}
-			}
-
-			file << tab << "}" << endl
-			     << endl;
-		}
-
-		file << endl
-		     << "public:" << endl
-		     << endl
-		     << tab << "/* signal handlers for this interface" << endl
-		     << tab << " */" << endl;
-
-		for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
-		{
-			Xml::Node &signal = **si;
-			Xml::Nodes args = signal["arg"];
-
-			file << tab << "virtual void " << signal.get("name") << "(";
-
-			unsigned int i = 0;
-			for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++i)
-			{
-				Xml::Node &arg = **ai;
-				file << "const " << signature_to_type(arg.get("type")) << "& ";
-
-				string arg_name = arg.get("name");
-				if (arg_name.length())
-					file << arg_name;
-				else
-					file << "argin" << i;
-
-				if ((ai+1 != args.end()))
-					file << ", ";
-			}
-			file << ") = 0;" << endl;
-		}
-
-		file << endl
-		     << "private:" << endl
-		     << endl
-		     << tab << "/* unmarshalers (to unpack the DBus message before calling the actual signal handler)" << endl
-		     << tab << " */" << endl;
-
-		for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
-		{
-			Xml::Node &signal = **si;
-			Xml::Nodes args = signal["arg"];
-
-			file << tab << "void " << stub_name(signal.get("name")) << "(const ::DBus::SignalMessage &sig)" << endl
-			     << tab << "{" << endl;
-
-			if (args.size() > 0)
-			{
-				file << tab << tab << "::DBus::MessageIter ri = sig.reader();" << endl
-				     << endl;
-			}
-
-			unsigned int i = 0;
-			for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++i)
-			{
-				Xml::Node &arg = **ai;
-				file << tab << tab << signature_to_type(arg.get("type")) << " " ;
-
-				string arg_name = arg.get("name");
-				if (arg_name.length())
-					file << arg_name << ";" << " ri >> " << arg_name << ";" << endl;
-				else
-					file << "arg" << i << ";" << " ri >> " << "arg" << i << ";" << endl;
-			}
-
-			file << tab << tab << signal.get("name") << "(";
-
-			unsigned int j = 0;
-			for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++j)
-			{
-				Xml::Node &arg = **ai;
-
-				string arg_name = arg.get("name");
-				if (arg_name.length())
-					file << arg_name;
-				else
-					file << "arg" << j;
-
-				if (ai+1 != args.end())
-					file << ", ";
-			}
-
-			file << ");" << endl;
-
-			file << tab << "}" << endl;
-		}
-
-
-		file << "};" << endl
-		     << endl;
-
-		for (unsigned int i = 0; i < nspaces; ++i)
-		{
-			file << "} ";
-		}
-		file << endl;
-	}
-
-	file << "#endif//" << cond_comp << endl;
-
-	file.close();
-}
-
-void generate_adaptor(Xml::Document &doc, const char *filename)
-{
-	cerr << "writing " << filename << endl;
-
-	ofstream file(filename);
-	if (file.bad())
-	{
-		cerr << "unable to write file " << filename << endl;
-		exit(-1);
-	}
-
-	file << header;
-	string filestring = filename;
-	underscorize(filestring);
-
-	string cond_comp = "__dbusxx__" + filestring + "__ADAPTOR_MARSHAL_H";
-
-	file << "#ifndef " << cond_comp << endl
-	     << "#define " << cond_comp << endl;
-
-	file << dbus_includes;
-
-	Xml::Node &root = *(doc.root);
-	Xml::Nodes interfaces = root["interface"];
-
-	for (Xml::Nodes::iterator i = interfaces.begin(); i != interfaces.end(); ++i)
-	{
-		Xml::Node &iface = **i;
-		Xml::Nodes methods = iface["method"];
-		Xml::Nodes signals = iface["signal"];
-		Xml::Nodes properties = iface["property"];
-		Xml::Nodes ms;
-		ms.insert(ms.end(), methods.begin(), methods.end());
-		ms.insert(ms.end(), signals.begin(), signals.end());
-
-		string ifacename = iface.get("name");
-		if (ifacename == "org.freedesktop.DBus.Introspectable"
-		 ||ifacename == "org.freedesktop.DBus.Properties")
-		{
-			cerr << "skipping interface " << ifacename << endl;
-			continue;
-		}
-
-		istringstream ss(ifacename);
-		string nspace;
-		unsigned int nspaces = 0;
-
-		while (ss.str().find('.', ss.tellg()) != string::npos)
-		{
-			getline(ss, nspace, '.');
-
-			file << "namespace " << nspace << " {" << endl;
-
-			++nspaces;
-		}
-		file << endl;
-
-		string ifaceclass;
-
-		getline(ss, ifaceclass);
-
-		ifaceclass += "_adaptor";
-
-		cerr << "generating code for interface " << ifacename << "..." << endl;
-
-		file << "class " << ifaceclass << endl
-		     << ": public ::DBus::InterfaceAdaptor" << endl
-		     << "{" << endl
-		     << "public:" << endl
-		     << endl
-		     << tab << ifaceclass << "()" << endl
-		     << tab << ": ::DBus::InterfaceAdaptor(\"" << ifacename << "\")" << endl
-		     << tab << "{" << endl;
-
-		for (Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi)
-		{
-			Xml::Node &property = **pi;
-
-			file << tab << tab << "bind_property("
-			     << property.get("name") << ", "
-			     << "\"" << property.get("type") << "\", "
-			     << (property.get("access").find("read") != string::npos
-				? "true"
-				: "false")
-			     << ", "
-			     << (property.get("access").find("write") != string::npos
-				? "true"
-				: "false")
-			     << ");" << endl;
-		}
-
-		for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
-		{
-			Xml::Node &method = **mi;
-
-			file << tab << tab << "register_method(" 
-			     << ifaceclass << ", " << method.get("name") << ", "<< stub_name(method.get("name")) 
-			     << ");" << endl;
-		}
-
-		file << tab << "}" << endl
-		     << endl;
-
-		file << tab << "::DBus::IntrospectedInterface *const introspect() const " << endl
-		     << tab << "{" << endl;
-
-		for (Xml::Nodes::iterator mi = ms.begin(); mi != ms.end(); ++mi)
-		{
-			Xml::Node &method = **mi;
-			Xml::Nodes args = method["arg"];
-
-			file << tab << tab << "static ::DBus::IntrospectedArgument " << method.get("name") << "_args[] = " << endl
-			     << tab << tab << "{" << endl;
-
-			for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai)
-			{
-				Xml::Node &arg = **ai;
-
-				file << tab << tab << tab << "{ ";
-
-				if (arg.get("name").length())
-				{
-					file << "\"" << arg.get("name") << "\", ";
-				}
-				else
-				{
-					file << "0, ";
-				}
-				file << "\"" << arg.get("type") << "\", "
-				     << (arg.get("direction") == "in" ? "true" : "false")
-				     << " }," << endl;
-			}
-			file << tab << tab << tab << "{ 0, 0, 0 }" << endl
-			     << tab << tab << "};" << endl;
-		}
-
-		file << tab << tab << "static ::DBus::IntrospectedMethod " << ifaceclass << "_methods[] = " << endl
-		     << tab << tab << "{" << endl;
-
-		for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
-		{
-			Xml::Node &method = **mi;
-			
-			file << tab << tab << tab << "{ \"" << method.get("name") << "\", " << method.get("name") << "_args }," << endl;
-		}
-
-		file << tab << tab << tab << "{ 0, 0 }" << endl
-		     << tab << tab << "};" << endl;
-
-		file << tab << tab << "static ::DBus::IntrospectedMethod " << ifaceclass << "_signals[] = " << endl
-		     << tab << tab << "{" << endl;
-
-		for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
-		{
-			Xml::Node &method = **si;
-			
-			file << tab << tab << tab << "{ \"" << method.get("name") << "\", " << method.get("name") << "_args }," << endl;
-		}
-
-		file << tab << tab << tab << "{ 0, 0 }" << endl
-		     << tab << tab << "};" << endl;
-
-		file << tab << tab << "static ::DBus::IntrospectedProperty " << ifaceclass << "_properties[] = " << endl
-		     << tab << tab << "{" << endl;
-
-		for (Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi)
-		{
-			Xml::Node &property = **pi;
-
-			file << tab << tab << tab << "{ "
-				<< "\"" << property.get("name") << "\", "
-				<< "\"" << property.get("type") << "\", "
-				<< (property.get("access").find("read") != string::npos
-				   ? "true"
-				   : "false")
-				<< ", "
-				<< (property.get("access").find("write") != string::npos
-				   ? "true"
-				   : "false")
-				<< " }," << endl;
-		}
-
-
-		file << tab << tab << tab << "{ 0, 0, 0, 0 }" << endl
-		     << tab << tab << "};" << endl;
-
-		file << tab << tab << "static ::DBus::IntrospectedInterface " << ifaceclass << "_interface = " << endl
-		     << tab << tab << "{" << endl
-		     << tab << tab << tab << "\"" << ifacename << "\"," << endl 
-		     << tab << tab << tab << ifaceclass << "_methods," << endl
-		     << tab << tab << tab << ifaceclass << "_signals," << endl
-		     << tab << tab << tab << ifaceclass << "_properties" << endl
-		     << tab << tab << "};" << endl
-		     << tab << tab << "return &" << ifaceclass << "_interface;" << endl 
-		     << tab << "}" << endl
-		     << endl;
-
-		file << "public:" << endl
-		     << endl
-		     << tab << "/* properties exposed by this interface, use" << endl
-		     << tab << " * property() and property(value) to get and set a particular property" << endl
-		     << tab << " */" << endl;
-
-		for (Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi)
-		{
-			Xml::Node &property = **pi;
-			string name = property.get("name");
-			string type = property.get("type");
-			string type_name = signature_to_type(type);
-
-			file << tab << "::DBus::PropertyAdaptor< " << type_name << " > " << name << ";" << endl;
-		}
-
-		file << endl;
-
-		file << "public:" << endl
-		     << endl
-		     << tab << "/* methods exported by this interface," << endl
-		     << tab << " * you will have to implement them in your ObjectAdaptor" << endl
-		     << tab << " */" << endl;
-
-		for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
-		{
-			Xml::Node &method = **mi;
-			Xml::Nodes args = method["arg"];
-			Xml::Nodes args_in = args.select("direction","in");
-			Xml::Nodes args_out = args.select("direction","out");
-
-			file << tab << "virtual ";
-
-			if (args_out.size() == 0 || args_out.size() > 1)
-			{
-				file << "void ";
-			}
-			else if (args_out.size() == 1)
-			{
-				file << signature_to_type(args_out.front()->get("type")) << " ";
-			}
-
-			file << method.get("name") << "(";
-			
-			unsigned int i = 0;
-			for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
-			{
-				Xml::Node &arg = **ai;
-				file << "const " << signature_to_type(arg.get("type")) << "& ";
-
-				string arg_name = arg.get("name");
-				if (arg_name.length())
-					file << arg_name;
-
-				if ((i+1 != args_in.size() || args_out.size() > 1))
-					file << ", ";
-			}
-
-			if (args_out.size() > 1)
-			{
-				unsigned int i = 0;
-				for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
-				{
-					Xml::Node &arg = **ao;
-					file << signature_to_type(arg.get("type")) << "&";
-
-					string arg_name = arg.get("name");
-					if (arg_name.length())
-						file << " " << arg_name;
-
-					if (i+1 != args_out.size())
-						file << ", ";
-				}		
-			}
-			file << ") = 0;" << endl;
-		}
-
-		file << endl
-		     << "public:" << endl
-		     << endl
-		     << tab << "/* signal emitters for this interface" << endl
-		     << tab << " */" << endl;
-
-		for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
-		{
-			Xml::Node &signal = **si;
-			Xml::Nodes args = signal["arg"];
-
-			file << tab << "void " << signal.get("name") << "(";
-
-			unsigned int i = 0;
-			for (Xml::Nodes::iterator a = args.begin(); a != args.end(); ++a, ++i)
-			{
-				Xml::Node &arg = **a;
-
-				file << "const " << signature_to_type(arg.get("type")) << "& arg" << i+1;
-
-				if (i+1 != args.size())
-					file << ", ";
-			}
-
-			file << ")" << endl
-			     << tab << "{" << endl
-			     << tab << tab << "::DBus::SignalMessage sig(\"" << signal.get("name") <<"\");" << endl;;
-
-
-			if (args.size() > 0)
-			{
-				file << tab << tab << "::DBus::MessageIter wi = sig.writer();" << endl;
-
-				for (unsigned int i = 0; i < args.size(); ++i)
-				{
-					file << tab << tab << "wi << arg" << i+1 << ";" << endl;
-				}
-			}
-
-			file << tab << tab << "emit_signal(sig);" << endl
-			     << tab << "}" << endl;
-		}
-
-		file << endl
-		     << "private:" << endl
-		     << endl
-		     << tab << "/* unmarshalers (to unpack the DBus message before calling the actual interface method)" << endl
-		     << tab << " */" << endl;
-
-		for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
-		{
-			Xml::Node &method = **mi;
-			Xml::Nodes args = method["arg"];
-			Xml::Nodes args_in = args.select("direction","in");
-			Xml::Nodes args_out = args.select("direction","out");
-
-			file << tab << "::DBus::Message " << stub_name(method.get("name")) << "(const ::DBus::CallMessage &call)" << endl
-			     << tab << "{" << endl
-			     << tab << tab << "::DBus::MessageIter ri = call.reader();" << endl
-			     << endl;
-
-			unsigned int i = 1;
-			for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
-			{
-				Xml::Node &arg = **ai;
-				file << tab << tab << signature_to_type(arg.get("type")) << " argin" << i << ";"
-				     << " ri >> argin" << i << ";" << endl;
-			}
-
-			if (args_out.size() == 0)
-			{
-				file << tab << tab;
-			}
-			else if (args_out.size() == 1)
-			{
-				file << tab << tab << signature_to_type(args_out.front()->get("type")) << " argout1 = ";
-			}
-			else
-			{
-				unsigned int i = 1;
-				for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
-				{
-					Xml::Node &arg = **ao;
-					file << tab << tab << signature_to_type(arg.get("type")) << " argout" << i << ";" << endl;
-				}		
-				file << tab << tab;
-			}
-
-			file << method.get("name") << "(";
-
-			for (unsigned int i = 0; i < args_in.size(); ++i)
-			{
-				file << "argin" << i+1;
-
-				if ((i+1 != args_in.size() || args_out.size() > 1))
-					file << ", ";
-			}
-
-			if (args_out.size() > 1)
-			for (unsigned int i = 0; i < args_out.size(); ++i)
-			{
-				file << "argout" << i+1;
-
-				if (i+1 != args_out.size())
-					file << ", ";
-			}
-
-			file << ");" << endl;
-
-			file << tab << tab << "::DBus::ReturnMessage reply(call);" << endl;
-
-			if (args_out.size() > 0)
-			{
-				file << tab << tab << "::DBus::MessageIter wi = reply.writer();" << endl;
-
-				for (unsigned int i = 0; i < args_out.size(); ++i)
-				{
-					file << tab << tab << "wi << argout" << i+1 << ";" << endl;
-				}
-			}
-
-			file << tab << tab << "return reply;" << endl;
-
-			file << tab << "}" << endl;
-		}
-
-		file << "};" << endl
-		     << endl;
-
-		for (unsigned int i = 0; i < nspaces; ++i)
-		{
-			file << "} ";
-		}
-		file << endl;
-	}
-
-	file << "#endif//" << cond_comp << endl;
-
-	file.close();
-}
+}*/
 
 int main(int argc, char ** argv)
 {
diff --git a/sflphone-common/libs/pjproject-1.0.1/autogen.sh b/sflphone-common/libs/pjproject-1.0.1/autogen.sh
new file mode 100755
index 0000000000000000000000000000000000000000..ec81ce55038b52adf0f01cb501eaa73954d61011
--- /dev/null
+++ b/sflphone-common/libs/pjproject-1.0.1/autogen.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+#####################################################
+# File Name: autogen.sh
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-26
+# Last Modified: 2009-06-01 18:25:28 -0400
+#####################################################
+
+if [ -e /usr/share/misc/config.guess ]; then
+	rm -f config.sub config.guess
+        ln -s /usr/share/misc/config.sub .
+        ln -s /usr/share/misc/config.guess .	
+elif [ -e /usr/lib/rpm/config.guess ]; then
+	rm -f config.sub config.guess
+	ln -s /usr/lib/rpm/config.sub .
+	ln -s /usr/lib/rpm/config.guess .
+else
+	aclocal --force
+	automake --add-missing --force-missing --copy	
+fi
+
+# now we launch configure
+./configure $@
+
+exit 0
diff --git a/sflphone-common/libs/pjproject-1.0.1/config.guess b/sflphone-common/libs/pjproject-1.0.1/config.guess
deleted file mode 100755
index dff9e481b70f9505b49ce999629a168a19976f4f..0000000000000000000000000000000000000000
--- a/sflphone-common/libs/pjproject-1.0.1/config.guess
+++ /dev/null
@@ -1,1317 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-#   Free Software Foundation, Inc.
-
-timestamp='2001-09-04'
-
-# 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
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Written by Per Bothner <bothner@cygnus.com>.
-# Please send patches to <config-patches@gnu.org>.
-#
-# 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.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-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."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
-    --version | -v )
-       echo "$version" ; exit 0 ;;
-    --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script.
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int dummy(){}" > $dummy.c ;
-	for c in cc gcc c89 ; do
-	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
-	  if test $? = 0 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	rm -f $dummy.c $dummy.o $dummy.rel ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# Netbsd (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	# Determine the machine/vendor (is the vendor relevant).
-	case "${UNAME_MACHINE}" in
-	    amiga) machine=m68k-unknown ;;
-	    arm32) machine=arm-unknown ;;
-	    atari*) machine=m68k-atari ;;
-	    sun3*) machine=m68k-sun ;;
-	    mac68k) machine=m68k-apple ;;
-	    macppc) machine=powerpc-apple ;;
-	    hp3[0-9][05]) machine=m68k-hp ;;
-	    ibmrt|romp-ibm) machine=romp-ibm ;;
-	    *) machine=${UNAME_MACHINE}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE}" in
-	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-	        os=netbsd
-		;;
-	esac
-	# The OS release
-	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit 0 ;;
-    alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = "V4.0"; then
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	cat <<EOF >$dummy.s
-	.data
-\$Lformat:
-	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
-
-	.text
-	.globl main
-	.align 4
-	.ent main
-main:
-	.frame \$30,16,\$26,0
-	ldgp \$29,0(\$27)
-	.prologue 1
-	.long 0x47e03d80 # implver \$0
-	lda \$2,-1
-	.long 0x47e20c21 # amask \$2,\$1
-	lda \$16,\$Lformat
-	mov \$0,\$17
-	not \$1,\$18
-	jsr \$26,printf
-	ldgp \$29,0(\$26)
-	mov 0,\$16
-	jsr \$26,exit
-	.end main
-EOF
-	eval $set_cc_for_build
-	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
-	if test "$?" = 0 ; then
-		case `./$dummy` in
-			0-0)
-				UNAME_MACHINE="alpha"
-				;;
-			1-0)
-				UNAME_MACHINE="alphaev5"
-				;;
-			1-1)
-				UNAME_MACHINE="alphaev56"
-				;;
-			1-101)
-				UNAME_MACHINE="alphapca56"
-				;;
-			2-303)
-				UNAME_MACHINE="alphaev6"
-				;;
-			2-307)
-				UNAME_MACHINE="alphaev67"
-				;;
-			2-1307)
-				UNAME_MACHINE="alphaev68"
-				;;
-		esac
-	fi
-	rm -f $dummy.s $dummy
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit 0 ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit 0 ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit 0;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
-    arc64:OpenBSD:*:*)
-	echo mips64el-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hkmips:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit 0 ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit 0 ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit 0 ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit 0 ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    sparc*:NetBSD:*)
-	echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    atari*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
-    sun3*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy \
-	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit 0 ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit 0 ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit 0 ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit 0 ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
- 	exit 0 ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit 0 ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit 0 ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit 0 ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit 0 ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-		rm -f $dummy.c $dummy
-		echo rs6000-ibm-aix3.2.5
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit 0 ;;
-    *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit 0 ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit 0 ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit 0 ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit 0 ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit 0 ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit 0 ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-              case "${HPUX_REV}" in
-                11.[0-9][0-9])
-                  if [ -x /usr/bin/getconf ]; then
-                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-                        esac ;;
-                    esac
-                  fi ;;
-              esac
-              if [ "${HP_ARCH}" = "" ]; then
-	      eval $set_cc_for_build
-              sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
-EOF
-	    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
-	    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
-	    rm -f $dummy.c $dummy
-	fi ;;
-	esac
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit 0 ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
-	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit 0 ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit 0 ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit 0 ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit 0 ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit 0 ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit 0 ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit 0 ;;
-    hppa*:OpenBSD:*:*)
-	echo hppa-unknown-openbsd
-	exit 0 ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit 0 ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit 0 ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit 0 ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit 0 ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit 0 ;;
-    CRAY*X-MP:*:*:*)
-	echo xmp-cray-unicos
-        exit 0 ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*T3D:*:*:*)
-	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY-2:*:*:*)
-	echo cray2-cray-unicos
-        exit 0 ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    *:FreeBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit 0 ;;
-    *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit 0 ;;
-    i*:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit 0 ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit 0 ;;
-    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
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i386-pc-interix
-	exit 0 ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit 0 ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit 0 ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    *:GNU:*:*)
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit 0 ;;
-    arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
-	exit 0 ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    mips:Linux:*:*)
-	case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
-	  big)    echo mips-unknown-linux-gnu && exit 0 ;;
-	  little) echo mipsel-unknown-linux-gnu && exit 0 ;;
-	esac
-	;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit 0 ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit 0 ;;
-    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 0 ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit 0 ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit 0 ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit 0 ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit 0 ;;
-    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.
-	ld_supported_targets=`cd /; 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 0 ;;		
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit 0 ;;
-	  "")
-		# 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 0 ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	cat >$dummy.c <<EOF
-#include <features.h>
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __ELF__
-# ifdef __GLIBC__
-#  if __GLIBC__ >= 2
-    printf ("%s-pc-linux-gnu\n", argv[1]);
-#  else
-    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-#  endif
-# else
-   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-# endif
-#else
-  printf ("%s-pc-linux-gnuaout\n", argv[1]);
-#endif
-  return 0;
-}
-EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
-	;;
-    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
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit 0 ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit 0 ;;
-    i*86:*:5:[78]*)
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit 0 ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit 0 ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit 0 ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit 0 ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit 0 ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit 0 ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit 0 ;;
-    M68*:*:R3V[567]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit 0 ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit 0 ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit 0 ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit 0 ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes@openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
-    *:*:*:FTX*)
-	# From seanf@swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit 0 ;;
-    *:VOS:*:*)
-	# From Paul.Green@stratus.com.
-	echo hppa1.1-stratus-vos
-	exit 0 ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit 0 ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit 0 ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit 0 ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit 0 ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit 0 ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
-    *:Darwin:*:*)
-	echo `uname -p`-apple-darwin${UNAME_RELEASE}
-	exit 0 ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	if test "${UNAME_MACHINE}" = "x86pc"; then
-		UNAME_MACHINE=pc
-	fi
-	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
-	exit 0 ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit 0 ;;
-    NSR-[KW]:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit 0 ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit 0 ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit 0 ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit 0 ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit 0 ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit 0 ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit 0 ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit 0 ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit 0 ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit 0 ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit 0 ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit 0 ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit 0 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit 0 ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit 0 ;;
-    c34*)
-	echo c34-convex-bsd
-	exit 0 ;;
-    c38*)
-	echo c38-convex-bsd
-	exit 0 ;;
-    c4*)
-	echo c4-convex-bsd
-	exit 0 ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-    ftp://ftp.gnu.org/pub/gnu/config/
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/sflphone-common/libs/pjproject-1.0.1/config.sub b/sflphone-common/libs/pjproject-1.0.1/config.sub
deleted file mode 100755
index 746ee208a175a4f263cc9a186f5dc8f420524274..0000000000000000000000000000000000000000
--- a/sflphone-common/libs/pjproject-1.0.1/config.sub
+++ /dev/null
@@ -1,1572 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-timestamp='2005-04-22'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# 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
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted 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.
-
-# 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.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-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."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
-    --version | -v )
-       echo "$version" ; exit 0 ;;
-    --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit 0;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
-  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-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)
-		os=
-		basic_machine=$1
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
- 	-chorusrdb)
- 		os=-chorusrdb
-		basic_machine=$1
- 		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-	| bfin \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
-	| mips64orion | mips64orionel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| msp430 \
-	| ns16k | ns32k \
-	| openrisc | or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-	| pyramid \
-	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b \
-	| strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
-	| we32k \
-	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k)
-		basic_machine=$basic_machine-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | craynv-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| msp430-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tron-* \
-	| v850-* | v850e-* | vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
-	| xstormy16-* | xtensa-* \
-	| ymp-* \
-	| z8k-*)
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-    	abacus)
-		basic_machine=abacus-unknown
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16c)
-		basic_machine=cr16c-unknown
-		os=-elf
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
-		;;
-	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	or32 | or32-*)
-		basic_machine=or32-unknown
-		os=-coff
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc)	basic_machine=powerpc-unknown
-		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
-		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
-		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	mmix)
-		basic_machine=mmix-knuth
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b)
-		basic_machine=sparc-sun
-		;;
-	cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	nios2*)
-		basic_machine=nios2-altera
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# 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* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto-qnx*)
-		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-        -os400*)
-		os=-os400
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-atheos*)
-		os=-atheos
-		;;
-	-syllable*)
-		os=-syllable
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-nova*)
-		os=-rtmk-nova
-		;;
-	-ns2 )
-		os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-        -tpf*)
-		os=-tpf
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
-		;;
-	-aros*)
-		os=-aros
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-    c4x-* | tic4x-*)
-        os=-coff
-        ;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=-tops20
-		;;
-	pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	or32-*)
-		os=-coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-ibm)
-		os=-aix
-		;;
-    	*-knuth)
-		os=-mmixware
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-	*-gould)
-		os=-sysv
-		;;
-	*-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-	*-sgi)
-		os=-irix
-		;;
-	*-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-os400*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-tpf*)
-				vendor=ibm
-				;;
-			-vxsim* | -vxworks* | -windiss*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/sflphone-common/libs/pjproject-1.0.1/configure.ac b/sflphone-common/libs/pjproject-1.0.1/configure.ac
new file mode 100644
index 0000000000000000000000000000000000000000..bf1644033a4f5cb86b7e9dc8e49804bfa092ee58
--- /dev/null
+++ b/sflphone-common/libs/pjproject-1.0.1/configure.ac
@@ -0,0 +1,5 @@
+dnl Dummy configure.ac for autotools
+
+AC_INIT
+LT_INIT
+AC_OUTPUT
diff --git a/sflphone-common/libs/stund/COPYING b/sflphone-common/libs/stund/COPYING
new file mode 100644
index 0000000000000000000000000000000000000000..bce8e8623fb6040913df4b5597679e5f86337cf3
--- /dev/null
+++ b/sflphone-common/libs/stund/COPYING
@@ -0,0 +1,50 @@
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
+ *
+ * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions 
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ *    and "Vovida Open Communication Application Library (VOCAL)" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact vocal@vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ *    may "VOCAL" appear in their name, without prior written
+ *    permission of Vovida Networks, Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * 
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc.  For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
+
+
diff --git a/sflphone-common/libs/stund/stun.cxx b/sflphone-common/libs/stund/stun.cxx
index 3343d6214bb403a0ed91751f8d1928a026d6baf8..33cb2e79cc6153bed7772f7495bdb10c52c3dd6c 100644
--- a/sflphone-common/libs/stund/stun.cxx
+++ b/sflphone-common/libs/stund/stun.cxx
@@ -1,3 +1,53 @@
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
+ *
+ * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions 
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ *    and "Vovida Open Communication Application Library (VOCAL)" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact vocal@vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ *    may "VOCAL" appear in their name, without prior written
+ *    permission of Vovida Networks, Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * 
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc.  For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
+
+
 #include <cassert>
 #include <cstring>
 #include <iostream>
@@ -2387,57 +2437,6 @@ stunOpenSocketPair( StunAddress4& dest, StunAddress4* mapAddr,
 	
    return false;
 }
-
-/* ====================================================================
- * The Vovida Software License, Version 1.0 
- * 
- * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 
- * 3. The names "VOCAL", "Vovida Open Communication Application Library",
- *    and "Vovida Open Communication Application Library (VOCAL)" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact vocal@vovida.org.
- *
- * 4. Products derived from this software may not be called "VOCAL", nor
- *    may "VOCAL" appear in their name, without prior written
- *    permission of Vovida Networks, Inc.
- * 
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
- * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
- * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
- * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- * 
- * ====================================================================
- * 
- * This software consists of voluntary contributions made by Vovida
- * Networks, Inc. and many individuals on behalf of Vovida Networks,
- * Inc.  For more information on Vovida Networks, Inc., please see
- * <http://www.vovida.org/>.
- *
- */
-
 // Local Variables:
 // mode:c++
 // c-file-style:"ellemtel"
diff --git a/sflphone-common/libs/stund/stun.h b/sflphone-common/libs/stund/stun.h
index cd4882f0c0f3549332d28f56de1cbe240c001cf5..c67b7014f57ff4f340e92dc70cd83bf62b1b1776 100644
--- a/sflphone-common/libs/stund/stun.h
+++ b/sflphone-common/libs/stund/stun.h
@@ -1,3 +1,54 @@
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
+ *
+ * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions 
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ *    and "Vovida Open Communication Application Library (VOCAL)" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact vocal@vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ *    may "VOCAL" appear in their name, without prior written
+ *    permission of Vovida Networks, Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * 
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc.  For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
+
+
+
 #ifndef STUN_H
 #define STUN_H
 
@@ -330,11 +381,6 @@ stunOpenSocketPair( StunAddress4& dest, StunAddress4* mappedAddr,
 #endif
 
 
-/* ====================================================================
- * The Vovida Software License, Version 1.0 
 * 
 * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 * 
 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
 *    and "Vovida Open Communication Application Library (VOCAL)" must
 *    not be used to endorse or promote products derived from this
 *    software without prior written permission. For written
 *    permission, please contact vocal@vovida.org.
 *
 * 4. Products derived from this software may not be called "VOCAL", nor
 *    may "VOCAL" appear in their name, without prior written
 *    permission of Vovida Networks, Inc.
 * 
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
 * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 * 
 * ====================================================================
 * 
 * This software consists of voluntary contributions made by Vovida
 * Networks, Inc. and many individuals on behalf of Vovida Networks,
 * Inc.  For more information on Vovida Networks, Inc., please see
 * <http://www.vovida.org/>.
- *
- */
-
 // Local Variables:
 // mode:c++
 // c-file-style:"ellemtel"
diff --git a/sflphone-common/libs/stund/udp.cxx b/sflphone-common/libs/stund/udp.cxx
index fc58f26bf83d1b016f4d25bb2d976d8ea8b0dffd..23f3aaadc6d8b567189b855e74a69fa70d2661d3 100644
--- a/sflphone-common/libs/stund/udp.cxx
+++ b/sflphone-common/libs/stund/udp.cxx
@@ -1,3 +1,55 @@
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
+ * 
+ * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ *    and "Vovida Open Communication Application Library (VOCAL)" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact vocal@vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ *    may "VOCAL" appear in their name, without prior written
+ *    permission of Vovida Networks, Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * 
+ * ====================================================================
+ * 
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc.  For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
+
+
+
 #include <cassert>
 #include <cstdio>
 #include <cstring>
@@ -290,57 +342,6 @@ initNetwork()
 #endif
 }
 
-
-/* ====================================================================
- * The Vovida Software License, Version 1.0 
- * 
- * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 
- * 3. The names "VOCAL", "Vovida Open Communication Application Library",
- *    and "Vovida Open Communication Application Library (VOCAL)" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact vocal@vovida.org.
- *
- * 4. Products derived from this software may not be called "VOCAL", nor
- *    may "VOCAL" appear in their name, without prior written
- *    permission of Vovida Networks, Inc.
- * 
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
- * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
- * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
- * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- * 
- * ====================================================================
- * 
- * This software consists of voluntary contributions made by Vovida
- * Networks, Inc. and many individuals on behalf of Vovida Networks,
- * Inc.  For more information on Vovida Networks, Inc., please see
- * <http://www.vovida.org/>.
- *
- */
-
 // Local Variables:
 // mode:c++
 // c-file-style:"ellemtel"
diff --git a/sflphone-common/libs/stund/udp.h b/sflphone-common/libs/stund/udp.h
index 28af798d180c0ac2c7441d6ade2c03008c04dfc8..8eeb8fb88d4dcceee3ac7abddb4e8359e789ffdd 100644
--- a/sflphone-common/libs/stund/udp.h
+++ b/sflphone-common/libs/stund/udp.h
@@ -1,3 +1,55 @@
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
+ * 
+ * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 
+ * 3. The names "VOCAL", "Vovida Open Communication Application Library",
+ *    and "Vovida Open Communication Application Library (VOCAL)" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact vocal@vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ *    may "VOCAL" appear in their name, without prior written
+ *    permission of Vovida Networks, Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * 
+ * ====================================================================
+ * 
+ * This software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc.  For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
+
+
+
 #ifndef udp_h
 #define udp_h
 
@@ -96,57 +148,6 @@ sendMessage( int fd, char* msg, int len,
 void
 initNetwork();
 
-
-/* ====================================================================
- * The Vovida Software License, Version 1.0 
- * 
- * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 
- * 3. The names "VOCAL", "Vovida Open Communication Application Library",
- *    and "Vovida Open Communication Application Library (VOCAL)" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact vocal@vovida.org.
- *
- * 4. Products derived from this software may not be called "VOCAL", nor
- *    may "VOCAL" appear in their name, without prior written
- *    permission of Vovida Networks, Inc.
- * 
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
- * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
- * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
- * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- * 
- * ====================================================================
- * 
- * This software consists of voluntary contributions made by Vovida
- * Networks, Inc. and many individuals on behalf of Vovida Networks,
- * Inc.  For more information on Vovida Networks, Inc., please see
- * <http://www.vovida.org/>.
- *
- */
-
 // Local Variables:
 // mode:c++
 // c-file-style:"ellemtel"
diff --git a/sflphone-common/platform/fedora.spec.in b/sflphone-common/platform/fedora.spec.in
deleted file mode 100644
index 6267600c783adeb1f44c53203890a6e55c41f0b2..0000000000000000000000000000000000000000
--- a/sflphone-common/platform/fedora.spec.in
+++ /dev/null
@@ -1,106 +0,0 @@
-%define name sflphone
-%define version @VERSION@
-Autoreq: 0
-
-Name:		%name
-Summary:	A VoIP daemon with SIP protocol and IAX protocol
-Version:	%version
-Release:        2fedora
-License:	GPL
-Group:		System Environment/Daemons
-URL:		http://www.sflphone.org/
-Packager:	Emmanuel Milou <emmanuel.milouu@savoirfairelinux.com>
-Source0:	%{name}-%{version}.tar.gz
-Source1:        libpj-sfl.pc
-BuildRoot:	%{_tmppath}/%{name}-%{version}
-Requires: 	commoncpp2 ccrtp cppunit libsamplerate pulseaudio-libs-zeroconf pulseaudio-libs-devel gsm speex  libgcc dbus-glib expat gtk2 glibc glib2 dbus-libs dbus-glib libsexy libnotify perl
-
-%description
-SFLphoned is a VoIP daeamon with SIP protocol and IAX protocol.
-
-%prep
-%setup -q
-cd libs/pjproject-1.0.1
-./configure --prefix=/usr
-make dep
-make clean
-make
-cd ../dbus-c++
-./configure --prefix=/usr
-make
-cd ../libiax2
-./gen.sh 
-./configure --prefix=/usr
-make
-cd ../..
-
-%build
-./autogen.sh --prefix=/usr
-make
-cd sflphone-gtk/
-./autogen.sh --prefix=/usr
-make
-cd ..
-
-%install
-%makeinstall
-
-cd sflphone-gtk/
-%makeinstall
-
-cd ../libs/pjproject-1.0.1
-%makeinstall
-
-cd ../dbus-c++
-%makeinstall
-
-cd ../libiax2
-%makeinstall
-
-cd ../..
-cd %{buildroot}/usr/bin/
-ln -sf ./sflphone-gtk sflphone 
-cd -
-cp %{SOURCE1} %{buildroot}/usr/lib/pkgconfig/ -f
-
-rm -rf %{buildroot}/usr/lib/debug
-rm -rf %{buildroot}/usr/include/
-
-%files
-%defattr(-, root, root)
-/usr/bin/*
-/usr/lib/*
-/usr/share/applications/*
-/usr/share/dbus-1/services/*
-/usr/share/locale/*
-/usr/share/pixmaps/*
-/usr/share/sflphone/*
-/usr/share/man/*
-
-%clean
-rm -rf %{buildroot}
-
-
-
-%changelog
-* Mon Feb 16 2009 Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> 2fedora
-  - Packaging 0.9.3-2 sflphone version on Fedora 10
-
-* Mon Jan 26 2009 Yun Liu <yun.liu@savoirfairelinux.com> 6
-  - Packaging sflphone for Fedora 10
-
-* Mon Jan 5 2009 Yun Liu <yun.liu@savoirfairelinux.com>
-  - Fix bug ticket #107, #108, #109, #110, #111, #117, #129
-
-* Thu Nov 6 2008 Yun Liu <yun.liu@savoirfairelinux.com>
-  - Packaging sflphone for Fedora 9
-  
-* Thu Nov 30 2006 Yan Morin <yan.morin@savoirfairelinux.com>
-  Packaging sflphone for Fedora Core 6
-
-* Wed Sep  6 2006 Yan Morin <yan.morin@savoirfairelinux.com>
-  Packaging sflphone, sflphone-qt and sflphone-cli
-
-* Mon Nov 21 2005 Yan Morin <yan.morin@savoirfairelinux.com>
-- Final 0.6.0 version (Release / Source without alphatag)
-
diff --git a/sflphone-common/platform/rpm/sflphone.spec.in b/sflphone-common/platform/rpm/sflphone.spec.in
deleted file mode 100644
index acd9ce12bea2b7bea87dc17d529f577d02dd8142..0000000000000000000000000000000000000000
--- a/sflphone-common/platform/rpm/sflphone.spec.in
+++ /dev/null
@@ -1,38 +0,0 @@
-%define name sflphoned
-%define version 0.6
-%define release 1
-%define prefix /usr
-Autoreq: 0
-
-Name:		%name
-Summary:	A VoIP daemon with SIP protocol
-Version:	%version
-Release:	%release
-License:	GPL
-Group:		Networking/Utilities
-URL:		http://www.sflphone.org/
-Packager:	Cyrille Béraud <cyrille.beraud@savoirfairelinux.com>
-Source:		http://www.sflphone.org/releases/sflphone-0.5.tar.gz
-BuildRoot:	/tmp/sflphone-%{version}-%{release}
-
-%description
-SFLPhoned is a VoIP daemon with SIP protocol.
-%prep
-%setup
-CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix %{prefix}
-
-%build
-make
-
-%install
-make DESTDIR=$RPM_BUILD_ROOT install
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-, root, root)
-%{prefix}/bin/sflphoned
-%dir %{prefix}/share/sflphone/ringtones
-%{prefix}/share/sflphone/ringtones/*
-
diff --git a/sflphone-common/platform/suse.spec.in b/sflphone-common/platform/suse.spec.in
deleted file mode 100644
index 272c155f237bd923c94e5dfd9e25b5beb930eac1..0000000000000000000000000000000000000000
--- a/sflphone-common/platform/suse.spec.in
+++ /dev/null
@@ -1,94 +0,0 @@
-%define name sflphone
-%define version @VERSION@
-Autoreq: 0
-
-Name:		%name
-Summary:	A VoIP daemon with SIP protocol and IAX protocol
-Version:	%version
-Release:    1suse
-License:	GPL
-Group:		System Environment/Daemons
-URL:		http://www.sflphone.org/
-Packager:	Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
-Source0:	%{name}-%{version}.tar.gz
-Source1:        libpj-sfl.pc
-BuildRoot:	%{_tmppath}/%{name}-%{version}
-Requires:   commoncpp2 libccrtp1 libsamplerate pulseaudio libgsm1 libspeex  dbus-1-glib expat gtk2 glibc glib2 dbus-1 libsexy libnotify perl
-
-%description
-SFLphoned is a VoIP daeamon with SIP protocol and IAX protocol.
-
-%prep
-%setup -q
-cd libs/pjproject-1.0.1
-./configure --prefix=/usr
-make clean
-make dep
-make
-cd ../..
-
-%build
-./autogen.sh --prefix=/usr
-make
-cd sflphone-gtk/
-./autogen.sh --prefix=/usr
-make
-cd ..
-
-%install
-make prefix=%{buildroot}/usr install
-
-cd sflphone-gtk/
-make prefix=%{buildroot}/usr install
-
-cd ../libs/pjproject-1.0.1
-make prefix=%{buildroot}/usr install
-
-cd ../..
-cd %{buildroot}/usr/bin/
-ln -sf ./sflphone-gtk sflphone 
-cd -
-cp %{SOURCE1} %{buildroot}/usr/lib/pkgconfig/ -f
-
-rm -rf  %{buildroot}/usr/lib/debug
-rm -rf  %{buildroot}/usr/include
-
-%files
-%defattr(-, root, root)
-/usr/bin/*
-/usr/lib/*
-/usr/share/applications/*
-/usr/share/dbus-1/services/*
-/usr/share/locale/*
-/usr/share/pixmaps/*
-/usr/share/sflphone/*
-/usr/share/man/*
-
-%clean
-rm -rf %{buildroot}
-
-%changelog
-* Fri Apr 10 2009 Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> 1suse
-  - Packaging 0.9.4-2 sflphone version on openSUSE 11
-
-* Mon Feb 16 2009 Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> 2suse
-  - Packaging 0.9.3-2 sflphone version on openSUSE 11
-
-* Mon Jan 26 2009 Yun Liu <yun.liu@savoirfairelinux.com> 6suse
-  - Packaging sflphone on openSUSE 11
-
-* Mon Jan 5 2009 Yun Liu <yun.liu@savoirfairelinux.com>
-  - Fix bug ticket #107, #108, #109, #110, #111, #117, #129
-
-* Thu Nov 6 2008 Yun Liu <yun.liu@savoirfairelinux.com>
-  - Packaging sflphone for Fedora 9
-  
-* Thu Nov 30 2006 Yan Morin <yan.morin@savoirfairelinux.com>
-  Packaging sflphone for Fedora Core 6
-
-* Wed Sep  6 2006 Yan Morin <yan.morin@savoirfairelinux.com>
-  Packaging sflphone, sflphone-qt and sflphone-cli
-
-* Mon Nov 21 2005 Yan Morin <yan.morin@savoirfairelinux.com>
-- Final 0.6.0 version (Release / Source without alphatag)
-
diff --git a/sflphone-common/po/de.po b/sflphone-common/po/de.po
index 4371c318d078fe25c7b44ea8d964d4412ac0e597..2a673d429dc3e26a7f628902dba6f6aed8e4add7 100644
--- a/sflphone-common/po/de.po
+++ b/sflphone-common/po/de.po
@@ -76,9 +76,8 @@ msgid "Using %s (%s)"
 msgstr ""
 
 #: ../../sflphone-client-gnome/src/actions.c:87
-#, fuzzy
 msgid "No registered account"
-msgstr "Sie haben noch kein registriertes Konto"
+msgstr "Kein registriertes Konto"
 
 #: ../../sflphone-client-gnome/src/actions.c:229
 msgid ""
@@ -112,7 +111,7 @@ msgstr ""
 "Verzeichniss ( <i>%s</i> ) gespeichert werden."
 
 #: ../../sflphone-client-gnome/src/assistant.c:35
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "This assistant is now finished.\n"
 "You can at any time check your registration state or modify your accounts "
@@ -130,7 +129,6 @@ msgstr ""
 "Alias :    %s\n"
 "Server :   %s\n"
 "Benutzername : %s\n"
-"Passwort : %s"
 
 #: ../../sflphone-client-gnome/src/assistant.c:160
 msgid "SFLphone account configuration wizard"
@@ -205,9 +203,8 @@ msgstr "_Passwort"
 #: ../../sflphone-client-gnome/src/assistant.c:294
 #: ../../sflphone-client-gnome/src/assistant.c:387
 #: ../../sflphone-client-gnome/src/config/accountwindow.c:223
-#, fuzzy
 msgid "_Voicemail number"
-msgstr "_Voicemail Boxnummer"
+msgstr "_Voicemail Nummer"
 
 #: ../../sflphone-client-gnome/src/assistant.c:309
 msgid "Optional Email Address "
@@ -252,35 +249,32 @@ msgid "Congratulations!"
 msgstr "Gratulation!"
 
 #: ../../sflphone-client-gnome/src/errors.c:28
-#, fuzzy
 msgid ""
 "ALSA notification\n"
 "\n"
 "Error while opening playback device"
 msgstr ""
-"<b>ALSA Benachrichtigung</b>\n"
+"ALSA Benachrichtigung\n"
 "\n"
 "Fehler während Öffnen des \"playback device\""
 
 #: ../../sflphone-client-gnome/src/errors.c:31
-#, fuzzy
 msgid ""
 "ALSA notification\n"
 "\n"
 "Error while opening capture device"
 msgstr ""
-"<b>ALSA Benachrichtigung</b>\n"
+"ALSA Benachrichtigung\n"
 "\n"
 "Fehler während Öffnen des \"capture device\""
 
 #: ../../sflphone-client-gnome/src/errors.c:34
-#, fuzzy
 msgid ""
 "Pulseaudio notification\n"
 "\n"
 "Pulseaudio is not running"
 msgstr ""
-"<b>Pulseaudio Benachrichtigung</b>\n"
+"Pulseaudio Benachrichtigung\n"
 "\n"
 "Pulseaudio nicht gestartet"
 
@@ -297,9 +291,8 @@ msgid "Do you still want to quit?"
 msgstr ""
 
 #: ../../sflphone-client-gnome/src/mainwindow.c:296
-#, fuzzy
 msgid "SFLphone Error"
-msgstr "SFLphone 0.9.2"
+msgstr "SFLphone Fehler"
 
 #: ../../sflphone-client-gnome/src/menus.c:134
 msgid "SFLphone is a VoIP client compatible with SIP and IAX2 protocols."
@@ -339,9 +332,8 @@ msgid "_Record"
 msgstr "_Gespräch aufzeichnen"
 
 #: ../../sflphone-client-gnome/src/menus.c:358
-#, fuzzy
 msgid "_Account creation wizard"
-msgstr "SFLphone Konto (Konfigurationsassistent)"
+msgstr "SFLphone _Konto (Konfigurationsassistent)"
 
 #: ../../sflphone-client-gnome/src/menus.c:388
 msgid "_Call"
@@ -438,9 +430,9 @@ msgid "_Show main window"
 msgstr "_Hauptfenster anzeigen"
 
 #: ../../sflphone-client-gnome/src/statusicon.c:124
-#, fuzzy, c-format
+#, c-format
 msgid "SFLphone - %i accounts configured"
-msgstr "SFLphone - %i Konten registriert"
+msgstr "SFLphone - %i Konten konfiguriert"
 
 #: ../../sflphone-client-gnome/src/timestamp.c:46
 msgid "<small>Missed call</small>"
@@ -510,7 +502,6 @@ msgid "Account settings"
 msgstr "Kontoeinstellungen"
 
 #: ../../sflphone-client-gnome/src/config/accountwindow.c:120
-#, fuzzy
 msgid "Account Parameters"
 msgstr "Kontoparameter"
 
@@ -577,9 +568,9 @@ msgid "Name"
 msgstr "Name"
 
 #: ../../sflphone-client-gnome/src/config/audioconf.c:155
-#, fuzzy, c-format
+#, c-format
 msgid "audio device index for output = %d"
-msgstr "\"Audio device index\" für Ausgabe = %d\n"
+msgstr "\"Audio device index\" für Ausgabe = %d"
 
 #: ../../sflphone-client-gnome/src/config/audioconf.c:579
 msgid "Frequency"
@@ -670,14 +661,12 @@ msgid "Format: name.server:port"
 msgstr "Format: Name.Server:Port"
 
 #: ../../sflphone-client-gnome/src/config/configwindow.c:579
-#, fuzzy
 msgid "Desktop Notifications"
-msgstr "Desktopbenachrichtigung"
+msgstr "Desktopbenachrichtigungen"
 
 #: ../../sflphone-client-gnome/src/config/configwindow.c:588
-#, fuzzy
 msgid "_Enable notifications"
-msgstr "Klingeltöne _einschalten"
+msgstr "Benachrichtigungen _einschalten"
 
 #: ../../sflphone-client-gnome/src/config/configwindow.c:594
 msgid "Enable voicemail _notifications"
@@ -704,9 +693,8 @@ msgid "Calls History"
 msgstr "Liste der vorherigen Anrufen"
 
 #: ../../sflphone-client-gnome/src/config/configwindow.c:636
-#, fuzzy
 msgid "_History size limit"
-msgstr "Liste der vorherigen Anrufen is leer"
+msgstr "Max. _Anzahl von vorherigen Anrufen"
 
 #: ../../sflphone-client-gnome/src/config/configwindow.c:653
 msgid "PulseAudio sound server"
@@ -745,9 +733,8 @@ msgid "Audio Settings"
 msgstr "Audio Einstellungen"
 
 #: ../../sflphone-client-gnome/src/config/configwindow.c:803
-#, fuzzy
 msgid "Recordings"
-msgstr "_Gespräch aufzeichnen"
+msgstr "Tonaufnahmen"
 
 #: ../../sflphone-client-gnome/src/config/configwindow.c:808
 msgid "Address Book"
@@ -762,9 +749,8 @@ msgid "Accounts"
 msgstr "Konten"
 
 #: ../../sflphone-client-gnome/src/config/configwindow.c:852
-#, fuzzy
 msgid "Configured Accounts"
-msgstr "Aktuelles Konto"
+msgstr "Konfigurierten Konten"
 
 #: ../../sflphone-client-gnome/src/config/hooks-config.c:130
 msgid "URL Passing"
@@ -800,19 +786,16 @@ msgstr ""
 
 #: ../../sflphone-client-gnome/src/contacts/history.c:83
 #: ../../sflphone-client-gnome/src/contacts/searchbar.c:123
-#, fuzzy
 msgid "Search history"
-msgstr "Liste der vorherigen Anrufen _leeren"
+msgstr "In vorherigen Anrufen suchen"
 
 #: ../../sflphone-client-gnome/src/contacts/history.c:83
 #: ../../sflphone-client-gnome/src/contacts/searchbar.c:110
-#, fuzzy
 msgid "Search contact"
-msgstr "Adressbuch _Suche"
+msgstr "Adressbuch Suche"
 
-#, fuzzy
 #~ msgid "Registered to %s (%s)"
-#~ msgstr "registriert"
+#~ msgstr "zu %s (%s) registriert"
 
 #~ msgid "%s account- %s             %s"
 #~ msgstr "%s Konto- %s             %s"
@@ -832,7 +815,6 @@ msgstr "Adressbuch _Suche"
 #~ msgid "_Control running applications volume"
 #~ msgstr "Lautstärke für laufende Anwendungen _einstellen"
 
-#, fuzzy
 #~ msgid "Account previously setup"
 #~ msgstr "Zuvor eingestellte Konten"
 
diff --git a/sflphone-common/src/account.cpp b/sflphone-common/src/account.cpp
index b50fc71fc49d5648d875ac8bc4cb99758b82a9d3..34b96eed458c7107427f0ea285e92aa82cfafe28 100644
--- a/sflphone-common/src/account.cpp
+++ b/sflphone-common/src/account.cpp
@@ -48,8 +48,12 @@ void Account::loadConfig()
 }
 
 void Account::setRegistrationState( RegistrationState state ) { 
-    _registrationState = state; 
+    
+    if (state != _registrationState) {
+	_debug("Account::setRegistrationState\n");
+        _registrationState = state; 
 
-    // Notify the client
-    Manager::instance().connectionStatusNotification( );
+	// Notify the client
+	Manager::instance().connectionStatusNotification();
+    }
 }
diff --git a/sflphone-common/src/audio/audiortp.cpp b/sflphone-common/src/audio/audiortp.cpp
index 72e640e93f3105c1352cc770e40146119268f5ba..9b07c1ff3be1996f1f770a6f224e4ce177163249 100644
--- a/sflphone-common/src/audio/audiortp.cpp
+++ b/sflphone-common/src/audio/audiortp.cpp
@@ -56,6 +56,8 @@ AudioRtp::createNewSession (SIPCall *ca) {
 
     ost::MutexLock m(_threadMutex);
 
+    _debug("AudioRtp::Create new rtp session\n");
+
     // something should stop the thread before...
     if ( _RTXThread != 0 ) { 
         _debug("**********************************************************\n");
@@ -86,7 +88,7 @@ AudioRtp::closeRtpSession () {
 
     ost::MutexLock m(_threadMutex);
     // This will make RTP threads finish.
-    _debug("Stopping AudioRTP\n");
+    _debug("AudioRtp::Stopping rtp session\n");
     try {
 
         delete _RTXThread; _RTXThread = 0;
diff --git a/sflphone-common/src/audio/audiortp.h b/sflphone-common/src/audio/audiortp.h
index 34d8b3ee1e7c982e029aeb7e35e81b367218c56f..65669dc5d8fc729e94d00af47d9f04d121cf4636 100644
--- a/sflphone-common/src/audio/audiortp.h
+++ b/sflphone-common/src/audio/audiortp.h
@@ -74,6 +74,9 @@ class AudioRtpRTX : public ost::Thread, public ost::TimerPort {
     /** A SIP call */
     SIPCall* _ca;    
 
+    
+    friend class RtpTest;
+
   private:
 
     // copy constructor
diff --git a/sflphone-common/src/call.cpp b/sflphone-common/src/call.cpp
index 45ee195eee3aa6bfb5a32c6410e70983c166db05..49fde4fc0c9a6923416c06aef6304ae04a71b70c 100644
--- a/sflphone-common/src/call.cpp
+++ b/sflphone-common/src/call.cpp
@@ -82,6 +82,32 @@ Call::getState()
   return _callState;
 }
 
+std::string
+Call::getStateStr (CallState state)
+{
+    std::string state_str;
+        
+    switch (state) {
+        case Active:
+            state_str = "CURRENT";
+            break;
+        case Hold:
+            state_str = "HOLD";
+            break;
+        case Busy:
+            state_str = "BUSY";
+            break;
+        case Refused:
+        case Error:
+        case Inactive:
+        default:
+            state_str = "FAILURE";
+            break;
+    }
+    return state_str;
+}
+
+
 const std::string& 
 Call::getLocalIp()
 {
diff --git a/sflphone-common/src/call.h b/sflphone-common/src/call.h
index 1480ca94328452966ba009f84170d9f0c7b8efb3..6a397a685bb4183e2ed5e6eed31429bd2309a9e1 100644
--- a/sflphone-common/src/call.h
+++ b/sflphone-common/src/call.h
@@ -139,6 +139,8 @@ class Call{
          * @return CallState  The call state
          */
         CallState getState();
+        
+        std::string getStateStr (CallState state);
 
         void setCallConfiguration (Call::CallConfiguration callConfig) { _callConfig = callConfig; }
         
diff --git a/sflphone-common/src/dbus/callmanager-introspec.xml b/sflphone-common/src/dbus/callmanager-introspec.xml
index dbc84d3542c77ceba6beb6f07f3904aa2e4d8ce8..d72dddd28f2b4baa67add8cb04084512d0aeb78c 100644
--- a/sflphone-common/src/dbus/callmanager-introspec.xml
+++ b/sflphone-common/src/dbus/callmanager-introspec.xml
@@ -67,6 +67,10 @@
       <arg type="a{ss}" name="infos" direction="out"/>
     </method>
     
+    <method name="getCallList">
+        <arg type="as" name="list" direction="out"/>
+    </method>
+
     <method name="getCurrentCallID">
       <arg type="s" name="callID" direction="out"/>
     </method>
diff --git a/sflphone-common/src/dbus/callmanager.cpp b/sflphone-common/src/dbus/callmanager.cpp
index e013410ad59c63693896cd68bb70a40c7fed976c..cfd73bd7048afddc791474cc73013fcd459be165 100644
--- a/sflphone-common/src/dbus/callmanager.cpp
+++ b/sflphone-common/src/dbus/callmanager.cpp
@@ -146,6 +146,12 @@ CallManager::getCallDetails( const std::string& callID )
     return Manager::instance().getCallDetails (callID);
 }
 
+std::vector< std::string >
+CallManager::getCallList (void)
+{
+    return Manager::instance().getCallList();
+}
+        
 std::string 
 CallManager::getCurrentCallID(  )
 {
diff --git a/sflphone-common/src/dbus/callmanager.h b/sflphone-common/src/dbus/callmanager.h
index e1fc6de8fa074e7d36e3f7d03738071092bc0465..0d8a93a9a3c10591fa7409a87ecdc8081d9305e0 100644
--- a/sflphone-common/src/dbus/callmanager.h
+++ b/sflphone-common/src/dbus/callmanager.h
@@ -51,7 +51,10 @@ public:
     void setRecording( const std::string& callID );
     bool getIsRecording(const std::string& callID);
     std::string getCurrentCodecName(const std::string& callID);
+    
     std::map< std::string, std::string > getCallDetails( const std::string& callID );
+    std::vector< std::string > getCallList (void);
+
     std::string getCurrentCallID(  );
     void playDTMF( const std::string& key );
     void startTone( const int32_t& start, const int32_t& type );
diff --git a/sflphone-common/src/dbus/configurationmanager-introspec.xml b/sflphone-common/src/dbus/configurationmanager-introspec.xml
index 9a4375bb0cfce1a67ff8790ae119202015d0ce16..6709c772d120fa12c37695c509b16672f0bf4558 100644
--- a/sflphone-common/src/dbus/configurationmanager-introspec.xml
+++ b/sflphone-common/src/dbus/configurationmanager-introspec.xml
@@ -313,7 +313,7 @@
 -->    
 
     <signal name="accountsChanged">
-    </signal>
+    </signal>  
 
     <signal name="errorAlert">
       <arg type="i" name="code" direction="out"/>
diff --git a/sflphone-common/src/dbus/configurationmanager.cpp b/sflphone-common/src/dbus/configurationmanager.cpp
index 510d97419acfa1e7fba26271586f9cfadcc531da..618776d5e6296cc2a6e75dcb1978b72a5fc55014 100644
--- a/sflphone-common/src/dbus/configurationmanager.cpp
+++ b/sflphone-common/src/dbus/configurationmanager.cpp
@@ -33,6 +33,7 @@ const char* ConfigurationManager::SERVER_PATH = "/org/sflphone/SFLphone/Configur
 {
 }
 
+      
 	std::map< std::string, std::string >
 ConfigurationManager::getAccountDetails( const std::string& accountID )
 {
diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp
index 1e9f84e97d7883804a334ae112abc39464f2e127..c5af85c637b726c27280e77e6906b4b2d4a329db 100644
--- a/sflphone-common/src/managerimpl.cpp
+++ b/sflphone-common/src/managerimpl.cpp
@@ -884,7 +884,7 @@ ManagerImpl::startVoiceMessageNotification(const AccountID& accountId, int nb_ms
   if (_dbus) _dbus->getCallManager()->voiceMailNotify(accountId, nb_msg) ;
 }
 
-void ManagerImpl::connectionStatusNotification(  )
+void ManagerImpl::connectionStatusNotification()
 {
     if (_dbus)
         _dbus->getConfigurationManager()->accountsChanged();
@@ -2296,11 +2296,16 @@ void ManagerImpl::setAccountDetails( const std::string& accountID, const std::ma
 void
 ManagerImpl::sendRegister( const std::string& accountID , const int32_t& expire )
 {
+
+  _debug("ManagerImpl::sendRegister \n");
   // Update the active field
   setConfig( accountID, CONFIG_ACCOUNT_ENABLE, expire );
+  _debug("ManagerImpl::sendRegister set config done\n");
 
   Account* acc = getAccount(accountID);
   acc->loadConfig();
+  _debug("ManagerImpl::sendRegister acc->loadconfig done\n");
+
   // Test on the freshly updated value
   if ( acc->isEnabled() ) {
     // Verify we aren't already registered, then register
@@ -2311,6 +2316,7 @@ ManagerImpl::sendRegister( const std::string& accountID , const int32_t& expire
       _debug("Send unregister for account %s\n" , accountID.c_str());
       acc->unregisterVoIPLink();
   }
+
 }
 
   std::string
@@ -2840,6 +2846,7 @@ std::map< std::string, std::string > ManagerImpl::getCallDetails(const CallID& c
         call_details.insert (std::pair<std::string, std::string> ("ACCOUNTID", accountid));
         call_details.insert (std::pair<std::string, std::string> ("PEER_NUMBER", call->getPeerNumber ()));
         call_details.insert (std::pair<std::string, std::string> ("PEER_NAME", call->getPeerName ()));
+        call_details.insert (std::pair<std::string, std::string> ("CALL_STATE", call->getStateStr (call->getState())));
     }
     else 
     {
@@ -2847,7 +2854,24 @@ std::map< std::string, std::string > ManagerImpl::getCallDetails(const CallID& c
         call_details.insert (std::pair<std::string, std::string> ("ACCOUNTID", AccountNULL));
         call_details.insert (std::pair<std::string, std::string> ("PEER_NUMBER", "Unknown"));
         call_details.insert (std::pair<std::string, std::string> ("PEER_NAME", "Unknown"));
+        call_details.insert (std::pair<std::string, std::string> ("CALL_STATE", "FAILURE"));
     }
 
     return call_details;
 }
+
+  std::vector< std::string >
+ManagerImpl::getCallList (void)
+{
+    std::vector< std::string > v;
+    int i;
+
+    CallAccountMap::iterator iter = _callAccountMap.begin ();
+
+    while (iter != _callAccountMap.end ()) {
+        v.push_back(iter->first.data());
+        iter++;
+    }   
+   
+    return v;
+}
diff --git a/sflphone-common/src/managerimpl.h b/sflphone-common/src/managerimpl.h
index 10caf62b48c5e85df232aa12820e1398424bb9ae..bb181657fc635b75dca553c4e0fa3c27aaacd427 100644
--- a/sflphone-common/src/managerimpl.h
+++ b/sflphone-common/src/managerimpl.h
@@ -301,6 +301,12 @@ class ManagerImpl {
      */
     std::map< std::string, std::string > getCallDetails(const CallID& callID);
 
+    /**
+     * Get call list
+     * @return std::vector<std::string> A list of call IDs
+     */
+    std::vector< std::string >  getCallList (void);
+
     /**
      * Save the details of an existing account, given the account ID
      * This will load the configuration map with the given data.
diff --git a/sflphone-common/src/sipvoiplink.cpp b/sflphone-common/src/sipvoiplink.cpp
index 34aae45a80bd54b0826dc207bd5bc503b3534a31..8a1f1976e0c761d8e0c1a921ff8e1d470fd48366 100644
--- a/sflphone-common/src/sipvoiplink.cpp
+++ b/sflphone-common/src/sipvoiplink.cpp
@@ -1590,8 +1590,8 @@ bool SIPVoIPLink::pjsip_init()
 	status = pjsip_xfer_init_module ( _endpt );
 	PJ_ASSERT_RETURN ( status == PJ_SUCCESS, 1 );
 
-	//status = enable_dns_srv_resolver (_endpt, &p_resv);
-	//PJ_ASSERT_RETURN( status == PJ_SUCCESS, 1 );
+	status = enable_dns_srv_resolver (_endpt, &p_resv);
+	PJ_ASSERT_RETURN( status == PJ_SUCCESS, 1 );
 
 	// Init the callback for INVITE session:
 	pj_bzero ( &inv_cb, sizeof ( inv_cb ) );
diff --git a/sflphone-common/test/rtpTest.cpp b/sflphone-common/test/rtpTest.cpp
index 335bb0a40bed53f92411265d2f66a9306bae03a1..1f058d1ec87114d879df4c0355e01a9a72ee062c 100644
--- a/sflphone-common/test/rtpTest.cpp
+++ b/sflphone-common/test/rtpTest.cpp
@@ -20,6 +20,13 @@
 #include <stdio.h>
 #include <sstream>
 #include <ccrtp/rtp.h>
+#include <assert.h>
+#include <string>
+#include <cstring>
+#include <math.h>
+#include <dlfcn.h>
+#include <iostream>
+#include <sstream>
 
 
 #include "rtpTest.h"
@@ -33,19 +40,45 @@ using std::endl;
 
 void RtpTest::setUp(){
 
+  _debug("------ Set up rtp test------\n");
+
     Manager::instance().initConfigFile();
     Manager::instance().init();
 
+    pjsipInit();
+
     CallID cid = "123456";
-        
-    audiortp = new AudioRtp();
 
-    sipcall = new SIPCall(cid, Call::Incoming, NULL);
+    sipcall = new SIPCall(cid, Call::Incoming, _pool);
+    
+    sipcall->setLocalIp("127.0.0.1");
+    sipcall->setLocalAudioPort(RANDOM_LOCAL_PORT);
+    sipcall->setLocalExternAudioPort(RANDOM_LOCAL_PORT);
+
+    
 }
 
-void RtpTest::testRtpInit()
+bool RtpTest::pjsipInit(){
+
+    // Create memory cache for pool
+    pj_caching_pool_init(&_cp, &pj_pool_factory_default_policy, 0);
+
+    // Create memory pool for application. 
+    _pool = pj_pool_create(&_cp.factory, "rtpTest", 4000, 4000, NULL);
+
+    if (!_pool) {
+        _debug("----- RtpTest: Could not initialize pjsip memory pool ------\n");
+        return PJ_ENOMEM;
+    }
+
+}
+
+
+void RtpTest::testRtpInitClose()
 {
 
+    audiortp = new AudioRtp();
+
     _debug("------ void RtpTest::testRtpInit() ------\n");
     try {
 
@@ -54,17 +87,16 @@ void RtpTest::testRtpInit()
 
     } catch(...) {
         
-        _debug("!!! Exception occured while Oppenning Rtp \n");
+        _debug("!!! Exception occured while Oppenning Rtp !!!\n");
 	
     }
 
-}
+    CPPUNIT_ASSERT(audiortp != NULL);
     
+    _debug("------ Finilize Rtp Initialization ------ \n");
 
-void RtpTest::testRtpClose()
-{
 
-  _debug("------ RtpTest::testRtpClose() ------");
+    _debug("------ RtpTest::testRtpClose() ------\n");
 
     try {
       _debug("------ Close Rtp Session -------\n");  
@@ -72,14 +104,46 @@ void RtpTest::testRtpClose()
 
     } catch(...) {
 
-        _debug("!!! Exception occured while closing Rtp \n");
+        _debug("!!! Exception occured while closing Rtp !!!\n");
+
+    }
+
+    delete audiortp;  audiortp = NULL;
+
+}
+
+void RtpTest::testRtpThread()
+{
+
+    _debug("------ void RtpTest::testRtpThread ------\n");
+
+    
+
+    if(rtpthread != 0){
+        _debug("!!! Rtp Thread already exists..., stopping it\n"); 
+	delete rtpthread;  rtpthread = 0;
+    }
+
+    CPPUNIT_ASSERT(rtpthread == 0);
+    // CPPUNIT_ASSERT(rtpthread->_sym == NULL);
+
+    try {
+
+        rtpthread = new AudioRtpRTX(sipcall, true);
+	
+    } catch(...) {
+
+        _debug("!!! Exception occured while instanciating AudioRtpRTX !!!\n");
 
     }
 
+    CPPUNIT_ASSERT(rtpthread == 0);
+
+    delete rtpthread;  rtpthread = 0;
 }
 
 
 void RtpTest::tearDown(){
 
-    delete audiortp;  audiortp = NULL;
+    delete sipcall;   sipcall = NULL;
 }
diff --git a/sflphone-common/test/rtpTest.h b/sflphone-common/test/rtpTest.h
index b2d314a1c2968f2e1aa082bc3018ae7eb5158f09..dec1b9798694eea926e6d9979ba3e6716b77b492 100644
--- a/sflphone-common/test/rtpTest.h
+++ b/sflphone-common/test/rtpTest.h
@@ -25,11 +25,24 @@
 
 #include <assert.h>
 
+#include <stdio.h>
+#include <sstream>
+#include <ccrtp/rtp.h>
+
+
+// pjsip import
+#include <pjsip.h>
+#include <pjlib.h>
+#include <pjsip_ua.h>
+#include <pjlib-util.h>
+#include <pjnath/stun_config.h>
+
 // Application import
 #include "manager.h"
 #include "audio/audiortp.h"
 #include "../src/call.h"
 #include "../src/sipcall.h"
+#include "../src/sipvoiplink.h"
 
 #include "config/config.h"
 #include "user_cfg.h"
@@ -44,7 +57,9 @@
 #ifndef _RTP_TEST_
 #define _RTP_TEST_
 
-
+class AudioRtp;
+class AudioRtpRTX;
+class SIPVoIPLink;
 
 class RtpTest : public CppUnit::TestCase {
 
@@ -52,8 +67,8 @@ class RtpTest : public CppUnit::TestCase {
      * Use cppunit library macros to add unit test the factory
      */
     CPPUNIT_TEST_SUITE( RtpTest );
-        CPPUNIT_TEST( testRtpInit );
-	CPPUNIT_TEST( testRtpClose );
+        CPPUNIT_TEST( testRtpInitClose );
+	CPPUNIT_TEST( testRtpThread );
     CPPUNIT_TEST_SUITE_END();
 
     public:
@@ -71,9 +86,12 @@ class RtpTest : public CppUnit::TestCase {
          */
         inline void tearDown();
 
-        void testRtpInit();
+	bool pjsipInit();
+
+        void testRtpInitClose();
+
+	void testRtpThread();
 
-	void testRtpClose();
 
     private:
 
@@ -83,8 +101,14 @@ class RtpTest : public CppUnit::TestCase {
 
         AudioRtp *audiortp;
 
+	AudioRtpRTX *rtpthread;
+
 	SIPCall *sipcall;
 
+	pj_caching_pool _cp;
+
+	pj_pool_t *_pool;
+
 };
 
 /* Register our test module */
diff --git a/tools/build-system/bin/git-dch b/tools/build-system/bin/git-dch
new file mode 100755
index 0000000000000000000000000000000000000000..f9ee5bc56f14d320c63c27da987ca0029fbb244f
--- /dev/null
+++ b/tools/build-system/bin/git-dch
@@ -0,0 +1,404 @@
+#!/usr/bin/python -u
+# vim: set fileencoding=utf-8 :
+#
+# (C) 2007,2008 Guido Guenther <agx@sigxcpu.org>
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+"""Generate Debian changelog entries from git commit messages"""
+
+import sys
+import re
+import os.path
+import shutil
+import subprocess
+import gbp.command_wrappers as gbpc
+from gbp.git_utils import (GitRepositoryError, GitRepository, build_tag)
+from gbp.config import GbpOptionParser, GbpOptionGroup
+from gbp.errors import GbpError
+from gbp.deb_utils import parse_changelog
+from gbp.command_wrappers import (Command, CommandExecFailed)
+
+snapshot_re = re.compile("\s*\*\* SNAPSHOT build @(?P<commit>[a-z0-9]+)\s+\*\*")
+author_re = re.compile('Author: (?P<author>.*) <(?P<email>.*)>')
+bug_r = r'(?:bug)?\#?\s?\d+'
+bug_re = re.compile(bug_r, re.I)
+
+def system(cmd):
+    try:
+        Command(cmd, shell=True)()
+    except CommandExecFailed:
+        raise GbpError
+
+
+def escape_commit(msg):
+    return msg.replace('"','\\\"').replace("$","\$").replace("`","\`")
+
+
+def spawn_dch(msg='', author=None, email=None, newversion=False, version=None, release=False, distribution=None):
+    distopt = ""
+    versionopt = ""
+    env = ""
+
+    if newversion:
+        if version:
+            versionopt = '--newversion=%s' % version
+        else:
+            versionopt = '-i'
+    elif release:
+        versionopt = "--release"
+        msg = None
+
+    if author and email:
+        env = """DEBFULLNAME="%s" DEBEMAIL="%s" """ % (author, email)
+
+    if distribution:
+        distopt = "--distribution=%s" % distribution
+
+    cmd = '%(env)s dch --no-auto-nmu  %(distopt)s %(versionopt)s ' % locals()
+    if type(msg) == type(''):
+        cmd += '"%s"' % escape_commit(msg)
+    system(cmd)
+
+
+def add_changelog_entry(msg, author, email):
+    "add aa single changelog entry"
+    spawn_dch(msg=msg, author=author, email=email)
+
+
+def add_changelog_section(msg, distribution, author=None, email=None, version=None):
+    "add a new changelog section"
+    spawn_dch(msg=msg, newversion= True, version=version, author=author, email=email, distribution=distribution)
+
+
+def fixup_trailer(repo, git_author=False):
+    """fixup the changelog trailer's comitter and email address - it might
+    otherwise point to the last git committer instead of the person creating
+    the changelog"""
+    author = email = None
+    if git_author:
+        try: author = repo.get_config('user.name')
+        except KeyError: pass
+
+        try: email = repo.get_config('user.email')
+        except KeyError: pass
+
+    spawn_dch(msg='', author=author, email=email)
+
+
+def head_commit():
+    """get the full sha1 of the last commit on HEAD"""
+    commit = subprocess.Popen([ 'git', 'log', 'HEAD^..' ], stdout=subprocess.PIPE).stdout
+    sha = commit.readline().split()[-1]
+    return sha
+
+
+def snapshot_version(version):
+    """
+    get the current release and snapshot version
+    Format is <debian-version>~<release>.gbp<short-commit-id>
+    """
+    try:
+        (release, suffix) = version.rsplit('~', 1)
+        (snapshot, commit)  = suffix.split('.', 1)
+        if not commit.startswith('gbp'):
+            raise ValueError
+        else:
+            snapshot = int(snapshot)
+    except ValueError: # not a snapshot release
+        release = version
+        snapshot = 0
+    return release, snapshot
+
+
+def mangle_changelog(changelog, cp, snapshot=''):
+    """
+    Mangle changelog to either add or remove snapshot markers
+
+    @param snapshot: SHA1 if snapshot header should be added/maintained, empty if it should be removed
+    @type  snapshot: str
+    """
+    try:
+        tmpfile = '%s.%s' % (changelog, snapshot)
+        cw = file(tmpfile, 'w')
+        cr = file(changelog, 'r')
+
+        cr.readline() # skip version and empty line
+        cr.readline()
+        print >>cw, "%(Source)s (%(MangledVersion)s) %(Distribution)s; urgency=%(urgency)s\n" % cp
+
+        line = cr.readline()
+        if snapshot_re.match(line):
+            cr.readline() # consume the empty line after the snapshot header
+            line = ''
+
+        if snapshot:
+            print >>cw, "  ** SNAPSHOT build @%s **\n" % snapshot
+
+        if line:
+            print >>cw, line.rstrip()
+        shutil.copyfileobj(cr, cw)
+        cw.close()
+        cr.close()
+        os.unlink(changelog)
+        os.rename(tmpfile, changelog)
+    except OSError, e:
+        raise GbpError, "Error mangling changelog %s" % e
+
+
+def do_release(changelog, cp):
+    "remove the snapshot header and set the distribution"
+    (release, snapshot) = snapshot_version(cp['Version'])
+    if snapshot:
+        cp['MangledVersion'] = release
+        mangle_changelog(changelog, cp)
+    # <julien.bonjean@savoirfairelinux.com>
+    # prevent doing a release
+    # spawn_dch(release=True)
+
+
+def do_snapshot(changelog, next_snapshot):
+    """
+    Add new snapshot banner to most recent changelog section. The next snapshot
+    number is calculated by eval()'ing next_snapshot
+    """
+    # commit = head_commit()
+
+    cp = parse_changelog(changelog)
+
+    # <julien.bonjean@savoirfairelinux.com>
+    # clean version before generate snapshot
+    version=cp['Version']
+    try:
+        (release, suffix) = version.rsplit('~', 1)
+    except:
+        pass
+    try:
+        (snapshot, commit)  = suffix.split('.', 1) 
+	stripped = str(int(snapshot))
+    except:
+	version=release
+    commit = head_commit()
+
+    (release, snapshot) = snapshot_version(version)
+    snapshot = int(eval(next_snapshot))
+
+    suffix = "%d.gbp%s" % (snapshot, "".join(commit[0:6]))
+    cp['MangledVersion'] = "%s~%s" % (release, suffix)
+
+    mangle_changelog(changelog, cp, commit)
+    return snapshot, commit
+
+
+def get_author(commit):
+    """get the author from a commit message"""
+    for line in commit:
+        m = author_re.match(line)
+        if m:
+            return m.group('author'), m.group('email')
+
+
+def parse_commit(repo, commitid, options):
+    """parse a commit and return message and author"""
+    msg = ''
+    thanks = ''
+    closes = ''
+    bugs = {}
+    bts_closes = re.compile(r'(?P<bts>%s):\s+%s' % (options.meta_closes, bug_r), re.I)
+
+    commit = repo.show(commitid)
+    author, email = get_author(commit)
+    if not author:
+        raise GbpError, "can't parse author of commit %s" % commit
+    for line in commit:
+        if line.startswith('    '): # commit body
+            line = line[4:]
+            m = bts_closes.match(line)
+            if m:
+                bug_nums = [ bug.strip() for bug in bug_re.findall(line, re.I) ]
+                try:
+                    bugs[m.group('bts')] += bug_nums
+                except KeyError:
+                    bugs[m.group('bts')] = bug_nums
+            elif line.startswith('Thanks: '):
+                thanks = line.split(' ', 1)[1].strip()
+            else: # normal commit message
+                if options.short and msg:
+                    continue
+                elif line.strip(): # don't add all whitespace lines
+                    msg += line
+        # start of diff output:
+        elif line.startswith('diff '):
+            break
+    if options.meta:
+        for bts in bugs:
+            closes += '(%s: %s) ' % (bts, ', '.join(bugs[bts]))
+        if thanks:
+            thanks = '- thanks to %s' % thanks
+        msg += closes + thanks
+    if options.idlen:
+        msg = "[%s] " % commitid[0:options.idlen] + msg
+    return msg, (author, email)
+
+
+def shortlog_to_dch(repo, commits, options):
+    """convert the changes in git shortlog format to debian changelog format"""
+    author = 'Unknown'
+
+    for commit in commits:
+        msg, (author, email) = parse_commit(repo, commit, options)
+        add_changelog_entry(msg, author, email)
+
+
+def guess_snapshot_commit(cp):
+    """guess the last commit documented in the changelog from the snapshot banner"""
+    sr = re.search(snapshot_re, cp['Changes'])
+    if sr:
+        return sr.group('commit')
+
+
+def main(argv):
+    ret = 0
+    changelog = 'debian/changelog'
+    until = 'HEAD'
+    found_snapshot_header = False
+    first_commit = None
+
+    parser = GbpOptionParser(command=os.path.basename(argv[0]), prefix='',
+                             usage='%prog [options] paths')
+    range_group = GbpOptionGroup(parser, "commit range options", "which commits to add to the changelog")
+    version_group = GbpOptionGroup(parser, "release & version number options", "what version number and release to use")
+    commit_group = GbpOptionGroup(parser, "commit message formatting", "howto format the changelog entries")
+    naming_group = GbpOptionGroup(parser, "branch and tag naming", "branch names and tag formats")
+    parser.add_option_group(range_group)
+    parser.add_option_group(version_group)
+    parser.add_option_group(commit_group)
+    parser.add_option_group(naming_group)
+
+    naming_group.add_config_file_option(option_name="debian-branch", dest="debian_branch")
+    naming_group.add_config_file_option(option_name="upstream-tag", dest="upstream_tag")
+    naming_group.add_config_file_option(option_name="debian-tag", dest="debian_tag")
+    naming_group.add_config_file_option(option_name="snapshot-number", dest="snapshot_number",
+                      help="expression to determine the next snapshot number, default is '%(snapshot-number)s'")
+    parser.add_config_file_option(option_name="git-log", dest="git_log",
+                      help="options to pass to git-log, default is '%(git-log)s'")
+    parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False,
+                      help="verbose command execution")
+    range_group.add_option("-s", "--since", dest="since", help="commit to start from (e.g. HEAD^^^, debian/0.4.3)")
+    range_group.add_option("-a", "--auto", action="store_true", dest="auto", default=False,
+                      help="autocomplete changelog from last snapshot or tag")
+    version_group.add_option("-R", "--release", action="store_true", dest="release", default=False,
+                      help="mark as release")
+    version_group.add_option("-S", "--snapshot", action="store_true", dest="snapshot", default=False,
+                      help="mark as snapshot build")
+    version_group.add_option("-N", "--new-version", dest="new_version",
+                      help="use this as base for the new version number")
+    version_group.add_config_file_option(option_name="git-author", dest="git_author", action="store_true")
+    version_group.add_config_file_option(option_name="no-git-author", dest="git_author", action="store_false")
+    commit_group.add_config_file_option(option_name="meta", dest="meta",
+                      help="parse meta tags in commit messages, default is '%(meta)s'", action="store_true")
+    commit_group.add_config_file_option(option_name="meta-closes", dest="meta_closes",
+                      help="Meta tags for the bts close commands, default is '%(meta-closes)s'")
+    commit_group.add_option("--full", action="store_false", dest="short", default=True,
+                      help="include the full commit message instead of only the first line")
+    commit_group.add_config_file_option(option_name="id-length", dest="idlen",
+                      help="include N digits of the commit id in the changelog entry, default is '%(id-length)s'",
+                      type="int", metavar="N")
+    (options, args) = parser.parse_args(argv[1:])
+
+    if options.snapshot and options.release:
+        parser.error("'--snapshot' and '--release' are incompatible options")
+
+    if options.since and options.auto:
+        parser.error("'--since' and '--auto' are incompatible options")
+
+    try:
+        if options.verbose:
+            gbpc.Command.verbose = True
+
+        try:
+            repo = GitRepository('.')
+        except GitRepositoryError:
+            raise GbpError, "%s is not a git repository" % (os.path.abspath('.'))
+
+        branch = repo.get_branch()
+        if options.debian_branch != branch:
+            print >>sys.stderr, "You are not on branch '%s' but on '%s'" % (options.debian_branch, branch)
+            raise GbpError, "Use --debian-branch to set the branch to pick changes from"
+
+        cp = parse_changelog(changelog)
+
+        if options.since:
+            since = options.since
+        else:
+            since = ''
+            if options.auto:
+                since = guess_snapshot_commit(cp)
+                if since:
+                    print "Continuing from commit '%s'" % since
+                    found_snapshot_header = True
+                else:
+                    print "Couldn't find snapshot header, using version info"
+            if not since:
+                since = build_tag(options.debian_tag, cp['Version'])
+
+        if args:
+            print "Only looking for changes on '%s'" % " ".join(args)
+        commits = repo.commits(since, until, " ".join(args), options.git_log.split(" "))
+
+        # add a new changelog section if:
+        if cp['Distribution'] != "UNRELEASED" and not found_snapshot_header and commits:
+            # the last version was a release and we have pending commits
+            add_section = True
+        elif options.new_version or not found_snapshot_header:
+            # the user wants to force a new version or switch to snapshot mode
+            add_section = True
+        else:
+            add_section = False
+
+        if add_section:
+            if commits:
+                first_commit = commits[0]
+                commits = commits[1:]
+                commit_msg, (commit_author, commit_email) = parse_commit(repo, first_commit, options)
+            else:
+                commit_msg = "UNRELEASED"
+                commit_author = None
+                commit_email = None
+            add_changelog_section(distribution="UNRELEASED", msg=commit_msg,
+                                  version=options.new_version, author=commit_author,
+                                  email=commit_email)
+
+        if commits:
+            shortlog_to_dch(repo, commits, options)
+            fixup_trailer(repo, git_author=options.git_author)
+        elif not first_commit:
+            print "No changes detected from %s to %s." % (since, until)
+
+        if options.release:
+            do_release(changelog, cp)
+        elif options.snapshot:
+            (snap, version) = do_snapshot(changelog, options.snapshot_number)
+            print "Changelog has been prepared for snapshot #%d at %s" % (snap, version)
+
+    except (GbpError, GitRepositoryError), err:
+        if len(err.__str__()):
+            print >>sys.stderr, err
+        ret = 1
+    return ret
+
+if __name__ == "__main__":
+    sys.exit(main(sys.argv))
+
+# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·:
diff --git a/tools/build-system/distributions/build-packages.sh b/tools/build-system/distributions/build-packages.sh
new file mode 100755
index 0000000000000000000000000000000000000000..0b9e09fbec4846af807dc51515e17b687a50d2e2
--- /dev/null
+++ b/tools/build-system/distributions/build-packages.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+#####################################################
+# File Name: build-packages.sh
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-29
+# Last Modified: 2009-06-01 17:27:25 -0400
+#####################################################
+
+. ./globals
+
+if [ "$?" -ne 0 ]; then
+	echo "!! Cannot source global file"
+	exit -1
+fi
+
+cd ${PACKAGING_DIR}
+
+if [ ! ${PACKAGING_DIR} ];then
+	echo "!! Cannot go to working directory"
+	exit -1
+fi
+
+# check if version is ok
+if [ ! ${VERSION} ]; then
+        echo "!! Cannot detect current version"
+        exit -1
+fi
+
+# open log file
+exec 3<>${LOG_FILE}
+
+# redirect outputs (stdout & stderr)
+exec 1>&3
+exec 2>&3
+
+echo "SFLPhone version is ${VERSION}"
+
+# check user
+if [ "${WHOAMI}" != "${USER}" ]; then
+        echo "!! Please use user ${USER} to run this script"
+        exit -1;
+fi
+
+if [ ${RELEASE_MODE} ]; then
+        echo "Release mode : ${RELEASE_MODE}"
+else
+        echo "Snapshot mode"
+fi
+
+# decompress repository
+echo "Untar repository"
+cd ${BUILD_DIR} && tar xf ${REPOSITORY_ARCHIVE} >/dev/null 2>&1
+
+if [ "$?" -ne "0" ]; then
+        echo " !! Cannot untar repository"
+        exit -1
+fi
+
+# launch distribution specific script
+if [ "${DISTRIBUTION}" = "ubuntu" ];then
+	echo "Launch packaging for Ubuntu (hardy/intrepid/jaunty)"
+	cd ${UBUNTU_DIR} && ./build-packages-ubuntu.sh $*
+
+elif [ "${DISTRIBUTION}" = "opensuse" ]; then
+	echo "Launch packaging for openSUSE 11"
+	cd ${OPENSUSE_DIR} && ./build-packages-opensuse.sh $*
+
+elif [ "${DISTRIBUTION}" = "mandriva" ]; then
+	echo "Launch packaging for Mandriva 2009.1"
+	cd ${MANDRIVA_DIR} && ./build-packages-mandriva.sh $*
+
+elif [ "${DISTRIBUTION}" = "fedora" ]; then
+	echo "Launch packaging for Fedora 11"
+	cd ${FEDORA_DIR} && ./build-packages-fedora.sh $*
+
+else
+	echo "!! Cannot detect distribution"
+	exit -1
+fi
+
+if [ "$?" -ne 0 ]; then
+	echo "!! Error in subprocess"
+	exit -1
+fi
+
+echo "All done"
+
+# close file descriptor
+exec 3>&-
+
+exit 0
diff --git a/tools/build-system/distributions/globals b/tools/build-system/distributions/globals
new file mode 100644
index 0000000000000000000000000000000000000000..0de0f01a92526f8b14998b8d8a4ed4c91137b8b1
--- /dev/null
+++ b/tools/build-system/distributions/globals
@@ -0,0 +1,53 @@
+#####################################################
+# File Name: globals
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-28
+# Last Modified: 2009-05-28 15:55:14 -0400
+#####################################################
+
+# general
+RELEASE_MODE="$1"
+ROOT_DIR="/home/sflphone"
+PACKAGING_DIR="${ROOT_DIR}/sflphone-packaging"
+
+# distributions
+UBUNTU_DIR="${PACKAGING_DIR}/ubuntu"
+OPENSUSE_DIR="${PACKAGING_DIR}/opensuse"
+MANDRIVA_DIR="${PACKAGING_DIR}/mandriva"
+FEDORA_DIR="${PACKAGING_DIR}/fedora"
+
+# where packaging will be donne
+BUILD_DIR="${PACKAGING_DIR}/build"
+REPOSITORY_ARCHIVE="${BUILD_DIR}/sflphone.tar.gz"
+REPOSITORY_DIR="${BUILD_DIR}/sflphone"
+
+# target directories
+DEB_RESULT_DIR="${PACKAGING_DIR}/deb/dists"
+RPM_RESULT_DIR="${PACKAGING_DIR}/rpm"
+
+# system information
+ARCH_FLAG=`getconf -a|grep LONG_BIT | sed -e 's/LONG_BIT\s*//'`
+OS_VERSION=`lsb_release -d -s -c | sed -e '1d'`
+DISTRIBUTION=`lsb_release -s -d | sed 's/"//g' | tr 'A-Z' 'a-z' | cut -d " " -f1`
+VERSION=`cat ${BUILD_DIR}/VERSION` 
+
+# other stuff
+EDITOR=echo
+export EDITOR
+RELEASE_MODE=$1
+USER="sflphone"
+WHOAMI=`whoami`
+
+# packages we will build
+PACKAGES=('sflphone-common sflphone-client-gnome' 'sflphone-client-kde')
+
+# log file
+LOG_ID="${OS_VERSION}"
+if [ "${LOG_ID}" = "" ]; then
+	LOG_ID="${DISTRIBUTION}"
+fi
+LOG_FILE=${PACKAGING_DIR}/sflphone-${LOG_ID}-${ARCH_FLAG}.log
diff --git a/tools/build-system/distributions/mandriva/build-packages-mandriva.sh b/tools/build-system/distributions/mandriva/build-packages-mandriva.sh
new file mode 100755
index 0000000000000000000000000000000000000000..0b52d2cbeb43482131daced31a154f3022bd4984
--- /dev/null
+++ b/tools/build-system/distributions/mandriva/build-packages-mandriva.sh
@@ -0,0 +1,94 @@
+#!/bin/bash
+#####################################################
+# File Name: build-packages-opensuse.sh
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-27
+# Last Modified: 2009-06-01 17:24:52 -0400
+#####################################################
+
+. ../globals
+
+cd ${MANDRIVA_DIR}
+
+if [ "$?" -ne "0" ]; then
+        echo " !! Cannot cd to Mandriva directory"
+        exit -1
+fi
+
+echo "Do updates"
+sudo /usr/sbin/urpmi --auto-update --auto >/dev/null
+
+# create build directories
+echo "Create directories"
+mkdir -p ${BUILD_DIR}/BUILD
+mkdir -p ${RPM_RESULT_DIR}
+mkdir -p ${BUILD_DIR}/SOURCES
+mkdir -p ${BUILD_DIR}/SPECS
+
+# create rpm macros
+echo "Create RPM macros"
+cat > ~/.rpmmacros << STOP
+%packager               Julien Bonjean (julien.bonjean@savoirfairelinux.com)
+%distribution           Savoir-faire Linux
+%vendor                 Savoir-faire Linux
+
+%_signature             gpg
+%_gpg_name              Julien Bonjean
+
+%_topdir                ${BUILD_DIR}
+%_builddir		%{_topdir}/BUILD
+%_rpmdir		${RPM_RESULT_DIR}
+%_sourcedir		%{_topdir}/SOURCES
+%_specdir		%{_topdir}/SPECS
+%_srcrpmdir		${RPM_RESULT_DIR}
+STOP
+
+# create packages
+for PACKAGE in ${PACKAGES[@]}
+do
+	echo "Prepare ${PACKAGE}"
+
+	cd ${REPOSITORY_DIR}
+
+	echo " -> create source archive"
+	mv ${PACKAGE} ${PACKAGE}-${VERSION} 2>/dev/null && \
+	tar cf ${PACKAGE}.tar.gz ${PACKAGE}-${VERSION} >/dev/null && \
+	mv ${PACKAGE}-${VERSION} ${PACKAGE}
+	
+	if [ "$?" -ne "0" ]; then
+		echo "!! Cannot create source archive"
+		exit -1
+	fi
+	
+	echo " -> move archive to source directory"
+	mv ${PACKAGE}.tar.gz ${BUILD_DIR}/SOURCES
+
+	if [ "$?" -ne "0" ]; then
+                echo "!! Cannot move archive"
+                exit -1
+        fi
+
+	cd ${PACKAGING_DIR}
+
+	echo " -> update spec file"
+	sed "s/VERSION/${VERSION}/g" opensuse/${PACKAGE}.spec > ${BUILD_DIR}/SPECS/${PACKAGE}.spec
+
+	if [ "$?" -ne "0" ]; then
+                echo "!! Cannot update spec file"
+                exit -1
+        fi
+done
+
+# launch build
+echo "Launch build"
+rpmbuild -ba ${BUILD_DIR}/SPECS/*.spec
+
+if [ "$?" -ne "0" ]; then
+	echo "!! Cannot build packages"
+	exit -1
+fi
+
diff --git a/tools/build-system/distributions/mandriva/sflphone-client-gnome.spec b/tools/build-system/distributions/mandriva/sflphone-client-gnome.spec
new file mode 100644
index 0000000000000000000000000000000000000000..5266efec3706783d9cf19a2bbb32feb736c17d0a
--- /dev/null
+++ b/tools/build-system/distributions/mandriva/sflphone-client-gnome.spec
@@ -0,0 +1,74 @@
+#####################################################
+# File Name: sflphone-client-gnome.spec
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-27
+# Last Modified: 2009-05-27 17:23:32 -0400
+#####################################################
+
+Name:           sflphone-client-gnome
+License:        GNU General Public License (GPL)
+Group:          Productivity/Networking/System
+Summary:        GNOME client for SFLphone
+Version:        VERSION
+Release:        mandriva
+URL:            http://www.sflphone.org/
+Vendor:		Savoir-faire Linux
+Packager:       Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}
+Source0:        sflphone-client-gnome.tar.gz
+BuildRequires:	gtk2-devel
+BuildRequires:	libnotify-devel
+BuildRequires:	libsexy-devel
+BuildRequires:	evolution-data-server-devel
+BuildRequires:	check-devel
+BuildRequires:	libdbus-glib-devel
+BuildRequires:	log4c-devel
+Requires:	sflphone-common = %{version}
+Requires:	dbus-1-glib
+Requires:	gtk2
+Requires:	glib2
+Requires:	dbus-1-glib
+Requires:	libnotify
+Requires:	librsvg
+Requires:	log4c
+Requires:	libsexy
+Conflicts:	sflphone
+Prefix:		%{_prefix}
+
+%description
+Provide a GNOME client for SFLphone.
+ SFLphone is meant to be a robust enterprise-class desktop phone.
+ SFLphone is released under the GNU General Public License.
+ SFLphone is being developed by the global community, and maintained by
+ Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company.
+
+Authors:
+--------
+    Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+%lang_package
+
+%prep
+%setup -q
+
+%build
+./autogen.sh --prefix=%{_prefix}
+make -j
+
+%install
+make prefix=%{buildroot}/%{_prefix} install
+
+%clean
+make clean
+
+%files
+%defattr(-, root, root)
+%{_prefix}/*
+%doc AUTHORS COPYING README
+
+%changelog
diff --git a/tools/build-system/distributions/mandriva/sflphone-client-kde.spec b/tools/build-system/distributions/mandriva/sflphone-client-kde.spec
new file mode 100644
index 0000000000000000000000000000000000000000..f9fe31205bef2c40ce700e6a1297e751ccac54e0
--- /dev/null
+++ b/tools/build-system/distributions/mandriva/sflphone-client-kde.spec
@@ -0,0 +1,67 @@
+#####################################################
+# File Name: sflphone-client-kde.spec
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-27
+# Last Modified: 2009-05-27 17:23:32 -0400
+#####################################################
+
+Name:           sflphone-client-kde
+License:        GNU General Public License (GPL)
+Group:          Productivity/Networking/System
+Summary:        KDE client for SFLphone
+Version:        VERSION
+Release:        mandriva
+URL:            http://www.sflphone.org/
+Vendor:		Savoir-faire Linux
+Packager:       Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}
+Source0:        sflphone-client-kde.tar.gz
+Requires:	sflphone-common = %{version}
+Requires:	commoncpp2
+Requires:	libkdepimlibs4
+Requires:	libqt4-dbus-1
+Requires:	libqt4-svg
+Requires:	libqt4-x11
+BuildRequires:  cmake
+BuildRequires:  libcommoncpp-devel
+BuildRequires:  kdepimlibs4-devel
+Conflicts:	sflphone
+Prefix:		%{_prefix}
+
+%description
+Provide a KDE client for SFLphone.
+ SFLphone is meant to be a robust enterprise-class desktop phone.
+ SFLphone is released under the GNU General Public License.
+ SFLphone is being developed by the global community, and maintained by
+ Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company.
+
+Authors:
+--------
+    Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+%lang_package
+
+%prep
+%setup -q
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX=%{buildroot}/%{_prefix}
+make -j
+
+%install
+make install
+
+%clean
+make clean
+
+%files
+%defattr(-, root, root)
+%{_prefix}/*
+%doc AUTHORS COPYING README
+
+%changelog
diff --git a/tools/build-system/distributions/mandriva/sflphone-common.spec b/tools/build-system/distributions/mandriva/sflphone-common.spec
new file mode 100644
index 0000000000000000000000000000000000000000..35bcbe1e6cfd61cf1c73787f2e15621341856a8a
--- /dev/null
+++ b/tools/build-system/distributions/mandriva/sflphone-common.spec
@@ -0,0 +1,89 @@
+#####################################################
+# File Name: sflphone-common.spec
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-27
+# Last Modified: 2009-05-27 17:23:32 -0400
+#####################################################
+
+Name:           sflphone-common
+License:        GNU General Public License (GPL)
+Group:          System Environment/Daemons
+Summary:        SIP and IAX2 compatible softphone - Core
+Version:        VERSION
+Release:        mandriva
+URL:            http://www.sflphone.org/
+Vendor:         Savoir-faire Linux
+Packager:	Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}
+Source0:        sflphone-common.tar.gz
+BuildRequires:	glibc-devel
+BuildRequires:	libccrtp-devel
+BuildRequires:	libsamplerate-devel
+BuildRequires:	dbus-1-devel
+BuildRequires:	libexpat-devel
+BuildRequires:	libgsm-devel
+BuildRequires:	speex-devel
+BuildRequires:	libcppunit-devel
+BuildRequires:	libcommoncpp-devel
+BuildRequires:	libalsa2-devel
+BuildRequires:	libpulseaudio-devel
+BuildRequires:	libext2fs-devel
+Requires:	libsamplerate
+Requires:	libexpat1
+Requires:	commoncpp2
+Requires:	libgsm1
+Requires:	libspeex
+Requires:	dbus-1
+Requires:	libasound2
+Requires:	libpulse0
+Requires:	libccrtp1
+Conflicts:      sflphone
+Prefix:		%{_prefix}
+
+%description
+SFLphone is meant to be a robust enterprise-class desktop phone.
+ SFLphone is released under the GNU General Public License.
+ SFLphone is being developed by the global community, and maintained by
+ Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company.
+
+Authors:
+--------
+    Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+%prep
+%setup -q
+
+%build
+cd libs/pjproject-1.0.1
+./autogen.sh --prefix=%{_prefix}
+make dep
+make clean
+make
+cd -
+./autogen.sh --prefix=%{_prefix}
+make -j
+
+%install
+cd libs/pjproject-1.0.1
+make prefix=%{buildroot}/%{_prefix} install
+cd -
+make prefix=%{buildroot}/%{_prefix} install
+
+%clean
+cd libs/pjproject-1.0.1
+make clean
+cd -
+make clean
+
+%files
+%defattr(-, root, root)
+%{_prefix}/*
+%exclude %{_prefix}/include
+%doc AUTHORS COPYING README TODO
+
+%changelog
diff --git a/tools/build-system/distributions/opensuse/build-packages-opensuse.sh b/tools/build-system/distributions/opensuse/build-packages-opensuse.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c637ed4ed21757f17d2fe0c10d83afd14abfc71a
--- /dev/null
+++ b/tools/build-system/distributions/opensuse/build-packages-opensuse.sh
@@ -0,0 +1,94 @@
+#!/bin/bash
+#####################################################
+# File Name: build-packages-opensuse.sh
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-27
+# Last Modified: 2009-05-29 18:11:44 -0400
+#####################################################
+
+. ../globals
+
+cd ${OPENSUSE_DIR}
+
+if [ "$?" -ne "0" ]; then
+        echo " !! Cannot cd to openSUSE directory"
+        exit -1
+fi
+
+echo "Do updates"
+sudo /usr/bin/zypper -n update >/dev/null
+
+# create build directories
+echo "Create directories"
+mkdir -p ${BUILD_DIR}/BUILD
+mkdir -p ${RPM_RESULT_DIR}
+mkdir -p ${BUILD_DIR}/SOURCES
+mkdir -p ${BUILD_DIR}/SPECS
+
+# create rpm macros
+echo "Create RPM macros"
+cat > ~/.rpmmacros << STOP
+%packager               Julien Bonjean (julien.bonjean@savoirfairelinux.com)
+%distribution           Savoir-faire Linux
+%vendor                 Savoir-faire Linux
+
+%_signature             gpg
+%_gpg_name              Julien Bonjean
+
+%_topdir                ${BUILD_DIR}
+%_builddir		%{_topdir}/BUILD
+%_rpmdir		${RPM_RESULT_DIR}
+%_sourcedir		%{_topdir}/SOURCES
+%_specdir		%{_topdir}/SPECS
+%_srcrpmdir		${RPM_RESULT_DIR}
+STOP
+
+# create packages
+for PACKAGE in ${PACKAGES[@]}
+do
+	echo "Prepare ${PACKAGE}"
+
+	cd ${REPOSITORY_DIR}
+
+	echo " -> create source archive"
+	mv ${PACKAGE} ${PACKAGE}-${VERSION} 2>/dev/null && \
+	tar cf ${PACKAGE}.tar.gz ${PACKAGE}-${VERSION} >/dev/null && \
+	mv ${PACKAGE}-${VERSION} ${PACKAGE}
+	
+	if [ "$?" -ne "0" ]; then
+		echo "!! Cannot create source archive"
+		exit -1
+	fi
+	
+	echo " -> move archive to source directory"
+	mv ${PACKAGE}.tar.gz ${BUILD_DIR}/SOURCES
+
+	if [ "$?" -ne "0" ]; then
+                echo "!! Cannot move archive"
+                exit -1
+        fi
+
+	cd ${PACKAGING_DIR}
+
+	echo " -> update spec file"
+	sed "s/VERSION/${VERSION}/g" opensuse/${PACKAGE}.spec > ${BUILD_DIR}/SPECS/${PACKAGE}.spec
+
+	if [ "$?" -ne "0" ]; then
+                echo "!! Cannot update spec file"
+                exit -1
+        fi
+done
+
+# launch build
+echo "Launch build"
+rpmbuild -ba ${BUILD_DIR}/SPECS/*.spec
+
+if [ "$?" -ne "0" ]; then
+	echo "!! Cannot build packages"
+	exit -1
+fi
+
diff --git a/tools/build-system/distributions/opensuse/sflphone-client-gnome.spec b/tools/build-system/distributions/opensuse/sflphone-client-gnome.spec
new file mode 100644
index 0000000000000000000000000000000000000000..f9cc62a3e275782ae72735f44b42230caf5cde37
--- /dev/null
+++ b/tools/build-system/distributions/opensuse/sflphone-client-gnome.spec
@@ -0,0 +1,74 @@
+#####################################################
+# File Name: sflphone-client-gnome.spec
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-27
+# Last Modified: 2009-05-27 17:23:32 -0400
+#####################################################
+
+Name:           sflphone-client-gnome
+License:        GNU General Public License (GPL)
+Group:          Productivity/Networking/System
+Summary:        GNOME client for SFLphone
+Version:        VERSION
+Release:        opensuse
+URL:            http://www.sflphone.org/
+Vendor:		Savoir-faire Linux
+Packager:       Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}
+Source0:        sflphone-client-gnome.tar.gz
+BuildRequires:	liblog4c-devel
+BuildRequires:	gtk2-devel
+BuildRequires:	dbus-1-glib-devel
+BuildRequires:	libnotify-devel
+BuildRequires:	libsexy-devel
+BuildRequires:	evolution-data-server-devel
+BuildRequires:	check-devel
+Requires:	sflphone-common = %{version}
+Requires:	dbus-1-glib
+Requires:	gtk2
+Requires:	glib2
+Requires:	dbus-1-glib
+Requires:	libnotify
+Requires:	librsvg
+Requires:	liblog4c3
+Requires:	libsexy
+Conflicts:	sflphone
+Prefix:		%{_prefix}
+
+%description
+Provide a GNOME client for SFLphone.
+ SFLphone is meant to be a robust enterprise-class desktop phone.
+ SFLphone is released under the GNU General Public License.
+ SFLphone is being developed by the global community, and maintained by
+ Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company.
+
+Authors:
+--------
+    Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+%lang_package
+
+%prep
+%setup -q
+
+%build
+./autogen.sh --prefix=%{_prefix}
+make -j
+
+%install
+make prefix=%{buildroot}/%{_prefix} install
+
+%clean
+make clean
+
+%files
+%defattr(-, root, root)
+%{_prefix}/*
+%doc AUTHORS COPYING README
+
+%changelog
diff --git a/tools/build-system/distributions/opensuse/sflphone-client-kde.spec b/tools/build-system/distributions/opensuse/sflphone-client-kde.spec
new file mode 100644
index 0000000000000000000000000000000000000000..a92ee2554a33385d05e949044599e2a9e6f1d0bd
--- /dev/null
+++ b/tools/build-system/distributions/opensuse/sflphone-client-kde.spec
@@ -0,0 +1,67 @@
+#####################################################
+# File Name: sflphone-client-kde.spec
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-27
+# Last Modified: 2009-05-27 17:23:32 -0400
+#####################################################
+
+Name:           sflphone-client-kde
+License:        GNU General Public License (GPL)
+Group:          Productivity/Networking/System
+Summary:        KDE client for SFLphone
+Version:        VERSION
+Release:        opensuse
+URL:            http://www.sflphone.org/
+Vendor:		Savoir-faire Linux
+Packager:       Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}
+Source0:        sflphone-client-kde.tar.gz
+Requires:	sflphone-common = %{version}
+Requires:	commoncpp2
+Requires:	libkdepimlibs4
+Requires:	libqt4-dbus-1
+Requires:	libqt4-svg
+Requires:	libqt4-x11
+BuildRequires:  cmake
+BuildRequires:  libkdepimlibs4-devel
+BuildRequires:  commoncpp2-devel
+Conflicts:	sflphone
+Prefix:		%{_prefix}
+
+%description
+Provide a KDE client for SFLphone.
+ SFLphone is meant to be a robust enterprise-class desktop phone.
+ SFLphone is released under the GNU General Public License.
+ SFLphone is being developed by the global community, and maintained by
+ Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company.
+
+Authors:
+--------
+    Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+%lang_package
+
+%prep
+%setup -q
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX=%{buildroot}/%{_prefix}
+make -j
+
+%install
+make install
+
+%clean
+make clean
+
+%files
+%defattr(-, root, root)
+%{_prefix}/*
+%doc AUTHORS COPYING README
+
+%changelog
diff --git a/tools/build-system/distributions/opensuse/sflphone-common.spec b/tools/build-system/distributions/opensuse/sflphone-common.spec
new file mode 100644
index 0000000000000000000000000000000000000000..721bda7e1abb1d87fd7ce906b4549da934efea18
--- /dev/null
+++ b/tools/build-system/distributions/opensuse/sflphone-common.spec
@@ -0,0 +1,88 @@
+#####################################################
+# File Name: sflphone-common.spec
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-27
+# Last Modified: 2009-05-27 17:23:32 -0400
+#####################################################
+
+Name:           sflphone-common
+License:        GNU General Public License (GPL)
+Group:          System Environment/Daemons
+Summary:        SIP and IAX2 compatible softphone - Core
+Version:        VERSION
+Release:        opensuse
+URL:            http://www.sflphone.org/
+Vendor:         Savoir-faire Linux
+Packager:	Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}
+Source0:        sflphone-common.tar.gz
+BuildRequires:	libpulse-devel
+BuildRequires:	commoncpp2-devel
+BuildRequires:	libccrtp-devel
+BuildRequires:	libsamplerate-devel
+BuildRequires:	dbus-1-devel
+BuildRequires:	libexpat-devel
+BuildRequires:	libgsm-devel
+BuildRequires:	speex-devel
+BuildRequires:	libcppunit-devel
+BuildRequires:	alsa-devel
+BuildRequires:	libuuid-devel
+Requires:	libsamplerate
+Requires:	libexpat1
+Requires:	commoncpp2
+Requires:	libgsm1
+Requires:	libspeex
+Requires:	dbus-1
+Requires:	libasound2
+Requires:	libpulse0
+Requires:	libccrtp1
+Conflicts:      sflphone
+Prefix:		%{_prefix}
+
+%description
+SFLphone is meant to be a robust enterprise-class desktop phone.
+ SFLphone is released under the GNU General Public License.
+ SFLphone is being developed by the global community, and maintained by
+ Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company.
+
+Authors:
+--------
+    Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+
+%prep
+%setup -q
+
+%build
+cd libs/pjproject-1.0.1
+./autogen.sh --prefix=%{_prefix}
+make dep
+make clean
+make
+cd -
+./autogen.sh --prefix=%{_prefix}
+make -j
+
+%install
+cd libs/pjproject-1.0.1
+make prefix=%{buildroot}/%{_prefix} install
+cd -
+make prefix=%{buildroot}/%{_prefix} install
+
+%clean
+cd libs/pjproject-1.0.1
+make clean
+cd -
+make clean
+
+%files
+%defattr(-, root, root)
+%{_prefix}/*
+%exclude %{_prefix}/include
+%doc AUTHORS COPYING README TODO
+
+%changelog
diff --git a/tools/build-system/distributions/ubuntu/build-packages-ubuntu.sh b/tools/build-system/distributions/ubuntu/build-packages-ubuntu.sh
new file mode 100755
index 0000000000000000000000000000000000000000..ed92471607933a2bf23ae5e8dc2ee34ee9e161c9
--- /dev/null
+++ b/tools/build-system/distributions/ubuntu/build-packages-ubuntu.sh
@@ -0,0 +1,106 @@
+#!/bin/bash
+#
+# @author: Yun Liu <yun.liu@savoirfairelinux.com>, Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+#
+# Refer to http://www.sflphone.org for futher information
+#
+
+. ../globals
+
+cd ${UBUNTU_DIR}
+
+if [ "$?" -ne "0" ]; then
+        echo " !! Cannot cd to Ubuntu directory"
+        exit -1
+fi
+
+PACKAGE_SYSVER="0ubuntu1"
+FULL_VERSION="${VERSION}-${PACKAGE_SYSVER}"
+
+#########################
+# BEGIN
+#########################
+
+DIST="dist"
+if [ ${RELEASE_MODE} ]; then
+	if [ "${RELEASE_MODE}" != "release" ]; then
+		DIST="${DIST}-testing"
+	fi
+else
+	DIST="${DIST}-daily"
+fi
+
+echo "Do updates"
+sudo apt-get update >/dev/null
+sudo apt-get upgrade -y >/dev/null
+
+for PACKAGE in ${PACKAGES[@]}
+do
+        echo "Process ${PACKAGE}"
+
+	echo " -> prepare debian directories"
+	mv ${UBUNTU_DIR}/debian-${PACKAGE} ${REPOSITORY_DIR}/${PACKAGE}/debian
+
+	# generate the changelog
+	echo " -> generate changelog"
+	sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_DIR}/${PACKAGE}/debian/changelog && \
+	sed -i 's/SYSVER/'${PACKAGE_SYSVER}'/g' ${REPOSITORY_DIR}/${PACKAGE}/debian/changelog
+
+	if [ "$?" -ne "0" ]; then
+		echo "!! Cannot generate changelog"
+		exit -1
+	fi
+
+	# copy the appropriate control file based on architecture
+	echo " -> generate control file"
+	if [ ! -e ${REPOSITORY_DIR}/${PACKAGE}/debian/control.$OS_VERSION ];then
+		echo " -> no control file, skipping"
+		continue
+	fi
+	cp ${REPOSITORY_DIR}/${PACKAGE}/debian/control.$OS_VERSION ${REPOSITORY_DIR}/${PACKAGE}/debian/control && \
+ 	sed -i "s/VERSION/${FULL_VERSION}/g" ${REPOSITORY_DIR}/${PACKAGE}/debian/control
+
+	if [ "$?" -ne "0" ]; then
+	        echo "!! Cannot generate control file"
+	        exit -1
+	fi
+
+	# provide prerequisite directories used by debuild
+	echo " -> prepare directories"
+	cp -r ${REPOSITORY_DIR}/${PACKAGE} ${REPOSITORY_DIR}/${PACKAGE}-${FULL_VERSION}.orig && \
+	mv ${REPOSITORY_DIR}/${PACKAGE} ${REPOSITORY_DIR}/${PACKAGE}-${FULL_VERSION}
+
+	# build package sflphone-common
+	cd ${REPOSITORY_DIR}/${PACKAGE}-${FULL_VERSION}/debian && \
+	debuild -us -uc
+
+	if [ "$?" -ne "0" ]; then
+	        echo "!! Cannot generate package ${PACKAGE}"
+	        exit -1
+	fi
+done
+
+# move to dist
+echo "Deploy files in dist directories"
+BINARY_DIR=""
+if [ "${ARCH_FLAG}" -eq "32" ]; then
+	BINARY_DIR="binary-i386"
+else
+	BINARY_DIR="binary-amd64"
+fi
+
+mkdir -p ${DEB_RESULT_DIR}/${DIST}/universe/source
+mkdir -p ${DEB_RESULT_DIR}/${DIST}/universe/${BINARY_DIR}
+
+mv ${REPOSITORY_DIR}/sflphone*.deb ${DEB_RESULT_DIR}/${DIST}/universe/${BINARY_DIR} && \
+mv ${REPOSITORY_DIR}/sflphone*.dsc ${DEB_RESULT_DIR}/${DIST}/universe/source/ && \
+mv ${REPOSITORY_DIR}/sflphone*.build ${DEB_RESULT_DIR}/${DIST}/universe/source/ && \
+mv ${REPOSITORY_DIR}/sflphone*.changes ${DEB_RESULT_DIR}/${DIST}/universe/source/ && \
+mv ${REPOSITORY_DIR}/sflphone*.orig.tar.gz ${DEB_RESULT_DIR}/${DIST}/universe/source/ && \
+mv ${REPOSITORY_DIR}/sflphone*.diff.gz ${DEB_RESULT_DIR}/${DIST}/universe/source/
+
+if [ "$?" -ne "0" ]; then
+        echo "!! Cannot copy dist files"
+        exit -1
+fi
+
diff --git a/sflphone-client-kde/debian/changelog b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/changelog
similarity index 71%
rename from sflphone-client-kde/debian/changelog
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/changelog
index c1edbb33a86c23182ef4a2bdf328359ef7774fd7..b1c23da835fa6c25603851b9160396e4917e544c 100644
--- a/sflphone-client-kde/debian/changelog
+++ b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/changelog
@@ -1,44 +1,212 @@
-sflphone-client-kde (0.9.6-0ubuntu1~1.gbpf07060) SYSTEM; urgency=low
-
-  ** SNAPSHOT build @f07060721d61850d67b89f24f0415d7237281886 **
-
-  [ Emmanuel Milou ]
-  * [#1220] Add Conflicts: sflphone in debian control files
-  * [#1179] Add liblog4c3 runtime dependency
-  * [#1212] FIx typo error in dependency list for itnrepid
-  * [#1212] FIx .desktop file to point on the right exec
-  * [#1212] Modify changelog replacing tag
-
-  [ Sflphone Project ]
-  * "[#1262] Updated changelogs for version 0.9.5-0ubuntu1~beta"
-
-  [ Emmanuel Milou ]
-  * [#1212] restore changelogs
-
-  [ Sflphone Project ]
+sflphone-client-gnome (0.9.5-SYSVER~snapshot1243483310) SYSTEM; urgency=low
+
+    ** SNAPSHOT 1243483310 **
+
+  * [#1317] Remove spec files from configure
+  * [#1317] Added missing prefix
+  * [#1430] Add a connection reference which most likely belong to
+    libdbus
+  * [#1430] Use shared connection instead of private
+  * [#1317] Fixed packaging rules
+  * [#1317] Updated autogen
+  * Updated autogen.sh for pjsip
+  * [#1317] Fixed pjsip lib dirs
+  * [#1317] Updated debian packaging for new pjsip configuration script
+  * [#1317] Switch to autogenerated guess and sub files
+  * [#1317] Updated pjsip inclusion in build system
+  * [#1317] Replaced pjsip guess and sub files
+  * [#1317] Fixed compilation issues on opensuse 11
+  * [#1505] account list seem to crash the application when clicking
+    Apply very fast...
+  * [#1456] Add a flag to be replaced in the control files
+  * [#1456] Added version dependancy handling
+  * put account alias in AccountWidgetItem rather than in the item with
+    "    " before.
+  * [#1034] The KDE client should start sflphoned if it is not started
+  * [#1500] Handle options for notifications and display on incoming
+    call.
+  * [#1443] Client should not crash when receive an unexpected
+    stateChanged signal
+  * [#1456] Added version dependancy handling
+  * [#1426] Daemon crashes when get alsa plugin
+  * [#1422] Improved error messages
+  * commit for merge
+  * [#1424] Change logo in tray icon and put a different one when
+    incoming call
+  * [#1425] first part done, window title...
+  * [#1413] add manpages creating and installing in build system
+  * [#1417] The client should start the account creation wizard if
+    started for the first time (if config file doesn't exist)
+  * [#1421] Make volume bars horizontal when dialpad is hidden.
+  * Changed main window title and fixed a mistake in sflphone_const.h
+  * [#1412] make debian package building work
+  * changelog changed.
+  * Changed addAccount method in gnome client.
+  * Debian and man folders added.
+  * [#1388] Change project name from sflphone_kde to sflphone-client-kde
+  * Better handle of kabc check.
+  * [#1351] Automatic generation of dbus interfaces in makefile
+    generated by cmake
+  * [#1307] Implement "edit before call" in history and address book.
+  * [#1344] change action_call label in call history from "call" to
+    "call back".
+  * [#1308] Implement Hook feature in kde client
+  * Improved build system.
+  * #1219 : Add address book configuration page
+  * Better handling of registration to the daemon.
+  * #1039 : Add tray icon in kde.
+  * Issue no 1216 : Double click on item in history or address book
+    causes call.
+  * display peer name in call list and call history when called from
+    address book.
+  * Address book functionnal with photo displayed.
+  * Help menu kde available but actions disappeared. All fonctions in
+    view.
+  * Address book functionnal but ugly and making its own sort in the
+    complete address book.
+  * Account choice on right click, clean out includes, page address
+    book, fixed bugs...
+  * Wizard, double click, context menu...
+  * Removed sflphone_kde.kdevelop.filelist
+  * Added account creation wizard and translated interface in english.
+  * Transfer functionnal but ugly.
+  * transfer not functionnal
+  * Bug fixed : unholding (UNHOLD_CURRENT, UNHOLD_RECORD)
+  * Commit functional for push. With install.sh
+  * Before merge.
+  * Problem with enable accounts. Account display increased.
+  * Functional with codec order working , playDTMF.
+  * Commit functional.
+  * sflphone_kde/build added in .gitignore.
+  * complete commit for checkout previous.
+  * Commit before checkout previous version to check the display
+    bug(little font everywhere...)
+  * Functionnal client. Rest : history icons, config icons and
+    functionalities
+  * commit before merge asavard for isRecording.
+  * Call and Automate fusion done and seems to work.
+  * Commiting before putting Automate class in Call class.
+  * Functionnal main window without recording, history, voicemail, kio
+    widgets.
+  * client kde avec kdevelop.
+  * Config Dialog almost finished.
+  * Base of QT client
+
+ -- SFLphone Automatic Build System <team@sflphone.org>  Thu, 28 May 2009 00:02:48 -0400
+
+sflphone-client-gnome (0.9.5-SYSVER) SYSTEM; urgency=low
+
+    ** 0.9.5 release **
+
+  * [#1060] FIx bug in chinese translation
+  * [#1313] git add rtpTest.cpp rtpTest.h
+  * [#1313] Add init/close rtp tests
+  * [#1313] Basic instanciation of the rtp layer
+  * [#1449] Gtk-Critical concerning history filters and new calls
+  * [#1400] Make the match with the hostname instead of username
+  * [#1324] Change status bar label for "Using %s (%s)"
+  * [#1403] Icon size: 60x60 px
+  * [#1403] Do not remove notification, improve icon quality
+  * [#1403] Add smaller icon for gnome notifications
+  * [#1403] Prevent crash when hangup && no notification
+  * [#1403] Remove all actions on notifications; code refactoring
+  * [#1451] Use stun.sflphone.org as default STUN server
+  * [#1060] New po files - need to be translated
+  * [#1060] Update french translation - Rebuild template file
+  * [#1456] Add a flag to be replaced in the control files
+  * [#1454] Make cppunit optional; remove from build deps in control
+    files
+  * [#1401] Add libexpat1-dev dependency in control files
+  * [#1448] Take off these ugly debug messages
+  * [#1448] fixed getTelephoneTone and getTelephoneFile() called
+    repeatedly
+  * [#1406] add liblog4c-dev in build-depends
+  * [#1409] Restore .desktop icon
+
+ -- SFLphone Automatic Build System <team@sflphone.org>  Mon, 25 May 2009 11:34:48 -0400
+
+sflphone-client-gnome (0.9.5-SYSVER~rc2) SYSTEM; urgency=low
+
+    ** 0.9.5 rc2 **
+
+  * [#1422] Improved error message
+  * [#1402] Fix pjsip build
+  * [#1404] Clear GTK-Critical Bug at client startup
+  * [#1422] Added automatic VM shutdown when building on more than one
+    VM
+  * [#1422] Fixed some issues with new changelog generation script
+  * [#1422] Moved distribution update to specific file
+  * [#1422] Dropped git-dch, replace by home made implementation
+  * [#1402] Fix pjsip build
+  * [#1404] Clear GTK-Critical Bug at client startup
+  * Changes for name based dbus connection
+  * Clean changelogs
+  * [#1343] Gnome: Implement a callback system to handle focus on
+    different widgets
+  * Debus Session
+  * Refactoring Python code, PEP8
+  * [#1430] Get back dbus_g_proxy_new_for_name
+  * [#1430] Get back DBUS_BUS_SESSION type
+  * [#1430] Dbus fixed owner message binding
+  * Second test with DBUS owner
+  * [#1404] Gnome -> Preferences -> Hooks
+  * [#1404] Gnome -> Preferences -> Recordings
+  * [#1404] Call History
+  * [#1404] Gnome -> Preferences -> Address Book
+  * [#1404] IF the first notification option disable the second
+    notification
+  * Dbus with fixed owner does not automatically start the deamon
+  * Add codec debug tests in pysflphone
+  * [#1407] Some print info
+  * [#1407] Add a scenario to pick_up action
+  * Test client dbus connection to a fixed owner
+  * Add python dbus test suite
+  * [#1161] Modified version handling in build system
+  * [#1314] Test pulse audio and audio streams connect and disconnect
+  * [#1402] Add info message after configure
+  * [#1402] Build the daemon with the local pjsip library (vs the
+    installed one)
+  * [#1009] Fix Codec Sampling Rate set to zeros
+  * [#1314] Add mutex to pulse layer audio streams
+  * [#1314] Refactoring pulseaudio stream to test connect disconnect
+  * [#1314] Refactoring of pulselayer to test conect/disconnect
+  * Add debug messages in debus calls concerning account
+  * [#1314] Add some return values to audio init functions
+  * [#1406] add liblog4c-dev in build-depends
+  * [#1409] Restore .desktop icon
+  * Bug #1405: Fix strings as requested.
+  * Bug #1404: Fix strings in preferences panel.
+
+ -- SFLphone Automatic Build System <team@sflphone.org>  Tue, 19 May 2009 12:08:18 -0400
+
+sflphone-client-gnome (0.9.5-0ubuntu1~rc1) SYSTEM; urgency=low
+
+  [ SFLphone Project ]
   * [#1262] Updated changelogs for version 0.9.5-0ubuntu1 Snapshot 2009-
-    04-27
+    05-05
 
   [ Emmanuel Milou ]
-  * [#1212] restore changelogs
+  * Add some python CLI client code; not really functional
+  * [#1108] Fix peerHungup method for IP to IP call
 
-  [ Sflphone Project ]
-  * [#1262] Updated changelogs for version 0.9.5-0ubuntu1~beta
+  [ Alexandre Savard ]
+  * [#1108] Correct setting of SIP contact for direct IP call
+  * [#1108] SIP user agent handles incoming REFER
 
   [ Emmanuel Milou ]
-  * [#1212] restore changelogs
+  * Remove website from repository
+  * Update translation
 
-  [ Sflphone Project ]
-  * [#1262] Updated changelogs for version 0.9.5-0ubuntu1~beta
-  * [#1262] Updated changelogs for version 0.9.5-0ubuntu1 Snapshot 2009-
-    04-28
+  [ Alexandre Savard ]
+  * Sflphone icon's tooltip changed for "configured" instead of
+    "registered"
 
   [ Emmanuel Milou ]
-  * [#1212] Restore changelogs
+  * Update translation
 
   [ Sflphone Project ]
 
- -- Sflphone Project <sflphone@mtl.savoirfairelinux.net>  Tue, 28 Apr 2009 12:23:35 -0400
+ -- Sflphone Project <sflphone@mtl.savoirfairelinux.net>  Tue, 05 May 2009 19:16:13 -0400
 
 sflphone-client-gnome (0.9.5-0ubuntu1~beta) SYSTEM; urgency=low
 
diff --git a/sflphone-client-gnome/debian/compat b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/compat
similarity index 100%
rename from sflphone-client-gnome/debian/compat
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/compat
diff --git a/sflphone-client-gnome/debian/control.hardy b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.hardy
similarity index 100%
rename from sflphone-client-gnome/debian/control.hardy
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.hardy
diff --git a/sflphone-client-gnome/debian/control.intrepid b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.intrepid
similarity index 100%
rename from sflphone-client-gnome/debian/control.intrepid
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.intrepid
diff --git a/sflphone-client-gnome/debian/control.jaunty b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.jaunty
similarity index 100%
rename from sflphone-client-gnome/debian/control.jaunty
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.jaunty
diff --git a/sflphone-client-gnome/debian/copyright b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/copyright
similarity index 100%
rename from sflphone-client-gnome/debian/copyright
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/copyright
diff --git a/sflphone-client-gnome/debian/cron.d b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/cron.d
similarity index 100%
rename from sflphone-client-gnome/debian/cron.d
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/cron.d
diff --git a/sflphone-client-gnome/debian/dirs b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/dirs
similarity index 100%
rename from sflphone-client-gnome/debian/dirs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/dirs
diff --git a/sflphone-client-gnome/debian/docs b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/docs
similarity index 100%
rename from sflphone-client-gnome/debian/docs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/docs
diff --git a/sflphone-client-gnome/debian/manpages b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/manpages
similarity index 100%
rename from sflphone-client-gnome/debian/manpages
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/manpages
index f070887d4e37fdd036f31f26e6e8f46d646d8b4e..7e7594591214b5e3a4c8134fabe9696c84b04907 100644
--- a/sflphone-client-gnome/debian/manpages
+++ b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/manpages
@@ -1,2 +1,2 @@
-debian/sflphone-client-gnome/usr/share/man/man1/sflphone.1
 debian/sflphone-client-gnome/usr/share/man/man1/sflphone-client-gnome.1
+debian/sflphone-client-gnome/usr/share/man/man1/sflphone.1
diff --git a/sflphone-client-gnome/debian/postinst b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/postinst
similarity index 100%
rename from sflphone-client-gnome/debian/postinst
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/postinst
diff --git a/sflphone-client-gnome/debian/postrm b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/postrm
similarity index 100%
rename from sflphone-client-gnome/debian/postrm
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/postrm
diff --git a/sflphone-client-gnome/debian/preinst b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/preinst
similarity index 100%
rename from sflphone-client-gnome/debian/preinst
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/preinst
diff --git a/sflphone-client-gnome/debian/prerm b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/prerm
similarity index 100%
rename from sflphone-client-gnome/debian/prerm
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/prerm
diff --git a/sflphone-client-gnome/debian/rules b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/rules
similarity index 100%
rename from sflphone-client-gnome/debian/rules
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/rules
diff --git a/sflphone-client-gnome/debian/changelog b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/changelog
similarity index 86%
rename from sflphone-client-gnome/debian/changelog
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/changelog
index d7f2215ec7af7ef67046cea14d591acdeff1f9a0..408e3afe0806e687b2542f5e95f6a8a46c823b74 100644
--- a/sflphone-client-gnome/debian/changelog
+++ b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/changelog
@@ -1,4 +1,85 @@
-sflphone-client-gnome (0.9.5-SYSVER) SYSTEM; urgency=low
+sflphone-client-kde (0.9.5-SYSVER~snapshot1243310516) SYSTEM; urgency=low
+
+    ** SNAPSHOT 1243310516 **
+
+  * [#1317] Fixed compilation issues on opensuse 11
+  * [#1505] account list seem to crash the application when clicking
+    Apply very fast...
+  * [#1456] Add a flag to be replaced in the control files
+  * [#1456] Added version dependancy handling
+  * put account alias in AccountWidgetItem rather than in the item with
+    "    " before.
+  * [#1034] The KDE client should start sflphoned if it is not started
+  * [#1500] Handle options for notifications and display on incoming
+    call.
+  * [#1443] Client should not crash when receive an unexpected
+    stateChanged signal
+  * [#1426] Daemon crashes when get alsa plugin
+  * commit for merge
+  * [#1424] Change logo in tray icon and put a different one when
+    incoming call
+  * [#1425] first part done, window title...
+  * [#1413] add manpages creating and installing in build system
+  * [#1417] The client should start the account creation wizard if
+    started for the first time (if config file doesn't exist)
+  * [#1421] Make volume bars horizontal when dialpad is hidden.
+  * Changed main window title and fixed a mistake in sflphone_const.h
+  * [#1412] make debian package building work
+  * changelog changed.
+  * Changed addAccount method in gnome client.
+  * Debian and man folders added.
+  * [#1388] Change project name from sflphone_kde to sflphone-client-kde
+  * Better handle of kabc check.
+  * [#1351] Automatic generation of dbus interfaces in makefile
+    generated by cmake
+  * [#1307] Implement "edit before call" in history and address book.
+  * [#1344] change action_call label in call history from "call" to
+    "call back".
+  * [#1308] Implement Hook feature in kde client
+  * Improved build system.
+  * #1219 : Add address book configuration page
+  * Better handling of registration to the daemon.
+  * #1039 : Add tray icon in kde.
+  * Issue no 1216 : Double click on item in history or address book
+    causes call.
+  * display peer name in call list and call history when called from
+    address book.
+  * Address book functionnal with photo displayed.
+  * Help menu kde available but actions disappeared. All fonctions in
+    view.
+  * Address book functionnal but ugly and making its own sort in the
+    complete address book.
+  * Account choice on right click, clean out includes, page address
+    book, fixed bugs...
+  * Wizard, double click, context menu...
+  * Removed sflphone_kde.kdevelop.filelist
+  * Added account creation wizard and translated interface in english.
+  * Transfer functionnal but ugly.
+  * transfer not functionnal
+  * Bug fixed : unholding (UNHOLD_CURRENT, UNHOLD_RECORD)
+  * Commit functional for push. With install.sh
+  * Before merge.
+  * Problem with enable accounts. Account display increased.
+  * Functional with codec order working , playDTMF.
+  * Commit functional.
+  * sflphone_kde/build added in .gitignore.
+  * complete commit for checkout previous.
+  * Commit before checkout previous version to check the display
+    bug(little font everywhere...)
+  * Functionnal client. Rest : history icons, config icons and
+    functionalities
+  * commit before merge asavard for isRecording.
+  * Call and Automate fusion done and seems to work.
+  * Commiting before putting Automate class in Call class.
+  * Functionnal main window without recording, history, voicemail, kio
+    widgets.
+  * client kde avec kdevelop.
+  * Config Dialog almost finished.
+  * Base of QT client
+
+ -- SFLphone Automatic Build System <team@sflphone.org>  Tue, 26 May 2009 00:02:37 -0400
+
+sflphone-client-kde (0.9.5-SYSVER) SYSTEM; urgency=low
 
     ** 0.9.5 release **
 
@@ -29,7 +110,7 @@ sflphone-client-gnome (0.9.5-SYSVER) SYSTEM; urgency=low
 
  -- SFLphone Automatic Build System <team@sflphone.org>  Mon, 25 May 2009 11:34:48 -0400
 
-sflphone-client-gnome (0.9.5-SYSVER~rc2) SYSTEM; urgency=low
+sflphone-client-kde (0.9.5-SYSVER~rc2) SYSTEM; urgency=low
 
     ** 0.9.5 rc2 **
 
@@ -41,6 +122,8 @@ sflphone-client-gnome (0.9.5-SYSVER~rc2) SYSTEM; urgency=low
   * [#1422] Fixed some issues with new changelog generation script
   * [#1422] Moved distribution update to specific file
   * [#1422] Dropped git-dch, replace by home made implementation
+  * [#1402] Fix pjsip build
+  * [#1404] Clear GTK-Critical Bug at client startup
   * Changes for name based dbus connection
   * Clean changelogs
   * [#1343] Gnome: Implement a callback system to handle focus on
@@ -81,7 +164,7 @@ sflphone-client-gnome (0.9.5-SYSVER~rc2) SYSTEM; urgency=low
 
  -- SFLphone Automatic Build System <team@sflphone.org>  Tue, 19 May 2009 12:08:18 -0400
 
-sflphone-client-gnome (0.9.5-0ubuntu1~rc1) SYSTEM; urgency=low
+sflphone-client-kde (0.9.5-0ubuntu1~rc1) SYSTEM; urgency=low
 
   [ SFLphone Project ]
   * [#1262] Updated changelogs for version 0.9.5-0ubuntu1 Snapshot 2009-
@@ -110,7 +193,7 @@ sflphone-client-gnome (0.9.5-0ubuntu1~rc1) SYSTEM; urgency=low
 
  -- Sflphone Project <sflphone@mtl.savoirfairelinux.net>  Tue, 05 May 2009 19:16:13 -0400
 
-sflphone-client-gnome (0.9.5-0ubuntu1~beta) SYSTEM; urgency=low
+sflphone-client-kde (0.9.5-0ubuntu1~beta) SYSTEM; urgency=low
 
   [ Julien Bonjean ]
   * Updated Eclipse stuff
@@ -332,7 +415,7 @@ sflphone-client-gnome (0.9.5-0ubuntu1~beta) SYSTEM; urgency=low
 
  -- Sflphone Project <sflphone@mtl.savoirfairelinux.net>  Mon, 27 Apr 2009 17:00:03 -0400
 
-sflphone-client-gnome (0.9.4-0ubuntu2) SYSTEM; urgency=low
+sflphone-client-kde (0.9.4-0ubuntu2) SYSTEM; urgency=low
 
   [ Alexandre Savard ]
   * Restore speex and GSM detection
diff --git a/sflphone-client-kde/debian/compat b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/compat
similarity index 100%
rename from sflphone-client-kde/debian/compat
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/compat
diff --git a/sflphone-client-kde/debian/control.intrepid b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/control.intrepid
similarity index 100%
rename from sflphone-client-kde/debian/control.intrepid
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/control.intrepid
diff --git a/sflphone-client-kde/debian/control.jaunty b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/control.jaunty
similarity index 100%
rename from sflphone-client-kde/debian/control.jaunty
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/control.jaunty
diff --git a/sflphone-client-kde/debian/copyright b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/copyright
similarity index 100%
rename from sflphone-client-kde/debian/copyright
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/copyright
diff --git a/sflphone-client-kde/debian/cron.d b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/cron.d
similarity index 100%
rename from sflphone-client-kde/debian/cron.d
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/cron.d
diff --git a/sflphone-client-kde/debian/dirs b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/dirs
similarity index 100%
rename from sflphone-client-kde/debian/dirs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/dirs
diff --git a/sflphone-client-kde/debian/docs b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/docs
similarity index 100%
rename from sflphone-client-kde/debian/docs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/docs
diff --git a/sflphone-client-kde/debian/manpages b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/manpages
similarity index 100%
rename from sflphone-client-kde/debian/manpages
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/manpages
diff --git a/sflphone-client-kde/debian/postinst b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/postinst
similarity index 100%
rename from sflphone-client-kde/debian/postinst
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/postinst
diff --git a/sflphone-client-kde/debian/preinst b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/preinst
similarity index 100%
rename from sflphone-client-kde/debian/preinst
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/preinst
diff --git a/sflphone-client-kde/debian/prerm b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/prerm
similarity index 100%
rename from sflphone-client-kde/debian/prerm
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/prerm
diff --git a/sflphone-client-kde/debian/rules b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/rules
similarity index 99%
rename from sflphone-client-kde/debian/rules
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/rules
index d2384782b6be0f328c9041a14bdee71c11c70c3a..b0066aad805e337ec5ad7f80cc84c32905c7ea0d 100755
--- a/sflphone-client-kde/debian/rules
+++ b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/rules
@@ -31,7 +31,7 @@ build-arch: build-arch-stamp
 build-arch-stamp: configure-stamp 
 
     # Add here commands to compile the arch part of the package.
-	$(MAKE)
+	$(MAKE) -j
 	touch $@
 
 build-indep: build-indep-stamp
diff --git a/sflphone-common/debian/changelog b/tools/build-system/distributions/ubuntu/debian-sflphone-common/changelog
similarity index 85%
rename from sflphone-common/debian/changelog
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/changelog
index 796f15554f9545e461972cb8c425b0ec30d7b148..ba0cd95b1fcd2b1af7074b354674f6d64bb8cf34 100644
--- a/sflphone-common/debian/changelog
+++ b/tools/build-system/distributions/ubuntu/debian-sflphone-common/changelog
@@ -1,3 +1,99 @@
+sflphone-common (0.9.5-SYSVER~snapshot1243483310) SYSTEM; urgency=low
+
+    ** SNAPSHOT 1243483310 **
+
+  * [#1317] Remove spec files from configure
+  * [#1317] Added missing prefix
+  * [#1430] Add a connection reference which most likely belong to
+    libdbus
+  * [#1430] Use shared connection instead of private
+  * [#1317] Fixed packaging rules
+  * [#1317] Updated autogen
+  * Updated autogen.sh for pjsip
+  * [#1317] Fixed pjsip lib dirs
+  * [#1317] Updated debian packaging for new pjsip configuration script
+  * [#1317] Switch to autogenerated guess and sub files
+  * [#1317] Updated pjsip inclusion in build system
+  * [#1317] Replaced pjsip guess and sub files
+  * [#1317] Fixed compilation issues on opensuse 11
+  * [#1505] account list seem to crash the application when clicking
+    Apply very fast...
+  * [#1456] Add a flag to be replaced in the control files
+  * [#1456] Added version dependancy handling
+  * put account alias in AccountWidgetItem rather than in the item with
+    "    " before.
+  * [#1034] The KDE client should start sflphoned if it is not started
+  * [#1500] Handle options for notifications and display on incoming
+    call.
+  * [#1443] Client should not crash when receive an unexpected
+    stateChanged signal
+  * [#1456] Added version dependancy handling
+  * [#1426] Daemon crashes when get alsa plugin
+  * [#1422] Improved error messages
+  * commit for merge
+  * [#1424] Change logo in tray icon and put a different one when
+    incoming call
+  * [#1425] first part done, window title...
+  * [#1413] add manpages creating and installing in build system
+  * [#1417] The client should start the account creation wizard if
+    started for the first time (if config file doesn't exist)
+  * [#1421] Make volume bars horizontal when dialpad is hidden.
+  * Changed main window title and fixed a mistake in sflphone_const.h
+  * [#1412] make debian package building work
+  * changelog changed.
+  * Changed addAccount method in gnome client.
+  * Debian and man folders added.
+  * [#1388] Change project name from sflphone_kde to sflphone-client-kde
+  * Better handle of kabc check.
+  * [#1351] Automatic generation of dbus interfaces in makefile
+    generated by cmake
+  * [#1307] Implement "edit before call" in history and address book.
+  * [#1344] change action_call label in call history from "call" to
+    "call back".
+  * [#1308] Implement Hook feature in kde client
+  * Improved build system.
+  * #1219 : Add address book configuration page
+  * Better handling of registration to the daemon.
+  * #1039 : Add tray icon in kde.
+  * Issue no 1216 : Double click on item in history or address book
+    causes call.
+  * display peer name in call list and call history when called from
+    address book.
+  * Address book functionnal with photo displayed.
+  * Help menu kde available but actions disappeared. All fonctions in
+    view.
+  * Address book functionnal but ugly and making its own sort in the
+    complete address book.
+  * Account choice on right click, clean out includes, page address
+    book, fixed bugs...
+  * Wizard, double click, context menu...
+  * Removed sflphone_kde.kdevelop.filelist
+  * Added account creation wizard and translated interface in english.
+  * Transfer functionnal but ugly.
+  * transfer not functionnal
+  * Bug fixed : unholding (UNHOLD_CURRENT, UNHOLD_RECORD)
+  * Commit functional for push. With install.sh
+  * Before merge.
+  * Problem with enable accounts. Account display increased.
+  * Functional with codec order working , playDTMF.
+  * Commit functional.
+  * sflphone_kde/build added in .gitignore.
+  * complete commit for checkout previous.
+  * Commit before checkout previous version to check the display
+    bug(little font everywhere...)
+  * Functionnal client. Rest : history icons, config icons and
+    functionalities
+  * commit before merge asavard for isRecording.
+  * Call and Automate fusion done and seems to work.
+  * Commiting before putting Automate class in Call class.
+  * Functionnal main window without recording, history, voicemail, kio
+    widgets.
+  * client kde avec kdevelop.
+  * Config Dialog almost finished.
+  * Base of QT client
+
+ -- SFLphone Automatic Build System <team@sflphone.org>  Thu, 28 May 2009 00:02:20 -0400
+
 sflphone-common (0.9.5-SYSVER) SYSTEM; urgency=low
 
     ** 0.9.5 release **
@@ -41,6 +137,8 @@ sflphone-common (0.9.5-SYSVER~rc2) SYSTEM; urgency=low
   * [#1422] Fixed some issues with new changelog generation script
   * [#1422] Moved distribution update to specific file
   * [#1422] Dropped git-dch, replace by home made implementation
+  * [#1402] Fix pjsip build
+  * [#1404] Clear GTK-Critical Bug at client startup
   * Changes for name based dbus connection
   * Clean changelogs
   * [#1343] Gnome: Implement a callback system to handle focus on
diff --git a/sflphone-common/debian/compat b/tools/build-system/distributions/ubuntu/debian-sflphone-common/compat
similarity index 100%
rename from sflphone-common/debian/compat
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/compat
diff --git a/sflphone-common/debian/control.hardy b/tools/build-system/distributions/ubuntu/debian-sflphone-common/control.hardy
similarity index 100%
rename from sflphone-common/debian/control.hardy
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/control.hardy
diff --git a/sflphone-common/debian/control.intrepid b/tools/build-system/distributions/ubuntu/debian-sflphone-common/control.intrepid
similarity index 100%
rename from sflphone-common/debian/control.intrepid
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/control.intrepid
diff --git a/sflphone-common/debian/control.jaunty b/tools/build-system/distributions/ubuntu/debian-sflphone-common/control.jaunty
similarity index 100%
rename from sflphone-common/debian/control.jaunty
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/control.jaunty
diff --git a/sflphone-common/debian/copyright b/tools/build-system/distributions/ubuntu/debian-sflphone-common/copyright
similarity index 100%
rename from sflphone-common/debian/copyright
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/copyright
diff --git a/sflphone-common/debian/cron.d b/tools/build-system/distributions/ubuntu/debian-sflphone-common/cron.d
similarity index 100%
rename from sflphone-common/debian/cron.d
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/cron.d
diff --git a/sflphone-common/debian/dirs b/tools/build-system/distributions/ubuntu/debian-sflphone-common/dirs
similarity index 100%
rename from sflphone-common/debian/dirs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/dirs
diff --git a/sflphone-common/debian/docs b/tools/build-system/distributions/ubuntu/debian-sflphone-common/docs
similarity index 100%
rename from sflphone-common/debian/docs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/docs
diff --git a/sflphone-common/debian/manpages b/tools/build-system/distributions/ubuntu/debian-sflphone-common/manpages
similarity index 100%
rename from sflphone-common/debian/manpages
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/manpages
diff --git a/sflphone-common/debian/postrm b/tools/build-system/distributions/ubuntu/debian-sflphone-common/postrm
similarity index 100%
rename from sflphone-common/debian/postrm
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/postrm
diff --git a/sflphone-common/debian/preinst b/tools/build-system/distributions/ubuntu/debian-sflphone-common/preinst
similarity index 100%
rename from sflphone-common/debian/preinst
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/preinst
diff --git a/sflphone-common/debian/rules b/tools/build-system/distributions/ubuntu/debian-sflphone-common/rules
similarity index 95%
rename from sflphone-common/debian/rules
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/rules
index 033a87f45c3dc3ed92f6499252c9b2fed741d3d0..86794e0774b687dea13b6ecc4f0ff51cc96f93a4 100755
--- a/sflphone-common/debian/rules
+++ b/tools/build-system/distributions/ubuntu/debian-sflphone-common/rules
@@ -21,7 +21,7 @@ configure-stamp:
 	dh_testdir
 	# Add here commands to configure the package.
 	./autogen.sh --prefix=/usr
-	cd libs/pjproject-1.0.1; ./configure
+	cd libs/pjproject-1.0.1; ./autogen.sh --prefix=/usr
 	touch configure-stamp
 
 #Architecture 
@@ -31,8 +31,8 @@ build-arch: build-arch-stamp
 build-arch-stamp: configure-stamp 
 
     # Add here commands to compile the arch part of the package.
-	$(MAKE) 
-	cd libs/pjproject-1.0.1; $(MAKE) dep; $(MAKE)
+	cd libs/pjproject-1.0.1; $(MAKE) dep; $(MAKE) clean; $(MAKE)
+	cd -; $(MAKE) 
 	touch $@
 
 build-indep: build-indep-stamp
diff --git a/tools/build-system/launch-build-machine.sh b/tools/build-system/launch-build-machine.sh
index 9144928eb82e8519c12960c251ede3081f3cd80d..a5555ccf863391170cc34ad40358130024fa8cc5 100755
--- a/tools/build-system/launch-build-machine.sh
+++ b/tools/build-system/launch-build-machine.sh
@@ -7,16 +7,12 @@
 # Author: Julien Bonjean (julien@bonjean.info) 
 #
 # Creation Date: 2009-04-20
-# Last Modified: 2009-05-15 12:23:31 -0400
+# Last Modified: 2009-06-01 19:11:22 -0400
 #####################################################
 
 #
 # Not working with git 1.5.4.3
 #
-#
-#
-#
-
 
 TAG=`date +%Y-%m-%d`
 
@@ -43,7 +39,7 @@ REMOTE_ROOT_DIR="/home/sflphone"
 # scripts
 SCRIPTS_DIR="${ROOT_DIR}/build-system"
 PACKAGING_SCRIPTS_DIR="${SCRIPTS_DIR}/remote"
-BIN_DIR="${SCRIPTS_DIR}/bin"
+DISTRIBUTION_SCRIPTS_DIR="${SCRIPTS_DIR}/distributions"
 
 # directory that will be deployed to remote machine
 TODEPLOY_DIR="${ROOT_DIR}/sflphone-packaging"
@@ -65,9 +61,11 @@ PACKAGING_RESULT_DIR=${ROOT_DIR}/packages-${TAG}
 USER="sflphone"
 
 RELEASE_MODE=
-VERSION_APPEND=
+
+SNAPSHOT_TAG=`date +%s`
 
 DO_PREPARE=1
+DO_PUSH=1
 DO_MAIN_LOOP=1
 DO_SIGNATURES=1
 DO_UPLOAD=1
@@ -77,9 +75,9 @@ DO_SEND_EMAIL=1
 EDITOR=echo
 export EDITOR
 
-NON_FATAL_ERRORS=
+NON_FATAL_ERRORS=""
 
-MACHINES=( "ubuntu-8.04" "ubuntu-8.04-64" "ubuntu-8.10" "ubuntu-8.10-64" "ubuntu-9.04" "ubuntu-9.04-64" )
+MACHINES=( "ubuntu-8.04" "ubuntu-8.04-64" "ubuntu-8.10" "ubuntu-8.10-64" "ubuntu-9.04" "ubuntu-9.04-64" "opensuse-11" "opensuse-11-64" "mandriva-2009.1" )
 
 #########################
 # BEGIN
@@ -98,6 +96,7 @@ do
 		echo
 		echo "Options :"
 		echo " --skip-prepare"
+		echo " --skip-push"
 		echo " --skip-main-loop"
 		echo " --skip-signatures"
 		echo " --skip-upload"
@@ -109,6 +108,8 @@ do
 		exit 0;;
 	--skip-prepare)
 		unset DO_PREPARE;;
+	--skip-push)
+		unset DO_PUSH;;
 	--skip-main-loop)
 		unset DO_MAIN_LOOP;;
 	--skip-signatures)
@@ -123,7 +124,7 @@ do
 		RELEASE_MODE=(${PARAMETER##*=});;
 	--list-machines)
 		echo "Available machines :"
-		for MACHINE in ${MACHINES}; do
+		for MACHINE in ${MACHINES[@]}; do
 			echo " "${MACHINE}
 		done
 		exit 0;;
@@ -154,6 +155,7 @@ if [ "${WHO}" != "${USER}" ]; then
 fi
 
 # logging
+rm -rf ${PACKAGING_RESULT_DIR} 2>/dev/null
 mkdir ${PACKAGING_RESULT_DIR} 2>/dev/null
 if [ ${DO_LOGGING} ]; then
 
@@ -194,11 +196,8 @@ echo
 
 if [ ${RELEASE_MODE} ]; then
 	echo "Release mode : ${RELEASE_MODE}"
-	if [ "${RELEASE_MODE}" != "release" ];then
-		VERSION_APPEND="~${RELEASE_MODE}"
-	fi
 else
-	echo "Snapshot mode"
+	echo "Snapshot mode : ${SNAPSHOT_TAG}"
 fi
 
 #########################
@@ -221,52 +220,63 @@ if [ ${DO_PREPARE} ]; then
 		exit -1
 	fi
 
-	FULL_VER=`cd ${REPOSITORY_DIR} && git describe --tag HEAD  | cut -d "/" -f2 | cut -d "-" -f1-2 | sed 's/\.rc.*//' | sed 's/\.beta.*//'`
-	
+	VERSION=`cd ${REPOSITORY_DIR} && git describe --tag HEAD  | cut -d "/" -f2 | cut -d "-" -f1`
+
+	if [ ${RELEASE_MODE} ]; then
+		if [ "${RELEASE_MODE}" != "release" ];then
+			VERSION="${VERSION}~${RELEASE_MODE}"
+		fi
+	else
+		VERSION="${VERSION}~snapshot${SNAPSHOT_TAG}"
+	fi
+	echo "Version is : ${VERSION}"
+
+	# if push is activated
+	if [ ${DO_PUSH} ];then
+
+		# first changelog generation for commit
+		echo "Update debian changelogs (1/2)"
+
+		${SCRIPTS_DIR}/sfl-git-dch.sh ${VERSION} ${RELEASE_MODE}
+
+		if [ "$?" -ne "0" ]; then
+			echo "!! Cannot update debian changelogs"
+			exit -1
+		fi
+
+		echo " Doing commit"
+		
+        	cd ${REPOSITORY_DIR}
+		git commit -m "[#1262] Updated debian changelogs (${VERSION})" . >/dev/null
+
+		echo " Pushing commit"
+		git push origin master >/dev/null
+	fi
+
 	# change current branch if needed
         if [ ${RELEASE_MODE} ]; then
                 cd ${REPOSITORY_DIR}
-                echo "Using release branch"
                 git checkout origin/release -b release
         else
                 echo "Using master branch"
         fi
 
 	# generate the changelog, according to the distribution and the git commit messages
-	echo "Update changelogs"
-
-	${SCRIPTS_DIR}/sfl-git-dch.sh ${RELEASE_MODE}
+	echo "Update debian changelogs (2/2)"
+	cd ${REPOSITORY_DIR}
+	${SCRIPTS_DIR}/sfl-git-dch.sh ${VERSION} ${RELEASE_MODE}
 	
 	if [ "$?" -ne "0" ]; then
-		echo "!! Cannot update changelogs"
+		echo "!! Cannot update debian changelogs"
 		exit -1
 	fi
 
-	cd ${REPOSITORY_DIR}	
-	echo "Update repository with new changelog"
-	echo " Switch to master branch to commit"
-	if [ ${RELEASE_MODE} ]; then
-                
-                echo "Switch to master branch for commit"
-                git checkout master
-        fi
-
-	echo " Doing commit"
-	VERSION_COMMIT=${FULL_VER}${VERSION_APPEND}
-	if [ ! ${RELEASE_MODE} ]; then
-		VERSION_COMMIT=${FULL_VER}" Snapshot ${TAG}"
-	fi
-	git commit -m "[#1262] Updated changelogs for version ${VERSION_COMMIT}" . >/dev/null
-	echo " Pushing commit"
-	git push origin master >/dev/null
+	echo "Write version numbers for following processes"
+	echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-common/VERSION
+	echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-client-gnome/VERSION
+	echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-client-kde/VERSION
+	echo "${VERSION}" > ${TODEPLOY_BUILD_DIR}/VERSION
 
-	# change back current branch if needed
-	if [ ${RELEASE_MODE} ]; then
-		echo "Switch back to release branch"
-		git checkout release
-		git merge master
-	fi
-	
 	echo "Archiving repository"
 	tar czf ${REPOSITORY_ARCHIVE} --exclude .git -C `dirname ${REPOSITORY_DIR}` sflphone 
 
@@ -279,7 +289,7 @@ if [ ${DO_PREPARE} ]; then
 	rm -rf ${REPOSITORY_DIR}
 
 	echo "Finish preparing deploy directory"
-	cp -r ${PACKAGING_SCRIPTS_DIR}/* ${TODEPLOY_DIR}
+	cp -r ${DISTRIBUTION_SCRIPTS_DIR}/* ${TODEPLOY_DIR}
 
 	if [ "$?" -ne "0" ]; then
 		echo " !! Cannot prepare scripts for deployment"
@@ -297,6 +307,7 @@ if [ ${DO_MAIN_LOOP} ]; then
 	echo "Entering main loop"
 	echo
 
+	rm -f ${PACKAGING_RESULT_DIR}/stats.log
 	for MACHINE in ${MACHINES[*]}
 	do
 
@@ -306,6 +317,9 @@ if [ ${DO_MAIN_LOOP} ]; then
 			echo "Not needed, already running"
 		else
 			cd ${VBOX_USER_HOME} && VBoxHeadless -startvm "${MACHINE}" -p 50000 &
+			if [[ ${MACHINE} =~ "opensuse" ]]; then
+				STARTUP_WAIT=200
+			fi
 			echo "Wait ${STARTUP_WAIT} s"
 			sleep ${STARTUP_WAIT}
 		fi
@@ -318,25 +332,30 @@ if [ ${DO_MAIN_LOOP} ]; then
 
 		if [ "$?" -ne "0" ]; then
 	                echo " !! Cannot deploy packaging system"
-			NON_FATAL_ERRORS="${NON_FATAL_ERRORS} !! Error when packaging for ${MACHINE}\n"
-	        fi
-
-		echo "Launch remote build"
-		${SSH_BASE} "${REMOTE_DEPLOY_DIR}/build-package-ubuntu.sh ${RELEASE_MODE}"
-
-		if [ "$?" -ne "0" ]; then
-	                echo " !! Error during remote packaging process"
-			NON_FATAL_ERRORS="${NON_FATAL_ERRORS} !! Error when packaging for ${MACHINE}\n"
-	        fi
-
-		echo "Retrieve dists and log files (current tag is ${TAG})"
-		${SCP_BASE} ${SSH_HOST}:${REMOTE_DEPLOY_DIR}/dists ${PACKAGING_RESULT_DIR}/
-		${SCP_BASE} ${SSH_HOST}:${REMOTE_DEPLOY_DIR}"/*.log" ${PACKAGING_RESULT_DIR}/
-
-		if [ "$?" -ne "0" ]; then
-	                echo " !! Cannot retrieve remote files"
-	                NON_FATAL_ERRORS="${NON_FATAL_ERRORS} !! Error when packaging for ${MACHINE}\n"
-	        fi
+			echo "${MACHINE} : Cannot deploy packaging system" >> ${PACKAGING_RESULT_DIR}/stats.log
+	        else
+
+			echo "Launch remote build"
+			${SSH_BASE} "cd ${REMOTE_DEPLOY_DIR} && ./build-packages.sh ${RELEASE_MODE}"
+
+			if [ "$?" -ne "0" ]; then
+	                	echo " !! Error during remote packaging process"
+				echo "${MACHINE} : Error during remote packaging process" >> ${PACKAGING_RESULT_DIR}/stats.log
+	        	else
+
+				echo "Retrieve dists and log files (current tag is ${TAG})"
+				${SCP_BASE} ${SSH_HOST}:${REMOTE_DEPLOY_DIR}/deb ${PACKAGING_RESULT_DIR}/ >/dev/null 2>&1
+				${SCP_BASE} ${SSH_HOST}:${REMOTE_DEPLOY_DIR}/rpm ${PACKAGING_RESULT_DIR}/ >/dev/null 2>&1
+				${SCP_BASE} ${SSH_HOST}:${REMOTE_DEPLOY_DIR}"/*.log" ${PACKAGING_RESULT_DIR}/
+
+				if [ "$?" -ne "0" ]; then
+	        		        echo " !! Cannot retrieve remote files"
+					echo "${MACHINE} : Cannot retrieve remote files" >> ${PACKAGING_RESULT_DIR}/stats.log
+	        		else
+					echo "${MACHINE} : OK" >> ${PACKAGING_RESULT_DIR}/stats.log
+				fi
+			fi
+		fi
 
 		if [ "${VM_STATE}" = "running" ]; then
 			echo "Leave machine running"
@@ -376,8 +395,8 @@ if [ ${DO_SIGNATURES} ]; then
 	fi	
 
 	echo "Sign packages"
-	find ${PACKAGING_RESULT_DIR} -name "*.deb" -exec dpkg-sig -k 'Savoir-Faire Linux Inc.' --sign builder --sign-changes full {} \; >/dev/null 2>&1
-	find ${PACKAGING_RESULT_DIR} -name "*.changes" -printf "debsign -k'Savoir-Faire Linux Inc.' %p\n" | sh >/dev/null 2>&1
+	find ${PACKAGING_RESULT_DIR}/deb/dists -name "*.deb" -exec dpkg-sig -k 'Savoir-Faire Linux Inc.' --sign builder --sign-changes full {} \; >/dev/null 2>&1
+	find ${PACKAGING_RESULT_DIR}/deb/dists -name "*.changes" -printf "debsign -k'Savoir-Faire Linux Inc.' %p\n" | sh >/dev/null 2>&1
 fi
 
 #########################
@@ -399,7 +418,7 @@ if [ ${DO_UPLOAD} ]; then
 	
 	echo "Upload packages"
 	echo "Install dists files to repository"
-	scp -r ${SSH_OPTIONS} ${PACKAGING_RESULT_DIR}/dists ${SSH_REPOSITORY_HOST}:
+	scp -r ${SSH_OPTIONS} ${PACKAGING_RESULT_DIR}/deb/dists ${SSH_REPOSITORY_HOST}:
 
 	if [ "$?" -ne "0" ]; then
 		echo " !! Cannot upload packages"
@@ -415,7 +434,7 @@ if [ ${DO_UPLOAD} ]; then
 	fi
 fi
 
-if [ ${NON_FATAL_ERRORS} ]; then
+if [ "${NON_FATAL_ERRORS}" != "" ]; then
 	echo "Non fatal errors :"
 	echo ${NON_FATAL_ERRORS}
 	exit -1
diff --git a/tools/build-system/remote/build-package-ubuntu.sh b/tools/build-system/remote/build-package-ubuntu.sh
deleted file mode 100755
index e975f6833e22b863a2c35787bd21422bacd819c4..0000000000000000000000000000000000000000
--- a/tools/build-system/remote/build-package-ubuntu.sh
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/bin/bash
-#
-# @author: Yun Liu <yun.liu@savoirfairelinux.com>, Julien Bonjean <julien.bonjean@savoirfairelinux.com>
-#
-# Refer to http://www.sflphone.org for futher information
-#
-
-PLATFORM="ubuntu"
-
-ROOT_DIR="/home/sflphone/sflphone-packaging"
-BUILD_DIR="${ROOT_DIR}/build"
-DIST_DIR="${ROOT_DIR}/dists"
-REPOSITORY_ARCHIVE="${BUILD_DIR}/sflphone.tar.gz"
-REPOSITORY_DIR="${BUILD_DIR}/sflphone"
-REPOSITORY_SFLPHONE_COMMON_DIR="${REPOSITORY_DIR}/sflphone-common"
-REPOSITORY_SFLPHONE_CLIENT_KDE_DIR="${REPOSITORY_DIR}/sflphone-client-kde"
-REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR="${REPOSITORY_DIR}/sflphone-client-gnome"
-USER="sflphone"
-DIST_APPEND="-daily"
-RELEASE_MODE=$1
-VERSION_APPEND=
-EDITOR=echo
-export EDITOR
-
-#########################
-# BEGIN
-#########################
-
-WHO=`whoami`
-
-if [ "${WHO}" != "${USER}" ]; then
-        echo "!! Please use user ${USER} to run this script"
-        exit -1;
-fi
-
-if [ ${RELEASE_MODE} ]; then
-        echo "Release mode : ${RELEASE_MODE}"
-	if [ "${RELEASE_MODE}" = "release" ]; then
-		DIST_APPEND=""
-	else
-		DIST_APPEND="-testing"
-		VERSION_APPEND="~${RELEASE_MODE}"
-	fi
-else
-        echo "Snapshot mode"
-fi
-
-cd ${ROOT_DIR}
-
-if [ "$?" -ne "0" ]; then
-        echo " !! Cannot cd to working directory"
-        exit -1
-fi
-
-# decompress repository
-echo "Untar repository"
-cd ${BUILD_DIR} && tar xf ${REPOSITORY_ARCHIVE}
-
-if [ "$?" -ne "0" ]; then
-        echo " !! Cannot untar repository"
-        exit -1
-fi
-
-echo "Switch to internal logging"
-
-# get system parameters
-ARCH_FLAG=`getconf -a|grep LONG_BIT | sed -e 's/LONG_BIT\s*//'`
-OS_VERSION=`lsb_release -d -s -c | sed -e '1d'`
-PACKAGE_SYSVER="0ubuntu1"
-VERSION=`cd ${REPOSITORY_DIR} && head -n 1 ./sflphone-client-gnome/debian/changelog | awk '{print $2}' | sed -e 's/(//g' -e 's/)//g' | cut -d "-" -f1` 
-FULL_VERSION=`cd ${REPOSITORY_DIR} && head -n 1 ./sflphone-client-gnome/debian/changelog | awk '{print $2}' | sed -e 's/(//g' -e 's/)//g' -e 's/SYSVER/'${PACKAGE_SYSVER}'/g'`
-
-# define log files
-GLOBAL_LOG=${ROOT_DIR}/sflphone-${OS_VERSION}-${ARCH_FLAG}.log
-PACKAGING_LOG=${ROOT_DIR}/sflphone-debuild-${OS_VERSION}-${ARCH_FLAG}.log
-
-# open log file
-exec 3<>${GLOBAL_LOG}
-
-# redirect outputs (stdout & stderr)
-exec 1>&3
-exec 2>&3
-
-echo "SFLPhone version is ${VERSION}"
-
-echo "Do updates"
-sudo apt-get update >/dev/null
-sudo apt-get upgrade -y >/dev/null
-
-# generate the changelog, according to the distribution
-echo "Generate changelogs"
-sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian/changelog && \
-sed -i 's/SYSVER/'${PACKAGE_SYSVER}'/g' ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian/changelog && \
- # sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian/changelog && \
- # sed -i 's/SYSVER/'${PACKAGE_SYSVER}'/g' ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian/changelog && \
- sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian/changelog && \
- sed -i 's/SYSVER/'${PACKAGE_SYSVER}'/g' ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian/changelog
-
-if [ "$?" -ne "0" ]; then
-	echo "!! Cannot generate changelogs"
-	exit -1
-fi
-
-# copy the appropriate control file based on different archtecture
-echo "Generate control files"
-cp ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian/control.$OS_VERSION ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian/control && \
- # cp ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian/control.$OS_VERSION ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian/control && \
- cp ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian/control.$OS_VERSION ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian/control
-
-if [ "$?" -ne "0" ]; then
-        echo "!! Cannot generate control files"
-        exit -1
-fi
-
-# provide prerequisite directories used by debuild
-echo "Build sflphone packages on Ubuntu $OS_VERSION $ARCH_FLAG bit architecture...."
-cp -r ${REPOSITORY_SFLPHONE_COMMON_DIR} ${BUILD_DIR}/sflphone-common && \
-cp -r ${REPOSITORY_SFLPHONE_COMMON_DIR} ${BUILD_DIR}/sflphone-common-${FULL_VERSION}.orig && \
- # cp -r ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR} ${BUILD_DIR}/sflphone-client-kde-${FULL_VERSION}.orig && \
- cp -r ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR} ${BUILD_DIR}/sflphone-client-gnome-${FULL_VERSION}.orig && \
-# do a cp to because path must remain for client compilation
-mv ${REPOSITORY_SFLPHONE_COMMON_DIR} ${BUILD_DIR}/sflphone-common-${FULL_VERSION} && \
- # mv ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR} ${BUILD_DIR}/sflphone-client-kde-${FULL_VERSION} && \
- mv ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR} ${BUILD_DIR}/sflphone-client-gnome-${FULL_VERSION}
-
-# build package sflphone-common
-cd ${BUILD_DIR}/sflphone-common-${FULL_VERSION}/debian && \
-debuild -us -uc >${PACKAGING_LOG} 2>&1
-
-if [ "$?" -ne "0" ]; then
-        echo "!! Cannot generate package sflphone-common"
-        exit -1
-fi
-
-# build package sflphone-client-gnome
-cd ${BUILD_DIR}/sflphone-client-gnome-${FULL_VERSION}/debian && \
-debuild -us -uc >>${PACKAGING_LOG} 2>&1
-
-if [ "$?" -ne "0" ]; then
-        echo "!! Cannot generate package sflphone-client-gnome"
-        exit -1
-fi
-
-# build package sflphone-client-kde
-# cd ${BUILD_DIR}/sflphone-client-kde-${FULL_VERSION}/debian && \
-# debuild -us -uc >>${PACKAGING_LOG} 2>&1
-
-# if [ "$?" -ne "0" ]; then
-#         echo "!! Cannot generate package sflphone-client-kde"
-#         exit -1
-# fi
-
-# move to dist
-echo "Deploy files in dist directories"
-BINARY_DIR=""
-if [ "${ARCH_FLAG}" -eq "32" ]; then
-	BINARY_DIR="binary-i386"
-else
-	BINARY_DIR="binary-amd64"
-fi
-
-mkdir -p ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source
-mkdir -p ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/${BINARY_DIR}
-
-mv ${BUILD_DIR}/sflphone*.deb ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/${BINARY_DIR} && \
-mv ${BUILD_DIR}/sflphone*.dsc ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source/ && \
-mv ${BUILD_DIR}/sflphone*.build ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source/ && \
-mv ${BUILD_DIR}/sflphone*.changes ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source/ && \
-mv ${BUILD_DIR}/sflphone*.orig.tar.gz ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source/ && \
-mv ${BUILD_DIR}/sflphone*.diff.gz ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source/
-
-if [ "$?" -ne "0" ]; then
-        echo "!! Cannot copy dist files"
-        exit -1
-fi
-
-echo "All done"
-
-# close file descriptor
-exec 3>&-
-
-exit 0
-
diff --git a/tools/build-system/send-emails.sh b/tools/build-system/send-emails.sh
index 065e9c691a071a48b0f10f5206972b9abf9ad49f..4b9c7d52bc460a3707b7044d8b6620e4405d3352 100755
--- a/tools/build-system/send-emails.sh
+++ b/tools/build-system/send-emails.sh
@@ -7,7 +7,7 @@
 # Author: Julien Bonjean (julien@bonjean.info) 
 #
 # Creation Date: 2009-04-20
-# Last Modified:
+# Last Modified: 2009-06-01 18:11:20 -0400
 #####################################################
 
 TAG=`date +%Y-%m-%d`
@@ -28,12 +28,13 @@ MAIL_SUBJECT="[ ${TAG} ] SFLphone Automatic Build System : ${STATUS}"
 if [ "$1" -eq 0 ]; then
 	echo | mail -s "${MAIL_SUBJECT}" -c emmanuel.milou@savoirfairelinux.com julien.bonjean@savoirfairelinux.com
 else
-	(
-	for i in ${PACKAGING_RESULT_DIR}/*.log
-	do
-		uuencode $i $(basename $i)
-	done
-	) | mail -s "${MAIL_SUBJECT}" -c emmanuel.milou@savoirfairelinux.com julien.bonjean@savoirfairelinux.com 
+#	(
+#	for i in ${PACKAGING_RESULT_DIR}/*.log
+#	do
+#		uuencode $i $(basename $i)
+#	done
+#	)
+	cat ${PACKAGING_RESULT_DIR}/stats.log | mail -s "${MAIL_SUBJECT}" -c emmanuel.milou@savoirfairelinux.com julien.bonjean@savoirfairelinux.com 
 fi
 
 exit 0
diff --git a/tools/build-system/sfl-git-dch.sh b/tools/build-system/sfl-git-dch.sh
index 986da2bdaa57ceec96343b2f19911f0476bfdac7..35c2f757e7b2e14c80f910f136319d0d2e7e54a2 100755
--- a/tools/build-system/sfl-git-dch.sh
+++ b/tools/build-system/sfl-git-dch.sh
@@ -7,22 +7,21 @@
 # Author: Julien Bonjean (julien@bonjean.info) 
 #
 # Creation Date: 2009-05-13
-# Last Modified: 2009-05-14 17:22:48 -0400
+# Last Modified: 2009-05-29 14:23:50 -0400
 #####################################################
 
 # set -x
 
-RELEASE_MODE=$1
+VERSION=$1
+RELEASE_MODE=$2
 
 ROOT_DIR="/home/projects/sflphone"
 TODEPLOY_DIR="${ROOT_DIR}/sflphone-packaging"
 TODEPLOY_BUILD_DIR="${TODEPLOY_DIR}/build"
 REPOSITORY_DIR="${TODEPLOY_BUILD_DIR}/sflphone"
 SCRIPTS_DIR="${ROOT_DIR}/build-system"
-
-CHANGELOG_FILES=( "sflphone-common/debian/changelog" "sflphone-client-gnome/debian/changelog" )
-
-SNAPSHOT_TAG=`date +%s`
+DEBIAN_DIR="${SCRIPTS_DIR}/distributions/ubuntu"
+CHANGELOG_FILES=( "${DEBIAN_DIR}/debian-sflphone-common/changelog" "${DEBIAN_DIR}/debian-sflphone-client-gnome/changelog" "${DEBIAN_DIR}/debian-sflphone-client-kde/changelog")
 
 export DEBFULLNAME="SFLphone Automatic Build System"
 export DEBEMAIL="team@sflphone.org"
@@ -36,55 +35,54 @@ if [ "$?" -ne "0" ]; then
 fi
 
 # get last release tag
-LAST_RELEASE_TAG_NAME=`git describe --tag HEAD --match "debian/*" --abbrev=40 | cut -d "-" -f1-2`
+LAST_RELEASE_TAG_NAME=`git tag -l "debian/*ubuntu*" | grep -E "ubuntu[1-9](\.rc[1-9]|\.beta|\.stable)$" | tail -n 1`
 
 if [ "$?" -ne "0" ]; then
 	echo " !! Error when retrieving last tag"
 	exit -1
 fi
 
+# get last release tag
+PREVIOUS_RELEASE_TAG_NAME=`git tag -l "debian/*ubuntu*" | grep -E "ubuntu[1-9](\.rc[1-9]|\.beta|\.stable)$" | tail -n 2 | sed -n '1p;1q'`
+
+if [ "$?" -ne "0" ]; then
+	echo " !! Error when retrieving previous revision tag"
+	exit -1
+fi
+
+echo "Last release tag is : ${LAST_RELEASE_TAG_NAME}"
+
 # get last release commit hash
-LAST_RELEASE_COMMIT_HASH=`git show --pretty=format:"%H" -s ${LAST_RELEASE_TAG_NAME=} | tail -n 1`
+REF_COMMIT_HASH=
+if [ ${RELEASE_MODE} ]; then
+	echo "Reference tag is : ${PREVIOUS_RELEASE_TAG_NAME}"
+	REF_COMMIT_HASH=`git show --pretty=format:"%H" -s ${PREVIOUS_RELEASE_TAG_NAME} | tail -n 1`
+else
+	echo "Reference tag is : ${LAST_RELEASE_TAG_NAME}"
+	REF_COMMIT_HASH=`git show --pretty=format:"%H" -s ${LAST_RELEASE_TAG_NAME} | tail -n 1`
+fi
 
 if [ "$?" -ne "0" ]; then
 	echo " !! Error when retrieving last release commit hash"
 	exit -1
 fi
 
-echo "Last release tag is : ${LAST_RELEASE_TAG_NAME} (commit ${LAST_RELEASE_COMMIT_HASH})"
+echo "Reference commit is : ${REF_COMMIT_HASH}"
 echo
 
-
 # use git log to retrieve changelog content
-CHANGELOG_CONTENT=`git log --no-merges --pretty=format:"%s" ${LAST_RELEASE_COMMIT_HASH}.. | grep -v "\[\#1262\]"`
+CHANGELOG_CONTENT=`git log --no-merges --pretty=format:"%s" ${REF_COMMIT_HASH}.. | grep -v "\[\#1262\]"`
 
-if [ "$?" -ne "0" ]; then
-        echo " !! Error when retrieving changelog content"
+if [ "$?" -eq "1" ]; then
+        echo " !! No new commit since last release"
         exit -1
 fi
 
-# get version
-SOFTWARE_VERSION=`echo ${LAST_RELEASE_TAG_NAME} | cut -d "/" -f2- | cut -d "-" -f1`
-
 if [ "$?" -ne "0" ]; then
-        echo " !! Error when retrieving software version"
+        echo " !! Error when retrieving changelog content"
         exit -1
 fi
 
-# add version info
-SOFTWARE_VERSION_APPEND=
-if [ ${RELEASE_MODE} ]
-then
-	if [ "${RELEASE_MODE}" != "release" ]; then
-		SOFTWARE_VERSION_APPEND="~${RELEASE_MODE}"
-	fi
-else
-	SOFTWARE_VERSION_APPEND="~snapshot${SNAPSHOT_TAG}"
-fi
-	
-	
-
-
 # iterate throw changelog files
 for CHANGELOG_FILE in ${CHANGELOG_FILES[@]}
 do
@@ -121,7 +119,7 @@ do
 
 		if [ ${IS_FIRST} ]
 		then
-			yes | dch --changelog ${CHANGELOG_FILE}  -b --allow-lower-version --no-auto-nmu --distribution SYSTEM --newversion ${SOFTWARE_VERSION}-SYSVER${SOFTWARE_VERSION_APPEND} "$line" >/dev/null 2>&1
+			yes | dch --changelog ${CHANGELOG_FILE}  -b --allow-lower-version --no-auto-nmu --distribution SYSTEM --newversion ${VERSION}-SYSVER "$line" >/dev/null 2>&1
 		
 			if [ "$?" -ne "0" ]; then
 				echo
@@ -144,13 +142,13 @@ do
 	# add snapshot or release flag if needed
 	echo
 	if [ ${RELEASE_MODE} ]; then
-		sed -i "3i\    ** ${SOFTWARE_VERSION} ${RELEASE_MODE} **\n" ${CHANGELOG_FILE}
+		sed -i "3i\    ** ${VERSION} **\n" ${CHANGELOG_FILE}
                 if [ "$?" -ne "0" ]; then
                         echo " !! Error when adding snapshot flag"
                         exit -1
                 fi
 	else
-		sed -i "3i\    ** SNAPSHOT ${SNAPSHOT_TAG} **\n" ${CHANGELOG_FILE}
+		sed -i "3i\    ** SNAPSHOT ${VERSION} **\n" ${CHANGELOG_FILE}
 		if [ "$?" -ne "0" ]; then
 	                echo " !! Error when adding snapshot flag"
 			exit -1