Assuming you have Informix setup and working correctly in /opt/IBM/informix, these are my notes for building the PHP PDO.
First create a file called /opt/IBM/informix/informix.env
Code:
# Script to setup environment for Informix
INFORMIXDIR=/opt/IBM/informix
PATH=$PATH:/opt/IBM/informix/bin
ODBCINI=/etc/odbc.ini
INFORMIXSERVER={Your Informix server}
export INFORMIXDIR
export PATH
export ODBCINI
export INFORMIXSERVER
Then try these commands
# . /opt/IBM/informix/informix.env
# wget
http://pecl.php.net/get/PDO_INFORMIX-1.2.6.tgz
# tar zxvf PDO_INFORMIX-1.2.6.tgz
# cd PDO_INFORMIX-1.2.6
# phpize
# ./configure
# make
# cp modules/pdo_informix.so /usr/lib64/php/modules/
# echo extension=pdo_informix.so > /etc/php.d/pdo_informix.ini
# echo " " >> /etc/sysconfig/httpd
# echo "# Setup Informix Environment" >> /etc/sysconfig/httpd
# echo ". /opt/IBM/informix/informix.env" >> /etc/sysconfig/httpd
Update /etc/odbc.ini and /etc/odbcinst.ini
NOTE:
If using PHP version 5.4 or newer, pdo_informix.c line 45 "function_entry" needs to be changed to "zend_function_entry".