gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r29672 - in gnunet-mqtt: . m4 po src src/include src/mqtt


From: gnunet
Subject: [GNUnet-SVN] r29672 - in gnunet-mqtt: . m4 po src src/include src/mqtt
Date: Sat, 28 Sep 2013 17:58:54 +0200

Author: amgaera
Date: 2013-09-28 17:58:54 +0200 (Sat, 28 Sep 2013)
New Revision: 29672

Added:
   gnunet-mqtt/ABOUT-NLS
   gnunet-mqtt/AUTHORS
   gnunet-mqtt/COPYING
   gnunet-mqtt/ChangeLog
   gnunet-mqtt/INSTALL
   gnunet-mqtt/Makefile.am
   gnunet-mqtt/NEWS
   gnunet-mqtt/README
   gnunet-mqtt/bootstrap
   gnunet-mqtt/config.rpath
   gnunet-mqtt/configure.ac
   gnunet-mqtt/m4/
   gnunet-mqtt/m4/ac_define_dir.m4
   gnunet-mqtt/m4/gettext.m4
   gnunet-mqtt/m4/iconv.m4
   gnunet-mqtt/m4/lib-ld.m4
   gnunet-mqtt/m4/lib-link.m4
   gnunet-mqtt/m4/lib-prefix.m4
   gnunet-mqtt/m4/ltoptions.m4
   gnunet-mqtt/m4/ltsugar.m4
   gnunet-mqtt/m4/ltversion.m4
   gnunet-mqtt/m4/lt~obsolete.m4
   gnunet-mqtt/m4/nls.m4
   gnunet-mqtt/m4/pkg.m4
   gnunet-mqtt/m4/po.m4
   gnunet-mqtt/m4/progtest.m4
   gnunet-mqtt/po/
   gnunet-mqtt/po/ChangeLog
   gnunet-mqtt/po/Makefile.in.in
   gnunet-mqtt/po/Makevars
   gnunet-mqtt/po/POTFILES.in
   gnunet-mqtt/po/Rules-quot
   gnunet-mqtt/po/boldquot.sed
   gnunet-mqtt/po/address@hidden
   gnunet-mqtt/po/address@hidden
   gnunet-mqtt/po/insert-header.sin
   gnunet-mqtt/po/quot.sed
   gnunet-mqtt/po/remove-potcdate.sin
   gnunet-mqtt/src/
   gnunet-mqtt/src/Makefile.am
   gnunet-mqtt/src/include/
   gnunet-mqtt/src/include/Makefile.am
   gnunet-mqtt/src/include/gnunet_mqtt_service.h
   gnunet-mqtt/src/include/gnunet_protocols_mqtt.h
   gnunet-mqtt/src/mqtt/
   gnunet-mqtt/src/mqtt/Makefile.am
   gnunet-mqtt/src/mqtt/gnunet-mqtt-publish.c
   gnunet-mqtt/src/mqtt/gnunet-mqtt-subscribe.c
   gnunet-mqtt/src/mqtt/gnunet-service-mqtt.c
   gnunet-mqtt/src/mqtt/mqtt.conf.in
   gnunet-mqtt/src/mqtt/mqtt.h
   gnunet-mqtt/src/mqtt/mqtt_api.c
   gnunet-mqtt/src/mqtt/regex_utils.c
   gnunet-mqtt/src/mqtt/regex_utils.h
   gnunet-mqtt/src/mqtt/template.conf
   gnunet-mqtt/src/mqtt/template_single_peer.conf
   gnunet-mqtt/src/mqtt/test_mqtt_multipeer_topology.dat
   gnunet-mqtt/src/mqtt/test_mqtt_multiple_peers.c
   gnunet-mqtt/src/mqtt/test_mqtt_regex_hash.c
   gnunet-mqtt/src/mqtt/test_mqtt_regex_plus.c
   gnunet-mqtt/src/mqtt/test_mqtt_single_peer.c
   gnunet-mqtt/src/mqtt/test_mqtt_unsubscribe.c
Modified:
   gnunet-mqtt/
Log:
Initial commit

gnunet-mqtt is a student project developed for the Peer-to-Peer Systems
and Security course at TUM. This initial commit corresponds to the final
submitted version of the project.


Index: gnunet-mqtt
===================================================================
--- gnunet-mqtt 2013-09-28 10:53:36 UTC (rev 29671)
+++ gnunet-mqtt 2013-09-28 15:58:54 UTC (rev 29672)

Property changes on: gnunet-mqtt
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,17 ##
+Makefile
+Makefile.in
+stamp-h1
+autom4te.cache
+libtool
+missing
+aclocal.m4
+install-sh
+gnunet_mqtt_config.h
+gnunet_mqtt_config.h.in
+configure
+ltmain.sh
+depcomp
+config.log
+config.status
+config.guess
+config.sub
Added: gnunet-mqtt/ABOUT-NLS
===================================================================
--- gnunet-mqtt/ABOUT-NLS                               (rev 0)
+++ gnunet-mqtt/ABOUT-NLS       2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,1101 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international!  The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages.  A few packages already provide translations for their
+messages.
+
+   If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site.  But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+   When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used.  The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+1.1 Quick configuration advice
+==============================
+
+If you want to exploit the full power of internationalization, you
+should configure it using
+
+     ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed.  So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation.  Future versions of GNU `gettext' will
+very likely convey even more functionality.  So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+   So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+1.2 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language.  Most such
+packages use GNU `gettext'.  Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system already
+provides the GNU `gettext' functions.  If not, the included GNU
+`gettext' library will be used.  This library is wholly contained
+within this package, usually in the `intl/' subdirectory, so prior
+installation of the GNU `gettext' package is _not_ required.
+Installers may use special options at configuration time for changing
+the default behaviour.  The commands:
+
+     ./configure --with-included-gettext
+     ./configure --disable-nls
+
+will, respectively, bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+   When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this.  This might not be desirable.  You should use
+the more recent version of the GNU `gettext' library.  I.e. if the file
+`intl/VERSION' shows that the library which comes with this package is
+more recent, you should use
+
+     ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+   The configuration process will not test for the `catgets' function
+and therefore it will not be used.  The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+   Internationalized packages usually have many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.3 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination.  Here `LL' is an ISO 639 two-letter language code,
+and `CC' is an ISO 3166 two-letter country code.  For example, let's
+suppose that you speak German and live in Germany.  At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+   You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries.  For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
+country code serves to distinguish the dialects.
+
+   The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc.  On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
+locales supported by your system for your language by running the
+command `locale -a | grep '^LL''.
+
+   Not all programs have translations for all languages.  By default, an
+English message is shown in place of a nonexistent translation.  If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries.  For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+   Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003).  During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+   In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect.  For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+1.4 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list.  The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
+area.
+
+   If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended.  For example, speakers of Swedish can send a
+message to address@hidden', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around.  If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to address@hidden' to reach the
+coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skills are praised more than
+programming skills, here.
+
+1.5 Available Packages
+======================
+
+Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of October
+2006.  The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+     Ready PO files       af am ar az be bg bs ca cs cy da de el en en_GB eo
+                        +----------------------------------------------------+
+     GNUnet             |                                  []                |
+     a2ps               |             []                [] [] []     []      |
+     aegis              |                                  ()                |
+     ant-phone          |                                  ()                |
+     anubis             |                                  []                |
+     ap-utils           |                                                    |
+     aspell             |                      [] []    [] []        []      |
+     bash               |                      []          []             [] |
+     batchelor          |                                  []                |
+     bfd                |                                                    |
+     bibshelf           |                                  []                |
+     binutils           |                               []                   |
+     bison              |                               [] []                |
+     bison-runtime      |                                                    |
+     bluez-pin          | []                      []       [] []          [] |
+     cflow              |                               []                   |
+     clisp              |                                  []    []          |
+     console-tools      |                         []       []                |
+     coreutils          |                []    []          []                |
+     cpio               |                                                    |
+     cpplib             |                      []       [] []                |
+     cryptonit          |                                  []                |
+     darkstat           |                []             () []                |
+     dialog             |                      [] [] [] [] [] []             |
+     diffutils          |                      [] []    [] [] []          [] |
+     doodle             |                                  []                |
+     e2fsprogs          |                         []       []                |
+     enscript           |                      []       [] []        []      |
+     error              |                      []       [] []        []      |
+     fetchmail          |                      []       [] () []             |
+     fileutils          |                               [] []                |
+     findutils          |                []    []       []                   |
+     flex               |                      []       [] []                |
+     fslint             |                                  []                |
+     gas                |                                                    |
+     gawk               |                      []       [] []                |
+     gbiff              |                                  []                |
+     gcal               |                      []                            |
+     gcc                |                                  []                |
+     gettext-examples   | []                   []          [] []          [] |
+     gettext-runtime    |             []       []       [] []             [] |
+     gettext-tools      |                      []          []                |
+     gimp-print         |                         []    [] []        []      |
+     gip                |                []                                  |
+     gliv               |                                  []                |
+     glunarclock        |                []                                  |
+     gmult              | []                               []                |
+     gnubiff            |                                  ()                |
+     gnucash            |                                  () ()     []      |
+     gnucash-glossary   |                               [] ()                |
+     gnuedu             |                                                    |
+     gnulib             | []          [] []    []       [] []                |
+     gnunet-gtk         |                                                    |
+     gnutls             |                                                    |
+     gpe-aerial         |                         []       []                |
+     gpe-beam           |                         []       []                |
+     gpe-calendar       |                                                    |
+     gpe-clock          |                         []       []                |
+     gpe-conf           |                         []       []                |
+     gpe-contacts       |                                                    |
+     gpe-edit           |                         []                         |
+     gpe-filemanager    |                                                    |
+     gpe-go             |                         []                         |
+     gpe-login          |                         []       []                |
+     gpe-ownerinfo      |                         []       []                |
+     gpe-package        |                                                    |
+     gpe-sketchbook     |                         []       []                |
+     gpe-su             |                         []       []                |
+     gpe-taskmanager    |                         []       []                |
+     gpe-timesheet      |                         []                         |
+     gpe-today          |                         []       []                |
+     gpe-todo           |                                                    |
+     gphoto2            |                         []    [] []        []      |
+     gprof              |                               [] []                |
+     gpsdrive           |                                  ()    ()          |
+     gramadoir          | []                               []                |
+     grep               | []          [] []    []          [] []             |
+     gretl              |                                                    |
+     gsasl              |                                                    |
+     gss                |                                                    |
+     gst-plugins        | []                   [] []    []                   |
+     gst-plugins-base   |                []    []       []                   |
+     gst-plugins-good   | []       []    []    [] []    []           []      |
+     gstreamer          | []             []    [] []    [] []        []      |
+     gtick              |                                  ()                |
+     gtkam              |                         []    [] []                |
+     gtkorphan          |                []                []                |
+     gtkspell           |             []                   [] []          [] |
+     gutenprint         |                               []                   |
+     hello              |                []    []       [] []             [] |
+     id-utils           |                               [] []                |
+     impost             |                                                    |
+     indent             |                      []          []             [] |
+     iso_3166           |                                  []             [] |
+     iso_3166_2         |                                                    |
+     iso_4217           |                                  []                |
+     iso_639            |                                  []             [] |
+     jpilot             |                         []                         |
+     jtag               |                                                    |
+     jwhois             |                                                    |
+     kbd                |                         []    [] [] []             |
+     keytouch           |                                                    |
+     keytouch-editor    |                                                    |
+     keytouch-keyboa... |                                                    |
+     latrine            |                                  ()                |
+     ld                 |                               []                   |
+     leafpad            |                []    [] []       [] []             |
+     libc               |                      [] []    [] [] []             |
+     libexif            |                                  []                |
+     libextractor       |                                  []                |
+     libgpewidget       |                         []    [] []                |
+     libgpg-error       |                                  []                |
+     libgphoto2         |                               [] []                |
+     libgphoto2_port    |                               [] []                |
+     libgsasl           |                                                    |
+     libiconv           |                                  []             [] |
+     libidn             |                               []                [] |
+     lifelines          |                               [] ()                |
+     lilypond           |                                  []                |
+     lingoteach         |                                                    |
+     lynx               |                      [] []    [] []                |
+     m4                 |                         []    [] [] []             |
+     mailutils          |                      []                            |
+     make               |                               [] []                |
+     man-db             |                      [] ()    [] []                |
+     minicom            |                         []    [] []                |
+     mysecretdiary      |                               [] []                |
+     nano               |                []    []          []                |
+     nano_1_0           |                      [] ()    [] []                |
+     opcodes            |                                  []                |
+     parted             |                                                    |
+     pilot-qof          |                                            []      |
+     psmisc             |                []                                  |
+     pwdutils           |                                                    |
+     python             |                                                    |
+     qof                |                                                    |
+     radius             |                      []                            |
+     recode             |             []       []       [] [] []          [] |
+     rpm                |                         []    []                   |
+     screem             |                                                    |
+     scrollkeeper       |          [] []       [] [] [] [] []        []      |
+     sed                |                      []          []             [] |
+     sh-utils           |                               [] []                |
+     shared-mime-info   |                []       []                 []   [] |
+     sharutils          |                []    [] []    [] [] []             |
+     shishi             |                                                    |
+     silky              |                                                    |
+     skencil            |                               [] ()                |
+     sketch             |                               [] ()                |
+     solfege            |                                                    |
+     soundtracker       |                               [] []                |
+     sp                 |                                  []                |
+     stardict           |                         []                         |
+     system-tools-ba... |       []       [] [] [] []    [] [] []     []      |
+     tar                |                []                                  |
+     texinfo            |                               [] []             [] |
+     textutils          |                      []       [] []                |
+     tin                |                                  ()        ()      |
+     tp-robot           |                                  []                |
+     tuxpaint           | []             []             [] []        []      |
+     unicode-han-tra... |                                                    |
+     unicode-transla... |                                                    |
+     util-linux         |                      [] []    [] []                |
+     vorbis-tools       |             []          []    []           []      |
+     wastesedge         |                                  ()                |
+     wdiff              |                      []       [] []        []      |
+     wget               |                      []          []                |
+     xchat              |             [] []    []          [] []     []      |
+     xkeyboard-config   |                                                    |
+     xpad               |                []             []                   |
+                        +----------------------------------------------------+
+                          af am ar az be bg bs ca cs cy da de el en en_GB eo
+                          10  0  1  2  9 22  1 42 41  2 60 95 16  1  17   16
+
+                          es et eu fa fi fr  ga gl gu he hi hr hu id is it
+                        +--------------------------------------------------+
+     GNUnet             |                                                  |
+     a2ps               |    []       [] []                             () |
+     aegis              |                                                  |
+     ant-phone          |                []                                |
+     anubis             |                []                                |
+     ap-utils           |             [] []                                |
+     aspell             |                []  []                         [] |
+     bash               | []             []                    []          |
+     batchelor          |                []  []                            |
+     bfd                | []                                               |
+     bibshelf           | []                 []                         [] |
+     binutils           | []          [] []                                |
+     bison              | [] []          []  []                   []    [] |
+     bison-runtime      |    []          []  []                   []    [] |
+     bluez-pin          |             [] []  []                [] []       |
+     cflow              |                    []                            |
+     clisp              | []             []                                |
+     console-tools      |                                                  |
+     coreutils          | [] []       [] []  []                []          |
+     cpio               | []             []  []                            |
+     cpplib             | []             []                                |
+     cryptonit          |                []                                |
+     darkstat           | []             ()  []                [] []       |
+     dialog             | [] [] []    [] []  []                []       [] |
+     diffutils          | []          [] []  [] []    []       [] []    [] |
+     doodle             |                    []                         [] |
+     e2fsprogs          | []             []                             [] |
+     enscript           |                []  []             []             |
+     error              | []          [] []  []                []          |
+     fetchmail          | []                                               |
+     fileutils          | [] []          []  []                []       [] |
+     findutils          |    []          []  []                []          |
+     flex               | []             []  []                            |
+     fslint             |                []                                |
+     gas                | []             []                                |
+     gawk               | []             []  []       []                   |
+     gbiff              |                []                                |
+     gcal               | []             []                                |
+     gcc                | []                                               |
+     gettext-examples   | []             []  []                [] []    [] |
+     gettext-runtime    | []          [] []  []                   []    [] |
+     gettext-tools      | []             []                             [] |
+     gimp-print         | []             []                                |
+     gip                | []    []       []                                |
+     gliv               |                ()                                |
+     glunarclock        |             []     []                []          |
+     gmult              |       []       []                             [] |
+     gnubiff            |                ()                             () |
+     gnucash            | ()             ()                    ()          |
+     gnucash-glossary   | []                                            [] |
+     gnuedu             | []                                               |
+     gnulib             | [] [] []    [] []  [] []             []          |
+     gnunet-gtk         |                                                  |
+     gnutls             |                                                  |
+     gpe-aerial         | []             []                                |
+     gpe-beam           | []             []                                |
+     gpe-calendar       |                                                  |
+     gpe-clock          | []          [] []                    []          |
+     gpe-conf           |                []                                |
+     gpe-contacts       | []             []                                |
+     gpe-edit           | []             []                    [] []       |
+     gpe-filemanager    | []                                               |
+     gpe-go             | []             []                    []          |
+     gpe-login          | []             []                    []          |
+     gpe-ownerinfo      | []          [] []                    [] []       |
+     gpe-package        | []                                               |
+     gpe-sketchbook     | []             []                                |
+     gpe-su             | []          [] []                    []          |
+     gpe-taskmanager    | []          [] []                                |
+     gpe-timesheet      | []             []  []                   []       |
+     gpe-today          | []          [] []  []                            |
+     gpe-todo           | []                                               |
+     gphoto2            | []          [] []                    []       [] |
+     gprof              | []             []  []                   []       |
+     gpsdrive           | ()             ()                    []       () |
+     gramadoir          |                []  []                            |
+     grep               | [] [] []    [] []  [] []    []    [] [] []    [] |
+     gretl              | []             []                             [] |
+     gsasl              |                    []                   []       |
+     gss                |                []                                |
+     gst-plugins        |                []                    []       [] |
+     gst-plugins-base   |                                      []       [] |
+     gst-plugins-good   |       []                             []       [] |
+     gstreamer          |             []                       []       [] |
+     gtick              |                    []                            |
+     gtkam              | []             []                    []       [] |
+     gtkorphan          |                []                             [] |
+     gtkspell           | []    []    [] []  []                         [] |
+     gutenprint         |                                      []          |
+     hello              | [] [] [] [] [] []  [] []    []    [] [] []    [] |
+     id-utils           |                []  []                [] []    [] |
+     impost             |                []  []                            |
+     indent             | [] [] []    [] []  [] []             [] []    [] |
+     iso_3166           |             [] []                    []          |
+     iso_3166_2         |                []                                |
+     iso_4217           |    []       []        []             []          |
+     iso_639            |          [] [] []  []                []          |
+     jpilot             | []             []                                |
+     jtag               |                []                                |
+     jwhois             | []             []                    [] []    [] |
+     kbd                | []             []                                |
+     keytouch           |                    []                            |
+     keytouch-editor    |                    []                            |
+     keytouch-keyboa... |                    []                            |
+     latrine            |                []  []                         [] |
+     ld                 | []             []                                |
+     leafpad            | []             []  []       []       []       [] |
+     libc               | []          [] []     []             []          |
+     libexif            | []                                               |
+     libextractor       |                    []                            |
+     libgpewidget       | []             []  []                [] []       |
+     libgpg-error       |                                                  |
+     libgphoto2         | []             []                             [] |
+     libgphoto2_port    |                []                             [] |
+     libgsasl           |                []  []                            |
+     libiconv           |    []              []                            |
+     libidn             |                []                             [] |
+     lifelines          |                ()                                |
+     lilypond           |                []                                |
+     lingoteach         |                []                       []    [] |
+     lynx               |    []                                []       [] |
+     m4                 |                []  [] []                []       |
+     mailutils          | []             []                                |
+     make               | []          [] []  [] []    []    []    []       |
+     man-db             | ()                                               |
+     minicom            | []          [] []                    []          |
+     mysecretdiary      | []             []                       []       |
+     nano               | []    []       []  []                []       [] |
+     nano_1_0           | []             []     []                []    [] |
+     opcodes            | []          [] []  []                            |
+     parted             | []             []                       []    [] |
+     pilot-qof          |                                                  |
+     psmisc             |       []                             []       [] |
+     pwdutils           |                                                  |
+     python             |                                                  |
+     qof                |                                         []       |
+     radius             | []             []                                |
+     recode             | []             []  [] []    []       [] []    [] |
+     rpm                |                []                       []       |
+     screem             |                                                  |
+     scrollkeeper       | []          []                       []          |
+     sed                | [] []          []  []                []          |
+     sh-utils           | [] []       [] []  []                []       [] |
+     shared-mime-info   | []    []    [] []                    []       [] |
+     sharutils          | [] []       [] []  [] []             []       [] |
+     shishi             |                                                  |
+     silky              |                []                                |
+     skencil            | []             []                                |
+     sketch             | []             []                                |
+     solfege            |                                               [] |
+     soundtracker       | []             []                             [] |
+     sp                 |                []                                |
+     stardict           |                                      []          |
+     system-tools-ba... | []    []    [] []                 [] [] []    [] |
+     tar                | [] []       [] []  []                []       [] |
+     texinfo            |                []           []                   |
+     textutils          | []             []  [] []             []          |
+     tin                |    []          ()                                |
+     tp-robot           |             [] []  []                []          |
+     tuxpaint           |                    []                []          |
+     unicode-han-tra... |                                                  |
+     unicode-transla... |                []  []                            |
+     util-linux         | [] []       [] []                    [] []    [] |
+     vorbis-tools       | []             []                                |
+     wastesedge         |                ()                                |
+     wdiff              | [] []          []  [] []             [] []    [] |
+     wget               |    []       [] []  []             [] [] []    [] |
+     xchat              | []    []    [] []        []    []    []       [] |
+     xkeyboard-config   |             [] []                    []       [] |
+     xpad               | []                 []                []          |
+                        +--------------------------------------------------+
+                          es et eu fa fi fr  ga gl gu he hi hr hu id is it
+                          88 22 14  2 40 115 61 14  1  8  1  6 59 31  0 52
+
+                          ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
+                        +-------------------------------------------------+
+     GNUnet             |                                                 |
+     a2ps               |    ()                      []          []    () |
+     aegis              |                                        ()       |
+     ant-phone          |                                        []       |
+     anubis             |                            []    []    []       |
+     ap-utils           |                            []                   |
+     aspell             |                         []             []       |
+     bash               |                                        []       |
+     batchelor          |                            []          []       |
+     bfd                |                                                 |
+     bibshelf           |                            []                   |
+     binutils           |                                                 |
+     bison              |                            []    []    []       |
+     bison-runtime      |                            []    []    []       |
+     bluez-pin          |       []                   []          []       |
+     cflow              |                                                 |
+     clisp              |                                        []       |
+     console-tools      |                                                 |
+     coreutils          |                                        []       |
+     cpio               |                                                 |
+     cpplib             |                                        []       |
+     cryptonit          |                                        []       |
+     darkstat           |                            []          []       |
+     dialog             |                            []          []       |
+     diffutils          | []                         []          []       |
+     doodle             |                                                 |
+     e2fsprogs          |                                        []       |
+     enscript           |                                        []       |
+     error              |                                        []       |
+     fetchmail          | []                                     []       |
+     fileutils          | []          []                                  |
+     findutils          |                                        []       |
+     flex               |    []                                  []       |
+     fslint             |                            []          []       |
+     gas                |                                                 |
+     gawk               | []                                     []       |
+     gbiff              |                                        []       |
+     gcal               |                                                 |
+     gcc                |                                                 |
+     gettext-examples   | []                                     []       |
+     gettext-runtime    | [] []                                  []       |
+     gettext-tools      | [] []                                           |
+     gimp-print         | []                                     []       |
+     gip                |                            []          []       |
+     gliv               |                                        []       |
+     glunarclock        |                            []          []       |
+     gmult              | []                         []                   |
+     gnubiff            |                                                 |
+     gnucash            | ()                               ()             |
+     gnucash-glossary   |                                        []       |
+     gnuedu             |                                                 |
+     gnulib             | [] []                      []          []       |
+     gnunet-gtk         |                                                 |
+     gnutls             |                                                 |
+     gpe-aerial         |                                        []       |
+     gpe-beam           |                                        []       |
+     gpe-calendar       | []                                              |
+     gpe-clock          | [] []                                  []       |
+     gpe-conf           |    []                                  []       |
+     gpe-contacts       |    []                                           |
+     gpe-edit           | [] []                                  []       |
+     gpe-filemanager    | [] []                                           |
+     gpe-go             | [] []                                  []       |
+     gpe-login          | [] []                                  []       |
+     gpe-ownerinfo      | []                                     []       |
+     gpe-package        | [] []                                           |
+     gpe-sketchbook     |    []                                  []       |
+     gpe-su             | [] []                                  []       |
+     gpe-taskmanager    | [] [] []                               []       |
+     gpe-timesheet      |                                        []       |
+     gpe-today          | []                                     []       |
+     gpe-todo           | []                                              |
+     gphoto2            | []                                     []       |
+     gprof              |                                                 |
+     gpsdrive           | ()                                     ()    () |
+     gramadoir          |                                        ()       |
+     grep               | []       []                      []    []       |
+     gretl              |                                                 |
+     gsasl              |                                        []       |
+     gss                |                                                 |
+     gst-plugins        |                                        []       |
+     gst-plugins-base   |                                                 |
+     gst-plugins-good   |                                        []       |
+     gstreamer          |                                        []       |
+     gtick              |                                                 |
+     gtkam              | []                                              |
+     gtkorphan          |                                        []       |
+     gtkspell           |                         []             []       |
+     gutenprint         |                                                 |
+     hello              | [] []                      []    []    [] []    |
+     id-utils           |                                        []       |
+     impost             |                                                 |
+     indent             | []                                     []       |
+     iso_3166           |                                        []       |
+     iso_3166_2         |                                        []       |
+     iso_4217           | []                      []             []       |
+     iso_639            | []                                     []       |
+     jpilot             | ()                                     ()    () |
+     jtag               |                                                 |
+     jwhois             |                                        []       |
+     kbd                |                                        []       |
+     keytouch           |                                        []       |
+     keytouch-editor    |                                                 |
+     keytouch-keyboa... |                                                 |
+     latrine            |                                        []       |
+     ld                 |                                                 |
+     leafpad            | []             []                               |
+     libc               | [] []                            []    []    [] |
+     libexif            |                                                 |
+     libextractor       |                                                 |
+     libgpewidget       |                                        []       |
+     libgpg-error       |                                                 |
+     libgphoto2         | []                                              |
+     libgphoto2_port    | []                                              |
+     libgsasl           |                                        []       |
+     libiconv           |                                                 |
+     libidn             | []                                     []       |
+     lifelines          |                                        []       |
+     lilypond           |                                                 |
+     lingoteach         |                                        []       |
+     lynx               | []                                     []       |
+     m4                 | []                                     []       |
+     mailutils          |                                                 |
+     make               | [] []                                  []       |
+     man-db             | ()                                              |
+     minicom            | []                                              |
+     mysecretdiary      |                                        []       |
+     nano               |                            []    []    []       |
+     nano_1_0           |                            []    []       []    |
+     opcodes            |                                        []       |
+     parted             | []                                     []       |
+     pilot-qof          |                                                 |
+     psmisc             | []                               []    []       |
+     pwdutils           |                                                 |
+     python             |                                                 |
+     qof                |                                                 |
+     radius             |                                                 |
+     recode             |                                        []       |
+     rpm                | [] []                                           |
+     screem             | []                                              |
+     scrollkeeper       |                                  [] [] [] []    |
+     sed                | []                                     []       |
+     sh-utils           | []                               []             |
+     shared-mime-info   |    []          []                []    [] []    |
+     sharutils          | []                                     []       |
+     shishi             |                                                 |
+     silky              |                                        []       |
+     skencil            |                                                 |
+     sketch             |                                                 |
+     solfege            |                                                 |
+     soundtracker       |                                                 |
+     sp                 | ()                                              |
+     stardict           |                      []                []       |
+     system-tools-ba... | [] []          []                      []       |
+     tar                | []       []                            []       |
+     texinfo            | []                               []    []       |
+     textutils          | [] []                            []             |
+     tin                |                                                 |
+     tp-robot           |                                        []       |
+     tuxpaint           |                                           []    |
+     unicode-han-tra... |                                                 |
+     unicode-transla... |                                                 |
+     util-linux         | []                                     []       |
+     vorbis-tools       |                                        []       |
+     wastesedge         |                                        []       |
+     wdiff              |                            []    []             |
+     wget               | []                                     []       |
+     xchat              | [] []                []                []       |
+     xkeyboard-config   |                                        []       |
+     xpad               |    []                      []          []       |
+                        +-------------------------------------------------+
+                          ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
+                          52 24  2  2  1  3  0  2  3 21  0 15  1 97  5  1
+
+                          nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv  ta
+                        
+------------------------------------------------------+
+     GNUnet             |                                                      
|
+     a2ps               |           ()     []      [] []       []    [] []     
|
+     aegis              |                          () ()                       
|
+     ant-phone          |                          []                   []     
|
+     anubis             |           []             [] []                       
|
+     ap-utils           |           ()                                         
|
+     aspell             |                          [] []                       
|
+     bash               |                  []      [] []                       
|
+     batchelor          |                          []                   []     
|
+     bfd                |                                                      
|
+     bibshelf           |                                               []     
|
+     binutils           |                             []                []     
|
+     bison              |           []     []      [] []                []     
|
+     bison-runtime      |           []             []          []       []     
|
+     bluez-pin          |           []     []   [] [] []    [] []    [] []     
|
+     cflow              |           []                                         
|
+     clisp              |                             []                       
|
+     console-tools      |                             []                       
|
+     coreutils          |           []                []       []       []     
|
+     cpio               |           []                []                []     
|
+     cpplib             |                                               []     
|
+     cryptonit          |                  []                           []     
|
+     darkstat           |           []     []      []       []       [] []     
|
+     dialog             |           [] []  []   [] [] [] []          [] []     
|
+     diffutils          |           []     []      [] []             [] []     
|
+     doodle             |                                         []    []     
|
+     e2fsprogs          |           []                                  []     
|
+     enscript           |                  []      [] []       []       []     
|
+     error              |                  []      []       []          []     
|
+     fetchmail          |           []                []          []           
|
+     fileutils          |           []             [] []       []       []     
|
+     findutils          |           [] []          []       [] []       []     
|
+     flex               |           []     []      [] []                []     
|
+     fslint             |                  []      []                [] []     
|
+     gas                |                                                      
|
+     gawk               |           []     []      []                   []     
|
+     gbiff              |                          []                          
|
+     gcal               |                                               []     
|
+     gcc                |                                               []     
|
+     gettext-examples   |           [] []          [] []    [] []    [] []     
|
+     gettext-runtime    |           [] []          [] []    [] []    [] []     
|
+     gettext-tools      |           []             [] []    [] []    [] []     
|
+     gimp-print         |                                   []          []     
|
+     gip                |                       []          []       [] []     
|
+     gliv               |                  []      []       []          []     
|
+     glunarclock        |                  []      [] []    []       [] []     
|
+     gmult              |                       [] []                [] []     
|
+     gnubiff            |                          ()                          
|
+     gnucash            |           ()                                  []     
|
+     gnucash-glossary   |              []                   []          []     
|
+     gnuedu             |                                                      
|
+     gnulib             |           []             [] []       []       []     
|
+     gnunet-gtk         |                                               []     
|
+     gnutls             |           []                                  []     
|
+     gpe-aerial         |              []  []      [] []       []    [] []     
|
+     gpe-beam           |              []  []      [] []       []    [] []     
|
+     gpe-calendar       |                             []                       
|
+     gpe-clock          |              []  []      [] []    [] []    [] []     
|
+     gpe-conf           |              []  []      [] []    [] []       []     
|
+     gpe-contacts       |                          [] []       []    [] []     
|
+     gpe-edit           |              []  []      [] []    [] []    [] []     
|
+     gpe-filemanager    |                                      []       []     
|
+     gpe-go             |                  []      [] []       []    [] []     
|
+     gpe-login          |              []  []      [] []    [] []    [] []     
|
+     gpe-ownerinfo      |              []  []      [] []    [] []    [] []     
|
+     gpe-package        |                                      []       []     
|
+     gpe-sketchbook     |              []  []      [] []    [] []    [] []     
|
+     gpe-su             |              []  []      [] []    [] []    [] []     
|
+     gpe-taskmanager    |              []  []      [] []    [] []    [] []     
|
+     gpe-timesheet      |              []  []      [] []    [] []    [] []     
|
+     gpe-today          |              []  []      [] []    [] []    [] []     
|
+     gpe-todo           |                             []       []    [] []     
|
+     gphoto2            |           []             []       []       [] []     
|
+     gprof              |                  []      []                   []     
|
+     gpsdrive           |        []                []                   []     
|
+     gramadoir          |                                   []          []     
|
+     grep               |           [] []  []      [] []       []    [] []     
|
+     gretl              |           []                                         
|
+     gsasl              |           []                               [] []     
|
+     gss                |           []             []                   []     
|
+     gst-plugins        |     []                                  [] [] []     
|
+     gst-plugins-base   |                                               []     
|
+     gst-plugins-good   |     []                                  [] [] []     
|
+     gstreamer          |                                         [] [] []     
|
+     gtick              |                             []                       
|
+     gtkam              |           []     []         []                []     
|
+     gtkorphan          |                                               []     
|
+     gtkspell           |                  []   [] [] []    [] []    [] []     
|
+     gutenprint         |                                               []     
|
+     hello              |           []     []      [] []    [] []    [] []     
|
+     id-utils           |                  []      [] []                []     
|
+     impost             |                                               []     
|
+     indent             |                  []      [] []    []       [] []     
|
+     iso_3166           |              []                []    [] [] [] []     
|
+     iso_3166_2         |                                                      
|
+     iso_4217           |                                []    []    [] []     
|
+     iso_639            |                                []    []    [] []     
|
+     jpilot             |                                                      
|
+     jtag               |                                   []                 
|
+     jwhois             |           []     []      []                   []     
|
+     kbd                |           []             []                   []     
|
+     keytouch           |                                               []     
|
+     keytouch-editor    |                                               []     
|
+     keytouch-keyboa... |                                               []     
|
+     latrine            |                          []                   []     
|
+     ld                 |                                               []     
|
+     leafpad            |           [] []             []    []          []  [] 
|
+     libc               |           []     []         []    []          []     
|
+     libexif            |           []                                         
|
+     libextractor       |                          []                   []     
|
+     libgpewidget       |              []  []      []       [] []    [] []     
|
+     libgpg-error       |           []             []                          
|
+     libgphoto2         |           []                                         
|
+     libgphoto2_port    |           []                []                []     
|
+     libgsasl           |           []             []                [] []     
|
+     libiconv           |                                      []    []        
|
+     libidn             |           []                               [] ()     
|
+     lifelines          |           []                                  []     
|
+     lilypond           |                                                      
|
+     lingoteach         |                  []                                  
|
+     lynx               |                  []         []                []     
|
+     m4                 |           []     []      [] []                []     
|
+     mailutils          |           []             [] []                []     
|
+     make               |           []     []         []                []     
|
+     man-db             |                          []                   []     
|
+     minicom            |           []     []      [] []                []     
|
+     mysecretdiary      |                  []      [] []                []     
|
+     nano               |                  []      []                   []     
|
+     nano_1_0           |           []             [] []                []     
|
+     opcodes            |                          []                   []     
|
+     parted             |           []                                         
|
+     pilot-qof          |                                               []     
|
+     psmisc             |           []                                  []     
|
+     pwdutils           |           []                                  []     
|
+     python             |                                                      
|
+     qof                |                  []                           []     
|
+     radius             |           []                []                       
|
+     recode             |           [] []  []      [] []       []       []     
|
+     rpm                |           [] []             []                []     
|
+     screem             |                                                      
|
+     scrollkeeper       |           []             [] []    []    [] [] []     
|
+     sed                |           [] []  []      [] []    [] []    [] []     
|
+     sh-utils           |                             []       []    []        
|
+     shared-mime-info   |              []  []                     [] [] []     
|
+     sharutils          |           []                []             [] []     
|
+     shishi             |           []                                         
|
+     silky              |                                   []                 
|
+     skencil            |              []  []                           []     
|
+     sketch             |              []  []                           []     
|
+     solfege            |                                               []     
|
+     soundtracker       |                                   []          []     
|
+     sp                 |                                                      
|
+     stardict           |                             []    []          []     
|
+     system-tools-ba... |        [] [] []  []      []             [] [] []  [] 
|
+     tar                |           []             [] []       []       []     
|
+     texinfo            |           []             [] []                []     
|
+     textutils          |                             []       []       []     
|
+     tin                |                             ()                       
|
+     tp-robot           |                             []                       
|
+     tuxpaint           |              []                      [] [] [] []     
|
+     unicode-han-tra... |                                                      
|
+     unicode-transla... |                                                      
|
+     util-linux         |                  []         []       []       []     
|
+     vorbis-tools       |                          [] []                       
|
+     wastesedge         |                                                      
|
+     wdiff              |           []     []      [] []    []          []     
|
+     wget               |              []             []    []          []     
|
+     xchat              |        []                   []    [] [] [] [] []     
|
+     xkeyboard-config   |                                      []       []     
|
+     xpad               |                                   [] []       []     
|
+                        
+------------------------------------------------------+
+                          nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv  ta
+                           0   2  3 58 30  54    5 73 72  4 40 46 11 50 128  2
+
+                          tg th tk tr uk ven vi  wa xh zh_CN zh_HK zh_TW zu
+                        +---------------------------------------------------+
+     GNUnet             |                    []                             |  
2
+     a2ps               |          [] []     []                             | 
19
+     aegis              |                                                   |  0
+     ant-phone          |          []        []                             |  
6
+     anubis             |          [] []     []                             | 
11
+     ap-utils           |             ()     []                             |  
4
+     aspell             |             []     []  []                         | 
15
+     bash               |                    []                             | 
11
+     batchelor          |          []        []                             |  
9
+     bfd                |                                                   |  
1
+     bibshelf           |                    []                             |  
7
+     binutils           |          []        []                     []      |  
9
+     bison              |          []        []                     []      | 
19
+     bison-runtime      |                    []         []          []      | 
15
+     bluez-pin          |          [] []     []  []     []          []      | 
28
+     cflow              |             []     []                             |  
5
+     clisp              |                                                   |  
6
+     console-tools      |          []        []                             |  
5
+     coreutils          |          []        []                             | 
16
+     cpio               |          [] []     []                             |  
9
+     cpplib             |          []        []         []          []      | 
11
+     cryptonit          |                                                   |  
5
+     darkstat           |                    []         ()          ()      | 
15
+     dialog             |          [] []     []         []          []      | 
30
+     diffutils          |          []        []         []          []      | 
28
+     doodle             |                    []                             |  
6
+     e2fsprogs          |          []        []                             | 
10
+     enscript           |          [] []     []                             | 
16
+     error              |          []        []         []          []      | 
18
+     fetchmail          |          []        []                             | 
12
+     fileutils          |          []                   []          []      | 
18
+     findutils          |          []        []                     []      | 
17
+     flex               |          []        []                             | 
15
+     fslint             |                    []                             |  
9
+     gas                |          []                                       |  
3
+     gawk               |          []        []                             | 
15
+     gbiff              |                    []                             |  
5
+     gcal               |          []                                       |  
5
+     gcc                |          []                   []          []      |  
6
+     gettext-examples   |          [] []     []         []    []    []      | 
27
+     gettext-runtime    |          [] []     []         []    []    []      | 
28
+     gettext-tools      |          [] []     []         []          []      | 
19
+     gimp-print         |             []     []                             | 
12
+     gip                |                    []                     []      | 
12
+     gliv               |          []        []                             |  
8
+     glunarclock        |                    []  []                 []      | 
15
+     gmult              |          []        []         []          []      | 
15
+     gnubiff            |                    []                             |  
1
+     gnucash            |          ()                                       |  
2
+     gnucash-glossary   |                    []                     []      |  
9
+     gnuedu             |                    []                             |  
2
+     gnulib             |          [] []     []         []          []      | 
28
+     gnunet-gtk         |                                                   |  
1
+     gnutls             |                                                   |  
2
+     gpe-aerial         |                    []         []                  | 
14
+     gpe-beam           |                    []         []                  | 
14
+     gpe-calendar       |                    []                             |  
3
+     gpe-clock          |          []        []  []     []                  | 
21
+     gpe-conf           |                    []         []                  | 
14
+     gpe-contacts       |                    []         []                  | 
10
+     gpe-edit           |          []        []  []                 []      | 
20
+     gpe-filemanager    |                    []                             |  
6
+     gpe-go             |          []        []                             | 
15
+     gpe-login          |          []        []  []     []          []      | 
21
+     gpe-ownerinfo      |          []        []         []          []      | 
21
+     gpe-package        |                    []                             |  
6
+     gpe-sketchbook     |          []        []                             | 
16
+     gpe-su             |          []        []         []                  | 
20
+     gpe-taskmanager    |          []        []         []                  | 
20
+     gpe-timesheet      |          []        []         []          []      | 
18
+     gpe-today          |          []        []  []     []          []      | 
21
+     gpe-todo           |                    []                             |  
7
+     gphoto2            |             []     []         []          []      | 
20
+     gprof              |          []        []                             | 
11
+     gpsdrive           |                                                   |  
4
+     gramadoir          |                    []                             |  
7
+     grep               |          [] []     []                     []      | 
34
+     gretl              |                                                   |  
4
+     gsasl              |                    []         []                  |  
8
+     gss                |                    []                             |  
5
+     gst-plugins        |             []     []                     []      | 
15
+     gst-plugins-base   |             []     []         []                  |  
9
+     gst-plugins-good   |             []     []         []    []    []      | 
20
+     gstreamer          |          [] []     []                             | 
17
+     gtick              |                    []                             |  
3
+     gtkam              |                    []                             | 
13
+     gtkorphan          |                    []                             |  
7
+     gtkspell           |             []     []  []     []    []    []      | 
26
+     gutenprint         |                                                   |  
3
+     hello              |          [] []     []         []          []      | 
37
+     id-utils           |          []        []                             | 
14
+     impost             |                    []                             |  
4
+     indent             |          []        []         []          []      | 
25
+     iso_3166           |       [] []        []               []            | 
16
+     iso_3166_2         |                                                   |  
2
+     iso_4217           |          []        []                             | 
14
+     iso_639            |                    []                             | 
14
+     jpilot             |          [] []     []         []                  |  
7
+     jtag               |                    []                             |  
3
+     jwhois             |          []        []                     []      | 
13
+     kbd                |          []        []                             | 
12
+     keytouch           |                    []                             |  
4
+     keytouch-editor    |                                                   |  
2
+     keytouch-keyboa... |                    []                             |  
3
+     latrine            |          []        []                             |  
8
+     ld                 |          []        []         []          []      |  
8
+     leafpad            |          []        []         []          []      | 
23
+     libc               |          []                   []          []      | 
23
+     libexif            |                    []                             |  
4
+     libextractor       |                    []                             |  
5
+     libgpewidget       |                    []  []     []                  | 
19
+     libgpg-error       |                    []                             |  
4
+     libgphoto2         |             []                                    |  
8
+     libgphoto2_port    |             []     []                     []      | 
11
+     libgsasl           |                    []                             |  
8
+     libiconv           |                    []                             |  
7
+     libidn             |                    []         []                  | 
10
+     lifelines          |                                                   |  
4
+     lilypond           |                                                   |  
2
+     lingoteach         |                    []                             |  
6
+     lynx               |          [] []     []                             | 
15
+     m4                 |                    []         []          []      | 
18
+     mailutils          |             []                                    |  
8
+     make               |          []        []         []                  | 
20
+     man-db             |                    []                             |  
6
+     minicom            |                    []                             | 
14
+     mysecretdiary      |          []        []                             | 
12
+     nano               |                    []                     []      | 
17
+     nano_1_0           |          [] []     []                             | 
18
+     opcodes            |          []        []                             | 
10
+     parted             |          [] []                            []      | 
10
+     pilot-qof          |                    []                             |  
3
+     psmisc             |                    []                             | 
10
+     pwdutils           |                    []                             |  
3
+     python             |                                                   |  0
+     qof                |                    []                             |  
4
+     radius             |             []                                    |  
6
+     recode             |          []        []         []                  | 
25
+     rpm                |          [] []     []                     []      | 
14
+     screem             |                    []                             |  
2
+     scrollkeeper       |          [] []     []                     []      | 
26
+     sed                |          []        []                     []      | 
22
+     sh-utils           |          []                                       | 
15
+     shared-mime-info   |             []     []         []          []      | 
24
+     sharutils          |          []        []                     []      | 
23
+     shishi             |                                                   |  
1
+     silky              |                    []                             |  
4
+     skencil            |                    []                             |  
7
+     sketch             |                                                   |  
6
+     solfege            |                                                   |  
2
+     soundtracker       |          []        []                             |  
9
+     sp                 |          []                                       |  
3
+     stardict           |             []     []         []          []      | 
11
+     system-tools-ba... |    []    [] []     []     []  []          []      | 
37
+     tar                |          [] []     []                     []      | 
20
+     texinfo            |          []        []         []                  | 
15
+     textutils          |          []                   []          []      | 
17
+     tin                |                                                   |  
1
+     tp-robot           |                    []         []          []      | 
10
+     tuxpaint           |                    []  []                 []      | 
16
+     unicode-han-tra... |                                                   |  0
+     unicode-transla... |                                                   |  
2
+     util-linux         |          [] []     []                             | 
20
+     vorbis-tools       |             []     []                             | 
11
+     wastesedge         |                                                   |  
1
+     wdiff              |          []        []                             | 
22
+     wget               |          []        []                     []      | 
19
+     xchat              |             []     []         []          []      | 
29
+     xkeyboard-config   |          [] []     []                     []      | 
11
+     xpad               |                    []         []          []      | 
14
+                        +---------------------------------------------------+
+       77 teams           tg th tk tr uk ven vi  wa xh zh_CN zh_HK zh_TW zu
+      170 domains          0  1  1 77 39  0  136 10  1  48     5    54    0  
2028
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer.  There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+   If October 2006 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
+matrix with full percentage details can be found at
+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
+
+1.6 Using `gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package.  Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library.  This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+   Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations.  The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project.  Therefore the information given above
+applies also for every other Free Software Project.  Contact
address@hidden' to make the `.pot' files available to
+the translation teams.
+

