## Installing the BeeCrypt Cryptography Library

When it comes to installing BeeCrypt you basically have the following alternatives:

1. Installing from the source code - aka roll your own

- Getting the source code

The primary download location for the source tarball is through Virtual Unlimited's download page. Alternatively you can download from SourceForge.

- Unpacking

Once you have the source tarball, unpack it with GNU tar (if you have it); on Windows you can use WinRAR.

- Configuring, building and installing

The library can be built on a variety of platforms, and we will illustrate the two most common ways:

Using the GNU toolchain

The source tarball contains a configure script produced with GNU autoconf; on most platforms you will want to use this.

As with most configure scripts, there are a few options you can use:

`--prefix`
  Use this option to indicate where you want the shared library and header files installed. By default this is set to `/usr/local`. Another suggested location is the `/usr` directory.
`--target`
  Use this option to indicate that you want the library built for a processor other than the one which is normally detected. Some examples of useful combinations are:
  `--target=sparcv8plus-sun-solaris2.8`
  `--target=i686-pc-freebsd4.3`
`--enable-debug`
  will build the library with debug symbols, and without assembler optimization, and instead just use plain C code.
`--disable-optimized`
  will build the library without any processor-specific assembler optimization, and instead just use plain C code.
`--without-javaglue`
  will build the library without code which allows BeeCrypt for Java to employ the native code in the library (automatic if you don't have a JDK installed).
`--disable-threads`
  will build the library without thread-safe code; useful on platforms such as NetBSD (automatic if configure can't find threads).
`--disable-aio`
  will build the library without asynchronous I/O on entropy devices (automatic if configure can't find POSIX-compliant asynchronous I/O routines).
`--with-mtmalloc`
  will build the library with multi-thread optimized malloc routines (available on Solaris 8). There is a tradeoff in speed versus the amount of memory allocated.

To build, run:

    make

To install, run:

    make install

Using Visual C++ for Win32

Microsoft Visual C++ is currently the preferred platform for compiling the library, as it seems faster and more stable than other platforms.

The prerequisites for compiling are:

Visual C++ 6.0
  At the time of writing, it is recommended to install the latest service pack for Visual Studio. You can find it through Microsoft's download page.
Visual C++ Processor Pack
  You will need this package to support compilation of the assembler source code. You can download it here.

Before going on, make sure the following Visual C++ tools are found on your PATH: cl.exe, (the compiler), ml.exe (the assembler), link.exe (the linker) and nmake.exe (the make utility).

For the Win32 platform, there is a Makefile.mak for Visual C++ included; if you have a Pentium class processor, you won't have to configure the source tree.

This Makefile.mak is set up to compile Java support into the library. If you don't have JDK 1.2 or later installed, you'll need to edit this file.

To build, run:

    nmake /f Makefile.mak

Using Metrowerks CodeWarrior for Win32

The prerequisites for compiling are:

CodeWarrior Pro
  Use version 5 or later.
CodeWarrior Pro Assembler Plugin
  This tool isn't officially support by MetroWerks, but it functions fine in conjunction with the project file included in the library.

To build, start the CodeWarrior IDE, open project file 'beecrypt.mcp' and make the BeeCrypt DLL by pressing the `[F7]` key.

Installing the BeeCrypt DLL

To install, either copy file 'beecrypt.dll' to your Windows System directory (on Windows 95/98/Millenium), or to your Windows System 32 directory (on Windows NT/2000).

If you don't need the BeeCrypt DLL globallly available, copy it into the same directory as the application which is going to use it. If you intend to develop software with BeeCrypt, you'll need file 'beecrypt.lib'. Either copy it into project directory, or point your Makefile or project to it.

2. Installing precompiled versions

Several different flavors of precompiled versions exist.

Win32 BeeCrypt DLLs
  Virtual Unlimited makes precompiled BeeCrypt DLL and LIB files, usable on Pentium class processors. If you want to develop your own software with these files, you will also need the header files from the source tarball. See 'Getting the source code'.
RedHat RPMS
  Virtual Unlimited makes BeeCrypt RPM packages for every release for at least the following platforms: i386, i586, i686, powerpc. As we get access to more platforms, we will try to make more RPMS available; until then it shouldn't be too hard to get the BeeCrypt SRPM file, install it and compile your own RPMS from it. Note that RPM packages originating at Virtual Unlimited will contain a signature, which you can verify with this key.
Debian Packages
  Thanks to Luca Filipozzi there are Debian packages available for BeeCrypt. You can find these packages on various Debian mirror sites.