Building on Unix with Autotools

The following instructions are dedicated to users of Unix-like systems (Linux, Mac OS X, Solaris, *BSD, etc.)

Requirements

  • Decent C++ compiler and C++ Standard Library,  GNU GCC 4.x or later recommended.
    For specific distributions, use the commands:
    • CentOS (as root): yum install gcc gcc-c++
    • Ubuntu: sudo apt-get install build-essential
  • Download the latest source code release or checkout from SVN trunk.

Configure

(If you didn't download from SVN, skip this step.) If you are building GEOS downloaded from SVN, you need to have  Autotools available in your system. You will generate the ./configure script with:

$ ./autogen.sh

Now, run configuration script:

$ ./configure

For more details about configuration options run:

$ ./configure --help

Build

$ make

Test

$ make check

Install

You may need to use sudo to get this to run.

$ make install

Build Hints

Feel free to update this article with build hints related to Autotools-based configuration that may be useful for users of Unix-like systems.

Solaris

  • From #331 - Build fails on linking on Solaris
$ LIBS="-lm" ./configure ...