Keep in mind that phpize requires GNU libtoolize, which is generally installed as ‘glibtoolize’, you might want to make a local symlink, or to $YOUR_FAVORITE_DIRECTORY_HIERARCHY; as well there are a few pitfalls, such as those which require dl functionality themselves – check out OpenDarwin’s dlcompat for compatible shims, et al.
Also, be wary of mixing the common ELF library .so and Darwin’s .dynlib extensions – it can get messy. I’m guilty of this somewhat, myself, but I prefer not to err in the way of confusing system extensions, or superceeding them with my own – as well, anything I release, I try to compile statically, to enable the end user to use the application without being forced to become a developer or project maintainer themself!