Added: gnunet-mqtt/AUTHORS
===================================================================
--- gnunet-mqtt/AUTHORS                         (rev 0)
+++ gnunet-mqtt/AUTHORS 2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,2 @@
+Ramona Popa
+Artur Grunau <address@hidden>

Added: gnunet-mqtt/COPYING
===================================================================
--- gnunet-mqtt/COPYING                         (rev 0)
+++ gnunet-mqtt/COPYING 2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 3 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, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.

Added: gnunet-mqtt/ChangeLog
===================================================================
Added: gnunet-mqtt/INSTALL
===================================================================
--- gnunet-mqtt/INSTALL                         (rev 0)
+++ gnunet-mqtt/INSTALL 2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,365 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+   The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package, generally using the just-built uninstalled binaries.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS
+     KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+

Added: gnunet-mqtt/Makefile.am
===================================================================
--- gnunet-mqtt/Makefile.am                             (rev 0)
+++ gnunet-mqtt/Makefile.am     2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,8 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = src po
+
+EXTRA_DIST = config.rpath  \
+  install-sh
+
+ACLOCAL_AMFLAGS = -I m4

Added: gnunet-mqtt/NEWS
===================================================================
Added: gnunet-mqtt/README
===================================================================
--- gnunet-mqtt/README                          (rev 0)
+++ gnunet-mqtt/README  2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1 @@
+GNUnet-MQTT implements the MQTT protocol as a GNUnet extension.

Added: gnunet-mqtt/bootstrap
===================================================================
--- gnunet-mqtt/bootstrap                               (rev 0)
+++ gnunet-mqtt/bootstrap       2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+libtoolize --automake --copy --force
+aclocal -I m4
+autoheader
+autoconf
+automake --add-missing --copy


Property changes on: gnunet-mqtt/bootstrap
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: gnunet-mqtt/config.rpath
===================================================================
--- gnunet-mqtt/config.rpath                            (rev 0)
+++ gnunet-mqtt/config.rpath    2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,672 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+#   Copyright 1996-2010 Free Software Foundation, Inc.
+#   Taken from GNU libtool, 2001
+#   Originally by Gordon Matzigkeit <address@hidden>, 1996
+#
+#   This file is free software; the Free Software Foundation gives
+#   unlimited permission to copy and/or distribute it, with or without
+#   modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+#   than 256 bytes, otherwise the compiler driver will dump core. The only
+#   known workaround is to choose shorter directory names for the build
+#   directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+  wl='-Wl,'
+else
+  case "$host_os" in
+    aix*)
+      wl='-Wl,'
+      ;;
+    darwin*)
+      case $cc_basename in
+        xlc*)
+          wl='-Wl,'
+          ;;
+      esac
+      ;;
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      wl='-Wl,'
+      ;;
+    irix5* | irix6* | nonstopux*)
+      wl='-Wl,'
+      ;;
+    newsos6)
+      ;;
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+        ecc*)
+          wl='-Wl,'
+          ;;
+        icc* | ifort*)
+          wl='-Wl,'
+          ;;
+        lf95*)
+          wl='-Wl,'
+          ;;
+        pgcc | pgf77 | pgf90)
+          wl='-Wl,'
+          ;;
+        ccc*)
+          wl='-Wl,'
+          ;;
+        como)
+          wl='-lopt='
+          ;;
+        *)
+          case `$CC -V 2>&1 | sed 5q` in
+            *Sun\ C*)
+              wl='-Wl,'
+              ;;
+          esac
+          ;;
+      esac
+      ;;
+    osf3* | osf4* | osf5*)
+      wl='-Wl,'
+      ;;
+    rdos*)
+      ;;
+    solaris*)
+      wl='-Wl,'
+      ;;
+    sunos4*)
+      wl='-Qoption ld '
+      ;;
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      wl='-Wl,'
+      ;;
+    sysv4*MP*)
+      ;;
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      wl='-Wl,'
+      ;;
+    unicos*)
+      wl='-Wl,'
+      ;;
+    uts4*)
+      ;;
+  esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  # Set some defaults for GNU ld with shared library support. These
+  # are reset later if shared libraries are not supported. Putting them
+  # here allows them to be overridden if necessary.
+  # Unlike libtool, we use -rpath here, not --rpath, since the documented
+  # option of GNU ld is called -rpath, not --rpath.
+  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+  case "$host_os" in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+        ld_shlibs=no
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # Samuel A. Falvo II <address@hidden> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we cannot use
+      # them.
+      ld_shlibs=no
+      ;;
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    cygwin* | mingw* | pw32* | cegcc*)
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      ;;
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    netbsd*)
+      ;;
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+        ld_shlibs=no
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; 
then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+          ld_shlibs=no
+          ;;
+        *)
+          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; 
then
+            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo 
${wl}-rpath,$libdir`'
+          else
+            ld_shlibs=no
+          fi
+          ;;
+      esac
+      ;;
+    sunos4*)
+      hardcode_direct=yes
+      ;;
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+  esac
+  if test "$ld_shlibs" = no; then
+    hardcode_libdir_flag_spec=
+  fi
+else
+  case "$host_os" in
+    aix3*)
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes; then
+        # Neither direct hardcoding nor static linking is supported with a
+        # broken collect2.
+        hardcode_direct=unsupported
+      fi
+      ;;
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+        # On IA64, the linker does run time linking by default, so we don't
+        # have to do anything special.
+        aix_use_runtimelinking=no
+      else
+        aix_use_runtimelinking=no
+        # Test if we are trying to use run time linking or normal
+        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+        # need to do runtime linking.
+        case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+          for ld_flag in $LDFLAGS; do
+            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+              aix_use_runtimelinking=yes
+              break
+            fi
+          done
+          ;;
+        esac
+      fi
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      if test "$GCC" = yes; then
+        case $host_os in aix4.[012]|aix4.[012].*)
+          collect2name=`${CC} -print-prog-name=collect2`
+          if test -f "$collect2name" && \
+            strings "$collect2name" | grep resolve_lib_name >/dev/null
+          then
+            # We have reworked collect2
+            :
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+          ;;
+        esac
+      fi
+      # Begin _LT_AC_SYS_LIBPATH_AIX.
+      echo 'int main () { return 0; }' > conftest.c
+      ${CC} ${LDFLAGS} conftest.c -o conftest
+      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File 
Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      if test -z "$aix_libpath"; then
+        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File 
Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      fi
+      if test -z "$aix_libpath"; then
+        aix_libpath="/usr/lib:/lib"
+      fi
+      rm -f conftest.c conftest
+      # End _LT_AC_SYS_LIBPATH_AIX.
+      if test "$aix_use_runtimelinking" = yes; then
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+      else
+        if test "$host_cpu" = ia64; then
+          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+        else
+          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        fi
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+    bsdi[45]*)
+      ;;
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      libext=lib
+      ;;
+    darwin* | rhapsody*)
+      hardcode_direct=no
+      if test "$GCC" = yes ; then
+        :
+      else
+        case $cc_basename in
+          xlc*)
+            ;;
+          *)
+            ld_shlibs=no
+            ;;
+        esac
+      fi
+      ;;
+    dgux*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+    freebsd2.2*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    freebsd2*)
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    freebsd* | dragonfly*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    hpux9*)
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      ;;
+    hpux10*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        hardcode_direct=yes
+        # hardcode_minus_L: Not really in the search PATH,
+        # but as the default location of the library.
+        hardcode_minus_L=yes
+      fi
+      ;;
+    hpux11*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct=no
+            ;;
+          *)
+            hardcode_direct=yes
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+        esac
+      fi
+      ;;
+    irix5* | irix6* | nonstopux*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    netbsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    newsos6)
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+        hardcode_direct=yes
+        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+        else
+          case "$host_os" in
+            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+              hardcode_libdir_flag_spec='-R$libdir'
+              ;;
+            *)
+              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+              ;;
+          esac
+        fi
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      ;;
+    osf3*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    osf4* | osf5*)
+      if test "$GCC" = yes; then
+        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+        # Both cc and cxx compiler support -rpath directly
+        hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+    solaris*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+    sunos4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    sysv4)
+      case $host_vendor in
+        sni)
+          hardcode_direct=yes # is this really true???
+          ;;
+        siemens)
+          hardcode_direct=no
+          ;;
+        motorola)
+          hardcode_direct=no #Motorola manual says yes, but my tests say they 
lie
+          ;;
+      esac
+      ;;
+    sysv4.3*)
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+        ld_shlibs=yes
+      fi
+      ;;
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | 
sco3.2v5.0.[024]*)
+      ;;
+    sysv5* | sco3.2v5* | sco5v6*)
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo 
${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      ;;
+    uts4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    *)
+      ld_shlibs=no
+      ;;
+  esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec=      # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+  aix3*)
+    library_names_spec='$libname.a'
+    ;;
+  aix[4-9]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  amigaos*)
+    library_names_spec='$libname.a'
+    ;;
+  beos*)
+    library_names_spec='$libname$shrext'
+    ;;
+  bsdi[45]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  cygwin* | mingw* | pw32* | cegcc*)
+    shrext=.dll
+    library_names_spec='$libname.dll.a $libname.lib'
+    ;;
+  darwin* | rhapsody*)
+    shrext=.dylib
+    library_names_spec='$libname$shrext'
+    ;;
+  dgux*)
+    library_names_spec='$libname$shrext'
+    ;;
+  freebsd1*)
+    ;;
+  freebsd* | dragonfly*)
+    case "$host_os" in
+      freebsd[123]*)
+        library_names_spec='$libname$shrext$versuffix' ;;
+      *)
+        library_names_spec='$libname$shrext' ;;
+    esac
+    ;;
+  gnu*)
+    library_names_spec='$libname$shrext'
+    ;;
+  hpux9* | hpux10* | hpux11*)
+    case $host_cpu in
+      ia64*)
+        shrext=.so
+        ;;
+      hppa*64*)
+        shrext=.sl
+        ;;
+      *)
+        shrext=.sl
+        ;;
+    esac
+    library_names_spec='$libname$shrext'
+    ;;
+  interix[3-9]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  irix5* | irix6* | nonstopux*)
+    library_names_spec='$libname$shrext'
+    case "$host_os" in
+      irix5* | nonstopux*)
+        libsuff= shlibsuff=
+        ;;
+      *)
+        case $LD in
+          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 
shlibsuff=N32 ;;
+          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+          *) libsuff= shlibsuff= ;;
+        esac
+        ;;
+    esac
+    ;;
+  linux*oldld* | linux*aout* | linux*coff*)
+    ;;
+  linux* | k*bsd*-gnu)
+    library_names_spec='$libname$shrext'
+    ;;
+  knetbsd*-gnu)
+    library_names_spec='$libname$shrext'
+    ;;
+  netbsd*)
+    library_names_spec='$libname$shrext'
+    ;;
+  newsos6)
+    library_names_spec='$libname$shrext'
+    ;;
+  nto-qnx*)
+    library_names_spec='$libname$shrext'
+    ;;
+  openbsd*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  os2*)
+    libname_spec='$name'
+    shrext=.dll
+    library_names_spec='$libname.a'
+    ;;
+  osf3* | osf4* | osf5*)
+    library_names_spec='$libname$shrext'
+    ;;
+  rdos*)
+    ;;
+  solaris*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sunos4*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  sysv4 | sysv4.3*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sysv4*MP*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+    library_names_spec='$libname$shrext'
+    ;;
+  uts4*)
+    library_names_spec='$libname$shrext'
+    ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e 
"$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e 
"$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 
's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF


Property changes on: gnunet-mqtt/config.rpath
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: gnunet-mqtt/configure.ac
===================================================================
--- gnunet-mqtt/configure.ac                            (rev 0)
+++ gnunet-mqtt/configure.ac    2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,187 @@
+# This file is part of GNUnet.
+# (C) 2001-2011 Christian Grothoff (and other contributing authors)
+#
+# GNUnet 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, or (at your
+# option) any later version.
+#
+# GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+#
+# Process this file with autoconf to produce a configure script.
+#
+AC_PREREQ(2.61)
+AC_INIT([gnunet-mqtt],[0.0.0],address@hidden)
+AM_INIT_AUTOMAKE([gnunet-mqtt], [0.0.0])
+AM_CONFIG_HEADER(gnunet_mqtt_config.h)
+
+AH_TOP([#define _GNU_SOURCE  1])
+
+AC_ISC_POSIX
+AC_PROG_AWK
+AC_PROG_CC
+
+AC_PROG_MKDIR_P
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_CC
+AM_PROG_CC_STDC
+AC_HEADER_STDC
+AC_CANONICAL_HOST
+
+# dynamic libraries/plugins
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+
+AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
+
+CFLAGS="-Wall $CFLAGS"
+# use '-fno-strict-aliasing', but only if the compiler can take it
+if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1;
+then
+ CFLAGS="-fno-strict-aliasing $CFLAGS"
+fi
+
+
+# Check system type
+case "$host_os" in
+*darwin* | *rhapsody* | *macosx*)
+     AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system])
+     CFLAGS="-no-cpp-precomp $CFLAGS"
+     LDFLAGS="-flat_namespace -undefined suppress $LDFLAGS"
+     ;;
+linux*)
+     AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
+     ;;
+freebsd*)
+     AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
+     AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
+     ;;
+openbsd*)
+     AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
+     AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
+     ;;
+netbsd*)
+     AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
+     AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
+     ;;
+*solaris*)
+     AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
+     AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work])
+     build_target="solaris"
+     ;;
+*arm-linux*)
+     AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
+     ;;
+*cygwin*)
+     AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
+     AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
+     AC_CHECK_LIB(intl, gettext)
+     LDFLAGS="$LDFLAGS -no-undefined"
+     build_target="cygwin"
+     ;;
+*mingw*)
+     AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
+     AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
+     AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
+     AC_CHECK_LIB(intl, gettext)
+     LDFLAGS="$LDFLAGS -no-undefined -Wl,--export-all-symbols -lws2_32"
+     CFLAGS="-mms-bitfields $CFLAGS"
+     build_target="mingw"
+     ;;
+*)
+     AC_MSG_RESULT(Unrecognised OS $host_os)
+     AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
+;;
+esac
+
+AM_CONDITIONAL(MINGW,   test "$build_target" = "mingw")
+
+# check for gettext
+AM_GNU_GETTEXT_VERSION([0.18.1])
+AM_GNU_GETTEXT([external])
+
+AC_CHECK_HEADERS([errno.h stdio.h unistd.h locale.h sys/stat.h sys/types.h 
langinfo.h libintl.h unistd.h stddef.h argz.h sys/socket.h netinet/in.h 
stdarg.h])
+
+# test for GNUnet core
+gnunet=0
+lookin=${prefix}
+backup_LDFLAGS="$LDFLAGS"      
+backup_CPPFLAGS="$CPPFLAGS"
+GNUNET_LDFLAGS=""
+GNUNET_CPPFLAGS=""
+AC_MSG_CHECKING(for GNUnet core)
+AC_ARG_WITH(gnunet,
+   [  --with-gnunet=PFX       Base of GNUnet installation],
+   [AC_MSG_RESULT([$with_gnunet])
+    case $with_gnunet in
+      no)
+        lookin=""
+        ;;
+      yes)
+        lookin="${prefix}"
+        ;;
+      *)
+        lookin="$with_gnunet"
+        ;;
+    esac
+   ],
+   [
+     AC_MSG_RESULT([--with-gnunet not specified])
+     PKG_CHECK_MODULES([GNUNET], [gnunetutil >= 0.9.0], gnunet=1)
+   ]
+)
+
+if test "x$gnunet" == "x0" -a ! "x$lookin" == "x"
+then
+  AC_MSG_CHECKING(for GNUnet util library in $lookin)
+  GNUNET_LDFLAGS="-L${lookin}/lib"
+  GNUNET_CPPFLAGS="-I${lookin}/include"
+  LDFLAGS="$GNUNET_LDFLAGS $backup_LDFLAGS"
+  CPPFLAGS="$GNUNET_CPPFLAGS $backup_CPPFLAGS"
+  AC_CHECK_HEADERS([gnunet/gnunet_util_lib.h],
+    AC_CHECK_LIB([gnunetutil], [GNUNET_xfree_],
+      [
+        gnunet=1
+        EXT_LIB_PATH="-L${lookin}/lib $EXT_LIB_PATH"
+      ]
+    ),,[#include <gnunet/platform.h>]
+  )
+fi
+
+if test "x$gnunet" == "x0"
+then
+  AC_MSG_ERROR([gnunet-mqtt requires GNUnet])
+fi
+
+AC_SUBST(GNUNET_CPPFLAGS)
+AC_SUBST(GNUNET_LDFLAGS)
+LDFLAGS="$backup_LDFLAGS"
+CPPFLAGS="$backup_CPPFLAGS"
+
+AC_DEFINE_DIR([PACKAGE_DATA], [datarootdir], [The directory for installing 
read-only architecture-independent data])
+
+# Set PACKAGE_SOURCE_DIR in gnunet_mqtt_config.h.
+packagesrcdir=`cd $srcdir && pwd`
+AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [source dir])
+
+AC_OUTPUT([ po/Makefile.in
+Makefile
+src/Makefile
+src/include/Makefile
+src/mqtt/Makefile
+src/mqtt/mqtt.conf
+])

Index: gnunet-mqtt/m4
===================================================================
--- gnunet-mqtt/m4      2013-09-28 10:53:36 UTC (rev 29671)
+++ gnunet-mqtt/m4      2013-09-28 15:58:54 UTC (rev 29672)

Property changes on: gnunet-mqtt/m4
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+libtool.m4
Added: gnunet-mqtt/m4/ac_define_dir.m4
===================================================================
--- gnunet-mqtt/m4/ac_define_dir.m4                             (rev 0)
+++ gnunet-mqtt/m4/ac_define_dir.m4     2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,35 @@
+dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+dnl
+dnl This macro _AC_DEFINEs VARNAME to the expansion of the DIR
+dnl variable, taking care of fixing up ${prefix} and such.
+dnl
+dnl VARNAME is offered as both a C preprocessor symbol, and an output
+dnl variable.
+dnl
+dnl Note that the 3 argument form is only supported with autoconf 2.13
+dnl and later (i.e. only where _AC_DEFINE supports 3 arguments).
+dnl
+dnl Examples:
+dnl
+dnl    AC_DEFINE_DIR(DATADIR, datadir)
+dnl    AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
+dnl
+dnl @category Misc
+dnl @author Stepan Kasal <address@hidden>
+dnl @author Andreas Schwab <address@hidden>
+dnl @author Guido Draheim <address@hidden>
+dnl @author Alexandre Oliva
+dnl @version 2005-01-17
+dnl @license AllPermissive
+
+AC_DEFUN([AC_DEFINE_DIR], [
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"[$]$2\""
+  AC_SUBST($1, "$ac_define_dir")
+  AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+])

Added: gnunet-mqtt/m4/gettext.m4
===================================================================
--- gnunet-mqtt/m4/gettext.m4                           (rev 0)
+++ gnunet-mqtt/m4/gettext.m4   2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,383 @@
+# gettext.m4 serial 63 (gettext-0.18)
+dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <address@hidden>, 1995-2000.
+dnl   Bruno Haible <address@hidden>, 2000-2006, 2008-2010.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl    default (if it is not specified or empty) is 'no-libtool'.
+dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.  If NEEDSYMBOL is specified and is
+dnl    'need-formatstring-macros', then GNU gettext implementations that don't
+dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries.  If empty,
+dnl    the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+  dnl Argument checking.
+  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , 
[ifelse([$1], [use-libtool], ,
+    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+  ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
+    [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] 
argument is deprecated.])])
+  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], 
[need-formatstring-macros], ,
+    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+  define([gt_included_intl],
+    ifelse([$1], [external],
+      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+      [yes]))
+  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+  gt_NEEDS_INIT
+  AM_GNU_GETTEXT_NEED([$2])
+
+  AC_REQUIRE([AM_PO_SUBDIRS])dnl
+  ifelse(gt_included_intl, yes, [
+    AC_REQUIRE([AM_INTL_SUBDIR])dnl
+  ])
+
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Sometimes libintl requires libiconv, so first search for libiconv.
+  dnl Ideally we would do this search only after the
+  dnl      if test "$USE_NLS" = "yes"; then
+  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != 
"yes"; }; then
+  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+  dnl the configure script would need to contain the same shell code
+  dnl again, outside any 'if'. There are two solutions:
+  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+  dnl documented, we avoid it.
+  ifelse(gt_included_intl, yes, , [
+    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+  ])
+
+  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+  gt_INTL_MACOSX
+
+  dnl Set USE_NLS.
+  AC_REQUIRE([AM_NLS])
+
+  ifelse(gt_included_intl, yes, [
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+  ])
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+  dnl Add a version number to the cache macros.
+  case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+  dnl If we use NLS figure out what method
+  if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+    ifelse(gt_included_intl, yes, [
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH([included-gettext],
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=no)
+      AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+    ])
+        dnl User does not insist on using GNU NLS library.  Figure out what
+        dnl to use.  If GNU gettext is available we use this.  Else we have
+        dnl to fall back to GNU NLS library.
+
+        if test $gt_api_version -ge 3; then
+          gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+        else
+          gt_revision_test_code=
+        fi
+        if test $gt_api_version -ge 2; then
+          gt_expression_test_code=' + * ngettext ("", "", 0)'
+        else
+          gt_expression_test_code=
+        fi
+
+        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+         [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+            [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + 
*_nl_domain_bindings],
+            [eval "$gt_func_gnugettext_libc=yes"],
+            [eval "$gt_func_gnugettext_libc=no"])])
+
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != 
"yes"; }; then
+          dnl Sometimes libintl requires libiconv, so first search for 
libiconv.
+          ifelse(gt_included_intl, yes, , [
+            AM_ICONV_LINK
+          ])
+          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+          dnl even if libiconv doesn't exist.
+          AC_LIB_LINKFLAGS_BODY([intl])
+          AC_CACHE_CHECK([for GNU gettext in libintl],
+            [$gt_func_gnugettext_libintl],
+           [gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+            dnl Now see whether libintl exists and does not depend on libiconv.
+            AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+              [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + 
*_nl_expand_alias ("")],
+              [eval "$gt_func_gnugettext_libintl=yes"],
+              [eval "$gt_func_gnugettext_libintl=no"])
+            dnl Now see whether libintl exists and depends on libiconv.
+            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" 
!= yes; } && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+                [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + 
*_nl_expand_alias ("")],
+               [LIBINTL="$LIBINTL $LIBICONV"
+                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                eval "$gt_func_gnugettext_libintl=yes"
+               ])
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"])
+        fi
+
+        dnl If an already present or preinstalled GNU gettext() is found,
+        dnl use it.  But if this macro is used in GNU gettext, and GNU
+        dnl gettext is already preinstalled in libintl, we update this
+        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; 
} \
+           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" 
= "yes"; } \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+          dnl Reset the values set by searching for libintl.
+          LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+    ifelse(gt_included_intl, yes, [
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+          dnl GNU gettext is not found in the C library.
+          dnl Fall back on included GNU gettext library.
+          nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a
 $LIBICONV $LIBTHREAD"
+        
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a
 $LTLIBICONV $LTLIBTHREAD"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      CATOBJEXT=
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions to use GNU gettext tools.
+        CATOBJEXT=.gmo
+      fi
+    ])
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Some extra flags are needed during linking.
+        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+      AC_DEFINE([ENABLE_NLS], [1],
+        [Define to 1 if translation of program messages to the user's native 
language
+   is requested.])
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  AC_MSG_CHECKING([whether to use NLS])
+  AC_MSG_RESULT([$USE_NLS])
+  if test "$USE_NLS" = "yes"; then
+    AC_MSG_CHECKING([where the gettext function comes from])
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = 
"yes"; }; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    AC_MSG_RESULT([$gt_source])
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = 
"yes"; }; then
+        AC_MSG_CHECKING([how to link with libintl])
+        AC_MSG_RESULT([$LIBINTL])
+        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+      fi
+
+      dnl For backward compatibility. Some packages may be using this.
+      AC_DEFINE([HAVE_GETTEXT], [1],
+       [Define if the GNU gettext() function is already present or 
preinstalled.])
+      AC_DEFINE([HAVE_DCGETTEXT], [1],
+       [Define if the GNU dcgettext() function is already present or 
preinstalled.])
+    fi
+
+    dnl We need to process the po/ directory.
+    POSUB=po
+  fi
+
+  ifelse(gt_included_intl, yes, [
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
+    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; 
then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST([BUILD_INCLUDED_LIBINTL])
+    AC_SUBST([USE_INCLUDED_LIBINTL])
+    AC_SUBST([CATOBJEXT])
+
+    dnl For backward compatibility. Some configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST([DATADIRNAME])
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST([INSTOBJEXT])
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST([GENCAT])
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+    AC_SUBST([INTLOBJS])
+
+    dnl Enable libtool support if the surrounding package wishes it.
+    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+    AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
+  ])
+
+  dnl For backward compatibility. Some Makefiles may be using this.
+  INTLLIBS="$LIBINTL"
+  AC_SUBST([INTLLIBS])
+
+  dnl Make all documented variables known to autoconf.
+  AC_SUBST([LIBINTL])
+  AC_SUBST([LTLIBINTL])
+  AC_SUBST([POSUB])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+  m4_divert_text([DEFAULTS], [gt_needs=])
+  m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])

Added: gnunet-mqtt/m4/iconv.m4
===================================================================
--- gnunet-mqtt/m4/iconv.m4                             (rev 0)
+++ gnunet-mqtt/m4/iconv.m4     2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,214 @@
+# iconv.m4 serial 11 (gettext-0.18.1)
+dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed libiconv and not disabled its use
+  dnl via --without-libiconv-prefix, he wants to use it. The first
+  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+  am_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+  AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+      [iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);],
+      [am_cv_func_iconv=yes])
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+        [iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);],
+        [am_cv_lib_iconv=yes]
+        [am_cv_func_iconv=yes])
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+      dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
+      am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+     returns.  */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          return 1;
+      }
+  }
+  /* Test against Solaris 10 bug: Failures are not distinguishable from
+     successful returns.  */
+  {
+    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+    if (cd_ascii_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\263";
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_ascii_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          return 1;
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static const char input[] = "\304rger mit b\366sen B\374bchen ohne 
Augenma\337";
+        char buf[50];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          return 1;
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  if (/* Try standardized names.  */
+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+      /* Try IRIX, OSF/1 names.  */
+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+      /* Try AIX names.  */
+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+      /* Try HP-UX names.  */
+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+    return 1;
+  return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+        [case "$host_os" in
+           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+           *)            am_cv_func_iconv_works="guessing yes" ;;
+         esac])
+      LIBS="$am_save_LIBS"
+    ])
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
+    AC_DEFINE([HAVE_ICONV], [1],
+      [Define if you have the iconv() function and it works.])
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    AC_MSG_CHECKING([how to link with libiconv])
+    AC_MSG_RESULT([$LIBICONV])
+  else
+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+    dnl either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+  AC_SUBST([LIBICONV])
+  AC_SUBST([LTLIBICONV])
+])
+
+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
+dnl avoid warnings like
+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN 
expansions.
+dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl   warnings.
+m4_define([gl_iconv_AC_DEFUN],
+  m4_version_prereq([2.64],
+    [[AC_DEFUN_ONCE(
+        [$1], [$2])]],
+    [[AC_DEFUN(
+        [$1], [$2])]]))
+gl_iconv_AC_DEFUN([AM_ICONV],
+[
+  AM_ICONV_LINK
+  if test "$am_cv_func_iconv" = yes; then
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL([am_cv_proto_iconv], [
+      AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, 
size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, 
$am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, 
size_t *outbytesleft);"])
+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( 
/(/'`
+    AC_MSG_RESULT([
+         $am_cv_proto_iconv])
+    AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+      [Define as const if the declaration of iconv() needs const.])
+  fi
+])

