Erlang C Other
Failed to load latest commit information.
c_src OSX Lion compatibility Dec 19, 2011
doc Move ejabberd_zlib.erl interface to ejabberd project (EJAB-991) Sep 2, 2011
ebin
examples Added presence handling to echo_client.erl (thanks to Kuleshov Alexan… Sep 18, 2011
include Fix few mistakes in namespace defines. Mar 15, 2012
m4 Remove SVN keyword: Id. Jun 2, 2009
src Properly handle empty initial <body/> in http-bind Jul 19, 2012
testsuite
.gitignore Add .gitignore file Feb 1, 2010
EPLICENSE Rename the file EPLICENCE to the more commonly spelled EPLICENSE May 26, 2010
Makefile.am Update management of SVN revision to Git commit version Mar 16, 2010
Makefile.unix Remove SVN keyword: Id. Jun 2, 2009
Makefile.win32 Remove SVN keyword: Id. Jun 2, 2009
README Raise requirement to Erlang/OTP R12B-5 (EXMPP-6) Jul 15, 2010
configure.ac Update exmpp version number to 0.9.9 Dec 23, 2011

README

Exmpp is an Erlang application which provides the modules to ease the
development of an XMPP/Jabber server or client.

== Table of contents ==

    I. How to build and install
        1. Requirements
        2. Build and install
        3. Building examples
        4. Using an alternate Erlang environment
        5. Using another C compiler
        6. Creating Autotools files

I. How to build and install
===========================

1. Requirements
---------------

    o  Erlang/OTP (REQUIRED)
       A full Erlang environment is recommended but only ERTS and
       erl_interface are required.
           . Minimum version:           R12B-5

    o  C compiler (REQUIRED)
       Exmpp contains Erlang port drivers which are written in C.
       Tested C compilers include:
           . GNU Compiler Collection (gcc)
           . Intel C++ Compiler (icc)
           . GCC frontend for LLVM (llvm-gcc)
           . Microsoft Visual C++ (cl)
       C compilers known not to work:
           . clang frontend for LLVM (ccc)

    o  XML parsing library (REQUIRED)
       Tested libraries are:
           . Expat: recommended. Tested: 2.0.1
           . LibXML2: only experimental support.

    o  OpenSSL (optional)
       It's the only TLS engine supported for now.
           . Tested version:            0.9.8e

    o  zlib (optional)
       It's the only compression engine supported for now.
           . Tested version:            1.2.3

    o  eunit (optional)
       To be able to use the testsuite, this Erlang application is required.
           . Tested version:            2.0

2. Build and install
--------------------

Exmpp uses the Autotools. Therefore the process is quite common:

    $ ./configure
    $ make
    $ sudo make install

Building outside of the source directory is supported:

    $ mkdir exmpp-build
    $ cd exmpp-build
    exmpp-build$ /path/to/exmpp-src/configure
    exmpp-build$ make
    exmpp-build$ sudo make install

By default, Exmpp is installed in Erlang lib directory. You may select
another directory with the --prefix argument to the configure script:

    $ ./configure --prefix=/install/exmpp/here

Exmpp will be installed in "/install/exmpp/here/exmpp-$VERSION".

3. Building examples
--------------------

You can find example code in the "examples" directory.

These modules may be built for you with the --enable-examples configure
argument:

    $ ./configure --enable-examples

For now, they're not installed.

4. Using an alternate Erlang environment
----------------------------------------

If Erlang cannot be found by the configure script of if you prefer to
use a specific Erlang environment, you may indicate an alternate Erlang
root directory with the --with-erlang argument:

    $ ./configure --with-erlang=/path/to/alternate/erlang

Another way is to set the following configure variables:

    $ ./configure ERL=/path/to/bin/erl ERLC=/path/to/bin/ERLC \
      ESCRIPT=/path/to/bin/escript

5. Using another C compiler
---------------------------

You may specify another C compiler to use at configure time. For
instance, to use GCC frontend for LLVM:

    $ ./configure CC=llvm-gcc
    $ make

6. Creating Autotools files
---------------------------

If you work on a Subversion checkout, you'll have to generate some files
such as the configure script and Makefile.in. For this, you'll have to
install the following autotools:
    o  autoconf 2.60 or higher (read below for 2.62 and 2.63)
    o  automake 1.9 or later
    o  libtool 1.5 or later

To generate the files, run:

    $ autoreconf -vif

After that, you can use the standard procedure:

    $ ./configure
    $ make

WARNING: Erlang support in old autoconf 2.62 and 2.63 was broken! If you
must stick to these versions, you must apply the following patch to
'erlang.m4' in 'share/autoconf-2.62/autoconf' (patch taken from official
autoconf GIT repository):

----8<----
--- erlang.m4-broken	2009-01-14 17:54:41.000000000 +0100
+++ erlang.m4	2009-01-14 16:51:57.000000000 +0100
@@ -124,7 +124,7 @@
 m4_define([AC_LANG(Erlang)],
 [ac_ext=erl
 ac_compile='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
-ac_link='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&AS_MESSAGE_LOG_FD ; echo "#!/bin/sh" > conftest$ac_exeext ; AS_ECHO(["\"$ERL\" -run conftest start -run init stop -noshell"]) >> conftest$ac_exeext ; chmod +x conftest$ac_exeext'
+ac_link='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&AS_MESSAGE_LOG_FD ; echo "[#]!/bin/sh" > conftest$ac_exeext ; AS_ECHO(["\"$ERL\" -run conftest start -run init stop -noshell"]) >> conftest$ac_exeext ; chmod +x conftest$ac_exeext'
 ])
 
 
----8<----

After applying the patch, you must run the following commands:

    $ cd [...]/share/autoconf-2.62/autoconf
    $ autom4te --language=autoconf --freeze --output=autoconf.m4f