#!/bin/bash

# Builds Perl with shared module support for libperl

PERL_VERSION=5.16.3

cd /tmp
rm -Rf perl-$PERL_VERSION
rm -f perl-$PERL_VERSION.tar.gz
wget http://www.cpan.org/src/5.0/perl-$PERL_VERSION.tar.gz
tar -zxvf ./perl-$PERL_VERSION.tar.gz
(cd perl-$PERL_VERSION ; ccflags='-fPIC' sh Configure -Dusethreads -de -Dprefix=/usr -Dcc=gcc -Duseshrplib && make && make install)
(cd /usr/include; h2ph *.h */*.h)