Added: gnunet-mqtt/m4/lib-ld.m4
===================================================================
--- gnunet-mqtt/m4/lib-ld.m4                            (rev 0)
+++ gnunet-mqtt/m4/lib-ld.m4    2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]* | [A-Za-z]:[\\/]*)]
+      [re_direlt='/[^/][^/]*/\.\./']
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL([acl_cv_path_LD],
+[if test -z "$LD"; then
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+        test "$with_gnu_ld" != no && break ;;
+      *)
+        test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT([$LD])
+else
+  AC_MSG_RESULT([no])
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])

Added: gnunet-mqtt/m4/lib-link.m4
===================================================================
--- gnunet-mqtt/m4/lib-link.m4                          (rev 0)
+++ gnunet-mqtt/m4/lib-link.m4  2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,774 @@
+# lib-link.m4 serial 21 (gettext-0.18)
+dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.54])
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  pushdef([Name],[translit([$1],[./-], [___])])
+  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+    AC_LIB_LINKFLAGS_BODY([$1], [$2])
+    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+  dnl results of this search when this library appears as a dependency.
+  HAVE_LIB[]NAME=yes
+  popdef([NAME])
+  popdef([Name])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, 
[missing-message])
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  pushdef([Name],[translit([$1],[./-], [___])])
+  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed lib[]Name and not disabled its use
+  dnl via --without-lib[]Name-prefix, he wants to use it.
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+    ac_save_LIBS="$LIBS"
+    dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
+    dnl because these -l options might require -L options that are present in
+    dnl LIBS. -l options benefit only from the -L options listed before it.
+    dnl Otherwise, add it to the front of LIBS, because it may be a static
+    dnl library that depends on another static library that is present in LIBS.
+    dnl Static libraries benefit only from the static libraries listed after
+    dnl it.
+    case " $LIB[]NAME" in
+      *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
+      *)       LIBS="$LIB[]NAME $LIBS" ;;
+    esac
+    AC_TRY_LINK([$3], [$4],
+      [ac_cv_lib[]Name=yes],
+      [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
+    LIBS="$ac_save_LIBS"
+  ])
+  if test "$ac_cv_lib[]Name" = yes; then
+    HAVE_LIB[]NAME=yes
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
+    AC_MSG_CHECKING([how to link with lib[]$1])
+    AC_MSG_RESULT([$LIB[]NAME])
+  else
+    HAVE_LIB[]NAME=no
+    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+    dnl $INC[]NAME either.
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    LIB[]NAME=
+    LTLIB[]NAME=
+    LIB[]NAME[]_PREFIX=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  popdef([NAME])
+  popdef([Name])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl   acl_libext,
+dnl   acl_shlibext,
+dnl   acl_hardcode_libdir_flag_spec,
+dnl   acl_hardcode_libdir_separator,
+dnl   acl_hardcode_direct,
+dnl   acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
+  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" 
\
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+  ])
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  dnl Determine whether the user wants rpath handling at all.
+  AC_ARG_ENABLE([rpath],
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  define([acl_frompackage_]NAME, [$2])
+  popdef([NAME])
+  pushdef([PACK],[$2])
+  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  define([acl_libsinpackage_]PACKUP,
+    m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, 
]],)[lib$1])
+  popdef([PACKUP])
+  popdef([PACK])
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, 
lib[$1])])
+  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, 
[acl_libsinpackage_]PACKUP, lib[$1])])
+  dnl Autoconf >= 2.61 supports dots in --with options.
+  
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_ARG_WITH(P_A_C_K[-prefix],
+[[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and 
DIR/lib
+  --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir 
and libdir]],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
+      fi
+    fi
+])
+  dnl Search the library and its dependencies in $additional_libdir and
+  dnl $LDFLAGS. Using breadth-first-seach.
+  LIB[]NAME=
+  LTLIB[]NAME=
+  INC[]NAME=
+  LIB[]NAME[]_PREFIX=
+  dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+  dnl computed. So it has to be reset here.
+  HAVE_LIB[]NAME=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='$1 $2'
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+        dnl or AC_LIB_HAVE_LINKFLAGS call.
+        uppername=`echo "$name" | sed -e 
'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ 
}$value"
+          else
+            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+            dnl that this library doesn't exist. So just drop it.
+            :
+          fi
+        else
+          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+          dnl and the already constructed $LIBNAME/$LTLIBNAME.
+          found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+            dnl The same code as in the loop below:
+            dnl First look for a shared library.
+            if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = 
'$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; 
then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+            dnl Then look for a static library.
+            if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIB[]NAME; do
+              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  dnl First look for a shared library.
+                  if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = 
'$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done 
\
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 
-k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f 
"$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                  dnl Then look for a static library.
+                  if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+            dnl Found the library.
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+              dnl Linking with a shared library. We attempt to hardcode its
+              dnl directory into the executable's runpath, unless it's the
+              dnl standard /usr/lib.
+              if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                dnl No hardcoding is needed.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+              else
+                dnl Use an explicit option to hardcode DIR into the resulting
+                dnl binary.
+                dnl Potentially add DIR to ltrpathdirs.
+                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                dnl The hardcoding into $LIBNAME is system dependent.
+                if test "$acl_hardcode_direct" = yes; then
+                  dnl Using DIR/libNAME.so during linking hardcodes DIR into 
the
+                  dnl resulting binary.
+                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test 
"$acl_hardcode_minus_L" = no; then
+                    dnl Use an explicit option to hardcode DIR into the 
resulting
+                    dnl binary.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    dnl Potentially add DIR to rpathdirs.
+                    dnl The rpathdirs will be appended to $LIBNAME at the end.
+                    haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                    dnl Rely on "-L$found_dir".
+                    dnl But don't add it if it's already contained in the 
LDFLAGS
+                    dnl or the already constructed $LIBNAME
+                    haveit=
+                    for x in $LDFLAGS $LIB[]NAME; do
+                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    else
+                      dnl We cannot use $acl_hardcode_runpath_var and 
LD_RUN_PATH
+                      dnl here, because this doesn't fit in flags passed to the
+                      dnl compiler. So give up. No hardcoding. This affects 
only
+                      dnl very old systems.
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                dnl Linking with a static library.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+              else
+                dnl We shouldn't come here, but anyway it's good to have a
+                dnl fallback.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+              fi
+            fi
+            dnl Assume the include files are nearby.
+            additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 
"s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = '$1'; then
+                  LIB[]NAME[]_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 
"s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = '$1'; then
+                  LIB[]NAME[]_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+              dnl Potentially add $additional_includedir to $INCNAME.
+              dnl But don't add it
+              dnl   1. if it's the standard /usr/include,
+              dnl   2. if it's /usr/local/include and we are using GCC on 
Linux,
+              dnl   3. if it's already present in $CPPFLAGS or the already
+              dnl      constructed $INCNAME,
+              dnl   4. if it doesn't exist as a directory.
+              if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INC[]NAME; do
+                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                      dnl Really add $additional_includedir to $INCNAME.
+                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ 
}-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+            dnl Look for dependencies.
+            if test -n "$found_la"; then
+              dnl Read the .la file. It defines the variables
+              dnl dlname, library_names, old_library, dependency_libs, current,
+              dnl age, revision, installed, dlopen, dlpreopen, libdir.
+              save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+              dnl We use only dependency_libs.
+              for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $additional_libdir to $LIBNAME and 
$LTLIBNAME.
+                    dnl But don't add it
+                    dnl   1. if it's the standard /usr/lib,
+                    dnl   2. if it's /usr/local/lib and we are using GCC on 
Linux,
+                    dnl   3. if it's already present in $LDFLAGS or the already
+                    dnl      constructed $LIBNAME,
+                    dnl   4. if it doesn't exist as a directory.
+                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != 
"X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = 
"X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = 
"X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ 
}-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ 
}-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                      dnl Potentially add DIR to rpathdirs.
+                      dnl The rpathdirs will be appended to $LIBNAME at the 
end.
+                      haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                      dnl Potentially add DIR to ltrpathdirs.
+                      dnl The ltrpathdirs will be appended to $LTLIBNAME at 
the end.
+                      haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                    dnl Handle this in the next round.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed 
-e 's/^X-l//'`
+                    ;;
+                  *.la)
+                    dnl Handle this in the next round. Throw away the .la's
+                    dnl directory; it is already contained in a preceding -L
+                    dnl option.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed 
-e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                    dnl Most likely an immediate library name.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+            dnl Didn't find the library; assume it is in the system directories
+            dnl known to the linker and runtime loader. (All the system
+            dnl directories known to the linker should also be known to the
+            dnl runtime loader, otherwise the system is severely 
misconfigured.)
+            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+      dnl Weird platform: only the last -rpath option counts, the user must
+      dnl pass all path elements in one option. We can arrange that for a
+      dnl single library, but not when more than one $LIBNAMEs are used.
+      alldirs=
+      for found_dir in $rpathdirs; do
+        
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+    else
+      dnl The -rpath options are cumulative.
+      for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+    dnl When using libtool, the option that works for both libraries and
+    dnl executables is -R. The -R options are cumulative.
+    for found_dir in $ltrpathdirs; do
+      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+    done
+  fi
+  popdef([P_A_C_K])
+  popdef([PACKLIBS])
+  popdef([PACKUP])
+  popdef([PACK])
+  popdef([NAME])
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+  for element in [$2]; do
+    haveit=
+    for x in $[$1]; do
+      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      [$1]="${[$1]}${[$1]:+ }$element"
+    fi
+  done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+  AC_REQUIRE([AC_LIB_RPATH])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  $1=
+  if test "$enable_rpath" != no; then
+    if test -n "$acl_hardcode_libdir_flag_spec" && test 
"$acl_hardcode_minus_L" = no; then
+      dnl Use an explicit option to hardcode directories into the resulting
+      dnl binary.
+      rpathdirs=
+      next=
+      for opt in $2; do
+        if test -n "$next"; then
+          dir="$next"
+          dnl No need to hardcode the standard /usr/lib.
+          if test "X$dir" != "X/usr/$acl_libdirstem" \
+             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+            rpathdirs="$rpathdirs $dir"
+          fi
+          next=
+        else
+          case $opt in
+            -L) next=yes ;;
+            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+                 dnl No need to hardcode the standard /usr/lib.
+                 if test "X$dir" != "X/usr/$acl_libdirstem" \
+                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+                   rpathdirs="$rpathdirs $dir"
+                 fi
+                 next= ;;
+            *) next= ;;
+          esac
+        fi
+      done
+      if test "X$rpathdirs" != "X"; then
+        if test -n ""$3""; then
+          dnl libtool is used for linking. Use -R options.
+          for dir in $rpathdirs; do
+            $1="${$1}${$1:+ }-R$dir"
+          done
+        else
+          dnl The linker is used for linking directly.
+          if test -n "$acl_hardcode_libdir_separator"; then
+            dnl Weird platform: only the last -rpath option counts, the user
+            dnl must pass all path elements in one option.
+            alldirs=
+            for dir in $rpathdirs; do
+              
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+            done
+            acl_save_libdir="$libdir"
+            libdir="$alldirs"
+            eval flag=\"$acl_hardcode_libdir_flag_spec\"
+            libdir="$acl_save_libdir"
+            $1="$flag"
+          else
+            dnl The -rpath options are cumulative.
+            for dir in $rpathdirs; do
+              acl_save_libdir="$libdir"
+              libdir="$dir"
+              eval flag=\"$acl_hardcode_libdir_flag_spec\"
+              libdir="$acl_save_libdir"
+              $1="${$1}${$1:+ }$flag"
+            done
+          fi
+        fi
+      fi
+    fi
+  fi
+  AC_SUBST([$1])
+])

Added: gnunet-mqtt/m4/lib-prefix.m4
===================================================================
--- gnunet-mqtt/m4/lib-prefix.m4                                (rev 0)
+++ gnunet-mqtt/m4/lib-prefix.m4        2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,224 @@
+# lib-prefix.m4 serial 7 (gettext-0.18)
+dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib-prefix],
+[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+  --without-lib-prefix    don't search for libraries in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+])
+  if test $use_additional = yes; then
+    dnl Potentially add $additional_includedir to $CPPFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/include,
+    dnl   2. if it's already present in $CPPFLAGS,
+    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_includedir" != "X/usr/include"; then
+      haveit=
+      for x in $CPPFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-I$additional_includedir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_includedir" = "X/usr/local/include"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_includedir"; then
+            dnl Really add $additional_includedir to $CPPFLAGS.
+            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+          fi
+        fi
+      fi
+    fi
+    dnl Potentially add $additional_libdir to $LDFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/lib,
+    dnl   2. if it's already present in $LDFLAGS,
+    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+      haveit=
+      for x in $LDFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-L$additional_libdir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_libdir"; then
+            dnl Really add $additional_libdir to $LDFLAGS.
+            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+  dnl Unfortunately, prefix and exec_prefix get only finally determined
+  dnl at the end of configure.
+  if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  $1
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl   "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl   "lib/amd64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+  dnl There is no formal standard regarding lib and lib64.
+  dnl On glibc systems, the current practice is that on a system supporting
+  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+  dnl the compiler's default mode by looking at the compiler's library search
+  dnl path. If at least one of its elements ends in /lib64 or points to a
+  dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+  dnl Otherwise we use the default, namely "lib".
+  dnl On Solaris systems, the current practice is that on a system supporting
+  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+  dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+  dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  acl_libdirstem=lib
+  acl_libdirstem2=
+  case "$host_os" in
+    solaris*)
+      dnl See Solaris 10 Software Developer Collection > Solaris 64-bit 
Developer's Guide > The Development Environment
+      dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
+      dnl "Portable Makefiles should refer to any library directories using 
the 64 symbolic link."
+      dnl But we want to recognize the sparcv9 or amd64 subdirectory also if 
the
+      dnl symlink is missing, so we set acl_libdirstem2 too.
+      AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+        [AC_EGREP_CPP([sixtyfour bits], [
+#ifdef _LP64
+sixtyfour bits
+#endif
+           ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
+        ])
+      if test $gl_cv_solaris_64bit = yes; then
+        acl_libdirstem=lib/64
+        case "$host_cpu" in
+          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
+          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+        esac
+      fi
+      ;;
+    *)
+      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 
's,^libraries: ,,p' | sed -e 's,^=,,'`
+      if test -n "$searchpath"; then
+        acl_save_IFS="${IFS=   }"; IFS=":"
+        for searchdir in $searchpath; do
+          if test -d "$searchdir"; then
+            case "$searchdir" in
+              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+              */../ | */.. )
+                # Better ignore directories of this form. They are misleading.
+                ;;
+              *) searchdir=`cd "$searchdir" && pwd`
+                 case "$searchdir" in
+                   */lib64 ) acl_libdirstem=lib64 ;;
+                 esac ;;
+            esac
+          fi
+        done
+        IFS="$acl_save_IFS"
+      fi
+      ;;
+  esac
+  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+])

Added: gnunet-mqtt/m4/ltoptions.m4
===================================================================
--- gnunet-mqtt/m4/ltoptions.m4                         (rev 0)
+++ gnunet-mqtt/m4/ltoptions.m4 2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,384 @@
+# Helper functions for option handling.                    -*- Autoconf -*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+#   Inc.
+#   Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 7 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+        _LT_MANGLE_DEFUN([$1], [$2]),
+    [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+           [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+                     [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME.  If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+    [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+  dnl
+  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl specified:
+  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+  ])
+  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+  ])
+  dnl
+  dnl If no reference was made to various pairs of opposing options, then
+  dnl we run the default mode handler for the pair.  For example, if neither
+  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl archives by default:
+  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+                  [_LT_ENABLE_FAST_INSTALL])
+  ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+       [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_shared=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+       [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+       [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_static=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+    _LT_DECL([build_old_libs], [enable_static], [0],
+       [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation 
@<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_fast_install=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+        [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], 
[_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+       [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for lt_pkg in $withval; do
+       IFS="$lt_save_ifs"
+       if test "X$lt_pkg" = "X$lt_p"; then
+         pic_mode=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+                [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+                [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+                [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+                [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+                [m4_define([_LTDL_TYPE], [convenience])])

Added: gnunet-mqtt/m4/ltsugar.m4
===================================================================
--- gnunet-mqtt/m4/ltsugar.m4                           (rev 0)
+++ gnunet-mqtt/m4/ltsugar.m4   2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,123 @@
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+       [$#], [2], [[$2]],
+       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+          m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+            [m4_foreach([_Lt_suffix],
+               ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+       [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+         [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+                [lt_append([$1], [$2], [$3])$4],
+                [$5])],
+         [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+       m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+       [$5],
+    [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+  [lt_join(m4_quote(m4_default([$4], [[, ]])),
+           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, 
lt_car([m4_shiftn(4, $@)]),
+                     [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key 
])])))))])[]dnl
+])

Added: gnunet-mqtt/m4/ltversion.m4
===================================================================
--- gnunet-mqtt/m4/ltversion.m4                         (rev 0)
+++ gnunet-mqtt/m4/ltversion.m4 2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers                      -*- Autoconf -*-
+#
+#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# @configure_input@
+
+# serial 3337 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4.2'
+macro_revision='1.3337'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])

Added: gnunet-mqtt/m4/lt~obsolete.m4
===================================================================
--- gnunet-mqtt/m4/lt~obsolete.m4                               (rev 0)
+++ gnunet-mqtt/m4/lt~obsolete.m4       2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,98 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else.  This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION],  [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP],             [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],        
[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT],         [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],    [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN],           [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR],             [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL],    [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN],           [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER],       [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK],               [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],        
[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],    [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],    [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 
[AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR],         [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR],            [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 
[AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],  [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC],             [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU],            [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG],    [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD],   [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 
[AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 
[AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], 
[AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP],          [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED],            [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME],           [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE],  [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE],    [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL],          [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP],          [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN],                
[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],     
[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG],          [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL],   [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX],           [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77],           [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ],           [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG],      [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],        
[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG],    [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],        
[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG],    [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],        
[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],    [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG],     [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG],         [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C],       [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],        
[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP],                
[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],        
[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH],   [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77],              [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC],               [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX],              [AC_DEFUN([_LT_PROG_CXX])])

Added: gnunet-mqtt/m4/nls.m4
===================================================================
--- gnunet-mqtt/m4/nls.m4                               (rev 0)
+++ gnunet-mqtt/m4/nls.m4       2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,32 @@
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <address@hidden>, 1995-2000.
+dnl   Bruno Haible <address@hidden>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_NLS],
+[
+  AC_MSG_CHECKING([whether NLS is requested])
+  dnl Default is enabled NLS
+  AC_ARG_ENABLE([nls],
+    [  --disable-nls           do not use Native Language Support],
+    USE_NLS=$enableval, USE_NLS=yes)
+  AC_MSG_RESULT([$USE_NLS])
+  AC_SUBST([USE_NLS])
+])

Added: gnunet-mqtt/m4/pkg.m4
===================================================================
--- gnunet-mqtt/m4/pkg.m4                               (rev 0)
+++ gnunet-mqtt/m4/pkg.m4       2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,57 @@
+
+dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, 
action-not)
+dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
+dnl also defines GSTUFF_PKG_ERRORS on error
+AC_DEFUN([PKG_CHECK_MODULES], [
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get 
pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        AC_MSG_CHECKING(for $2)
+
+        if $PKG_CONFIG --exists "$2" ; then
+            AC_MSG_RESULT(yes)
+            succeeded=yes
+
+            AC_MSG_CHECKING($1_CFLAGS)
+            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
+            AC_MSG_RESULT($$1_CFLAGS)
+
+            AC_MSG_CHECKING($1_LIBS)
+            $1_LIBS=`$PKG_CONFIG --libs "$2"`
+            AC_MSG_RESULT($$1_LIBS)
+        else
+            $1_CFLAGS=""
+            $1_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but 
+            ## do set a variable so people can do so.
+            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+            ifelse([$4], ,echo $$1_PKG_ERRORS,)
+        fi
+
+        AC_SUBST($1_CFLAGS)
+        AC_SUBST($1_LIBS)
+     else
+        echo "*** Your version of pkg-config is too old. You need version 
$PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig";
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     ifelse([$3], , :, [$3])
+  else
+     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider 
adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a 
nonstandard prefix so pkg-config can find them.]), [$4])
+  fi
+])
+
+

Added: gnunet-mqtt/m4/po.m4
===================================================================
--- gnunet-mqtt/m4/po.m4                                (rev 0)
+++ gnunet-mqtt/m4/po.m4        2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,449 @@
+# po.m4 serial 17 (gettext-0.18)
+dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <address@hidden>, 1995-2000.
+dnl   Bruno Haible <address@hidden>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+  AC_REQUIRE([AM_NLS])dnl
+
+  dnl Release version of the gettext macros. This is used to ensure that
+  dnl the gettext macros and po/Makefile.in.in are in sync.
+  AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
+
+  dnl Perform the following tests also if --disable-nls has been given,
+  dnl because they are needed for "make dist" to work.
+
+  dnl Search for GNU msgfmt in the PATH.
+  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+  dnl The second test excludes FreeBSD msgfmt.
+  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage 
>/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+  dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+    *) MSGFMT_015=$MSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([GMSGFMT_015])
+
+  dnl Search for GNU xgettext 0.12 or newer in the PATH.
+  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+  dnl The second test excludes FreeBSD xgettext.
+  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= 
/dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= 
--msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then 
exit 1; else exit 0; fi)],
+    :)
+  dnl Remove leftover from FreeBSD xgettext call.
+  rm -f messages.po
+
+  dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([XGETTEXT_015])
+
+  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 
2>&1], :)
+
+  dnl Installation directories.
+  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+  dnl have to define it here, so that it can be used in po/Makefile.
+  test -n "$localedir" || localedir='${datadir}/locale'
+  AC_SUBST([localedir])
+
+  dnl Support for AM_XGETTEXT_OPTION.
+  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+  AC_CONFIG_COMMANDS([po-directories], [[
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo 
"creating $ac_dir/POTFILES"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[  
]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > 
"$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in 
configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is 
obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" 
"$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo 
"creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r 
$ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e 
"s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e 
"s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e 
"s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > 
"$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done]],
+   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake < 1.5.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+   ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+  # When this code is run, in config.status, two variables have already been
+  # set:
+  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+  # - LINGUAS is the value of the environment variable LINGUAS at configure
+  #   time.
+
+changequote(,)dnl
+  # Adjust a relative srcdir.
+  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+  # In autoconf-2.13 it is called $ac_given_srcdir.
+  # In autoconf-2.50 it is called $srcdir.
+  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+  case "$ac_given_srcdir" in
+    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+    /*) top_srcdir="$ac_given_srcdir" ;;
+    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  # Find a way to echo strings without interpreting backslash.
+  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+    gt_echo='echo'
+  else
+    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+      gt_echo='printf %s\n'
+    else
+      echo_func () {
+        cat <<EOT
+$*
+EOT
+      }
+      gt_echo='echo_func'
+    fi
+  fi
+
+  # A sed script that extracts the value of VARIABLE from a Makefile.
+  sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[     ]*VARIABLE[     ]*=/{
+  # Seen the first line of the variable definition.
+  s/^[  ]*VARIABLE[     ]*=//
+  ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+  # Set POTFILES to the value of the Makefile variable POTFILES.
+  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 
's/VARIABLE/POTFILES/g'`
+  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+  # Compute POTFILES_DEPS as
+  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+  POTFILES_DEPS=
+  for file in $POTFILES; do
+    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+  done
+  POMAKEFILEDEPS=""
+
+  if test -n "$OBSOLETE_ALL_LINGUAS"; then
+    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is 
obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+  fi
+  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+    # The LINGUAS file contains the set of available languages.
+    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" 
"$ac_given_srcdir/$ac_dir/LINGUAS"`
+    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+  else
+    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 
's/VARIABLE/LINGUAS/g'`
+    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+  fi
+  # Hide the ALL_LINGUAS assigment from automake < 1.5.
+  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+  # Compute POFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+  # Compute UPDATEPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+  # Compute DUMMYPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+  # Compute GMOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+  # Compute PROPERTIESFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), 
$(top_srcdir)/$(DOMAIN)_$(lang).properties)
+  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), 
$(top_srcdir)/$(DOMAIN)_$(lang).class)
+  # Compute QMFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+  # Compute MSGFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob 
$(lang))/$(DOMAIN).resources.dll)
+  case "$ac_given_srcdir" in
+    .) srcdirpre= ;;
+    *) srcdirpre='$(srcdir)/' ;;
+  esac
+  POFILES=
+  UPDATEPOFILES=
+  DUMMYPOFILES=
+  GMOFILES=
+  PROPERTIESFILES=
+  CLASSFILES=
+  QMFILES=
+  MSGFILES=
+  RESOURCESDLLFILES=
+  for lang in $ALL_LINGUAS; do
+    POFILES="$POFILES $srcdirpre$lang.po"
+    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+    PROPERTIESFILES="$PROPERTIESFILES 
\$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+    QMFILES="$QMFILES $srcdirpre$lang.qm"
+    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 
'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 
's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 
's/^uz-UZ$/uz-UZ-Latn/'`
+    RESOURCESDLLFILES="$RESOURCESDLLFILES 
$srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+  done
+  # CATALOGS depends on both $ac_dir and the user's LINGUAS
+  # environment variable.
+  INST_LINGUAS=
+  if test -n "$ALL_LINGUAS"; then
+    for presentlang in $ALL_LINGUAS; do
+      useit=no
+      if test "%UNSET%" != "$LINGUAS"; then
+        desiredlanguages="$LINGUAS"
+      else
+        desiredlanguages="$ALL_LINGUAS"
+      fi
+      for desiredlang in $desiredlanguages; do
+        # Use the presentlang catalog if desiredlang is
+        #   a. equal to presentlang, or
+        #   b. a variant of presentlang (because in this case,
+        #      presentlang can be used as a fallback for messages
+        #      which are not translated in the desiredlang catalog).
+        case "$desiredlang" in
+          "$presentlang"*) useit=yes;;
+        esac
+      done
+      if test $useit = yes; then
+        INST_LINGUAS="$INST_LINGUAS $presentlang"
+      fi
+    done
+  fi
+  CATALOGS=
+  JAVACATALOGS=
+  QTCATALOGS=
+  TCLCATALOGS=
+  CSHARPCATALOGS=
+  if test -n "$INST_LINGUAS"; then
+    for lang in $INST_LINGUAS; do
+      CATALOGS="$CATALOGS $lang.gmo"
+      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+      QTCATALOGS="$QTCATALOGS $lang.qm"
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 
'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 
's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 
's/^uz-UZ$/uz-UZ-Latn/'`
+      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+    done
+  fi
+
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e 
"s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e 
"s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e 
"s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e 
"s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e 
"s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e 
"s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e 
"s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" 
> "$ac_file.tmp"
+  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 
'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+       @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+       \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm 
-f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 
's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 
's/^uz-UZ$/uz-UZ-Latn/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+       @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po 
-r \$(DOMAIN)"; \
+       \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r 
"\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if test -n "$POMAKEFILEDEPS"; then
+    cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+  fi
+  mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+  XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])

