If you are trying to compile PHP on a 64-bit OS (e.g. CentOS 6.4), you can see various error messages. The only reason is the different location of libraries, that causes the configure script to break. Let me tell you about a popular fix for DB4 support, that is not enabled by default.
I have tried to configure PHP with dba support. Here is the configure line part I used:
./configure –enable-dba –with-db4
And the error message I got:
checking for DB4 major version… configure: error: Header contains different version
I have searched for various fixes – and there was nothing that could help. I had all the db4 stuff installed (db4-devel), but the configure script was unable to find my db4 installation. So the solution is to create symbolic links to library directories. Here is the code:
# ln -s /usr/include /opt/include
# ln -s /usr/lib64 /opt/lib
After that you will need to repeat PHP configuration with the following string:
./configure –enable-dba –with-db4=/opt
This should do the job. Let me know if you have any other ideas of solving this issue.