Howto compile Sybase/Mssql FreeTDS module for PHP5

Howto install Sybase_CT with FreeTDS on Ubuntu 10.10 and probably a couple of other systems.
apt-get install freetds-dev
apt-get install php5-dev
wget the relevant source for your installed PHP5 – in there you find the sybase_ct module.

copy the source folder to /usr/src/ if you didnt apt-getted the files directly into this folder.
Move into freetds-dev folder and make ./configure && make -j4
Locate the ./src/sybase_ct/.libs/ folder in freetds.
Copy everything in ./.libs/ to /freetds-dev/lib/
Do the same for ./src/tds/.libs/
Move into php5-dev source folder.
Enter Ext folder, and go into sybase_ct folder.
Type: phpize && ./configure –with-sybase_ct=<path to freetds src> && make
Go down and enter mssql folder
type: phpize && ./configure –with-mssql=<path to freetds src>

In each ext folder it will now exist a moduels folder, in that you will find a corresponding .so
file. Copy that file into the /usr/lib/php5/<somedate> folder.
And create a the modules line in either your php.ini or the conf.d for your phpini.
It should read: extension=<module>.so