Added: gnunet-mqtt/m4/progtest.m4
===================================================================
--- gnunet-mqtt/m4/progtest.m4                          (rev 0)
+++ gnunet-mqtt/m4/progtest.m4  2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,92 @@
+# progtest.m4 serial 6 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <address@hidden>, 1996.
+
+AC_PREREQ([2.50])
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL([ac_cv_path_$1],
+[case "[$]$1" in
+  [[\\/]]* | ?:[[\\/]]*)
+    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+          if [$3]; then
+            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+    ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$][$1])
+else
+  AC_MSG_RESULT([no])
+fi
+AC_SUBST([$1])dnl
+])

Index: gnunet-mqtt/po
===================================================================
--- gnunet-mqtt/po      2013-09-28 10:53:36 UTC (rev 29671)
+++ gnunet-mqtt/po      2013-09-28 15:58:54 UTC (rev 29672)

Property changes on: gnunet-mqtt/po
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,6 ##
+Makefile
+Makefile.in
+remove-potcdate.sed
+stamp-po
+gnunet-mqtt.pot
+POTFILES
Added: gnunet-mqtt/po/ChangeLog
===================================================================
--- gnunet-mqtt/po/ChangeLog                            (rev 0)
+++ gnunet-mqtt/po/ChangeLog    2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,12 @@
+2012-03-07  gettextize  <address@hidden>
+
+       * Makefile.in.in: New file, from gettext-0.18.1.
+       * Rules-quot: New file, from gettext-0.18.1.
+       * boldquot.sed: New file, from gettext-0.18.1.
+       * address@hidden: New file, from gettext-0.18.1.
+       * address@hidden: New file, from gettext-0.18.1.
+       * insert-header.sin: New file, from gettext-0.18.1.
+       * quot.sed: New file, from gettext-0.18.1.
+       * remove-potcdate.sin: New file, from gettext-0.18.1.
+       * POTFILES.in: New file.
+

Added: gnunet-mqtt/po/Makefile.in.in
===================================================================
--- gnunet-mqtt/po/Makefile.in.in                               (rev 0)
+++ gnunet-mqtt/po/Makefile.in.in       2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,444 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper 
<address@hidden>
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+#
+# Origin: gettext-0.18
+GETTEXT_MACRO_VERSION = 0.18
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+
+SHELL = /bin/sh
address@hidden@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+localedir = @localedir@
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
+mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
+mkdir_p = @mkdir_p@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) 
$(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
+
+.po.mo:
+       @echo "$(MSGFMT) -c -o $@ $<"; \
+       $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+       @lang=`echo $* | sed -e 's,.*/,,'`; \
+       test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+       echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics 
--verbose -o $${lang}.gmo $${lang}.po"; \
+       cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics 
--verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+       sed -e '/^#/d' $< > t-$@
+       mv t-$@ $@
+
+
+all: check-macro-version address@hidden@
+
+all-yes: stamp-po
+all-no:
+
+# Ensure that the gettext macros and this Makefile.in.in are in sync.
+check-macro-version:
+       @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
+         || { echo "*** error: gettext infrastructure mismatch: using a 
Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf 
macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
+              exit 1; \
+            }
+
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, stamp-po is a nop (i.e. a phony target).
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+       test ! -f $(srcdir)/$(DOMAIN).pot || \
+         test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+       @test ! -f $(srcdir)/$(DOMAIN).pot || { \
+         echo "touch stamp-po" && \
+         echo timestamp > stamp-poT && \
+         mv stamp-poT stamp-po; \
+       }
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+       if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 
'libtool:' >/dev/null; then \
+         package_gnu='GNU '; \
+       else \
+         package_gnu=''; \
+       fi; \
+       if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = 
'@'PACKAGE_BUGREPORT'@'; then \
+         msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+       else \
+         msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+       fi; \
+       case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+         '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 
0.16.[0-1]*) \
+           $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+             --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) 
@XGETTEXT_EXTRA_OPTIONS@ \
+             --files-from=$(srcdir)/POTFILES.in \
+             --copyright-holder='$(COPYRIGHT_HOLDER)' \
+             --msgid-bugs-address="$$msgid_bugs_address" \
+           ;; \
+         *) \
+           $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+             --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) 
@XGETTEXT_EXTRA_OPTIONS@ \
+             --files-from=$(srcdir)/POTFILES.in \
+             --copyright-holder='$(COPYRIGHT_HOLDER)' \
+             --package-name="address@hidden@" \
+             --package-version='@VERSION@' \
+             --msgid-bugs-address="$$msgid_bugs_address" \
+           ;; \
+       esac
+       test ! -f $(DOMAIN).po || { \
+         if test -f $(srcdir)/$(DOMAIN).pot; then \
+           sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > 
$(DOMAIN).1po && \
+           sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+           if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+             rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+           else \
+             rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+             mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+           fi; \
+         else \
+           mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+         fi; \
+       }
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+       $(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+       @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+       if test -f "$(srcdir)/$${lang}.po"; then \
+         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+         echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} 
$${lang}.po $(DOMAIN).pot"; \
+         cd $(srcdir) \
+           && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 
's,^[^0-9]*,,'` in \
+                  '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+                    $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po 
$(DOMAIN).pot;; \
+                  *) \
+                    $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} 
$${lang}.po $(DOMAIN).pot;; \
+                esac; \
+              }; \
+       else \
+         $(MAKE) $${lang}.po-create; \
+       fi
+
+
+install: install-exec install-data
+install-exec:
+install-data: address@hidden@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+         for file in $(DISTFILES.common) Makevars.template; do \
+           $(INSTALL_DATA) $(srcdir)/$$file \
+                           $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+         for file in Makevars; do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
+       fi
+install-data-no: all
+install-data-yes: all
+       @catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         dir=$(localedir)/$$lang/LC_MESSAGES; \
+         $(mkdir_p) $(DESTDIR)$$dir; \
+         if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; 
fi; \
+         $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+         echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+         for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+           if test -n "$$lc"; then \
+             if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 
2>/dev/null) | grep ' -> ' >/dev/null; then \
+               link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d 
$$lc | sed -e 's/^.* -> //'`; \
+               mv $(DESTDIR)$(localedir)/$$lang/$$lc 
$(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+               mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+                for file in *; do \
+                  if test -f $$file; then \
+                    ln -s ../$$link/$$file 
$(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+                  fi; \
+                done); \
+               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+             else \
+               if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+                 :; \
+               else \
+                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               fi; \
+             fi; \
+             rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+             ln -s ../LC_MESSAGES/$(DOMAIN).mo 
$(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+             ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo 
$(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+             cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo 
$(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+             echo "installing $$realcat link as 
$(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+           fi; \
+         done; \
+       done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: address@hidden@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+       else \
+         : ; \
+       fi
+installdirs-data-no:
+installdirs-data-yes:
+       @catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         dir=$(localedir)/$$lang/LC_MESSAGES; \
+         $(mkdir_p) $(DESTDIR)$$dir; \
+         for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+           if test -n "$$lc"; then \
+             if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 
2>/dev/null) | grep ' -> ' >/dev/null; then \
+               link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d 
$$lc | sed -e 's/^.* -> //'`; \
+               mv $(DESTDIR)$(localedir)/$$lang/$$lc 
$(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+               mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+                for file in *; do \
+                  if test -f $$file; then \
+                    ln -s ../$$link/$$file 
$(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+                  fi; \
+                done); \
+               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+             else \
+               if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+                 :; \
+               else \
+                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               fi; \
+             fi; \
+           fi; \
+         done; \
+       done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: address@hidden@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         for file in $(DISTFILES.common) Makevars.template; do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
+       fi
+uninstall-data-no:
+uninstall-data-yes:
+       catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+           rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+         done; \
+       done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
+
+mostlyclean:
+       rm -f remove-potcdate.sed
+       rm -f stamp-poT
+       rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+       rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+       rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+       rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+       $(MAKE) update-po
+       @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: stamp-po $(DISTFILES)
+       dists="$(DISTFILES)"; \
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         dists="$$dists Makevars.template"; \
+       fi; \
+       if test -f $(srcdir)/$(DOMAIN).pot; then \
+         dists="$$dists $(DOMAIN).pot stamp-po"; \
+       fi; \
+       if test -f $(srcdir)/ChangeLog; then \
+         dists="$$dists ChangeLog"; \
+       fi; \
+       for i in 0 1 2 3 4 5 6 7 8 9; do \
+         if test -f $(srcdir)/ChangeLog.$$i; then \
+           dists="$$dists ChangeLog.$$i"; \
+         fi; \
+       done; \
+       if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+       for file in $$dists; do \
+         if test -f $$file; then \
+           cp -p $$file $(distdir) || exit 1; \
+         else \
+           cp -p $(srcdir)/$$file $(distdir) || exit 1; \
+         fi; \
+       done
+
+update-po: Makefile
+       $(MAKE) $(DOMAIN).pot-update
+       test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+       $(MAKE) update-gmo
+
+# General rule for creating PO files.
+
+.nop.po-create:
+       @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+       echo "File $$lang.po does not exist. If you are a translator, you can 
create it through 'msginit'." 1>&2; \
+       exit 1
+
+# General rule for updating PO files.
+
+.nop.po-update:
+       @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+       if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; 
fi; \
+       tmpdir=`pwd`; \
+       echo "$$lang:"; \
+       test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+       echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po 
$(DOMAIN).pot -o $$lang.new.po"; \
+       cd $(srcdir); \
+       if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+              '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+                $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po 
$$lang.po $(DOMAIN).pot;; \
+              *) \
+                $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o 
$$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+            esac; \
+          }; then \
+         if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+           rm -f $$tmpdir/$$lang.new.po; \
+         else \
+           if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+             :; \
+           else \
+             echo "msgmerge for $$lang.po failed: cannot move 
$$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+             exit 1; \
+           fi; \
+         fi; \
+       else \
+         echo "msgmerge for $$lang.po failed!" 1>&2; \
+         rm -f $$tmpdir/$$lang.new.po; \
+       fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+       @:
+
+# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
+# because execution permission bits may not work on the current file system.
+# Use @SHELL@, which is the shell determined by autoconf for the use by its
+# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status 
@POMAKEFILEDEPS@
+       cd $(top_builddir) \
+         && @SHELL@ ./config.status $(subdir)/address@hidden po-directories
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: gnunet-mqtt/po/Makevars
===================================================================
--- gnunet-mqtt/po/Makevars                             (rev 0)
+++ gnunet-mqtt/po/Makevars     2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =

Added: gnunet-mqtt/po/POTFILES.in
===================================================================
--- gnunet-mqtt/po/POTFILES.in                          (rev 0)
+++ gnunet-mqtt/po/POTFILES.in  2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,3 @@
+# List of source files which contain translatable strings.
+src/mqtt/gnunet-mqtt-publish.c
+src/mqtt/gnunet-mqtt-subscribe.c

Added: gnunet-mqtt/po/Rules-quot
===================================================================
--- gnunet-mqtt/po/Rules-quot                           (rev 0)
+++ gnunet-mqtt/po/Rules-quot   2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,47 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed address@hidden address@hidden 
insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
address@hidden:
+       $(MAKE) address@hidden
address@hidden:
+       $(MAKE) address@hidden
+
address@hidden: address@hidden
address@hidden: address@hidden
+
+.insert-header.po-update-en:
+       @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+       if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; 
GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+       tmpdir=`pwd`; \
+       echo "$$lang:"; \
+       ll=`echo $$lang | sed -e 's/@.*//'`; \
+       LC_ALL=C; export LC_ALL; \
+       cd $(srcdir); \
+       if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 
2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | 
$(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > 
$$tmpdir/$$lang.new.po; then \
+         if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+           rm -f $$tmpdir/$$lang.new.po; \
+         else \
+           if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+             :; \
+           else \
+             echo "creation of $$lang.po failed: cannot move 
$$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+             exit 1; \
+           fi; \
+         fi; \
+       else \
+         echo "creation of $$lang.po failed!" 1>&2; \
+         rm -f $$tmpdir/$$lang.new.po; \
+       fi
+
address@hidden: insert-header.sin
+       sed -e '/^#/d' -e 's/HEADER/address@hidden/g' 
$(srcdir)/insert-header.sin > address@hidden
+
address@hidden: insert-header.sin
+       sed -e '/^#/d' -e 's/HEADER/address@hidden/g' 
$(srcdir)/insert-header.sin > address@hidden
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+       rm -f *.insert-header

Added: gnunet-mqtt/po/boldquot.sed
===================================================================
--- gnunet-mqtt/po/boldquot.sed                         (rev 0)
+++ gnunet-mqtt/po/boldquot.sed 2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
+s/“/“/g
+s/”/”/g
+s/‘/‘/g
+s/’/’/g

Added: gnunet-mqtt/po/address@hidden
===================================================================
--- gnunet-mqtt/po/address@hidden                               (rev 0)
+++ gnunet-mqtt/po/address@hidden       2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#

Added: gnunet-mqtt/po/address@hidden
===================================================================
--- gnunet-mqtt/po/address@hidden                               (rev 0)
+++ gnunet-mqtt/po/address@hidden       2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#

Added: gnunet-mqtt/po/insert-header.sin
===================================================================
--- gnunet-mqtt/po/insert-header.sin                            (rev 0)
+++ gnunet-mqtt/po/insert-header.sin    2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}

Added: gnunet-mqtt/po/quot.sed
===================================================================
--- gnunet-mqtt/po/quot.sed                             (rev 0)
+++ gnunet-mqtt/po/quot.sed     2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g

Added: gnunet-mqtt/po/remove-potcdate.sin
===================================================================
--- gnunet-mqtt/po/remove-potcdate.sin                          (rev 0)
+++ gnunet-mqtt/po/remove-potcdate.sin  2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}

Index: gnunet-mqtt/src
===================================================================
--- gnunet-mqtt/src     2013-09-28 10:53:36 UTC (rev 29671)
+++ gnunet-mqtt/src     2013-09-28 15:58:54 UTC (rev 29672)

Property changes on: gnunet-mqtt/src
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,2 ##
+Makefile
+Makefile.in
Added: gnunet-mqtt/src/Makefile.am
===================================================================
--- gnunet-mqtt/src/Makefile.am                         (rev 0)
+++ gnunet-mqtt/src/Makefile.am 2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1 @@
+SUBDIRS = include mqtt .

Index: gnunet-mqtt/src/include
===================================================================
--- gnunet-mqtt/src/include     2013-09-28 10:53:36 UTC (rev 29671)
+++ gnunet-mqtt/src/include     2013-09-28 15:58:54 UTC (rev 29672)

Property changes on: gnunet-mqtt/src/include
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,2 ##
+Makefile
+Makefile.in
Added: gnunet-mqtt/src/include/Makefile.am
===================================================================
--- gnunet-mqtt/src/include/Makefile.am                         (rev 0)
+++ gnunet-mqtt/src/include/Makefile.am 2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,7 @@
+SUBDIRS = .
+
+gnunetincludedir = $(includedir)/gnunet
+
+gnunetinclude_HEADERS = \
+  gnunet_mqtt_service.h \
+  gnunet_protocols_mqtt.h

Added: gnunet-mqtt/src/include/gnunet_mqtt_service.h
===================================================================
--- gnunet-mqtt/src/include/gnunet_mqtt_service.h                               
(rev 0)
+++ gnunet-mqtt/src/include/gnunet_mqtt_service.h       2013-09-28 15:58:54 UTC 
(rev 29672)
@@ -0,0 +1,210 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file include/gnunet_mqtt_service.h
+ * @brief API to the MQTT service
+ * @author Ramona Popa
+ * @author Artur Grunau
+ */
+#ifndef GNUNET_MQTT_SERVICE_H
+#define GNUNET_MQTT_SERVICE_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#if 0                           /* keep Emacsens' auto-indent happy */
+}
+#endif
+#endif
+
+/**
+ * Version of the MQTT API.
+ */
+#define GNUNET_MQTT_VERSION 0x00000000
+
+
+/*
+ * Connection to the MQTT service.
+ */
+struct GNUNET_MQTT_Handle;
+
+
+/**
+ * Initialize the connection with the MQTT service.
+ *
+ * @param cfg configuration to use
+ * @return NULL on error
+ */
+struct GNUNET_MQTT_Handle *
+GNUNET_MQTT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
+
+
+/**
+ * Shut down connection with the MQTT service.
+ *
+ * @param handle handle of the MQTT connection to stop
+ */
+void
+GNUNET_MQTT_disconnect (struct GNUNET_MQTT_Handle *handle);
+
+
+/**
+ * Opaque handle to cancel a PUBLISH operation.
+ */
+struct GNUNET_MQTT_PublishHandle;
+
+/**
+ * Opaque handle to cancel a SUBSCRIBE operation.
+ */
+struct GNUNET_MQTT_SubscribeHandle;
+
+
+/**
+ * Type of a PUBLISH continuation. You must not call
+ * GNUNET_MQTT_disconnect in this continuation.
+ *
+ * @param cls closure
+ * @param success GNUNET_OK if the PUBLISH was transmitted,
+ *                GNUNET_NO on timeout,
+ *                GNUNET_SYSERR on disconnect from service after the
+ *                PUBLISH message was transmitted (so we don't know if
+ *                it was received or not)
+ */
+typedef void (*GNUNET_MQTT_PublishContinuation) (void *cls, int success);
+
+/**
+ * Perform a PUBLISH operation storing data in the DHT.
+ *
+ * @param handle handle to MQTT service
+ * @param topic_len length of the topic the message should be published
+ *                  on
+ * @param topic the topic (as a NUL-terminated string) the message
+ *              should be published on
+ * @param size number of bytes in data; must be less than 64k
+ * @param data the payload of the message
+ * @param timeout how long to wait for transmission of this request
+ * @param cont continuation to call when done (transmitting request to
+ *             service); you must not call GNUNET_MQTT_disconnect in
+ *             this continuation
+ * @param cont_cls closure for cont
+ * @return handle to cancel the PUBLISH operation, or NULL on error
+ *         (message size too big)
+ */
+struct GNUNET_MQTT_PublishHandle *
+GNUNET_MQTT_publish (struct GNUNET_MQTT_Handle *handle, uint8_t topic_len,
+                     const char *topic, size_t size, const void *data,
+                     struct GNUNET_TIME_Relative timeout,
+                     GNUNET_MQTT_PublishContinuation cont, void *cont_cls);
+
+/**
+ * Cancel an MQTT PUBLISH operation.
+ *
+ * Note that the PUBLISH request may still go out over the network (we
+ * can't stop that). However, if the PUBLISH has not yet been sent to
+ * the service, cancelling it will stop this from happening (but there
+ * is no way for the user of this API to tell if that is the case). The
+ * only use for this API is to prevent a later call to 'cont' from
+ * "GNUNET_MQTT_publish" (i.e. because the system is shutting down).
+ *
+ * @param ph PUBLISH operation to cancel ('cont' will no longer be
+ *           called)
+ */
+void
+GNUNET_MQTT_publish_cancel (struct GNUNET_MQTT_PublishHandle *ph);
+
+/**
+ * Type of a SUBSCRIBE continuation. You must not call
+ * GNUNET_MQTT_disconnect in this continuation.
+ *
+ * @param cls closure
+ * @param success GNUNET_OK if the SUBSCRIBE was transmitted,
+ *                GNUNET_NO on timeout,
+ *                GNUNET_SYSERR on disconnect from service after the
+ *                SUBSCRIBE message was transmitted (so we don't know if
+ *                it was received or not)
+ */
+typedef void (*GNUNET_MQTT_SubscribeContinuation) (void *cls, int success);
+
+/**
+ * Callback invoked on each result obtained for a MQTT SUBSCRIBE
+ * operation.
+ *
+ * This callback is given ownership of topic and data, and must
+ * eventually free the corresponding memory.
+ *
+ * @param cls closure
+ * @param topic_len length of the topic the message was published on
+ * @param topic the topic (as a NUL-terminated string) the message was
+ *              published on
+ * @param size number of bytes in data; must be less than 64k
+ * @param data the payload of the message
+ */
+typedef void (*GNUNET_MQTT_SubscribeResultCallback) (void *cls,
+                                                     uint8_t topic_len,
+                                                     char *topic, size_t size,
+                                                     void *data);
+
+/**
+ * Perform a SUBSCRIBE operation.
+ *
+ * @param handle handle to MQTT service
+ * @param topic_len length of the topic for which the registartion is
+          done
+ * @param topic the topic (as a NUL-terminated string) - target of
+          the subscription
+ * @param timeout how long to wait for transmission of this request
+ * @param cont continuation to call when done (transmitting request to
+ *             service); you must not call GNUNET_MQTT_disconnect in
+ *             this continuation; can be NULL
+ * @param cont_cls closure for cont
+ * @param cb callback to call when messages for this subscription are
+ *           received; you must not call GNUNET_MQTT_disconnect in this
+ *           callback; mustn't be NULL
+ * @param cb_cls closure for cb
+ * @return handle to cancel the SUBSCRIBE operation, or NULL on error
+ */
+struct GNUNET_MQTT_SubscribeHandle *
+GNUNET_MQTT_subscribe (struct GNUNET_MQTT_Handle *handle, uint8_t topic_len,
+                       const char *topic, struct GNUNET_TIME_Relative timeout,
+                       GNUNET_MQTT_SubscribeContinuation cont, void *cont_cls,
+                       GNUNET_MQTT_SubscribeResultCallback cb, void *cb_cls);
+
+/**
+ * Cancel the given active MQTT subscription.
+ *
+ * All resources associated with the subscription will be freed by this
+ * function. On return `handle` will no longer be valid, and mustn't be
+ * used again.
+ *
+ * @param handle handle to an MQTT subscription
+ */
+void
+GNUNET_MQTT_unsubscribe (struct GNUNET_MQTT_SubscribeHandle *handle);
+                                        
+
+#if 0                           /* keep Emacsens' auto-indent happy */
+{
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+#endif

Added: gnunet-mqtt/src/include/gnunet_protocols_mqtt.h
===================================================================
--- gnunet-mqtt/src/include/gnunet_protocols_mqtt.h                             
(rev 0)
+++ gnunet-mqtt/src/include/gnunet_protocols_mqtt.h     2013-09-28 15:58:54 UTC 
(rev 29672)
@@ -0,0 +1,69 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file include/gnunet_protocols_mqtt.h
+ * @brief constants for network protocols
+ * @author Ramona Popa, Artur Grunau
+ */
+
+#ifndef GNUNET_PROTOCOLS_MQTT_H
+#define GNUNET_PROTOCOLS_MQTT_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#if 0                           /* keep Emacsens' auto-indent happy */
+}
+#endif
+#endif
+
+
+
+/**
+ * MQTT PUBLISH message
+ */
+#define GNUNET_MESSAGE_TYPE_MQTT_CLIENT_PUBLISH 49380
+
+/**
+ * MQTT SUBSCRIBE message
+ */
+#define GNUNET_MESSAGE_TYPE_MQTT_CLIENT_SUBSCRIBE 49381
+
+/**
+ * MQTT UNSUBSCRIBE message
+ */
+#define GNUNET_MESSAGE_TYPE_MQTT_CLIENT_UNSUBSCRIBE 49382
+
+/**
+ * MQTT UNSUBSCRIBE_ACK message
+ */
+#define GNUNET_MESSAGE_TYPE_MQTT_CLIENT_UNSUBSCRIBE_ACK 49383
+
+
+
+#if 0                           /* keep Emacsens' auto-indent happy */
+{
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+#endif

Index: gnunet-mqtt/src/mqtt
===================================================================
--- gnunet-mqtt/src/mqtt        2013-09-28 10:53:36 UTC (rev 29671)
+++ gnunet-mqtt/src/mqtt        2013-09-28 15:58:54 UTC (rev 29672)

Property changes on: gnunet-mqtt/src/mqtt
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,13 ##
+Makefile
+Makefile.in
+.deps
+.libs
+gnunet-mqtt-publish
+gnunet-mqtt-subscribe
+gnunet-service-mqtt
+mqtt.conf
+test_mqtt_single_peer
+test_mqtt_unsubscribe
+test_mqtt_multiple_peers
+test_mqtt_regex_hash
+test_mqtt_regex_plus
Added: gnunet-mqtt/src/mqtt/Makefile.am
===================================================================
--- gnunet-mqtt/src/mqtt/Makefile.am                            (rev 0)
+++ gnunet-mqtt/src/mqtt/Makefile.am    2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,119 @@
+SUBDIRS = .
+
+INCLUDES = \
+  -I$(top_srcdir)/src/include \
+  -I$(top_srcdir)
+
+AM_CPPFLAGS = \
+  $(GNUNET_CPPFLAGS)
+
+# Set this variable if you are using GNUNET libraries for all programs and
+# libraries. You don't then need to target-specific _LDFLAGS with 
GNUNET_LDFLAGS
+# AM_LDFLAGS = \
+#   $(GNUNET_LDFLAGS) \
+#   $(WINFLAGS) \
+#   -export-dynamic
+
+lib_LTLIBRARIES = libgnunetmqtt.la
+
+pkgcfgdir= $(prefix)/share/gnunet/config.d/
+
+libexecdir= $(prefix)/lib/gnunet/libexec/
+
+noinst_LTLIBRARIES = libregexutils.la
+libregexutils_la_SOURCES = regex_utils.c
+libregexutils_la_LDFLAGS = \
+  $(GNUNET_LDFLAGS) -lgnunetregex 
+
+
+libgnunetmqtt_la_SOURCES = \
+  mqtt_api.c regex_utils.c
+libgnunetmqtt_la_LDFLAGS = \
+  $(GNUNET_LDFLAGS) -lgnunetregex  $(WINFLAGS) \
+  -version-info 0:0:0
+
+
+bin_PROGRAMS = gnunet-mqtt-publish gnunet-mqtt-subscribe
+
+libexec_PROGRAMS = gnunet-service-mqtt
+
+gnunet_service_mqtt_SOURCES = \
+  gnunet-service-mqtt.c
+gnunet_service_mqtt_LDADD = \
+  -lgnunetutil -lgnunetcore -lgnunetdht -lgnunetregex -lgnunethello \
+  -lgnunetmesh $(top_builddir)/src/mqtt/libregexutils.la  $(INTLLIBS)
+gnunet_service_mqtt_LDFLAGS = \
+  $(GNUNET_LDFLAGS)  $(WINFLAGS) -export-dynamic
+
+gnunet_mqtt_publish_SOURCES = \
+  gnunet-mqtt-publish.c
+gnunet_mqtt_publish_LDADD = \
+  -lgnunetutil \
+  $(top_builddir)/src/mqtt/libgnunetmqtt.la \
+  $(INTLLIBS)
+gnunet_mqtt_publish_LDFLAGS = \
+  $(GNUNET_LDFLAGS) $(WINFLAGS) -export-dynamic
+gnunet_mqtt_publish_DEPENDENCIES = \
+  libgnunetmqtt.la
+
+gnunet_mqtt_subscribe_SOURCES = \
+  gnunet-mqtt-subscribe.c
+gnunet_mqtt_subscribe_LDADD = \
+  -lgnunetutil \
+  $(top_builddir)/src/mqtt/libgnunetmqtt.la \
+  $(INTLLIBS)
+gnunet_mqtt_subscribe_LDFLAGS = \
+  $(GNUNET_LDFLAGS) $(WINFLAGS) -export-dynamic
+gnunet_mqtt_subscribe_DEPENDENCIES = \
+  libgnunetmqtt.la
+
+check_PROGRAMS = \
+  test_mqtt_single_peer test_mqtt_multiple_peers test_mqtt_unsubscribe 
test_mqtt_regex_hash test_mqtt_regex_plus
+
+TESTS = $(check_PROGRAMS)
+
+test_mqtt_single_peer_SOURCES = \
+ test_mqtt_single_peer.c
+test_mqtt_single_peer_LDADD = \
+  $(top_builddir)/src/mqtt/libgnunetmqtt.la \
+  -lgnunetutil -lgnunettestbed
+test_mqtt_single_peer_LDFLAGS = \
+  $(GNUNET_LDFLAGS)  $(WINFLAGS) -export-dynamic
+  
+test_mqtt_multiple_peers_SOURCES = \
+ test_mqtt_multiple_peers.c
+test_mqtt_multiple_peers_LDADD = \
+  $(top_builddir)/src/mqtt/libgnunetmqtt.la \
+  -lgnunetutil -lgnunettestbed
+test_mqtt_multiple_peers_LDFLAGS = \
+  $(GNUNET_LDFLAGS)  $(WINFLAGS) -export-dynamic
+  
+test_mqtt_unsubscribe_SOURCES = \
+ test_mqtt_unsubscribe.c
+test_mqtt_unsubscribe_LDADD = \
+  $(top_builddir)/src/mqtt/libgnunetmqtt.la \
+  -lgnunetutil -lgnunettestbed
+test_mqtt_unsubscribe_LDFLAGS = \
+  $(GNUNET_LDFLAGS)  $(WINFLAGS) -export-dynamic
+  
+test_mqtt_regex_hash_SOURCES = \
+ test_mqtt_regex_hash.c
+test_mqtt_regex_hash_LDADD = \
+  $(top_builddir)/src/mqtt/libgnunetmqtt.la \
+  -lgnunetutil -lgnunettestbed
+test_mqtt_regex_hash_LDFLAGS = \
+  $(GNUNET_LDFLAGS)  $(WINFLAGS) -export-dynamic
+  
+test_mqtt_regex_plus_SOURCES = \
+ test_mqtt_regex_plus.c
+test_mqtt_regex_plus_LDADD = \
+  $(top_builddir)/src/mqtt/libgnunetmqtt.la \
+  -lgnunetutil -lgnunettestbed
+test_mqtt_regex_plus_LDFLAGS = \
+  $(GNUNET_LDFLAGS)  $(WINFLAGS) -export-dynamic
+ 
+pkgcfg_DATA = mqtt.conf
+
+EXTRA_DIST = \
+  template.conf template_single_peer.conf test_mqtt_multipeer_topology.dat
+

Added: gnunet-mqtt/src/mqtt/gnunet-mqtt-publish.c
===================================================================
--- gnunet-mqtt/src/mqtt/gnunet-mqtt-publish.c                          (rev 0)
+++ gnunet-mqtt/src/mqtt/gnunet-mqtt-publish.c  2013-09-28 15:58:54 UTC (rev 
29672)
@@ -0,0 +1,181 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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 3, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/gnunet-mqtt-publish.c
+ * @brief MQTT PUBLISH tool
+ * @author Ramona Popa
+ * @author Artur Grunau
+ */
+#include <gnunet/platform.h>
+#include <gnunet/gnunet_util_lib.h>
+#include "gnunet_mqtt_service.h"
+
+
+/**
+ * Handle to the MQTT
+ */
+static struct GNUNET_MQTT_Handle *mqtt_handle;
+
+/**
+ * Topic for the message to be published
+ */
+static char *topic;
+
+/**
+ * The message to be published
+ */
+static char *message;
+
+/**
+ * User supplied timeout value
+ */
+static unsigned long long request_timeout = 5;
+
+/**
+ * Be verbose
+ */
+static int verbose;
+
+/**
+ * Global status value
+ */
+static int ret;
+
+
+/**
+ * Disconnect from MQTT and free all allocated resources.
+ *
+ * @param cls closure
+ * @param tc scheduler context
+ */
+static void
+shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  if (NULL != mqtt_handle)
+  {
+    GNUNET_MQTT_disconnect (mqtt_handle);
+    mqtt_handle = NULL;
+  }
+}
+
+
+static void
+publish_callback (void *cls, int success)
+{
+  if (verbose)
+  {
+    switch (success)
+    {
+    case GNUNET_OK:
+      FPRINTF (stderr, "%s `%s', %s `%s'\n",
+               _("PUBLISH request sent with topic"), _("message"), topic,
+               message);
+      break;
+    case GNUNET_NO:
+      FPRINTF (stderr, "%s", _("Timeout sending PUBLISH request!\n"));
+      break;
+    case GNUNET_SYSERR:
+      FPRINTF (stderr, "%s", _("PUBLISH request not confirmed!\n"));
+      break;
+    default:
+      GNUNET_break (0);
+      break;
+    }
+  }
+
+  GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
+}
+
+
+/**
+ * Main function that will be run by the scheduler.
+ *
+ * @param cls closure
+ * @param args remaining command-line arguments
+ * @param cfgfile name of the configuration file used (for saving, can be 
NULL!)
+ * @param cfg configuration
+ */
+static void
+run (void *cls, char *const *args, const char *cfgfile,
+     const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+  struct GNUNET_TIME_Relative timeout;
+
+  if ((NULL == topic) || (NULL == message))
+  {
+    FPRINTF (stderr, "%s",
+             _("Must provide TOPIC and MESSAGE for MQTT PUBLISH!\n"));
+    ret = 1;
+    return;
+  }
+
+  mqtt_handle = GNUNET_MQTT_connect (cfg);
+
+  if (NULL == mqtt_handle)
+  {
+    FPRINTF (stderr, "%s",  _("Failed to connect to MQTT service!\n"));
+    ret = 1;
+    return;
+  }
+
+  timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                           request_timeout);
+
+  GNUNET_MQTT_publish (mqtt_handle, strlen(topic) + 1, topic,
+                       strlen(message) + 1, message, timeout, publish_callback,
+                       NULL);
+
+  ret = 0;
+}
+
+/**
+ * The main function to MQTT PUBLISH.
+ *
+ * @param argc number of arguments from the command line
+ * @param argv command line arguments
+ * @return 0 ok, 1 on error
+ */
+int
+main (int argc, char *const *argv)
+{
+  static const struct GNUNET_GETOPT_CommandLineOption options[] = {
+    {'m', "message", "MESSAGE",
+     gettext_noop ("the message to be published"),
+     1, &GNUNET_GETOPT_set_string, &message},
+    {'t', "topic", "TOPIC",
+     gettext_noop ("the message topic"),
+     1, &GNUNET_GETOPT_set_string, &topic},
+    {'T', "timeout", "TIMEOUT",
+     gettext_noop ("how long to execute this query before giving up"),
+     1, &GNUNET_GETOPT_set_ulong, &request_timeout},
+    {'V', "verbose", NULL,
+     gettext_noop ("be verbose (print progress information)"),
+     0, &GNUNET_GETOPT_set_one, &verbose},
+    GNUNET_GETOPT_OPTION_END
+  };
+  return (GNUNET_OK ==
+          GNUNET_PROGRAM_run (argc,
+                              argv,
+                              "gnunet-mqtt-publish [options [value]]",
+                              gettext_noop
+                              ("mqtt-publish"),
+                              options, &run, NULL)) ? ret : 1;
+}

