Php Recompile for cURL

I need to know how to recompile php thru SSH on root to get cURL support for php.

Any tuts on how to do this?