back to main page
Generalities
The default destination path prefix for installed files is /usr/local.
Results from the installation script will be placed into subdirectories include, lib and bin.
If this default path prefix is proper, then execute:
./configure
If another path prefix is required, then execute:
./configure --prefix=/my/path
In either case, the directory of the prefix path must exist and be writable by the installer.
After executing configure, execute:
make
make install
Or even better, you can strip any executable binary, in order to eliminate any debugging symbol,
and thus widely reducing their size:
cd src/shell
make install-strip
The only external dependencies needed in order to build spatialite are the PROJ.4 and GEOS
devel-packages.
You can get them for various source [this including downloading the precompiled libraries from this site],
but the preferred and most reliable way is to build them starting from sources before any attempt to build spatialite.
Thus before starting you can download:
You can build spatialite without including GEOS; GEOS is a quite heavy-weighted library,
and you may well prefer to build a light-weighted version of spatialite
[loosing some advanced features, by the way, but saving lots of memory];
if you want to do such a thing:
./configure --enable-geos=no [disabling GEOS saves some 1.200 KB of binary code]
You can even decide not to include PROJ.4:
./configure --enable-proj=no [disabling PROJ.4 saves some 170 KB of binary code]
If you wish to build an extra-light-weighted version of spatialite you can obviously omit
both PROJ.4 and GEOS:
./configure --enable-geos=no --enable-proj=no
Building on Linux
We'll suppose you have unpacked the PROJ.4 sources as ./proj-4.6.1:
cd proj-4.6.1
./configure
make
sudo make install
cd ..
Then, supposing you have unpacked the GEOS sources as ./geos-3.0.0:
cd geos-3.0.0
./configure
make
sudo make install
cd ..
And finally, supposing you have unpacked the spatialite sources as ./spatialite-2.2:
cd spatialite-2.2
./configure
make
sudo make install
cd src/shell
sudo make install-strip
cd ../../..
Building on Windows
We suppose you are using the MinGW compiler and the MSys shell.
We'll suppose you have unpacked the PROJ.4 sources as ./proj-4.6.1:
cd proj-4.6.1
export "LDFLAGS=-no-undefined"
./configure --target=mingw32
make
make install
cd ..
Then, supposing you have unpacked the GEOS sources as ./geos-3.0.0:
cd geos-3.0.0
./configure --target=mingw32
make
make install
cd ..
And finally, supposing you have unpacked the spatialite sources as ./spatialite-2.2:
cd spatialite-2.2
export "CFLAGS=-I/usr/local/include"
export "LDFLAGS=-L/usr/local/lib"
./configure --target=mingw32
make
make install
cd src/shell
make install-strip
cd ../../..
Building on MacOsX
Basically, a MacOsX build is a plain, standard *nix build.
We'll suppose you have unpacked the PROJ.4 sources as ./proj-4.6.1:
cd proj-4.6.1
./configure
make
sudo make install
cd ..
Then, supposing you have unpacked the GEOS sources as ./geos-3.0.0:
cd geos-3.0.0
./configure
make
sudo make install
cd ..
And finally, supposing you have unpacked the spatialite sources as ./spatialite-2.2:
cd spatialite-2.2
./configure --target=macosx
make
sudo make install
cd src/shell
sudo make install-strip
cd ../../..
IMPORTANT NOTICE: this will build an executable for the
specific platform you are currently using.
[i.e. when building on a PowerPC Mac, resulting binary will be targeted to run on PPC anyway].
And when building on Intel Mac, resulting binary will run on Intel target.
back to main page