Added: gnunet-mqtt/src/mqtt/gnunet-mqtt-subscribe.c
===================================================================
--- gnunet-mqtt/src/mqtt/gnunet-mqtt-subscribe.c                                
(rev 0)
+++ gnunet-mqtt/src/mqtt/gnunet-mqtt-subscribe.c        2013-09-28 15:58:54 UTC 
(rev 29672)
@@ -0,0 +1,184 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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 3, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/gnunet-mqtt-subscribe.c
+ * @brief MQTT SUBSCRIBE tool
+ * @author Ramona Popa
+ * @author Artur Grunau
+ */
+#include <gnunet/platform.h>
+#include <gnunet/gnunet_util_lib.h>
+#include "gnunet_mqtt_service.h"
+
+
+/**
+ * Handle to the MQTT
+ */
+static struct GNUNET_MQTT_Handle *mqtt_handle;
+
+/**
+ * Topic - target of the subscription
+ */
+static char *topic;
+
+/**
+ * User supplied timeout value
+ */
+static unsigned long long request_timeout = 5;
+
+/**
+ * Be verbose
+ */
+static int verbose;
+
+/**
+ * Global status value
+ */
+static int ret;
+
+
+/**
+ * Disconnect from MQTT and free all allocated resources.
+ *
+ * @param cls closure
+ * @param tc scheduler context
+ */
+static void
+shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  if (NULL != mqtt_handle)
+  {
+    GNUNET_MQTT_disconnect (mqtt_handle);
+    mqtt_handle = NULL;
+  }
+}
+
+
+static void
+subscribe_result_callback (void *cls, uint8_t topic_len, char *topic,
+                           size_t size, void *data)
+{
+  FPRINTF (stdout, "%s: %s -> %s\n",  _("Message received"), topic,
+           (char*) data);
+
+  GNUNET_free (topic);
+  GNUNET_free (data);
+}
+
+
+static void
+subscribe_continuation (void *cls, int success)
+{
+  if (verbose)
+  {
+    switch (success)
+    {
+    case GNUNET_OK:
+      FPRINTF (stderr, "%s `%s'\n",
+               _("SUBSCRIBE request sent with topic"), topic);
+      break;
+    case GNUNET_NO:
+      FPRINTF (stderr, "%s",  _("Timeout sending SUBSCRIBE request!\n"));
+      break;
+    case GNUNET_SYSERR:
+      FPRINTF (stderr, "%s",  _("SUBSCRIBE request not confirmed!\n"));
+      break;
+    default:
+      GNUNET_break (0);
+      break;
+    }
+  }
+
+  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, shutdown_task,
+                                NULL);
+}
+
+/**
+ * Main function that will be run by the scheduler.
+ *
+ * @param cls closure
+ * @param args remaining command-line arguments
+ * @param cfgfile name of the configuration file used (for saving, can be 
NULL!)
+ * @param cfg configuration
+ */
+static void
+run (void *cls, char *const *args, const char *cfgfile,
+     const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+  struct GNUNET_TIME_Relative timeout;
+
+  if ((NULL == topic))
+  {
+    FPRINTF (stderr, "%s",
+             _("Must provide TOPIC for MQTT SUBSCRIBE!\n"));
+    ret = 1;
+    return;
+  }
+
+  mqtt_handle = GNUNET_MQTT_connect (cfg);
+
+  if (NULL == mqtt_handle)
+  {
+    FPRINTF (stderr, "%s",  _("Failed to connect to MQTT service!\n"));
+    ret = 1;
+    return;
+  }
+
+  timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                           request_timeout);
+
+  GNUNET_MQTT_subscribe (mqtt_handle, strlen(topic) + 1, topic, timeout,
+                         subscribe_continuation, NULL,
+                         subscribe_result_callback, NULL);
+
+  ret = 0;
+}
+
+/**
+ * The main function to MQTT SUBSCRIBE.
+ *
+ * @param argc number of arguments from the command line
+ * @param argv command line arguments
+ * @return 0 ok, 1 on error
+ */
+int
+main (int argc, char *const *argv)
+{
+  static const struct GNUNET_GETOPT_CommandLineOption options[] = {
+    {'t', "topic", "TOPIC",
+     gettext_noop ("topic - target of subscription"),
+     1, &GNUNET_GETOPT_set_string, &topic},
+    {'T', "timeout", "TIMEOUT",
+     gettext_noop ("how long to execute this query before giving up"),
+     1, &GNUNET_GETOPT_set_ulong, &request_timeout},
+    {'V', "verbose", NULL,
+     gettext_noop ("be verbose (print progress information)"),
+     0, &GNUNET_GETOPT_set_one, &verbose},
+    GNUNET_GETOPT_OPTION_END
+  };
+  return (GNUNET_OK ==
+          GNUNET_PROGRAM_run (argc,
+                              argv,
+                              "gnunet-mqtt-subscribe [options [value]]",
+                              gettext_noop
+                              ("mqtt-subscribe"),
+                              options, &run, NULL)) ? ret : 1;
+}

Added: gnunet-mqtt/src/mqtt/gnunet-service-mqtt.c
===================================================================
--- gnunet-mqtt/src/mqtt/gnunet-service-mqtt.c                          (rev 0)
+++ gnunet-mqtt/src/mqtt/gnunet-service-mqtt.c  2013-09-28 15:58:54 UTC (rev 
29672)
@@ -0,0 +1,1555 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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 3, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/gnunet-service-mqtt.c
+ * @brief MQTT service implementation
+ * @author Ramona Popa
+ * @author Artur Grunau
+ */
+#include <gnunet/platform.h>
+#include <gnunet/gnunet_util_lib.h>
+#include <gnunet/gnunet_regex_lib.h>
+#include <gnunet/gnunet_core_service.h>
+#include <gnunet/gnunet_dht_service.h>
+#include <gnunet/gnunet_mesh_service.h>
+#include <gnunet/gnunet_applications.h>
+#include <gnunet/gnunet_configuration_lib.h>
+#include "gnunet_protocols_mqtt.h"
+#include "mqtt.h"
+#include "regex_utils.h"
+
+
+/**
+ * Struct representing the context for the regex search
+ */
+struct RegexSearchContext
+{
+  /**
+   * Pointer to the publish message
+   */
+  struct GNUNET_MQTT_ClientPublishMessage *publish_msg;
+
+  /**
+   * Pointer to the filepath where the topic and the content of the
+   * message will be stored
+   */
+  char *file_path;
+
+  /**
+   * Set of peers interested in the message associated with this context
+   */
+  struct GNUNET_CONTAINER_MultiHashMap *subscribers;
+
+  /**
+   * Flag to mark a message as delivered in order to trigger its
+   * deletion
+   */
+  int message_delivered;
+ 
+  /**
+   * Task responsible for freeing the context once the message
+   * associated with it has been delivered
+   */
+  GNUNET_SCHEDULER_TaskIdentifier free_task;
+ 
+  /**
+   * Pointer to the regex search handle
+   */
+  struct GNUNET_REGEX_search_handle *regex_search_handle;
+};
+
+/**
+ * Struct representing a message that needs to be sent to a client.
+ */
+struct PendingMessage
+{
+  /**
+   * Pointer to next item in the list
+   */
+  struct PendingMessage *next;
+
+  /**
+   * Pointer to previous item in the list
+   */
+  struct PendingMessage *prev;
+
+  /**
+   * Pointer to the actual message to be sent
+   */
+  struct GNUNET_MessageHeader *msg;
+  
+  /**
+   * Pointer to the filepath where the topic and the content of the
+   * message will be stored
+   */
+  struct RegexSearchContext *context;
+};
+
+/**
+ * Struct containing information about a client,
+ * handle to connect to it, and any pending messages
+ * that need to be sent to it.
+ */
+struct ClientInfo
+{
+  /**
+   * Linked list of active clients
+   */
+  struct ClientInfo *next;
+
+  /**
+   * Linked list of active clients
+   */
+  struct ClientInfo *prev;
+
+  /**
+   * The handle to this client
+   */
+  struct GNUNET_SERVER_Client *client_handle;
+
+  /**
+   * Handle to the current transmission request, NULL
+   * if none is pending.
+   */
+  struct GNUNET_SERVER_TransmitHandle *transmit_handle;
+
+  /**
+   * Linked list of pending messages for this client
+   */
+  struct PendingMessage *pending_head;
+
+  /**
+   * Tail of linked list of pending messages for this client
+   */
+  struct PendingMessage *pending_tail;
+};
+
+
+/**
+ * Struct containing information about a client,
+ * handle to connect to it, and any pending messages
+ * that need to be sent to it.
+ */
+struct RemoteSubscriberInfo
+{
+  /**
+   * The subscriber's identity.
+   */
+  const struct GNUNET_PeerIdentity *id;
+
+  /**
+   * Tunnel connecting us to the subscriber.
+   */
+  struct GNUNET_MESH_Tunnel *tunnel;
+
+  /**
+   * Has the subscriber been added to the tunnel yet?
+   */
+  int peer_added;
+
+  /**
+   * Are we currently trying to connect to the subscriber?
+   */
+  int peer_connecting;
+
+  /**
+   * Handle to the current transmission request, NULL
+   * if none is pending.
+   */
+  struct GNUNET_MESH_TransmitHandle *transmit_handle;
+
+  /**
+   * Head of linked list of pending messages for this subscriber
+   */
+  struct PendingMessage *pending_head;
+
+  /**
+   * Tail of linked list of pending messages for this subscriber
+   */
+  struct PendingMessage *pending_tail;
+};
+
+
+/*
+ * Struct representing one active subscription in our service.
+ */
+struct Subscription
+{
+  /* Handle used to reannounce the subscription */
+  struct GNUNET_REGEX_announce_handle *regex_announce_handle;
+
+  /* The subscribed client */
+  struct ClientInfo *client;
+
+  /* Unique ID for this subscription */
+  uint64_t request_id;
+
+  /* The automaton built using the subcription provided by the user */
+  struct GNUNET_REGEX_Automaton *automaton;
+};
+
+/**
+ * Our configuration.
+ */
+static const struct GNUNET_CONFIGURATION_Handle *cfg;
+
+/**
+ * Handle to the DHT.
+ */
+static struct GNUNET_DHT_Handle *dht_handle;
+
+/**
+ * Handle to the core service.
+ */
+static struct GNUNET_CORE_Handle *core_handle;
+
+/**
+ * Handle to the server.
+ */
+static struct GNUNET_SERVER_Handle *server_handle;
+
+/**
+ * Handle to the mesh service.
+ */
+static struct GNUNET_MESH_Handle *mesh_handle;
+
+/**
+ * The identity of the local peer.
+ */
+static const struct GNUNET_PeerIdentity *my_id;
+
+/**
+ * Singly linked list storing active subscriptions.
+ */
+static struct GNUNET_CONTAINER_SList *subscriptions;
+
+/**
+ * List of active clients.
+ */
+static struct ClientInfo *client_head;
+
+/**
+ * List of active clients.
+ */
+static struct ClientInfo *client_tail;
+
+/**
+ * Map storing data identifying remote subscribers.
+ */
+static struct GNUNET_CONTAINER_MultiHashMap *remote_subscribers;
+
+/**
+ * Generator for unique ids.
+ */
+static uint64_t uid_gen;
+
+/**
+ * Path to the current directory (configuration directory)
+ */
+static char *current_dir_name;
+
+/**
+ * Singly linked list storing active regex search contexts.
+ */
+static struct GNUNET_CONTAINER_SList *search_contexts;
+
+/**
+ * How often to reannounce active subscriptions.
+ */
+static struct GNUNET_TIME_Relative subscription_reannounce_time;
+
+/**
+ * The time the peer that received a publish message waits before it deletes 
it after it was sent to a subscrier
+ */
+static struct GNUNET_TIME_Relative message_delete_time;
+
+/**
+ * Task responsible for reannouncing active subscriptions.
+ */
+static GNUNET_SCHEDULER_TaskIdentifier reannounce_task;
+
+
+/**
+ * Free the provided ClientInfo struct.
+ *
+ * This function takes care to cancel any pending transmission requests
+ * and discard all outstanding messages not delivered to the client yet
+ * before freeing the ClientInfo struct itself.
+ *
+ * @param client_info pointer to a ClientInfo struct
+ */
+static void
+client_info_free (struct ClientInfo *client_info)
+{
+  struct PendingMessage *pm;
+
+  if (NULL != client_info->transmit_handle) {
+    GNUNET_SERVER_notify_transmit_ready_cancel (client_info->transmit_handle);
+    client_info->transmit_handle = NULL;
+  }
+
+  while (NULL != (pm = client_info->pending_head))
+  {
+    GNUNET_CONTAINER_DLL_remove (client_info->pending_head,
+                                 client_info->pending_tail, pm);
+    GNUNET_free (pm->msg);
+    GNUNET_free (pm);
+  }
+
+  GNUNET_CONTAINER_DLL_remove (client_head, client_tail, client_info);
+  GNUNET_free (client_info);
+}
+
+
+/**
+ * Return a ClientInfo struct for the given client.
+ *
+ * If we communicated with this client before, we return the ClientInfo
+ * struct that it has been previously assigned. Otherwise, we create,
+ * save, and return a new ClientInfo struct.
+ *
+ * @param client the server handle to the client
+ * @return a ClientInfo structure for the given client
+ */
+static struct ClientInfo *
+find_active_client (struct GNUNET_SERVER_Client *client)
+{
+  struct ClientInfo *pos = client_head;
+  struct ClientInfo *ret;
+
+  while (pos != NULL)
+  {
+    if (pos->client_handle == client)
+      return pos;
+    pos = pos->next;
+  }
+
+  ret = GNUNET_malloc (sizeof (struct ClientInfo));
+  ret->client_handle = client;
+  ret->transmit_handle = NULL;
+  GNUNET_CONTAINER_DLL_insert (client_head, client_tail, ret);
+
+  return ret;
+}
+
+
+/**
+ * Free the provided Subscription struct.
+ *
+ * This function stops announcing the subscription and destroys the
+ * regex automaton associated with it before freeing the Subscription
+ * struct itself.
+ *
+ * @param subscription pointer to a Subscription struct
+ */
+static void
+subscription_free (struct Subscription *subscription)
+{
+  GNUNET_REGEX_automaton_destroy (subscription->automaton);
+  GNUNET_REGEX_announce_cancel (subscription->regex_announce_handle);
+  GNUNET_free (subscription);
+}
+
+
+/**
+ * Free the provided RemoteSubscriberInfo struct.
+ *
+ * This function takes care to cancel any pending transmission requests
+ * and discard all outstanding messages not delivered to the subscriber
+ * yet. Moreover, it destroys the tunnel connecting us to the subscriber
+ * before finally freeing the given RemoteSubscriberInfo struct.
+ *
+ * @param subscriber pointer to a RemoteSubscriberInfo struct
+ */
+static void
+remote_subscriber_info_free (struct RemoteSubscriberInfo *subscriber)
+{
+  struct PendingMessage *pm;
+
+  if (NULL != subscriber->transmit_handle)
+  {
+    GNUNET_MESH_notify_transmit_ready_cancel (subscriber->transmit_handle);
+    subscriber->transmit_handle = NULL;
+  }
+
+  while (NULL != (pm = subscriber->pending_head))
+  {
+    GNUNET_CONTAINER_DLL_remove (subscriber->pending_head,
+                                 subscriber->pending_tail, pm);
+    GNUNET_free (pm->msg);
+    GNUNET_free (pm);
+  }
+
+  GNUNET_MESH_tunnel_destroy (subscriber->tunnel);
+  GNUNET_free ((void *) subscriber->id);
+  GNUNET_free (subscriber);
+}
+
+
+/**
+ * Free the provided RegexSearchContext struct.
+ *
+ * This function stops the regex search associated with the given
+ * context and deletes the corresponding PUBLISH message (if it has been
+ * successfully delivered). Finally, it frees the provided
+ * RegexSearchContext struct.
+ *
+ * @param context pointer to a RegexSearchContext struct
+ */
+static void
+regex_search_context_free (struct RegexSearchContext *context)
+{
+  if (GNUNET_YES == context->message_delivered)
+  {
+    char *filepath = context->file_path;
+
+    if (GNUNET_SCHEDULER_NO_TASK != context->free_task)
+      GNUNET_SCHEDULER_cancel (context->free_task);
+
+    if (remove (filepath) == 0)
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                  "file `%s` deleted successfully.\n", filepath);
+    }
+    else
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                  "unable to delete file `%s`\n", filepath);
+    }
+  }
+
+  GNUNET_CONTAINER_multihashmap_destroy (context->subscribers);
+  GNUNET_REGEX_search_cancel (context->regex_search_handle);
+  GNUNET_free (context->publish_msg);
+  GNUNET_free (context->file_path);
+  GNUNET_free (context);
+}
+
+
+static void
+process_pending_subscriber_messages (struct RemoteSubscriberInfo *subscriber);
+
+static void
+delete_delivered_message (void *cls,
+                          const struct GNUNET_SCHEDULER_TaskContext *tc);
+
+static void 
+set_timer_for_deleting_message (struct PendingMessage *pm);
+
+
+/**
+ * Callback called as a result of issuing
+ * a GNUNET_MESH_notify_transmit_ready request. A RemoteSubscriberInfo
+ * is passed as closure, take the head of the list and copy it into buf,
+ * which has the result of sending the message to the subscriber.
+ *
+ * @param cls closure to this call
+ * @param size maximum number of bytes available to send
+ * @param buf where to copy the actual message to
+ *
+ * @return the number of bytes actually copied, 0 indicates failure
+ */
+static size_t
+send_msg_to_subscriber (void *cls, size_t size, void *buf)
+{
+  struct RemoteSubscriberInfo *subscriber = cls;
+  char *cbuf = buf;
+  struct PendingMessage *pm;
+  size_t off;
+  size_t msize;
+  
+  subscriber->transmit_handle = NULL;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                       "Send message to subscriber.\n");
+
+  if (buf == NULL)
+  {
+    /* subscriber disconnected */
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Subscriber %s disconnected, %s",
+                GNUNET_i2s (subscriber->id),
+                "pending messages will be discarded\n");
+    return 0;
+  }
+
+  off = 0;
+
+  while ((NULL != (pm = subscriber->pending_head)) &&
+         (size >= off + (msize = ntohs (pm->msg->size))))
+  {
+    GNUNET_CONTAINER_DLL_remove (subscriber->pending_head,
+                                 subscriber->pending_tail, pm);
+    memcpy (&cbuf[off], pm->msg, msize);
+    
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Transmitting %u bytes to subscriber %s\n", msize,
+                GNUNET_i2s (subscriber->id));
+    off += msize;
+       set_timer_for_deleting_message(pm);     
+
+       GNUNET_free (pm->msg);
+       GNUNET_free (pm);
+  }
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Transmitted %zu/%zu bytes to subscriber %s\n",
+              off, size, GNUNET_i2s (subscriber->id));
+  process_pending_subscriber_messages (subscriber);
+  
+  return off;
+}
+
+
+/**
+ * Task run to check for messages that need to be sent to a subscriber.
+ *
+ * @param client a RemoteSubscriberInfo struct, containing the tunnel
+ *               handle and any messages to be sent to it
+ */
+static void
+process_pending_subscriber_messages (struct RemoteSubscriberInfo *subscriber)
+{
+  struct GNUNET_MessageHeader *msg;
+
+  if ((subscriber->pending_head == NULL) ||
+      (subscriber->transmit_handle != NULL))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Not asking for transmission to %s now: %s\n",
+                GNUNET_i2s (subscriber->id),
+                subscriber->pending_head ==
+                NULL ? "no more messages" : "request already pending");
+    return;
+  }
+
+  msg = subscriber->pending_head->msg;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "asking for transmission of %u bytes to client %s\n",
+              ntohs (msg->size), GNUNET_i2s (subscriber->id));
+
+  subscriber->transmit_handle =
+    GNUNET_MESH_notify_transmit_ready (subscriber->tunnel, GNUNET_NO,
+                                       GNUNET_TIME_UNIT_FOREVER_REL,
+                                       subscriber->id, ntohs (msg->size),
+                                       send_msg_to_subscriber, subscriber);
+}
+
+
+/**
+ * Function called when the timer expires for a delivered message,
+ * triggering its deletion.
+ *
+ * @param cls closure (RegexSearchContext of the message to be deleted)
+ */
+static void
+delete_delivered_message (void *cls,
+                          const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  struct RegexSearchContext *context = cls;
+  struct GNUNET_CONTAINER_SList_Iterator it;
+
+  it = GNUNET_CONTAINER_slist_begin (search_contexts);
+
+  while (GNUNET_CONTAINER_slist_end (&it) != GNUNET_YES)
+  {
+    if (GNUNET_CONTAINER_slist_get (&it, NULL) == context)
+    {
+      GNUNET_CONTAINER_slist_erase (&it);
+      break;
+    }
+    else
+      GNUNET_CONTAINER_slist_next (&it);
+  }
+
+  context->free_task = GNUNET_SCHEDULER_NO_TASK;
+  regex_search_context_free (context);
+}
+
+
+/**
+ * Marks a message as delivered and sets the timer for deleting it
+ *
+ * @param pm pointer to the pending message
+ */
+static void 
+set_timer_for_deleting_message (struct PendingMessage *pm)
+{
+  if (GNUNET_NO == pm->context->message_delivered)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "scheduling task to delete delivered PUBLISH message\n");
+
+    pm->context->message_delivered = GNUNET_YES;
+    pm->context->free_task = GNUNET_SCHEDULER_add_delayed (
+      message_delete_time,
+      delete_delivered_message, pm->context);
+  }
+}
+
+
+/**
+ * Add a PendingMessage to the subscriber's list of messages to be sent
+ *
+ * @param subscriber the subscriber to send the message to
+ * @param pending_message the actual message to send
+ */
+static void
+add_pending_subscriber_message (struct RemoteSubscriberInfo *subscriber,
+                                struct PendingMessage *pending_message)
+{
+  GNUNET_CONTAINER_DLL_insert_tail (subscriber->pending_head,
+                                    subscriber->pending_tail, pending_message);
+}
+
+
+/**
+ * Method called whenever a subscriber has disconnected from the tunnel.
+ *
+ * @param cls closure
+ * @param peer peer identity the tunnel stopped working with
+ */
+static void
+subscribed_peer_disconnected (void *cls,
+                              const struct GNUNET_PeerIdentity *peer)
+{
+  struct RemoteSubscriberInfo *subscriber = cls;
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "subscribed peer %s disconnected\n",
+              GNUNET_i2s (peer));
+
+  subscriber->peer_added = GNUNET_NO;
+  subscriber->peer_connecting = GNUNET_NO;
+}
+
+
+/**
+ * Method called whenever a subscriber has connected to the tunnel.
+ *
+ * @param cls closure
+ * @param peer peer identity the tunnel was created to, NULL on timeout
+ * @param atsi performance data for the connection
+ */
+static void
+subscribed_peer_connected (void *cls, const struct GNUNET_PeerIdentity *peer,
+                           const struct GNUNET_ATS_Information *atsi)
+{
+  struct RemoteSubscriberInfo *subscriber = cls;
+
+  if (NULL == peer) {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Connecting to subscribed peer %s timed out.\n",GNUNET_i2s 
(peer));
+    /* TODO: destroy the tunnel */
+    subscriber->peer_connecting = GNUNET_NO;
+    return;
+  }
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "subscribed peer %s connected\n",
+              GNUNET_i2s (peer));
+
+  subscriber->peer_added = GNUNET_YES;
+  subscriber->peer_connecting = GNUNET_NO;
+  process_pending_subscriber_messages (subscriber);
+}
+
+
+static void
+deliver_incoming_publish (struct GNUNET_MQTT_ClientPublishMessage *msg, struct 
RegexSearchContext *context);
+
+
+/**
+ * Search callback function called when a subscribed peer is found.
+ *
+ * @param cls closure provided in GNUNET_REGEX_search
+ * @param id peer providing a regex that matches the string
+ * @param get_path path of the get request
+ * @param get_path_length lenght of get_path
+ * @param put_path Path of the put request
+ * @param put_path_length length of the put_path
+ */
+static void
+subscribed_peer_found (void *cls, const struct GNUNET_PeerIdentity *id,
+                       const struct GNUNET_PeerIdentity *get_path,
+                       unsigned int get_path_length,
+                       const struct GNUNET_PeerIdentity *put_path,
+                       unsigned int put_path_length)
+{
+  struct PendingMessage *pm;
+  struct RemoteSubscriberInfo *subscriber;
+  struct GNUNET_MessageHeader *msg;
+  struct RegexSearchContext *context = cls;
+  size_t msg_len = ntohs (context->publish_msg->header.size);
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "an active subscription found from %s\n", GNUNET_i2s (id));
+
+  /*
+   * We may have delivered the message to the peer already if it has
+   * other matching subscriptions; ignore this search result if that is
+   * the case.
+   */
+  if (GNUNET_CONTAINER_multihashmap_contains (context->subscribers,
+                                              &id->hashPubKey))
+    return;
+
+  GNUNET_CONTAINER_multihashmap_put (context->subscribers, &id->hashPubKey,
+    NULL, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
+  subscriber = GNUNET_CONTAINER_multihashmap_get (remote_subscribers,
+                                                  &id->hashPubKey);
+
+  if (0 == GNUNET_CRYPTO_hash_cmp (&id->hashPubKey, &my_id->hashPubKey))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "fast tracking PUBLISH message to local subscribers\n");
+
+    deliver_incoming_publish (context->publish_msg, context);
+    return;
+  }
+
+  msg = GNUNET_malloc (msg_len);
+  memcpy (msg, context->publish_msg, msg_len);
+
+  pm = GNUNET_malloc (sizeof (struct PendingMessage));
+  pm->msg = msg;
+  pm->context = context;
+
+  if (NULL == subscriber)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "creating a new tunnel to %s\n", GNUNET_i2s(id));
+
+    subscriber = GNUNET_malloc (sizeof (struct RemoteSubscriberInfo));
+
+    subscriber->tunnel = GNUNET_MESH_tunnel_create (mesh_handle, NULL,
+      subscribed_peer_connected, subscribed_peer_disconnected, subscriber);
+    subscriber->peer_added = GNUNET_NO;
+    subscriber->peer_connecting = GNUNET_NO;
+
+    subscriber->id = GNUNET_malloc (sizeof (struct GNUNET_PeerIdentity));
+    memcpy ((struct GNUNET_PeerIdentity*) subscriber->id, id,
+            sizeof (struct GNUNET_PeerIdentity));
+
+    GNUNET_CONTAINER_multihashmap_put (remote_subscribers, &id->hashPubKey,
+      subscriber, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
+  }
+
+  add_pending_subscriber_message (subscriber, pm);
+
+  if (GNUNET_YES == subscriber->peer_added)
+  {
+    process_pending_subscriber_messages (subscriber);
+  }
+  else if (GNUNET_NO == subscriber->peer_connecting)
+  {
+    GNUNET_MESH_peer_request_connect_add (subscriber->tunnel, id);
+    subscriber->peer_connecting = GNUNET_YES;
+  }
+}
+
+
+/**
+ * Call regex search to find subscribed peers.
+ *
+ * @param topic of the message identification of the client
+ * @param publish_msg the publish message
+
+ */
+static void
+search_for_subscribers (const char *topic,
+                        struct GNUNET_MQTT_ClientPublishMessage *publish_msg,
+                        char *file_path)
+{
+  struct RegexSearchContext *context;
+
+  context = GNUNET_malloc (sizeof (struct RegexSearchContext));
+  context->publish_msg = publish_msg;
+  context->file_path = file_path;
+  context->message_delivered = GNUNET_NO;
+  context->free_task = GNUNET_SCHEDULER_NO_TASK;
+  context->subscribers = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_NO);
+  context->regex_search_handle = GNUNET_REGEX_search (dht_handle, topic,
+                                                      subscribed_peer_found,
+                                                      context, NULL);
+
+  GNUNET_CONTAINER_slist_add (search_contexts,
+                              GNUNET_CONTAINER_SLIST_DISPOSITION_STATIC,
+                              context, sizeof (struct RegexSearchContext));
+}
+
+/**
+ * Handle MQTT-PUBLISH-message.
+ *
+ * @param cls closure
+ * @param client identification of the client
+ * @param message the actual message
+ * @return GNUNET_OK to keep the connection open,
+ *         GNUNET_SYSERR to close it (signal serious error)
+ */
+static void
+handle_mqtt_publish (void *cls, struct GNUNET_SERVER_Client *client,
+                     const struct GNUNET_MessageHeader *msg)
+{
+  char *topic, *message, *prefixed_topic;
+  FILE *persistence_file;
+  struct GNUNET_HashCode file_name_hash;
+  const char *file_name;
+  char *file_path;
+  size_t message_len;
+  
+  size_t msg_len = ntohs (msg->size);
+  struct GNUNET_MQTT_ClientPublishMessage *publish_msg;
+
+  /* Extract topic */
+  publish_msg = GNUNET_malloc (msg_len);
+  memcpy (publish_msg, msg, msg_len);
+  topic = GNUNET_malloc (publish_msg->topic_len);
+  strncpy(topic, (char *) (publish_msg + 1), publish_msg->topic_len);
+  topic[publish_msg->topic_len - 1] = '\0';
+  
+  /* Extract message */
+  message_len = ntohs (publish_msg->header.size) -
+    sizeof (struct GNUNET_MQTT_ClientPublishMessage) - publish_msg->topic_len;
+  message = GNUNET_malloc (message_len);
+  strncpy(message, ((char *) (publish_msg + 1)) + publish_msg->topic_len,
+          message_len);
+  message[message_len - 1] = '\0';
+
+  add_prefix (topic, &prefixed_topic);
+   
+  if (NULL != current_dir_name)
+  {
+        GNUNET_CRYPTO_hash_create_random(GNUNET_CRYPTO_QUALITY_WEAK, 
&file_name_hash);
+        file_name = GNUNET_h2s_full(&file_name_hash);
+        
+        GNUNET_asprintf (&file_path, "%s%s%s", current_dir_name, 
DIR_SEPARATOR_STR, file_name );                       
+        //file_path = GNUNET_malloc (strlen(current_dir_name)+ 
strlen(file_name) + 2);
+        //strcpy(file_path, current_dir_name);
+        //strcat(file_path, DIR_SEPARATOR_STR);
+        //strcat(file_path, file_name);         
+                
+        if (NULL != (persistence_file = fopen(file_path, "w+")))
+        {
+               fwrite(topic, 1, strlen(topic)+1, persistence_file);
+               fwrite(message, 1, strlen(message), persistence_file);
+               fclose(persistence_file);
+               
+               search_for_subscribers (prefixed_topic, publish_msg, file_path);
+         }
+         else
+       {
+               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+              "Not able to open file!");
+       }
+       }       
+       else
+       {
+               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+              "Not able to get current directory!");
+       }
+  
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "outgoing PUBLISH message received: %s [%d bytes] (%d 
overall)\n",
+              topic, publish_msg->topic_len, ntohs(publish_msg->header.size));
+ 
+
+  GNUNET_SERVER_receive_done (client, GNUNET_OK);
+}
+
+
+/**
+ * Handle MQTT SUBSCRIBE message.
+ *
+ * @param cls closure
+ * @param client identification of the client
+ * @param message the actual message
+ * @return GNUNET_OK to keep the connection open,
+ *         GNUNET_SYSERR to close it (signal serious error)
+ */
+static void
+handle_mqtt_subscribe (void *cls, struct GNUNET_SERVER_Client *client,
+                       const struct GNUNET_MessageHeader *msg)
+{
+  struct Subscription *subscription;
+  char *topic, *regex_topic;
+  
+  const struct GNUNET_MQTT_ClientSubscribeMessage *subscribe_msg;
+
+  /* Extract topic */
+  subscribe_msg = (const struct GNUNET_MQTT_ClientSubscribeMessage *) msg;
+  topic = GNUNET_malloc (subscribe_msg->topic_len);
+  strncpy(topic, (char *) (subscribe_msg + 1),
+          subscribe_msg->topic_len);
+  topic[subscribe_msg->topic_len - 1] = '\0';
+
+  subscription = GNUNET_malloc (sizeof (struct Subscription));
+  subscription->request_id = subscribe_msg->request_id;
+  subscription->client = find_active_client (client);
+
+  get_regex(topic, &regex_topic);
+ 
+  subscription->automaton = GNUNET_REGEX_construct_dfa(regex_topic, 
strlen(regex_topic), 1);
+ 
+  GNUNET_CONTAINER_slist_add (subscriptions,
+                              GNUNET_CONTAINER_SLIST_DISPOSITION_STATIC,
+                              subscription, sizeof (struct Subscription));
+  subscription->regex_announce_handle =
+    GNUNET_REGEX_announce (dht_handle, (struct GNUNET_PeerIdentity *) my_id,
+                           regex_topic,1 , NULL);
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "MQTT SUBSCRIBE message received: %s->%s\n", topic, regex_topic);
+
+  GNUNET_SERVER_receive_done (client, GNUNET_OK);
+}
+
+
+static void
+process_pending_client_messages (struct ClientInfo *client);
+
+
+/**
+ * Callback called as a result of issuing
+ * a GNUNET_SERVER_notify_transmit_ready request. A ClientInfo is passed
+ * as closure, take the head of the list and copy it into buf, which has
+ * the result of sending the message to the client.
+ *
+ * @param cls closure to this call
+ * @param size maximum number of bytes available to send
+ * @param buf where to copy the actual message to
+ *
+ * @return the number of bytes actually copied, 0 indicates failure
+ */
+static size_t
+send_reply_to_client (void *cls, size_t size, void *buf)
+{
+  struct ClientInfo *client = cls;
+  char *cbuf = buf;
+  struct PendingMessage *reply;
+  size_t off;
+  size_t msize;
+
+  client->transmit_handle = NULL;
+
+  if (buf == NULL)
+  {
+    /* client disconnected */
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Client %p disconnected, pending messages will be discarded\n",
+                client->client_handle);
+    return 0;
+  }
+
+  off = 0;
+
+  while ((NULL != (reply = client->pending_head)) &&
+         (size >= off + (msize = ntohs (reply->msg->size))))
+  {
+    GNUNET_CONTAINER_DLL_remove (client->pending_head, client->pending_tail,
+                                 reply);
+    memcpy (&cbuf[off], reply->msg, msize);
+       if (NULL != reply->context)
+       {
+               set_timer_for_deleting_message(reply);
+       }
+    GNUNET_free (reply->msg);
+    GNUNET_free (reply);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Transmitting %u bytes to client %p\n", msize,
+                client->client_handle);
+    off += msize;
+  }
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitted %u/%u bytes to client 
%p\n",
+              (unsigned int) off, (unsigned int) size, client->client_handle);
+  process_pending_client_messages (client);
+
+  return off;
+}
+
+
+/**
+ * Task run to check for messages that need to be sent to a client.
+ *
+ * @param client a ClientInfo struct, containing the client handle and
+ *               any messages to be sent to it
+ */
+static void
+process_pending_client_messages (struct ClientInfo *client)
+{
+  if ((client->pending_head == NULL) || (client->transmit_handle != NULL))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Not asking for transmission to %p now: %s\n",
+                client->client_handle,
+                client->pending_head ==
+                NULL ? "no more messages" : "request already pending");
+    return;
+  }
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Asking for transmission of %u bytes to client %p\n",
+              ntohs (client->pending_head->msg->size), client->client_handle);
+
+  client->transmit_handle =
+    GNUNET_SERVER_notify_transmit_ready (client->client_handle,
+                                         ntohs (client->pending_head->
+                                                msg->size),
+                                         GNUNET_TIME_UNIT_FOREVER_REL,
+                                         &send_reply_to_client, client);
+}
+
+
+/**
+ * Add a PendingMessage to the client's list of messages to be sent
+ *
+ * @param client the active client to send the message to
+ * @param pending_message the actual message to send
+ */
+static void
+add_pending_client_message (struct ClientInfo *client,
+                            struct PendingMessage *pending_message)
+{
+  GNUNET_CONTAINER_DLL_insert_tail (client->pending_head, client->pending_tail,
+                                    pending_message);
+  process_pending_client_messages (client);
+}
+
+
+/**
+ * Handle MQTT UNSUBSCRIBE message.
+ *
+ * @param cls closure
+ * @param client identification of the client
+ * @param message the actual message
+ * @return GNUNET_OK to keep the connection open,
+ *         GNUNET_SYSERR to close it (signal serious error)
+ */
+static void
+handle_mqtt_unsubscribe (void *cls, struct GNUNET_SERVER_Client *client,
+                         const struct GNUNET_MessageHeader *msg)
+{
+  struct PendingMessage *pm;
+  struct GNUNET_CONTAINER_SList_Iterator it;
+  const struct GNUNET_MQTT_ClientUnsubscribeMessage *unsubscribe_msg;
+  struct GNUNET_MQTT_ClientUnsubscribeAckMessage *unsub_ack_msg;
+  struct ClientInfo *client_info;
+  struct Subscription *subscription = NULL;
+
+  unsubscribe_msg = (const struct GNUNET_MQTT_ClientUnsubscribeMessage *) msg;
+
+  for (it = GNUNET_CONTAINER_slist_begin (subscriptions);
+       GNUNET_CONTAINER_slist_end (&it) != GNUNET_YES;)
+  {
+    subscription = GNUNET_CONTAINER_slist_get (&it, NULL);
+
+    if (subscription->request_id == unsubscribe_msg->request_id)
+    {
+      GNUNET_CONTAINER_slist_erase (&it);
+      break;
+    }
+
+    GNUNET_CONTAINER_slist_next (&it);
+  }
+
+  if (NULL == subscription)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Active subscription with ID %lu does not exist\n",
+                subscription->request_id);
+       return;
+  }
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Cancelling subscription with ID %lu\n",
+              subscription->request_id);
+
+  client_info = find_active_client (client);
+  unsub_ack_msg =
+    GNUNET_malloc (sizeof (struct GNUNET_MQTT_ClientUnsubscribeAckMessage));
+
+  unsub_ack_msg->header.size =
+    sizeof (struct GNUNET_MQTT_ClientUnsubscribeAckMessage);
+  unsub_ack_msg->header.type =
+    htons (GNUNET_MESSAGE_TYPE_MQTT_CLIENT_UNSUBSCRIBE_ACK);
+  unsub_ack_msg->request_id = subscription->request_id;
+
+  pm = GNUNET_malloc (sizeof (struct PendingMessage));
+  pm->msg = (struct GNUNET_MessageHeader*) unsub_ack_msg;
+
+  add_pending_client_message (client_info, pm);
+  subscription_free (subscription);
+
+  GNUNET_SERVER_receive_done (client, GNUNET_OK);
+}
+
+
+/**
+ * Deliver incoming PUBLISH messages to local subscribers.
+ *
+ * This functioe processes and forwards PUBLISH messages to the
+ * appropriate subscribing application.
+ */
+static void
+deliver_incoming_publish (struct GNUNET_MQTT_ClientPublishMessage *msg, struct 
RegexSearchContext *context)
+{
+  char *topic, *prefixed_topic;
+  struct GNUNET_MQTT_ClientPublishMessage *publish_msg;
+  struct GNUNET_CONTAINER_SList_Iterator it;
+  size_t msg_len = ntohs (msg->header.size);
+  int free_publish_msg = GNUNET_YES;
+
+  /* Extract topic */
+  publish_msg = GNUNET_malloc (msg_len);
+  memcpy (publish_msg, msg, msg_len);
+  topic = GNUNET_malloc (publish_msg->topic_len);
+  strncpy(topic, (char *) (publish_msg + 1), publish_msg->topic_len);
+  topic[publish_msg->topic_len - 1] = '\0';
+  
+  add_prefix(topic, &prefixed_topic);
+
+  it = GNUNET_CONTAINER_slist_begin (subscriptions);
+
+  while (GNUNET_CONTAINER_slist_end (&it) != GNUNET_YES)
+  {
+    struct Subscription *subscription = GNUNET_CONTAINER_slist_get (&it, NULL);
+
+    if (0 == GNUNET_REGEX_eval(subscription->automaton, prefixed_topic))
+    {
+      struct PendingMessage *pm;
+      struct GNUNET_MQTT_ClientPublishMessage *return_msg;
+      struct ClientInfo *client_info = subscription->client;
+
+      if (GNUNET_YES == free_publish_msg) {
+        return_msg = publish_msg;
+        free_publish_msg = GNUNET_NO;
+      }
+      else
+      {
+        return_msg = GNUNET_malloc (msg_len);
+        memcpy (return_msg, msg, msg_len);
+      }
+
+      return_msg->request_id = subscription->request_id;
+
+      pm = GNUNET_malloc (sizeof (struct PendingMessage));
+      pm->msg = (struct GNUNET_MessageHeader*) return_msg;
+         pm->context = context;
+
+      add_pending_client_message (client_info, pm);
+    }
+
+    GNUNET_CONTAINER_slist_next (&it);
+  }
+
+  GNUNET_free (topic);
+  GNUNET_free (prefixed_topic);
+
+  if (GNUNET_YES == free_publish_msg) {
+    GNUNET_free (publish_msg);
+  }
+}
+
+
+/**
+ * Handle incoming PUBLISH messages.
+ *
+ * This handler receives messages that were sent to topics which this
+ * node is subscribed to.
+ */
+static int
+handle_incoming_publish (void *cls, struct GNUNET_MESH_Tunnel *tunnel,
+                         void **tunnel_ctx,
+                         const struct GNUNET_PeerIdentity *sender,
+                         const struct GNUNET_MessageHeader *msg,
+                         const struct GNUNET_ATS_Information *atsi)
+{
+  deliver_incoming_publish ((struct GNUNET_MQTT_ClientPublishMessage*) msg,
+                            NULL);
+
+  return GNUNET_OK;
+}
+
+
+static int
+handle_tunnel_message (void *cls, struct GNUNET_MESH_Tunnel *tunnel,
+                       void **tunnel_ctx,
+                       const struct GNUNET_PeerIdentity *sender,
+                       const struct GNUNET_MessageHeader *msg,
+                       const struct GNUNET_ATS_Information *atsi)
+{
+  return GNUNET_OK;
+}
+
+
+/**
+ * Task responsible for reannouncing regexes of active subscriptions.
+ *
+ * @param cls unused
+ * @param tc unused
+ */
+static void
+reannounce_subscriptions (void *cls,
+                          const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  struct GNUNET_CONTAINER_SList_Iterator it;
+
+  it = GNUNET_CONTAINER_slist_begin (subscriptions);
+
+  while (GNUNET_CONTAINER_slist_end (&it) != GNUNET_YES)
+  {
+    struct Subscription *subscription = GNUNET_CONTAINER_slist_get (&it, NULL);
+
+    GNUNET_REGEX_reannounce (subscription->regex_announce_handle);
+    GNUNET_CONTAINER_slist_next (&it);
+  }
+
+  reannounce_task = GNUNET_SCHEDULER_add_delayed (subscription_reannounce_time,
+                                                  reannounce_subscriptions,
+                                                  NULL);
+}
+
+
+static int
+free_remote_subscriber_iterator (void *cls, const struct GNUNET_HashCode *key,
+                                 void *value)
+{
+  remote_subscriber_info_free (value);
+  return GNUNET_YES;
+}
+
+
+/**
+ * A client disconnected. Remove all of its data structure entries.
+ *
+ * @param cls closure, NULL
+ * @param client identification of the client
+ */
+static void
+handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client)
+{
+  struct GNUNET_CONTAINER_SList_Iterator it;
+  struct ClientInfo *client_info = NULL;
+
+  if (NULL == client)
+    return;
+
+  it = GNUNET_CONTAINER_slist_begin (subscriptions);
+
+  while (GNUNET_CONTAINER_slist_end (&it) != GNUNET_YES)
+  {
+    struct Subscription *subscription = GNUNET_CONTAINER_slist_get (&it, NULL);
+
+    if (subscription->client->client_handle == client)
+    {
+      client_info = subscription->client;
+      GNUNET_CONTAINER_slist_erase (&it);
+      subscription_free (subscription);
+    }
+    else
+      GNUNET_CONTAINER_slist_next (&it);
+  }
+
+  if (NULL == client_info)
+  {
+    client_info = client_head;
+
+    while (client_info != NULL)
+    {
+      if (client_info->client_handle == client)
+        break;
+
+      client_info = client_info->next;
+    }
+  }
+
+  if (NULL != client_info)
+    client_info_free (client_info);
+}
+
+
+/**
+ * Task run during shutdown.
+ *
+ * @param cls unused
+ * @param tc unused
+ */
+static void
+shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  struct GNUNET_CONTAINER_SList_Iterator it;
+
+  it = GNUNET_CONTAINER_slist_begin (subscriptions);
+
+  while (GNUNET_CONTAINER_slist_end (&it) != GNUNET_YES)
+  {
+    struct Subscription *subscription = GNUNET_CONTAINER_slist_get (&it, NULL);
+
+    GNUNET_CONTAINER_slist_erase (&it);
+    subscription_free (subscription);
+  }
+
+  it = GNUNET_CONTAINER_slist_begin (search_contexts);
+
+  while (GNUNET_CONTAINER_slist_end (&it) != GNUNET_YES)
+  {
+    struct RegexSearchContext *context = GNUNET_CONTAINER_slist_get (&it,
+                                                                     NULL);
+
+    GNUNET_CONTAINER_slist_erase (&it);
+    regex_search_context_free (context);
+  }
+
+  GNUNET_CONTAINER_multihashmap_iterate (remote_subscribers,
+                                         free_remote_subscriber_iterator,
+                                         NULL);
+
+  GNUNET_DHT_disconnect (dht_handle);
+  GNUNET_CORE_disconnect (core_handle);
+  GNUNET_MESH_disconnect (mesh_handle);
+  GNUNET_CONTAINER_slist_destroy (subscriptions);
+  GNUNET_CONTAINER_slist_destroy (search_contexts);
+  GNUNET_CONTAINER_multihashmap_destroy (remote_subscribers);
+
+  GNUNET_SCHEDULER_cancel (reannounce_task);
+  GNUNET_SERVER_disconnect_notify_cancel (server_handle,
+                                          handle_client_disconnect, NULL);
+}
+
+
+static void
+core_connected_callback (void *cls,
+                         struct GNUNET_CORE_Handle * server,
+                         const struct GNUNET_PeerIdentity * my_identity)
+{
+  my_id = my_identity;
+}
+
+
+
+static void*
+new_incoming_tunnel_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel,
+                              const struct GNUNET_PeerIdentity *initiator,
+                              const struct GNUNET_ATS_Information *atsi)
+{
+  return NULL;
+}
+
+
+static void
+incoming_tunnel_destroyed_callback (void *cls,
+                                    const struct GNUNET_MESH_Tunnel *tunnel,
+                                    void *tunnel_ctx)
+{
+}
+
+/**
+ * Look for old messages and call try to deliver them again by calling regex 
search
+ *
+  */
+static void
+look_for_old_messages ()
+{
+       DIR *dir;
+       FILE *file;
+       char *current_dir;
+       char *folder_name = "mqtt";
+       struct dirent *ent;
+       char *file_path;
+       char *topic, *aux, *prefixed_topic;
+       size_t struct_size;
+    int ch;
+       long long length;
+       struct GNUNET_MQTT_ClientPublishMessage *old_publish_msg;
+       
+       uid_gen = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
+                                              UINT64_MAX);
+       current_dir_name = NULL;
+       if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_filename(cfg, "PATHS", 
"SERVICEHOME", &current_dir))
+  {
+   GNUNET_asprintf (&current_dir_name, "%s%s", current_dir, folder_name);
+        //current_dir_name = GNUNET_malloc (strlen(current_dir)+ 
strlen(folder_name)+1);
+        //strcpy(current_dir_name, current_dir);
+        //strcat(current_dir_name, folder_name);
+       
+       
+       
+       if ((dir = opendir (current_dir_name)) != NULL) 
+       {
+               while ((ent = readdir (dir)) != NULL) {
+                               
+                        if (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, 
".."))
+                               continue;
+                       
+                       GNUNET_asprintf (&file_path, "%s%s%s", 
current_dir_name, DIR_SEPARATOR_STR, ent->d_name );                      
+                       //file_path = GNUNET_malloc (strlen(current_dir_name)+ 
strlen(ent->d_name) + 1);
+                       //strcpy(file_path, current_dir_name);
+                       //strcat(file_path, DIR_SEPARATOR_STR);
+                       //strcat(file_path, ent->d_name);
+                       file = fopen(file_path, "r");
+            if (file != NULL)
+                       {
+                size_t n = 0;
+
+                           fseeko( file, 0, SEEK_END ); // seek to end
+                               length = ftello( file ); // determine offset of 
end
+                               rewind(file);  // restore position
+                                                       
+                               struct_size = sizeof(struct 
GNUNET_MQTT_ClientPublishMessage) + length + 1;
+                               
+                               old_publish_msg = GNUNET_malloc(struct_size);
+                               old_publish_msg->header.size = htons 
(struct_size);
+                               old_publish_msg->header.type = htons 
(GNUNET_MESSAGE_TYPE_MQTT_CLIENT_PUBLISH);
+                               old_publish_msg->request_id = ++uid_gen;
+                               
+                               aux = (char*)&old_publish_msg[1];
+                                while ((ch = fgetc(file)) != EOF && (ch != 
'\0') )
+                               {
+                                   aux[n] = (char) ch;                         
    
+                                       n++;
+                               }
+                               
+                               old_publish_msg->topic_len = n + 1;
+                               aux[n] = '\0';
+                               n++;
+                                while ((ch = fgetc(file)) != EOF )
+                               {
+                                   aux[n] = (char) ch;                         
    
+                                       n++;
+                               }
+                               
+                               aux[n] = '\0';
+                               
+                               topic = GNUNET_malloc 
(old_publish_msg->topic_len);
+                               strncpy(topic, (char *) (old_publish_msg + 1), 
old_publish_msg->topic_len);
+                               topic[old_publish_msg->topic_len - 1] = '\0';
+                               
+                               add_prefix (topic, &prefixed_topic);
+                               
+                               search_for_subscribers(prefixed_topic, 
old_publish_msg, file_path);
+                               
+                               GNUNET_free(topic);
+                               }                               
+                               }
+                       closedir (dir);
+       } else {
+           mkdir(current_dir_name, S_IRWXU);
+               GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "A new folder was created for persisting messages: %s\n", 
current_dir_name);
+       }
+       }else
+       {
+               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+              "Not able to get current directory!");
+       }
+}
+
+/**
+ * Process statistics requests.
+ *
+ * @param cls closure
+ * @param server the initialized server
+ * @param c configuration to use
+ */
+static void
+run (void *cls, struct GNUNET_SERVER_Handle *server,
+     const struct GNUNET_CONFIGURATION_Handle *c)
+{
+  static const struct GNUNET_SERVER_MessageHandler handlers[] = {
+    {handle_mqtt_publish, NULL, GNUNET_MESSAGE_TYPE_MQTT_CLIENT_PUBLISH, 0},
+    {handle_mqtt_subscribe, NULL, GNUNET_MESSAGE_TYPE_MQTT_CLIENT_SUBSCRIBE,
+      0},
+    {handle_mqtt_unsubscribe, NULL,
+      GNUNET_MESSAGE_TYPE_MQTT_CLIENT_UNSUBSCRIBE, 0},
+    {NULL, NULL, 0, 0}
+  };
+  static const struct GNUNET_MESH_MessageHandler mesh_handlers[] = {
+    {&handle_incoming_publish, GNUNET_MESSAGE_TYPE_MQTT_CLIENT_PUBLISH, 0},
+    {&handle_tunnel_message, GNUNET_MESSAGE_TYPE_MQTT_CLIENT_SUBSCRIBE, 0},
+    {NULL, 0, 0}
+  };
+  static const GNUNET_MESH_ApplicationType types[] = {
+    GNUNET_APPLICATION_TYPE_END
+  };
+
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_time (c, "mqtt",
+                                           "SUBSCRIPTION_REANNOUNCE_TIME",
+                                           &subscription_reannounce_time))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                _("%s service is lacking key configuration settings (%s). "
+                  "Exiting.\n"),
+                "mqtt", "subscription reannounce time");
+    GNUNET_SCHEDULER_shutdown ();
+    return;
+  }
+  
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_time (c, "mqtt",
+                                           "MESSAGE_DELETE_TIME",
+                                           &message_delete_time))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                _("%s service is lacking key configuration settings (%s). "
+                  "Exiting.\n"),
+                "mqtt", "message delete time");
+    GNUNET_SCHEDULER_shutdown ();
+    return;
+  }
+
+  subscriptions = GNUNET_CONTAINER_slist_create ();
+  search_contexts = GNUNET_CONTAINER_slist_create ();
+  remote_subscribers = GNUNET_CONTAINER_multihashmap_create (8, GNUNET_NO);
+
+  server_handle = server;
+  core_handle = GNUNET_CORE_connect (c, NULL, core_connected_callback, NULL,
+                                     NULL, NULL, GNUNET_NO, NULL, GNUNET_NO,
+                                     NULL);
+  dht_handle = GNUNET_DHT_connect (c, 32);
+  mesh_handle = GNUNET_MESH_connect (c, NULL, new_incoming_tunnel_callback,
+                                     incoming_tunnel_destroyed_callback,
+                                     mesh_handlers, types);
+
+  cfg = c;
+  GNUNET_SERVER_add_handlers (server, handlers);
+  GNUNET_SERVER_disconnect_notify (server, &handle_client_disconnect, NULL);
+
+  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
+                                NULL);
+  reannounce_task = GNUNET_SCHEDULER_add_delayed (subscription_reannounce_time,
+                                                  reannounce_subscriptions,
+                                                  NULL);
+
+  look_for_old_messages ();    
+}
+
+
+/**
+ * The main function for the MQTT service.
+ *
+ * @param argc number of arguments from the command line
+ * @param argv command line arguments
+ * @return 0 ok, 1 on error
+ */
+int
+main (int argc, char *const *argv)
+{
+  return (GNUNET_OK ==
+          GNUNET_SERVICE_run (argc, argv, "mqtt", GNUNET_SERVICE_OPTION_NONE,
+                              &run, NULL)) ? 0 : 1;
+}

