Depending on the extension, you can just copy it into a folder and include it using
PHP Code:
include("yourFile.php");
If the extension requires a module to be pre-compiled into php (like GD Lib), then you have re-compile all of php and add the libraries you need when you run ./configure