I had some trouble compiling pcntl PHP module on OS X Lion so I thought I’d share this solution. In fact, you can use these steps to compile any other PHP module.
First download the latest php source from PHP.NET
cd into your php src directory, then:
cd ext/pcntlphpize./configure --enable-pcntl
When I ran the last step (configure), I got the following error:
‘PHP_FE_END’ undeclared here (not in a function)To get around the problem, you need to specify your system architecture before configuring your extension:
CFLAGS='-arch x86_64' CXXFLAGS='-arch x86_64' LDFLAGS='-arch x86_64' ./configure --enable-pcntlCopy compiled modules into PHP extensions:
cp modules/pcntl.so /usr/lib/php/extensions/Enable the extension:
echo "extension=pcntl.so" >> /etc/php.iniMarko

Thanks, you forgot to include the make step
Thanks Richard! Those minor details
Thank you for the tip on how to get around the problem!