Added: gnunet-mqtt/src/mqtt/mqtt.conf.in
===================================================================
--- gnunet-mqtt/src/mqtt/mqtt.conf.in                           (rev 0)
+++ gnunet-mqtt/src/mqtt/mqtt.conf.in   2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,8 @@
+[mqtt]
+BINARY = gnunet-service-mqtt
+UNIXPATH = /tmp/gnunet-service-mqtt.sock
+HOME = $SERVICEHOME
+# PORT = 2106
address@hidden@ PORT = 35345
+SUBSCRIPTION_REANNOUNCE_TIME = 5 m
+MESSAGE_DELETE_TIME = 5 s

Added: gnunet-mqtt/src/mqtt/mqtt.h
===================================================================
--- gnunet-mqtt/src/mqtt/mqtt.h                         (rev 0)
+++ gnunet-mqtt/src/mqtt/mqtt.h 2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,122 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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 3, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/mqtt.h
+ * @brief IPC messages exchanged between MQTT library and MQTT service
+ * @author Ramona Popa
+ * @author Artur Grunau
+ */
+
+#ifndef MQTT_H
+#define MQTT_H
+
+
+GNUNET_NETWORK_STRUCT_BEGIN
+
+/**
+ * MQTT PUBLISH message sent from clients to service. Indicates that
+ * a PUBLISH request should be issued.
+ */
+struct GNUNET_MQTT_ClientPublishMessage
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_MQTT_CLIENT_PUBLISH
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * Unique ID to match a future response to this request.
+   * Picked by the client.
+   */
+  uint64_t request_id GNUNET_PACKED;
+
+  /**
+   * Length of the sent message's topic, including its terminating NUL.
+   */
+  uint8_t topic_len;
+
+  /* Topic (NUL-terminated string) and data copied to end of this message */
+
+};
+
+/**
+ * MQTT SUBSCRIBE message sent from clients to service. Indicates that
+ * a SUBSCRIBE request should be issued.
+ */
+struct GNUNET_MQTT_ClientSubscribeMessage
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_MQTT_CLIENT_SUBSCRIBE
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * Unique ID to match a future response to this request.
+   * Picked by the client.
+   */
+  uint64_t request_id GNUNET_PACKED;
+
+  /**
+   * Length of the topic, including its terminating NUL.
+   */
+  uint8_t topic_len;
+
+  /* Topic (NUL-terminated string) and data copied to end of this message */
+
+};
+
+/**
+ * MQTT UNSUBSCRIBE message sent from clients to service. Indicates that
+ * an active subscription should be cancelled.
+ */
+struct GNUNET_MQTT_ClientUnsubscribeMessage
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_MQTT_CLIENT_SUBSCRIBE
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * ID of the subscription to be cancelled.
+   */
+  uint64_t request_id GNUNET_PACKED;
+};
+
+/**
+ * MQTT UNSUBSCRIBE_ACK message sent from clients to service. Indicates
+ * that an active subscription has been cancelled.
+ */
+struct GNUNET_MQTT_ClientUnsubscribeAckMessage
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_MQTT_CLIENT_SUBSCRIBE_ACK
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * ID of the subscription that has been cancelled.
+   */
+  uint64_t request_id GNUNET_PACKED;
+};
+
+GNUNET_NETWORK_STRUCT_END
+
+#endif

