Since Slony 2.0.4 is the version bundled/supported by EnterpriseDB Advanced Server 8.4, here are the required steps to build againts Slony >= 2.1.0, without deleting Slony 2.0.4 binaries.
  • Install the prerequisites
    sudo apt-get install perl build-essential bison flex autoconf
  • Create a temporary symbolic link to libdir.
    sudo mkdir -pv /opt/slony/2.1.0
    sudo ln -s /opt/PostgresPlus/8.4AS/lib /opt/slony/2.1.0/lib
    
  • Download Slony's sources
    cd /tmp/
    wget -q "http://git.postgresql.org/gitweb/?p=slony1-engine.git;a=snapshot;h=0a9346436b0369b887945219bd43b611fd79c6ca;sf=tgz" -O - | tar xzf -
    cd slony1-engine-0a93464/
  • Configure, compile
    ./configure \
    --prefix=/opt/slony/2.1.0 \
    --with-pgconfigdir=/opt/PostgresPlus/8.4AS/bin/ \
    --with-perlsharedir=/opt/slony/2.1.0/lib \
    --with-pgsharedir=/opt/slony/2.1.0/share \
    --with-perltools=/opt/slony/2.1.0/scripts \
    --with-pglibdir=/opt/slony/2.1.0/lib \
    --with-pgpkglibdir=/opt/slony/2.1.0/lib
    
    grep -lriE '\$libdir' . | while read file;do sed -i 's:\$libdir:/opt/slony/2.1.0/lib:g' $file;done
    
    make
    
  • Delete the symbolic link and install
    sudo rm -rf /opt/slony/
    sudo make install