forked from processone/exmpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
152 lines (109 loc) · 4.69 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
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