Added: gnunet-mqtt/src/mqtt/mqtt_api.c
===================================================================
--- gnunet-mqtt/src/mqtt/mqtt_api.c                             (rev 0)
+++ gnunet-mqtt/src/mqtt/mqtt_api.c     2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,1015 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/mqtt_api.c
+ * @brief API for MQTT
+ * @author Ramona Popa
+ * @author Artur Grunau
+ */
+#include <gnunet/platform.h>
+#include <gnunet/gnunet_util_lib.h>
+#include "gnunet_mqtt_service.h"
+#include "gnunet_protocols_mqtt.h"
+#include "mqtt.h"
+#include "regex_utils.h"
+
+
+#define LOG(kind,...) GNUNET_log_from (kind, "mqtt-api",__VA_ARGS__)
+
+
+/**
+ * Connection to the MQTT service.
+ */
+struct GNUNET_MQTT_Handle
+{
+
+  /**
+   * Configuration to use.
+   */
+  const struct GNUNET_CONFIGURATION_Handle *cfg;
+
+  /**
+   * Currently pending transmission request (or NULL).
+   */
+  struct GNUNET_CLIENT_TransmitHandle *th;
+
+  /**
+   * Socket (if available).
+   */
+  struct GNUNET_CLIENT_Connection *client;
+
+  /**
+   * Generator for unique ids.
+   */
+  uint64_t uid_gen;
+
+  /**
+   * Head of linked list of messages we would like to transmit.
+   */
+  struct PendingMessage *pending_head;
+
+  /**
+   * Tail of linked list of messages we would like to transmit.
+   */
+  struct PendingMessage *pending_tail;
+
+  /**
+   * Did we start our receive loop yet?
+   */
+  int in_receive;
+
+  /**
+   * How quickly should we retry? Used for exponential back-off on
+   * connect-errors.
+   */
+  struct GNUNET_TIME_Relative retry_time;
+
+  /**
+   * Task for trying to reconnect.
+   */
+  GNUNET_SCHEDULER_TaskIdentifier reconnect_task;
+
+  /**
+   * Head of active SUBSCRIBE requests.
+   */
+  struct GNUNET_MQTT_SubscribeHandle *subscribe_head;
+
+  /**
+   * Tail of active SUBSCRIBE requests.
+   */
+  struct GNUNET_MQTT_SubscribeHandle *subscribe_tail;
+};
+
+
+/**
+ * Entry in our list of messages to be (re-)transmitted.
+ */
+struct PendingMessage
+{
+  /**
+   * This is a doubly-linked list.
+   */
+  struct PendingMessage *prev;
+
+  /**
+   * This is a doubly-linked list.
+   */
+  struct PendingMessage *next;
+
+  /**
+   * Message that is pending, allocated at the end of this struct.
+   */
+  const struct GNUNET_MessageHeader *msg;
+
+  /**
+   * Handle to the MQTT API context.
+   */
+  struct GNUNET_MQTT_Handle *handle;
+
+  /**
+   * Timeout task for this operation.
+   */
+  GNUNET_SCHEDULER_TaskIdentifier timeout_task;
+
+  /**
+   * Continuation to call when the request has been
+   * transmitted (for the first time) to the service; can be NULL.
+   */
+  GNUNET_SCHEDULER_Task cont;
+
+  /**
+   * Closure for 'cont'.
+   */
+  void *cont_cls;
+
+  /**
+   * Unique ID for this request
+   */
+  uint64_t request_id;
+
+  /**
+   * GNUNET_YES if this message is in our pending queue right now.
+   */
+  int in_pending_queue;
+
+  /**
+   * GNUNET_YES if this message will be ACKed or otherwise responded to.
+   */
+  int wait_for_response;
+};
+
+
+/**
+ * Handle to a PUBLISH request.
+ */
+struct GNUNET_MQTT_PublishHandle
+{
+  /**
+   * Continuation to call when done.
+   */
+  GNUNET_MQTT_PublishContinuation cont;
+
+  /**
+   * Closure for 'cont'.
+   */
+  void *cont_cls;
+
+  /**
+   * Pending message associated with this PUBLISH operation, NULL after
+   * the message has been transmitted to the service.
+   */
+  struct PendingMessage *pending;
+
+  /**
+   * Main handle to this MQTT API
+   */
+  struct GNUNET_MQTT_Handle *mqtt_handle;
+
+  /**
+   * Request ID for the PUBLISH operation.
+   */
+  uint64_t request_id;
+};
+
+
+/**
+ * Handle to a SUBSCRIBE request.
+ */
+struct GNUNET_MQTT_SubscribeHandle
+{
+  /**
+   * Continuation to call when done.
+   */
+  GNUNET_MQTT_SubscribeContinuation cont;
+
+  /**
+   * Closure for 'cont'.
+   */
+  void *cont_cls;
+
+  /**
+   * Callback to call when messages for this subscription are received.
+   */
+  GNUNET_MQTT_SubscribeResultCallback cb;
+
+  /**
+   * Closure for 'cb'.
+   */
+  void *cb_cls;
+
+  /**
+   * Pending message associated with this SUBSCRIBE operation, NULL
+   * after the message has been transmitted to the service.
+   */
+  struct PendingMessage *pending;
+
+  /**
+   * Flag indicating if the subscription is being cancelled (GNUNET_YES)
+   * or not (GNUNET_NO).
+   */
+  int unsubscribing;
+
+  /**
+   * Main handle to this MQTT API
+   */
+  struct GNUNET_MQTT_Handle *mqtt_handle;
+
+  /**
+   * Request ID for the SUBSCRIBE operation.
+   */
+  uint64_t request_id;
+
+  /**
+   * Kept in a DLL.
+   */
+  struct GNUNET_MQTT_SubscribeHandle *next;
+
+  /**
+   * Kept in a DLL.
+   */
+  struct GNUNET_MQTT_SubscribeHandle *prev;
+};
+
+
+/**
+ * Try to (re)connect to the MQTT service.
+ *
+ * @param handle MQTT handle to reconnect
+ * @return GNUNET_YES on success, GNUNET_NO on failure.
+ */
+static int
+try_connect (struct GNUNET_MQTT_Handle *handle)
+{
+  if (NULL != handle->client)
+    return GNUNET_OK;
+
+  handle->in_receive = GNUNET_NO;
+  handle->client = GNUNET_CLIENT_connect ("mqtt", handle->cfg);
+
+  if (NULL == handle->client)
+  {
+    LOG (GNUNET_ERROR_TYPE_WARNING,
+         _("Failed to connect to the MQTT service!\n"));
+    return GNUNET_NO;
+  }
+
+  return GNUNET_YES;
+}
+
+
+static void
+process_pending_messages (struct GNUNET_MQTT_Handle *handle);
+
+
+/**
+ * Try reconnecting to the MQTT service.
+ *
+ * @param cls GNUNET_MQTT_Handle
+ * @param tc scheduler context
+ */
+static void
+try_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  struct GNUNET_MQTT_Handle *handle = cls;
+
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "Reconnecting with MQTT %p\n", handle);
+  handle->retry_time = GNUNET_TIME_STD_BACKOFF (handle->retry_time);
+  handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
+
+  if (GNUNET_YES != try_connect (handle))
+  {
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "MQTT reconnect failed\n");
+    return;
+  }
+
+  process_pending_messages (handle);
+}
+
+
+/**
+ * Disconnect and try reconnecting to the MQTT service.
+ *
+ * @param handle handle to MQTT to (possibly) disconnect and reconnect
+ */
+static void
+do_disconnect (struct GNUNET_MQTT_Handle *handle)
+{
+  if (NULL == handle->client)
+    return;
+  GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == handle->reconnect_task);
+  if (NULL != handle->th)
+    GNUNET_CLIENT_notify_transmit_ready_cancel (handle->th);
+  handle->th = NULL;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Disconnecting from MQTT service, will try to reconnect in %s\n",
+              GNUNET_STRINGS_relative_time_to_string (handle->retry_time,
+              GNUNET_YES));
+  GNUNET_CLIENT_disconnect (handle->client);
+  handle->client = NULL;
+
+  handle->reconnect_task =
+    GNUNET_SCHEDULER_add_delayed (handle->retry_time, &try_reconnect, handle);
+}
+
+
+/**
+ * Initialize the connection with the MQTT service.
+ *
+ * @param cfg configuration to use
+ * @return NULL on error
+ */
+struct GNUNET_MQTT_Handle *
+GNUNET_MQTT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+  struct GNUNET_MQTT_Handle *handle;
+
+  handle = GNUNET_malloc (sizeof (struct GNUNET_MQTT_Handle));
+  handle->cfg = cfg;
+  handle->uid_gen = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
+                                              UINT64_MAX);
+
+  if (GNUNET_NO == try_connect (handle))
+  {
+    GNUNET_MQTT_disconnect (handle);
+    return NULL;
+  }
+  return handle;
+}
+
+
+/**
+ * Shut down connection with the MQTT service.
+ *
+ * @param handle handle of the MQTT connection to stop
+ */
+void
+GNUNET_MQTT_disconnect (struct GNUNET_MQTT_Handle *handle)
+{
+  struct PendingMessage *pm;
+
+  GNUNET_assert (NULL != handle);
+
+  if (NULL != handle->th)
+  {
+    GNUNET_CLIENT_notify_transmit_ready_cancel (handle->th);
+    handle->th = NULL;
+  }
+
+  while (NULL != (pm = handle->pending_head))
+  {
+    GNUNET_assert (GNUNET_YES == pm->in_pending_queue);
+    GNUNET_CONTAINER_DLL_remove (handle->pending_head, handle->pending_tail,
+                                 pm);
+    pm->in_pending_queue = GNUNET_NO;
+
+    if (NULL != pm->cont)
+      pm->cont (pm->cont_cls, NULL);
+
+    GNUNET_free (pm);
+  }
+
+  if (NULL != handle->client)
+  {
+    GNUNET_CLIENT_disconnect (handle->client);
+    handle->client = NULL;
+  }
+
+  GNUNET_free (handle);
+}
+
+
+/**
+ * Timeout for the transmission of a PUBLISH request. Clean it up.
+ *
+ * @param cls the 'struct PendingMessage'
+ * @param tc scheduler context
+ */
+static void
+publish_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  struct GNUNET_MQTT_PublishHandle *ph = cls;
+  struct GNUNET_MQTT_Handle *handle = ph->mqtt_handle;
+
+  if (NULL != ph->pending)
+  {
+    GNUNET_CONTAINER_DLL_remove (handle->pending_head, handle->pending_tail,
+                                 ph->pending);
+    ph->pending->in_pending_queue = GNUNET_NO;
+    ph->pending->timeout_task = GNUNET_SCHEDULER_NO_TASK;
+    GNUNET_free (ph->pending);
+  }
+
+  if (NULL != ph->cont)
+    ph->cont (ph->cont_cls, GNUNET_NO);
+
+  GNUNET_free (ph);
+}
+
+
+/**
+ * Timeout for the transmission of a SUBSCRIBE request. Clean it up.
+ *
+ * @param cls the 'struct PendingMessage'
+ * @param tc scheduler context
+ */
+static void
+subscribe_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  struct GNUNET_MQTT_SubscribeHandle *sh = cls;
+  struct GNUNET_MQTT_Handle *handle = sh->mqtt_handle;
+
+  if (NULL != sh->pending)
+  {
+    GNUNET_CONTAINER_DLL_remove (handle->pending_head, handle->pending_tail,
+                                 sh->pending);
+    sh->pending->in_pending_queue = GNUNET_NO;
+    sh->pending->timeout_task = GNUNET_SCHEDULER_NO_TASK;
+    GNUNET_free (sh->pending);
+  }
+
+  if (NULL != sh->cont)
+    sh->cont (sh->cont_cls, GNUNET_NO);
+
+  GNUNET_free (sh);
+}
+
+
+/**
+ * Process an incoming PUBLISH message from the MQTT service.
+ *
+ * @param handle the MQTT handle
+ * @param msg the incoming PUBLISH message from the service
+ *
+ * @return GNUNET_OK if everything went fine,
+ *         GNUNET_SYSERR if the message is malformed
+ */
+static int
+process_incoming_publish_message (struct GNUNET_MQTT_Handle *handle,
+                                  const struct GNUNET_MQTT_ClientPublishMessage
+                                    *msg)
+{
+  struct GNUNET_MQTT_SubscribeHandle *sh;
+  char *topic, *message;
+  size_t message_len;
+
+  for (sh = handle->subscribe_head; NULL != sh; sh = sh->next)
+    if (sh->request_id == msg->request_id)
+      break;
+
+  if (NULL == sh) {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Received PUBLISH message matching no subscriptions\n");
+    return GNUNET_SYSERR;
+  }
+
+  /* Extract topic */
+  topic = GNUNET_malloc (msg->topic_len);
+  strncpy(topic, (char *) (msg + 1), msg->topic_len);
+  topic[msg->topic_len - 1] = '\0';
+
+  /* Extract message */
+  message_len = ntohs (msg->header.size) -
+    sizeof (struct GNUNET_MQTT_ClientPublishMessage) - msg->topic_len;
+  message = GNUNET_malloc (message_len);
+  strncpy(message, ((char *) (msg + 1)) + msg->topic_len,
+          message_len);
+  message[message_len - 1] = '\0';
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Incoming PUBLISH message received (client): %s -> %s\n", topic,
+              message);
+
+  sh->cb (sh->cb_cls, msg->topic_len, topic, message_len, message);
+
+  return GNUNET_OK;
+}
+
+
+/**
+ * Process an UNSUBSCRIBE_ACK message from the MQTT service.
+ *
+ * @param handle the MQTT handle
+ * @param msg the UNSUBSCRIBE_ACK message from the service
+ *
+ * @return GNUNET_OK if everything went fine,
+ *         GNUNET_SYSERR if the message is malformed
+ */
+static int
+process_unsubscribe_ack (struct GNUNET_MQTT_Handle *handle,
+                         const struct GNUNET_MQTT_ClientUnsubscribeAckMessage 
*msg)
+{
+  struct GNUNET_MQTT_SubscribeHandle *sh;
+
+  for (sh = handle->subscribe_head; NULL != sh; sh = sh->next)
+    if (sh->request_id == msg->request_id)
+      break;
+
+  if (NULL == sh) {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Received UNSUBSCRIBE_ACK matching no subscriptions\n");
+    return GNUNET_SYSERR;
+  }
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Subscription with ID %lu cancelled\n",
+              sh->request_id);
+
+  GNUNET_CONTAINER_DLL_remove (handle->subscribe_head, handle->subscribe_tail,
+                               sh);
+  GNUNET_free (sh);
+
+  return GNUNET_OK;
+}
+
+
+/**
+ * Handler for messages received from the MQTT service
+ *
+ * This function acts as a demultiplexer that handles numerous message
+ * types.
+ *
+ * @param cls the 'struct GNUNET_MQTT_Handle'
+ * @param msg the incoming message
+ */
+static void
+service_message_handler (void *cls, const struct GNUNET_MessageHeader *msg)
+{
+  struct GNUNET_MQTT_Handle *handle = cls;
+  uint16_t msize;
+  int ret;
+
+  if (NULL == msg)
+  {
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "Error receiving data from MQTT service, reconnecting\n");
+    do_disconnect (handle);
+    return;
+  }
+  GNUNET_CLIENT_receive (handle->client, &service_message_handler, handle,
+                         GNUNET_TIME_UNIT_FOREVER_REL);
+  ret = GNUNET_SYSERR;
+  msize = ntohs (msg->size);
+  switch (ntohs (msg->type))
+  {
+  case GNUNET_MESSAGE_TYPE_MQTT_CLIENT_PUBLISH:
+    if (msize < sizeof (struct GNUNET_MQTT_ClientPublishMessage))
+    {
+      GNUNET_break (0);
+      break;
+    }
+    ret = process_incoming_publish_message(
+      handle, (const struct GNUNET_MQTT_ClientPublishMessage *) msg);
+    break;
+  case GNUNET_MESSAGE_TYPE_MQTT_CLIENT_UNSUBSCRIBE_ACK:
+    if (msize < sizeof (struct GNUNET_MQTT_ClientUnsubscribeAckMessage))
+    {
+      GNUNET_break (0);
+      break;
+    }
+    ret = process_unsubscribe_ack(
+      handle, (const struct GNUNET_MQTT_ClientUnsubscribeAckMessage *) msg);
+    break;
+  default:
+    GNUNET_break(0);
+    LOG (GNUNET_ERROR_TYPE_WARNING,
+         "Unknown MQTT message type: %hu (%hu) size: %hu\n",
+         ntohs (msg->type), msg->type, msize);
+    break;
+  }
+  if (GNUNET_OK != ret)
+  {
+    GNUNET_break (0);
+    do_disconnect (handle);
+    return;
+  }
+}
+
+
+/**
+ * Transmit the next pending message, called by notify_transmit_ready
+ *
+ * @param cls the MQTT handle
+ * @param size number of bytes available in 'buf' for transmission
+ * @param buf where to copy messages for the service
+ * @return number of bytes written to 'buf'
+ */
+static size_t
+transmit_pending (void *cls, size_t size, void *buf)
+{
+  struct GNUNET_MQTT_Handle *handle = cls;
+  struct PendingMessage *head;
+  size_t tsize;
+
+  handle->th = NULL;
+
+  if (NULL == buf)
+  {
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "Transmission to the MQTT service failed; reconnecting\n");
+    do_disconnect (handle);
+    return 0;
+  }
+
+  if (NULL == (head = handle->pending_head))
+    return 0;
+
+  tsize = ntohs (head->msg->size);
+  if (size < tsize)
+  {
+    process_pending_messages (handle);
+    return 0;
+  }
+
+  memcpy (buf, head->msg, tsize);
+  GNUNET_CONTAINER_DLL_remove (handle->pending_head, handle->pending_tail,
+                               head);
+  head->in_pending_queue = GNUNET_NO;
+
+  if (NULL != head->cont)
+  {
+    head->cont (head->cont_cls, NULL);
+    head->cont = NULL;
+    head->cont_cls = NULL;
+  }
+
+  if (head->timeout_task != GNUNET_SCHEDULER_NO_TASK)
+  {
+    GNUNET_SCHEDULER_cancel (head->timeout_task);
+    head->timeout_task = GNUNET_SCHEDULER_NO_TASK;
+  }
+
+  process_pending_messages (handle);
+
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "Forwarded request of %zu bytes to MQTT service\n", tsize);
+
+  if (GNUNET_YES == head->wait_for_response && GNUNET_NO == handle->in_receive)
+  {
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "Starting to process replies from MQTT\n");
+    handle->in_receive = GNUNET_YES;
+    GNUNET_CLIENT_receive (handle->client, &service_message_handler, handle,
+                           GNUNET_TIME_UNIT_FOREVER_REL);
+  }
+
+  GNUNET_free (head);
+
+  return tsize;
+}
+
+
+/**
+ * Try to send messages from list of messages to send
+ *
+ * @param handle handle to MQTT
+ */
+static void
+process_pending_messages (struct GNUNET_MQTT_Handle *handle)
+{
+  struct PendingMessage *head;
+
+  if (NULL == handle->client)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "process_pending_messages called, but client is NULL, 
reconnecting\n");
+    do_disconnect (handle);
+    return;
+  }
+
+  if (NULL != handle->th)
+    return;
+
+  if (NULL == (head = handle->pending_head))
+    return;
+
+  handle->th =
+      GNUNET_CLIENT_notify_transmit_ready (handle->client,
+                                           ntohs (head->msg->size),
+                                           GNUNET_TIME_UNIT_FOREVER_REL,
+                                           GNUNET_YES, &transmit_pending,
+                                           handle);
+  if (NULL != handle->th)
+    return;
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "notify_transmit_ready returned NULL, reconnecting\n");
+  do_disconnect (handle);
+}
+
+
+/**
+ * Function called whenever a SUBSCRIBE message leaves the queue.
+ *
+ * It invokes the user-provided callback to inform them that the message
+ * was sent, and sets the message pointer in the SUBSCRIBE handle to
+ * NULL.
+ *
+ * @param cls a struct GNUNET_MQTT_SubscribeHandle
+ * @param tc unused
+ */
+static void
+mark_subscribe_message_gone (void *cls,
+                             const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  struct GNUNET_MQTT_SubscribeHandle *sh = cls;
+
+  if (NULL != sh->cont)
+  {
+    sh->cont (sh->cont_cls, GNUNET_OK);
+    sh->cont = NULL;
+    sh->cont_cls = NULL;
+  }
+
+  sh->pending = NULL;
+}
+
+
+/**
+ * Function called whenever an UNSUBSCRIBE message leaves the queue.
+ *
+ * It sets the message pointer in the SUBSCRIBE handle to NULL.
+ *
+ * @param cls a struct GNUNET_MQTT_SubscribeHandle
+ * @param tc unused
+ */
+static void
+mark_unsubscribe_message_gone (void *cls,
+                               const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  struct GNUNET_MQTT_SubscribeHandle *sh = cls;
+
+  sh->pending = NULL;
+}
+
+
+/**
+ * Perform a PUBLISH operation storing data in the MQTT.
+ *
+ * @param handle handle to MQTT service
+ * @param topic_len length of the topic the message should be published
+ *                  on
+ * @param topic the topic (as a NUL-terminated string) the message
+ *              should be published on
+ * @param size number of bytes in data; must be less than 64k
+ * @param data he payload of the message
+ * @param timeout how long to wait for transmission of this request
+ * @param cont continuation to call when done (transmitting request to
+ *             service); you must not call GNUNET_MQTT_disconnect in
+ *             this continuation
+ * @param cont_cls closure for cont
+ * @return handle to cancel the PUBLISH operation, or NULL on error
+ *         (message size too big)
+ */
+struct GNUNET_MQTT_PublishHandle *
+GNUNET_MQTT_publish (struct GNUNET_MQTT_Handle *handle, uint8_t topic_len,
+                     const char *topic, size_t size, const void *data,
+                     struct GNUNET_TIME_Relative timeout,
+                     GNUNET_MQTT_PublishContinuation cont, void *cont_cls)
+{
+  struct GNUNET_MQTT_ClientPublishMessage *publish_msg;
+  size_t msize;
+  struct PendingMessage *pending;
+  struct GNUNET_MQTT_PublishHandle *ph;
+
+  msize = sizeof (struct GNUNET_MQTT_ClientPublishMessage) + topic_len + size;
+
+  if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
+      (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE))
+  {
+    GNUNET_break (0);
+    return NULL;
+  }
+
+   if (0 == validate_publish_topic(topic))
+  {
+       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+              "Unvalid publish topic!\n");
+    return NULL;    
+  
+  }
+  ph = GNUNET_malloc (sizeof (struct GNUNET_MQTT_PublishHandle));
+  ph->mqtt_handle = handle;
+  ph->cont = cont;
+  ph->cont_cls = cont_cls;
+  ph->request_id = ++handle->uid_gen;
+
+  pending = GNUNET_malloc (sizeof (struct PendingMessage) + msize);
+  ph->pending = pending;
+  publish_msg = (struct GNUNET_MQTT_ClientPublishMessage *) &pending[1];
+
+  pending->msg = &publish_msg->header;
+  pending->handle = handle;
+  pending->timeout_task = GNUNET_SCHEDULER_add_delayed (timeout,
+                                                        &publish_timeout,
+                                                        ph);
+
+  publish_msg->header.size = htons (msize);
+  publish_msg->header.type = htons (GNUNET_MESSAGE_TYPE_MQTT_CLIENT_PUBLISH);
+  publish_msg->request_id = ph->request_id;
+  publish_msg->topic_len = topic_len;
+
+  memcpy (&publish_msg[1], topic, topic_len);
+  memcpy (((char *) (publish_msg + 1)) + topic_len, data, size);
+
+  GNUNET_CONTAINER_DLL_insert (handle->pending_head, handle->pending_tail,
+                               pending);
+  pending->in_pending_queue = GNUNET_YES;
+  pending->wait_for_response = GNUNET_NO;
+  process_pending_messages (handle);
+
+  return ph;
+}
+
+
+/**
+ * Cancel an MQTT PUBLISH operation.
+ *
+ * Note that the PUBLISH request may still go out over the network (we
+ * can't stop that). However, if the PUBLISH has not yet been sent to
+ * the service, cancelling it will stop this from happening (but there
+ * is no way for the user of this API to tell if that is the case). The
+ * only use for this API is to prevent a later call to 'cont' from
+ * "GNUNET_MQTT_publish" (i.e. because the system is shutting down).
+ *
+ * @param ph PUBLISH operation to cancel ('cont' will no longer be
+ *           called)
+ */
+void
+GNUNET_MQTT_publish_cancel (struct GNUNET_MQTT_PublishHandle *ph)
+{
+  struct GNUNET_MQTT_Handle *handle = ph->mqtt_handle;
+
+  if (NULL != ph->pending)
+  {
+      if (ph->pending->timeout_task != GNUNET_SCHEDULER_NO_TASK)
+      {
+        GNUNET_SCHEDULER_cancel (ph->pending->timeout_task);
+        ph->pending->timeout_task = GNUNET_SCHEDULER_NO_TASK;
+      }
+
+      GNUNET_CONTAINER_DLL_remove (handle->pending_head, handle->pending_tail,
+                                   ph->pending);
+      GNUNET_free (ph->pending);
+      ph->pending = NULL;
+  }
+}
+
+
+/**
+ * Perform a SUBSCRIBE operation.
+ *
+ * @param handle handle to MQTT service
+ * @param topic_len length of the topic for which the registartion is
+          done
+ * @param topic the topic (as a NUL-terminated string) - target of
+          the subscription
+ * @param timeout how long to wait for transmission of this request
+ * @param cont continuation to call when done (transmitting request to
+ *             service); you must not call GNUNET_MQTT_disconnect in
+ *             this continuation
+ * @param cont_cls closure for cont
+ * @return handle to cancel the SUBSCRIBE operation, or NULL on error
+ */
+struct GNUNET_MQTT_SubscribeHandle *
+GNUNET_MQTT_subscribe (struct GNUNET_MQTT_Handle *handle, uint8_t topic_len,
+                       const char *topic, struct GNUNET_TIME_Relative timeout,
+                       GNUNET_MQTT_SubscribeContinuation cont, void *cont_cls,
+                       GNUNET_MQTT_SubscribeResultCallback cb, void *cb_cls)
+{
+  struct GNUNET_MQTT_ClientSubscribeMessage *subscribe_msg;
+  size_t tsize;
+  struct PendingMessage *pending;
+  struct GNUNET_MQTT_SubscribeHandle *sh;
+
+  GNUNET_assert (NULL != cb);
+  tsize = sizeof (struct GNUNET_MQTT_ClientSubscribeMessage) + topic_len;
+  
+  if (0 == validate_subscribe_topic(topic))
+  {
+       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+              "Unvalid subscribe topic\n!");
+    return NULL;    
+  
+  }
+
+  sh = GNUNET_malloc (sizeof (struct GNUNET_MQTT_SubscribeHandle));
+  sh->mqtt_handle = handle;
+  sh->cont = cont;
+  sh->cont_cls = cont_cls;
+  sh->cb = cb;
+  sh->cb_cls = cb_cls;
+  sh->request_id = ++handle->uid_gen;
+
+  pending = GNUNET_malloc (sizeof (struct PendingMessage) + tsize);
+  sh->pending = pending;
+  sh->unsubscribing = GNUNET_NO;
+  subscribe_msg = (struct GNUNET_MQTT_ClientSubscribeMessage *) &pending[1];
+
+  pending->msg = &subscribe_msg->header;
+  pending->handle = handle;
+  pending->cont = mark_subscribe_message_gone;
+  pending->cont_cls = sh;
+  pending->timeout_task = GNUNET_SCHEDULER_add_delayed (timeout,
+                                                        &subscribe_timeout,
+                                                        sh);
+
+  subscribe_msg->header.size = htons (tsize);
+  subscribe_msg->header.type = htons 
(GNUNET_MESSAGE_TYPE_MQTT_CLIENT_SUBSCRIBE);
+  subscribe_msg->request_id = sh->request_id;
+  subscribe_msg->topic_len = topic_len;
+
+  memcpy (&subscribe_msg[1], topic, topic_len);
+ 
+  GNUNET_CONTAINER_DLL_insert (handle->pending_head, handle->pending_tail,
+                               pending);
+  pending->in_pending_queue = GNUNET_YES;
+  pending->wait_for_response = GNUNET_YES;
+  process_pending_messages (handle);
+
+  GNUNET_CONTAINER_DLL_insert_tail (handle->subscribe_head,
+                                    handle->subscribe_tail, sh);
+
+  return sh;
+}
+
+
+/**
+ * Cancel the given active MQTT subscription.
+ *
+ * All resources associated with the subscription will be freed by this
+ * function. On return `handle` will no longer be valid, and mustn't be
+ * used again.
+ *
+ * @param handle handle to an MQTT subscription
+ */
+void
+GNUNET_MQTT_unsubscribe (struct GNUNET_MQTT_SubscribeHandle *sh)
+{
+  struct GNUNET_MQTT_Handle *handle = sh->mqtt_handle;
+
+  if (NULL != sh->pending)
+  {
+    if (GNUNET_YES == sh->unsubscribing)
+    {
+      return;
+    }
+    else
+    {
+      if (sh->pending->timeout_task != GNUNET_SCHEDULER_NO_TASK)
+      {
+        GNUNET_SCHEDULER_cancel (sh->pending->timeout_task);
+        sh->pending->timeout_task = GNUNET_SCHEDULER_NO_TASK;
+      }
+
+      GNUNET_CONTAINER_DLL_remove (handle->pending_head, handle->pending_tail,
+                                   sh->pending);
+      GNUNET_free (sh->pending);
+      sh->pending = NULL;
+    }
+  }
+  else if (GNUNET_NO == sh->unsubscribing)
+  {
+    struct PendingMessage *pending;
+    struct GNUNET_MQTT_ClientUnsubscribeMessage *unsubscribe_msg;
+
+    pending = GNUNET_malloc (sizeof (struct PendingMessage) +
+      sizeof (struct GNUNET_MQTT_ClientUnsubscribeMessage));
+    sh->pending = pending;
+    sh->unsubscribing = GNUNET_YES;
+    unsubscribe_msg = (struct GNUNET_MQTT_ClientUnsubscribeMessage *)
+      (pending + 1);
+
+    pending->msg = &unsubscribe_msg->header;
+    pending->handle = handle;
+    pending->cont = mark_unsubscribe_message_gone;
+    pending->cont_cls = sh;
+
+    unsubscribe_msg->header.size =
+      sizeof (struct GNUNET_MQTT_ClientUnsubscribeMessage);
+    unsubscribe_msg->header.type =
+      htons (GNUNET_MESSAGE_TYPE_MQTT_CLIENT_UNSUBSCRIBE);
+    unsubscribe_msg->request_id = sh->request_id;
+
+    GNUNET_CONTAINER_DLL_insert (handle->pending_head, handle->pending_tail,
+                                 pending);
+    pending->in_pending_queue = GNUNET_YES;
+    pending->wait_for_response = GNUNET_YES;
+    process_pending_messages (handle);
+  }
+}

Added: gnunet-mqtt/src/mqtt/regex_utils.c
===================================================================
--- gnunet-mqtt/src/mqtt/regex_utils.c                          (rev 0)
+++ gnunet-mqtt/src/mqtt/regex_utils.c  2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,247 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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 3, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/regex_utils.c
+ * @brief regex utils functions implementation
+ * @author Ramona Popa
+ */
+
+#include "regex_utils.h"
+#include <gnunet/platform.h>
+#include <gnunet/gnunet_regex_lib.h>
+
+/**
+ * String constant for prefixing the topic
+ */
+ 
+ static const char *prefix = "GNUNET-MQTT 0001 00000"; 
+/**
+ * String constant for replacing '+' wildcard in the subscribed topics.
+ */
+
+static const char *plus_regex = 
"(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9)+";
+//static const char *plus_regex = "a+";
+
+/**
+ * String constant for replacing '#' wildcard in the subscribed topics.
+ */
+static const char *hash_regex = 
"(/(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9)+)*";
+//static const char *hash_regex = "(a|b)+";
+
+/**
+ * Validates subscribe topic syntax.
+ *
+ * @param topic topic of subscription as provided by the subscriber
+ * @return 1 if the topic is syntactically valid and 0 if not
+  * 
+ */
+int
+validate_subscribe_topic (const char *topic)
+{
+  char *general_expression = 
"(/|#|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9)+";
+  char *p;
+  int result = GNUNET_YES;
+ 
+  struct GNUNET_REGEX_Automaton *automaton;
+
+  automaton = GNUNET_REGEX_construct_dfa(general_expression, 
strlen(general_expression), 1);
+
+  if (0 != GNUNET_REGEX_eval(automaton, topic))
+  {
+    if( (p = strchr(topic, '+')) == NULL)
+    {
+      return GNUNET_NO;
+    }
+  }
+  if (strstr(topic, "//") != NULL)
+    {
+      return GNUNET_NO;
+    }
+
+    p = strchr(topic, '+');
+    if (p != NULL)
+    {  
+      p = p-1;
+      if (*p != '/')
+      {
+       result = GNUNET_NO;
+      }
+     }
+    
+    p = strchr(topic, '#');
+    if (p != NULL)
+    {  
+      p = p-1;
+      if (*p != '/')
+      {
+       result = GNUNET_NO;
+      }
+      p = p+2;
+      if (*p != '\0')
+      {
+       result = GNUNET_NO;
+      }
+    }
+      
+    
+    return result;
+}
+
+/**
+ * Validates publish topic syntax.
+ *
+ * @param topic topic of the published as provided by the publisher
+ * @return 1 if the topic is syntactically valid and 0 if not
+  * 
+ */
+int
+validate_publish_topic (const char *topic)
+{
+  char *general_expression = 
"(/|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9)+";
+
+  int result = GNUNET_YES;
+ 
+  struct GNUNET_REGEX_Automaton *automaton;
+
+  automaton = GNUNET_REGEX_construct_dfa(general_expression, 
strlen(general_expression), 1);
+
+  if (0 != GNUNET_REGEX_eval(automaton, topic))
+  {
+    return GNUNET_NO;
+  }
+  if (strstr(topic, "//") != NULL)
+    {
+      return GNUNET_NO;
+    }    
+    
+    return result;
+}
+
+
+/**
+ * Adds the prefix to the toopic (App ID + Version + Padding)
+ *
+ * @param topic topic of subscription as provided by the subscriber
+ * @param regex_topic client identification of the client
+ * 
+ */
+void
+add_prefix (const char *topic, char **prefixed_topic)
+{
+       int n, i;
+       *prefixed_topic = GNUNET_malloc(strlen(prefix) + strlen(topic)+1);
+       n = 0;
+        
+       for (i = 0; prefix[i] != '\0'; i++) 
+  {
+    (*prefixed_topic)[i] = prefix[i];
+       }
+       n = i;
+       
+       for (i = 0; topic[i] != '\0'; i++) 
+  {
+    (*prefixed_topic)[n] = topic[i];
+       n++;
+       }
+       
+        (*prefixed_topic)[n] = '\0';
+}
+       
+
+/**
+ * Transform topics to regex expression.
+ *
+ * @param topic topic of subscription as provided by the subscriber
+ * @param regex_topic client identification of the client
+ * 
+ */
+void
+get_regex (char *topic, char **regex_topic)
+{
+  char *plus;
+  char *hash;
+  char *prefixed_topic;
+  int i, j, k; 
+  int plus_counter = 0;
+  int hash_exists = 0;
+  
+  plus = strchr(topic,'+');
+   while (plus != NULL)
+  {
+       plus_counter +=1;
+       plus=strchr(plus+1,'+');
+       }               
+  hash = strchr(topic,'#');
+  if (hash != NULL)
+  {
+       hash_exists = 1;
+  }
+  
+  add_prefix(topic, &prefixed_topic); 
+  
+  *regex_topic = GNUNET_malloc(strlen(prefixed_topic) - plus_counter - 
hash_exists + plus_counter*strlen(plus_regex) + 
hash_exists*strlen(hash_regex)+1);
+  j = 0;
+  for (i = 0; prefixed_topic[i] != '\0'; i++) 
+  {
+    if (prefixed_topic[i] == '+') 
+    {
+      for (k = 0; k<strlen(plus_regex); k++)
+      {
+       (*regex_topic)[j] = plus_regex[k];
+       j++;
+      }
+    }
+    else if (prefixed_topic[i] == '#') 
+    {
+      j--;
+      for (k = 0; k<strlen(hash_regex); k++)
+      {
+       (*regex_topic)[j] = hash_regex[k];
+       j++;
+      }
+     }else
+     {
+      (*regex_topic)[j] = prefixed_topic[i];
+      j++;
+      }
+    }
+    (*regex_topic)[j] = '\0';
+  }
+  
+
+/**
+ *Helper for building correct regular expressions
+ *
+ * 
+ */
+void
+try_regexes ()
+{
+  char *expression = "GNUNET-MQTT 0001 
00000some/ana(/(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9)+)*";
+  struct GNUNET_REGEX_Automaton *automaton;
+
+  automaton = GNUNET_REGEX_construct_dfa(expression, strlen(expression), 1);
+
+  if (0 == GNUNET_REGEX_eval(automaton, "GNUNET-MQTT 0001 
00000some/ana/topic1/sudo2"))
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "\n\nDid match!\n");
+  else
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "\n\nDid NOT match!\n");
+}

Added: gnunet-mqtt/src/mqtt/regex_utils.h
===================================================================
--- gnunet-mqtt/src/mqtt/regex_utils.h                          (rev 0)
+++ gnunet-mqtt/src/mqtt/regex_utils.h  2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,71 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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 3, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/regex_utils.h
+ * @brief functions for managing the regular expressions 
+ * @author Ramona Popa
+ */
+
+#ifndef REGEXUTILS_H
+#define REGEXUTILS_H
+
+
+/**
+ * Validates subscribe topic syntax.
+ *
+ * @param topic topic of subscription as provided by the subscriber
+ * @return 1 if the topic is syntactically valid and 0 if not
+  * 
+ */
+int
+validate_subscribe_topic (const char *topic);
+
+/**
+ * Validates publish topic syntax.
+ *
+ * @param topic topic of the published as provided by the publisher
+ * @return 1 if the topic is syntactically valid and 0 if not
+  * 
+ */
+int
+validate_publish_topic (const char *topic);
+
+/**
+ * Adds the prefix to the toopic (App ID + Version + Padding)
+ *
+ * @param topic topic of subscription as provided by the subscriber
+ * @param regex_topic client identification of the client
+ * 
+ */
+void
+add_prefix (const char *topic, char **prefixed_topic);
+
+/**
+ * Transform topics to regex expression.
+ *
+ * @param topic topic of subscription as provided by the subscriber
+ * @param regex_topic client identification of the client
+ * 
+ */
+void
+get_regex (char *topic, char **regex_topic);
+
+#endif

Added: gnunet-mqtt/src/mqtt/template.conf
===================================================================
--- gnunet-mqtt/src/mqtt/template.conf                          (rev 0)
+++ gnunet-mqtt/src/mqtt/template.conf  2013-09-28 15:58:54 UTC (rev 29672)
@@ -0,0 +1,61 @@
+[fs]
+AUTOSTART = NO
+
+[resolver]
+AUTOSTART = NO
+
+[block]
+plugins = test dht
+
+[dhtcache]
+QUOTA = 1 MB
+DATABASE = sqlite
+
+[transport]
+PLUGINS = tcp
+
+[ats]
+WAN_QUOTA_IN = 1 GB
+WAN_QUOTA_OUT = 1 GB
+
+[arm]
+DEFAULTSERVICES = dht core mqtt
+
+[TESTING]
+WEAKRANDOM = YES
+
+[testbed]
+OVERLAY_TOPOLOGY = FROM_FILE
+OVERLAY_TOPOLOGY_FILE = test_mqtt_multipeer_topology.dat
+
+[gnunetd]
+HOSTKEY = $SERVICEHOME/.hostkey
+
+[PATHS]
+SERVICEHOME = /tmp/test-dht-multipeer/
+
+[nat]
+DISABLEV6 = YES
+RETURN_LOCAL_ADDRESSES = YES
+ENABLE_UPNP = NO
+BEHIND_NAT = NO
+ALLOW_NAT = NO
+INTERNAL_ADDRESS = 127.0.0.1
+EXTERNAL_ADDRESS = 127.0.0.1
+USE_LOCALADDR = YES
+
+[dns]
+AUTOSTART = NO
+
+[namestore]
+AUTOSTART = NO
+
+[nse]
+AUTOSTART = NO
+
+[vpn]
+AUTOSTART=NO
+
+[mqtt]
+SUBSCRIPTION_REANNOUNCE_TIME = 5 m
+MESSAGE_DELETE_TIME = 5 s

