INSTALL 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. /*
  2. * libZRTP SDK library, implements the ZRTP secure VoIP protocol.
  3. * Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
  4. * Contact: http://philzimmermann.com
  5. * For licensing and other legal details, see the file zrtp_legal.c.
  6. *
  7. * Viktor Krykun <v.krikun at zfoneproject.com>
  8. */
  9. Basic Installation
  10. ================================================================================
  11. To start playing with Zfone and libzrtp you should install few developers
  12. packages on your machine: gcc and g++ compilers, automake and autoconf tools.
  13. To install library as a Zfone component for Linux the following flags
  14. should be used: BUILD_DEBUG_LOG, BUILD_WITH_CFUNC, BUILD_DEFAULT_CACHE,
  15. BUILD_DEFAULT_TIMER and WITH_ZFONE.
  16. The following instructions are for experienced users and developers only.
  17. If you just want to install Zfone use the command as follows:
  18. ./configure CFLAGS="-O0 -g3 -W -Wall -DBUILD_DEBUG_LOG -DBUILD_WITH_CFUNC
  19. -DBUILD_DEFAULT_CACHE -DBUILD_DEFAULT_TIMER -DWITH_ZFONE"
  20. Library distribution contains installation and configuration files, project files
  21. for several Operation Systems. To install Library on Unix-like systems the
  22. autotools tool set is used. To install on Windows - Microsoft Visual Studio.
  23. Except standard for your system compile flags the following are available for
  24. your system:
  25. -# -DBUILD_DEBUG_LOG - enables debug and logging information
  26. This flag is recommended to be used at design stages for testing. Logs make
  27. debug process much easier and are to be included into bugreport.
  28. -# -DBUILD_WITH_CFUNC - assign to the library to gather standard for this
  29. platform system interface functions realizations. This option simplifies the
  30. library use and make code more compact. You can have a look at realizations
  31. in src/zrtp-iface.c. file. And if they suit you use this flag.
  32. -# -DBUILD_EMPTY_CACHE this flag assigns to the library to use empty stubs
  33. instead of operations with cache. This checkbox may be used in test
  34. applications or in systems where cache secrets storing is impossible. Be
  35. careful with this flag! Use it if it is really necessary.
  36. -# -DBUILD_EMPTY_TIMER this flag assigns to the library to use empty stubs
  37. instead of delayed tasks processing. This checkbox may be used in test
  38. applications or in systems with the reliable communication channel (the
  39. package loss is impossible). Be careful with this flag! Use it if it is
  40. really necessary.
  41. Except library itself, the set of utilities for the all components workability
  42. check on the basis of a certain platform is provided. libzrtp test creates
  43. several parallel ZRTP sessions, initiates transfer to the protected mode,
  44. displays statistics, after which the application is stopped. If application test
  45. was completed successfully the library is configured correctly, all components
  46. work correctly. Note! Installation of test application is carried out with
  47. -DBUILD_EMPTY_CACHE -DBUILD_EMPTY_TIMER flags. After fulfilling tests reinstall
  48. library without use of these flags.
  49. Further instructions must be followed in order to build and set up the library in
  50. any Unix-like operation system (Linux, FreeBSD, MacOS):
  51. -# Download source codes from zfoneproject.com
  52. -# Decompress the archive libzrtp-0.3.X.tzr.gz : tar -zxf ./libzrtp-0.3.X.tzr.gz
  53. and open cd libzrtp-0.3.X directory
  54. -# Configure the library: ./configure (use necessary compollation flags)
  55. -# Build the library: make
  56. -# If you get the errors during, please send a full log of configuration
  57. and building process to zfone-bugs@philzimmermann.com. Please specify
  58. the operation system, hardware platform, compiler version and other
  59. environmental parameters. Any proposals will be taken into account when
  60. developing new versions.
  61. -# After te library successful building, run setup (installation): ./make install
  62. -# to build test unites run ./configure with CFLAGS="-DBUILD_DEBUG_LOG
  63. -DBUILD_WITH_CFUNC -DBUILD_EMPTY_CACHE -DBUILD_EMPTY_TIMER and parameter
  64. --enable-test. After successful configuration start test: "make check".
  65. This command will build and run all test (bnlib test, srtp tests and
  66. libzrtp tests) Don't forget to rebuild library without -DBUILD_EMPTY_CACHE
  67. -DBUILD_EMPTY_TIMER.
  68. For library configuration and installation on Windows platform the followinf
  69. files should be used:
  70. -# For installation with the Microsoft Visual Studio v6 use:
  71. - libzrtp.dsw
  72. - libzrtp.dsp
  73. - test\libzrtp_test.dsp
  74. -# For installation with the Microsoft Visual Studio v7 use:
  75. - libzrtp.sln
  76. - libzrtp.vcproj
  77. - test\libzrtp_test.vcproj
  78. -# If you want to build libzrtp in Windows kernel mode you mast use MAKEFILE.WIN32
  79. For 32-bit machines bnlib contains assemble file lbn80386.asm. The assembler is
  80. needed to install it. The compiler ml is in the stracture of VS7, if you use VS6
  81. you can use Microsoft Macro Assembler (http://www.masm32.com/masmdl.htm). To
  82. compile this file you have define in properties: <c>Commands: <dir>\ml /c /Cx
  83. /coff /Fo $(TargetDir)\$(InputName).obj $(InputPath) Outputs: $(TargetDir)\$(InputName).obj
  84. </c> where <dir> is a complete path to the compiler.
  85. Possible problems and methods of the solution:
  86. -# Some environment problems with automatic definition of architecture
  87. and byte-order are possible at library building. We recommend before building
  88. of libZRTP on a new program or hardware platform uncomment the test-unite at
  89. the end of the file \c zrtp_syste.h. If there is a mistakes in definition of
  90. architecture or byte-order use zrtp_system.h manual configuration following
  91. the comments.
  92. Please take into account the fact that libzrtp developers are not responsible for
  93. external modules of the library. In other words, the functionality of the library
  94. was tested under majority of widespread Linux and Windows systems, but warnings
  95. can still occur during these modules compilation.
  96. If you have faced with some problems during configuration or installing of the
  97. library - send a report to the Support Service. If you installed library on the
  98. platform not described here, please contact the Support Service. We are
  99. interested very much to get know the results of testing on new platforms. We
  100. will carefully examine all proposals and will do our best to realize them in new
  101. library versions.
  102. Compilers and Options
  103. =================
  104. Some systems require unusual options for compilation or linking that
  105. the `configure' script does not know about. You can give `configure'
  106. initial values for variables by setting them in the environment. Using
  107. a Bourne-compatible shell, you can do that on the command line like
  108. this:
  109. CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
  110. Or on systems that have the `env' program, you can do it like this:
  111. env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
  112. Compiling For Multiple Architectures
  113. =================
  114. You can compile the package for more than one kind of computer at the
  115. same time, by placing the object files for each architecture in their
  116. own directory. To do this, you must use a version of `make' that
  117. supports the `VPATH' variable, such as GNU `make'. `cd' to the
  118. directory where you want the object files and executables to go and run
  119. the `configure' script. `configure' automatically checks for the
  120. source code in the directory that `configure' is in and in `..'.
  121. If you have to use a `make' that does not supports the `VPATH'
  122. variable, you have to compile the package for one architecture at a time
  123. in the source code directory. After you have installed the package for
  124. one architecture, use `make distclean' before reconfiguring for another
  125. architecture.
  126. Installation Names
  127. ==================
  128. By default, `make install' will install the package's files in
  129. `/usr/local/include', `/usr/local/lib', etc. You can specify an
  130. installation prefix other than `/usr/local' by giving `configure' the
  131. option `--prefix=PATH'.
  132. You can specify separate installation prefixes for
  133. architecture-specific files and architecture-independent files. If you
  134. give `configure' the option `--exec-prefix=PATH', the package will use
  135. PATH as the prefix for installing programs and libraries.
  136. Documentation and other data files will still use the regular prefix.
  137. If the package supports it, you can cause programs to be installed
  138. with an extra prefix or suffix on their names by giving `configure' the
  139. option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
  140. Optional Features
  141. =================
  142. Some packages pay attention to `--enable-FEATURE' options to
  143. `configure', where FEATURE indicates an optional part of the package.
  144. They may also pay attention to `--with-PACKAGE' options, where PACKAGE
  145. is something like `gnu-as' or `x' (for the X Window System). The
  146. `README' should mention any `--enable-' and `--with-' options that the
  147. package recognizes.
  148. For packages that use the X Window System, `configure' can usually
  149. find the X include and library files automatically, but if it doesn't,
  150. you can use the `configure' options `--x-includes=DIR' and
  151. `--x-libraries=DIR' to specify their locations.
  152. Specifying the System Type
  153. ==========================
  154. There may be some features `configure' can not figure out
  155. automatically, but needs to determine by the type of host the package
  156. will run on. Usually `configure' can figure that out, but if it prints
  157. a message saying it can not guess the host type, give it the
  158. `--host=TYPE' option. TYPE can either be a short name for the system
  159. type, such as `sun4', or a canonical name with three fields:
  160. CPU-COMPANY-SYSTEM
  161. See the file `config.sub' for the possible values of each field. If
  162. `config.sub' isn't included in this package, then this package doesn't
  163. need to know the host type.
  164. If you are building compiler tools for cross-compiling, you can also
  165. use the `--target=TYPE' option to select the type of system they will
  166. produce code for and the `--build=TYPE' option to select the type of
  167. system on which you are compiling the package.
  168. Sharing Defaults
  169. ================
  170. If you want to set default values for `configure' scripts to share,
  171. you can create a site shell script called `config.site' that gives
  172. default values for variables like `CC', `cache_file', and `prefix'.
  173. `configure' looks for `PREFIX/share/config.site' if it exists, then
  174. `PREFIX/etc/config.site' if it exists. Or, you can set the
  175. `CONFIG_SITE' environment variable to the location of the site script.
  176. A warning: not all `configure' scripts look for a site script.
  177. Defining Variables
  178. ==================
  179. Variables not defined in a site shell script can be set in the
  180. environment passed to `configure'. However, some packages may run
  181. configure again during the build, and the customized values of these
  182. variables may be lost. In order to avoid this problem, you should set
  183. them in the `configure' command line, using `VAR=value'. For example:
  184. ./configure CC=/usr/local2/bin/gcc
  185. will cause the specified gcc to be used as the C compiler (unless it is
  186. overridden in the site shell script).
  187. Operation Controls
  188. ==================
  189. `configure' recognizes the following options to control how it
  190. operates.
  191. `--version'
  192. `-V'
  193. Print the version of Autoconf used to generate the `configure'
  194. script, and exit.
  195. `--cache-file=FILE'
  196. Use and save the results of the tests in FILE instead of
  197. `./config.cache'. Set FILE to `/dev/null' to disable caching, for
  198. debugging `configure'.
  199. `--help'
  200. Print a summary of the options to `configure', and exit.
  201. `--quiet'
  202. `--silent'
  203. `-q'
  204. Do not print messages saying which checks are being made.
  205. `--srcdir=DIR'
  206. Look for the package's source code in directory DIR. Usually
  207. `configure' can determine that directory automatically.
  208. `--version'
  209. Print the version of Autoconf used to generate the `configure'
  210. script, and exit.
  211. `configure' also accepts some other, not widely useful, options.