Added SILC Thread Queue API
[crypto.git] / lib / doc / building.html
1 <big><b>Building the Toolkit</b></big>
2
3 <br />&nbsp;<br />
4 SILC Toolkit works on various platforms, such as on several Unix systems and
5 on Windows.  Building of the Toolkit on some platform may differ from the
6 other.  This document describes how to build the Toolkit from the sources,
7 to create linkable libraries and binaries, on all platforms the Toolkit
8 support.
9
10 <br />&nbsp;<br />
11 The building instructions for all platforms are also included in the Toolkit
12 package.  Please refer to the INSTALL file for general building instructions
13 for Unix systems, README.WIN32 for building on Windows systems, and
14 README.MACOSX for building on Mac OS X.
15
16 <br />&nbsp;<br />
17 <li><a href="#unix">Building on Unix & Linux</a><br />
18 <li><a href="#windows">Building on Windows</a><br />
19 <li><a href="#macosx">Building on Mac OS X</a>
20 <li><a href="#symbian">Building on Symbian OS</a>
21
22 <br />&nbsp;<br />&nbsp;<br />
23 <b><a name="unix"></a>Building on Unix & Linux</b>
24
25 <br />&nbsp;<br />
26 Building the Toolkit on Unix will produce binaries of all libraries, and
27 SILC Client and SILC Server.  The Toolkit package includes also Client and
28 Server as an example applications, and they are compiled automatically.
29 The libraries are compiled to provide staticly linkable libraries.  Two
30 libraries are produced: libsilc.a and libsilcclient.a.  The libsilc.a includes
31 everything else except the Client library.  The libsilcclient.a includes
32 only the Client library.
33
34 <br />&nbsp;<br />
35 To build Toolkit on Unix systems, give commands:
36
37 <br />&nbsp;<br />
38 <tt>
39 ./configure<br />
40 make
41 </tt>
42
43 <br />&nbsp;<br />
44 On some systems you may need to give "gmake" command instead of "make".  The
45 ./configure can take several options as arguments.  To see them all give
46 command:
47
48 <br />&nbsp;<br />
49 <tt>./configure --help</tt>
50
51 <br />&nbsp;<br />
52 The most important configuration options you may consider to use are:
53
54 <br />&nbsp;<br />
55 <tt>--enable-debug</tt>
56
57 <br />&nbsp;<br />
58 If you would like to enable the debugging for the compiled binaries
59 you can give this option to the `configure'.  It is recommended to use
60 this option when you are doing development with Toolkit.  It is helpful
61 to enable run-time debugging.
62
63 <br />&nbsp;<br />
64 <tt>--with-gmp[=DIR]</tt>
65
66 <br />&nbsp;<br />
67 If you wish to use GMP library for arbitrary precision arithmetic
68 library instead of using the MPI library included in the package, you can
69 give the --with-gmp[=DIR] option to the `configure'. The DIR is the upper
70 path in your system which contains lib/ and include/ for GMP library.
71
72 <br />&nbsp;<br />
73 <tt>--with-iconv[=DIR]</tt>
74
75 <br />&nbsp;<br />
76 If your system doesn't provide iconv() function in its native libraries
77 (usually libc) or if this function is broken (e.g. older Solaris systems),
78 you may want to use libiconv instead.  The DIR is the upper path in your
79 system which contains lib/ and include/ for libiconv (e.g. /usr/local).
80
81 <br />&nbsp;<br />
82 <tt>--without-pthreads</tt>
83
84 <br />&nbsp;<br />
85 If you do not want to compile the programs with POSIX multi-threads support
86 you can give --without-pthreads option.  This will disable the SILC Thread
87 API and SILC Mutex API.  Furthermore if SILC Thread API is used when this
88 option is used, the routines work, but do not work in threads (are run
89 in the calling process and can block the process).
90
91 <br />&nbsp;<br />
92 <tt>--disable-asm</tt>
93
94 <br />&nbsp;<br />
95 If you have trouble compiling the assembler optimized code in the
96 package or does not want to use them, you can give the --disable-asm
97 option to the `configure' script.  This will assure that assembler
98 optimized code is not compiled in.
99
100 <br />&nbsp;<br />
101 <tt>--enable-ipv6</tt>
102
103 <br />&nbsp;<br />
104 The `configure' will attempt to check for IPv6 support in your system.
105 However, if it fails, but you still want to compile in the IPv6 support
106 you can give --enable-ipv6 option to force the IPv6 support.
107
108 <br />&nbsp;<br />
109 After compilation you can install the Toolkit into your system by giving
110 the command:
111
112 <br />&nbsp;<br />
113 <tt>make install</tt>
114
115
116 <br />&nbsp;<br />&nbsp;<br />
117 <b><a name="windows"></a>Building on Windows</b>
118
119 <br />&nbsp;<br />
120 The Toolkit can be compiled several different ways on Windows.  However,
121 this document describes the method to build the Toolkit to produce native
122 Win32 binaries.  The Toolkit package can also be compiled on Cygwin and
123 MinGW.  For these systems please refer to the README.WIN32 file in the
124 Toolkit package.
125
126 <br />&nbsp;<br />
127 The Toolkit package includes ready MSVC++ Workspace files, that will
128 automatically compile the Toolkit.  The MSVC++ workspace and project files
129 resides in the win32/ subdirectory of the Toolkit package.  The `silc.dsw'
130 file is the workspace file that automatically supports compiling the Toolkit
131 and to generate the SILC Core DLL and SILC Client DLL libraries.
132
133 <br />&nbsp;<br />
134 The SILC Core DLL is named as libsilc and will generate libsilc.dll, and
135 the SILC Client DLL is named as libsilcclient and will generate
136 libsilcclient.dll.  Both of the projects also automatically generates
137 libsilc.lib and libsilcclient.lib import libraries that may be used to
138 link against a client application.
139
140 <br />&nbsp;<br />
141 Generally you do not need to do any specific settings to compile the
142 Toolkit.  However, you must compile the libsilc before compiling the
143 libsilclient, since the SILC Client DLL depends on the SILC Core DLL.
144 You may compile the DLLs as either Release or Debug version.  Just select
145 the preferred method of compilation.  The Debug version will compile the
146 SILC Toolkit with run-time debugging support, which is recommended when
147 doing development with the Toolkit.
148
149 <br />&nbsp;<br />&nbsp;<br />
150 <b><a name="macosx"></a>Building on Mac OS X</b>
151
152 <br />&nbsp;<br />
153 Building the Toolkit on Mac OS X is almost identical on compiling on Unix
154 system.  The reason for this is that the Mac OS X is Unix based operating
155 system.  To build the Toolkit on Mac OS X, give the following commands:
156
157 <br />&nbsp;<br />
158 <tt>
159 setenv CFLAGS -no-cpp-precomp<br />
160 ./configure powerpc<br />
161 make
162 </tt>
163
164 <br />&nbsp;<br />
165 The ./configure can take several options as arguments.  To see them all give
166 command:
167
168 <br />&nbsp;<br />
169 <tt>./configure --help</tt>
170
171 <br />&nbsp;<br />
172 If you do not want to compile the applications, or they do not compile on
173 your system, you can also choose to compile only the libraries, and skip
174 all applications.  In this case, before giving the "make" command, go
175 to the lib/ subdirectory, and give "make" command there:
176
177 <br />&nbsp;<br />
178 <tt>
179 cd lib/<br />
180 make
181 </tt>
182
183 <br />&nbsp;<br />
184 After compilation you can install the Toolkit into your system by giving
185 the command:
186
187 <br />&nbsp;<br />
188 <tt>make install</tt>
189
190 <br />&nbsp;<br />&nbsp;<br />
191 <b><a name="symbian"></a>Building on Symbian OS</b>
192
193 <br />&nbsp;<br />
194 The build environment for Symbian OS requires Carbide.c++ and MS Windows.
195
196 <br />&nbsp;<br />
197 Download the freely available Carbide.c++ from Nokia at
198 <a href="http://forum.nokia.com">http://forum.nokia.com</a>.  The exact
199 hyperlink location changes often, so it is not referenced here.  It is
200 usually under "Tools and SDKs" link.
201
202 <br />&nbsp;<br />
203 After installation a web browser is opened automatically by the
204 Carbide.c++ installer.  Follow its instructions by installing the Perl,
205 CTags and the SDK.  Perl and the SDK are required, but CTags is
206 optional and if necessary can be omitted.
207
208 <br />&nbsp;<br />
209 The SILC Toolkit is generic C and C++ code and should work with any
210 SDK.  If you don't have SDK already installed, install the latest
211 version you can find.  The links to SDKs are found in the Carbide.c++
212 instructions after installation.  If you already have SDK in your
213 system, you should use that.
214
215 <br />&nbsp;<br />
216 After installation import the SILC Toolkit project to Carbide.c++ from the
217 symbian/ subdirectory in the SILC Toolkit package.
218
219 <br />&nbsp;<br />
220 Please read the README.SYMBIAN from the SILC Toolkit package for complete
221 building instructions.