Gammu All Mobile Management Utilities - Installation
====================================================

From Sources - Using CMake
==========================

You can get CMake from <http://www.cmake.org>

For now, only out of source build is supported, so you have to create
separate directory for build.

mkdir build
cd build
cmake ..
make
make install

You can configure build parameters either by command line (see
parameters bellow), or using TUI - ccmake.

Useful cmake parameters:

-DENABLE_SHARED=ON enables shared library
-DCMAKE_BUILD_TYPE="Debug" enables debug build
-DCMAKE_INSTALL_PREFIX="/usr" change installation prefix

You can also disable support for whole set of phones, e.g.:

-DWITH_NOKIA_SUPPORT=OFF disables Nokia phones support
-DWITH_Bluez=OFF disables Bluetooth support
-DWITH_IrDA=OFF disables IrDA support


Cross compilation for Windows
=============================

Only cross compilation using cmake has been tested. You need to install
MinGW cross tool chain and run time. On Debian you can do it by apt-get
install mingw32. Build is then quite simple:

mkdir build-win32
cd build-win32
cmake .. -DCROSS_MINGW=ON
make


MySQL
-----

If you want MySQL support in Win32 build, add path to MySQL binaries in
MYSQL_CROSS_PATH variable:

-DMYSQL_CROSS_PATH=/path/to/mysql

You can download MySQL binaries from <http://dev.mysql.com/>, but then
need some tweaks:

cd mysql/lib/opt
reimp.exe -d libmysql.lib
i586-mingw32msvc-dlltool --kill-at --input-def libmysql.def \
    --dllname libmysql.dll --output-lib libmysql.a

reimp.exe is part of mingw-utils and can be run through wine, I didn't
try to compile native binary from it.


PostgreSQL
----------

If you want PostgreSQL support in Win32 build, add path to MySQL
binaries in POSTGRE_CROSS_PATH variable:

-DPOSTGRES_CROSS_PATH=/path/to/pgsql

You can download PostgreSQL binaries from <http://www.postgresql.org/>,
but then you need to add wldap32.dll library to bin.


Gettext
-------

For Gettext (internationalization support), you need
gettext-0.14.4-bin.zip, gettext-0.14.4-dep.zip, gettext-0.14.4-lib.zip
from <http://gnuwin32.sourceforge.net/>. Unpack these to some directory
and point build 

-DGETTEXT_CROSS_PATH=/path/to/gettext


From Sources - Using autoconf (old method)
==========================================

This method is deprecated and will be removed in future.

./configure
make
make install

To enable shared library, use "make shared" instead of "make".

# vim: et ts=4 sw=4 sts=4 tw=72