Added: gnunet-mqtt/src/mqtt/template_single_peer.conf
===================================================================
--- gnunet-mqtt/src/mqtt/template_single_peer.conf                              
(rev 0)
+++ gnunet-mqtt/src/mqtt/template_single_peer.conf      2013-09-28 15:58:54 UTC 
(rev 29672)
@@ -0,0 +1,57 @@
+[fs]
+AUTOSTART = NO
+
+[resolver]
+AUTOSTART = NO
+
+[block]
+plugins = test dht
+
+[dhtcache]
+QUOTA = 1 MB
+DATABASE = sqlite
+
+[transport]
+PLUGINS = tcp
+
+[ats]
+WAN_QUOTA_IN = 1 GB
+WAN_QUOTA_OUT = 1 GB
+
+[arm]
+DEFAULTSERVICES = dht core mqtt
+
+[TESTING]
+WEAKRANDOM = YES
+
+[gnunetd]
+HOSTKEY = $SERVICEHOME/.hostkey
+
+[PATHS]
+SERVICEHOME = /tmp/test-dht-multipeer/
+
+[nat]
+DISABLEV6 = YES
+RETURN_LOCAL_ADDRESSES = YES
+ENABLE_UPNP = NO
+BEHIND_NAT = NO
+ALLOW_NAT = NO
+INTERNAL_ADDRESS = 127.0.0.1
+EXTERNAL_ADDRESS = 127.0.0.1
+USE_LOCALADDR = YES
+
+[dns]
+AUTOSTART = NO
+
+[namestore]
+AUTOSTART = NO
+
+[nse]
+AUTOSTART = NO
+
+[vpn]
+AUTOSTART=NO
+
+[mqtt]
+SUBSCRIPTION_REANNOUNCE_TIME = 5 m
+MESSAGE_DELETE_TIME = 5 s

Added: gnunet-mqtt/src/mqtt/test_mqtt_multipeer_topology.dat
===================================================================
--- gnunet-mqtt/src/mqtt/test_mqtt_multipeer_topology.dat                       
        (rev 0)
+++ gnunet-mqtt/src/mqtt/test_mqtt_multipeer_topology.dat       2013-09-28 
15:58:54 UTC (rev 29672)
@@ -0,0 +1,2 @@
+0:1
+1:0
\ No newline at end of file

Added: gnunet-mqtt/src/mqtt/test_mqtt_multiple_peers.c
===================================================================
--- gnunet-mqtt/src/mqtt/test_mqtt_multiple_peers.c                             
(rev 0)
+++ gnunet-mqtt/src/mqtt/test_mqtt_multiple_peers.c     2013-09-28 15:58:54 UTC 
(rev 29672)
@@ -0,0 +1,216 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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 3, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/test_mqtt_multiple_peers.c
+ * @brief testcase for the MQTT service
+ * @author Ramona Popa
+ */
+#include <unistd.h>
+#include <gnunet/platform.h>
+#include <gnunet/gnunet_util_lib.h>
+#include <gnunet/gnunet_testbed_service.h>
+#include <gnunet/gnunet_dht_service.h>
+#include "gnunet_mqtt_service.h"
+
+/**
+ * Handle to the MQTT
+ */
+static struct GNUNET_MQTT_Handle *mqtt_handle_publish, *mqtt_handle_subscribe;
+
+struct GNUNET_TESTBED_Operation *basic_mqtt_op_publish;
+struct GNUNET_TESTBED_Operation *basic_mqtt_op_subscribe;
+GNUNET_SCHEDULER_TaskIdentifier shutdown_tid;
+
+static int result;
+
+/**
+ * User supplied timeout value
+ */
+static unsigned long long request_timeout = 5;
+
+static void
+shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  if (NULL != basic_mqtt_op_publish)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_publish); /* calls the 
gmqtt_da() for closing
+       down the connection */
+       basic_mqtt_op_publish = NULL;
+  }
+  
+  if (NULL != basic_mqtt_op_subscribe)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_subscribe); /* calls the 
gmqtt_da() for closing
+       down the connection */
+       basic_mqtt_op_subscribe = NULL;
+  }
+  
+  GNUNET_SCHEDULER_shutdown (); /* Also kills the testbed */
+}
+
+static void
+in_time_shutdown_task ()
+{
+  if (NULL != basic_mqtt_op_publish)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_publish); /* calls the 
gmqtt_da_publish() for closing
+       down the connection */
+       basic_mqtt_op_publish = NULL;
+  }
+  
+  if (NULL != basic_mqtt_op_subscribe)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_subscribe); /* calls the 
gmqtt_da_subscribe() for closing
+       down the connection */
+       basic_mqtt_op_subscribe = NULL;
+  }
+ 
+  GNUNET_SCHEDULER_cancel(shutdown_tid);
+  GNUNET_SCHEDULER_shutdown (); /* Also kills the testbed */
+}
+
+static void
+subscribe_result_callback (void *cls, uint8_t topic_len, char *topic,
+                           size_t size, void *data)
+{
+  result = GNUNET_OK;
+  FPRINTF (stdout, "%s: %s -> %s\n",  _("Message received"), topic,
+           (char*) data);
+
+  GNUNET_free (topic);
+  GNUNET_free (data);
+  
+  in_time_shutdown_task();
+}
+
+static void
+service_connect_comp_publish (void *cls, struct GNUNET_TESTBED_Operation *op,
+                     void *ca_result,
+                     const char *emsg)
+{      
+       struct GNUNET_TIME_Relative timeout;
+       char *topic = "some/topic";
+       char *message = "test message";
+       
+       timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                           request_timeout);
+       GNUNET_MQTT_publish (mqtt_handle_publish, strlen(topic) + 1, topic,
+                       strlen(message) + 1, message, timeout, NULL,
+                       NULL);
+       }
+
+static void
+service_connect_comp_subscribe (void *cls, struct GNUNET_TESTBED_Operation *op,
+                     void *ca_result,
+                     const char *emsg)
+{      
+  struct GNUNET_TIME_Relative timeout;
+  char *topic = "some/topic";
+               
+  timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                           request_timeout);
+  
+  GNUNET_MQTT_subscribe (mqtt_handle_subscribe, strlen(topic) + 1, topic, 
timeout,
+                         NULL, NULL,
+                         subscribe_result_callback, NULL);
+  }
+
+
+static void *
+gmqtt_ca_publish (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+  /* Use the provided configuration to connect to service */
+  mqtt_handle_publish = GNUNET_MQTT_connect(cfg);                              
   
+       
+  return mqtt_handle_publish;
+}
+
+
+static void *
+gmqtt_ca_subscribe (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+        
+  /* Use the provided configuration to connect to service */
+  mqtt_handle_subscribe = GNUNET_MQTT_connect(cfg); 
+ 
+  return mqtt_handle_subscribe;
+}
+
+static void
+gmqtt_da_publish (void *cls, void *op_result)
+{
+  /* Disconnect from gnunet-service-mqtt service */
+   GNUNET_MQTT_disconnect (mqtt_handle_publish);
+   mqtt_handle_publish = NULL;  
+}
+
+static void
+gmqtt_da_subscribe (void *cls, void *op_result)
+{
+   /* Disconnect from gnunet-service-mqtt service */
+   GNUNET_MQTT_disconnect (mqtt_handle_subscribe);
+   mqtt_handle_subscribe = NULL;  
+}
+
+static void
+test_master (void *cls, unsigned int num_peers,
+            struct GNUNET_TESTBED_Peer **peers)
+{
+  basic_mqtt_op_publish = GNUNET_TESTBED_service_connect(NULL, /* Closure for 
operation */
+                                         peers[0], /* The peer whose service 
to connect to */
+                                         "gnunet-service-mqtt", /* The name of 
the service */
+                                          service_connect_comp_publish, /* 
callback to call after a handle to service is opened */
+                                          NULL, /* closure for the above 
callback */
+                                          gmqtt_ca_publish, /* callback to 
call with peer's configuration; this should open the needed service connection 
*/
+                                          gmqtt_da_publish, /* callback to be 
called when closing the opened service connection */
+                                          NULL); /* closure for the above two 
callbacks */
+  basic_mqtt_op_subscribe = GNUNET_TESTBED_service_connect(NULL, /* Closure 
for operation */
+                                          peers[1], /* The peer whose service 
to connect to */
+                                          "gnunet-service-mqtt", /* The name 
of the service */
+                                          service_connect_comp_subscribe, /* 
callback to call after a handle to service is opened */
+                                           NULL, /* closure for the above 
callback */
+                                           gmqtt_ca_subscribe, /* callback to 
call with peer's configuration; this should open the needed service connection 
*/
+                                           gmqtt_da_subscribe, /* callback to 
be called when closing the opened service connection */
+                                           NULL); /* closure for the above two 
callbacks */                    
+                                               
+  shutdown_tid = GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 10), &shutdown_task, NULL);                          
                   
+
+}
+
+int main (int argc, char **argv)
+{
+  int ret;
+  result = GNUNET_SYSERR;
+  
+  FPRINTF (stdout, "\n Starting test for mqtt multiple peers 
communication.\n\n");
+  
+  ret = GNUNET_TESTBED_test_run("test mqtt multiple peer comumunication", /* 
test case name */
+                             "template.conf", /* template configuration */
+                              2, /* number of peers to start */
+                              0LL, /* Event mask -set to 0 for no event 
notifications */
+                              NULL, /* Controller event callback */
+                              NULL, /* Closure for controller event callback */
+                              &test_master, /* continuation callback to be 
called when testbed setup is complete */
+                              NULL); /* Closure for the test_master callback */
+  if ( (GNUNET_OK != ret) || (GNUNET_OK != result) )
+    return 1;
+  return 0;
+}

Added: gnunet-mqtt/src/mqtt/test_mqtt_regex_hash.c
===================================================================
--- gnunet-mqtt/src/mqtt/test_mqtt_regex_hash.c                         (rev 0)
+++ gnunet-mqtt/src/mqtt/test_mqtt_regex_hash.c 2013-09-28 15:58:54 UTC (rev 
29672)
@@ -0,0 +1,216 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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 3, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/test_mqtt_regex_hash.c
+ * @brief testcase for the MQTT service
+ * @author Ramona Popa
+ */
+#include <unistd.h>
+#include <gnunet/platform.h>
+#include <gnunet/gnunet_util_lib.h>
+#include <gnunet/gnunet_testbed_service.h>
+#include <gnunet/gnunet_dht_service.h>
+#include "gnunet_mqtt_service.h"
+
+/**
+ * Handle to the MQTT
+ */
+static struct GNUNET_MQTT_Handle *mqtt_handle_publish, *mqtt_handle_subscribe;
+
+struct GNUNET_TESTBED_Operation *basic_mqtt_op_publish;
+struct GNUNET_TESTBED_Operation *basic_mqtt_op_subscribe;
+GNUNET_SCHEDULER_TaskIdentifier shutdown_tid;
+
+static int result;
+
+/**
+ * User supplied timeout value
+ */
+static unsigned long long request_timeout = 5;
+
+static void
+shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  if (NULL != basic_mqtt_op_publish)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_publish); /* calls the 
gmqtt_da() for closing
+       down the connection */
+       basic_mqtt_op_publish = NULL;
+  }
+  
+  if (NULL != basic_mqtt_op_subscribe)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_subscribe); /* calls the 
gmqtt_da() for closing
+       down the connection */
+       basic_mqtt_op_subscribe = NULL;
+  }
+  
+  GNUNET_SCHEDULER_shutdown (); /* Also kills the testbed */
+}
+
+static void
+in_time_shutdown_task ()
+{
+  if (NULL != basic_mqtt_op_publish)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_publish); /* calls the 
gmqtt_da_publish() for closing
+       down the connection */
+       basic_mqtt_op_publish = NULL;
+  }
+  
+  if (NULL != basic_mqtt_op_subscribe)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_subscribe); /* calls the 
gmqtt_da_subscribe() for closing
+       down the connection */
+       basic_mqtt_op_subscribe = NULL;
+  }
+ 
+  GNUNET_SCHEDULER_cancel(shutdown_tid);
+  GNUNET_SCHEDULER_shutdown (); /* Also kills the testbed */
+}
+
+static void
+subscribe_result_callback (void *cls, uint8_t topic_len, char *topic,
+                           size_t size, void *data)
+{
+  result = GNUNET_OK;
+  FPRINTF (stdout, "%s: %s -> %s\n",  _("Message received"), topic,
+           (char*) data);
+
+  GNUNET_free (topic);
+  GNUNET_free (data);
+  
+  in_time_shutdown_task();
+}
+
+static void
+service_connect_comp_publish (void *cls, struct GNUNET_TESTBED_Operation *op,
+                     void *ca_result,
+                     const char *emsg)
+{      
+       struct GNUNET_TIME_Relative timeout;
+       char *topic = "some/topic/level1/Level2";
+       char *message = "test message";
+       
+       timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                           request_timeout);
+       GNUNET_MQTT_publish (mqtt_handle_publish, strlen(topic) + 1, topic,
+                       strlen(message) + 1, message, timeout, NULL,
+                       NULL);
+       }
+
+static void
+service_connect_comp_subscribe (void *cls, struct GNUNET_TESTBED_Operation *op,
+                     void *ca_result,
+                     const char *emsg)
+{      
+  struct GNUNET_TIME_Relative timeout;
+  char *topic = "some/topic/#";
+               
+  timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                           request_timeout);
+  
+  GNUNET_MQTT_subscribe (mqtt_handle_subscribe, strlen(topic) + 1, topic, 
timeout,
+                         NULL, NULL,
+                         subscribe_result_callback, NULL);
+  }
+
+
+static void *
+gmqtt_ca_publish (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+  /* Use the provided configuration to connect to service */
+  mqtt_handle_publish = GNUNET_MQTT_connect(cfg);                              
   
+       
+  return mqtt_handle_publish;
+}
+
+
+static void *
+gmqtt_ca_subscribe (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+        
+  /* Use the provided configuration to connect to service */
+  mqtt_handle_subscribe = GNUNET_MQTT_connect(cfg); 
+ 
+  return mqtt_handle_subscribe;
+}
+
+static void
+gmqtt_da_publish (void *cls, void *op_result)
+{
+  /* Disconnect from gnunet-service-mqtt service */
+   GNUNET_MQTT_disconnect (mqtt_handle_publish);
+   mqtt_handle_publish = NULL;  
+}
+
+static void
+gmqtt_da_subscribe (void *cls, void *op_result)
+{
+   /* Disconnect from gnunet-service-mqtt service */
+   GNUNET_MQTT_disconnect (mqtt_handle_subscribe);
+   mqtt_handle_subscribe = NULL;  
+}
+
+static void
+test_master (void *cls, unsigned int num_peers,
+            struct GNUNET_TESTBED_Peer **peers)
+{
+  basic_mqtt_op_publish = GNUNET_TESTBED_service_connect(NULL, /* Closure for 
operation */
+                                         peers[0], /* The peer whose service 
to connect to */
+                                         "gnunet-service-mqtt", /* The name of 
the service */
+                                          service_connect_comp_publish, /* 
callback to call after a handle to service is opened */
+                                          NULL, /* closure for the above 
callback */
+                                          gmqtt_ca_publish, /* callback to 
call with peer's configuration; this should open the needed service connection 
*/
+                                          gmqtt_da_publish, /* callback to be 
called when closing the opened service connection */
+                                          NULL); /* closure for the above two 
callbacks */
+  basic_mqtt_op_subscribe = GNUNET_TESTBED_service_connect(NULL, /* Closure 
for operation */
+                                          peers[1], /* The peer whose service 
to connect to */
+                                          "gnunet-service-mqtt", /* The name 
of the service */
+                                          service_connect_comp_subscribe, /* 
callback to call after a handle to service is opened */
+                                           NULL, /* closure for the above 
callback */
+                                           gmqtt_ca_subscribe, /* callback to 
call with peer's configuration; this should open the needed service connection 
*/
+                                           gmqtt_da_subscribe, /* callback to 
be called when closing the opened service connection */
+                                           NULL); /* closure for the above two 
callbacks */                    
+                                               
+  shutdown_tid = GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 10), &shutdown_task, NULL);                          
                   
+
+}
+
+int main (int argc, char **argv)
+{
+  int ret;
+  result = GNUNET_SYSERR;
+  
+  FPRINTF (stdout, "\n Starting test for regex expressions (topics that 
contain the # wildcard).\n\n");
+  
+  ret = GNUNET_TESTBED_test_run("test mqtt regex", /* test case name */
+                             "template.conf", /* template configuration */
+                              2, /* number of peers to start */
+                              0LL, /* Event mask -set to 0 for no event 
notifications */
+                              NULL, /* Controller event callback */
+                              NULL, /* Closure for controller event callback */
+                              &test_master, /* continuation callback to be 
called when testbed setup is complete */
+                              NULL); /* Closure for the test_master callback */
+  if ( (GNUNET_OK != ret) || (GNUNET_OK != result) )
+    return 1;
+  return 0;
+}

Added: gnunet-mqtt/src/mqtt/test_mqtt_regex_plus.c
===================================================================
--- gnunet-mqtt/src/mqtt/test_mqtt_regex_plus.c                         (rev 0)
+++ gnunet-mqtt/src/mqtt/test_mqtt_regex_plus.c 2013-09-28 15:58:54 UTC (rev 
29672)
@@ -0,0 +1,218 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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 3, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/test_mqtt_regex_plus.c
+ * @brief testcase for the MQTT service
+ * @author Ramona Popa
+ */
+#include <unistd.h>
+#include <gnunet/platform.h>
+#include <gnunet/gnunet_util_lib.h>
+#include <gnunet/gnunet_testbed_service.h>
+#include <gnunet/gnunet_dht_service.h>
+#include <gnunet/gnunet_regex_lib.h>
+#include "gnunet_mqtt_service.h"
+
+/**
+ * Handle to the MQTT
+ */
+static struct GNUNET_MQTT_Handle *mqtt_handle_publish, *mqtt_handle_subscribe;
+
+struct GNUNET_TESTBED_Operation *basic_mqtt_op_publish;
+struct GNUNET_TESTBED_Operation *basic_mqtt_op_subscribe;
+GNUNET_SCHEDULER_TaskIdentifier shutdown_tid;
+
+static int result;
+
+/**
+ * User supplied timeout value
+ */
+static unsigned long long request_timeout = 5;
+
+static void
+shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  if (NULL != basic_mqtt_op_publish)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_publish); /* calls the 
gmqtt_da() for closing
+       down the connection */
+       basic_mqtt_op_publish = NULL;
+  }
+  
+  if (NULL != basic_mqtt_op_subscribe)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_subscribe); /* calls the 
gmqtt_da() for closing
+       down the connection */
+       basic_mqtt_op_subscribe = NULL;
+  }
+  
+  GNUNET_SCHEDULER_shutdown (); /* Also kills the testbed */
+}
+
+static void
+in_time_shutdown_task ()
+{
+  if (NULL != basic_mqtt_op_publish)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_publish); /* calls the 
gmqtt_da_publish() for closing
+       down the connection */
+       basic_mqtt_op_publish = NULL;
+  }
+  
+  if (NULL != basic_mqtt_op_subscribe)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op_subscribe); /* calls the 
gmqtt_da_subscribe() for closing
+       down the connection */
+       basic_mqtt_op_subscribe = NULL;
+  }
+ 
+  GNUNET_SCHEDULER_cancel(shutdown_tid);
+  GNUNET_SCHEDULER_shutdown (); /* Also kills the testbed */
+}
+
+static void
+subscribe_result_callback (void *cls, uint8_t topic_len, char *topic,
+                           size_t size, void *data)
+{
+  result = GNUNET_OK;
+  FPRINTF (stdout, "%s: %s -> %s\n",  _("Message received"), topic,
+           (char*) data);
+
+  GNUNET_free (topic);
+  GNUNET_free (data);
+  
+  in_time_shutdown_task();
+}
+
+static void
+service_connect_comp_publish (void *cls, struct GNUNET_TESTBED_Operation *op,
+                     void *ca_result,
+                     const char *emsg)
+{      
+       try_regexes ();
+       struct GNUNET_TIME_Relative timeout;
+       char *topic = "some/IntLevel1/topic";
+       char *message = "test message";
+       
+       timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                           request_timeout);
+       GNUNET_MQTT_publish (mqtt_handle_publish, strlen(topic) + 1, topic,
+                       strlen(message) + 1, message, timeout, NULL,
+                       NULL);
+       }
+
+static void
+service_connect_comp_subscribe (void *cls, struct GNUNET_TESTBED_Operation *op,
+                     void *ca_result,
+                     const char *emsg)
+{      
+  struct GNUNET_TIME_Relative timeout;
+  char *topic = "some/+/topic";
+               
+  timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                           request_timeout);
+  
+  GNUNET_MQTT_subscribe (mqtt_handle_subscribe, strlen(topic) + 1, topic, 
timeout,
+                         NULL, NULL,
+                         subscribe_result_callback, NULL);
+  }
+
+
+static void *
+gmqtt_ca_publish (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+  /* Use the provided configuration to connect to service */
+  mqtt_handle_publish = GNUNET_MQTT_connect(cfg);                              
   
+       
+  return mqtt_handle_publish;
+}
+
+
+static void *
+gmqtt_ca_subscribe (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+        
+  /* Use the provided configuration to connect to service */
+  mqtt_handle_subscribe = GNUNET_MQTT_connect(cfg); 
+ 
+  return mqtt_handle_subscribe;
+}
+
+static void
+gmqtt_da_publish (void *cls, void *op_result)
+{
+  /* Disconnect from gnunet-service-mqtt service */
+   GNUNET_MQTT_disconnect (mqtt_handle_publish);
+   mqtt_handle_publish = NULL;  
+}
+
+static void
+gmqtt_da_subscribe (void *cls, void *op_result)
+{
+   /* Disconnect from gnunet-service-mqtt service */
+   GNUNET_MQTT_disconnect (mqtt_handle_subscribe);
+   mqtt_handle_subscribe = NULL;  
+}
+
+static void
+test_master (void *cls, unsigned int num_peers,
+            struct GNUNET_TESTBED_Peer **peers)
+{
+  basic_mqtt_op_publish = GNUNET_TESTBED_service_connect(NULL, /* Closure for 
operation */
+                                         peers[0], /* The peer whose service 
to connect to */
+                                         "gnunet-service-mqtt", /* The name of 
the service */
+                                          service_connect_comp_publish, /* 
callback to call after a handle to service is opened */
+                                          NULL, /* closure for the above 
callback */
+                                          gmqtt_ca_publish, /* callback to 
call with peer's configuration; this should open the needed service connection 
*/
+                                          gmqtt_da_publish, /* callback to be 
called when closing the opened service connection */
+                                          NULL); /* closure for the above two 
callbacks */
+  basic_mqtt_op_subscribe = GNUNET_TESTBED_service_connect(NULL, /* Closure 
for operation */
+                                          peers[1], /* The peer whose service 
to connect to */
+                                          "gnunet-service-mqtt", /* The name 
of the service */
+                                          service_connect_comp_subscribe, /* 
callback to call after a handle to service is opened */
+                                           NULL, /* closure for the above 
callback */
+                                           gmqtt_ca_subscribe, /* callback to 
call with peer's configuration; this should open the needed service connection 
*/
+                                           gmqtt_da_subscribe, /* callback to 
be called when closing the opened service connection */
+                                           NULL); /* closure for the above two 
callbacks */                    
+                                               
+  shutdown_tid = GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 10), &shutdown_task, NULL);                          
                   
+
+}
+
+int main (int argc, char **argv)
+{
+  int ret;
+  result = GNUNET_SYSERR;
+  
+  FPRINTF (stdout, "\n Starting test for regex expressions (topics that 
contain the + wildcard).\n\n");
+  
+  ret = GNUNET_TESTBED_test_run("test mqtt regex", /* test case name */
+                             "template.conf", /* template configuration */
+                              2, /* number of peers to start */
+                              0LL, /* Event mask -set to 0 for no event 
notifications */
+                              NULL, /* Controller event callback */
+                              NULL, /* Closure for controller event callback */
+                              &test_master, /* continuation callback to be 
called when testbed setup is complete */
+                              NULL); /* Closure for the test_master callback */
+  if ( (GNUNET_OK != ret) || (GNUNET_OK != result) )
+    return 1;
+  return 0;
+}

Added: gnunet-mqtt/src/mqtt/test_mqtt_single_peer.c
===================================================================
--- gnunet-mqtt/src/mqtt/test_mqtt_single_peer.c                                
(rev 0)
+++ gnunet-mqtt/src/mqtt/test_mqtt_single_peer.c        2013-09-28 15:58:54 UTC 
(rev 29672)
@@ -0,0 +1,163 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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 3, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/test_mqtt_single_peer.c
+ * @brief testcase for the MQTT service
+ * @author Ramona Popa
+ */
+#include <unistd.h>
+#include <gnunet/platform.h>
+#include <gnunet/gnunet_util_lib.h>
+#include <gnunet/gnunet_testbed_service.h>
+#include <gnunet/gnunet_dht_service.h>
+#include "gnunet_mqtt_service.h"
+
+/**
+ * Handle to the MQTT
+ */
+static struct GNUNET_MQTT_Handle *mqtt_handle;
+
+struct GNUNET_TESTBED_Operation *basic_mqtt_op;
+GNUNET_SCHEDULER_TaskIdentifier shutdown_tid;
+
+static int result;
+
+/**
+ * User supplied timeout value
+ */
+static unsigned long long request_timeout = 5;
+
+static void
+shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+   
+  if (NULL != basic_mqtt_op)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op); /* calls the gmqtt_da() 
for closing
+       down the connection */
+       basic_mqtt_op = NULL;
+  }
+  
+  GNUNET_SCHEDULER_shutdown (); /* Also kills the testbed */
+}
+
+static void
+in_time_shutdown_task ()
+{
+  if (NULL != basic_mqtt_op)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op); /* calls the gmqtt_da() 
for closing
+       down the connection */
+  basic_mqtt_op = NULL;
+  }
+  GNUNET_SCHEDULER_cancel(shutdown_tid);
+  GNUNET_SCHEDULER_shutdown (); /* Also kills the testbed */
+}
+
+static void
+subscribe_result_callback (void *cls, uint8_t topic_len, char *topic,
+                           size_t size, void *data)
+{
+  result = GNUNET_OK;
+  FPRINTF (stdout, "%s: %s -> %s\n",  _("\nMessage received"), topic,
+           (char*) data);
+
+  GNUNET_free (topic);
+  GNUNET_free (data);
+  
+  in_time_shutdown_task();
+}
+
+
+static void
+service_connect_comp (void *cls, struct GNUNET_TESTBED_Operation *op,
+                     void *ca_result,
+                     const char *emsg)
+{      
+       struct GNUNET_TIME_Relative timeout;
+       char *topic = "some/topic";
+       char *message = "test message";
+       
+       timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                           request_timeout);
+       
+  GNUNET_MQTT_subscribe (mqtt_handle, strlen(topic) + 1, topic, timeout,
+                         NULL, NULL,
+                         subscribe_result_callback, NULL);
+  GNUNET_MQTT_publish (mqtt_handle, strlen(topic) + 1, topic,
+                       strlen(message) + 1, message, timeout, NULL,
+                       NULL);
+                                          
+  shutdown_tid = GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 10), &shutdown_task, NULL);
+}
+
+
+static void *
+gmqtt_ca (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+  /* Use the provided configuration to connect to service */
+  mqtt_handle = GNUNET_MQTT_connect(cfg);                         
+       
+  return mqtt_handle;
+}
+
+static void
+gmqtt_da (void *cls, void *op_result)
+{
+   /* Disconnect from gnunet-service-mqtt service */
+   GNUNET_MQTT_disconnect (mqtt_handle);
+   mqtt_handle = NULL;  
+}
+
+static void
+test_master (void *cls, unsigned int num_peers,
+            struct GNUNET_TESTBED_Peer **peers)
+{
+       basic_mqtt_op = GNUNET_TESTBED_service_connect(NULL, /* Closure for 
operation */
+                                         peers[0], /* The peer whose service 
to connect to */
+                                         "gnunet-service-mqtt", /* The name of 
the service */
+                                          service_connect_comp, /* callback to 
call after a handle to service is opened */
+                                          NULL, /* closure for the above 
callback */
+                                          gmqtt_ca, /* callback to call with 
peer's configuration; this should open the needed service connection */
+                                          gmqtt_da, /* callback to be called 
when closing the opened service connection */
+                                          NULL); /* closure for the above two 
callbacks */                                                             
+
+}
+
+int main (int argc, char **argv)
+{
+  int ret;
+  result = GNUNET_SYSERR;
+  
+  FPRINTF (stdout, "\n Starting test for mqtt single peer communication.\n\n");
+  
+  ret = GNUNET_TESTBED_test_run("test mqtt single peer comumunication", /* 
test case name */
+                             "template_single_peer.conf", /* template 
configuration */
+                              1, /* number of peers to start */
+                              0LL, /* Event mask -set to 0 for no event 
notifications */
+                              NULL, /* Controller event callback */
+                              NULL, /* Closure for controller event callback */
+                              &test_master, /* continuation callback to be 
called when testbed setup is complete */
+                              NULL); /* Closure for the test_master callback */
+  if ( (GNUNET_OK != ret) || (GNUNET_OK != result) )
+    return 1;
+  return 0;
+}

Added: gnunet-mqtt/src/mqtt/test_mqtt_unsubscribe.c
===================================================================
--- gnunet-mqtt/src/mqtt/test_mqtt_unsubscribe.c                                
(rev 0)
+++ gnunet-mqtt/src/mqtt/test_mqtt_unsubscribe.c        2013-09-28 15:58:54 UTC 
(rev 29672)
@@ -0,0 +1,149 @@
+/*
+     This file is part of GNUnet-MQTT.
+     (C) 2013 Ramona Popa, Artur Grunau
+
+     GNUnet 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 3, or (at your
+     option) any later version.
+
+     GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file mqtt/test_mqtt_unsubscribe.c
+ * @brief testcase for the MQTT service
+ * @author Ramona Popa
+ */
+#include <unistd.h>
+#include <gnunet/platform.h>
+#include <gnunet/gnunet_util_lib.h>
+#include <gnunet/gnunet_testbed_service.h>
+#include <gnunet/gnunet_dht_service.h>
+#include "gnunet_mqtt_service.h"
+
+/**
+ * Handle to the MQTT
+ */
+static struct GNUNET_MQTT_Handle *mqtt_handle;
+
+struct GNUNET_TESTBED_Operation *basic_mqtt_op;
+GNUNET_SCHEDULER_TaskIdentifier shutdown_tid;
+
+static int result;
+
+/**
+ * User supplied timeout value
+ */
+static unsigned long long request_timeout = 5;
+
+static void
+shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  shutdown_tid = GNUNET_SCHEDULER_NO_TASK;
+  if (NULL != basic_mqtt_op)
+  {
+       GNUNET_TESTBED_operation_done (basic_mqtt_op); /* calls the gmqtt_da() 
for closing
+       down the connection */
+       basic_mqtt_op = NULL;
+  }
+  
+  GNUNET_SCHEDULER_shutdown (); /* Also kills the testbed */
+}
+
+static void
+subscribe_result_callback (void *cls, uint8_t topic_len, char *topic,
+                           size_t size, void *data)
+{
+  result = GNUNET_SYSERR;
+  FPRINTF (stdout, "%s: %s -> %s\n",  _("\nMessage received"), topic,
+           (char*) data);
+
+  GNUNET_free (topic);
+  GNUNET_free (data);
+}
+
+
+static void
+service_connect_comp (void *cls, struct GNUNET_TESTBED_Operation *op,
+                     void *ca_result,
+                     const char *emsg)
+{      
+       struct GNUNET_TIME_Relative timeout;
+       struct GNUNET_MQTT_SubscribeHandle *sh;
+       char *topic = "some/topic";
+       char *message = "test message";
+       
+       timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                           request_timeout);
+       
+  sh = GNUNET_MQTT_subscribe (mqtt_handle, strlen(topic) + 1, topic, timeout,
+                         NULL, NULL,
+                         subscribe_result_callback, NULL);
+  GNUNET_MQTT_unsubscribe(sh);
+  GNUNET_MQTT_publish (mqtt_handle, strlen(topic) + 1, topic,
+                       strlen(message) + 1, message, timeout, NULL,
+                       NULL);
+  result = GNUNET_OK;                             
+  GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 10), &shutdown_task, NULL);
+}
+
+
+static void *
+gmqtt_ca (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+  /* Use the provided configuration to connect to service */
+  mqtt_handle = GNUNET_MQTT_connect(cfg);                         
+       
+  return mqtt_handle;
+}
+
+static void
+gmqtt_da (void *cls, void *op_result)
+{
+   /* Disconnect from gnunet-service-mqtt service */
+   GNUNET_MQTT_disconnect (mqtt_handle);
+   mqtt_handle = NULL;  
+}
+
+static void
+test_master (void *cls, unsigned int num_peers,
+            struct GNUNET_TESTBED_Peer **peers)
+{
+  basic_mqtt_op = GNUNET_TESTBED_service_connect(NULL, /* Closure for 
operation */
+                                         peers[0], /* The peer whose service 
to connect to */
+                                         "gnunet-service-mqtt", /* The name of 
the service */
+                                          service_connect_comp, /* callback to 
call after a handle to service is opened */
+                                          NULL, /* closure for the above 
callback */
+                                          gmqtt_ca, /* callback to call with 
peer's configuration; this should open the needed service connection */
+                                          gmqtt_da, /* callback to be called 
when closing the opened service connection */
+                                          NULL); /* closure for the above two 
callbacks */
+}
+
+int main (int argc, char **argv)
+{
+  int ret;
+  result = GNUNET_SYSERR;
+  
+  FPRINTF (stdout, "\n Starting test for mqtt unsubscribe operation.\n\n");
+  
+  ret = GNUNET_TESTBED_test_run("test mqtt unsubscribe operation", /* test 
case name */
+                             "template_single_peer.conf", /* template 
configuration */
+                              1, /* number of peers to start */
+                              0LL, /* Event mask -set to 0 for no event 
notifications */
+                              NULL, /* Controller event callback */
+                              NULL, /* Closure for controller event callback */
+                              &test_master, /* continuation callback to be 
called when testbed setup is complete */
+                              NULL); /* Closure for the test_master callback */
+  if ( (GNUNET_OK != ret) || (GNUNET_OK != result) )
+    return 1;
+  return 0;
+}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]