Source
x
/*
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
* Contact: http://philzimmermann.com
* For licensing and other legal details, see the file zrtp_legal.c.
*
* Viktor Krykun <v.krikun at zfoneproject.com>
*/
Basic Installation
================================================================================
To start playing with Zfone and libzrtp you should install few developers
packages on your machine: gcc and g++ compilers, automake and autoconf tools.
To install library as a Zfone component for Linux the following flags
should be used: BUILD_DEBUG_LOG, BUILD_WITH_CFUNC, BUILD_DEFAULT_CACHE,
BUILD_DEFAULT_TIMER and WITH_ZFONE.
The following instructions are for experienced users and developers only.
If you just want to install Zfone use the command as follows:
./configure CFLAGS="-O0 -g3 -W -Wall -DBUILD_DEBUG_LOG -DBUILD_WITH_CFUNC
-DBUILD_DEFAULT_CACHE -DBUILD_DEFAULT_TIMER -DWITH_ZFONE"
Library distribution contains installation and configuration files, project files
for several Operation Systems. To install Library on Unix-like systems the
autotools tool set is used. To install on Windows - Microsoft Visual Studio.
Except standard for your system compile flags the following are available for
your system:
-# -DBUILD_DEBUG_LOG - enables debug and logging information
This flag is recommended to be used at design stages for testing. Logs make
debug process much easier and are to be included into bugreport.
-# -DBUILD_WITH_CFUNC - assign to the library to gather standard for this
platform system interface functions realizations. This option simplifies the
library use and make code more compact. You can have a look at realizations
in src/zrtp-iface.c. file. And if they suit you use this flag.
-# -DBUILD_EMPTY_CACHE this flag assigns to the library to use empty stubs
instead of operations with cache. This checkbox may be used in test
applications or in systems where cache secrets storing is impossible. Be
careful with this flag! Use it if it is really necessary.
-# -DBUILD_EMPTY_TIMER this flag assigns to the library to use empty stubs
instead of delayed tasks processing. This checkbox may be used in test
applications or in systems with the reliable communication channel (the
package loss is impossible). Be careful with this flag! Use it if it is
really necessary.
Except library itself, the set of utilities for the all components workability
check on the basis of a certain platform is provided. libzrtp test creates
several parallel ZRTP sessions, initiates transfer to the protected mode,
displays statistics, after which the application is stopped. If application test
was completed successfully the library is configured correctly, all components
work correctly. Note! Installation of test application is carried out with
-DBUILD_EMPTY_CACHE -DBUILD_EMPTY_TIMER flags. After fulfilling tests reinstall
library without use of these flags.
Further instructions must be followed in order to build and set up the library in
any Unix-like operation system (Linux, FreeBSD, MacOS):
-# Download source codes from zfoneproject.com
-# Decompress the archive libzrtp-0.3.X.tzr.gz : tar -zxf ./libzrtp-0.3.X.tzr.gz
and open cd libzrtp-0.3.X directory
-# Configure the library: ./configure (use necessary compollation flags)
-# Build the library: make
-# If you get the errors during, please send a full log of configuration
and building process to zfone-bugs@philzimmermann.com. Please specify
the operation system, hardware platform, compiler version and other
environmental parameters. Any proposals will be taken into account when
developing new versions.
-# After te library successful building, run setup (installation): ./make install
-# to build test unites run ./configure with CFLAGS="-DBUILD_DEBUG_LOG
-DBUILD_WITH_CFUNC -DBUILD_EMPTY_CACHE -DBUILD_EMPTY_TIMER and parameter
--enable-test. After successful configuration start test: "make check".
This command will build and run all test (bnlib test, srtp tests and
libzrtp tests) Don't forget to rebuild library without -DBUILD_EMPTY_CACHE
-DBUILD_EMPTY_TIMER.
For library configuration and installation on Windows platform the followinf
files should be used:
-# For installation with the Microsoft Visual Studio v6 use:
- libzrtp.dsw
- libzrtp.dsp
- test\libzrtp_test.dsp
-# For installation with the Microsoft Visual Studio v7 use:
- libzrtp.sln
- libzrtp.vcproj
- test\libzrtp_test.vcproj
-# If you want to build libzrtp in Windows kernel mode you mast use MAKEFILE.WIN32
For 32-bit machines bnlib contains assemble file lbn80386.asm. The assembler is
needed to install it. The compiler ml is in the stracture of VS7, if you use VS6
you can use Microsoft Macro Assembler (http://www.masm32.com/masmdl.htm). To
compile this file you have define in properties: <c>Commands: <dir>\ml /c /Cx
/coff /Fo $(TargetDir)\$(InputName).obj $(InputPath) Outputs: $(TargetDir)\$(InputName).obj
</c> where <dir> is a complete path to the compiler.